@chaibuilder/sdk 1.2.75 → 1.2.77

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.
@@ -1,18 +1,18 @@
1
1
  import { registerChaiBlock as u } from "@chaibuilder/runtime";
2
2
  import { j as a } from "./jsx-runtime-Sp0orL4X.js";
3
3
  import * as m from "react";
4
- import { c as L, o as p, f as v, v as M, b, T as $, y as B, u as T, r as j, d as C, q as D, e as k, h as F, G as O, g as I, S as U } from "./iconBase-zweRWSz0.js";
4
+ import { c as j, o as p, f as v, v as M, b, T as N, y as B, u as T, r as L, d as C, q as D, e as y, h as F, G as O, g as I, S as U } from "./iconBase-zweRWSz0.js";
5
5
  import "i18next";
6
- import { ButtonIcon as H, CodeIcon as V, HeadingIcon as G, TextIcon as W, CursorTextIcon as X, Link1Icon as Y, ImageIcon as A, RowsIcon as Z, ColumnsIcon as J, SketchLogoIcon as K, VideoIcon as Q, DividerHorizontalIcon as ee, MoonIcon as te, SpaceBetweenVerticallyIcon as z, GroupIcon as le, InputIcon as q, RadiobuttonIcon as oe, DropdownMenuIcon as se, CheckboxIcon as ae } from "@radix-ui/react-icons";
7
- import { isNull as ne, isEmpty as g, get as x, pick as ce, omit as re, map as S } from "lodash-es";
6
+ import { ButtonIcon as H, CodeIcon as V, HeadingIcon as G, TextIcon as W, CursorTextIcon as X, Link1Icon as Y, ImageIcon as z, RowsIcon as Z, ColumnsIcon as J, SketchLogoIcon as K, VideoIcon as Q, DividerHorizontalIcon as ee, MoonIcon as te, SpaceBetweenVerticallyIcon as q, GroupIcon as le, InputIcon as A, RadiobuttonIcon as oe, DropdownMenuIcon as se, CheckboxIcon as ae } from "@radix-ui/react-icons";
7
+ import { isNull as ne, isEmpty as g, get as x, pick as re, omit as ce, map as S } from "lodash-es";
8
8
  import "clsx";
9
9
  import "tailwind-merge";
