@builder.io/sdk-solid 3.0.5 → 3.0.7

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.js CHANGED
@@ -1108,8 +1108,13 @@ var provideBuilderContext = (block, context) => {
1108
1108
 
1109
1109
  // src/constants/device-sizes.ts
1110
1110
  var SIZES = {
1111
+ xsmall: {
1112
+ min: 0,
1113
+ default: 160,
1114
+ max: 320
1115
+ },
1111
1116
  small: {
1112
- min: 320,
1117
+ min: 321,
1113
1118
  default: 321,
1114
1119
  max: 640
1115
1120
  },
@@ -1125,15 +1130,28 @@ var SIZES = {
1125
1130
  }
1126
1131
  };
1127
1132
  var getMaxWidthQueryForSize = (size, sizeValues = SIZES) => `@media (max-width: ${sizeValues[size].max}px)`;
1128
- var getSizesForBreakpoints = ({
1129
- small,
1130
- medium
1131
- }) => {
1133
+ var getSizesForBreakpoints = (breakpoints) => {
1132
1134
  const newSizes = fastClone(SIZES);
1135
+ if (!breakpoints) {
1136
+ return newSizes;
1137
+ }
1138
+ const {
1139
+ xsmall,
1140
+ small,
1141
+ medium
1142
+ } = breakpoints;
1143
+ if (xsmall) {
1144
+ const xsmallMin = Math.floor(xsmall / 2);
1145
+ newSizes.xsmall = {
1146
+ max: xsmall,
1147
+ min: xsmallMin,
1148
+ default: xsmallMin + 1
1149
+ };
1150
+ }
1133
1151
  if (!small || !medium) {
1134
1152
  return newSizes;
1135
1153
  }
1136
- const smallMin = Math.floor(small / 2);
1154
+ const smallMin = xsmall ? newSizes.xsmall.max + 1 : Math.floor(small / 2);
1137
1155
  newSizes.small = {
1138
1156
  max: small,
1139
1157
  min: smallMin,
@@ -1191,9 +1209,11 @@ function BlockStyles(props) {
1191
1209
  const styles = processedBlock.responsiveStyles;
1192
1210
  const content = props.context.content;
1193
1211
  const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(content?.meta?.breakpoints || {});
1212
+ const contentHasXSmallBreakpoint = Boolean(content?.meta?.breakpoints?.xsmall);
1194
1213
  const largeStyles = styles?.large;
1195
1214
  const mediumStyles = styles?.medium;
1196
1215
  const smallStyles = styles?.small;
1216
+ const xsmallStyles = styles?.xsmall;
1197
1217
  const className = processedBlock.id;
1198
1218
  if (!className) {
1199
1219
  return "";
@@ -1212,6 +1232,11 @@ function BlockStyles(props) {
1212
1232
  styles: smallStyles,
1213
1233
  mediaQuery: getMaxWidthQueryForSize("small", sizesWithUpdatedBreakpoints)
1214
1234
  }) : "";
1235
+ const xsmallStylesClass = xsmallStyles && contentHasXSmallBreakpoint ? createCssClass({
1236
+ className,
1237
+ styles: xsmallStyles,
1238
+ mediaQuery: getMaxWidthQueryForSize("xsmall", sizesWithUpdatedBreakpoints)
1239
+ }) : "";
1215
1240
  const hoverAnimation = processedBlock.animations && processedBlock.animations.find((item) => item.trigger === "hover");
1216
1241
  let hoverStylesClass = "";
1217
1242
  if (hoverAnimation) {
@@ -1225,7 +1250,7 @@ function BlockStyles(props) {
1225
1250
  }
1226
1251
  }) || "";
1227
1252
  }
1228
- return [largeStylesClass, mediumStylesClass, smallStylesClass, hoverStylesClass].join(" ");
1253
+ return [largeStylesClass, mediumStylesClass, smallStylesClass, xsmallStylesClass, hoverStylesClass].join(" ");
1229
1254
  });
1230
1255
  return createComponent(Show, {
1231
1256
  get when() {
@@ -1785,7 +1810,7 @@ function Block(props) {
1785
1810
  });
1786
1811
  }
1787
1812
  var block_default = Block;
1788
- var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-3c4beb0c {
1813
+ var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-3d7ff108 {
1789
1814
  display: flex;
1790
1815
  flex-direction: column;
1791
1816
  align-items: stretch;
@@ -1798,8 +1823,9 @@ function BlocksWrapper(props) {
1798
1823
  if (!props.path) {
1799
1824
  return void 0;
1800
1825
  }
1826
+ const thisPrefix = "this.";
1801
1827
  const pathPrefix = "component.options.";
1802
- return props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
1828
+ return props.path.startsWith(thisPrefix) ? props.path.replace(thisPrefix, "") : props.path.startsWith(pathPrefix) ? props.path : `${pathPrefix}${props.path || ""}`;
1803
1829
  });
1804
1830
  function onClick() {
1805
1831
  if (isEditing() && !props.blocks?.length) {
@@ -1828,7 +1854,7 @@ function BlocksWrapper(props) {
1828
1854
  });
1829
1855
  return [createComponent(Dynamic, mergeProps({
1830
1856
  get ["class"]() {
1831
- return className() + " dynamic-3c4beb0c";
1857
+ return className() + " dynamic-3d7ff108";
1832
1858
  },
1833
1859
  ref(r$) {
1834
1860
  const _ref$ = blocksWrapperRef;
@@ -2522,8 +2548,58 @@ var handleABTesting = async ({
2522
2548
  };
2523
2549
  };
2524
2550
 
2551
+ // src/helpers/user-attributes.ts
2552
+ var USER_ATTRIBUTES_COOKIE_NAME = "builder.userAttributes";
2553
+ function createUserAttributesService() {
2554
+ let canTrack = true;
2555
+ const subscribers = /* @__PURE__ */ new Set();
2556
+ return {
2557
+ setUserAttributes(newAttrs) {
2558
+ if (!isBrowser()) {
2559
+ return;
2560
+ }
2561
+ const userAttributes = {
2562
+ ...this.getUserAttributes(),
2563
+ ...newAttrs
2564
+ };
2565
+ setCookie({
2566
+ name: USER_ATTRIBUTES_COOKIE_NAME,
2567
+ value: JSON.stringify(userAttributes),
2568
+ canTrack
2569
+ });
2570
+ subscribers.forEach((callback) => callback(userAttributes));
2571
+ },
2572
+ getUserAttributes() {
2573
+ if (!isBrowser()) {
2574
+ return {};
2575
+ }
2576
+ return JSON.parse(getCookieSync({
2577
+ name: USER_ATTRIBUTES_COOKIE_NAME,
2578
+ canTrack
2579
+ }) || "{}");
2580
+ },
2581
+ subscribeOnUserAttributesChange(callback) {
2582
+ subscribers.add(callback);
2583
+ return () => {
2584
+ subscribers.delete(callback);
2585
+ };
2586
+ },
2587
+ setCanTrack(value) {
2588
+ canTrack = value;
2589
+ }
2590
+ };
2591
+ }
2592
+ var userAttributesService = createUserAttributesService();
2593
+ var setClientUserAttributes = (attributes) => {
2594
+ userAttributesService.setUserAttributes(attributes);
2595
+ };
2596
+
2525
2597
  // src/helpers/canTrack.ts
2526
- var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
2598
+ var getDefaultCanTrack = (canTrack) => {
2599
+ const result = checkIsDefined(canTrack) ? canTrack : true;
2600
+ userAttributesService.setCanTrack(result);
2601
+ return result;
2602
+ };
2527
2603
 
2528
2604
  // src/blocks/accordion/component-info.ts
2529
2605
  var defaultTitle = {
@@ -3254,8 +3330,408 @@ var componentInfo5 = {
3254
3330
  }
3255
3331
  };
3256
3332
 
3257
- // src/blocks/section/component-info.ts
3333
+ // src/blocks/personalization-container/component-info.ts
3258
3334
  var componentInfo6 = {
3335
+ name: "PersonalizationContainer",
3336
+ shouldReceiveBuilderProps: {
3337
+ builderBlock: true,
3338
+ builderContext: true
3339
+ },
3340
+ noWrap: true,
3341
+ image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",
3342
+ canHaveChildren: true,
3343
+ inputs: [{
3344
+ name: "variants",
3345
+ defaultValue: [],
3346
+ behavior: "personalizationVariantList",
3347
+ type: "list",
3348
+ subFields: [{
3349
+ name: "name",
3350
+ type: "text"
3351
+ }, {
3352
+ name: "query",
3353
+ friendlyName: "Targeting rules",
3354
+ type: "BuilderQuery",
3355
+ defaultValue: []
3356
+ }, {
3357
+ name: "startDate",
3358
+ type: "date"
3359
+ }, {
3360
+ name: "endDate",
3361
+ type: "date"
3362
+ }, {
3363
+ name: "blocks",
3364
+ type: "uiBlocks",
3365
+ hideFromUI: true,
3366
+ defaultValue: []
3367
+ }]
3368
+ }]
3369
+ };
3370
+ var _tmpl$8 = /* @__PURE__ */ template(`<script>`);
3371
+ function InlinedScript(props) {
3372
+ return (() => {
3373
+ const _el$ = _tmpl$8();
3374
+ effect((_p$) => {
3375
+ const _v$ = props.scriptStr, _v$2 = props.id, _v$3 = props.nonce || "";
3376
+ _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
3377
+ _v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
3378
+ _v$3 !== _p$._v$3 && setAttribute(_el$, "nonce", _p$._v$3 = _v$3);
3379
+ return _p$;
3380
+ }, {
3381
+ _v$: void 0,
3382
+ _v$2: void 0,
3383
+ _v$3: void 0
3384
+ });
3385
+ return _el$;
3386
+ })();
3387
+ }
3388
+ var inlined_script_default = InlinedScript;
3389
+
3390
+ // src/functions/is-previewing.ts
3391
+ function isPreviewing(_search) {
3392
+ const search = _search || (isBrowser() ? window.location.search : void 0);
3393
+ if (!search) {
3394
+ return false;
3395
+ }
3396
+ const normalizedSearch = getSearchString(search);
3397
+ return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
3398
+ }
3399
+
3400
+ // src/blocks/personalization-container/helpers/inlined-fns.ts
3401
+ function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {
3402
+ function isString(val) {
3403
+ return typeof val === "string";
3404
+ }
3405
+ function isNumber(val) {
3406
+ return typeof val === "number";
3407
+ }
3408
+ function objectMatchesQuery(userattr, query2) {
3409
+ const result = (() => {
3410
+ const property = query2.property;
3411
+ const operator = query2.operator;
3412
+ let testValue = query2.value;
3413
+ if (query2 && query2.property === "urlPath" && query2.value && typeof query2.value === "string" && query2.value !== "/" && query2.value.endsWith("/")) {
3414
+ testValue = query2.value.slice(0, -1);
3415
+ }
3416
+ if (!(property && operator)) {
3417
+ return true;
3418
+ }
3419
+ if (Array.isArray(testValue)) {
3420
+ if (operator === "isNot") {
3421
+ return testValue.every((val) => objectMatchesQuery(userattr, {
3422
+ property,
3423
+ operator,
3424
+ value: val
3425
+ }));
3426
+ }
3427
+ return !!testValue.find((val) => objectMatchesQuery(userattr, {
3428
+ property,
3429
+ operator,
3430
+ value: val
3431
+ }));
3432
+ }
3433
+ const value = userattr[property];
3434
+ if (Array.isArray(value)) {
3435
+ return value.includes(testValue);
3436
+ }
3437
+ switch (operator) {
3438
+ case "is":
3439
+ return value === testValue;
3440
+ case "isNot":
3441
+ return value !== testValue;
3442
+ case "contains":
3443
+ return (isString(value) || Array.isArray(value)) && value.includes(String(testValue));
3444
+ case "startsWith":
3445
+ return isString(value) && value.startsWith(String(testValue));
3446
+ case "endsWith":
3447
+ return isString(value) && value.endsWith(String(testValue));
3448
+ case "greaterThan":
3449
+ return isNumber(value) && isNumber(testValue) && value > testValue;
3450
+ case "lessThan":
3451
+ return isNumber(value) && isNumber(testValue) && value < testValue;
3452
+ case "greaterThanOrEqualTo":
3453
+ return isNumber(value) && isNumber(testValue) && value >= testValue;
3454
+ case "lessThanOrEqualTo":
3455
+ return isNumber(value) && isNumber(testValue) && value <= testValue;
3456
+ default:
3457
+ return false;
3458
+ }
3459
+ })();
3460
+ return result;
3461
+ }
3462
+ const item = {
3463
+ query,
3464
+ startDate,
3465
+ endDate
3466
+ };
3467
+ const now = userAttributes.date && new Date(userAttributes.date) || /* @__PURE__ */ new Date();
3468
+ if (item.startDate && new Date(item.startDate) > now) {
3469
+ return false;
3470
+ } else if (item.endDate && new Date(item.endDate) < now) {
3471
+ return false;
3472
+ }
3473
+ if (!item.query || !item.query.length) {
3474
+ return true;
3475
+ }
3476
+ return item.query.every((filter) => {
3477
+ return objectMatchesQuery(userAttributes, filter);
3478
+ });
3479
+ }
3480
+ var PERSONALIZATION_SCRIPT = `function getPersonalizedVariant(variants, blockId, locale) {
3481
+ if (!navigator.cookieEnabled) {
3482
+ return;
3483
+ }
3484
+ function getCookie(name) {
3485
+ const nameEQ = name + '=';
3486
+ const ca = document.cookie.split(';');
3487
+ for (let i = 0; i < ca.length; i++) {
3488
+ let c = ca[i];
3489
+ while (c.charAt(0) == ' ') c = c.substring(1, c.length);
3490
+ if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
3491
+ }
3492
+ return null;
3493
+ }
3494
+ function removeVariants() {
3495
+ variants?.forEach(function (_, index) {
3496
+ document.querySelector('template[data-variant-id="' + blockId + '-' + index + '"]')?.remove();
3497
+ });
3498
+ document.querySelector('script[data-id="variants-script-' + blockId + '"]')?.remove();
3499
+ document.querySelector('style[data-id="variants-styles-' + blockId + '"]')?.remove();
3500
+ }
3501
+ const attributes = JSON.parse(getCookie('builder.userAttributes') || '{}');
3502
+ if (locale) {
3503
+ attributes.locale = locale;
3504
+ }
3505
+ const winningVariantIndex = variants?.findIndex(function (variant) {
3506
+ return filterWithCustomTargeting(attributes, variant.query, variant.startDate, variant.endDate);
3507
+ });
3508
+ const isDebug = location.href.includes('builder.debug=true');
3509
+ if (isDebug) {
3510
+ console.debug('PersonalizationContainer', {
3511
+ attributes,
3512
+ variants,
3513
+ winningVariantIndex
3514
+ });
3515
+ }
3516
+ if (winningVariantIndex !== -1) {
3517
+ const winningVariant = document.querySelector('template[data-variant-id="' + blockId + '-' + winningVariantIndex + '"]');
3518
+ if (winningVariant) {
3519
+ const parentNode = winningVariant.parentNode;
3520
+ if (parentNode) {
3521
+ const newParent = parentNode.cloneNode(false);
3522
+ newParent.appendChild(winningVariant.content.firstChild);
3523
+ newParent.appendChild(winningVariant.content.lastChild);
3524
+ parentNode.parentNode?.replaceChild(newParent, parentNode);
3525
+ }
3526
+ if (isDebug) {
3527
+ console.debug('PersonalizationContainer', 'Winning variant Replaced:', winningVariant);
3528
+ }
3529
+ }
3530
+ } else if (variants && variants.length > 0) {
3531
+ removeVariants();
3532
+ }
3533
+ }`;
3534
+ var FILTER_WITH_CUSTOM_TARGETING_SCRIPT = "function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {\n function isString(val) {\n return typeof val === 'string';\n }\n function isNumber(val) {\n return typeof val === 'number';\n }\n function objectMatchesQuery(userattr, query) {\n const result = (() => {\n const property = query.property;\n const operator = query.operator;\n let testValue = query.value;\n if (query && query.property === 'urlPath' && query.value && typeof query.value === 'string' && query.value !== '/' && query.value.endsWith('/')) {\n testValue = query.value.slice(0, -1);\n }\n if (!(property && operator)) {\n return true;\n }\n if (Array.isArray(testValue)) {\n if (operator === 'isNot') {\n return testValue.every(val => objectMatchesQuery(userattr, {\n property,\n operator,\n value: val\n }));\n }\n return !!testValue.find(val => objectMatchesQuery(userattr, {\n property,\n operator,\n value: val\n }));\n }\n const value = userattr[property];\n if (Array.isArray(value)) {\n return value.includes(testValue);\n }\n switch (operator) {\n case 'is':\n return value === testValue;\n case 'isNot':\n return value !== testValue;\n case 'contains':\n return (isString(value) || Array.isArray(value)) && value.includes(String(testValue));\n case 'startsWith':\n return isString(value) && value.startsWith(String(testValue));\n case 'endsWith':\n return isString(value) && value.endsWith(String(testValue));\n case 'greaterThan':\n return isNumber(value) && isNumber(testValue) && value > testValue;\n case 'lessThan':\n return isNumber(value) && isNumber(testValue) && value < testValue;\n case 'greaterThanOrEqualTo':\n return isNumber(value) && isNumber(testValue) && value >= testValue;\n case 'lessThanOrEqualTo':\n return isNumber(value) && isNumber(testValue) && value <= testValue;\n default:\n return false;\n }\n })();\n return result;\n }\n const item = {\n query,\n startDate,\n endDate\n };\n const now = userAttributes.date && new Date(userAttributes.date) || new Date();\n if (item.startDate && new Date(item.startDate) > now) {\n return false;\n } else if (item.endDate && new Date(item.endDate) < now) {\n return false;\n }\n if (!item.query || !item.query.length) {\n return true;\n }\n return item.query.every(filter => {\n return objectMatchesQuery(userAttributes, filter);\n });\n}";
3535
+
3536
+ // src/blocks/personalization-container/helpers.ts
3537
+ function checkShouldRenderVariants(variants, canTrack) {
3538
+ const hasVariants = variants && variants.length > 0;
3539
+ if (TARGET === "reactNative")
3540
+ return false;
3541
+ if (!hasVariants)
3542
+ return false;
3543
+ if (!canTrack)
3544
+ return false;
3545
+ if (TARGET === "vue" || TARGET === "svelte")
3546
+ return true;
3547
+ if (isBrowser())
3548
+ return false;
3549
+ return true;
3550
+ }
3551
+ function getBlocksToRender({
3552
+ variants,
3553
+ previewingIndex,
3554
+ isHydrated,
3555
+ filteredVariants,
3556
+ fallbackBlocks
3557
+ }) {
3558
+ const fallback = {
3559
+ blocks: fallbackBlocks ?? [],
3560
+ path: "this.children"
3561
+ };
3562
+ if (isHydrated && isEditing()) {
3563
+ if (typeof previewingIndex === "number" && previewingIndex < (variants?.length ?? 0)) {
3564
+ const variant = variants[previewingIndex];
3565
+ return {
3566
+ blocks: variant.blocks,
3567
+ path: `component.options.variants.${previewingIndex}.blocks`
3568
+ };
3569
+ }
3570
+ return fallback;
3571
+ }
3572
+ if (isBrowser()) {
3573
+ const winningVariant = filteredVariants?.[0];
3574
+ if (winningVariant) {
3575
+ return {
3576
+ blocks: winningVariant.blocks,
3577
+ path: `component.options.variants.${variants?.indexOf(winningVariant)}.blocks`
3578
+ };
3579
+ }
3580
+ }
3581
+ return fallback;
3582
+ }
3583
+ var getPersonalizationScript = (variants, blockId, locale) => {
3584
+ return `
3585
+ (function() {
3586
+ ${FILTER_WITH_CUSTOM_TARGETING_SCRIPT}
3587
+ ${PERSONALIZATION_SCRIPT}
3588
+ getPersonalizedVariant(${JSON.stringify(variants)}, "${blockId}"${locale ? `, "${locale}"` : ""})
3589
+ })();
3590
+ `;
3591
+ };
3592
+
3593
+ // src/blocks/personalization-container/personalization-container.tsx
3594
+ var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
3595
+ var _tmpl$25 = /* @__PURE__ */ template(`<template>`);
3596
+ function PersonalizationContainer(props) {
3597
+ const [userAttributes, setUserAttributes] = createSignal(userAttributesService.getUserAttributes());
3598
+ const [scriptStr, setScriptStr] = createSignal(getPersonalizationScript(props.variants, props.builderBlock?.id || "none", props.builderContext?.rootState?.locale));
3599
+ const [unsubscribers, setUnsubscribers] = createSignal([]);
3600
+ const [shouldRenderVariants, setShouldRenderVariants] = createSignal(checkShouldRenderVariants(props.variants, getDefaultCanTrack(props.builderContext?.canTrack)));
3601
+ const [isHydrated, setIsHydrated] = createSignal(false);
3602
+ const filteredVariants = createMemo(() => {
3603
+ return (props.variants || []).filter((variant) => {
3604
+ return filterWithCustomTargeting({
3605
+ ...props.builderContext?.rootState?.locale ? {
3606
+ locale: props.builderContext?.rootState?.locale
3607
+ } : {},
3608
+ ...userAttributes()
3609
+ }, variant.query, variant.startDate, variant.endDate);
3610
+ });
3611
+ });
3612
+ const blocksToRender = createMemo(() => {
3613
+ return getBlocksToRender({
3614
+ variants: props.variants,
3615
+ fallbackBlocks: props.builderBlock?.children,
3616
+ isHydrated: isHydrated(),
3617
+ filteredVariants: filteredVariants(),
3618
+ previewingIndex: props.previewingIndex
3619
+ });
3620
+ });
3621
+ const hideVariantsStyleString = createMemo(() => {
3622
+ return (props.variants || []).map((_, index) => `[data-variant-id="${props.builderBlock?.id}-${index}"] { display: none; } `).join("");
3623
+ });
3624
+ let rootRef;
3625
+ onMount(() => {
3626
+ setIsHydrated(true);
3627
+ const unsub = userAttributesService.subscribeOnUserAttributesChange((attrs) => {
3628
+ setUserAttributes(attrs);
3629
+ });
3630
+ if (!(isEditing() || isPreviewing())) {
3631
+ const variant = filteredVariants()[0];
3632
+ if (rootRef) {
3633
+ rootRef.dispatchEvent(new CustomEvent("builder.variantLoaded", {
3634
+ detail: {
3635
+ variant: variant || "default",
3636
+ content: props.builderContext?.content
3637
+ },
3638
+ bubbles: true
3639
+ }));
3640
+ const observer = new IntersectionObserver((entries) => {
3641
+ entries.forEach((entry) => {
3642
+ if (entry.isIntersecting && rootRef) {
3643
+ rootRef.dispatchEvent(new CustomEvent("builder.variantDisplayed", {
3644
+ detail: {
3645
+ variant: variant || "default",
3646
+ content: props.builderContext?.content
3647
+ },
3648
+ bubbles: true
3649
+ }));
3650
+ }
3651
+ });
3652
+ });
3653
+ observer.observe(rootRef);
3654
+ }
3655
+ }
3656
+ unsubscribers().push(unsub);
3657
+ });
3658
+ return (() => {
3659
+ const _el$ = _tmpl$9();
3660
+ const _ref$ = rootRef;
3661
+ typeof _ref$ === "function" ? use(_ref$, _el$) : rootRef = _el$;
3662
+ spread(_el$, mergeProps({
3663
+ get ["class"]() {
3664
+ return `builder-personalization-container ${props.attributes?.className || ""}`;
3665
+ }
3666
+ }, () => props.attributes), false, true);
3667
+ insert(_el$, createComponent(Show, {
3668
+ get when() {
3669
+ return shouldRenderVariants();
3670
+ },
3671
+ get children() {
3672
+ return [createComponent(For, {
3673
+ get each() {
3674
+ return props.variants;
3675
+ },
3676
+ children: (variant, _index) => {
3677
+ const index = _index();
3678
+ return (() => {
3679
+ const _el$2 = _tmpl$25();
3680
+ setAttribute(_el$2, "key", index);
3681
+ insert(_el$2, createComponent(blocks_default, {
3682
+ get blocks() {
3683
+ return variant.blocks;
3684
+ },
3685
+ get parent() {
3686
+ return props.builderBlock?.id;
3687
+ },
3688
+ path: `component.options.variants.${index}.blocks`
3689
+ }));
3690
+ effect(() => setAttribute(_el$2, "data-variant-id", `${props.builderBlock?.id}-${index}`));
3691
+ return _el$2;
3692
+ })();
3693
+ }
3694
+ }), createComponent(inlined_styles_default, {
3695
+ get nonce() {
3696
+ return props.builderContext?.nonce || "";
3697
+ },
3698
+ get styles() {
3699
+ return hideVariantsStyleString();
3700
+ },
3701
+ get id() {
3702
+ return `variants-styles-${props.builderBlock?.id}`;
3703
+ }
3704
+ }), createComponent(inlined_script_default, {
3705
+ get nonce() {
3706
+ return props.builderContext?.nonce || "";
3707
+ },
3708
+ get scriptStr() {
3709
+ return scriptStr();
3710
+ },
3711
+ get id() {
3712
+ return `variants-script-${props.builderBlock?.id}`;
3713
+ }
3714
+ })];
3715
+ }
3716
+ }), null);
3717
+ insert(_el$, createComponent(blocks_default, {
3718
+ get blocks() {
3719
+ return blocksToRender().blocks;
3720
+ },
3721
+ get parent() {
3722
+ return props.builderBlock?.id;
3723
+ },
3724
+ get path() {
3725
+ return blocksToRender().path;
3726
+ }
3727
+ }), null);
3728
+ return _el$;
3729
+ })();
3730
+ }
3731
+ var personalization_container_default = PersonalizationContainer;
3732
+
3733
+ // src/blocks/section/component-info.ts
3734
+ var componentInfo7 = {
3259
3735
  name: "Core:Section",
3260
3736
  static: true,
3261
3737
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -3297,7 +3773,7 @@ var componentInfo6 = {
3297
3773
  };
3298
3774
 
3299
3775
  // src/blocks/slot/component-info.ts
3300
- var componentInfo7 = {
3776
+ var componentInfo8 = {
3301
3777
  name: "Slot",
3302
3778
  isRSC: true,
3303
3779
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -3315,10 +3791,10 @@ var componentInfo7 = {
3315
3791
  builderComponents: true
3316
3792
  }
3317
3793
  };
3318
- var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
3794
+ var _tmpl$10 = /* @__PURE__ */ template(`<div>`);
3319
3795
  function Slot(props) {
3320
3796
  return (() => {
3321
- const _el$ = _tmpl$8();
3797
+ const _el$ = _tmpl$10();
3322
3798
  _el$.style.setProperty("pointer-events", "auto");
3323
3799
  spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
3324
3800
  "builder-slot": props.name
@@ -3346,7 +3822,7 @@ function Slot(props) {
3346
3822
  var slot_default = Slot;
3347
3823
 
3348
3824
  // src/blocks/symbol/component-info.ts
3349
- var componentInfo8 = {
3825
+ var componentInfo9 = {
3350
3826
  name: "Symbol",
3351
3827
  noWrap: true,
3352
3828
  static: true,
@@ -3428,7 +3904,7 @@ var defaultElement = {
3428
3904
  }
3429
3905
  }
3430
3906
  };
3431
- var componentInfo9 = {
3907
+ var componentInfo10 = {
3432
3908
  name: "Builder: Tabs",
3433
3909
  inputs: [{
3434
3910
  name: "tabs",
@@ -3532,8 +4008,8 @@ var componentInfo9 = {
3532
4008
  builderLinkComponent: true
3533
4009
  }
3534
4010
  };
3535
- var _tmpl$9 = /* @__PURE__ */ template(`<div>`);
3536
- var _tmpl$25 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
4011
+ var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
4012
+ var _tmpl$26 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
3537
4013
  var _tmpl$33 = /* @__PURE__ */ template(`<span>`);
3538
4014
  function Tabs(props) {
3539
4015
  const [activeTab, setActiveTab] = createSignal(props.defaultActiveTab ? props.defaultActiveTab - 1 : 0);
@@ -3548,7 +4024,7 @@ function Tabs(props) {
3548
4024
  }
3549
4025
  }
3550
4026
  return (() => {
3551
- const _el$ = _tmpl$25(), _el$2 = _el$.firstChild;
4027
+ const _el$ = _tmpl$26(), _el$2 = _el$.firstChild;
3552
4028
  _el$2.style.setProperty("display", "flex");
3553
4029
  _el$2.style.setProperty("flex-direction", "row");
3554
4030
  _el$2.style.setProperty("overflow", "auto");
@@ -3600,7 +4076,7 @@ function Tabs(props) {
3600
4076
  return activeTabContent(activeTab());
3601
4077
  },
3602
4078
  get children() {
3603
- const _el$3 = _tmpl$9();
4079
+ const _el$3 = _tmpl$11();
3604
4080
  insert(_el$3, createComponent(blocks_default, {
3605
4081
  get parent() {
3606
4082
  return props.builderBlock.id;
@@ -3632,7 +4108,7 @@ var tabs_default = Tabs;
3632
4108
  delegateEvents(["click"]);
3633
4109
 
3634
4110
  // src/blocks/text/component-info.ts
3635
- var componentInfo10 = {
4111
+ var componentInfo11 = {
3636
4112
  shouldReceiveBuilderProps: {
3637
4113
  builderBlock: TARGET === "reactNative" ? true : false,
3638
4114
  builderContext: true
@@ -3655,10 +4131,10 @@ var componentInfo10 = {
3655
4131
  textAlign: "center"
3656
4132
  }
3657
4133
  };
3658
- var _tmpl$10 = /* @__PURE__ */ template(`<div class=builder-text>`);
4134
+ var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-text>`);
3659
4135
  function Text(props) {
3660
4136
  return (() => {
3661
- const _el$ = _tmpl$10();
4137
+ const _el$ = _tmpl$12();
3662
4138
  _el$.style.setProperty("outline", "none");
3663
4139
  effect(() => _el$.innerHTML = props.text?.toString() || "");
3664
4140
  return _el$;
@@ -3667,7 +4143,7 @@ function Text(props) {
3667
4143
  var text_default = Text;
3668
4144
 
3669
4145
  // src/blocks/custom-code/component-info.ts
3670
- var componentInfo11 = {
4146
+ var componentInfo12 = {
3671
4147
  name: "Custom Code",
3672
4148
  static: true,
3673
4149
  requiredPermissions: ["editCode"],
@@ -3690,7 +4166,7 @@ var componentInfo11 = {
3690
4166
  advanced: true
3691
4167
  }]
3692
4168
  };
3693
- var _tmpl$11 = /* @__PURE__ */ template(`<div>`);
4169
+ var _tmpl$13 = /* @__PURE__ */ template(`<div>`);
3694
4170
  function CustomCode(props) {
3695
4171
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
3696
4172
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -3725,7 +4201,7 @@ function CustomCode(props) {
3725
4201
  }
3726
4202
  });
3727
4203
  return (() => {
3728
- const _el$ = _tmpl$11();
4204
+ const _el$ = _tmpl$13();
3729
4205
  const _ref$ = elementRef;
3730
4206
  typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
3731
4207
  effect((_p$) => {
@@ -3743,7 +4219,7 @@ function CustomCode(props) {
3743
4219
  var custom_code_default = CustomCode;
3744
4220
 
3745
4221
  // src/blocks/embed/component-info.ts
3746
- var componentInfo12 = {
4222
+ var componentInfo13 = {
3747
4223
  name: "Embed",
3748
4224
  static: true,
3749
4225
  inputs: [{
@@ -3765,7 +4241,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
3765
4241
  var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
3766
4242
 
3767
4243
  // src/blocks/embed/embed.tsx
3768
- var _tmpl$12 = /* @__PURE__ */ template(`<div class=builder-embed>`);
4244
+ var _tmpl$14 = /* @__PURE__ */ template(`<div class=builder-embed>`);
3769
4245
  function Embed(props) {
3770
4246
  const [scriptsInserted, setScriptsInserted] = createSignal([]);
3771
4247
  const [scriptsRun, setScriptsRun] = createSignal([]);
@@ -3803,7 +4279,7 @@ function Embed(props) {
3803
4279
  }
3804
4280
  createEffect(on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0));
3805
4281
  return (() => {
3806
- const _el$ = _tmpl$12();
4282
+ const _el$ = _tmpl$14();
3807
4283
  const _ref$ = elem;
3808
4284
  typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
3809
4285
  effect(() => _el$.innerHTML = props.content);
@@ -3813,7 +4289,7 @@ function Embed(props) {
3813
4289
  var embed_default = Embed;
3814
4290
 
3815
4291
  // src/blocks/form/form/component-info.ts
3816
- var componentInfo13 = {
4292
+ var componentInfo14 = {
3817
4293
  name: "Form:Form",
3818
4294
  // editableTags: ['builder-form-error']
3819
4295
  defaults: {
@@ -4069,8 +4545,8 @@ function logFetch(url) {
4069
4545
  }
4070
4546
 
4071
4547
  // src/blocks/form/form/form.tsx
4072
- var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-04a43b72">`);
4073
- var _tmpl$26 = /* @__PURE__ */ template(`<form>`);
4548
+ var _tmpl$15 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-04a43b72">`);
4549
+ var _tmpl$27 = /* @__PURE__ */ template(`<form>`);
4074
4550
  var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-04a43b72 {
4075
4551
  padding: 10px;
4076
4552
  color: red;
@@ -4263,7 +4739,7 @@ function FormComponent(props) {
4263
4739
  }
4264
4740
  let formRef;
4265
4741
  return [(() => {
4266
- const _el$ = _tmpl$26();
4742
+ const _el$ = _tmpl$27();
4267
4743
  _el$.addEventListener("submit", (event) => onSubmit(event));
4268
4744
  const _ref$ = formRef;
4269
4745
  typeof _ref$ === "function" ? use(_ref$, _el$) : formRef = _el$;
@@ -4319,7 +4795,7 @@ function FormComponent(props) {
4319
4795
  return memo(() => submissionState() === "error")() && responseData();
4320
4796
  },
4321
4797
  get children() {
4322
- const _el$2 = _tmpl$13();
4798
+ const _el$2 = _tmpl$15();
4323
4799
  insert(_el$2, () => JSON.stringify(responseData(), null, 2));
4324
4800
  return _el$2;
4325
4801
  }
@@ -4346,7 +4822,7 @@ function FormComponent(props) {
4346
4822
  var form_default = FormComponent;
4347
4823
 
4348
4824
  // src/blocks/form/input/component-info.ts
4349
- var componentInfo14 = {
4825
+ var componentInfo15 = {
4350
4826
  name: "Form:Input",
4351
4827
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
4352
4828
  inputs: [
@@ -4398,10 +4874,10 @@ var componentInfo14 = {
4398
4874
  borderColor: "#ccc"
4399
4875
  }
4400
4876
  };
4401
- var _tmpl$14 = /* @__PURE__ */ template(`<input>`);
4877
+ var _tmpl$16 = /* @__PURE__ */ template(`<input>`);
4402
4878
  function FormInputComponent(props) {
4403
4879
  return (() => {
4404
- const _el$ = _tmpl$14();
4880
+ const _el$ = _tmpl$16();
4405
4881
  spread(_el$, mergeProps({}, () => props.attributes, {
4406
4882
  get key() {
4407
4883
  return isEditing() && props.defaultValue ? props.defaultValue : "default-key";
@@ -4431,7 +4907,7 @@ function FormInputComponent(props) {
4431
4907
  var input_default = FormInputComponent;
4432
4908
 
4433
4909
  // src/blocks/form/select/component-info.ts
4434
- var componentInfo15 = {
4910
+ var componentInfo16 = {
4435
4911
  name: "Form:Select",
4436
4912
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
4437
4913
  defaultStyles: {
@@ -4474,11 +4950,11 @@ var componentInfo15 = {
4474
4950
  static: true,
4475
4951
  noWrap: true
4476
4952
  };
4477
- var _tmpl$15 = /* @__PURE__ */ template(`<select>`);
4478
- var _tmpl$27 = /* @__PURE__ */ template(`<option>`);
4953
+ var _tmpl$17 = /* @__PURE__ */ template(`<select>`);
4954
+ var _tmpl$28 = /* @__PURE__ */ template(`<option>`);
4479
4955
  function SelectComponent(props) {
4480
4956
  return (() => {
4481
- const _el$ = _tmpl$15();
4957
+ const _el$ = _tmpl$17();
4482
4958
  spread(_el$, mergeProps({}, () => props.attributes, {
4483
4959
  get value() {
4484
4960
  return props.value;
@@ -4503,7 +4979,7 @@ function SelectComponent(props) {
4503
4979
  children: (option, _index) => {
4504
4980
  const index = _index();
4505
4981
  return (() => {
4506
- const _el$2 = _tmpl$27();
4982
+ const _el$2 = _tmpl$28();
4507
4983
  insert(_el$2, () => option.name || option.value);
4508
4984
  effect(() => setAttribute(_el$2, "key", `${option.name}-${index}`));
4509
4985
  effect(() => _el$2.value = option.value);
@@ -4517,7 +4993,7 @@ function SelectComponent(props) {
4517
4993
  var select_default = SelectComponent;
4518
4994
 
4519
4995
  // src/blocks/form/submit-button/component-info.ts
4520
- var componentInfo16 = {
4996
+ var componentInfo17 = {
4521
4997
  name: "Form:SubmitButton",
4522
4998
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
4523
4999
  defaultStyles: {
@@ -4543,10 +5019,10 @@ var componentInfo16 = {
4543
5019
  // TODO: defaultChildren
4544
5020
  // canHaveChildren: true,
4545
5021
  };
4546
- var _tmpl$16 = /* @__PURE__ */ template(`<button type=submit>`);
5022
+ var _tmpl$18 = /* @__PURE__ */ template(`<button type=submit>`);
4547
5023
  function SubmitButton(props) {
4548
5024
  return (() => {
4549
- const _el$ = _tmpl$16();
5025
+ const _el$ = _tmpl$18();
4550
5026
  spread(_el$, mergeProps({}, () => props.attributes), false, true);
4551
5027
  insert(_el$, () => props.text);
4552
5028
  return _el$;
@@ -4555,7 +5031,7 @@ function SubmitButton(props) {
4555
5031
  var submit_button_default = SubmitButton;
4556
5032
 
4557
5033
  // src/blocks/form/textarea/component-info.ts
4558
- var componentInfo17 = {
5034
+ var componentInfo18 = {
4559
5035
  name: "Form:TextArea",
4560
5036
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Ff74a2f3de58c4c3e939204e5b6b8f6c3",
4561
5037
  inputs: [{
@@ -4592,10 +5068,10 @@ var componentInfo17 = {
4592
5068
  static: true,
4593
5069
  noWrap: true
4594
5070
  };
4595
- var _tmpl$17 = /* @__PURE__ */ template(`<textarea>`);
5071
+ var _tmpl$19 = /* @__PURE__ */ template(`<textarea>`);
4596
5072
  function Textarea(props) {
4597
5073
  return (() => {
4598
- const _el$ = _tmpl$17();
5074
+ const _el$ = _tmpl$19();
4599
5075
  spread(_el$, mergeProps({}, () => props.attributes, {
4600
5076
  get placeholder() {
4601
5077
  return props.placeholder;
@@ -4619,7 +5095,7 @@ function Textarea(props) {
4619
5095
  var textarea_default = Textarea;
4620
5096
 
4621
5097
  // src/blocks/img/component-info.ts
4622
- var componentInfo18 = {
5098
+ var componentInfo19 = {
4623
5099
  // friendlyName?
4624
5100
  name: "Raw:Img",
4625
5101
  hideFromInsertMenu: true,
@@ -4634,10 +5110,10 @@ var componentInfo18 = {
4634
5110
  noWrap: true,
4635
5111
  static: true
4636
5112
  };
4637
- var _tmpl$18 = /* @__PURE__ */ template(`<img>`);
5113
+ var _tmpl$20 = /* @__PURE__ */ template(`<img>`);
4638
5114
  function ImgComponent(props) {
4639
5115
  return (() => {
4640
- const _el$ = _tmpl$18();
5116
+ const _el$ = _tmpl$20();
4641
5117
  spread(_el$, mergeProps({
4642
5118
  get style() {
4643
5119
  return {
@@ -4661,7 +5137,7 @@ function ImgComponent(props) {
4661
5137
  var img_default = ImgComponent;
4662
5138
 
4663
5139
  // src/blocks/video/component-info.ts
4664
- var componentInfo19 = {
5140
+ var componentInfo20 = {
4665
5141
  name: "Video",
4666
5142
  canHaveChildren: true,
4667
5143
  defaultStyles: {
@@ -4746,8 +5222,8 @@ var componentInfo19 = {
4746
5222
  builderBlock: true
4747
5223
  }
4748
5224
  };
4749
- var _tmpl$19 = /* @__PURE__ */ template(`<source type=video/mp4>`);
4750
- var _tmpl$28 = /* @__PURE__ */ template(`<div>`);
5225
+ var _tmpl$21 = /* @__PURE__ */ template(`<source type=video/mp4>`);
5226
+ var _tmpl$29 = /* @__PURE__ */ template(`<div>`);
4751
5227
  var _tmpl$35 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
4752
5228
  function Video(props) {
4753
5229
  const videoProps = createMemo(() => {
@@ -4808,7 +5284,7 @@ function Video(props) {
4808
5284
  return !props.lazyLoad;
4809
5285
  },
4810
5286
  get children() {
4811
- const _el$3 = _tmpl$19();
5287
+ const _el$3 = _tmpl$21();
4812
5288
  effect(() => setAttribute(_el$3, "src", props.video));
4813
5289
  return _el$3;
4814
5290
  }
@@ -4818,7 +5294,7 @@ function Video(props) {
4818
5294
  return props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length);
4819
5295
  },
4820
5296
  get children() {
4821
- const _el$4 = _tmpl$28();
5297
+ const _el$4 = _tmpl$29();
4822
5298
  _el$4.style.setProperty("width", "100%");
4823
5299
  _el$4.style.setProperty("pointer-events", "none");
4824
5300
  _el$4.style.setProperty("font-size", "0px");
@@ -4831,7 +5307,7 @@ function Video(props) {
4831
5307
  return props.builderBlock?.children?.length && props.fitContent;
4832
5308
  },
4833
5309
  get children() {
4834
- const _el$5 = _tmpl$28();
5310
+ const _el$5 = _tmpl$29();
4835
5311
  _el$5.style.setProperty("display", "flex");
4836
5312
  _el$5.style.setProperty("flex-direction", "column");
4837
5313
  _el$5.style.setProperty("align-items", "stretch");
@@ -4844,7 +5320,7 @@ function Video(props) {
4844
5320
  return props.builderBlock?.children?.length && !props.fitContent;
4845
5321
  },
4846
5322
  get children() {
4847
- const _el$6 = _tmpl$28();
5323
+ const _el$6 = _tmpl$29();
4848
5324
  _el$6.style.setProperty("pointer-events", "none");
4849
5325
  _el$6.style.setProperty("display", "flex");
4850
5326
  _el$6.style.setProperty("flex-direction", "column");
@@ -4866,31 +5342,31 @@ var video_default = Video;
4866
5342
  // src/constants/extra-components.ts
4867
5343
  var getExtraComponents = () => [{
4868
5344
  component: custom_code_default,
4869
- ...componentInfo11
5345
+ ...componentInfo12
4870
5346
  }, {
4871
5347
  component: embed_default,
4872
- ...componentInfo12
5348
+ ...componentInfo13
4873
5349
  }, ...TARGET === "rsc" ? [] : [{
4874
5350
  component: form_default,
4875
- ...componentInfo13
5351
+ ...componentInfo14
4876
5352
  }, {
4877
5353
  component: input_default,
4878
- ...componentInfo14
5354
+ ...componentInfo15
4879
5355
  }, {
4880
5356
  component: submit_button_default,
4881
- ...componentInfo16
5357
+ ...componentInfo17
4882
5358
  }, {
4883
5359
  component: select_default,
4884
- ...componentInfo15
5360
+ ...componentInfo16
4885
5361
  }, {
4886
5362
  component: textarea_default,
4887
- ...componentInfo17
5363
+ ...componentInfo18
4888
5364
  }], {
4889
5365
  component: img_default,
4890
- ...componentInfo18
5366
+ ...componentInfo19
4891
5367
  }, {
4892
5368
  component: video_default,
4893
- ...componentInfo19
5369
+ ...componentInfo20
4894
5370
  }];
4895
5371
 
4896
5372
  // src/constants/builder-registered-components.ts
@@ -4908,19 +5384,22 @@ var getDefaultRegisteredComponents = () => [{
4908
5384
  ...componentInfo5
4909
5385
  }, {
4910
5386
  component: section_default,
4911
- ...componentInfo6
5387
+ ...componentInfo7
4912
5388
  }, {
4913
5389
  component: slot_default,
4914
- ...componentInfo7
5390
+ ...componentInfo8
4915
5391
  }, {
4916
5392
  component: symbol_default,
4917
- ...componentInfo8
5393
+ ...componentInfo9
4918
5394
  }, {
4919
5395
  component: text_default,
4920
- ...componentInfo10
4921
- }, ...TARGET === "rsc" ? [] : [{
5396
+ ...componentInfo11
5397
+ }, ...TARGET === "react" ? [{
5398
+ component: personalization_container_default,
5399
+ ...componentInfo6
5400
+ }] : [], ...TARGET === "rsc" ? [] : [{
4922
5401
  component: tabs_default,
4923
- ...componentInfo9
5402
+ ...componentInfo10
4924
5403
  }, {
4925
5404
  component: accordion_default,
4926
5405
  ...componentInfo
@@ -4958,7 +5437,7 @@ var getVariants = (content) => Object.values(content?.variations || {}).map((var
4958
5437
  testVariationId: variant.id,
4959
5438
  id: content?.id
4960
5439
  }));
4961
- var checkShouldRenderVariants = ({
5440
+ var checkShouldRenderVariants2 = ({
4962
5441
  canTrack,
4963
5442
  content
4964
5443
  }) => {
@@ -4991,25 +5470,6 @@ var getUpdateVariantVisibilityScript = ({
4991
5470
  }) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
4992
5471
  "${variationId}", "${contentId}", ${isHydrationTarget}
4993
5472
  )`;
4994
- var _tmpl$20 = /* @__PURE__ */ template(`<script>`);
4995
- function InlinedScript(props) {
4996
- return (() => {
4997
- const _el$ = _tmpl$20();
4998
- effect((_p$) => {
4999
- const _v$ = props.scriptStr, _v$2 = props.id, _v$3 = props.nonce || "";
5000
- _v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
5001
- _v$2 !== _p$._v$2 && setAttribute(_el$, "data-id", _p$._v$2 = _v$2);
5002
- _v$3 !== _p$._v$3 && setAttribute(_el$, "nonce", _p$._v$3 = _v$3);
5003
- return _p$;
5004
- }, {
5005
- _v$: void 0,
5006
- _v$2: void 0,
5007
- _v$3: void 0
5008
- });
5009
- return _el$;
5010
- })();
5011
- }
5012
- var inlined_script_default = InlinedScript;
5013
5473
 
5014
5474
  // src/helpers/preview-lru-cache/get.ts
5015
5475
  function getPreviewContent(_searchParams) {
@@ -5017,7 +5477,7 @@ function getPreviewContent(_searchParams) {
5017
5477
  }
5018
5478
 
5019
5479
  // src/constants/sdk-version.ts
5020
- var SDK_VERSION = "3.0.5";
5480
+ var SDK_VERSION = "3.0.7";
5021
5481
 
5022
5482
  // src/helpers/sdk-headers.ts
5023
5483
  var getSdkHeaders = () => ({
@@ -5314,16 +5774,6 @@ async function fetchEntries(options) {
5314
5774
  return _processContentResult(options, content);
5315
5775
  }
5316
5776
 
5317
- // src/functions/is-previewing.ts
5318
- function isPreviewing(_search) {
5319
- const search = _search || (isBrowser() ? window.location.search : void 0);
5320
- if (!search) {
5321
- return false;
5322
- }
5323
- const normalizedSearch = getSearchString(search);
5324
- return Boolean(normalizedSearch.indexOf("builder.preview=") !== -1);
5325
- }
5326
-
5327
5777
  // src/helpers/uuid.ts
5328
5778
  function uuidv4() {
5329
5779
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
@@ -5650,7 +6100,9 @@ var setupBrowserForEditing = (options = {}) => {
5650
6100
  // Supports builder-model="..." attribute which is needed to
5651
6101
  // scope our '+ add block' button styling
5652
6102
  supportsAddBlockScoping: true,
5653
- supportsCustomBreakpoints: true
6103
+ supportsCustomBreakpoints: true,
6104
+ supportsXSmallBreakpoint: TARGET === "reactNative" ? false : true,
6105
+ blockLevelPersonalization: true
5654
6106
  }
5655
6107
  }, "*");
5656
6108
  window.parent?.postMessage({
@@ -6387,7 +6839,7 @@ var content_default = ContentComponent;
6387
6839
 
6388
6840
  // src/components/content-variants/content-variants.tsx
6389
6841
  function ContentVariants(props) {
6390
- const [shouldRenderVariants, setShouldRenderVariants] = createSignal(checkShouldRenderVariants({
6842
+ const [shouldRenderVariants, setShouldRenderVariants] = createSignal(checkShouldRenderVariants2({
6391
6843
  canTrack: getDefaultCanTrack(props.canTrack),
6392
6844
  content: props.content
6393
6845
  }));
@@ -6613,7 +7065,7 @@ var fetchSymbolContent = async ({
6613
7065
  };
6614
7066
 
6615
7067
  // src/blocks/symbol/symbol.tsx
6616
- var _tmpl$21 = /* @__PURE__ */ template(`<div>`);
7068
+ var _tmpl$30 = /* @__PURE__ */ template(`<div>`);
6617
7069
  function Symbol(props) {
6618
7070
  const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
6619
7071
  const blocksWrapper = createMemo(() => {
@@ -6645,7 +7097,7 @@ function Symbol(props) {
6645
7097
  }
6646
7098
  createEffect(on(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
6647
7099
  return (() => {
6648
- const _el$ = _tmpl$21();
7100
+ const _el$ = _tmpl$30();
6649
7101
  spread(_el$, mergeProps({
6650
7102
  get ["class"]() {
6651
7103
  return className();
@@ -6737,4 +7189,4 @@ var fetchBuilderProps = async (_args) => {
6737
7189
  };
6738
7190
  };
6739
7191
 
6740
- export { blocks_default as Blocks, builder_context_default as BuilderContext, button_default as Button, columns_default as Columns, content_variants_default as Content, fragment_default as Fragment, image_default as Image, section_default as Section, symbol_default as Symbol, text_default as Text, video_default as Video, _processContentResult, createRegisterComponentMessage, fetchBuilderProps, fetchEntries, fetchOneEntry, getBuilderSearchParams, isEditing, isPreviewing, register, setEditorSettings, subscribeToEditor, track };
7192
+ export { blocks_default as Blocks, builder_context_default as BuilderContext, button_default as Button, columns_default as Columns, content_variants_default as Content, fragment_default as Fragment, image_default as Image, section_default as Section, symbol_default as Symbol, text_default as Text, video_default as Video, _processContentResult, createRegisterComponentMessage, fetchBuilderProps, fetchEntries, fetchOneEntry, getBuilderSearchParams, isEditing, isPreviewing, register, setClientUserAttributes, setEditorSettings, subscribeToEditor, track };