@builder.io/sdk-solid 0.7.0 → 0.7.1-0

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.
package/lib/node/dev.jsx CHANGED
@@ -172,6 +172,19 @@ var getFunctionArguments = ({
172
172
  event
173
173
  });
174
174
  };
175
+ var getBuilderGlobals = () => ({
176
+ isEditing: isEditing(),
177
+ isBrowser: isBrowser(),
178
+ isServer: !isBrowser(),
179
+ getUserAttributes: () => getUserAttributes()
180
+ });
181
+ var parseCode = (code, {
182
+ isExpression = true
183
+ }) => {
184
+ const useReturn = isExpression && !(code.includes(";") || code.includes(" return ") || code.trim().startsWith("return "));
185
+ const useCode = useReturn ? `return (${code});` : code;
186
+ return useCode;
187
+ };
175
188
 
176
189
  // src/functions/evaluate/browser-runtime/browser.js
177
190
  var runInBrowser = ({
@@ -213,6 +226,156 @@ function flattenState(rootState, localState, rootSetState) {
213
226
  });
214
227
  }
215
228
 
229
+ // src/functions/evaluate/node-runtime/safeDynamicRequire.js
230
+ var noop = () => null;
231
+ var safeDynamicRequire = noop;
232
+ try {
233
+ safeDynamicRequire = eval("require");
234
+ } catch (error) {
235
+ }
236
+
237
+ // src/functions/set.js
238
+ var set = (obj, _path, value) => {
239
+ if (Object(obj) !== obj) {
240
+ return obj;
241
+ }
242
+ const path = Array.isArray(_path) ? _path : _path.toString().match(/[^.[\]]+/g);
243
+ path.slice(0, -1).reduce((a, c, i) => Object(a[c]) === a[c] ? a[c] : a[c] = Math.abs(Number(path[i + 1])) >> 0 === +path[i + 1] ? [] : {}, obj)[path[path.length - 1]] = value;
244
+ return obj;
245
+ };
246
+
247
+ // src/functions/evaluate/node-runtime/node-runtime.js
248
+ var __defProp = Object.defineProperty;
249
+ var __defProps = Object.defineProperties;
250
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
251
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
252
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
253
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
254
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
255
+ enumerable: true,
256
+ configurable: true,
257
+ writable: true,
258
+ value
259
+ }) : obj[key] = value;
260
+ var __spreadValues = (a, b) => {
261
+ for (var prop in b || (b = {}))
262
+ if (__hasOwnProp.call(b, prop))
263
+ __defNormalProp(a, prop, b[prop]);
264
+ if (__getOwnPropSymbols)
265
+ for (var prop of __getOwnPropSymbols(b)) {
266
+ if (__propIsEnum.call(b, prop))
267
+ __defNormalProp(a, prop, b[prop]);
268
+ }
269
+ return a;
270
+ };
271
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
272
+ var ivm = safeDynamicRequire("isolated-vm");
273
+ var getSyncValName = (key) => `bldr_${key}_sync`;
274
+ var BUILDER_SET_STATE_NAME = "BUILDER_SET_STATE";
275
+ var INJECTED_IVM_GLOBAL = "BUILDER_IVM";
276
+ var REF_TO_PROXY_FN = `
277
+ var refToProxy = (obj) => {
278
+ if (typeof obj !== 'object' || obj === null) {
279
+ return obj;
280
+ }
281
+ return new Proxy({}, {
282
+ get(target, key) {
283
+ if (key === 'copySync') {
284
+ return () => obj.copySync();
285
+ }
286
+ const val = obj.getSync(key);
287
+ if (typeof val?.getSync === 'function') {
288
+ return refToProxy(val);
289
+ }
290
+ return val;
291
+ },
292
+ set(target, key, value) {
293
+ const v = typeof value === 'object' ? new ${INJECTED_IVM_GLOBAL}.Reference(value) : value;
294
+ obj.setSync(key, v);
295
+ ${BUILDER_SET_STATE_NAME}(key, value)
296
+ },
297
+ deleteProperty(target, key) {
298
+ obj.deleteSync(key);
299
+ }
300
+ })
301
+ }
302
+ `;
303
+ var processCode = ({
304
+ code,
305
+ args
306
+ }) => {
307
+ const fnArgs = args.map(([name]) => `var ${name} = refToProxy(${getSyncValName(name)}); `).join("");
308
+ return `
309
+ ${REF_TO_PROXY_FN}
310
+ ${fnArgs}
311
+ function theFunction() {
312
+ ${code}
313
+ }
314
+
315
+ let output = theFunction()
316
+
317
+ if (typeof output === 'object' && output !== null) {
318
+ output = JSON.stringify(output.copySync ? output.copySync() : output);
319
+ }
320
+
321
+ output;
322
+ `;
323
+ };
324
+ var getIsolateContext = () => {
325
+ const isolate = new ivm.Isolate({
326
+ memoryLimit: 128
327
+ });
328
+ return isolate.createContextSync();
329
+ };
330
+ var runInNode = ({
331
+ code,
332
+ builder,
333
+ context,
334
+ event,
335
+ localState,
336
+ rootSetState,
337
+ rootState
338
+ }) => {
339
+ const state = fastClone(__spreadValues(__spreadValues({}, rootState), localState));
340
+ const args = getFunctionArguments({
341
+ builder,
342
+ context,
343
+ event,
344
+ state
345
+ });
346
+ const isolateContext = getIsolateContext();
347
+ const jail = isolateContext.global;
348
+ jail.setSync("global", jail.derefInto());
349
+ jail.setSync("log", function(...logArgs) {
350
+ console.log(...logArgs);
351
+ });
352
+ jail.setSync(BUILDER_SET_STATE_NAME, function(key, value) {
353
+ set(rootState, key, value);
354
+ rootSetState == null ? void 0 : rootSetState(rootState);
355
+ });
356
+ args.forEach(([key, arg]) => {
357
+ const val = typeof arg === "object" ? new ivm.Reference(key === "builder" ? __spreadProps(__spreadValues({}, arg), {
358
+ getUserAttributes: () => arg.getUserAttributes()
359
+ }) : arg) : null;
360
+ jail.setSync(getSyncValName(key), val);
361
+ });
362
+ jail.setSync(INJECTED_IVM_GLOBAL, ivm);
363
+ const evalStr = processCode({
364
+ code,
365
+ args
366
+ });
367
+ const resultStr = isolateContext.evalSync(evalStr);
368
+ try {
369
+ const res = JSON.parse(resultStr);
370
+ return res;
371
+ } catch (_error) {
372
+ return resultStr;
373
+ }
374
+ };
375
+
376
+ // src/functions/evaluate/choose-eval.js
377
+ var chooseBrowserOrServerEval = (args) => isBrowser() ? runInBrowser(args) : runInNode(args);
378
+
216
379
  // src/functions/evaluate/evaluate.js
