@builder.io/sdk-react 1.0.28 → 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/lib/browser/blocks-exports.cjs +9 -9
  2. package/lib/browser/blocks-exports.mjs +321 -323
  3. package/lib/browser/index.cjs +1 -1
  4. package/lib/browser/index.mjs +1 -1
  5. package/lib/browser/init.cjs +1 -1
  6. package/lib/browser/init.mjs +1 -1
  7. package/lib/browser/{server-entry-39389b02.cjs → server-entry-29038134.cjs} +1 -1
  8. package/lib/browser/{server-entry-b2b0b732.js → server-entry-99f6be25.js} +1 -1
  9. package/lib/browser/server-entry.cjs +1 -1
  10. package/lib/browser/server-entry.mjs +1 -1
  11. package/lib/edge/{accordion-e074c3c9.js → accordion-a922b6f1.js} +1 -1
  12. package/lib/edge/{accordion-a6b84a1a.cjs → accordion-cf80a119.cjs} +1 -1
  13. package/lib/edge/{blocks-e4a4eaeb.cjs → blocks-0b5854b9.cjs} +1 -1
  14. package/lib/edge/{blocks-bdc7647a.js → blocks-2cd920f9.js} +2 -2
  15. package/lib/edge/blocks-exports.cjs +1 -1
  16. package/lib/edge/blocks-exports.mjs +2 -2
  17. package/lib/edge/{button-4bbf8eb4.cjs → button-2e6cc4b7.cjs} +1 -1
  18. package/lib/edge/{button-01688cf0.js → button-e343aea4.js} +2 -2
  19. package/lib/edge/{columns-790f93f0.js → columns-5db55b04.js} +5 -5
  20. package/lib/edge/{columns-c34d9298.cjs → columns-cf320d97.cjs} +2 -2
  21. package/lib/edge/{content-variants-705d1eae.cjs → content-variants-d7612a4d.cjs} +2 -2
  22. package/lib/edge/{content-variants-843cb1a2.js → content-variants-dd520b38.js} +156 -156
  23. package/lib/edge/form-7248b44c.cjs +1 -0
  24. package/lib/edge/{form-76a1e4e7.js → form-a0093dd2.js} +17 -19
  25. package/lib/edge/{get-class-prop-name-6fd942e6.cjs → get-class-prop-name-890dc6a6.cjs} +1 -1
  26. package/lib/edge/{get-class-prop-name-7cac71a7.js → get-class-prop-name-f14607dc.js} +1 -1
  27. package/lib/edge/{img-630ec97f.cjs → img-960eef70.cjs} +1 -1
  28. package/lib/edge/{img-0d46e11b.js → img-ff2f388e.js} +1 -1
  29. package/lib/edge/index.cjs +1 -1
  30. package/lib/edge/index.mjs +1 -1
  31. package/lib/edge/init.cjs +1 -1
  32. package/lib/edge/init.mjs +1 -1
  33. package/lib/edge/{input-35460b08.js → input-5934355a.js} +1 -1
  34. package/lib/edge/{input-73e27d61.cjs → input-e91374cc.cjs} +1 -1
  35. package/lib/edge/{select-6cf907d7.js → select-298649a8.js} +1 -1
  36. package/lib/edge/{select-a19b35fb.cjs → select-6e9fb36f.cjs} +1 -1
  37. package/lib/edge/{server-entry-043747bd.cjs → server-entry-7feea5b4.cjs} +1 -1
  38. package/lib/edge/{server-entry-0dd5f119.js → server-entry-d8f1ea14.js} +1 -1
  39. package/lib/edge/server-entry.cjs +1 -1
  40. package/lib/edge/server-entry.mjs +1 -1
  41. package/lib/edge/{slot-e0434389.cjs → slot-3a6d243c.cjs} +1 -1
  42. package/lib/edge/{slot-d4235700.js → slot-5676b4f4.js} +3 -3
  43. package/lib/edge/{symbol-e58cb0f1.js → symbol-2df385d5.js} +2 -2
  44. package/lib/edge/{symbol-e0e1a334.cjs → symbol-b5a02759.cjs} +1 -1
  45. package/lib/edge/{tabs-a92bfa51.cjs → tabs-036057d6.cjs} +1 -1
  46. package/lib/edge/{tabs-d5cfc172.js → tabs-c2055821.js} +3 -3
  47. package/lib/node/blocks-exports.cjs +9 -9
  48. package/lib/node/blocks-exports.mjs +322 -324
  49. package/lib/node/index.cjs +1 -1
  50. package/lib/node/index.mjs +2 -2
  51. package/lib/node/init.cjs +1 -1
  52. package/lib/node/init.mjs +2 -2
  53. package/lib/node/{node-runtime-ee646b73.cjs → node-runtime-4dbd8a34.cjs} +1 -1
  54. package/lib/node/{node-runtime-29789d59.js → node-runtime-502f7164.js} +1 -1
  55. package/lib/node/{server-entry-1111c8d8.cjs → server-entry-4c4c63b3.cjs} +1 -1
  56. package/lib/node/{server-entry-0cd65827.js → server-entry-95efff43.js} +1 -1
  57. package/lib/node/server-entry.cjs +1 -1
  58. package/lib/node/server-entry.mjs +1 -1
  59. package/package.json +3 -3
  60. package/types/constants/sdk-version.d.ts +1 -1
  61. package/lib/edge/form-41fb03d8.cjs +0 -1
@@ -3,7 +3,7 @@ var Ke = Object.defineProperty;
3
3
  var qe = (e, t, n) => t in e ? Ke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
4
  var ie = (e, t, n) => (qe(e, typeof t != "symbol" ? t + "" : t, n), n);
5
5
  import { jsx as s, Fragment as E, jsxs as V } from "react/jsx-runtime";