10
- const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("div", { className: L("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ a.jsx("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, _ = ie, de = (e) => {
11
- const { blockProps: l, inBuilder: t, backgroundImage: s, children: o, tag: n = "div", styles: c } = e;
10
+ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("div", { className: j("pointer-events-none flex h-20 flex-col items-center justify-center p-2", e), children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-2 dark:bg-gray-800", children: /* @__PURE__ */ a.jsx("div", { className: "flex h-full w-full items-center justify-center outline-dashed outline-1 -outline-offset-1 outline-gray-400 duration-300 dark:outline-gray-700" }) }) }) : null, _ = ie, de = (e) => {
11
+ const { blockProps: l, inBuilder: t, backgroundImage: s, children: o, tag: n = "div", styles: r } = e;
12
12
  let i = o;
13
13
  o || (i = /* @__PURE__ */ a.jsx(_, { inBuilder: t }));
14
- let r = {};
15
- return s && (r = { backgroundImage: `url(${s})` }), m.createElement(n, { ...l, ...c, style: r }, i);
14
+ let c = {};
15
+ return s && (c = { backgroundImage: `url(${s})` }), m.createElement(n, { ...l, ...r, style: c }, i);
16
16
  }, ue = {
17
17
  type: "Box",
18
18
  label: "web_blocks.box",
@@ -47,14 +47,14 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
47
47
  },
48
48
  canAcceptBlock: () => !0
49
49
  }, be = (e) => {
50
- const { blockProps: l, iconSize: t, icon: s, content: o, iconPos: n, styles: c, children: i } = e, r = s, d = i || /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
50
+ const { blockProps: l, iconSize: t, icon: s, content: o, iconPos: n, styles: r, children: i } = e, c = s, d = i || /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
51
51
  /* @__PURE__ */ a.jsx("span", { "data-ai-key": "content", children: o }),
52
- r && /* @__PURE__ */ a.jsx(
52
+ c && /* @__PURE__ */ a.jsx(
53
53
  "div",
54
54
  {
55
55
  style: { width: t + "px" },
56
56
  className: n + " " + (n === "order-first" ? "mr-2" : "ml-2") || "",
57
- dangerouslySetInnerHTML: { __html: r }
57
+ dangerouslySetInnerHTML: { __html: c }
58
58
  }
59
59
  )
60
60
  ] });
@@ -62,7 +62,7 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
62
62
  "button",
63
63
  {
64
64
  ...l,
65
- ...c,
65
+ ...r,
66
66
  type: "button"
67
67
  },
68
68
  d
@@ -76,7 +76,7 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
76
76
  props: {
77
77
  content: b({ title: "web_blocks.label", default: "Button" }),
78
78
  styles: p({ default: "text-white bg-primary px-4 py-2 rounded-global flex items-center" }),
79
- icon: $({ title: "web_blocks.icon", default: "" }),
79
+ icon: N({ title: "web_blocks.icon", default: "" }),
80
80
  iconSize: B({ title: "web_blocks.icon_size", default: 24 }),
81
81
  iconPos: v({
82
82
  title: "web_blocks.icon_position",
@@ -110,17 +110,16 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
110
110
  styles: p({ default: "" }),
111
111
  htmlCode: T({
112
112
  title: "web_blocks.html_code",
113
- default: "<div><p>web_blocks.default_snippet</p></div>",
113
+ default: "<div><p>Enter your HTML code here...</p></div>",
114
114
  placeholder: "web_blocks.placeholder"
115
115
  })
116
- },
117
- canAcceptBlock: () => !1
116
+ }
118
117
  }, he = m.memo(
119
118
  (e) => {
120
119
  const { blockProps: l, styles: t } = e;
121
120
  return m.createElement("div", { ...l, ...t });
122
121
  }
123
- ), ke = {
122
+ ), ye = {
124
123
  type: "EmptyBox",
125
124
  label: "web_blocks.empty_box",
126
125
  category: "core",
@@ -128,7 +127,7 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
128
127
  props: {
129
128
  styles: p({ default: "" })
130
129
  }
131
- }, ye = (e) => {
130
+ }, ke = (e) => {
132
131
  const { blockProps: l, styles: t, content: s, level: o = "h1", children: n = null } = e;
133
132
  return n ? m.createElement(o, { ...t, ...l }, n) : m.createElement(o, {
134
133
  ...t,
@@ -158,7 +157,7 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
158
157
  ]
159
158
  }),
160
159
  styles: p({ default: "text-3xl" }),
161
- content: j({ title: "web_blocks.content", default: "Heading goes here" })
160
+ content: L({ title: "web_blocks.content", default: "Heading goes here" })
162
161
  },
163
162
  canAcceptBlock: (e) => e === "Span" || e === "Text"
164
163
  }, _e = (e) => {
@@ -178,7 +177,7 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
178
177
  group: "typography",
179
178
  props: {
180
179
  styles: p({ default: "" }),
181
- content: j({
180
+ content: L({
182
181
  title: "web_blocks.content",
183
182
  default: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere."
184
183
  })
@@ -199,7 +198,7 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
199
198
  group: "typography",
200
199
  props: {
201
200
  styles: p({ default: "" }),
202
- content: j({ title: "web_blocks.content", default: "" })
201
+ content: L({ title: "web_blocks.content", default: "" })
203
202
  },
204
203
  canAcceptBlock: () => !0
205
204
  }, Ie = (e) => {
@@ -228,18 +227,18 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
228
227
  })
229
228
  }
230
229
  }, je = (e) => {
231
- const { blockProps: l, link: t, children: s, styles: o, inBuilder: n, content: c } = e;
232
- return !s && g(o == null ? void 0 : o.className) && g(c) ? /* @__PURE__ */ a.jsx(_, { inBuilder: n }) : n ? s ? /* @__PURE__ */ a.jsx("span", { ...l, ...o, children: s }) : m.createElement("span", {
230
+ const { blockProps: l, link: t, children: s, styles: o, inBuilder: n, content: r } = e;
231
+ return !s && g(o == null ? void 0 : o.className) && g(r) ? /* @__PURE__ */ a.jsx(_, { inBuilder: n }) : n ? s ? /* @__PURE__ */ a.jsx("span", { ...l, ...o, children: s }) : m.createElement("span", {
233
232
  ...l,
234
233
  ...o,
235
- dangerouslySetInnerHTML: { __html: c }
234
+ dangerouslySetInnerHTML: { __html: r }
236
235
  }) : s ? /* @__PURE__ */ a.jsx("a", { href: (t == null ? void 0 : t.href) || "#/", target: t == null ? void 0 : t.target, ...l, ...o, children: s }) : m.createElement("a", {
237
236
  ...l,
238
237
  ...o,
239
238
  "data-ai-key": "content",
240
239
  href: (t == null ? void 0 : t.href) || "#",
241
240
  target: (t == null ? void 0 : t.target) || "_self",
242
- dangerouslySetInnerHTML: { __html: c }
241
+ dangerouslySetInnerHTML: { __html: r }
243
242
  });
244
243
  }, Le = {
245
244
  type: "Link",
@@ -258,30 +257,30 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
258
257
  canAcceptBlock: (e) => e !== "Link"
259
258
  }, R = (e, ...l) => ({
260
259
  ...e,
261
- className: L(e.className, ...l)
260
+ className: j(e.className, ...l)
262
261
  }), Ce = (e) => {
263
- const { blockProps: l, children: t, styles: s, inBuilder: o, content: n, href: c } = e, { hrefType: i, autoplay: r, maxWidth: d, backdropColor: h, galleryName: f } = e, y = R(s, "cb-lightbox");
262
+ const { blockProps: l, children: t, styles: s, inBuilder: o, content: n, href: r } = e, { hrefType: i, autoplay: c, maxWidth: d, backdropColor: h, galleryName: f } = e, k = R(s, "cb-lightbox");
264
263
  if (!t && g(s == null ? void 0 : s.className) && g(n))
265
264
  return /* @__PURE__ */ a.jsx(_, { inBuilder: o });
266
265
  if (o)
267
- return t ? /* @__PURE__ */ a.jsx("span", { ...l, ...y, children: t }) : m.createElement("span", {
266
+ return t ? /* @__PURE__ */ a.jsx("span", { ...l, ...k, children: t }) : m.createElement("span", {
268
267
  ...l,
269
- ...y,
268
+ ...k,
270
269
  dangerouslySetInnerHTML: { __html: n }
271
270
  });
272
271
  const w = {};
273
- return w["data-vbtype"] = i, r && (w["data-autoplay"] = "true"), d && (w["data-maxwidth"] = d + "px"), h && (w["data-overlay"] = h), f && (w["data-gall"] = f), t ? /* @__PURE__ */ a.jsx("a", { ...w, href: c || "#/", ...l, ...y, children: t }) : m.createElement("a", {
272
+ return w["data-vbtype"] = i, c && (w["data-autoplay"] = "true"), d && (w["data-maxwidth"] = d + "px"), h && (w["data-overlay"] = h), f && (w["data-gall"] = f), t ? /* @__PURE__ */ a.jsx("a", { ...w, href: r || "#/", ...l, ...k, children: t }) : m.createElement("a", {
274
273
  ...l,
275
- ...y,
274
+ ...k,
276
275
  ...w,
277
- href: c || "#",
276
+ href: r || "#",
278
277
  dangerouslySetInnerHTML: { __html: n }
279
278
  });
280
279
  }, Se = {
281
280
  type: "LightBoxLink",
282
281
  label: "web_blocks.lightbox_link",
283
282
  category: "core",
284
- icon: A,
283
+ icon: z,
285
284
  group: "basic",
286
285
  props: {
287
286
  styles: p({ default: "" }),
@@ -297,20 +296,20 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
297
296
  { value: "ajax", title: "web_blocks.ajax" }
298
297
  ]
299
298
  }),
300
- autoplay: k({ title: "web_blocks.autoplay", default: !1 }),
299
+ autoplay: y({ title: "web_blocks.autoplay", default: !1 }),
301
300
  maxWidth: B({ title: "web_blocks.max_width", default: "" }),
302
301
  backdropColor: b({ title: "backdrop_color", default: "" }),
303
302
  galleryName: b({ title: "web_blocks.gallery_name", default: "" })
304
303
  },
305
304
  canAcceptBlock: (e) => e !== "Link" && e !== "LightBoxLink"
306
305
  }, Me = (e) => {
307
- const { blockProps: l, children: t, listType: s, styles: o, tag: n, inBuilder: c } = e, i = L(x(o, "className", ""), s);
308
- return !t && g(o == null ? void 0 : o.className) ? /* @__PURE__ */ a.jsx(_, { inBuilder: c }) : m.createElement(
306
+ const { blockProps: l, children: t, listType: s, styles: o, tag: n, inBuilder: r } = e, i = j(x(o, "className", ""), s);
307
+ return !t && g(o == null ? void 0 : o.className) ? /* @__PURE__ */ a.jsx(_, { inBuilder: r }) : m.createElement(
309
308
  n || (s === "list-decimal" ? "ol" : "ul"),
310
309
  { ...l, ...o, className: i },
311
310
  t
312
311
  );
313
- }, $e = {
312
+ }, Ne = {
314
313
  type: "List",
315
314
  label: "web_blocks.list",
316
315
  icon: Z,
@@ -361,7 +360,7 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
361
360
  "data-ai-key": "content",
362
361
  dangerouslySetInnerHTML: { __html: t }
363
362
  });
364
- }, Ne = {
363
+ }, $e = {
365
364
  type: "ListItem",
366
365
  label: "web_blocks.listitem",
367
366
  icon: J,
@@ -369,19 +368,19 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
369
368
  group: "basic",
370
369
  props: {
371
370
  styles: p({ default: "" }),
372
- content: j({ title: "web_blocks.content", default: "List item" })
371
+ content: L({ title: "web_blocks.content", default: "List item" })
373
372
  },
374
373
  canAcceptBlock: (e) => e !== "ListItem",
375
374
  canBeNested: (e) => e === "List"
376
375
  }, Pe = (e) => {
377
- const { blockProps: l, icon: t, styles: s, width: o, inBuilder: n, height: c } = e, i = R(s, L(o ? `w-[${o}px]` : "", c ? `h-[${c}px]` : ""));
376
+ const { blockProps: l, icon: t, styles: s, width: o, inBuilder: n, height: r } = e, i = R(s, j(o ? `w-[${o}px]` : "", r ? `h-[${r}px]` : ""));
378
377
  if (g(t))
379
378
  return /* @__PURE__ */ a.jsx(_, { inBuilder: n, className: "h-8 w-14" });
380
- const r = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
379
+ const c = t.replace(/<svg /g, '<svg class="w-[inherit] h-[inherit]" ');
381
380
  return m.createElement("span", {
382
381
  ...l,
383
382
  ...i,
384
- dangerouslySetInnerHTML: { __html: r }
383
+ dangerouslySetInnerHTML: { __html: c }
385
384
  });
386
385
  }, Te = {
387
386
  type: "Icon",
@@ -391,7 +390,7 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
391
390
  group: "media",
392
391
  props: {
393
392
  styles: p({ default: "text-black" }),
394
- icon: $({
393
+ icon: N({
395
394
  title: "web_blocks.icon",
396
395
  default: '<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M8 16c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zM8 1.5c3.59 0 6.5 2.91 6.5 6.5s-2.91 6.5-6.5 6.5-6.5-2.91-6.5-6.5 2.91-6.5 6.5-6.5zM8 9.356c1.812 0 3.535-0.481 5-1.327-0.228 2.788-2.393 4.971-5 4.971s-4.772-2.186-5-4.973c1.465 0.845 3.188 1.329 5 1.329zM4 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5zM10 5.5c0-0.828 0.448-1.5 1-1.5s1 0.672 1 1.5c0 0.828-0.448 1.5-1 1.5s-1-0.672-1-1.5z"></path></svg>'
397
396
  }),
@@ -399,7 +398,7 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
399
398
  height: B({ title: "web_blocks.height", default: "" })
400
399
  }
401
400
  }, He = (e) => {
402
- const { blockProps: l, image: t, styles: s, alt: o, height: n, width: c } = e;
401
+ const { blockProps: l, image: t, styles: s, alt: o, height: n, width: r } = e;
403
402
  return g(t) ? /* @__PURE__ */ a.jsx(_, { className: "h-36" }) : m.createElement("img", {
404
403
  ...l,
405
404
  ...s,
@@ -407,13 +406,13 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
407
406
  alt: o,
408
407
  loading: "lazy",
409
408
  height: n,
410
- width: c
409
+ width: r
411
410
  });
412
- }, Ae = {
411
+ }, ze = {
413
412
  type: "Image",
414
413
  label: "web_blocks.image",
415
414
  category: "core",
416
- icon: A,
415
+ icon: z,
417
416
  group: "media",
418
417
  props: {
419
418
  styles: p({ default: "" }),
@@ -425,13 +424,13 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
425
424
  width: b({ title: "web_blocks.width", default: "" }),
426
425
  height: b({ title: "web_blocks.height", default: "" })
427
426
  }
428
- }, E = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, N = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, P = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, ze = (e) => {
427
+ }, E = /^(https?:\/\/)?(www\.)?youtube\.com\/(watch\?v=|embed\/)([a-zA-Z0-9_-]{11})/, $ = /^(https?:\/\/)?(www\.)?player.vimeo\.com/, P = /^(https?:\/\/)?(www\.)?dailymotion\.com\/(video|embed\/video)\/([a-zA-Z0-9_-]+)/, qe = (e) => {
429
428
  if (E.test(e)) {
430
429
  const l = e.match(E);
431
430
  return l ? `https://www.youtube.com/embed/${l[4]}` : e;
432
431
  }
433
- if (N.test(e)) {
434
- const l = e.match(N);
432
+ if ($.test(e)) {
433
+ const l = e.match($);
435
434
  return l ? `https://player.vimeo.com/video/${l[3]}` : e;
436
435
  }
437
436
  if (P.test(e)) {
@@ -439,16 +438,16 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
439
438
  return l ? `https://www.dailymotion.com/embed/video/${l[4]}` : e;
440
439
  }
441
440
  return null;
442
- }, qe = m.memo(
441
+ }, Ae = m.memo(
443
442
  (e) => {
444
- const { blockProps: l, inBuilder: t, styles: s, url: o, controls: n } = e, c = x(n, "autoPlay", !1), i = x(n, "controls", !1), r = c || x(n, "muted", !0), d = x(n, "loop", !1);
443
+ const { blockProps: l, inBuilder: t, styles: s, url: o, controls: n } = e, r = x(n, "autoPlay", !1), i = x(n, "controls", !1), c = r || x(n, "muted", !0), d = x(n, "loop", !1);
445
444
  if (g(o))
446
445
  return /* @__PURE__ */ a.jsx(_, { inBuilder: t, className: "h-36" });
447
- let h = ze(o), f = null;
446
+ let h = qe(o), f = null;
448
447
  if (h) {
449
448
  if (!g(h)) {
450
- const y = [];
451
- y.push(`autoplay=${c ? 1 : 0}`), y.push(`controls=${n ? 1 : 0}`), y.push(`mute=${r ? 1 : 0}&muted=${r ? 1 : 0}`), y.push(`loop=${d ? 1 : 0}`), h = `${h}?${y.join("&")}`;
449
+ const k = [];
450
+ k.push(`autoplay=${r ? 1 : 0}`), k.push(`controls=${n ? 1 : 0}`), k.push(`mute=${c ? 1 : 0}&muted=${c ? 1 : 0}`), k.push(`loop=${d ? 1 : 0}`), h = `${h}?${k.join("&")}`;
452
451
  }
453
452
  f = m.createElement("iframe", {
454
453
  ...l,
@@ -464,12 +463,12 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
464
463
  className: "absolute inset-0 w-full h-full",
465
464
  src: o,
466
465
  controls: i,
467
- muted: r,
468
- autoPlay: t ? !1 : c,
466
+ muted: c,
467
+ autoPlay: t ? !1 : r,
469
468
  loop: d
470
469
  });
471
- return /* @__PURE__ */ a.jsx("div", { ...ce(s, ["className"]), children: /* @__PURE__ */ a.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
472
- t ? /* @__PURE__ */ a.jsx("div", { ...l, ...re(s, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
470
+ return /* @__PURE__ */ a.jsx("div", { ...re(s, ["className"]), children: /* @__PURE__ */ a.jsxs("div", { className: "relative w-full overflow-hidden", style: { paddingBottom: "56.25%" }, children: [
471
+ t ? /* @__PURE__ */ a.jsx("div", { ...l, ...ce(s, ["className"]), className: "absolute inset-0 z-20 h-full w-full" }) : null,
473
472
  f
474
473
  ] }) });
475
474
  }
@@ -488,10 +487,10 @@ const ie = ({ className: e = "", inBuilder: l }) => l ? /* @__PURE__ */ a.jsx("d
488
487
  controls: F({
489
488
  title: "web_blocks.controls",
490
489
  properties: {
491
- autoPlay: k({ title: "web_blocks.autoplay", default: !0 }),
492
- controls: k({ title: "web_blocks.controls", default: !1 }),
493
- loop: k({ title: "web_blocks.loop", default: !1 }),
494
- muted: k({ title: "web_blocks.muted", default: !0 })
490
+ autoPlay: y({ title: "web_blocks.autoplay", default: !0 }),
491
+ controls: y({ title: "web_blocks.controls", default: !1 }),
492
+ loop: y({ title: "web_blocks.loop", default: !1 }),
493
+ muted: y({ title: "web_blocks.muted", default: !0 })
495
494
  }
496
495
  })
497
496
  }
@@ -501,7 +500,7 @@ function De(e) {
501
500
  }
502
501
  const Fe = (e) => {
503
502
  const { scripts: l, inBuilder: t, blockProps: s } = e;
504
- return t ? /* @__PURE__ */ a.jsx("div", { ...s }) : /* @__PURE__ */ a.jsx("div", { dangerouslySetInnerHTML: { __html: l } });
503
+ return t ? /* @__PURE__ */ a.jsx("div", { ...s, children: /* @__PURE__ */ a.jsx("div", { className: j("pointer-events-none flex flex-col items-center justify-center p-2", ""), children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full rounded bg-gray-200 p-1 dark:bg-gray-800", children: /* @__PURE__ */ a.jsx("p", { className: "text-left text-xs text-gray-400", children: "Scripts will be only executed in preview and live mode. Place your script at the bottom of the" }) }) }) }) : /* @__PURE__ */ a.jsx("div", { dangerouslySetInnerHTML: { __html: l } });
505
504
  }, Oe = {
506
505
  type: "CustomScript",
507
506
  label: "web_blocks.custom_script",
@@ -514,8 +513,7 @@ const Fe = (e) => {
514
513
  default: "",
515
514
  placeholder: "<script>console.log('Hello, world!');<\/script>"
516
515
  })
517
- },
518
- canAcceptBlock: () => !1
516
+ }
519
517
  }, Ue = (e) => {
520
518
  const { blockProps: l, styles: t } = e;
521
519
  return m.createElement("hr", { ...t, ...l });
@@ -590,9 +588,9 @@ const Fe = (e) => {
590
588
  hidden: !0,
591
589
  category: "core",
592
590
  group: "typography",
593
- icon: z,
591
+ icon: q,
594
592
  props: {
595
- content: j({ title: "web_blocks.content", defaultValue: "" })
593
+ content: L({ title: "web_blocks.content", defaultValue: "" })
596
594
  }
597
595
  }, Ze = (e) => {
598
596
  const { blockProps: l, backgroundImage: t, children: s, styles: o } = e;
@@ -621,14 +619,14 @@ const Fe = (e) => {
621
619
  category: "core",
622
620
  group: "basic",
623
621
  hidden: !0,
624
- icon: z,
622
+ icon: q,
625
623
  props: {
626
624
  styles: p({ default: "" })
627
625
  }
628
626
  }, et = (e) => {
629
- const { blockProps: l, errorMessage: t, name: s, _type: o, successMessage: n, action: c, styles: i, children: r } = e;
630
- let d = r;
631
- r || (d = /* @__PURE__ */ a.jsx(_, {}));
627
+ const { blockProps: l, errorMessage: t, name: s, _type: o, successMessage: n, action: r, styles: i, children: c } = e;
628
+ let d = c;
629
+ c || (d = /* @__PURE__ */ a.jsx(_, {}));
632
630
  const h = {
633
631
  "x-data": "useForm",
634
632
  "x-on:submit.prevent": "post"
@@ -643,7 +641,7 @@ const Fe = (e) => {
643
641
  "data-error": t,
644
642
  "data-success": n,
645
643
  method: "post",
646
- action: c,
644
+ action: r,
647
645
  ...l,
648
646
  ...i,
649
647
  children: [
@@ -676,13 +674,13 @@ const Fe = (e) => {
676
674
  },
677
675
  canAcceptBlock: () => !0
678
676
  }, lt = (e) => {
679
- const { blockProps: l, inBuilder: t, label: s, styles: o, inputStyles: n, icon: c, iconPos: i } = e, r = I(), d = {
677
+ const { blockProps: l, inBuilder: t, label: s, styles: o, inputStyles: n, icon: r, iconPos: i } = e, c = I(), d = {
680
678
  "x-bind:disabled": "formLoading"
681
679
  };
682
680
  return /* @__PURE__ */ a.jsxs(
683
681
  "button",
684
682
  {
685
- id: r,
683
+ id: c,
686
684
  ...d,
687
685
  ...n,
688
686
  ...o,
@@ -690,7 +688,7 @@ const Fe = (e) => {
690
688
  type: t ? "button" : "submit",
691
689
  children: [
692
690
  s,
693
- c && /* @__PURE__ */ a.jsx("span", { className: i, dangerouslySetInnerHTML: { __html: c } })
691
+ r && /* @__PURE__ */ a.jsx("span", { className: i, dangerouslySetInnerHTML: { __html: r } })
694
692
  ]
695
693
  }
696
694
  );
@@ -705,7 +703,7 @@ const Fe = (e) => {
705
703
  styles: p({
706
704
  default: "text-white bg-primary disabled:bg-gray-400 px-4 py-2 rounded-global flex items-center gap-x-2"
707
705
  }),
708
- icon: $({ title: "Icon", default: "" }),
706
+ icon: N({ title: "Icon", default: "" }),
709
707
  iconPos: v({
710
708
  title: "web_blocks.icon_position",
711
709
  default: "order-last",
@@ -722,13 +720,13 @@ const Fe = (e) => {
722
720
  placeholder: s,
723
721
  styles: o,
724
722
  inputStyles: n,
725
- showLabel: c,
723
+ showLabel: r,
726
724
  required: i,
727
- inputType: r = "text",
725
+ inputType: c = "text",
728
726
  inBuilder: d,
729
727
  fieldName: h
730
728
  } = e, f = I();
731
- return !c || r === "submit" ? (r === "submit" && (l.value = t), /* @__PURE__ */ a.jsx(
729
+ return !r || c === "submit" ? (c === "submit" && (l.value = t), /* @__PURE__ */ a.jsx(
732
730
  "input",
733
731
  {
734
732
  id: f,
@@ -737,12 +735,12 @@ const Fe = (e) => {
737
735
  ...l,
738
736
  ...n,
739
737
  ...o,
740
- type: r,
738
+ type: c,
741
739
  placeholder: s,
742
740
  required: i
743
741
  }
744
742
  )) : /* @__PURE__ */ a.jsxs("div", { ...o, ...l, children: [
745
- c && /* @__PURE__ */ a.jsx("label", { htmlFor: f, children: t }),
743
+ r && /* @__PURE__ */ a.jsx("label", { htmlFor: f, children: t }),
746
744
  /* @__PURE__ */ a.jsx(
747
745
  "input",
748
746
  {
@@ -750,7 +748,7 @@ const Fe = (e) => {
750
748
  readOnly: d,
751
749
  ...n,
752
750
  id: f,
753
- type: r,
751
+ type: c,
754
752
  placeholder: s,
755
753
  required: i
756
754
  }
@@ -760,7 +758,7 @@ const Fe = (e) => {
760
758
  type: "Input",
761
759
  label: "web_blocks.input",
762
760
  category: "core",
763
- icon: q,
761
+ icon: A,
764
762
  group: "form",
765
763
  props: {
766
764
  styles: p({ default: "" }),
@@ -777,19 +775,19 @@ const Fe = (e) => {
777
775
  default: "text"
778
776
  }),
779
777
  value: b({ title: "web_blocks.value", default: "" }),
780
- showLabel: k({ title: "web_blocks.show_label", default: !0 }),
778
+ showLabel: y({ title: "web_blocks.show_label", default: !0 }),
781
779
  inputStyles: p({ default: "w-full p-1" }),
782
780
  label: b({ title: "web_blocks.label", default: "Label" }),
783
781
  placeholder: b({
784
782
  title: "web_blocks.placeholder",
785
783
  default: "Placeholder"
786
784
  }),
787
- required: k({ title: "web_blocks.required", default: !1 })
785
+ required: y({ title: "web_blocks.required", default: !1 })
788
786
  }
789
787
  }, nt = (e) => {
790
- const { blockProps: l, fieldName: t, label: s, styles: o, inputStyles: n, checked: c, required: i, showLabel: r = !0 } = e, d = I();
791
- return r ? /* @__PURE__ */ a.jsxs("div", { ...o, ...l, children: [
792
- /* @__PURE__ */ a.jsx("input", { ...n, name: t, id: d, type: "radio", required: i, defaultChecked: c }),
788
+ const { blockProps: l, fieldName: t, label: s, styles: o, inputStyles: n, checked: r, required: i, showLabel: c = !0 } = e, d = I();
789
+ return c ? /* @__PURE__ */ a.jsxs("div", { ...o, ...l, children: [
790
+ /* @__PURE__ */ a.jsx("input", { ...n, name: t, id: d, type: "radio", required: i, defaultChecked: r }),
793
791
  s && /* @__PURE__ */ a.jsx("label", { htmlFor: d, children: s })
794
792
  ] }) : /* @__PURE__ */ a.jsx(
795
793
  "input",
@@ -800,11 +798,11 @@ const Fe = (e) => {
800
798
  ...o,
801
799
  type: "radio",
802
800
  required: i,
803
- checked: c,
801
+ checked: r,
804
802
  name: t
805
803
  }
806
804
  );
807
- }, ct = {
805
+ }, rt = {
808
806
  type: "Radio",
809
807
  label: "web_blocks.radio",
810
808
  category: "core",
@@ -814,24 +812,24 @@ const Fe = (e) => {
814
812
  styles: p({ default: "flex items-center w-max gap-x-2" }),
815
813
  fieldName: b({ title: "web_blocks.field_name", default: "radio" }),
816
814
  label: b({ title: "web_blocks.label", default: "Label" }),
817
- checked: k({ title: "web_blocks.checked", default: !1 }),
818
- required: k({ title: "web_blocks.required", default: !1 })
815
+ checked: y({ title: "web_blocks.checked", default: !1 }),
816
+ required: y({ title: "web_blocks.required", default: !1 })
819
817
  }
820
- }, rt = (e) => {
818
+ }, ct = (e) => {
821
819
  const {
822
820
  blockProps: l,
823
821
  fieldName: t,
824
822
  label: s,
825
823
  placeholder: o,
826
824
  styles: n,
827
- inputStyles: c,
825
+ inputStyles: r,
828
826
  required: i,
829
- showLabel: r,
827
+ showLabel: c,
830
828
  _multiple: d = !1
831
829
  } = e, h = I();
832
- return r ? /* @__PURE__ */ a.jsxs("div", { ...n, children: [
833
- r && /* @__PURE__ */ a.jsx("label", { htmlFor: h, children: s }),
834
- /* @__PURE__ */ a.jsxs("select", { ...c, id: h, required: i, multiple: d, name: t, children: [
830
+ return c ? /* @__PURE__ */ a.jsxs("div", { ...n, children: [
831
+ c && /* @__PURE__ */ a.jsx("label", { htmlFor: h, children: s }),
832
+ /* @__PURE__ */ a.jsxs("select", { ...r, id: h, required: i, multiple: d, name: t, children: [
835
833
  /* @__PURE__ */ a.jsx("option", { value: "", disabled: !0, selected: !0, hidden: !0, children: o }),
836
834
  S(e.options, (f) => /* @__PURE__ */ a.jsx(
837
835
  "option",
@@ -875,15 +873,15 @@ const Fe = (e) => {
875
873
  props: {
876
874
  styles: p({ default: "" }),
877
875
  fieldName: b({ title: "web_blocks.field_name", default: "select" }),
878
- showLabel: k({ title: "web_blocks.show_label", default: !0 }),
876
+ showLabel: y({ title: "web_blocks.show_label", default: !0 }),
879
877
  inputStyles: p({ default: "w-full p-1" }),
880
878
  label: b({ title: "web_blocks.label", default: "Label" }),
881
879
  placeholder: b({
882
880
  title: "web_blocks.placeholder",
883
881
  default: "Placeholder"
884
882
  }),
885
- required: k({ title: "web_blocks.required", default: !1 }),
886
- _multiple: k({ title: "web_blocks.multiple", default: !1 }),
883
+ required: y({ title: "web_blocks.required", default: !1 }),
884
+ _multiple: y({ title: "web_blocks.multiple", default: !1 }),
887
885
  options: U({
888
886
  title: "web_blocks.options",
889
887
  itemProperties: {
@@ -893,17 +891,17 @@ const Fe = (e) => {
893
891
  })
894
892
  }
895
893
  }, dt = (e) => {
896
- const { blockProps: l, fieldName: t, label: s, placeholder: o, styles: n, inputStyles: c, _rows: i, showLabel: r } = e, d = I();
897
- return r ? /* @__PURE__ */ a.jsxs("div", { ...n, ...l, children: [
898
- r && /* @__PURE__ */ a.jsx("label", { htmlFor: d, children: s }),
899
- /* @__PURE__ */ a.jsx("textarea", { name: t, ...c, id: d, placeholder: o, rows: i })
894
+ const { blockProps: l, fieldName: t, label: s, placeholder: o, styles: n, inputStyles: r, _rows: i, showLabel: c } = e, d = I();
895
+ return c ? /* @__PURE__ */ a.jsxs("div", { ...n, ...l, children: [
896
+ c && /* @__PURE__ */ a.jsx("label", { htmlFor: d, children: s }),
897
+ /* @__PURE__ */ a.jsx("textarea", { name: t, ...r, id: d, placeholder: o, rows: i })
900
898
  ] }) : /* @__PURE__ */ a.jsx(
901
899
  "textarea",
902
900
  {
903
901
  id: d,
904
902
  name: t,
905
903
  ...l,
906
- ...c,
904
+ ...r,
907
905
  ...n,
908
906
  placeholder: o,
909
907
  rows: i
@@ -913,11 +911,11 @@ const Fe = (e) => {
913
911
  type: "TextArea",
914
912
  label: "web_blocks.textarea",
915
913
  category: "core",
916
- icon: q,
914
+ icon: A,
917
915
  group: "form",
918
916
  props: {
919
917
  fieldName: b({ title: "web_blocks.field_name", default: "textarea" }),
920
- showLabel: k({ title: "web_blocks.show_label", default: !0 }),
918
+ showLabel: y({ title: "web_blocks.show_label", default: !0 }),
921
919
  styles: p({ default: "" }),
922
920
  inputStyles: p({ default: "w-full p-1" }),
923
921
  label: b({ title: "web_blocks.label", default: "Label" }),
@@ -928,8 +926,8 @@ const Fe = (e) => {
928
926
  _rows: B({ title: "web_blocks.rows", default: 3 })
929
927
  }
930
928
  }, bt = (e) => {
931
- const { blockProps: l, fieldName: t, label: s, styles: o, inputStyles: n, required: c, checked: i, showLabel: r = !0 } = e, d = I();
932
- return r ? /* @__PURE__ */ a.jsxs("div", { ...o, ...l, children: [
929
+ const { blockProps: l, fieldName: t, label: s, styles: o, inputStyles: n, required: r, checked: i, showLabel: c = !0 } = e, d = I();
930
+ return c ? /* @__PURE__ */ a.jsxs("div", { ...o, ...l, children: [
933
931
  /* @__PURE__ */ a.jsx(
934
932
  "input",
935
933
  {
@@ -937,7 +935,7 @@ const Fe = (e) => {
937
935
  name: t,
938
936
  id: d,
939
937
  type: "checkbox",
940
- required: c,
938
+ required: r,
941
939
  defaultChecked: i
942
940
  }
943
941
  ),
@@ -950,7 +948,7 @@ const Fe = (e) => {
950
948
  ...n,
951
949
  ...o,
952
950
  type: "checkbox",
953
- required: c,
951
+ required: r,
954
952
  name: t
955
953
  }
956
954
  );
@@ -964,11 +962,11 @@ const Fe = (e) => {
964
962
  fieldName: b({ title: "Field Name", default: "checkbox" }),
965
963
  styles: p({ default: "flex items-center gap-x-2" }),
966
964
  label: b({ title: "web_blocks.label", default: "Label" }),
967
- checked: k({ title: "web_blocks.checked", default: !1 }),
968
- required: k({ title: "web_blocks.required", default: !1 })
965
+ checked: y({ title: "web_blocks.checked", default: !1 }),
966
+ required: y({ title: "web_blocks.required", default: !1 })
969
967
  }
970
968
  }, xt = () => {
971
- u(de, ue), u(he, ke), u(be, pe), u(ye, ge), u(_e, we), u(xe, ve), u(Ie, Be), u(je, Le), u(Ce, Se), u(Me, $e), u(Ee, Ne), u(Pe, Te), u(He, Ae), u(qe, Re), u(me, fe), u(Xe, Ye), u(et, tt), u(lt, ot), u(st, at), u(bt, pt), u(nt, ct), u(rt, it), u(dt, ut), u(Ke, Qe), u(Ze, Je), u(Fe, Oe), u(Ue, Ve), u(Ge, We);
969
+ u(de, ue), u(he, ye), u(be, pe), u(ke, ge), u(_e, we), u(xe, ve), u(Ie, Be), u(je, Le), u(Ce, Se), u(Me, Ne), u(Ee, $e), u(Pe, Te), u(He, ze), u(Ae, Re), u(me, fe), u(Xe, Ye), u(et, tt), u(lt, ot), u(st, at), u(bt, pt), u(nt, rt), u(ct, it), u(dt, ut), u(Ke, Qe), u(Ze, Je), u(Fe, Oe), u(Ue, Ve), u(Ge, We);
972
970
  };
973
971
  export {
974
972
  xt as loadWebBlocks