217
380
  function evaluate({
218
381
  code,
@@ -227,17 +390,11 @@ function evaluate({
227
390
  logger.warn("Skipping evaluation of empty code block.");
228
391
  return;
229
392
  }
230
- const builder = {
231
- isEditing: isEditing(),
232
- isBrowser: isBrowser(),
233
- isServer: !isBrowser(),
234
- getUserAttributes: () => getUserAttributes()
235
- };
236
- const useReturn = isExpression && !(code.includes(";") || code.includes(" return ") || code.trim().startsWith("return "));
237
- const useCode = useReturn ? `return (${code});` : code;
238
393
  const args = {
239
- code: useCode,
240
- builder,
394
+ code: parseCode(code, {
395
+ isExpression
396
+ }),
397
+ builder: getBuilderGlobals(),
241
398
  context,
242
399
  event,
243
400
  rootSetState,
@@ -245,7 +402,7 @@ function evaluate({
245
402
  localState
246
403
  };
247
404
  try {
248
- return runInBrowser(args);
405
+ return chooseBrowserOrServerEval(args);
249
406
  } catch (e) {
250
407
  logger.error("Failed code evaluation: " + e.message, {
251
408
  code
@@ -254,46 +411,36 @@ function evaluate({
254
411
  }
255
412
  }
256
413
 
257
- // src/functions/set.js
258
- var set = (obj, _path, value) => {
259
- if (Object(obj) !== obj) {
260
- return obj;
261
- }
262
- const path = Array.isArray(_path) ? _path : _path.toString().match(/[^.[\]]+/g);
263
- path.slice(0, -1).reduce((a, c, i) => Object(a[c]) === a[c] ? a[c] : a[c] = Math.abs(Number(path[i + 1])) >> 0 === +path[i + 1] ? [] : {}, obj)[path[path.length - 1]] = value;
264
- return obj;
265
- };
266
-
267
414
  // src/functions/transform-block.js
268
415
  function transformBlock(block) {
269
416
  return block;
270
417
  }
271
418
 
272
419
  // src/functions/get-processed-block.js
273
- var __defProp = Object.defineProperty;
274
- var __defProps = Object.defineProperties;
275
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
276
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
277
- var __hasOwnProp = Object.prototype.hasOwnProperty;
278
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
279
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
420
+ var __defProp2 = Object.defineProperty;
421
+ var __defProps2 = Object.defineProperties;
422
+ var __getOwnPropDescs2 = Object.getOwnPropertyDescriptors;
423
+ var __getOwnPropSymbols2 = Object.getOwnPropertySymbols;
424
+ var __hasOwnProp2 = Object.prototype.hasOwnProperty;
425
+ var __propIsEnum2 = Object.prototype.propertyIsEnumerable;
426
+ var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, {
280
427
  enumerable: true,
281
428
  configurable: true,
282
429
  writable: true,
283
430
  value
284
431
  }) : obj[key] = value;
285
- var __spreadValues = (a, b) => {
432
+ var __spreadValues2 = (a, b) => {
286
433
  for (var prop in b || (b = {}))
287
- if (__hasOwnProp.call(b, prop))
288
- __defNormalProp(a, prop, b[prop]);
289
- if (__getOwnPropSymbols)
290
- for (var prop of __getOwnPropSymbols(b)) {
291
- if (__propIsEnum.call(b, prop))
292
- __defNormalProp(a, prop, b[prop]);
434
+ if (__hasOwnProp2.call(b, prop))
435
+ __defNormalProp2(a, prop, b[prop]);
436
+ if (__getOwnPropSymbols2)
437
+ for (var prop of __getOwnPropSymbols2(b)) {
438
+ if (__propIsEnum2.call(b, prop))
439
+ __defNormalProp2(a, prop, b[prop]);
293
440
  }
294
441
  return a;
295
442
  };
296
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
443
+ var __spreadProps2 = (a, b) => __defProps2(a, __getOwnPropDescs2(b));
297
444
  var evaluateBindings = ({
298
445
  block,
299
446
  context,
@@ -305,9 +452,9 @@ var evaluateBindings = ({
305
452
  return block;
306
453
  }
307
454
  const copy = fastClone(block);
308
- const copied = __spreadProps(__spreadValues({}, copy), {
309
- properties: __spreadValues({}, copy.properties),
310
- actions: __spreadValues({}, copy.actions)
455
+ const copied = __spreadProps2(__spreadValues2({}, copy), {
456
+ properties: __spreadValues2({}, copy.properties),
457
+ actions: __spreadValues2({}, copy.actions)
311
458
  });
312
459
  for (const binding in block.bindings) {
313
460
  const expression = block.bindings[binding];
@@ -455,62 +602,62 @@ var Block_styles_default = BlockStyles;
455
602
  import { Show as Show5, For as For2, createSignal as createSignal4 } from "solid-js";
456
603
 
457
604
  // src/functions/get-block-component-options.js
458
- var __defProp2 = Object.defineProperty;
459
- var __defProps2 = Object.defineProperties;
460
- var __getOwnPropDescs2 = Object.getOwnPropertyDescriptors;
461
- var __getOwnPropSymbols2 = Object.getOwnPropertySymbols;
462
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
463
- var __propIsEnum2 = Object.prototype.propertyIsEnumerable;
464
- var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, {
605
+ var __defProp3 = Object.defineProperty;
606
+ var __defProps3 = Object.defineProperties;
607
+ var __getOwnPropDescs3 = Object.getOwnPropertyDescriptors;
608
+ var __getOwnPropSymbols3 = Object.getOwnPropertySymbols;
609
+ var __hasOwnProp3 = Object.prototype.hasOwnProperty;
610
+ var __propIsEnum3 = Object.prototype.propertyIsEnumerable;
611
+ var __defNormalProp3 = (obj, key, value) => key in obj ? __defProp3(obj, key, {
465
612
  enumerable: true,
466
613
  configurable: true,
467
614
  writable: true,
468
615
  value
469
616
  }) : obj[key] = value;
470
- var __spreadValues2 = (a, b) => {
617
+ var __spreadValues3 = (a, b) => {
471
618
  for (var prop in b || (b = {}))
472
- if (__hasOwnProp2.call(b, prop))
473
- __defNormalProp2(a, prop, b[prop]);
474
- if (__getOwnPropSymbols2)
475
- for (var prop of __getOwnPropSymbols2(b)) {
476
- if (__propIsEnum2.call(b, prop))
477
- __defNormalProp2(a, prop, b[prop]);
619
+ if (__hasOwnProp3.call(b, prop))
620
+ __defNormalProp3(a, prop, b[prop]);
621
+ if (__getOwnPropSymbols3)
622
+ for (var prop of __getOwnPropSymbols3(b)) {
623
+ if (__propIsEnum3.call(b, prop))
624
+ __defNormalProp3(a, prop, b[prop]);
478
625
  }
479
626
  return a;
480
627
  };
481
- var __spreadProps2 = (a, b) => __defProps2(a, __getOwnPropDescs2(b));
628
+ var __spreadProps3 = (a, b) => __defProps3(a, __getOwnPropDescs3(b));
482
629
  function getBlockComponentOptions(block) {
483
630
  var _a;
484
- return __spreadProps2(__spreadValues2(__spreadValues2({}, (_a = block.component) == null ? void 0 : _a.options), block.options), {
631
+ return __spreadProps3(__spreadValues3(__spreadValues3({}, (_a = block.component) == null ? void 0 : _a.options), block.options), {
485
632
  builderBlock: block
486
633
  });
487
634
  }
488
635
 
489
636
  // src/functions/sanitize-react-native-block-styles.js
490
- var __defProp3 = Object.defineProperty;
491
- var __defProps3 = Object.defineProperties;
492
- var __getOwnPropDescs3 = Object.getOwnPropertyDescriptors;
493
- var __getOwnPropSymbols3 = Object.getOwnPropertySymbols;
494
- var __hasOwnProp3 = Object.prototype.hasOwnProperty;
495
- var __propIsEnum3 = Object.prototype.propertyIsEnumerable;
496
- var __defNormalProp3 = (obj, key, value) => key in obj ? __defProp3(obj, key, {
637
+ var __defProp4 = Object.defineProperty;
638
+ var __defProps4 = Object.defineProperties;
639
+ var __getOwnPropDescs4 = Object.getOwnPropertyDescriptors;
640
+ var __getOwnPropSymbols4 = Object.getOwnPropertySymbols;
641
+ var __hasOwnProp4 = Object.prototype.hasOwnProperty;
642
+ var __propIsEnum4 = Object.prototype.propertyIsEnumerable;
643
+ var __defNormalProp4 = (obj, key, value) => key in obj ? __defProp4(obj, key, {
497
644
  enumerable: true,
498
645
  configurable: true,
499
646
  writable: true,
500
647
  value
501
648
  }) : obj[key] = value;
502
- var __spreadValues3 = (a, b) => {
649
+ var __spreadValues4 = (a, b) => {
503
650
  for (var prop in b || (b = {}))
504
- if (__hasOwnProp3.call(b, prop))
505
- __defNormalProp3(a, prop, b[prop]);
506
- if (__getOwnPropSymbols3)
507
- for (var prop of __getOwnPropSymbols3(b)) {
508
- if (__propIsEnum3.call(b, prop))
509
- __defNormalProp3(a, prop, b[prop]);
651
+ if (__hasOwnProp4.call(b, prop))
652
+ __defNormalProp4(a, prop, b[prop]);
653
+ if (__getOwnPropSymbols4)
654
+ for (var prop of __getOwnPropSymbols4(b)) {
655
+ if (__propIsEnum4.call(b, prop))
656
+ __defNormalProp4(a, prop, b[prop]);
510
657
  }
511
658
  return a;
512
659
  };
513
- var __spreadProps3 = (a, b) => __defProps3(a, __getOwnPropDescs3(b));
660
+ var __spreadProps4 = (a, b) => __defProps4(a, __getOwnPropDescs4(b));
514
661
  var propertiesThatMustBeNumber = /* @__PURE__ */ new Set(["lineHeight"]);
515
662
  var displayValues = /* @__PURE__ */ new Set(["flex", "none"]);
516
663
  var SHOW_WARNINGS = false;
@@ -544,43 +691,43 @@ var sanitizeReactNativeBlockStyles = (styles) => {
544
691
  const newValue = parseFloat(propertyValue);
545
692
  const normalizedValue = normalizeNumber(newValue);
546
693
  if (normalizedValue) {
547
- return __spreadProps3(__spreadValues3({}, acc), {
694
+ return __spreadProps4(__spreadValues4({}, acc), {
548
695
  [key]: normalizedValue
549
696
  });
550
697
  } else {
551
698
  return acc;
552
699
  }
553
700
  } else if (propertyValue === "0") {
554
- return __spreadProps3(__spreadValues3({}, acc), {
701
+ return __spreadProps4(__spreadValues4({}, acc), {
555
702
  [key]: 0
556
703
  });
557
704
  }
558
705
  }
559
- return __spreadProps3(__spreadValues3({}, acc), {
706
+ return __spreadProps4(__spreadValues4({}, acc), {
560
707
  [key]: propertyValue
561
708
  });
562
709
  }, {});
563
710
  };
564
711
 
565
712
  // src/functions/get-react-native-block-styles.js
566
- var __defProp4 = Object.defineProperty;
567
- var __getOwnPropSymbols4 = Object.getOwnPropertySymbols;
568
- var __hasOwnProp4 = Object.prototype.hasOwnProperty;
569
- var __propIsEnum4 = Object.prototype.propertyIsEnumerable;
570
- var __defNormalProp4 = (obj, key, value) => key in obj ? __defProp4(obj, key, {
713
+ var __defProp5 = Object.defineProperty;
714
+ var __getOwnPropSymbols5 = Object.getOwnPropertySymbols;
715
+ var __hasOwnProp5 = Object.prototype.hasOwnProperty;
716
+ var __propIsEnum5 = Object.prototype.propertyIsEnumerable;
717
+ var __defNormalProp5 = (obj, key, value) => key in obj ? __defProp5(obj, key, {
571
718
  enumerable: true,
572
719
  configurable: true,
573
720
  writable: true,
574
721
  value
575
722
  }) : obj[key] = value;
576
- var __spreadValues4 = (a, b) => {
723
+ var __spreadValues5 = (a, b) => {
577
724
  for (var prop in b || (b = {}))
578
- if (__hasOwnProp4.call(b, prop))
579
- __defNormalProp4(a, prop, b[prop]);
580
- if (__getOwnPropSymbols4)
581
- for (var prop of __getOwnPropSymbols4(b)) {
582
- if (__propIsEnum4.call(b, prop))
583
- __defNormalProp4(a, prop, b[prop]);
725
+ if (__hasOwnProp5.call(b, prop))
726
+ __defNormalProp5(a, prop, b[prop]);
727
+ if (__getOwnPropSymbols5)
728
+ for (var prop of __getOwnPropSymbols5(b)) {
729
+ if (__propIsEnum5.call(b, prop))
730
+ __defNormalProp5(a, prop, b[prop]);
584
731
  }
585
732
  return a;
586
733
  };
@@ -593,7 +740,7 @@ function getReactNativeBlockStyles({
593
740
  if (!responsiveStyles) {
594
741
  return {};
595
742
  }
596
- const styles = __spreadValues4(__spreadValues4(__spreadValues4(__spreadValues4(__spreadValues4({}, context.inheritedStyles), responsiveStyles.large || {}), responsiveStyles.medium || {}), responsiveStyles.small || {}), blockStyles);
743
+ const styles = __spreadValues5(__spreadValues5(__spreadValues5(__spreadValues5(__spreadValues5({}, context.inheritedStyles), responsiveStyles.large || {}), responsiveStyles.medium || {}), responsiveStyles.small || {}), blockStyles);
597
744
  const newStyles = sanitizeReactNativeBlockStyles(styles);
598
745
  return newStyles;
599
746
  }
@@ -604,30 +751,30 @@ function transformBlockProperties(properties) {
604
751
  }
605
752
 
606
753
  // src/functions/get-block-properties.js
607
- var __defProp5 = Object.defineProperty;
608
- var __defProps4 = Object.defineProperties;
609
- var __getOwnPropDescs4 = Object.getOwnPropertyDescriptors;
610
- var __getOwnPropSymbols5 = Object.getOwnPropertySymbols;
611
- var __hasOwnProp5 = Object.prototype.hasOwnProperty;
612
- var __propIsEnum5 = Object.prototype.propertyIsEnumerable;
613
- var __defNormalProp5 = (obj, key, value) => key in obj ? __defProp5(obj, key, {
754
+ var __defProp6 = Object.defineProperty;
755
+ var __defProps5 = Object.defineProperties;
756
+ var __getOwnPropDescs5 = Object.getOwnPropertyDescriptors;
757
+ var __getOwnPropSymbols6 = Object.getOwnPropertySymbols;
758
+ var __hasOwnProp6 = Object.prototype.hasOwnProperty;
759
+ var __propIsEnum6 = Object.prototype.propertyIsEnumerable;
760
+ var __defNormalProp6 = (obj, key, value) => key in obj ? __defProp6(obj, key, {
614
761
  enumerable: true,
615
762
  configurable: true,
616
763
  writable: true,
617
764
  value
618
765
  }) : obj[key] = value;
619
- var __spreadValues5 = (a, b) => {
766
+ var __spreadValues6 = (a, b) => {
620
767
  for (var prop in b || (b = {}))
621
- if (__hasOwnProp5.call(b, prop))
622
- __defNormalProp5(a, prop, b[prop]);
623
- if (__getOwnPropSymbols5)
624
- for (var prop of __getOwnPropSymbols5(b)) {
625
- if (__propIsEnum5.call(b, prop))
626
- __defNormalProp5(a, prop, b[prop]);
768
+ if (__hasOwnProp6.call(b, prop))
769
+ __defNormalProp6(a, prop, b[prop]);
770
+ if (__getOwnPropSymbols6)
771
+ for (var prop of __getOwnPropSymbols6(b)) {
772
+ if (__propIsEnum6.call(b, prop))
773
+ __defNormalProp6(a, prop, b[prop]);
627
774
  }
628
775
  return a;
629
776
  };
630
- var __spreadProps4 = (a, b) => __defProps4(a, __getOwnPropDescs4(b));
777
+ var __spreadProps5 = (a, b) => __defProps5(a, __getOwnPropDescs5(b));
631
778
  var extractRelevantRootBlockProperties = (block) => {
632
779
  return {
633
780
  href: block.href
@@ -638,7 +785,7 @@ function getBlockProperties({
638
785
  context
639
786
  }) {
640
787
  var _a;
641
- const properties = __spreadProps4(__spreadValues5(__spreadValues5({}, extractRelevantRootBlockProperties(block)), block.properties), {
788
+ const properties = __spreadProps5(__spreadValues6(__spreadValues6({}, extractRelevantRootBlockProperties(block)), block.properties), {
642
789
  "builder-id": block.id,
643
790
  style: block.style ? getStyleAttribute(block.style) : void 0,
644
791
  class: [block.id, "builder-block", block.class, (_a = block.properties) == null ? void 0 : _a.class].filter(Boolean).join(" ")
@@ -668,38 +815,38 @@ function getStyleAttribute(style) {
668
815
  }
669
816
 
670
817
  // src/components/block/block.helpers.js
671
- var __defProp6 = Object.defineProperty;
672
- var __defProps5 = Object.defineProperties;
673
- var __getOwnPropDescs5 = Object.getOwnPropertyDescriptors;
674
- var __getOwnPropSymbols6 = Object.getOwnPropertySymbols;
675
- var __hasOwnProp6 = Object.prototype.hasOwnProperty;
676
- var __propIsEnum6 = Object.prototype.propertyIsEnumerable;
677
- var __defNormalProp6 = (obj, key, value) => key in obj ? __defProp6(obj, key, {
818
+ var __defProp7 = Object.defineProperty;
819
+ var __defProps6 = Object.defineProperties;
820
+ var __getOwnPropDescs6 = Object.getOwnPropertyDescriptors;
821
+ var __getOwnPropSymbols7 = Object.getOwnPropertySymbols;
822
+ var __hasOwnProp7 = Object.prototype.hasOwnProperty;
823
+ var __propIsEnum7 = Object.prototype.propertyIsEnumerable;
824
+ var __defNormalProp7 = (obj, key, value) => key in obj ? __defProp7(obj, key, {
678
825
  enumerable: true,
679
826
  configurable: true,
680
827
  writable: true,
681
828
  value
682
829
  }) : obj[key] = value;
683
- var __spreadValues6 = (a, b) => {
830
+ var __spreadValues7 = (a, b) => {
684
831
  for (var prop in b || (b = {}))
685
- if (__hasOwnProp6.call(b, prop))
686
- __defNormalProp6(a, prop, b[prop]);
687
- if (__getOwnPropSymbols6)
688
- for (var prop of __getOwnPropSymbols6(b)) {
689
- if (__propIsEnum6.call(b, prop))
690
- __defNormalProp6(a, prop, b[prop]);
832
+ if (__hasOwnProp7.call(b, prop))
833
+ __defNormalProp7(a, prop, b[prop]);
834
+ if (__getOwnPropSymbols7)
835
+ for (var prop of __getOwnPropSymbols7(b)) {
836
+ if (__propIsEnum7.call(b, prop))
837
+ __defNormalProp7(a, prop, b[prop]);
691
838
  }
692
839
  return a;
693
840
  };
694
- var __spreadProps5 = (a, b) => __defProps5(a, __getOwnPropDescs5(b));
841
+ var __spreadProps6 = (a, b) => __defProps6(a, __getOwnPropDescs6(b));
695
842
  var __objRest = (source, exclude) => {
696
843
  var target = {};
697
844
  for (var prop in source)
698
- if (__hasOwnProp6.call(source, prop) && exclude.indexOf(prop) < 0)
845
+ if (__hasOwnProp7.call(source, prop) && exclude.indexOf(prop) < 0)
699
846
  target[prop] = source[prop];
700
- if (source != null && __getOwnPropSymbols6)
701
- for (var prop of __getOwnPropSymbols6(source)) {
702
- if (exclude.indexOf(prop) < 0 && __propIsEnum6.call(source, prop))
847
+ if (source != null && __getOwnPropSymbols7)
848
+ for (var prop of __getOwnPropSymbols7(source)) {
849
+ if (exclude.indexOf(prop) < 0 && __propIsEnum7.call(source, prop))
703
850
  target[prop] = source[prop];
704
851
  }
705
852
  return target;
@@ -758,8 +905,8 @@ var getRepeatItemData = ({
758
905
  const collectionName = repeat.collection.split(".").pop();
759
906
  const itemNameToUse = repeat.itemName || (collectionName ? collectionName + "Item" : "item");
760
907
  const repeatArray = itemsArray.map((item, index) => ({
761
- context: __spreadProps5(__spreadValues6({}, context), {
762
- localState: __spreadProps5(__spreadValues6({}, context.localState), {
908
+ context: __spreadProps6(__spreadValues7({}, context), {
909
+ localState: __spreadProps6(__spreadValues7({}, context.localState), {
763
910
  $index: index,
764
911
  $item: item,
765
912
  [itemNameToUse]: item,
@@ -874,24 +1021,24 @@ function InteractiveElement(props) {
874
1021
  var interactive_element_default = InteractiveElement;
875
1022
 
876
1023
  // src/components/block/components/component-ref/component-ref.helpers.js
877
- var __defProp7 = Object.defineProperty;
878
- var __getOwnPropSymbols7 = Object.getOwnPropertySymbols;
879
- var __hasOwnProp7 = Object.prototype.hasOwnProperty;
880
- var __propIsEnum7 = Object.prototype.propertyIsEnumerable;
881
- var __defNormalProp7 = (obj, key, value) => key in obj ? __defProp7(obj, key, {
1024
+ var __defProp8 = Object.defineProperty;
1025
+ var __getOwnPropSymbols8 = Object.getOwnPropertySymbols;
1026
+ var __hasOwnProp8 = Object.prototype.hasOwnProperty;
1027
+ var __propIsEnum8 = Object.prototype.propertyIsEnumerable;
1028
+ var __defNormalProp8 = (obj, key, value) => key in obj ? __defProp8(obj, key, {
882
1029
  enumerable: true,
883
1030
  configurable: true,
884
1031
  writable: true,
885
1032
  value
886
1033
  }) : obj[key] = value;
887
- var __spreadValues7 = (a, b) => {
1034
+ var __spreadValues8 = (a, b) => {
888
1035
  for (var prop in b || (b = {}))
889
- if (__hasOwnProp7.call(b, prop))
890
- __defNormalProp7(a, prop, b[prop]);
891
- if (__getOwnPropSymbols7)
892
- for (var prop of __getOwnPropSymbols7(b)) {
893
- if (__propIsEnum7.call(b, prop))
894
- __defNormalProp7(a, prop, b[prop]);
1036
+ if (__hasOwnProp8.call(b, prop))
1037
+ __defNormalProp8(a, prop, b[prop]);
1038
+ if (__getOwnPropSymbols8)
1039
+ for (var prop of __getOwnPropSymbols8(b)) {
1040
+ if (__propIsEnum8.call(b, prop))
1041
+ __defNormalProp8(a, prop, b[prop]);
895
1042
  }
896
1043
  return a;
897
1044
  };
@@ -910,7 +1057,7 @@ var getWrapperProps = ({
910
1057
  context,
911
1058
  wrapperProps: componentOptions
912
1059
  };
913
- return isInteractive ? interactiveElementProps : __spreadValues7(__spreadValues7({}, componentOptions), includeBlockProps ? {
1060
+ return isInteractive ? interactiveElementProps : __spreadValues8(__spreadValues8({}, componentOptions), includeBlockProps ? {
914
1061
  attributes: getBlockProperties({
915
1062
  block: builderBlock,
916
1063
  context: contextValue
@@ -1491,31 +1638,31 @@ import { onMount as onMount4, on as on3, createEffect as createEffect3, createSi
1491
1638
  import { Show as Show11, For as For5, onMount as onMount3, createSignal as createSignal14 } from "solid-js";
1492
1639
 
1493
1640
  // src/components/content-variants/helpers.js
1494
- var __defProp8 = Object.defineProperty;
1495
- var __defProps6 = Object.defineProperties;
1496
- var __getOwnPropDescs6 = Object.getOwnPropertyDescriptors;
1497
- var __getOwnPropSymbols8 = Object.getOwnPropertySymbols;
1498
- var __hasOwnProp8 = Object.prototype.hasOwnProperty;
1499
- var __propIsEnum8 = Object.prototype.propertyIsEnumerable;
1500
- var __defNormalProp8 = (obj, key, value) => key in obj ? __defProp8(obj, key, {
1641
+ var __defProp9 = Object.defineProperty;
1642
+ var __defProps7 = Object.defineProperties;
1643
+ var __getOwnPropDescs7 = Object.getOwnPropertyDescriptors;
1644
+ var __getOwnPropSymbols9 = Object.getOwnPropertySymbols;
1645
+ var __hasOwnProp9 = Object.prototype.hasOwnProperty;
1646
+ var __propIsEnum9 = Object.prototype.propertyIsEnumerable;
1647
+ var __defNormalProp9 = (obj, key, value) => key in obj ? __defProp9(obj, key, {
1501
1648
  enumerable: true,
1502
1649
  configurable: true,
1503
1650
  writable: true,
1504
1651
  value
1505
1652
  }) : obj[key] = value;
1506
- var __spreadValues8 = (a, b) => {
1653
+ var __spreadValues9 = (a, b) => {
1507
1654
  for (var prop in b || (b = {}))
1508
- if (__hasOwnProp8.call(b, prop))
1509
- __defNormalProp8(a, prop, b[prop]);
1510
- if (__getOwnPropSymbols8)
1511
- for (var prop of __getOwnPropSymbols8(b)) {
1512
- if (__propIsEnum8.call(b, prop))
1513
- __defNormalProp8(a, prop, b[prop]);
1655
+ if (__hasOwnProp9.call(b, prop))
1656
+ __defNormalProp9(a, prop, b[prop]);
1657
+ if (__getOwnPropSymbols9)
1658
+ for (var prop of __getOwnPropSymbols9(b)) {
1659
+ if (__propIsEnum9.call(b, prop))
1660
+ __defNormalProp9(a, prop, b[prop]);
1514
1661
  }
1515
1662
  return a;
1516
1663
  };
1517
- var __spreadProps6 = (a, b) => __defProps6(a, __getOwnPropDescs6(b));
1518
- var getVariants = (content) => Object.values((content == null ? void 0 : content.variations) || {}).map((variant) => __spreadProps6(__spreadValues8({}, variant), {
1664
+ var __spreadProps7 = (a, b) => __defProps7(a, __getOwnPropDescs7(b));
1665
+ var getVariants = (content) => Object.values((content == null ? void 0 : content.variations) || {}).map((variant) => __spreadProps7(__spreadValues9({}, variant), {
1519
1666
  testVariationId: variant.id,
1520
1667
  id: content == null ? void 0 : content.id
1521
1668
  }));
@@ -2412,45 +2559,43 @@ import { onMount, createSignal as createSignal10 } from "solid-js";
2412
2559
  function CustomCode(props) {
2413
2560
  const [scriptsInserted, setScriptsInserted] = createSignal10([]);
2414
2561
  const [scriptsRun, setScriptsRun] = createSignal10([]);
2415
- function findAndRunScripts() {
2416
- if (elem && elem.getElementsByTagName && typeof window !== "undefined") {
2417
- const scripts = elem.getElementsByTagName("script");
2418
- for (let i = 0; i < scripts.length; i++) {
2419
- const script = scripts[i];
2420
- if (script.src) {
2421
- if (scriptsInserted().includes(script.src)) {
2422
- continue;
2423
- }
2424
- scriptsInserted().push(script.src);
2425
- const newScript = document.createElement("script");
2426
- newScript.async = true;
2427
- newScript.src = script.src;
2428
- document.head.appendChild(newScript);
2429
- } else if (!script.type || [
2430
- "text/javascript",
2431
- "application/javascript",
2432
- "application/ecmascript"
2433
- ].includes(script.type)) {
2434
- if (scriptsRun().includes(script.innerText)) {
2435
- continue;
2436
- }
2437
- try {
2438
- scriptsRun().push(script.innerText);
2439
- new Function(script.innerText)();
2440
- } catch (error) {
2441
- console.warn("`CustomCode`: Error running script:", error);
2442
- }
2562
+ let elementRef;
2563
+ onMount(() => {
2564
+ if (!elementRef?.getElementsByTagName || typeof window === "undefined") {
2565
+ return;
2566
+ }
2567
+ const scripts = elementRef.getElementsByTagName("script");
2568
+ for (let i = 0; i < scripts.length; i++) {
2569
+ const script = scripts[i];
2570
+ if (script.src) {
2571
+ if (scriptsInserted().includes(script.src)) {
2572
+ continue;
2573
+ }
2574
+ scriptsInserted().push(script.src);
2575
+ const newScript = document.createElement("script");
2576
+ newScript.async = true;
2577
+ newScript.src = script.src;
2578
+ document.head.appendChild(newScript);
2579
+ } else if (!script.type || [
2580
+ "text/javascript",
2581
+ "application/javascript",
2582
+ "application/ecmascript"
2583
+ ].includes(script.type)) {
2584
+ if (scriptsRun().includes(script.innerText)) {
2585
+ continue;
2586
+ }
2587
+ try {
2588
+ scriptsRun().push(script.innerText);
2589
+ new Function(script.innerText)();
2590
+ } catch (error) {
2591
+ console.warn("`CustomCode`: Error running script:", error);
2443
2592
  }
2444
2593
  }
2445
2594
  }
2446
- }
2447
- let elem;
2448
- onMount(() => {
2449
- findAndRunScripts();
2450
2595
  });
2451
2596
  return <div
2452
2597
  class={"builder-custom-code" + (props.replaceNodes ? " replace-nodes" : "")}
2453
- ref={elem}
2598
+ ref={elementRef}
2454
2599
  innerHTML={props.code}
2455
2600
  />;
2456
2601
  }
@@ -2482,84 +2627,84 @@ var componentInfo11 = {
2482
2627
  };
2483
2628
 
2484
2629
  // src/constants/builder-registered-components.js
2485
- var __defProp9 = Object.defineProperty;
2486
- var __getOwnPropSymbols9 = Object.getOwnPropertySymbols;
2487
- var __hasOwnProp9 = Object.prototype.hasOwnProperty;
2488
- var __propIsEnum9 = Object.prototype.propertyIsEnumerable;
2489
- var __defNormalProp9 = (obj, key, value) => key in obj ? __defProp9(obj, key, {
2630
+ var __defProp10 = Object.defineProperty;
2631
+ var __getOwnPropSymbols10 = Object.getOwnPropertySymbols;
2632
+ var __hasOwnProp10 = Object.prototype.hasOwnProperty;
2633
+ var __propIsEnum10 = Object.prototype.propertyIsEnumerable;
2634
+ var __defNormalProp10 = (obj, key, value) => key in obj ? __defProp10(obj, key, {
2490
2635
  enumerable: true,
2491
2636
  configurable: true,
2492
2637
  writable: true,
2493
2638
  value
2494
2639
  }) : obj[key] = value;
2495
- var __spreadValues9 = (a, b) => {
2640
+ var __spreadValues10 = (a, b) => {
2496
2641
  for (var prop in b || (b = {}))
2497
- if (__hasOwnProp9.call(b, prop))
2498
- __defNormalProp9(a, prop, b[prop]);
2499
- if (__getOwnPropSymbols9)
2500
- for (var prop of __getOwnPropSymbols9(b)) {
2501
- if (__propIsEnum9.call(b, prop))
2502
- __defNormalProp9(a, prop, b[prop]);
2642
+ if (__hasOwnProp10.call(b, prop))
2643
+ __defNormalProp10(a, prop, b[prop]);
2644
+ if (__getOwnPropSymbols10)
2645
+ for (var prop of __getOwnPropSymbols10(b)) {
2646
+ if (__propIsEnum10.call(b, prop))
2647
+ __defNormalProp10(a, prop, b[prop]);
2503
2648
  }
2504
2649
  return a;
2505
2650
  };
2506
- var getDefaultRegisteredComponents = () => [__spreadValues9({
2651
+ var getDefaultRegisteredComponents = () => [__spreadValues10({
2507
2652
  component: button_default
2508
- }, componentInfo), __spreadValues9({
2653
+ }, componentInfo), __spreadValues10({
2509
2654
  component: columns_default
2510
- }, componentInfo2), __spreadValues9({
2655
+ }, componentInfo2), __spreadValues10({
2511
2656
  component: custom_code_default
2512
- }, componentInfo11), __spreadValues9({
2657
+ }, componentInfo11), __spreadValues10({
2513
2658
  component: embed_default
2514
- }, componentInfo9), __spreadValues9({
2659
+ }, componentInfo9), __spreadValues10({
2515
2660
  component: fragment_default
2516
- }, componentInfo3), __spreadValues9({
2661
+ }, componentInfo3), __spreadValues10({
2517
2662
  component: image_default
2518
- }, componentInfo4), __spreadValues9({
2663
+ }, componentInfo4), __spreadValues10({
2519
2664
  component: img_default
2520
- }, componentInfo10), __spreadValues9({
2665
+ }, componentInfo10), __spreadValues10({
2521
2666
  component: section_default
2522
- }, componentInfo5), __spreadValues9({
2667
+ }, componentInfo5), __spreadValues10({
2523
2668
  component: symbol_default
2524
- }, componentInfo6), __spreadValues9({
2669
+ }, componentInfo6), __spreadValues10({
2525
2670
  component: text_default
2526
- }, componentInfo7), __spreadValues9({
2671
+ }, componentInfo7), __spreadValues10({
2527
2672
  component: video_default
2528
2673
  }, componentInfo8)];
2529
2674
 
2530
2675
  // src/functions/register-component.js
2531
- var __defProp10 = Object.defineProperty;
2532
- var __defProps7 = Object.defineProperties;
2533
- var __getOwnPropDescs7 = Object.getOwnPropertyDescriptors;
2534
- var __getOwnPropSymbols10 = Object.getOwnPropertySymbols;
2535
- var __hasOwnProp10 = Object.prototype.hasOwnProperty;
2536
- var __propIsEnum10 = Object.prototype.propertyIsEnumerable;
2537
- var __defNormalProp10 = (obj, key, value) => key in obj ? __defProp10(obj, key, {
2676
+ var __defProp11 = Object.defineProperty;
2677
+ var __defProps8 = Object.defineProperties;
2678
+ var __getOwnPropDescs8 = Object.getOwnPropertyDescriptors;
2679
+ var __getOwnPropSymbols11 = Object.getOwnPropertySymbols;
2680
+ var __hasOwnProp11 = Object.prototype.hasOwnProperty;
2681
+ var __propIsEnum11 = Object.prototype.propertyIsEnumerable;
2682
+ var __defNormalProp11 = (obj, key, value) => key in obj ? __defProp11(obj, key, {
2538
2683
  enumerable: true,
2539
2684
  configurable: true,
2540
2685
  writable: true,
2541
2686
  value
2542
2687
  }) : obj[key] = value;
2543
- var __spreadValues10 = (a, b) => {
2688
+ var __spreadValues11 = (a, b) => {
2544
2689
  for (var prop in b || (b = {}))
2545
- if (__hasOwnProp10.call(b, prop))
2546
- __defNormalProp10(a, prop, b[prop]);
2547
- if (__getOwnPropSymbols10)
2548
- for (var prop of __getOwnPropSymbols10(b)) {
2549
- if (__propIsEnum10.call(b, prop))
2550
- __defNormalProp10(a, prop, b[prop]);
2690
+ if (__hasOwnProp11.call(b, prop))
2691
+ __defNormalProp11(a, prop, b[prop]);
2692
+ if (__getOwnPropSymbols11)
2693
+ for (var prop of __getOwnPropSymbols11(b)) {
2694
+ if (__propIsEnum11.call(b, prop))
2695
+ __defNormalProp11(a, prop, b[prop]);
2551
2696
  }
2552
2697
  return a;
2553
2698
  };
2554
- var __spreadProps7 = (a, b) => __defProps7(a, __getOwnPropDescs7(b));
2699
+ var __spreadProps8 = (a, b) => __defProps8(a, __getOwnPropDescs8(b));
2555
2700
  var __objRest2 = (source, exclude) => {
2556
2701
  var target = {};
2557
2702
  for (var prop in source)
2558
- if (__hasOwnProp10.call(source, prop) && exclude.indexOf(prop) < 0)
2703
+ if (__hasOwnProp11.call(source, prop) && exclude.indexOf(prop) < 0)
2559
2704
  target[prop] = source[prop];
2560
- if (source != null && __getOwnPropSymbols10)
2561
- for (var prop of __getOwnPropSymbols10(source)) {
2562
- if (exclude.indexOf(prop) < 0 && __propIsEnum10.call(source, prop))
2705
+ if (source != null && __getOwnPropSymbols11)
2706
+ for (var prop of __getOwnPropSymbols11(source)) {
2707
+ if (exclude.indexOf(prop) < 0 && __propIsEnum11.call(source, prop))
2563
2708
  target[prop] = source[prop];
2564
2709
  }
2565
2710
  return target;
@@ -2579,8 +2724,8 @@ var serializeComponentInfo = (_a) => {
2579
2724
  var _b = _a, {
2580
2725
  inputs
2581
2726
  } = _b, info = __objRest2(_b, ["inputs"]);
2582
- return __spreadProps7(__spreadValues10({}, fastClone(info)), {
2583
- inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => __spreadProps7(__spreadValues10({}, acc), {
2727
+ return __spreadProps8(__spreadValues11({}, fastClone(info)), {
2728
+ inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => __spreadProps8(__spreadValues11({}, acc), {
2584
2729
  [key]: serializeValue(value)
2585
2730
  }), {}))
2586
2731
  });
@@ -2677,30 +2822,30 @@ ${getFontCss({
2677
2822
  var Styles_default = ContentStyles;
2678
2823
 
2679
2824
  // src/components/content/content.helpers.js
2680
- var __defProp11 = Object.defineProperty;
2681
- var __defProps8 = Object.defineProperties;
2682
- var __getOwnPropDescs8 = Object.getOwnPropertyDescriptors;
2683
- var __getOwnPropSymbols11 = Object.getOwnPropertySymbols;
2684
- var __hasOwnProp11 = Object.prototype.hasOwnProperty;
2685
- var __propIsEnum11 = Object.prototype.propertyIsEnumerable;
2686
- var __defNormalProp11 = (obj, key, value) => key in obj ? __defProp11(obj, key, {
2825
+ var __defProp12 = Object.defineProperty;
2826
+ var __defProps9 = Object.defineProperties;
2827
+ var __getOwnPropDescs9 = Object.getOwnPropertyDescriptors;
2828
+ var __getOwnPropSymbols12 = Object.getOwnPropertySymbols;
2829
+ var __hasOwnProp12 = Object.prototype.hasOwnProperty;
2830
+ var __propIsEnum12 = Object.prototype.propertyIsEnumerable;
2831
+ var __defNormalProp12 = (obj, key, value) => key in obj ? __defProp12(obj, key, {
2687
2832
  enumerable: true,
2688
2833
  configurable: true,
2689
2834
  writable: true,
2690
2835
  value
2691
2836
  }) : obj[key] = value;
2692
- var __spreadValues11 = (a, b) => {
2837
+ var __spreadValues12 = (a, b) => {
2693
2838
  for (var prop in b || (b = {}))
2694
- if (__hasOwnProp11.call(b, prop))
2695
- __defNormalProp11(a, prop, b[prop]);
2696
- if (__getOwnPropSymbols11)
2697
- for (var prop of __getOwnPropSymbols11(b)) {
2698
- if (__propIsEnum11.call(b, prop))
2699
- __defNormalProp11(a, prop, b[prop]);
2839
+ if (__hasOwnProp12.call(b, prop))
2840
+ __defNormalProp12(a, prop, b[prop]);
2841
+ if (__getOwnPropSymbols12)
2842
+ for (var prop of __getOwnPropSymbols12(b)) {
2843
+ if (__propIsEnum12.call(b, prop))
2844
+ __defNormalProp12(a, prop, b[prop]);
2700
2845
  }
2701
2846
  return a;
2702
2847
  };
2703
- var __spreadProps8 = (a, b) => __defProps8(a, __getOwnPropDescs8(b));
2848
+ var __spreadProps9 = (a, b) => __defProps9(a, __getOwnPropDescs9(b));
2704
2849
  var getContextStateInitialValue = ({
2705
2850
  content,
2706
2851
  data,
@@ -2714,17 +2859,17 @@ var getContextStateInitialValue = ({
2714
2859
  defaultValues[input.name] = input.defaultValue;
2715
2860
  }
2716
2861
  });
2717
- const stateToUse = __spreadValues11(__spreadValues11(__spreadValues11({}, (_c = content == null ? void 0 : content.data) == null ? void 0 : _c.state), data), locale ? {
2862
+ const stateToUse = __spreadValues12(__spreadValues12(__spreadValues12({}, (_c = content == null ? void 0 : content.data) == null ? void 0 : _c.state), data), locale ? {
2718
2863
  locale
2719
2864
  } : {});
2720
- return __spreadValues11(__spreadValues11({}, defaultValues), stateToUse);
2865
+ return __spreadValues12(__spreadValues12({}, defaultValues), stateToUse);
2721
2866
  };
2722
2867
  var getContentInitialValue = ({
2723
2868
  content,
2724
2869
  data
2725
2870
  }) => {
2726
- return !content ? void 0 : __spreadProps8(__spreadValues11({}, content), {
2727
- data: __spreadValues11(__spreadValues11({}, content == null ? void 0 : content.data), data),
2871
+ return !content ? void 0 : __spreadProps9(__spreadValues12({}, content), {
2872
+ data: __spreadValues12(__spreadValues12({}, content == null ? void 0 : content.data), data),
2728
2873
  meta: content == null ? void 0 : content.meta
2729
2874
  });
2730
2875
  };
@@ -2977,38 +3122,38 @@ var setVisitorId = ({
2977
3122
  });
2978
3123
 
2979
3124
  // src/functions/track/index.js
2980
- var __defProp12 = Object.defineProperty;
2981
- var __defProps9 = Object.defineProperties;
2982
- var __getOwnPropDescs9 = Object.getOwnPropertyDescriptors;
2983
- var __getOwnPropSymbols12 = Object.getOwnPropertySymbols;
2984
- var __hasOwnProp12 = Object.prototype.hasOwnProperty;
2985
- var __propIsEnum12 = Object.prototype.propertyIsEnumerable;
2986
- var __defNormalProp12 = (obj, key, value) => key in obj ? __defProp12(obj, key, {
3125
+ var __defProp13 = Object.defineProperty;
3126
+ var __defProps10 = Object.defineProperties;
3127
+ var __getOwnPropDescs10 = Object.getOwnPropertyDescriptors;
3128
+ var __getOwnPropSymbols13 = Object.getOwnPropertySymbols;
3129
+ var __hasOwnProp13 = Object.prototype.hasOwnProperty;
3130
+ var __propIsEnum13 = Object.prototype.propertyIsEnumerable;
3131
+ var __defNormalProp13 = (obj, key, value) => key in obj ? __defProp13(obj, key, {
2987
3132
  enumerable: true,
2988
3133
  configurable: true,
2989
3134
  writable: true,
2990
3135
  value
2991
3136
  }) : obj[key] = value;
2992
- var __spreadValues12 = (a, b) => {
3137
+ var __spreadValues13 = (a, b) => {
2993
3138
  for (var prop in b || (b = {}))
2994
- if (__hasOwnProp12.call(b, prop))
2995
- __defNormalProp12(a, prop, b[prop]);
2996
- if (__getOwnPropSymbols12)
2997
- for (var prop of __getOwnPropSymbols12(b)) {
2998
- if (__propIsEnum12.call(b, prop))
2999
- __defNormalProp12(a, prop, b[prop]);
3139
+ if (__hasOwnProp13.call(b, prop))
3140
+ __defNormalProp13(a, prop, b[prop]);
3141
+ if (__getOwnPropSymbols13)
3142
+ for (var prop of __getOwnPropSymbols13(b)) {
3143
+ if (__propIsEnum13.call(b, prop))
3144
+ __defNormalProp13(a, prop, b[prop]);
3000
3145
  }
3001
3146
  return a;
3002
3147
  };
3003
- var __spreadProps9 = (a, b) => __defProps9(a, __getOwnPropDescs9(b));
3148
+ var __spreadProps10 = (a, b) => __defProps10(a, __getOwnPropDescs10(b));
3004
3149
  var __objRest3 = (source, exclude) => {
3005
3150
  var target = {};
3006
3151
  for (var prop in source)
3007
- if (__hasOwnProp12.call(source, prop) && exclude.indexOf(prop) < 0)
3152
+ if (__hasOwnProp13.call(source, prop) && exclude.indexOf(prop) < 0)
3008
3153
  target[prop] = source[prop];
3009
- if (source != null && __getOwnPropSymbols12)
3010
- for (var prop of __getOwnPropSymbols12(source)) {
3011
- if (exclude.indexOf(prop) < 0 && __propIsEnum12.call(source, prop))
3154
+ if (source != null && __getOwnPropSymbols13)
3155
+ for (var prop of __getOwnPropSymbols13(source)) {
3156
+ if (exclude.indexOf(prop) < 0 && __propIsEnum13.call(source, prop))
3012
3157
  target[prop] = source[prop];
3013
3158
  }
3014
3159
  return target;
@@ -3062,8 +3207,8 @@ var createEvent = (_a) => __async3(void 0, null, function* () {
3062
3207
  } = _b, properties = __objRest3(_b, ["type", "canTrack", "apiKey", "metadata"]);
3063
3208
  return {
3064
3209
  type: eventType,
3065
- data: __spreadProps9(__spreadValues12(__spreadProps9(__spreadValues12({}, properties), {
3066
- metadata: __spreadValues12({
3210
+ data: __spreadProps10(__spreadValues13(__spreadProps10(__spreadValues13({}, properties), {
3211
+ metadata: __spreadValues13({
3067
3212
  url: location.href
3068
3213
  }, metadata)
3069
3214
  }), yield getTrackingEventData({
@@ -3103,12 +3248,12 @@ function _track(eventProps) {
3103
3248
  });
3104
3249
  });
3105
3250
  }
3106
- var track = (args) => _track(__spreadProps9(__spreadValues12({}, args), {
3251
+ var track = (args) => _track(__spreadProps10(__spreadValues13({}, args), {
3107
3252
  canTrack: true
3108
3253
  }));
3109
3254
 
3110
3255
  // src/constants/sdk-version.js
3111
- var SDK_VERSION = "0.7.0";
3256
+ var SDK_VERSION = "0.7.1-0";
3112
3257
 
3113
3258
  // src/functions/register.js
3114
3259
  var registry = {};
@@ -3301,24 +3446,24 @@ var getInteractionPropertiesForEvent = (event) => {
3301
3446
  };
3302
3447
 
3303
3448
  // src/helpers/ab-tests.js
3304
- var __defProp13 = Object.defineProperty;
3305
- var __getOwnPropSymbols13 = Object.getOwnPropertySymbols;
3306
- var __hasOwnProp13 = Object.prototype.hasOwnProperty;
3307
- var __propIsEnum13 = Object.prototype.propertyIsEnumerable;
3308
- var __defNormalProp13 = (obj, key, value) => key in obj ? __defProp13(obj, key, {
3449
+ var __defProp14 = Object.defineProperty;
3450
+ var __getOwnPropSymbols14 = Object.getOwnPropertySymbols;
3451
+ var __hasOwnProp14 = Object.prototype.hasOwnProperty;
3452
+ var __propIsEnum14 = Object.prototype.propertyIsEnumerable;
3453
+ var __defNormalProp14 = (obj, key, value) => key in obj ? __defProp14(obj, key, {
3309
3454
  enumerable: true,
3310
3455
  configurable: true,
3311
3456
  writable: true,
3312
3457
  value
3313
3458
  }) : obj[key] = value;
3314
- var __spreadValues13 = (a, b) => {
3459
+ var __spreadValues14 = (a, b) => {
3315
3460
  for (var prop in b || (b = {}))
3316
- if (__hasOwnProp13.call(b, prop))
3317
- __defNormalProp13(a, prop, b[prop]);
3318
- if (__getOwnPropSymbols13)
3319
- for (var prop of __getOwnPropSymbols13(b)) {
3320
- if (__propIsEnum13.call(b, prop))
3321
- __defNormalProp13(a, prop, b[prop]);
3461
+ if (__hasOwnProp14.call(b, prop))
3462
+ __defNormalProp14(a, prop, b[prop]);
3463
+ if (__getOwnPropSymbols14)
3464
+ for (var prop of __getOwnPropSymbols14(b)) {
3465
+ if (__propIsEnum14.call(b, prop))
3466
+ __defNormalProp14(a, prop, b[prop]);
3322
3467
  }
3323
3468
  return a;
3324
3469
  };
@@ -3434,7 +3579,7 @@ var handleABTestingSync = ({
3434
3579
  item,
3435
3580
  testGroupId
3436
3581
  });
3437
- return __spreadValues13(__spreadValues13({}, item), variationValue);
3582
+ return __spreadValues14(__spreadValues14({}, item), variationValue);
3438
3583
  };
3439
3584
  var handleABTesting = (_0) => __async4(void 0, [_0], function* ({
3440
3585
  item,
@@ -3457,7 +3602,7 @@ var handleABTesting = (_0) => __async4(void 0, [_0], function* ({
3457
3602
  item,
3458
3603
  testGroupId
3459
3604
  });
3460
- return __spreadValues13(__spreadValues13({}, item), variationValue);
3605
+ return __spreadValues14(__spreadValues14({}, item), variationValue);
3461
3606
  });
3462
3607
 
3463
3608
  // src/helpers/canTrack.js
@@ -3469,36 +3614,36 @@ function getPreviewContent(_searchParams) {
3469
3614
  }
3470
3615
 
3471
3616
  // src/helpers/flatten.js
3472
- var __defProp14 = Object.defineProperty;
3473
- var __defProps10 = Object.defineProperties;
3474
- var __getOwnPropDescs10 = Object.getOwnPropertyDescriptors;
3475
- var __getOwnPropSymbols14 = Object.getOwnPropertySymbols;
3476
- var __hasOwnProp14 = Object.prototype.hasOwnProperty;
3477
- var __propIsEnum14 = Object.prototype.propertyIsEnumerable;
3478
- var __defNormalProp14 = (obj, key, value) => key in obj ? __defProp14(obj, key, {
3617
+ var __defProp15 = Object.defineProperty;
3618
+ var __defProps11 = Object.defineProperties;
3619
+ var __getOwnPropDescs11 = Object.getOwnPropertyDescriptors;
3620
+ var __getOwnPropSymbols15 = Object.getOwnPropertySymbols;
3621
+ var __hasOwnProp15 = Object.prototype.hasOwnProperty;
3622
+ var __propIsEnum15 = Object.prototype.propertyIsEnumerable;
3623
+ var __defNormalProp15 = (obj, key, value) => key in obj ? __defProp15(obj, key, {
3479
3624
  enumerable: true,
3480
3625
  configurable: true,
3481
3626
  writable: true,
3482
3627
  value
3483
3628
  }) : obj[key] = value;
3484
- var __spreadValues14 = (a, b) => {
3629
+ var __spreadValues15 = (a, b) => {
3485
3630
  for (var prop in b || (b = {}))
3486
- if (__hasOwnProp14.call(b, prop))
3487
- __defNormalProp14(a, prop, b[prop]);
3488
- if (__getOwnPropSymbols14)
3489
- for (var prop of __getOwnPropSymbols14(b)) {
3490
- if (__propIsEnum14.call(b, prop))
3491
- __defNormalProp14(a, prop, b[prop]);
3631
+ if (__hasOwnProp15.call(b, prop))
3632
+ __defNormalProp15(a, prop, b[prop]);
3633
+ if (__getOwnPropSymbols15)
3634
+ for (var prop of __getOwnPropSymbols15(b)) {
3635
+ if (__propIsEnum15.call(b, prop))
3636
+ __defNormalProp15(a, prop, b[prop]);
3492
3637
  }
3493
3638
  return a;
3494
3639
  };
3495
- var __spreadProps10 = (a, b) => __defProps10(a, __getOwnPropDescs10(b));
3640
+ var __spreadProps11 = (a, b) => __defProps11(a, __getOwnPropDescs11(b));
3496
3641
  function flatten(object, path = null, separator = ".") {
3497
3642
  return Object.keys(object).reduce((acc, key) => {
3498
3643
  const value = object[key];
3499
3644
  const newPath = [path, key].filter(Boolean).join(separator);
3500
3645
  const isObject = [typeof value === "object", value !== null, !(Array.isArray(value) && value.length === 0)].every(Boolean);
3501
- return isObject ? __spreadValues14(__spreadValues14({}, acc), flatten(value, newPath, separator)) : __spreadProps10(__spreadValues14({}, acc), {
3646
+ return isObject ? __spreadValues15(__spreadValues15({}, acc), flatten(value, newPath, separator)) : __spreadProps11(__spreadValues15({}, acc), {
3502
3647
  [newPath]: value
3503
3648
  });
3504
3649
  }, {});
@@ -3541,27 +3686,28 @@ var normalizeSearchParams = (searchParams) => searchParams instanceof URLSearchP
3541
3686
  var DEFAULT_API_VERSION = "v3";
3542
3687
 
3543
3688
  // src/functions/get-content/generate-content-url.js
3544
- var __defProp15 = Object.defineProperty;
3545
- var __getOwnPropSymbols15 = Object.getOwnPropertySymbols;
3546
- var __hasOwnProp15 = Object.prototype.hasOwnProperty;
3547
- var __propIsEnum15 = Object.prototype.propertyIsEnumerable;
3548
- var __defNormalProp15 = (obj, key, value) => key in obj ? __defProp15(obj, key, {
3689
+ var __defProp16 = Object.defineProperty;
3690
+ var __getOwnPropSymbols16 = Object.getOwnPropertySymbols;
3691
+ var __hasOwnProp16 = Object.prototype.hasOwnProperty;
3692
+ var __propIsEnum16 = Object.prototype.propertyIsEnumerable;
3693
+ var __defNormalProp16 = (obj, key, value) => key in obj ? __defProp16(obj, key, {
3549
3694
  enumerable: true,
3550
3695
  configurable: true,
3551
3696
  writable: true,
3552
3697
  value
3553
3698
  }) : obj[key] = value;
3554
- var __spreadValues15 = (a, b) => {
3699
+ var __spreadValues16 = (a, b) => {
3555
3700
  for (var prop in b || (b = {}))
3556
- if (__hasOwnProp15.call(b, prop))
3557
- __defNormalProp15(a, prop, b[prop]);
3558
- if (__getOwnPropSymbols15)
3559
- for (var prop of __getOwnPropSymbols15(b)) {
3560
- if (__propIsEnum15.call(b, prop))
3561
- __defNormalProp15(a, prop, b[prop]);
3701
+ if (__hasOwnProp16.call(b, prop))
3702
+ __defNormalProp16(a, prop, b[prop]);
3703
+ if (__getOwnPropSymbols16)
3704
+ for (var prop of __getOwnPropSymbols16(b)) {
3705
+ if (__propIsEnum16.call(b, prop))
3706
+ __defNormalProp16(a, prop, b[prop]);
3562
3707
  }
3563
3708
  return a;
3564
3709
  };
3710
+ var isPositiveNumber = (thing) => typeof thing === "number" && !isNaN(thing) && thing >= 0;
3565
3711
  var generateContentUrl = (options) => {
3566
3712
  let {
3567
3713
  noTraverse = false
@@ -3575,7 +3721,14 @@ var generateContentUrl = (options) => {
3575
3721
  includeRefs = true,
3576
3722
  enrich,
3577
3723
  locale,
3578
- apiVersion = DEFAULT_API_VERSION
3724
+ apiVersion = DEFAULT_API_VERSION,
3725
+ fields,
3726
+ omit,
3727
+ offset,
3728
+ cacheSeconds,
3729
+ staleCacheSeconds,
3730
+ sort,
3731
+ includeUnpublished
3579
3732
  } = options;
3580
3733
  if (!apiKey) {
3581
3734
  throw new Error("Missing API key");
@@ -3587,7 +3740,31 @@ var generateContentUrl = (options) => {
3587
3740
  noTraverse = true;
3588
3741
  }
3589
3742
  const url = new URL(`https://cdn.builder.io/api/${apiVersion}/content/${model}?apiKey=${apiKey}&limit=${limit}&noTraverse=${noTraverse}&includeRefs=${includeRefs}${locale ? `&locale=${locale}` : ""}${enrich ? `&enrich=${enrich}` : ""}`);
3590
- const queryOptions = __spreadValues15(__spreadValues15({}, getBuilderSearchParamsFromWindow()), normalizeSearchParams(options.options || {}));
3743
+ url.searchParams.set("omit", omit || "meta.componentsUsed");
3744
+ if (fields) {
3745
+ url.searchParams.set("fields", fields);
3746
+ }
3747
+ if (Number.isFinite(offset) && offset > -1) {
3748
+ url.searchParams.set("offset", String(Math.floor(offset)));
3749
+ }
3750
+ if (typeof includeUnpublished === "boolean") {
3751
+ url.searchParams.set("includeUnpublished", String(includeUnpublished));
3752
+ }
3753
+ if (cacheSeconds && isPositiveNumber(cacheSeconds)) {
3754
+ url.searchParams.set("cacheSeconds", String(cacheSeconds));
3755
+ }
3756
+ if (staleCacheSeconds && isPositiveNumber(staleCacheSeconds)) {
3757
+ url.searchParams.set("staleCacheSeconds", String(staleCacheSeconds));
3758
+ }
3759
+ if (sort) {
3760
+ const flattened2 = flatten({
3761
+ sort
3762
+ });
3763
+ for (const key in flattened2) {
3764
+ url.searchParams.set(key, JSON.stringify(flattened2[key]));
3765
+ }
3766
+ }
3767
+ const queryOptions = __spreadValues16(__spreadValues16({}, getBuilderSearchParamsFromWindow()), normalizeSearchParams(options.options || {}));
3591
3768
  const flattened = flatten(queryOptions);
3592
3769
  for (const key in flattened) {
3593
3770
  url.searchParams.set(key, String(flattened[key]));
@@ -3607,30 +3784,30 @@ var generateContentUrl = (options) => {
3607
3784
  };
3608
3785
 
3609
3786
  // src/functions/get-content/index.js
3610
- var __defProp16 = Object.defineProperty;
3611
- var __defProps11 = Object.defineProperties;
3612
- var __getOwnPropDescs11 = Object.getOwnPropertyDescriptors;
3613
- var __getOwnPropSymbols16 = Object.getOwnPropertySymbols;
3614
- var __hasOwnProp16 = Object.prototype.hasOwnProperty;
3615
- var __propIsEnum16 = Object.prototype.propertyIsEnumerable;
3616
- var __defNormalProp16 = (obj, key, value) => key in obj ? __defProp16(obj, key, {
3787
+ var __defProp17 = Object.defineProperty;
3788
+ var __defProps12 = Object.defineProperties;
3789
+ var __getOwnPropDescs12 = Object.getOwnPropertyDescriptors;
3790
+ var __getOwnPropSymbols17 = Object.getOwnPropertySymbols;
3791
+ var __hasOwnProp17 = Object.prototype.hasOwnProperty;
3792
+ var __propIsEnum17 = Object.prototype.propertyIsEnumerable;
3793
+ var __defNormalProp17 = (obj, key, value) => key in obj ? __defProp17(obj, key, {
3617
3794
  enumerable: true,
3618
3795
  configurable: true,
3619
3796
  writable: true,
3620
3797
  value
3621
3798
  }) : obj[key] = value;
3622
- var __spreadValues16 = (a, b) => {
3799
+ var __spreadValues17 = (a, b) => {
3623
3800
  for (var prop in b || (b = {}))
3624
- if (__hasOwnProp16.call(b, prop))
3625
- __defNormalProp16(a, prop, b[prop]);
3626
- if (__getOwnPropSymbols16)
3627
- for (var prop of __getOwnPropSymbols16(b)) {
3628
- if (__propIsEnum16.call(b, prop))
3629
- __defNormalProp16(a, prop, b[prop]);
3801
+ if (__hasOwnProp17.call(b, prop))
3802
+ __defNormalProp17(a, prop, b[prop]);
3803
+ if (__getOwnPropSymbols17)
3804
+ for (var prop of __getOwnPropSymbols17(b)) {
3805
+ if (__propIsEnum17.call(b, prop))
3806
+ __defNormalProp17(a, prop, b[prop]);
3630
3807
  }
3631
3808
  return a;
3632
3809
  };
3633
- var __spreadProps11 = (a, b) => __defProps11(a, __getOwnPropDescs11(b));
3810
+ var __spreadProps12 = (a, b) => __defProps12(a, __getOwnPropDescs12(b));
3634
3811
  var __async5 = (__this, __arguments, generator) => {
3635
3812
  return new Promise((resolve, reject) => {
3636
3813
  var fulfilled = (value) => {
@@ -3654,7 +3831,7 @@ var __async5 = (__this, __arguments, generator) => {
3654
3831
  var checkContentHasResults = (content) => "results" in content;
3655
3832
  function fetchOneEntry(options) {
3656
3833
  return __async5(this, null, function* () {
3657
- const allContent = yield fetchEntries(__spreadProps11(__spreadValues16({}, options), {
3834
+ const allContent = yield fetchEntries(__spreadProps12(__spreadValues17({}, options), {
3658
3835
  limit: 1
3659
3836
  }));
3660
3837
  if (allContent) {
@@ -3873,13 +4050,8 @@ function EnableEditor(props) {
3873
4050
  }
3874
4051
  let elementRef;
3875
4052
  onMount2(() => {
3876
- if (!props.apiKey) {
3877
- logger.error(
3878
- "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
3879
- );
3880
- }
3881
4053
  if (isBrowser()) {
3882
- if (isEditing()) {
4054
+ if (isEditing() && true) {
3883
4055
  setForceReRenderCount(forceReRenderCount() + 1);
3884
4056
  window.addEventListener("message", processMessage);
3885
4057
  registerInsertMenu();
@@ -3905,18 +4077,20 @@ function EnableEditor(props) {
3905
4077
  emitStateUpdate
3906
4078
  );
3907
4079
  }
3908
- if (props.builderContextSignal.content) {
4080
+ const shouldTrackImpression = props.builderContextSignal.content && getDefaultCanTrack(props.canTrack);
4081
+ if (shouldTrackImpression) {
3909
4082
  const variationId = props.builderContextSignal.content?.testVariationId;
3910
4083
  const contentId = props.builderContextSignal.content?.id;
4084
+ const apiKeyProp = props.apiKey;
3911
4085
  _track({
3912
4086
  type: "impression",
3913
- canTrack: getDefaultCanTrack(props.canTrack),
4087
+ canTrack: true,
3914
4088
  contentId,
3915
- apiKey: props.apiKey,
4089
+ apiKey: apiKeyProp,
3916
4090
  variationId: variationId !== contentId ? variationId : void 0
3917
4091
  });
3918
4092
  }
3919
- if (isPreviewing()) {
4093
+ if (isPreviewing() && true) {
3920
4094
  const searchParams = new URL(location.href).searchParams;
3921
4095
  const searchParamPreviewModel = searchParams.get("builder.preview");
3922
4096
  const searchParamPreviewId = searchParams.get(
@@ -3935,11 +4109,18 @@ function EnableEditor(props) {
3935
4109
  });
3936
4110
  }
3937
4111
  }
3938
- evaluateJsCode();
3939
- runHttpRequests();
3940
- emitStateUpdate();
3941
4112
  }
3942
4113
  });
4114
+ onMount2(() => {
4115
+ if (!props.apiKey) {
4116
+ logger.error(
4117
+ "No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop."
4118
+ );
4119
+ }
4120
+ evaluateJsCode();
4121
+ runHttpRequests();
4122
+ emitStateUpdate();
4123
+ });
3943
4124
  function onUpdateFn_0() {
3944
4125
  if (props.content) {
3945
4126
  mergeNewContent(props.content);
@@ -3976,6 +4157,7 @@ function EnableEditor(props) {
3976
4157
  createEffect2(on2(() => [props.builderContextSignal.rootState], onUpdateFn_4));
3977
4158
  return <stdin_default.Provider value={props.builderContextSignal}><Show9 when={props.builderContextSignal.content}><div
3978
4159
  class={props.classNameProp}
4160
+ {...{}}
3979
4161
  key={forceReRenderCount()}
3980
4162
  ref={elementRef}
3981
4163
  onClick={(event) => onClick(event)}
@@ -4183,24 +4365,24 @@ function ContentVariants(props) {
4183
4365
  var Content_variants_default = ContentVariants;
4184
4366
 
4185
4367
  // src/blocks/symbol/symbol.helpers.js
4186
- var __defProp17 = Object.defineProperty;
4187
- var __getOwnPropSymbols17 = Object.getOwnPropertySymbols;
4188
- var __hasOwnProp17 = Object.prototype.hasOwnProperty;
4189
- var __propIsEnum17 = Object.prototype.propertyIsEnumerable;
4190
- var __defNormalProp17 = (obj, key, value) => key in obj ? __defProp17(obj, key, {
4368
+ var __defProp18 = Object.defineProperty;
4369
+ var __getOwnPropSymbols18 = Object.getOwnPropertySymbols;
4370
+ var __hasOwnProp18 = Object.prototype.hasOwnProperty;
4371
+ var __propIsEnum18 = Object.prototype.propertyIsEnumerable;
4372
+ var __defNormalProp18 = (obj, key, value) => key in obj ? __defProp18(obj, key, {
4191
4373
  enumerable: true,
4192
4374
  configurable: true,
4193
4375
  writable: true,
4194
4376
  value
4195
4377
  }) : obj[key] = value;
4196
- var __spreadValues17 = (a, b) => {
4378
+ var __spreadValues18 = (a, b) => {
4197
4379
  for (var prop in b || (b = {}))
4198
- if (__hasOwnProp17.call(b, prop))
4199
- __defNormalProp17(a, prop, b[prop]);
4200
- if (__getOwnPropSymbols17)
4201
- for (var prop of __getOwnPropSymbols17(b)) {
4202
- if (__propIsEnum17.call(b, prop))
4203
- __defNormalProp17(a, prop, b[prop]);
4380
+ if (__hasOwnProp18.call(b, prop))
4381
+ __defNormalProp18(a, prop, b[prop]);
4382
+ if (__getOwnPropSymbols18)
4383
+ for (var prop of __getOwnPropSymbols18(b)) {
4384
+ if (__propIsEnum18.call(b, prop))
4385
+ __defNormalProp18(a, prop, b[prop]);
4204
4386
  }
4205
4387
  return a;
4206
4388
  };
@@ -4229,7 +4411,7 @@ var fetchSymbolContent = (_0) => __async6(void 0, [_0], function* ({
4229
4411
  symbol
4230
4412
  }) {
4231
4413
  if ((symbol == null ? void 0 : symbol.model) && (builderContextValue == null ? void 0 : builderContextValue.apiKey)) {
4232
- return fetchOneEntry(__spreadValues17({
4414
+ return fetchOneEntry(__spreadValues18({
4233
4415
  model: symbol.model,
4234
4416
  apiKey: builderContextValue.apiKey,
4235
4417
  apiVersion: builderContextValue.apiVersion
@@ -4310,30 +4492,30 @@ function setEditorSettings(newSettings) {
4310
4492
  }
4311
4493
 
4312
4494
  // src/functions/fetch-builder-props.js
4313
- var __defProp18 = Object.defineProperty;
4314
- var __defProps12 = Object.defineProperties;
4315
- var __getOwnPropDescs12 = Object.getOwnPropertyDescriptors;
4316
- var __getOwnPropSymbols18 = Object.getOwnPropertySymbols;
4317
- var __hasOwnProp18 = Object.prototype.hasOwnProperty;
4318
- var __propIsEnum18 = Object.prototype.propertyIsEnumerable;
4319
- var __defNormalProp18 = (obj, key, value) => key in obj ? __defProp18(obj, key, {
4495
+ var __defProp19 = Object.defineProperty;
4496
+ var __defProps13 = Object.defineProperties;
4497
+ var __getOwnPropDescs13 = Object.getOwnPropertyDescriptors;
4498
+ var __getOwnPropSymbols19 = Object.getOwnPropertySymbols;
4499
+ var __hasOwnProp19 = Object.prototype.hasOwnProperty;
4500
+ var __propIsEnum19 = Object.prototype.propertyIsEnumerable;
4501
+ var __defNormalProp19 = (obj, key, value) => key in obj ? __defProp19(obj, key, {
4320
4502
  enumerable: true,
4321
4503
  configurable: true,
4322
4504
  writable: true,
4323
4505
  value
4324
4506
  }) : obj[key] = value;
4325
- var __spreadValues18 = (a, b) => {
4507
+ var __spreadValues19 = (a, b) => {
4326
4508
  for (var prop in b || (b = {}))
4327
- if (__hasOwnProp18.call(b, prop))
4328
- __defNormalProp18(a, prop, b[prop]);
4329
- if (__getOwnPropSymbols18)
4330
- for (var prop of __getOwnPropSymbols18(b)) {
4331
- if (__propIsEnum18.call(b, prop))
4332
- __defNormalProp18(a, prop, b[prop]);
4509
+ if (__hasOwnProp19.call(b, prop))
4510
+ __defNormalProp19(a, prop, b[prop]);
4511
+ if (__getOwnPropSymbols19)
4512
+ for (var prop of __getOwnPropSymbols19(b)) {
4513
+ if (__propIsEnum19.call(b, prop))
4514
+ __defNormalProp19(a, prop, b[prop]);
4333
4515
  }
4334
4516
  return a;
4335
4517
  };
4336
- var __spreadProps12 = (a, b) => __defProps12(a, __getOwnPropDescs12(b));
4518
+ var __spreadProps13 = (a, b) => __defProps13(a, __getOwnPropDescs13(b));
4337
4519
  var __async7 = (__this, __arguments, generator) => {
4338
4520
  return new Promise((resolve, reject) => {
4339
4521
  var fulfilled = (value) => {
@@ -4357,10 +4539,10 @@ var __async7 = (__this, __arguments, generator) => {
4357
4539
  var fetchBuilderProps = (_args) => __async7(void 0, null, function* () {
4358
4540
  var _a, _b, _c;
4359
4541
  const urlPath = _args.path || ((_a = _args.url) == null ? void 0 : _a.pathname) || ((_b = _args.userAttributes) == null ? void 0 : _b.urlPath);
4360
- const getContentArgs = __spreadProps12(__spreadValues18({}, _args), {
4542
+ const getContentArgs = __spreadProps13(__spreadValues19({}, _args), {
4361
4543
  apiKey: _args.apiKey,
4362
4544
  model: _args.model || "page",
4363
- userAttributes: __spreadValues18(__spreadValues18({}, _args.userAttributes), urlPath ? {
4545
+ userAttributes: __spreadValues19(__spreadValues19({}, _args.userAttributes), urlPath ? {
4364
4546
  urlPath
4365
4547
  } : {}),
4366
4548
  options: getBuilderSearchParams(_args.searchParams || ((_c = _args.url) == null ? void 0 : _c.searchParams) || _args.options)