6
- import { TARGET as _, isEditing as $, isBrowser as M, getUserAttributes as _e, checkIsDefined as G, logger as Z, fastClone as de, registerInsertMenu as ze, setupBrowserForEditing as Je, createRegisterComponentMessage as Ye, getDefaultCanTrack as Q, _track as he, isPreviewing as Ge, fetchOneEntry as we, createEditorListener as Qe, fetch as Xe, serializeComponentInfo as ge, handleABTestingSync as Ze } from "./server-entry-b2b0b732.js";
6
+ import { TARGET as _, isEditing as $, isBrowser as M, getUserAttributes as _e, checkIsDefined as G, logger as Z, fastClone as de, registerInsertMenu as ze, setupBrowserForEditing as Je, createRegisterComponentMessage as Ye, getDefaultCanTrack as Q, _track as he, isPreviewing as Ge, fetchOneEntry as we, createEditorListener as Qe, fetch as Xe, serializeComponentInfo as ge, handleABTestingSync as Ze } from "./server-entry-99f6be25.js";
7
7
  import { createContext as Ee, useState as C, useEffect as P, useContext as be, useRef as ee, createElement as Re } from "react";
8
8
  const et = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), tt = (e) => typeof e == "string" && et.has(e.toLowerCase());
9
9
  function ue(e) {
@@ -526,7 +526,7 @@ function kt(e) {
526
526
  return G(i.hide) ? !i.hide : G(i.show) ? i.show : !0;
527
527
  }
528
528
  function n() {
529
- var S, R, B;
529
+ var x, R, B;
530
530
  const i = X({
531
531
  block: e.block,
532
532
  localState: e.context.localState,
@@ -535,7 +535,7 @@ function kt(e) {
535
535
  context: e.context.context,
536
536
  shouldEvaluateBindings: !0
537
537
  }), o = i.responsiveStyles, r = e.context.content, a = Le(
538
- ((S = r == null ? void 0 : r.meta) == null ? void 0 : S.breakpoints) || {}
538
+ ((x = r == null ? void 0 : r.meta) == null ? void 0 : x.breakpoints) || {}
539
539
  ), l = o == null ? void 0 : o.large, c = o == null ? void 0 : o.medium, u = o == null ? void 0 : o.small, f = i.id;
540
540
  if (!f)
541
541
  return "";
@@ -1037,7 +1037,7 @@ function Wt(e) {
1037
1037
  })
1038
1038
  };
1039
1039
  }
1040
- function S(v) {
1040
+ function x(v) {
1041
1041
  var W, b;
1042
1042
  return Le(
1043
1043
  ((b = (W = e.builderContext.content) == null ? void 0 : W.meta) == null ? void 0 : b.breakpoints) || {}
@@ -1045,7 +1045,7 @@ function Wt(e) {
1045
1045
  }
1046
1046
  function R() {
1047
1047
  return `
1048
- @media (max-width: ${S("medium")}px) {
1048
+ @media (max-width: ${x("medium")}px) {
1049
1049
  .${e.builderBlock.id}-breakpoints {
1050
1050
  flex-direction: var(--flex-dir-tablet);
1051
1051
  align-items: stretch;
@@ -1057,7 +1057,7 @@ function Wt(e) {
1057
1057
  }
1058
1058
  }
1059
1059
 
1060
- @media (max-width: ${S("small")}px) {
1060
+ @media (max-width: ${x("small")}px) {
1061
1061
  .${e.builderBlock.id}-breakpoints {
1062
1062
  flex-direction: var(--flex-dir);
1063
1063
  align-items: stretch;
@@ -1083,7 +1083,7 @@ function Wt(e) {
1083
1083
  /* @__PURE__ */ V(
1084
1084
  "div",
1085
1085
  {
1086
- className: Nt((A = e.builderBlock) == null ? void 0 : A.id) + " div-00cb97e2",
1086
+ className: Nt((A = e.builderBlock) == null ? void 0 : A.id) + " div-bade6b34",
1087
1087
  style: p(),
1088
1088
  children: [
1089
1089
  /* @__PURE__ */ s(ne, { id: "builderio-columns", styles: R() }),
@@ -1113,7 +1113,7 @@ function Wt(e) {
1113
1113
  ]
1114
1114
  }
1115
1115
  ),
1116
- /* @__PURE__ */ s("style", { children: `.div-00cb97e2 {
1116
+ /* @__PURE__ */ s("style", { children: `.div-bade6b34 {
1117
1117
  display: flex;
1118
1118
  line-height: normal;
1119
1119
  }` })
@@ -1256,7 +1256,249 @@ function Ot(e) {
1256
1256
  }
1257
1257
  );
1258
1258
  }
1259
- const jt = {
1259
+ const ae = {
1260
+ "@type": "@builder.io/sdk:Element",
1261
+ layerName: "Accordion item title",
1262
+ responsiveStyles: {
1263
+ large: {
1264
+ marginTop: "10px",
1265
+ position: "relative",
1266
+ display: "flex",
1267
+ alignItems: "stretch",
1268
+ flexDirection: "column",
1269
+ paddingBottom: "10px"
1270
+ }
1271
+ },
1272
+ children: [{
1273
+ "@type": "@builder.io/sdk:Element",
1274
+ responsiveStyles: {
1275
+ large: {
1276
+ textAlign: "left",
1277
+ display: "flex",
1278
+ flexDirection: "column"
1279
+ }
1280
+ },
1281
+ component: {
1282
+ name: "Text",
1283
+ options: {
1284
+ text: "I am an accordion title. Click me!"
1285
+ }
1286
+ }
1287
+ }]
1288
+ }, re = {
1289
+ "@type": "@builder.io/sdk:Element",
1290
+ layerName: "Accordion item detail",
1291
+ responsiveStyles: {
1292
+ large: {
1293
+ position: "relative",
1294
+ display: "flex",
1295
+ alignItems: "stretch",
1296
+ flexDirection: "column",
1297
+ marginTop: "10px",
1298
+ paddingBottom: "10px"
1299
+ }
1300
+ },
1301
+ children: [{
1302
+ "@type": "@builder.io/sdk:Element",
1303
+ responsiveStyles: {
1304
+ large: {
1305
+ paddingTop: "50px",
1306
+ textAlign: "left",
1307
+ display: "flex",
1308
+ flexDirection: "column",
1309
+ paddingBottom: "50px"
1310
+ }
1311
+ },
1312
+ component: {
1313
+ name: "Text",
1314
+ options: {
1315
+ text: "I am an accordion detail, hello!"
1316
+ }
1317
+ }
1318
+ }]
1319
+ }, jt = {
1320
+ name: "Builder:Accordion",
1321
+ canHaveChildren: !0,
1322
+ image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
1323
+ defaultStyles: {
1324
+ display: "flex",
1325
+ flexDirection: "column",
1326
+ alignItems: "stretch"
1327
+ },
1328
+ inputs: [{
1329
+ name: "items",
1330
+ type: "list",
1331
+ broadcast: !0,
1332
+ subFields: [{
1333
+ name: "title",
1334
+ type: "uiBlocks",
1335
+ hideFromUI: !0,
1336
+ defaultValue: [ae]
1337
+ }, {
1338
+ name: "detail",
1339
+ type: "uiBlocks",
1340
+ hideFromUI: !0,
1341
+ defaultValue: [re]
1342
+ }],
1343
+ defaultValue: [{
1344
+ title: [ae],
1345
+ detail: [re]
1346
+ }, {
1347
+ title: [ae],
1348
+ detail: [re]
1349
+ }],
1350
+ showIf: (e) => !e.get("useChildrenForItems")
1351
+ }, {
1352
+ name: "oneAtATime",
1353
+ helperText: "Only allow opening one at a time (collapse all others when new item openned)",
1354
+ type: "boolean",
1355
+ defaultValue: !1
1356
+ }, {
1357
+ name: "grid",
1358
+ helperText: "Display as a grid",
1359
+ type: "boolean",
1360
+ defaultValue: !1
1361
+ }, {
1362
+ name: "gridRowWidth",
1363
+ helperText: "Display as a grid",
1364
+ type: "string",
1365
+ showIf: (e) => e.get("grid"),
1366
+ defaultValue: "25%"
1367
+ }, {
1368
+ name: "useChildrenForItems",
1369
+ type: "boolean",
1370
+ helperText: "Use child elements for each slide, instead of the array. Useful for dynamically repeating items",
1371
+ advanced: !0,
1372
+ defaultValue: !1,
1373
+ onChange: (e) => {
1374
+ e.get("useChildrenForItems") === !0 && e.set("items", []);
1375
+ }
1376
+ }]
1377
+ }, ve = (e) => e.toString();
1378
+ function Ut(e) {
1379
+ var d;
1380
+ const [t, n] = C(() => []);
1381
+ function i() {
1382
+ return !!(e.grid || e.oneAtATime);
1383
+ }
1384
+ function o() {
1385
+ return {
1386
+ display: "flex",
1387
+ alignItems: "stretch",
1388
+ flexDirection: "column",
1389
+ ...e.grid && {
1390
+ flexDirection: "row",
1391
+ alignItems: "flex-start",
1392
+ flexWrap: "wrap"
1393
+ }
1394
+ };
1395
+ }
1396
+ function r() {
1397
+ const g = {
1398
+ ...{
1399
+ display: "flex",
1400
+ flexDirection: "column"
1401
+ },
1402
+ alignItems: "stretch",
1403
+ cursor: "pointer"
1404
+ };
1405
+ return Object.fromEntries(
1406
+ Object.entries(g).filter(([p, I]) => I !== void 0)
1407
+ );
1408
+ }
1409
+ function a(m) {
1410
+ return `builder-accordion-title builder-accordion-title-${t.includes(m) ? "open" : "closed"}`;
1411
+ }
1412
+ function l(m) {
1413
+ return `builder-accordion-detail builder-accordion-detail-${t.includes(m) ? "open" : "closed"}`;
1414
+ }
1415
+ function c() {
1416
+ let m = null;
1417
+ if (e.grid && t.length && document) {
1418
+ const p = t[0];
1419
+ let x = document.querySelector(
1420
+ `.builder-accordion-title[data-index="${p}"]`
1421
+ );
1422
+ if (m = p, x) {
1423
+ let R = x.getBoundingClientRect();
1424
+ for (; x = x && x.nextElementSibling; )
1425
+ if (x) {
1426
+ if (x.classList.contains("builder-accordion-detail"))
1427
+ continue;
1428
+ const B = x.getBoundingClientRect();
1429
+ if (B.left > R.left) {
1430
+ const A = parseInt(
1431
+ x.getAttribute("data-index") || "",
1432
+ 10
1433
+ );
1434
+ isNaN(A) || (R = B, m = A);
1435
+ } else
1436
+ break;
1437
+ }
1438
+ }
1439
+ }
1440
+ return typeof m == "number" && (m = m + 1), m;
1441
+ }
1442
+ function u() {
1443
+ const m = {
1444
+ order: typeof c() == "number" ? c() : void 0,
1445
+ ...e.grid && {
1446
+ width: "100%"
1447
+ }
1448
+ };
1449
+ return Object.fromEntries(
1450
+ Object.entries(m).filter(([g, p]) => p !== void 0)
1451
+ );
1452
+ }
1453
+ function f(m) {
1454
+ t.includes(m) ? n(i() ? [] : t.filter((g) => g !== m)) : n(i() ? [m] : t.concat(m));
1455
+ }
1456
+ return /* @__PURE__ */ s("div", { className: "builder-accordion", style: o(), children: (d = e.items) == null ? void 0 : d.map((m, g) => /* @__PURE__ */ V(E, { children: [
1457
+ /* @__PURE__ */ s(
1458
+ "div",
1459
+ {
1460
+ className: a(g),
1461
+ style: {
1462
+ ...r(),
1463
+ width: e.grid ? e.gridRowWidth : void 0,
1464
+ order: c() !== null ? ve(g) : ve(g + 1)
1465
+ },
1466
+ "data-index": g,
1467
+ onClick: (p) => f(g),
1468
+ children: /* @__PURE__ */ s(
1469
+ D,
1470
+ {
1471
+ blocks: m.title,
1472
+ path: `items.${g}.title`,
1473
+ parent: e.builderBlock.id,
1474
+ context: e.builderContext,
1475
+ registeredComponents: e.builderComponents,
1476
+ linkComponent: e.builderLinkComponent
1477
+ }
1478
+ )
1479
+ }
1480
+ ),
1481
+ t.includes(g) ? /* @__PURE__ */ s(
1482
+ "div",
1483
+ {
1484
+ className: l(g),
1485
+ style: u(),
1486
+ children: /* @__PURE__ */ s(
1487
+ D,
1488
+ {
1489
+ blocks: m.detail,
1490
+ path: `items.${g}.detail`,
1491
+ parent: e.builderBlock.id,
1492
+ context: e.builderContext,
1493
+ registeredComponents: e.builderComponents,
1494
+ linkComponent: e.builderLinkComponent
1495
+ }
1496
+ )
1497
+ }
1498
+ ) : null
1499
+ ] })) });
1500
+ }
1501
+ const Mt = {
1260
1502
  name: "Core:Button",
1261
1503
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
1262
1504
  defaultStyles: {
@@ -1289,7 +1531,7 @@ const jt = {
1289
1531
  }],
1290
1532
  static: !0,
1291
1533
  noWrap: !0
1292
- }, Ut = {
1534
+ }, Ht = {
1293
1535
  // TODO: ways to statically preprocess JSON for references, functions, etc
1294
1536
  name: "Columns",
1295
1537
  isRSC: !0,
@@ -1490,13 +1732,13 @@ const jt = {
1490
1732
  helperText: "When stacking columns for mobile devices, reverse the ordering",
1491
1733
  advanced: !0
1492
1734
  }]
1493
- }, Mt = {
1735
+ }, Kt = {
1494
1736
  name: "Fragment",
1495
1737
  static: !0,
1496
1738
  hidden: !0,
1497
1739
  canHaveChildren: !0,
1498
1740
  noWrap: !0
1499
- }, Ht = {
1741
+ }, qt = {
1500
1742
  name: "Image",
1501
1743
  static: !0,
1502
1744
  image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
@@ -1596,7 +1838,7 @@ const jt = {
1596
1838
  advanced: !0,
1597
1839
  defaultValue: 0.7041
1598
1840
  }]
1599
- }, Kt = {
1841
+ }, _t = {
1600
1842
  name: "Core:Section",
1601
1843
  static: !0,
1602
1844
  image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
@@ -1635,7 +1877,7 @@ const jt = {
1635
1877
  }
1636
1878
  }
1637
1879
  }]
1638
- }, qt = {
1880
+ }, zt = {
1639
1881
  name: "Slot",
1640
1882
  isRSC: !0,
1641
1883
  description: "Allow child blocks to be inserted into this content when used as a Symbol",
@@ -1649,7 +1891,7 @@ const jt = {
1649
1891
  defaultValue: "children"
1650
1892
  }]
1651
1893
  };
1652
- function _t(e) {
1894
+ function Jt(e) {
1653
1895
  var t, n, i;
1654
1896
  return /* @__PURE__ */ s(
1655
1897
  "div",
@@ -1672,7 +1914,7 @@ function _t(e) {
1672
1914
  }
1673
1915
  );
1674
1916
  }
1675
- const zt = {
1917
+ const Yt = {
1676
1918
  name: "Symbol",
1677
1919
  noWrap: !0,
1678
1920
  static: !0,
@@ -1705,7 +1947,7 @@ const zt = {
1705
1947
  hideFromUI: !0,
1706
1948
  type: "boolean"
1707
1949
  }]
1708
- }, ae = {
1950
+ }, le = {
1709
1951
  "@type": "@builder.io/sdk:Element",
1710
1952
  responsiveStyles: {
1711
1953
  large: {
@@ -1727,7 +1969,7 @@ const zt = {
1727
1969
  text: "New tab"
1728
1970
  }
1729
1971
  }
1730
- }, re = {
1972
+ }, se = {
1731
1973
  "@type": "@builder.io/sdk:Element",
1732
1974
  responsiveStyles: {
1733
1975
  large: {
@@ -1743,7 +1985,7 @@ const zt = {
1743
1985
  text: "New tab content "
1744
1986
  }
1745
1987
  }
1746
- }, Jt = {
1988
+ }, Gt = {
1747
1989
  name: "Builder: Tabs",
1748
1990
  inputs: [{
1749
1991
  name: "tabs",
@@ -1753,16 +1995,16 @@ const zt = {
1753
1995
  name: "label",
1754
1996
  type: "uiBlocks",
1755
1997
  hideFromUI: !0,
1756
- defaultValue: [ae]
1998
+ defaultValue: [le]
1757
1999
  }, {
1758
2000
  name: "content",
1759
2001
  type: "uiBlocks",
1760
2002
  hideFromUI: !0,
1761
- defaultValue: [re]
2003
+ defaultValue: [se]
1762
2004
  }],
1763
2005
  defaultValue: [{
1764
2006
  label: [{
1765
- ...ae,
2007
+ ...le,
1766
2008
  component: {
1767
2009
  name: "Text",
1768
2010
  options: {
@@ -1771,7 +2013,7 @@ const zt = {
1771
2013
  }
1772
2014
  }],
1773
2015
  content: [{
1774
- ...re,
2016
+ ...se,
1775
2017
  component: {
1776
2018
  name: "Text",
1777
2019
  options: {
@@ -1781,7 +2023,7 @@ const zt = {
1781
2023
  }]
1782
2024
  }, {
1783
2025
  label: [{
1784
- ...ae,
2026
+ ...le,
1785
2027
  component: {
1786
2028
  name: "Text",
1787
2029
  options: {
@@ -1790,7 +2032,7 @@ const zt = {
1790
2032
  }
1791
2033
  }],
1792
2034
  content: [{
1793
- ...re,
2035
+ ...se,
1794
2036
  component: {
1795
2037
  name: "Text",
1796
2038
  options: {
@@ -1841,7 +2083,7 @@ const zt = {
1841
2083
  }]
1842
2084
  }]
1843
2085
  };
1844
- function Yt(e) {
2086
+ function Qt(e) {
1845
2087
  var r;
1846
2088
  const [t, n] = C(
1847
2089
  () => e.defaultActiveTab ? e.defaultActiveTab - 1 : 0
@@ -1900,7 +2142,7 @@ function Yt(e) {
1900
2142
  ) }) : null
1901
2143
  ] });
1902
2144
  }
1903
- const Gt = {
2145
+ const Xt = {
1904
2146
  name: "Text",
1905
2147
  static: !0,
1906
2148
  isRSC: !0,
@@ -1919,7 +2161,7 @@ const Gt = {
1919
2161
  textAlign: "center"
1920
2162
  }
1921
2163
  };
1922
- function Qt(e) {
2164
+ function Zt(e) {
1923
2165
  var t;
1924
2166
  return /* @__PURE__ */ s(
1925
2167
  "div",
@@ -1932,249 +2174,7 @@ function Qt(e) {
1932
2174
  }
1933
2175
  );
1934
2176
  }
1935
- const ve = (e) => e.toString();
1936
- function Xt(e) {
1937
- var d;
1938
- const [t, n] = C(() => []);
1939
- function i() {
1940
- return !!(e.grid || e.oneAtATime);
1941
- }
1942
- function o() {
1943
- return {
1944
- display: "flex",
1945
- alignItems: "stretch",
1946
- flexDirection: "column",
1947
- ...e.grid && {
1948
- flexDirection: "row",
1949
- alignItems: "flex-start",
1950
- flexWrap: "wrap"
1951
- }
1952
- };
1953
- }
1954
- function r() {
1955
- const g = {
1956
- ...{
1957
- display: "flex",
1958
- flexDirection: "column"
1959
- },
1960
- alignItems: "stretch",
1961
- cursor: "pointer"
1962
- };
1963
- return Object.fromEntries(
1964
- Object.entries(g).filter(([p, I]) => I !== void 0)
1965
- );
1966
- }
1967
- function a(m) {
1968
- return `builder-accordion-title builder-accordion-title-${t.includes(m) ? "open" : "closed"}`;
1969
- }
1970
- function l(m) {
1971
- return `builder-accordion-detail builder-accordion-detail-${t.includes(m) ? "open" : "closed"}`;
1972
- }
1973
- function c() {
1974
- let m = null;
1975
- if (e.grid && t.length && document) {
1976
- const p = t[0];
1977
- let S = document.querySelector(
1978
- `.builder-accordion-title[data-index="${p}"]`
1979
- );
1980
- if (m = p, S) {
1981
- let R = S.getBoundingClientRect();
1982
- for (; S = S && S.nextElementSibling; )
1983
- if (S) {
1984
- if (S.classList.contains("builder-accordion-detail"))
1985
- continue;
1986
- const B = S.getBoundingClientRect();
1987
- if (B.left > R.left) {
1988
- const A = parseInt(
1989
- S.getAttribute("data-index") || "",
1990
- 10
1991
- );
1992
- isNaN(A) || (R = B, m = A);
1993
- } else
1994
- break;
1995
- }
1996
- }
1997
- }
1998
- return typeof m == "number" && (m = m + 1), m;
1999
- }
2000
- function u() {
2001
- const m = {
2002
- order: typeof c() == "number" ? c() : void 0,
2003
- ...e.grid && {
2004
- width: "100%"
2005
- }
2006
- };
2007
- return Object.fromEntries(
2008
- Object.entries(m).filter(([g, p]) => p !== void 0)
2009
- );
2010
- }
2011
- function f(m) {
2012
- t.includes(m) ? n(i() ? [] : t.filter((g) => g !== m)) : n(i() ? [m] : t.concat(m));
2013
- }
2014
- return /* @__PURE__ */ s("div", { className: "builder-accordion", style: o(), children: (d = e.items) == null ? void 0 : d.map((m, g) => /* @__PURE__ */ V(E, { children: [
2015
- /* @__PURE__ */ s(
2016
- "div",
2017
- {
2018
- className: a(g),
2019
- style: {
2020
- ...r(),
2021
- width: e.grid ? e.gridRowWidth : void 0,
2022
- order: c() !== null ? ve(g) : ve(g + 1)
2023
- },
2024
- "data-index": g,
2025
- onClick: (p) => f(g),
2026
- children: /* @__PURE__ */ s(
2027
- D,
2028
- {
2029
- blocks: m.title,
2030
- path: `items.${g}.title`,
2031
- parent: e.builderBlock.id,
2032
- context: e.builderContext,
2033
- registeredComponents: e.builderComponents,
2034
- linkComponent: e.builderLinkComponent
2035
- }
2036
- )
2037
- }
2038
- ),
2039
- t.includes(g) ? /* @__PURE__ */ s(
2040
- "div",
2041
- {
2042
- className: l(g),
2043
- style: u(),
2044
- children: /* @__PURE__ */ s(
2045
- D,
2046
- {
2047
- blocks: m.detail,
2048
- path: `items.${g}.detail`,
2049
- parent: e.builderBlock.id,
2050
- context: e.builderContext,
2051
- registeredComponents: e.builderComponents,
2052
- linkComponent: e.builderLinkComponent
2053
- }
2054
- )
2055
- }
2056
- ) : null
2057
- ] })) });
2058
- }
2059
- const le = {
2060
- "@type": "@builder.io/sdk:Element",
2061
- layerName: "Accordion item title",
2062
- responsiveStyles: {
2063
- large: {
2064
- marginTop: "10px",
2065
- position: "relative",
2066
- display: "flex",
2067
- alignItems: "stretch",
2068
- flexDirection: "column",
2069
- paddingBottom: "10px"
2070
- }
2071
- },
2072
- children: [{
2073
- "@type": "@builder.io/sdk:Element",
2074
- responsiveStyles: {
2075
- large: {
2076
- textAlign: "left",
2077
- display: "flex",
2078
- flexDirection: "column"
2079
- }
2080
- },
2081
- component: {
2082
- name: "Text",
2083
- options: {
2084
- text: "I am an accordion title. Click me!"
2085
- }
2086
- }
2087
- }]
2088
- }, se = {
2089
- "@type": "@builder.io/sdk:Element",
2090
- layerName: "Accordion item detail",
2091
- responsiveStyles: {
2092
- large: {
2093
- position: "relative",
2094
- display: "flex",
2095
- alignItems: "stretch",
2096
- flexDirection: "column",
2097
- marginTop: "10px",
2098
- paddingBottom: "10px"
2099
- }
2100
- },
2101
- children: [{
2102
- "@type": "@builder.io/sdk:Element",
2103
- responsiveStyles: {
2104
- large: {
2105
- paddingTop: "50px",
2106
- textAlign: "left",
2107
- display: "flex",
2108
- flexDirection: "column",
2109
- paddingBottom: "50px"
2110
- }
2111
- },
2112
- component: {
2113
- name: "Text",
2114
- options: {
2115
- text: "I am an accordion detail, hello!"
2116
- }
2117
- }
2118
- }]
2119
- }, Zt = {
2120
- name: "Builder:Accordion",
2121
- canHaveChildren: !0,
2122
- image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
2123
- defaultStyles: {
2124
- display: "flex",
2125
- flexDirection: "column",
2126
- alignItems: "stretch"
2127
- },
2128
- inputs: [{
2129
- name: "items",
2130
- type: "list",
2131
- broadcast: !0,
2132
- subFields: [{
2133
- name: "title",
2134
- type: "uiBlocks",
2135
- hideFromUI: !0,
2136
- defaultValue: [le]
2137
- }, {
2138
- name: "detail",
2139
- type: "uiBlocks",
2140
- hideFromUI: !0,
2141
- defaultValue: [se]
2142
- }],
2143
- defaultValue: [{
2144
- title: [le],
2145
- detail: [se]
2146
- }, {
2147
- title: [le],
2148
- detail: [se]
2149
- }],
2150
- showIf: (e) => !e.get("useChildrenForItems")
2151
- }, {
2152
- name: "oneAtATime",
2153
- helperText: "Only allow opening one at a time (collapse all others when new item openned)",
2154
- type: "boolean",
2155
- defaultValue: !1
2156
- }, {
2157
- name: "grid",
2158
- helperText: "Display as a grid",
2159
- type: "boolean",
2160
- defaultValue: !1
2161
- }, {
2162
- name: "gridRowWidth",
2163
- helperText: "Display as a grid",
2164
- type: "string",
2165
- showIf: (e) => e.get("grid"),
2166
- defaultValue: "25%"
2167
- }, {
2168
- name: "useChildrenForItems",
2169
- type: "boolean",
2170
- helperText: "Use child elements for each slide, instead of the array. Useful for dynamically repeating items",
2171
- advanced: !0,
2172
- defaultValue: !1,
2173
- onChange: (e) => {
2174
- e.get("useChildrenForItems") === !0 && e.set("items", []);
2175
- }
2176
- }]
2177
- }, en = {
2177
+ const en = {
2178
2178
  name: "Custom Code",
2179
2179
  static: !0,
2180
2180
  requiredPermissions: ["editCode"],
@@ -2534,12 +2534,12 @@ function un(e) {
2534
2534
  var d, m;
2535
2535
  const t = ee(null), [n, i] = C(() => "unsubmitted"), [o, r] = C(() => null), [a, l] = C(() => "");
2536
2536
  function c(g) {
2537
- var I, S;
2537
+ var I, x;
2538
2538
  const p = {
2539
2539
  ...e.builderContext.rootState,
2540
2540
  ...g
2541
2541
  };
2542
- e.builderContext.rootSetState ? (S = (I = e.builderContext).rootSetState) == null || S.call(I, p) : e.builderContext.rootState = p;
2542
+ e.builderContext.rootSetState ? (x = (I = e.builderContext).rootSetState) == null || x.call(I, p) : e.builderContext.rootState = p;
2543
2543
  }
2544
2544
  function u() {
2545
2545
  return $() && e.previewState || n;
@@ -2555,11 +2555,9 @@ function un(e) {
2555
2555
  return;
2556
2556
  }
2557
2557
  g.preventDefault();
2558
- const S = g.currentTarget, R = e.customHeaders || {};
2558
+ const x = g.currentTarget || g.target, R = e.customHeaders || {};
2559
2559
  let B;
2560
- const A = new FormData(S), O = Array.from(
2561
- g.currentTarget.querySelectorAll("input,select,textarea")
2562
- ).filter((b) => !!b.name).map((b) => {
2560
+ const A = new FormData(x), O = Array.from(x.querySelectorAll("input,select,textarea")).filter((b) => !!b.name).map((b) => {
2563
2561
  let h;
2564
2562
  const y = b.name;
2565
2563
  if (b instanceof HTMLInputElement)
@@ -2572,8 +2570,8 @@ function un(e) {
2572
2570
  } else if (b.type === "checkbox")
2573
2571
  h = b.checked;
2574
2572
  else if (b.type === "number" || b.type === "range") {
2575
- const x = b.valueAsNumber;
2576
- isNaN(x) || (h = x);
2573
+ const S = b.valueAsNumber;
2574
+ isNaN(S) || (h = S);
2577
2575
  } else
2578
2576
  b.type === "file" ? h = b.files : h = b.value;
2579
2577
  else
@@ -2610,15 +2608,15 @@ function un(e) {
2610
2608
  let h;
2611
2609
  const y = b.headers.get("content-type");
2612
2610
  if (y && y.indexOf("application/json") !== -1 ? h = await b.json() : h = await b.text(), !b.ok && e.errorMessagePath) {
2613
- let x = dn(h, e.errorMessagePath);
2614
- x && (typeof x != "string" && (x = JSON.stringify(x)), l(x), c({ formErrorMessage: x }));
2611
+ let S = dn(h, e.errorMessagePath);
2612
+ S && (typeof S != "string" && (S = JSON.stringify(S)), l(S), c({ formErrorMessage: S }));
2615
2613
  }
2616
2614
  if (r(h), i(b.ok ? "success" : "error"), b.ok) {
2617
- const x = new CustomEvent("submit:success", {
2615
+ const S = new CustomEvent("submit:success", {
2618
2616
  detail: { res: b, body: h }
2619
2617
  });
2620
2618
  if (t.current) {
2621
- if (t.current.dispatchEvent(x), x.defaultPrevented)
2619
+ if (t.current.dispatchEvent(S), S.defaultPrevented)
2622
2620
  return;
2623
2621
  e.resetFormOnSubmit !== !1 && t.current.reset();
2624
2622
  }
@@ -2680,7 +2678,7 @@ function un(e) {
2680
2678
  context: e.builderContext
2681
2679
  }
2682
2680
  ) : null,
2683
- u() === "error" && o ? /* @__PURE__ */ s("pre", { className: "builder-form-error-text pre-31bf8a14", children: JSON.stringify(o, null, 2) }) : null,
2681
+ u() === "error" && o ? /* @__PURE__ */ s("pre", { className: "builder-form-error-text pre-3a20f614", children: JSON.stringify(o, null, 2) }) : null,
2684
2682
  u() === "success" ? /* @__PURE__ */ s(
2685
2683
  D,
2686
2684
  {
@@ -2693,7 +2691,7 @@ function un(e) {
2693
2691
  }
2694
2692
  ),
2695
2693
  " ",
2696
- /* @__PURE__ */ s("style", { children: ".pre-31bf8a14 { padding: 10px; color: red; text-align: center; }" }),
2694
+ /* @__PURE__ */ s("style", { children: ".pre-3a20f614 { padding: 10px; color: red; text-align: center; }" }),
2697
2695
  " "
2698
2696
  ] });
2699
2697
  }
@@ -3089,34 +3087,34 @@ const kn = () => [{
3089
3087
  ...Sn
3090
3088
  }], ke = () => [{
3091
3089
  component: nt,
3092
- ...jt
3090
+ ...Mt
3093
3091
  }, {
3094
3092
  component: Wt,
3095
- ...Ut
3093
+ ...Ht
3096
3094
  }, {
3097
3095
  component: Ft,
3098
- ...Mt
3096
+ ...Kt
3099
3097
  }, {
3100
3098
  component: Lt,
3101
- ...Ht
3099
+ ...qt
3102
3100
  }, {
3103
3101
  component: Ot,
3104
- ...Kt
3102
+ ..._t
3105
3103
  }, {
3106
- component: _t,
3107
- ...qt
3104
+ component: Jt,
3105
+ ...zt
3108
3106
  }, {
3109
3107
  component: qn,
3110
- ...zt
3108
+ ...Yt
3109
+ }, {
3110
+ component: Zt,
3111
+ ...Xt
3111
3112
  }, {
3112
3113
  component: Qt,
3113
3114
  ...Gt
3114
3115
  }, {
3115
- component: Yt,
3116
- ...Jt
3117
- }, {
3118
- component: Xt,
3119
- ...Zt
3116
+ component: Ut,
3117
+ ...jt
3120
3118
  }, ...kn()], Cn = `function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {
3121
3119
  function getAndSetVariantId() {
3122
3120
  function setCookie(name, value, days) {
@@ -3333,23 +3331,23 @@ function On(e) {
3333
3331
  var B, A, O, v, w, W, b;
3334
3332
  const t = ee(null);
3335
3333
  function n(h) {
3336
- var x, k;
3334
+ var S, k;
3337
3335
  const y = {
3338
3336
  ...e.builderContextSignal.rootState,
3339
3337
  ...h
3340
3338
  };
3341
- e.builderContextSignal.rootSetState ? (k = (x = e.builderContextSignal).rootSetState) == null || k.call(x, y) : e.setBuilderContextSignal((T) => ({
3339
+ e.builderContextSignal.rootSetState ? (k = (S = e.builderContextSignal).rootSetState) == null || k.call(S, y) : e.setBuilderContextSignal((T) => ({
3342
3340
  ...T,
3343
3341
  rootState: y
3344
3342
  }));
3345
3343
  }
3346
3344
  function i(h) {
3347
- var x, k, T, N, j;
3345
+ var S, k, T, N, j;
3348
3346
  const y = {
3349
3347
  ...e.builderContextSignal.content,
3350
3348
  ...h,
3351
3349
  data: {
3352
- ...(x = e.builderContextSignal.content) == null ? void 0 : x.data,
3350
+ ...(S = e.builderContextSignal.content) == null ? void 0 : S.data,
3353
3351
  ...h == null ? void 0 : h.data
3354
3352
  },
3355
3353
  meta: {
@@ -3379,10 +3377,10 @@ function On(e) {
3379
3377
  callbacks: {
3380
3378
  configureSdk: (y) => {
3381
3379
  var T;
3382
- const { breakpoints: x, contentId: k } = y;
3383
- !k || k !== ((T = e.builderContextSignal.content) == null ? void 0 : T.id) || x && i({
3380
+ const { breakpoints: S, contentId: k } = y;
3381
+ !k || k !== ((T = e.builderContextSignal.content) == null ? void 0 : T.id) || S && i({
3384
3382
  meta: {
3385
- breakpoints: x
3383
+ breakpoints: S
3386
3384
  }
3387
3385
  });
3388
3386
  },
@@ -3396,8 +3394,8 @@ function On(e) {
3396
3394
  })(h);
3397
3395
  }
3398
3396
  function c() {
3399
- var y, x;
3400
- const h = (x = (y = e.builderContextSignal.content) == null ? void 0 : y.data) == null ? void 0 : x.jsCode;
3397
+ var y, S;
3398
+ const h = (S = (y = e.builderContextSignal.content) == null ? void 0 : y.data) == null ? void 0 : S.jsCode;
3401
3399
  h && q({
3402
3400
  code: h,
3403
3401
  context: e.context || {},
@@ -3412,9 +3410,9 @@ function On(e) {
3412
3410
  }
3413
3411
  const [u, f] = C(() => ({})), [d, m] = C(() => ({})), [g, p] = C(() => !1);
3414
3412
  function I(h) {
3415
- var y, x;
3413
+ var y, S;
3416
3414
  if (e.builderContextSignal.content) {
3417
- const k = (y = e.builderContextSignal.content) == null ? void 0 : y.testVariationId, T = (x = e.builderContextSignal.content) == null ? void 0 : x.id;
3415
+ const k = (y = e.builderContextSignal.content) == null ? void 0 : y.testVariationId, T = (S = e.builderContextSignal.content) == null ? void 0 : S.id;
3418
3416
  he({
3419
3417
  type: "click",
3420
3418
  canTrack: Q(e.canTrack),
@@ -3427,9 +3425,9 @@ function On(e) {
3427
3425
  }
3428
3426
  g || p(!0);
3429
3427
  }
3430
- function S() {
3431
- var y, x, k;
3432
- const h = (k = (x = (y = e.builderContextSignal.content) == null ? void 0 : y.data) == null ? void 0 : x.httpRequests) != null ? k : {};
3428
+ function x() {
3429
+ var y, S, k;
3430
+ const h = (k = (S = (y = e.builderContextSignal.content) == null ? void 0 : y.data) == null ? void 0 : S.httpRequests) != null ? k : {};
3433
3431
  Object.entries(h).forEach(([T, N]) => {
3434
3432
  if (!N || d[T] || u[T] && !$())
3435
3433
  return;
@@ -3507,7 +3505,7 @@ function On(e) {
3507
3505
  }
3508
3506
  if (Ge() && !$()) {
3509
3507
  const k = new URL(location.href).searchParams, T = k.get("builder.preview"), N = k.get(
3510
- `builder.preview.${T}`
3508
+ `builder.overrides.${T}`
3511
3509
  ), j = k.get("apiKey") || k.get("builder.space");
3512
3510
  T === e.model && j === e.apiKey && (!e.content || N === e.content.id) && we({
3513
3511
  model: e.model,
@@ -3521,13 +3519,13 @@ function On(e) {
3521
3519
  }, []), P(() => {
3522
3520
  e.apiKey || Z.error(
3523
3521
  "No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop."
3524
- ), c(), S(), R();
3522
+ ), c(), x(), R();
3525
3523
  }, []), P(() => {
3526
3524
  e.content && i(e.content);
3527
3525
  }, [e.content]), P(() => {
3528
3526
  c();
3529
3527
  }, [(A = (B = e.builderContextSignal.content) == null ? void 0 : B.data) == null ? void 0 : A.jsCode]), P(() => {
3530
- S();
3528
+ x();
3531
3529
  }, [(v = (O = e.builderContextSignal.content) == null ? void 0 : O.data) == null ? void 0 : v.httpRequests]), P(() => {
3532
3530
  R();
3533
3531
  }, [e.builderContextSignal.rootState]), P(() => {
@@ -3604,18 +3602,18 @@ function Ie(e) {
3604
3602
  var c, u, f, d, m, g, p;
3605
3603
  const [t, n] = C(
3606
3604
  () => {
3607
- var I, S;
3605
+ var I, x;
3608
3606
  return Vn({
3609
3607
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
3610
3608
  variationId: (I = e.content) == null ? void 0 : I.testVariationId,
3611
3609
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
3612
- contentId: (S = e.content) == null ? void 0 : S.id
3610
+ contentId: (x = e.content) == null ? void 0 : x.id
3613
3611
  });
3614
3612
  }
3615
3613
  );
3616
3614
  function i(I) {
3617
- l((S) => ({
3618
- ...S,
3615
+ l((x) => ({
3616
+ ...x,
3619
3617
  rootState: I
3620
3618
  }));
3621
3619
  }
@@ -3624,10 +3622,10 @@ function Ie(e) {
3624
3622
  ...ke(),
3625
3623
  ...e.customComponents || []
3626
3624
  ].reduce(
3627
- (I, { component: S, ...R }) => ({
3625
+ (I, { component: x, ...R }) => ({
3628
3626
  ...I,
3629
3627
  [R.name]: {
3630
- component: S,
3628
+ component: x,
3631
3629
  ...ge(R)
3632
3630
  }
3633
3631
  }),
@@ -3652,7 +3650,7 @@ function Ie(e) {
3652
3650
  ...ke(),
3653
3651
  ...e.customComponents || []
3654
3652
  ].reduce(
3655
- (I, { component: S, ...R }) => ({
3653
+ (I, { component: x, ...R }) => ({
3656
3654
  ...I,
3657
3655
  [R.name]: ge(R)
3658
3656
  }),
@@ -3910,6 +3908,6 @@ export {
3910
3908
  Lt as Image,
3911
3909
  Ot as Section,
3912
3910
  qn as Symbol,
3913
- Qt as Text,
3911
+ Zt as Text,
3914
3912
  vn as Video
3915
3913
  };