@rulecms/widget-vue 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,32 +1,32 @@
1
- var Qe = Object.defineProperty;
2
- var et = (e, t, n) => t in e ? Qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var be = (e, t, n) => et(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { defineComponent as D, reactive as tt, watch as Le, provide as nt, renderSlot as re, computed as h, openBlock as y, createElementBlock as b, normalizeStyle as S, normalizeClass as K, createBlock as C, resolveDynamicComponent as W, withCtx as M, createTextVNode as le, toDisplayString as q, createCommentVNode as N, Fragment as A, normalizeProps as J, guardReactiveProps as we, mergeProps as ot, resolveComponent as st, createVNode as U, renderList as R, createElementVNode as $, ref as V, onMounted as it, onBeforeUnmount as $e, inject as rt, unref as x } from "vue";
5
- const H = "default";
6
- function Re(e, t) {
7
- return !(e != null && e.length) || e === H ? t : `${e}/${t}`;
1
+ var et = Object.defineProperty;
2
+ var tt = (e, t, n) => t in e ? et(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var we = (e, t, n) => tt(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { defineComponent as D, reactive as nt, watch as Le, provide as ot, renderSlot as le, computed as h, openBlock as y, createElementBlock as b, normalizeStyle as S, normalizeClass as H, createBlock as w, resolveDynamicComponent as M, withCtx as E, createTextVNode as z, toDisplayString as U, createCommentVNode as P, Fragment as A, normalizeProps as Q, guardReactiveProps as Ce, mergeProps as st, resolveComponent as it, createVNode as j, renderList as O, createElementVNode as W, ref as _, onMounted as rt, onBeforeUnmount as Re, inject as lt, unref as x } from "vue";
5
+ const G = "default";
6
+ function Me(e, t) {
7
+ return !(e != null && e.length) || e === G ? t : `${e}/${t}`;
8
8
  }
9
- const lt = `RuleCMS widget: this widget config uses components from the default component library, but no "default" library is registered. The default library is registered by the consumer app: add the RuleCMS default source components package as a direct dependency and register it, e.g. libraries: { default: sourceComponentsModule } (statically imported for SSR) or libraries: { default: () => import('<default source components package>') }. See the @rulecms/widget-vue README.`;
10
- function Ce(e) {
9
+ const ct = `RuleCMS widget: this widget config uses components from the default component library, but no "default" library is registered. The default library is registered by the consumer app: add the RuleCMS default source components package as a direct dependency and register it, e.g. libraries: { default: sourceComponentsModule } (statically imported for SSR) or libraries: { default: () => import('<default source components package>') }. See the @rulecms/widget-vue README.`;
10
+ function ve(e) {
11
11
  if (!e || typeof e != "object")
12
12
  return !1;
13
13
  const t = e;
14
14
  return !!t.manifest && typeof t.manifest == "object" && !!t.components && typeof t.components == "object" && !Array.isArray(t.components);
15
15
  }
16
- function ct(e) {
17
- if (Ce(e))
16
+ function at(e) {
17
+ if (ve(e))
18
18
  return e;
19
19
  const t = e;
20
- return Ce(t == null ? void 0 : t.default) ? t.default : null;
20
+ return ve(t == null ? void 0 : t.default) ? t.default : null;
21
21
  }
22
- function Q(e) {
23
- return e.usesDefaultLibrary ? [H, ...e.libraryIds] : [...e.libraryIds];
22
+ function ee(e) {
23
+ return e.usesDefaultLibrary ? [G, ...e.libraryIds] : [...e.libraryIds];
24
24
  }
25
- function ve({ registrations: e, referenced: t }) {
26
- if (t.usesDefaultLibrary && !(e != null && e[H]))
27
- throw new Error(lt);
25
+ function Ae({ registrations: e, referenced: t }) {
26
+ if (t.usesDefaultLibrary && !(e != null && e[G]))
27
+ throw new Error(ct);
28
28
  }
29
- function at(e) {
29
+ function ut(e) {
30
30
  const t = [], n = /* @__PURE__ */ new Set();
31
31
  for (const o of e.values()) {
32
32
  if (typeof o.stylesheet != "string")
@@ -36,61 +36,61 @@ function at(e) {
36
36
  }
37
37
  return t.length > 0 ? t : void 0;
38
38
  }
39
- function ut(e) {
39
+ function dt(e) {
40
40
  const t = {};
41
41
  for (const [o, s] of e) {
42
- const i = o === H;
43
- for (const [r, f] of Object.entries(s.components))
44
- t[i ? r : `${o}/${r}`] = f;
42
+ const i = o === G;
43
+ for (const [r, u] of Object.entries(s.components))
44
+ t[i ? r : `${o}/${r}`] = u;
45
45
  }
46
- const n = at(e);
46
+ const n = ut(e);
47
47
  return n ? { components: t, stylesheets: n } : { components: t };
48
48
  }
49
- function X() {
49
+ function J() {
50
50
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
51
51
  let s = 0;
52
52
  function i(c, a) {
53
- var u;
54
- e.get(c) !== a && ((u = a.manifest) != null && u.id && a.manifest.id !== c && console.warn(
53
+ var d;
54
+ e.get(c) !== a && ((d = a.manifest) != null && d.id && a.manifest.id !== c && console.warn(
55
55
  `RuleCMS widget: component library registered as "${c}" declares manifest id "${a.manifest.id}". The registered id wins for resolution.`
56
56
  ), e.set(c, a), s += 1);
57
57
  }
58
58
  function r(c) {
59
- const a = Q(c), u = [...a].sort().join("|"), d = o.get(u);
60
- if (d && d.loadedVersion === s)
61
- return d.plugin;
59
+ const a = ee(c), d = [...a].sort().join("|"), p = o.get(d);
60
+ if (p && p.loadedVersion === s)
61
+ return p.plugin;
62
62
  const l = /* @__PURE__ */ new Map();
63
- for (const p of a) {
64
- const I = e.get(p);
65
- I && l.set(p, I);
63
+ for (const f of a) {
64
+ const I = e.get(f);
65
+ I && l.set(f, I);
66
66
  }
67
- const g = ut(l);
68
- return o.set(u, { loadedVersion: s, plugin: g }), g;
67
+ const g = dt(l);
68
+ return o.set(d, { loadedVersion: s, plugin: g }), g;
69
69
  }
70
- function f(c) {
71
- ve(c);
72
- const { registrations: a, referenced: u } = c;
73
- for (const d of Q(u)) {
74
- if (e.has(d) || n.has(d))
70
+ function u(c) {
71
+ Ae(c);
72
+ const { registrations: a, referenced: d } = c;
73
+ for (const p of ee(d)) {
74
+ if (e.has(p) || n.has(p))
75
75
  continue;
76
- const l = a == null ? void 0 : a[d];
76
+ const l = a == null ? void 0 : a[p];
77
77
  if (!l) {
78
78
  console.error(
79
- `RuleCMS widget: no component library registered for libraryId "${d}"; its components will not render.`
80
- ), n.set(d, new Error(`No registration for libraryId "${d}"`));
79
+ `RuleCMS widget: no component library registered for libraryId "${p}"; its components will not render.`
80
+ ), n.set(p, new Error(`No registration for libraryId "${p}"`));
81
81
  continue;
82
82
  }
83
83
  if (typeof l == "function")
84
84
  return null;
85
- i(d, l);
85
+ i(p, l);
86
86
  }
87
- return r(u);
87
+ return r(d);
88
88
  }
89
89
  async function m(c) {
90
- ve(c);
91
- const { registrations: a, referenced: u } = c, d = Q(u);
90
+ Ae(c);
91
+ const { registrations: a, referenced: d } = c, p = ee(d);
92
92
  return await Promise.all(
93
- d.map(async (l) => {
93
+ p.map(async (l) => {
94
94
  if (e.has(l) || n.has(l))
95
95
  return;
96
96
  const g = a == null ? void 0 : a[l];
@@ -104,9 +104,9 @@ function X() {
104
104
  i(l, g);
105
105
  return;
106
106
  }
107
- let p = t.get(l);
108
- p || (p = g().then((I) => {
109
- const v = ct(I);
107
+ let f = t.get(l);
108
+ f || (f = g().then((I) => {
109
+ const v = at(I);
110
110
  if (!v)
111
111
  throw new Error(
112
112
  `Registration for libraryId "${l}" did not resolve to a ComponentLibraryModule (expected { manifest, components }).`
@@ -119,26 +119,26 @@ function X() {
119
119
  );
120
120
  }).finally(() => {
121
121
  t.delete(l);
122
- }), t.set(l, p)), await p;
122
+ }), t.set(l, f)), await f;
123
123
  })
124
- ), r(u);
124
+ ), r(d);
125
125
  }
126
- return { resolveSync: f, resolve: m };
126
+ return { resolveSync: u, resolve: m };
127
127
  }
128
- const Ko = {
128
+ const ls = {
129
129
  Preview: "Preview",
130
130
  Compose: "Compose",
131
131
  RenderedPage: "RenderedPage"
132
132
  }, ce = {
133
133
  DroppableBox: "droppable-box"
134
- }, Ae = {
134
+ }, Ie = {
135
135
  FlexStart: "flex-start",
136
136
  FlexEnd: "flex-end",
137
137
  Center: "center",
138
138
  SpaceBetween: "space-between",
139
139
  SpaceAround: "space-around",
140
140
  SpaceEvenly: "space-evenly"
141
- }, Uo = {
141
+ }, cs = {
142
142
  FlexStart: "flex-start",
143
143
  FlexEnd: "flex-end",
144
144
  Center: "center",
@@ -146,49 +146,49 @@ const Ko = {
146
146
  SpaceAround: "space-around",
147
147
  SpaceEvenly: "space-evenly",
148
148
  Stretch: "stretch"
149
- }, oe = "cssAttrArray", Ho = {
149
+ }, se = "cssAttrArray", as = {
150
150
  Phone: "phone",
151
151
  Tablet: "tablet",
152
152
  Desktop: "desktop"
153
- }, Me = {
153
+ }, Ne = {
154
154
  ComposerComponent: "ComposerWidget",
155
155
  Collection: "Collection",
156
156
  MoveComponentHandle: "MoveWidgetHandle"
157
- }, Ne = `${Me.Collection}_`, dt = "dev.", pt = "https://rulecms.com", ft = "https://widget-cache.rulecms.com", yt = "/api/v1/c/widget/get", mt = "/api/v1/c/dev/widget/get";
158
- function O(e) {
159
- return typeof e == "string" && e.startsWith(dt);
157
+ }, We = `${Ne.Collection}_`, pt = "dev.", ft = "https://rulecms.com", yt = "https://widget-cache.rulecms.com", mt = "/api/v1/c/widget/get", gt = "/api/v1/c/dev/widget/get";
158
+ function B(e) {
159
+ return typeof e == "string" && e.startsWith(pt);
160
160
  }
161
- function gt(e, t) {
162
- return t ? t.replace(/\/$/, "") : O(e) ? pt : ft;
161
+ function ht(e, t) {
162
+ return t ? t.replace(/\/$/, "") : B(e) ? ft : yt;
163
163
  }
164
- function We({
164
+ function Oe({
165
165
  publishedKey: e,
166
166
  token: t,
167
167
  endpoint: n
168
168
  }) {
169
- const o = O(t), s = o ? mt : yt, i = o ? new URLSearchParams({ widgetKey: e, token: t }) : new URLSearchParams({ publishedKey: e, token: t });
170
- return `${gt(t, n)}${s}?${i.toString()}`;
169
+ const o = B(t), s = o ? gt : mt, i = o ? new URLSearchParams({ widgetKey: e, token: t }) : new URLSearchParams({ publishedKey: e, token: t });
170
+ return `${ht(t, n)}${s}?${i.toString()}`;
171
171
  }
172
- const zo = ({ id: e, prefix: t }) => `${t}_${e}`, ht = (e) => {
172
+ const us = ({ id: e, prefix: t }) => `${t}_${e}`, bt = (e) => {
173
173
  if (!(e != null && e.length) || !e.includes("_")) {
174
174
  console.error(`Invalid drag item id: ${e}. Type does not exist.`);
175
175
  return;
176
176
  }
177
- return bt(e);
178
- }, Oe = (e) => e.includes("_"), bt = (e) => {
177
+ return wt(e);
178
+ }, je = (e) => e.includes("_"), wt = (e) => {
179
179
  const t = e.indexOf("_"), n = e.substring(0, t), o = e.substring(t + 1);
180
180
  return {
181
181
  prefix: n,
182
182
  id: o
183
183
  };
184
- }, je = (e) => {
185
- if (!Oe(e))
184
+ }, Ve = (e) => {
185
+ if (!je(e))
186
186
  return;
187
- const n = ht(e);
188
- return (n == null ? void 0 : n.prefix) === Me.Collection || console.error(
187
+ const n = bt(e);
188
+ return (n == null ? void 0 : n.prefix) === Ne.Collection || console.error(
189
189
  "getCollectionIdForCollectionType - Invalid component type: ${componentType}. Invalid prefix type."
190
190
  ), n == null ? void 0 : n.id;
191
- }, Go = (e) => {
191
+ }, ds = (e) => {
192
192
  if (!(e != null && e.length)) {
193
193
  console.error("getNameAndInstanceIdFromWidgetKey: Missing widget key");
194
194
  return;
@@ -203,13 +203,13 @@ const zo = ({ id: e, prefix: t }) => `${t}_${e}`, ht = (e) => {
203
203
  return { name: n, instanceId: t[1] };
204
204
  const s = t[1].split("@");
205
205
  return { name: n, instanceId: s[0], parentId: s[1] };
206
- }, _o = (e) => {
206
+ }, ps = (e) => {
207
207
  if (!(e != null && e.length))
208
208
  return { errorMessage: "getNameFromWidgetKey: Missing widget key" };
209
209
  const t = e.split("$");
210
210
  return t.length < 2 ? { errorMessage: "getNameFromWidgetKey: Invalid widget key format" } : { name: t[0] };
211
- }, wt = (e) => {
212
- var s, i, r, f;
211
+ }, Ct = (e) => {
212
+ var s, i, r, u;
213
213
  if (!e)
214
214
  return { error: "getWidgetKeyForCollection: Missing collection" };
215
215
  if (!((s = e.name) != null && s.length))
@@ -217,10 +217,10 @@ const zo = ({ id: e, prefix: t }) => `${t}_${e}`, ht = (e) => {
217
217
  const t = (i = e.name) == null ? void 0 : i.trim().toLowerCase();
218
218
  if (!((r = e.id) != null && r.length))
219
219
  return { error: "getWidgetKeyForCollection: Missing collection id" };
220
- const o = ((f = e.parentId) == null ? void 0 : f.length) ? `${e.id}@${e.parentId}` : `${e.id}`;
220
+ const o = ((u = e.parentId) == null ? void 0 : u.length) ? `${e.id}@${e.parentId}` : `${e.id}`;
221
221
  return { data: `${t}$${o}` };
222
- }, Ct = (e) => {
223
- var s, i, r, f;
222
+ }, vt = (e) => {
223
+ var s, i, r, u;
224
224
  if (!e)
225
225
  return { error: "getWidgetKeyForPublishedCollection: Missing collection" };
226
226
  if (!((s = e.name) != null && s.length))
@@ -228,22 +228,22 @@ const zo = ({ id: e, prefix: t }) => `${t}_${e}`, ht = (e) => {
228
228
  const t = (i = e.name) == null ? void 0 : i.trim().toLowerCase();
229
229
  if (!((r = e.publishedKey) != null && r.length))
230
230
  return { error: "getWidgetKeyForPublishedCollection: Missing collection publishedKey" };
231
- const o = ((f = e.parentId) == null ? void 0 : f.length) ? `${e.publishedKey}@${e.parentId}` : `${e.publishedKey}`;
231
+ const o = ((u = e.parentId) == null ? void 0 : u.length) ? `${e.publishedKey}@${e.parentId}` : `${e.publishedKey}`;
232
232
  return { data: `${t}$${o}` };
233
- }, Yo = (e) => {
234
- const t = wt(e);
235
- return `${Ne}${t.data}`;
236
- }, qo = (e) => {
233
+ }, fs = (e) => {
237
234
  const t = Ct(e);
238
- return `${Ne}${t.data}`;
239
- }, vt = "---", At = "___";
240
- function It(e, t) {
241
- return `${e}${vt}${t}`;
235
+ return `${We}${t.data}`;
236
+ }, ys = (e) => {
237
+ const t = vt(e);
238
+ return `${We}${t.data}`;
239
+ }, At = "---", It = "___";
240
+ function St(e, t) {
241
+ return `${e}${At}${t}`;
242
242
  }
243
- function Xo(e, t, n) {
244
- return `${It(e, t)}${At}${n}`;
243
+ function ms(e, t, n) {
244
+ return `${St(e, t)}${It}${n}`;
245
245
  }
246
- function Zo(e) {
246
+ function gs(e) {
247
247
  const t = e.split(".");
248
248
  if (t.length !== 3)
249
249
  throw new Error(`Invalid version format: ${e}. Expected format: x.y.z`);
@@ -259,12 +259,12 @@ function ae({
259
259
  const n = /* @__PURE__ */ new Set();
260
260
  let o = !1;
261
261
  const s = (i) => {
262
- var r, f, m;
262
+ var r, u, m;
263
263
  if ((r = i == null ? void 0 : i.rows) != null && r.length) {
264
264
  for (const c of i.rows)
265
- if ((f = c == null ? void 0 : c.columns) != null && f.length)
265
+ if ((u = c == null ? void 0 : c.columns) != null && u.length)
266
266
  for (const a of c.columns)
267
- a.collection && s(a.collection.collectionRows), !(!a.type || a.type === ce.DroppableBox) && (Oe(a.type) || (!((m = a.libraryId) != null && m.length) || a.libraryId === H ? o = !0 : n.add(a.libraryId)));
267
+ a.collection && s(a.collection.collectionRows), !(!a.type || a.type === ce.DroppableBox) && (je(a.type) || (!((m = a.libraryId) != null && m.length) || a.libraryId === G ? o = !0 : n.add(a.libraryId)));
268
268
  }
269
269
  };
270
270
  s(e);
@@ -273,15 +273,15 @@ function ae({
273
273
  return { libraryIds: Array.from(n), usesDefaultLibrary: o };
274
274
  }
275
275
  const Be = Symbol("rulecms-widget-context");
276
- function St() {
276
+ function Dt() {
277
277
  return {
278
278
  token: "",
279
279
  endpoint: void 0,
280
280
  libraries: void 0,
281
- libraryRegistry: X()
281
+ libraryRegistry: J()
282
282
  };
283
283
  }
284
- const Jo = /* @__PURE__ */ D({
284
+ const hs = /* @__PURE__ */ D({
285
285
  __name: "RuleCMSWidgetProvider",
286
286
  props: {
287
287
  token: {},
@@ -289,97 +289,97 @@ const Jo = /* @__PURE__ */ D({
289
289
  libraries: {}
290
290
  },
291
291
  setup(e) {
292
- const t = e, n = tt(St());
292
+ const t = e, n = nt(Dt());
293
293
  return Le(
294
294
  () => [t.token, t.endpoint, t.libraries],
295
295
  () => {
296
296
  n.token = t.token, n.endpoint = t.endpoint, n.libraries = t.libraries;
297
297
  },
298
298
  { immediate: !0 }
299
- ), nt(Be, n), (o, s) => re(o.$slots, "default");
299
+ ), ot(Be, n), (o, s) => le(o.$slots, "default");
300
300
  }
301
- }), kt = "1200px", Fe = "500px", Ve = "820px", Qo = kt, Dt = "rulecms", Tt = 1920, xt = {
301
+ }), kt = "1200px", Fe = "500px", Ke = "820px", bs = kt, Tt = "rulecms", xt = 1920, Et = {
302
302
  f: "auto",
303
303
  q: "auto",
304
304
  c: "limit"
305
- }, Et = /^[A-Za-z0-9][A-Za-z0-9._\-/]*$/, Pt = 300, Lt = /^[A-Za-z0-9][A-Za-z0-9_-]*$/, $t = 100, Rt = /^https:\/\/[^\s"'()\\<>]+$/, Mt = 2e3, Nt = /^[A-Za-z0-9_,.:\-/]*$/, Wt = 300, Ot = (e) => typeof e == "string" && e.length <= Pt && Et.test(e), jt = (e) => typeof e == "string" && e.length <= $t && Lt.test(e), Bt = (e) => typeof e == "string" && e.length <= Mt && Rt.test(e), Ft = (e) => typeof e == "string" && e.length <= Wt && Nt.test(e), Vt = (e) => Object.entries(e).map(([t, n]) => `${t}_${n}`).join(","), Kt = (e) => {
305
+ }, Pt = /^[A-Za-z0-9][A-Za-z0-9._\-/]*$/, $t = 300, Lt = /^[A-Za-z0-9][A-Za-z0-9_-]*$/, Rt = 100, Mt = /^https:\/\/[^\s"'()\\<>]+$/, Nt = 2e3, Wt = /^[A-Za-z0-9_,.:\-/]*$/, Ot = 300, jt = (e) => typeof e == "string" && e.length <= $t && Pt.test(e), Vt = (e) => typeof e == "string" && e.length <= Rt && Lt.test(e), Bt = (e) => typeof e == "string" && e.length <= Nt && Mt.test(e), Ft = (e) => typeof e == "string" && e.length <= Ot && Wt.test(e), Kt = (e) => Object.entries(e).map(([t, n]) => `${t}_${n}`).join(","), Ut = (e) => {
306
306
  const t = {};
307
307
  for (const n of e.split(",")) {
308
308
  const o = n.trim(), s = o.indexOf("_");
309
309
  s <= 0 || (t[o.slice(0, s)] = o.slice(s + 1));
310
310
  }
311
311
  return t;
312
- }, Ut = ({
312
+ }, _t = ({
313
313
  publicId: e,
314
- cloudName: t = Dt,
314
+ cloudName: t = Tt,
315
315
  transformations: n,
316
- width: o = Tt
316
+ width: o = xt
317
317
  }) => {
318
- const s = typeof n == "string" ? Kt(n) : n, i = {
319
- ...xt,
318
+ const s = typeof n == "string" ? Ut(n) : n, i = {
319
+ ...Et,
320
320
  ...s,
321
321
  w: o
322
322
  };
323
323
  return encodeURI(
324
- `https://res.cloudinary.com/${t}/image/upload/${Vt(i)}/${e}`
324
+ `https://res.cloudinary.com/${t}/image/upload/${Kt(i)}/${e}`
325
325
  );
326
- }, Ht = /^--[A-Za-z0-9_-]+$/, zt = 200, Ke = (e) => {
326
+ }, Ht = /^--[A-Za-z0-9_-]+$/, zt = 200, ue = (e) => {
327
327
  if (typeof e != "string")
328
328
  return !1;
329
329
  const t = e.trim();
330
330
  return t.length <= zt && Ht.test(t);
331
- }, k = (e) => `var(${e.trim()})`, w = (e) => {
331
+ }, k = (e) => `var(${e.trim()})`, C = (e) => {
332
332
  if (typeof e != "object" || e === null || Array.isArray(e))
333
333
  return;
334
334
  const t = e.cssVariable;
335
335
  if (t != null)
336
- return Ke(t) ? t.trim() : void 0;
337
- }, E = (e) => {
336
+ return ue(t) ? t.trim() : void 0;
337
+ }, $ = (e) => {
338
338
  if (typeof e != "object" || e === null || Array.isArray(e))
339
339
  return !1;
340
340
  const t = e.cssVariable;
341
- return t == null ? !1 : !Ke(t);
342
- }, es = (e, t) => {
343
- const n = w(e);
341
+ return t == null ? !1 : !ue(t);
342
+ }, ws = (e, t) => {
343
+ const n = C(e);
344
344
  return n ? { [t]: k(n) } : void 0;
345
345
  }, Gt = (e) => {
346
- if (typeof e != "object" || e === null || Array.isArray(e) || E(e))
346
+ if (typeof e != "object" || e === null || Array.isArray(e) || $(e))
347
347
  return !1;
348
- if (w(e))
348
+ if (C(e))
349
349
  return !0;
350
350
  const t = e;
351
- return t.source === "none" ? !0 : t.source === "url" ? Bt(t.url) : t.source === "cloudinary" ? !Ot(t.publicId) || t.cloudName !== void 0 && t.cloudName !== null && !jt(t.cloudName) ? !1 : t.transformations === void 0 || t.transformations === null || Ft(t.transformations) : !1;
352
- }, _t = ["px", "%", "em", "rem", "vh", "vw"], ue = ["inherit", "unset"], Yt = ["allSides", "top", "right", "bottom", "left"], j = (e, t = {}) => {
351
+ return t.source === "none" ? !0 : t.source === "url" ? Bt(t.url) : t.source === "cloudinary" ? !jt(t.publicId) || t.cloudName !== void 0 && t.cloudName !== null && !Vt(t.cloudName) ? !1 : t.transformations === void 0 || t.transformations === null || Ft(t.transformations) : !1;
352
+ }, Yt = ["px", "%", "em", "rem", "vh", "vw"], de = ["inherit", "unset"], qt = ["allSides", "top", "right", "bottom", "left"], F = (e, t = {}) => {
353
353
  if (typeof e != "object" || e === null || Array.isArray(e))
354
354
  return !1;
355
355
  const n = e;
356
- return E(e) ? !1 : w(e) ? !0 : n.unit === "auto" ? t.allowAuto !== !1 : n.unit === "keyword" ? t.allowKeywords !== !1 && ue.includes(n.keyword) : _t.includes(n.unit) ? typeof n.value != "number" || !Number.isFinite(n.value) ? !1 : t.allowNegative !== !1 || n.value >= 0 : !1;
357
- }, qt = (e, t = {}) => {
356
+ return $(e) ? !1 : C(e) ? !0 : n.unit === "auto" ? t.allowAuto !== !1 : n.unit === "keyword" ? t.allowKeywords !== !1 && de.includes(n.keyword) : Yt.includes(n.unit) ? typeof n.value != "number" || !Number.isFinite(n.value) ? !1 : t.allowNegative !== !1 || n.value >= 0 : !1;
357
+ }, Xt = (e, t = {}) => {
358
358
  if (typeof e != "object" || e === null || Array.isArray(e))
359
359
  return !1;
360
360
  const n = e;
361
- for (const o of Yt) {
361
+ for (const o of qt) {
362
362
  const s = n[o];
363
- if (s != null && !j(s, t))
363
+ if (s != null && !F(s, t))
364
364
  return !1;
365
365
  }
366
366
  return !0;
367
- }, Xt = [...ue, "transparent", "currentColor"], Zt = /^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\([^)]+\)|hsla?\([^)]+\))$/, de = (e) => {
367
+ }, Zt = [...de, "transparent", "currentColor"], Jt = /^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\([^)]+\)|hsla?\([^)]+\))$/, pe = (e) => {
368
368
  if (typeof e != "object" || e === null || Array.isArray(e))
369
369
  return !1;
370
370
  const t = e;
371
- return E(e) ? !1 : w(e) ? !0 : t.unit === "keyword" ? Xt.includes(t.keyword) : t.unit === "color" ? typeof t.value == "string" && Zt.test(t.value.trim()) : !1;
372
- }, pe = (e) => {
373
- const t = w(e);
371
+ return $(e) ? !1 : C(e) ? !0 : t.unit === "keyword" ? Zt.includes(t.keyword) : t.unit === "color" ? typeof t.value == "string" && Jt.test(t.value.trim()) : !1;
372
+ }, fe = (e) => {
373
+ const t = C(e);
374
374
  return t ? k(t) : "unit" in e ? e.unit === "keyword" ? e.keyword : e.value.trim() : "";
375
- }, Jt = (e, t) => typeof e == "object" && e !== null && !Array.isArray(e) ? !E(e) && !!w(e) : typeof e != "string" || !e.length ? !1 : t.includes(e) ? !0 : ue.includes(e), Qt = [
375
+ }, Qt = (e, t) => typeof e == "object" && e !== null && !Array.isArray(e) ? !$(e) && !!C(e) : typeof e != "string" || !e.length ? !1 : t.includes(e) ? !0 : de.includes(e), en = [
376
376
  'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
377
377
  'Georgia, "Times New Roman", Times, serif',
378
378
  "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",
379
379
  "Arial, Helvetica, sans-serif",
380
380
  '"Helvetica Neue", Helvetica, Arial, sans-serif',
381
381
  "Verdana, Geneva, sans-serif"
382
- ], en = [
382
+ ], tn = [
383
383
  "normal",
384
384
  "bold",
385
385
  "100",
@@ -391,43 +391,43 @@ const Jo = /* @__PURE__ */ D({
391
391
  "700",
392
392
  "800",
393
393
  "900"
394
- ], tn = ["normal", "italic", "oblique"], nn = [
394
+ ], nn = ["normal", "italic", "oblique"], on = [
395
395
  "left",
396
396
  "center",
397
397
  "right",
398
398
  "justify",
399
399
  "start",
400
400
  "end"
401
- ], on = [
401
+ ], sn = [
402
402
  "none",
403
403
  "underline",
404
404
  "line-through",
405
405
  "overline"
406
- ], sn = [
406
+ ], rn = [
407
407
  "none",
408
408
  "uppercase",
409
409
  "lowercase",
410
410
  "capitalize"
411
- ], ee = [
411
+ ], te = [
412
412
  "visible",
413
413
  "hidden",
414
414
  "scroll",
415
415
  "auto",
416
416
  "clip"
417
- ], rn = ["auto", "none"], ln = [
417
+ ], ln = ["auto", "none"], cn = [
418
418
  "flex-start",
419
419
  "flex-end",
420
420
  "center",
421
421
  "space-between",
422
422
  "space-around",
423
423
  "space-evenly"
424
- ], cn = [
424
+ ], an = [
425
425
  "flex-start",
426
426
  "flex-end",
427
427
  "center",
428
428
  "baseline",
429
429
  "stretch"
430
- ], an = ["wrap", "nowrap"], un = [
430
+ ], un = ["wrap", "nowrap"], dn = [
431
431
  "flex-start",
432
432
  "flex-end",
433
433
  "center",
@@ -435,12 +435,12 @@ const Jo = /* @__PURE__ */ D({
435
435
  "space-around",
436
436
  "space-evenly",
437
437
  "stretch"
438
- ], dn = [
438
+ ], pn = [
439
439
  "row",
440
440
  "row-reverse",
441
441
  "column",
442
442
  "column-reverse"
443
- ], pn = ["cover", "contain", "auto"], fn = [
443
+ ], fn = ["cover", "contain", "auto"], yn = [
444
444
  "center center",
445
445
  "center top",
446
446
  "center bottom",
@@ -450,20 +450,20 @@ const Jo = /* @__PURE__ */ D({
450
450
  "right center",
451
451
  "right top",
452
452
  "right bottom"
453
- ], yn = [
453
+ ], mn = [
454
454
  "no-repeat",
455
455
  "repeat",
456
456
  "repeat-x",
457
457
  "repeat-y",
458
458
  "space",
459
459
  "round"
460
- ], mn = [
460
+ ], gn = [
461
461
  "justifyContent",
462
462
  "alignItems",
463
463
  "flexWrap",
464
464
  "alignContent",
465
465
  "flexDirection"
466
- ], gn = [
466
+ ], hn = [
467
467
  "none",
468
468
  "solid",
469
469
  "dashed",
@@ -473,107 +473,107 @@ const Jo = /* @__PURE__ */ D({
473
473
  "ridge",
474
474
  "inset",
475
475
  "outset"
476
- ], hn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !E(e) && !!w(e) : gn.includes(e), bn = (e) => {
476
+ ], bn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !$(e) && !!C(e) : hn.includes(e), wn = (e) => {
477
477
  if (typeof e != "object" || e === null || Array.isArray(e))
478
478
  return !1;
479
479
  const t = e;
480
- return E(e) ? !1 : w(e) ? !0 : !(t.width !== void 0 && t.width !== null && !j(t.width, { allowAuto: !1, allowNegative: !1 }) || t.style !== void 0 && t.style !== null && !hn(t.style) || t.color !== void 0 && t.color !== null && !de(t.color));
481
- }, wn = {
480
+ return $(e) ? !1 : C(e) ? !0 : !(t.width !== void 0 && t.width !== null && !F(t.width, { allowAuto: !1, allowNegative: !1 }) || t.style !== void 0 && t.style !== null && !bn(t.style) || t.color !== void 0 && t.color !== null && !pe(t.color));
481
+ }, Cn = {
482
482
  allowAuto: !1,
483
483
  allowKeywords: !1,
484
484
  allowNegative: !0
485
- }, Cn = {
485
+ }, vn = {
486
486
  allowAuto: !1,
487
487
  allowKeywords: !1,
488
488
  allowNegative: !1
489
- }, vn = (e) => {
489
+ }, An = (e) => {
490
490
  if (typeof e != "object" || e === null || Array.isArray(e))
491
491
  return !1;
492
492
  const t = e;
493
- if (E(e))
493
+ if ($(e))
494
494
  return !1;
495
- if (w(e))
495
+ if (C(e))
496
496
  return !0;
497
497
  for (const n of ["offsetX", "offsetY", "spread"]) {
498
498
  const o = t[n];
499
- if (o != null && !j(o, wn))
499
+ if (o != null && !F(o, Cn))
500
500
  return !1;
501
501
  }
502
- return !(t.blur !== void 0 && t.blur !== null && !j(t.blur, Cn) || t.color !== void 0 && t.color !== null && !de(t.color) || t.inset !== void 0 && t.inset !== null && typeof t.inset != "boolean");
503
- }, An = (e) => e ? e.cssVariable !== void 0 && e.cssVariable !== null || e.offsetX !== void 0 || e.offsetY !== void 0 || e.blur !== void 0 || e.spread !== void 0 || e.color !== void 0 : !1, In = (e) => {
502
+ return !(t.blur !== void 0 && t.blur !== null && !F(t.blur, vn) || t.color !== void 0 && t.color !== null && !pe(t.color) || t.inset !== void 0 && t.inset !== null && typeof t.inset != "boolean");
503
+ }, In = (e) => e ? e.cssVariable !== void 0 && e.cssVariable !== null || e.offsetX !== void 0 || e.offsetY !== void 0 || e.blur !== void 0 || e.spread !== void 0 || e.color !== void 0 : !1, Sn = (e) => {
504
504
  if (typeof e != "object" || e === null || Array.isArray(e))
505
505
  return !1;
506
506
  const t = e;
507
- return E(e) ? !1 : w(e) ? !0 : t.unit === "number" ? typeof t.value == "number" && Number.isFinite(t.value) && t.value > 0 : j(e, { allowAuto: !1, allowNegative: !1 });
508
- }, Sn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !E(e) && !!w(e) : typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 1, kn = (e) => {
507
+ return $(e) ? !1 : C(e) ? !0 : t.unit === "number" ? typeof t.value == "number" && Number.isFinite(t.value) && t.value > 0 : F(e, { allowAuto: !1, allowNegative: !1 });
508
+ }, Dn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !$(e) && !!C(e) : typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 1, kn = (e) => {
509
509
  if (!Gt(e))
510
510
  return {};
511
- const t = w(e);
511
+ const t = C(e);
512
512
  if (t)
513
513
  return { backgroundImage: k(t) };
514
514
  const n = e;
515
515
  return n.source === "none" ? { backgroundImage: "none" } : n.source === "url" ? { backgroundImage: `url("${n.url}")` } : {
516
- backgroundImage: `url("${Ut({
516
+ backgroundImage: `url("${_t({
517
517
  publicId: n.publicId,
518
518
  cloudName: n.cloudName,
519
519
  transformations: n.transformations
520
520
  })}")`
521
521
  };
522
- }, B = (e) => {
523
- const t = w(e);
522
+ }, K = (e) => {
523
+ const t = C(e);
524
524
  return t ? k(t) : "unit" in e ? e.unit === "auto" ? "auto" : e.unit === "keyword" ? e.keyword : `${e.value}${e.unit}` : "";
525
- }, Dn = (e) => {
526
- if (!bn(e))
525
+ }, Tn = (e) => {
526
+ if (!wn(e))
527
527
  return {};
528
- const t = w(e);
528
+ const t = C(e);
529
529
  if (t)
530
530
  return { border: k(t) };
531
531
  const n = {};
532
- if (e.width && (n.borderWidth = B(e.width)), e.style) {
533
- const o = w(e.style);
532
+ if (e.width && (n.borderWidth = K(e.width)), e.style) {
533
+ const o = C(e.style);
534
534
  n.borderStyle = o ? k(o) : e.style;
535
535
  }
536
- return e.color && (n.borderColor = pe(e.color)), n;
537
- }, G = (e) => e ? B(e) : "0px", Tn = (e) => {
538
- if (!vn(e) || !An(e))
536
+ return e.color && (n.borderColor = fe(e.color)), n;
537
+ }, q = (e) => e ? K(e) : "0px", xn = (e) => {
538
+ if (!An(e) || !In(e))
539
539
  return {};
540
- const t = w(e);
540
+ const t = C(e);
541
541
  if (t)
542
542
  return { boxShadow: k(t) };
543
543
  const n = [
544
- G(e.offsetX),
545
- G(e.offsetY),
546
- G(e.blur),
547
- G(e.spread)
544
+ q(e.offsetX),
545
+ q(e.offsetY),
546
+ q(e.blur),
547
+ q(e.spread)
548
548
  ];
549
- return e.color && n.push(pe(e.color)), e.inset && n.unshift("inset"), { boxShadow: n.join(" ") };
550
- }, xn = (e) => `${e.charAt(0).toUpperCase()}${e.slice(1)}`, En = (e, t) => {
551
- if (!qt(e))
549
+ return e.color && n.push(fe(e.color)), e.inset && n.unshift("inset"), { boxShadow: n.join(" ") };
550
+ }, En = (e) => `${e.charAt(0).toUpperCase()}${e.slice(1)}`, Pn = (e, t) => {
551
+ if (!Xt(e))
552
552
  return {};
553
553
  if (e.allSides)
554
- return { [t]: B(e.allSides) };
554
+ return { [t]: K(e.allSides) };
555
555
  const n = {};
556
556
  for (const o of ["top", "right", "bottom", "left"]) {
557
557
  const s = e[o];
558
- s && (n[`${t}${xn(o)}`] = B(s));
558
+ s && (n[`${t}${En(o)}`] = K(s));
559
559
  }
560
560
  return n;
561
- }, Pn = (e, t) => de(e) ? { [t]: pe(e) } : {}, Ln = (e, t, n) => {
562
- if (!Jt(e, n))
561
+ }, $n = (e, t) => pe(e) ? { [t]: fe(e) } : {}, Ln = (e, t, n) => {
562
+ if (!Qt(e, n))
563
563
  return {};
564
- const o = w(e);
564
+ const o = C(e);
565
565
  return o ? { [t]: k(o) } : { [t]: e };
566
- }, $n = (e, t, n = {}) => j(e, n) ? { [t]: B(e) } : {}, Rn = (e) => {
567
- if (!In(e))
568
- return {};
569
- const t = w(e);
570
- return t ? { lineHeight: k(t) } : "unit" in e && e.unit === "number" ? { lineHeight: e.value } : { lineHeight: B(e) };
571
- }, Mn = (e) => {
566
+ }, Rn = (e, t, n = {}) => F(e, n) ? { [t]: K(e) } : {}, Mn = (e) => {
572
567
  if (!Sn(e))
573
568
  return {};
574
- const t = w(e);
569
+ const t = C(e);
570
+ return t ? { lineHeight: k(t) } : "unit" in e && e.unit === "number" ? { lineHeight: e.value } : { lineHeight: K(e) };
571
+ }, Nn = (e) => {
572
+ if (!Dn(e))
573
+ return {};
574
+ const t = C(e);
575
575
  return t ? { opacity: k(t) } : { opacity: e };
576
- }, fe = {
576
+ }, ye = {
577
577
  // Box spacing (4-sided)
578
578
  "margin-3-resolutions": { kind: "boxSpacing", cssProperty: "margin" },
579
579
  "padding-3-resolutions": { kind: "boxSpacing", cssProperty: "padding" },
@@ -627,44 +627,44 @@ const Jo = /* @__PURE__ */ D({
627
627
  "justify-content-3-resolutions": {
628
628
  kind: "enum",
629
629
  cssProperty: "justifyContent",
630
- allowedValues: ln
630
+ allowedValues: cn
631
631
  },
632
632
  "align-items-3-resolutions": {
633
633
  kind: "enum",
634
634
  cssProperty: "alignItems",
635
- allowedValues: cn
635
+ allowedValues: an
636
636
  },
637
637
  "flex-wrap-3-resolutions": {
638
638
  kind: "enum",
639
639
  cssProperty: "flexWrap",
640
- allowedValues: an
640
+ allowedValues: un
641
641
  },
642
642
  "align-content-3-resolutions": {
643
643
  kind: "enum",
644
644
  cssProperty: "alignContent",
645
- allowedValues: un
645
+ allowedValues: dn
646
646
  },
647
647
  "flex-direction-3-resolutions": {
648
648
  kind: "enum",
649
649
  cssProperty: "flexDirection",
650
- allowedValues: dn
650
+ allowedValues: pn
651
651
  },
652
652
  // Overflow — shorthand and longhands are independent attributes; when
653
653
  // both are set, the browser's cascade decides the effective overflow.
654
654
  "overflow-3-resolutions": {
655
655
  kind: "enum",
656
656
  cssProperty: "overflow",
657
- allowedValues: ee
657
+ allowedValues: te
658
658
  },
659
659
  "overflow-x-3-resolutions": {
660
660
  kind: "enum",
661
661
  cssProperty: "overflowX",
662
- allowedValues: ee
662
+ allowedValues: te
663
663
  },
664
664
  "overflow-y-3-resolutions": {
665
665
  kind: "enum",
666
666
  cssProperty: "overflowY",
667
- allowedValues: ee
667
+ allowedValues: te
668
668
  },
669
669
  // Color
670
670
  // Pointer input. On an overlay layer this is lifted onto the absolutely
@@ -672,7 +672,7 @@ const Jo = /* @__PURE__ */ D({
672
672
  "pointer-events-3-resolutions": {
673
673
  kind: "enum",
674
674
  cssProperty: "pointerEvents",
675
- allowedValues: rn
675
+ allowedValues: ln
676
676
  },
677
677
  "background-color-3-resolutions": { kind: "color", cssProperty: "backgroundColor" },
678
678
  "color-3-resolutions": { kind: "color", cssProperty: "color" },
@@ -683,17 +683,17 @@ const Jo = /* @__PURE__ */ D({
683
683
  "background-size-3-resolutions": {
684
684
  kind: "enum",
685
685
  cssProperty: "backgroundSize",
686
- allowedValues: pn
686
+ allowedValues: fn
687
687
  },
688
688
  "background-position-3-resolutions": {
689
689
  kind: "enum",
690
690
  cssProperty: "backgroundPosition",
691
- allowedValues: fn
691
+ allowedValues: yn
692
692
  },
693
693
  "background-repeat-3-resolutions": {
694
694
  kind: "enum",
695
695
  cssProperty: "backgroundRepeat",
696
- allowedValues: yn
696
+ allowedValues: mn
697
697
  },
698
698
  // Opacity (0–1 number)
699
699
  "opacity-3-resolutions": { kind: "opacity" },
@@ -701,7 +701,7 @@ const Jo = /* @__PURE__ */ D({
701
701
  "font-family-3-resolutions": {
702
702
  kind: "enum",
703
703
  cssProperty: "fontFamily",
704
- allowedValues: Qt
704
+ allowedValues: en
705
705
  },
706
706
  "font-size-3-resolutions": {
707
707
  kind: "length",
@@ -711,12 +711,12 @@ const Jo = /* @__PURE__ */ D({
711
711
  "font-weight-3-resolutions": {
712
712
  kind: "enum",
713
713
  cssProperty: "fontWeight",
714
- allowedValues: en
714
+ allowedValues: tn
715
715
  },
716
716
  "font-style-3-resolutions": {
717
717
  kind: "enum",
718
718
  cssProperty: "fontStyle",
719
- allowedValues: tn
719
+ allowedValues: nn
720
720
  },
721
721
  "line-height-3-resolutions": { kind: "lineHeight" },
722
722
  "letter-spacing-3-resolutions": {
@@ -727,68 +727,68 @@ const Jo = /* @__PURE__ */ D({
727
727
  "text-align-3-resolutions": {
728
728
  kind: "enum",
729
729
  cssProperty: "textAlign",
730
- allowedValues: nn
730
+ allowedValues: on
731
731
  },
732
732
  "text-decoration-3-resolutions": {
733
733
  kind: "enum",
734
734
  cssProperty: "textDecoration",
735
- allowedValues: on
735
+ allowedValues: sn
736
736
  },
737
737
  "text-transform-3-resolutions": {
738
738
  kind: "enum",
739
739
  cssProperty: "textTransform",
740
- allowedValues: sn
740
+ allowedValues: rn
741
741
  }
742
- }, Nn = (e, t) => {
743
- const n = fe[e];
742
+ }, Wn = (e, t) => {
743
+ const n = ye[e];
744
744
  if (!n)
745
745
  return {};
746
746
  switch (n.kind) {
747
747
  case "boxSpacing":
748
- return En(t, n.cssProperty);
748
+ return Pn(t, n.cssProperty);
749
749
  case "length":
750
- return $n(t, n.cssProperty, n.capabilities);
750
+ return Rn(t, n.cssProperty, n.capabilities);
751
751
  case "border":
752
- return Dn(t);
753
- case "boxShadow":
754
752
  return Tn(t);
753
+ case "boxShadow":
754
+ return xn(t);
755
755
  case "color":
756
- return Pn(t, n.cssProperty);
756
+ return $n(t, n.cssProperty);
757
757
  case "opacity":
758
- return Mn(t);
758
+ return Nn(t);
759
759
  case "enum":
760
760
  return Ln(t, n.cssProperty, n.allowedValues);
761
761
  case "lineHeight":
762
- return Rn(t);
762
+ return Mn(t);
763
763
  case "backgroundImage":
764
764
  return kn(t);
765
765
  default:
766
766
  return {};
767
767
  }
768
- }, ts = Object.fromEntries(
769
- Object.entries(fe).filter(([, e]) => e.kind === "boxSpacing").map(([e, t]) => [
768
+ }, Cs = Object.fromEntries(
769
+ Object.entries(ye).filter(([, e]) => e.kind === "boxSpacing").map(([e, t]) => [
770
770
  e,
771
771
  t.cssProperty
772
772
  ])
773
- ), Wn = (e) => e != null && e !== "", On = (e) => e ? !mn.some(
774
- (n) => Wn(e[n])
775
- ) || e.display === "flex" ? e : { ...e, display: "flex" } : {}, jn = ({
773
+ ), On = (e) => e != null && e !== "", jn = (e) => e ? !gn.some(
774
+ (n) => On(e[n])
775
+ ) || e.display === "flex" ? e : { ...e, display: "flex" } : {}, Vn = ({
776
776
  dbEntryType: e,
777
777
  libraryId: t,
778
778
  sourceComponentsPlugin: n
779
779
  }) => {
780
780
  if (!(e != null && e.length))
781
781
  return;
782
- const o = n.components[Re(t, e)];
782
+ const o = n.components[Me(t, e)];
783
783
  if (!o || !("defaultAttributeValues" in o))
784
784
  return;
785
785
  const i = o.defaultAttributeValues;
786
786
  if (i != null && i.length)
787
- return i.reduce((r, f) => ({
787
+ return i.reduce((r, u) => ({
788
788
  ...r,
789
- [f.name]: f.defaultValues
789
+ [u.name]: u.defaultValues
790
790
  }), {});
791
- }, L = ({
791
+ }, N = ({
792
792
  deviceDisplayType: e,
793
793
  componentAttributes: t
794
794
  }) => {
@@ -800,8 +800,8 @@ const Jo = /* @__PURE__ */ D({
800
800
  )) {
801
801
  if (!s.includes("3-resolutions") || !i)
802
802
  continue;
803
- const r = i.all, f = r ?? i[e.toLowerCase()];
804
- o[s] = f, fe[s] && Object.assign(n, Nn(s, f));
803
+ const r = i.all, u = r ?? i[e.toLowerCase()];
804
+ o[s] = u, ye[s] && Object.assign(n, Wn(s, u));
805
805
  }
806
806
  return Object.keys(n).length || Object.keys(o).length ? {
807
807
  styles: Object.keys(n).length ? n : void 0,
@@ -813,23 +813,23 @@ const Jo = /* @__PURE__ */ D({
813
813
  defaultAttributes: e,
814
814
  userModifiedAttributes: t
815
815
  }) => e ? t ? { ...e, ...t } : e : t;
816
- function Y(e) {
816
+ function Z(e) {
817
817
  return e.componentAttributes ?? e.widgetAttributes;
818
818
  }
819
- function Ie({
819
+ function Se({
820
820
  col: e,
821
821
  deviceDisplayType: t,
822
822
  isComposeMode: n,
823
823
  sourceComponentsPlugin: o
824
824
  }) {
825
- const s = Y(e), i = jn({
825
+ const s = Z(e), i = Vn({
826
826
  dbEntryType: e.type,
827
827
  libraryId: e.libraryId,
828
828
  sourceComponentsPlugin: o
829
829
  }) || [], r = Bn({
830
830
  defaultAttributes: i,
831
831
  userModifiedAttributes: s
832
- }), { styles: f, componentAttributesSpecificToDeviceType: m } = L({
832
+ }), { styles: u, componentAttributesSpecificToDeviceType: m } = N({
833
833
  deviceDisplayType: t,
834
834
  componentAttributes: r
835
835
  }) || {
@@ -838,24 +838,24 @@ function Ie({
838
838
  };
839
839
  let c = {};
840
840
  const a = {};
841
- if (f)
842
- for (const [d, l] of Object.entries(f))
843
- n && a[d] || (c = {
841
+ if (u)
842
+ for (const [p, l] of Object.entries(u))
843
+ n && a[p] || (c = {
844
844
  ...c,
845
- [d]: l
845
+ [p]: l
846
846
  });
847
- let u = Y(e);
848
- for (const d in m)
849
- if (d.includes("3-resolutions")) {
850
- u = {
851
- ...Y(e) || {},
847
+ let d = Z(e);
848
+ for (const p in m)
849
+ if (p.includes("3-resolutions")) {
850
+ d = {
851
+ ...Z(e) || {},
852
852
  ...m || {}
853
853
  };
854
854
  break;
855
855
  }
856
856
  return {
857
- componentAttributesBasedOnDevice: u,
858
- componentStyles: On(c)
857
+ componentAttributesBasedOnDevice: d,
858
+ componentStyles: jn(c)
859
859
  };
860
860
  }
861
861
  const Fn = (e) => {
@@ -864,16 +864,16 @@ const Fn = (e) => {
864
864
  if (((n == null ? void 0 : n.columns) || []).length > 0)
865
865
  return !0;
866
866
  return (e == null ? void 0 : e.containerAttributes) && Object.keys(e.containerAttributes).length > 0;
867
- }, Vn = "var(--sl-spacing-x-small)";
868
- function Kn(e) {
867
+ }, Kn = "var(--sl-spacing-x-small)";
868
+ function Un(e) {
869
869
  return e != null && e.horizontalAlignment || e != null && e.verticalAlignment || e != null && e.flexWrap || e != null && e.gap || e != null && e.alignContent ? !0 : !!(e != null && e.rowAttributes && Object.keys(e.rowAttributes).length > 0);
870
870
  }
871
- function Un({
871
+ function _n({
872
872
  row: e,
873
873
  deviceDisplayType: t
874
874
  }) {
875
875
  var o;
876
- const n = L({
876
+ const n = N({
877
877
  deviceDisplayType: t,
878
878
  componentAttributes: e.rowAttributes
879
879
  });
@@ -885,10 +885,10 @@ function Hn({
885
885
  isComposeMode: n
886
886
  }) {
887
887
  var l;
888
- const o = ((l = L({
888
+ const o = ((l = N({
889
889
  deviceDisplayType: t,
890
890
  componentAttributes: e.rowAttributes
891
- })) == null ? void 0 : l.styles) || {}, s = o.justifyContent ?? e.horizontalAlignment ?? Ae.Center, i = o.alignItems ?? e.verticalAlignment ?? Ae.Center, r = o.flexDirection ?? "row", f = o.gap ?? e.gap ?? Vn, m = n ? "nowrap" : o.flexWrap ?? e.flexWrap ?? "nowrap", c = o.alignContent ?? e.alignContent ?? void 0, a = /* @__PURE__ */ new Set([
891
+ })) == null ? void 0 : l.styles) || {}, s = o.justifyContent ?? e.horizontalAlignment ?? Ie.Center, i = o.alignItems ?? e.verticalAlignment ?? Ie.Center, r = o.flexDirection ?? "row", u = o.gap ?? e.gap ?? Kn, m = n ? "nowrap" : o.flexWrap ?? e.flexWrap ?? "nowrap", c = o.alignContent ?? e.alignContent ?? void 0, a = /* @__PURE__ */ new Set([
892
892
  "justifyContent",
893
893
  "alignItems",
894
894
  "flexDirection",
@@ -896,21 +896,21 @@ function Hn({
896
896
  "flexWrap",
897
897
  "alignContent",
898
898
  "display"
899
- ]), u = {};
900
- for (const [g, p] of Object.entries(o))
901
- a.has(g) || (u[g] = p);
902
- const d = {
899
+ ]), d = {};
900
+ for (const [g, f] of Object.entries(o))
901
+ a.has(g) || (d[g] = f);
902
+ const p = {
903
903
  display: "flex",
904
904
  flexDirection: r,
905
- gap: f,
905
+ gap: u,
906
906
  flexWrap: m,
907
907
  justifyContent: s,
908
908
  alignItems: i,
909
- ...u
909
+ ...d
910
910
  };
911
- return c !== void 0 && (d.alignContent = c), d;
911
+ return c !== void 0 && (p.alignContent = c), p;
912
912
  }
913
- const ye = "css-classes-3-resolutions", zn = 500, Gn = /[\x00-\x1f\x7f]/g, me = (e) => {
913
+ const me = "css-classes-3-resolutions", zn = 500, Gn = /[\x00-\x1f\x7f]/g, ge = (e) => {
914
914
  if (typeof e != "string")
915
915
  return;
916
916
  const t = /* @__PURE__ */ new Set(), n = [];
@@ -928,7 +928,7 @@ const ye = "css-classes-3-resolutions", zn = 500, Gn = /[\x00-\x1f\x7f]/g, me =
928
928
  o = i;
929
929
  }
930
930
  return o.length ? o : void 0;
931
- }, Ue = "hide-component-3-resolutions", _n = "pointer-events-3-resolutions", Yn = [
931
+ }, Ue = "hide-component-3-resolutions", Yn = "pointer-events-3-resolutions", qn = [
932
932
  "width-3-resolutions",
933
933
  "min-width-3-resolutions",
934
934
  "max-width-3-resolutions",
@@ -944,22 +944,22 @@ const ye = "css-classes-3-resolutions", zn = 500, Gn = /[\x00-\x1f\x7f]/g, me =
944
944
  "overflow-x-3-resolutions",
945
945
  "overflow-y-3-resolutions",
946
946
  Ue,
947
- _n
948
- ], qn = new Set(
949
947
  Yn
948
+ ], Xn = new Set(
949
+ qn
950
950
  );
951
- function ge({
951
+ function he({
952
952
  containerAttributes: e,
953
953
  deviceDisplayType: t
954
954
  }) {
955
955
  var o;
956
- const n = L({
956
+ const n = N({
957
957
  deviceDisplayType: t,
958
958
  componentAttributes: e
959
959
  });
960
960
  return ((o = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : o[Ue]) === "true";
961
961
  }
962
- function He({
962
+ function _e({
963
963
  containerAttributes: e,
964
964
  deviceDisplayType: t,
965
965
  isComposeMode: n
@@ -969,44 +969,44 @@ function He({
969
969
  return { styles: {} };
970
970
  const o = n ? Object.fromEntries(
971
971
  Object.entries(e).filter(
972
- ([r]) => !qn.has(r)
972
+ ([r]) => !Xn.has(r)
973
973
  )
974
- ) : e, s = L({
974
+ ) : e, s = N({
975
975
  deviceDisplayType: t,
976
976
  componentAttributes: o
977
977
  });
978
978
  return {
979
979
  styles: (s == null ? void 0 : s.styles) ?? {},
980
- cssClasses: me(
981
- (i = s == null ? void 0 : s.componentAttributesSpecificToDeviceType) == null ? void 0 : i[ye]
980
+ cssClasses: ge(
981
+ (i = s == null ? void 0 : s.componentAttributesSpecificToDeviceType) == null ? void 0 : i[me]
982
982
  )
983
983
  };
984
984
  }
985
- function Xn(e) {
985
+ function Zn(e) {
986
986
  return Object.keys(e.styles).length > 0 || !!e.cssClasses;
987
987
  }
988
- function ze({
988
+ function He({
989
989
  containerAttributes: e,
990
990
  widgetContainerStyles: t
991
991
  }) {
992
- return ((e == null ? void 0 : e[oe]) || []).some(
992
+ return ((e == null ? void 0 : e[se]) || []).some(
993
993
  (o) => o.toLowerCase().startsWith("height:")
994
994
  ) || t.styles.height !== void 0;
995
995
  }
996
- const Zn = "z-index-3-resolutions", Ge = 0;
997
- function Jn(e) {
996
+ const Jn = "z-index-3-resolutions", ze = 0;
997
+ function Qn(e) {
998
998
  var t, n;
999
999
  return !!((n = (t = e == null ? void 0 : e.overlayLayers) == null ? void 0 : t.layers) != null && n.length);
1000
1000
  }
1001
- function Se({
1001
+ function De({
1002
1002
  containerAttributes: e,
1003
1003
  deviceDisplayType: t
1004
1004
  }) {
1005
1005
  var s;
1006
- const n = L({
1006
+ const n = N({
1007
1007
  deviceDisplayType: t,
1008
1008
  componentAttributes: e
1009
- }), o = (s = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : s[Zn];
1009
+ }), o = (s = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : s[Jn];
1010
1010
  if (typeof o == "number" && Number.isFinite(o))
1011
1011
  return o;
1012
1012
  if (typeof o == "string" && o.trim().length) {
@@ -1014,33 +1014,33 @@ function Se({
1014
1014
  if (Number.isFinite(i))
1015
1015
  return i;
1016
1016
  }
1017
- return Ge;
1017
+ return ze;
1018
1018
  }
1019
- function Qn(e, t) {
1019
+ function eo(e, t) {
1020
1020
  return e + t + 1;
1021
1021
  }
1022
- function eo({
1022
+ function to({
1023
1023
  containerAttributes: e,
1024
1024
  deviceDisplayType: t
1025
1025
  }) {
1026
1026
  var s;
1027
- const n = L({
1027
+ const n = N({
1028
1028
  deviceDisplayType: t,
1029
1029
  componentAttributes: e
1030
1030
  }), o = (s = n == null ? void 0 : n.styles) == null ? void 0 : s.pointerEvents;
1031
1031
  return typeof o == "string" ? o : void 0;
1032
1032
  }
1033
- function to({
1033
+ function no({
1034
1034
  layer: e,
1035
1035
  deviceDisplayType: t
1036
1036
  }) {
1037
1037
  var n;
1038
- return (n = e == null ? void 0 : e.rows) != null && n.length ? ge({
1038
+ return (n = e == null ? void 0 : e.rows) != null && n.length ? he({
1039
1039
  containerAttributes: e.containerAttributes,
1040
1040
  deviceDisplayType: t
1041
1041
  }) : !0;
1042
1042
  }
1043
- function no({
1043
+ function oo({
1044
1044
  isWithinCollection: e,
1045
1045
  baseDeclaresOwnHeight: t,
1046
1046
  baseZIndex: n
@@ -1051,10 +1051,10 @@ function no({
1051
1051
  display: "flex",
1052
1052
  flexDirection: "column",
1053
1053
  ...t ? {} : { height: e ? "auto" : "100%" },
1054
- ...n === Ge ? {} : { zIndex: n }
1054
+ ...n === ze ? {} : { zIndex: n }
1055
1055
  };
1056
1056
  }
1057
- function oo({
1057
+ function so({
1058
1058
  zIndex: e,
1059
1059
  pointerEvents: t
1060
1060
  }) {
@@ -1069,8 +1069,8 @@ function oo({
1069
1069
  ...t ? { pointerEvents: t } : {}
1070
1070
  };
1071
1071
  }
1072
- const he = "/";
1073
- function so({
1072
+ const be = "/";
1073
+ function io({
1074
1074
  componentProps: e,
1075
1075
  ancestorColumnIds: t,
1076
1076
  columnId: n
@@ -1079,40 +1079,40 @@ function so({
1079
1079
  return;
1080
1080
  const o = [...t ?? [], n];
1081
1081
  for (let s = 0; s < o.length; s += 1) {
1082
- const i = o.slice(s).join(he), r = e[i];
1082
+ const i = o.slice(s).join(be), r = e[i];
1083
1083
  if (r)
1084
1084
  return r;
1085
1085
  }
1086
1086
  }
1087
- function io({
1087
+ function ro({
1088
1088
  displayItemList: e,
1089
1089
  widgetCollections: t
1090
1090
  }) {
1091
1091
  const n = [], o = (s, i) => {
1092
1092
  var r;
1093
1093
  if ((r = s == null ? void 0 : s.rows) != null && r.length)
1094
- for (const f of s.rows)
1095
- for (const m of f.columns) {
1094
+ for (const u of s.rows)
1095
+ for (const m of u.columns) {
1096
1096
  if (!m.id || m.type === ce.DroppableBox)
1097
1097
  continue;
1098
- const c = je(m.type);
1098
+ const c = Ve(m.type);
1099
1099
  if (c != null && c.length) {
1100
1100
  const a = m.collection ?? (t == null ? void 0 : t[c]);
1101
1101
  a && !i.includes(m.id) && o(a.collectionRows, [...i, m.id]);
1102
1102
  continue;
1103
1103
  }
1104
1104
  n.push(
1105
- [...i, m.id].join(he)
1105
+ [...i, m.id].join(be)
1106
1106
  );
1107
1107
  }
1108
1108
  };
1109
1109
  return o(e, []), n;
1110
1110
  }
1111
- function ro(e, t) {
1112
- const n = `${he}${e}`;
1111
+ function lo(e, t) {
1112
+ const n = `${be}${e}`;
1113
1113
  return t.some((o) => o === e || o.endsWith(n));
1114
1114
  }
1115
- function lo({
1115
+ function co({
1116
1116
  componentProps: e,
1117
1117
  displayItemList: t,
1118
1118
  widgetCollections: n
@@ -1120,13 +1120,13 @@ function lo({
1120
1120
  const o = e ? Object.keys(e) : [];
1121
1121
  if (!o.length)
1122
1122
  return [];
1123
- const s = io({
1123
+ const s = ro({
1124
1124
  displayItemList: t,
1125
1125
  widgetCollections: n
1126
1126
  });
1127
- return o.filter((i) => !ro(i, s));
1127
+ return o.filter((i) => !lo(i, s));
1128
1128
  }
1129
- function co({
1129
+ function ao({
1130
1130
  componentProps: e,
1131
1131
  displayItemList: t,
1132
1132
  widgetCollections: n,
@@ -1134,7 +1134,7 @@ function co({
1134
1134
  }) {
1135
1135
  if (process.env.NODE_ENV === "production")
1136
1136
  return;
1137
- const s = lo({
1137
+ const s = co({
1138
1138
  componentProps: e,
1139
1139
  displayItemList: t,
1140
1140
  widgetCollections: n
@@ -1143,68 +1143,68 @@ function co({
1143
1143
  `RuleCMSWidget "${o}": componentProps ${s.map((i) => `"${i}"`).join(", ")} ${s.length === 1 ? "matches" : "match"} no component in this widget, so those props were not passed to anything. Keys are column ids from the widget config — the composer's Modify drawer shows the id of the selected component.`
1144
1144
  );
1145
1145
  }
1146
- function ao(e) {
1146
+ function uo(e) {
1147
1147
  return typeof e == "object" && e !== null && !Array.isArray(e);
1148
1148
  }
1149
- function uo(e) {
1149
+ function po(e) {
1150
1150
  if (e.all !== void 0 && e.all !== null)
1151
1151
  return !1;
1152
1152
  const t = e.phone, n = e.tablet, o = e.desktop;
1153
1153
  return t !== n || t !== o || n !== o;
1154
1154
  }
1155
- function se(e) {
1155
+ function ie(e) {
1156
1156
  var t, n;
1157
1157
  if (!((t = e == null ? void 0 : e.rows) != null && t.length))
1158
1158
  return !1;
1159
- if (te(e.containerAttributes))
1159
+ if (ne(e.containerAttributes))
1160
1160
  return !0;
1161
1161
  for (const o of e.rows) {
1162
- if (te(o.rowAttributes))
1162
+ if (ne(o.rowAttributes))
1163
1163
  return !0;
1164
1164
  for (const s of o.columns)
1165
- if (te(Y(s)))
1165
+ if (ne(Z(s)))
1166
1166
  return !0;
1167
1167
  }
1168
1168
  for (const o of ((n = e.overlayLayers) == null ? void 0 : n.layers) ?? [])
1169
- if (se(o))
1169
+ if (ie(o))
1170
1170
  return !0;
1171
1171
  return !1;
1172
1172
  }
1173
- function te(e) {
1173
+ function ne(e) {
1174
1174
  if (!e)
1175
1175
  return !1;
1176
1176
  for (const [t, n] of Object.entries(e))
1177
- if (!(!t.includes("3-resolutions") || !ao(n))) {
1177
+ if (!(!t.includes("3-resolutions") || !uo(n))) {
1178
1178
  if (t === "hide-component-3-resolutions") {
1179
1179
  const o = n, s = (i) => i === "true" || i === !0;
1180
1180
  if (s(o.phone) !== s(o.tablet) || s(o.phone) !== s(o.desktop))
1181
1181
  return !0;
1182
1182
  continue;
1183
1183
  }
1184
- if (uo(n))
1184
+ if (po(n))
1185
1185
  return !0;
1186
1186
  }
1187
1187
  return !1;
1188
1188
  }
1189
- function po(e, t) {
1190
- if (se(e))
1189
+ function fo(e, t) {
1190
+ if (ie(e))
1191
1191
  return !0;
1192
1192
  for (const n of Object.values(t))
1193
- if (se(n.collectionRows))
1193
+ if (ie(n.collectionRows))
1194
1194
  return !0;
1195
1195
  return !1;
1196
1196
  }
1197
- const _e = parseInt(Fe, 10), Ye = parseInt(Ve, 10), fo = _e + 1, yo = Ye + 1;
1198
- function mo(e) {
1197
+ const Ge = parseInt(Fe, 10), Ye = parseInt(Ke, 10), yo = Ge + 1, mo = Ye + 1;
1198
+ function go(e) {
1199
1199
  const t = `.${e}-phone`, n = `.${e}-tablet`, o = `.${e}-desktop`;
1200
1200
  return `
1201
1201
  ${t}, ${n}, ${o} { display: none; }
1202
- @media (max-width: ${_e}px) { ${t} { display: block; } }
1203
- @media (min-width: ${fo}px) and (max-width: ${Ye}px) { ${n} { display: block; } }
1204
- @media (min-width: ${yo}px) { ${o} { display: block; } }
1202
+ @media (max-width: ${Ge}px) { ${t} { display: block; } }
1203
+ @media (min-width: ${yo}px) and (max-width: ${Ye}px) { ${n} { display: block; } }
1204
+ @media (min-width: ${mo}px) { ${o} { display: block; } }
1205
1205
  `.trim();
1206
1206
  }
1207
- function ne(e) {
1207
+ function oe(e) {
1208
1208
  if (!e)
1209
1209
  throw new Error("Source components plugin is required, but no plugins were provided");
1210
1210
  const t = e.sourceComponents;
@@ -1218,7 +1218,7 @@ function ne(e) {
1218
1218
  );
1219
1219
  return t;
1220
1220
  }
1221
- const go = ["hidden"], ke = /* @__PURE__ */ D({
1221
+ const ho = ["hidden"], ke = /* @__PURE__ */ D({
1222
1222
  __name: "EmbedInVerticalContainer",
1223
1223
  props: {
1224
1224
  displayItemList: {},
@@ -1231,59 +1231,59 @@ const go = ["hidden"], ke = /* @__PURE__ */ D({
1231
1231
  const t = e;
1232
1232
  let n = 0;
1233
1233
  const o = `rulecms-vc-${++n}`;
1234
- function s(g, p, I) {
1234
+ function s(g, f, I) {
1235
1235
  const v = g && !I ? 3 : 1;
1236
- return !!(p != null && p.length) && p.length > v;
1236
+ return !!(f != null && f.length) && f.length > v;
1237
1237
  }
1238
1238
  const i = h(() => {
1239
- var p;
1240
- return (((p = t.displayItemList.containerAttributes) == null ? void 0 : p[oe]) || []).join(`;
1239
+ var f;
1240
+ return (((f = t.displayItemList.containerAttributes) == null ? void 0 : f[se]) || []).join(`;
1241
1241
  `);
1242
1242
  }), r = h(
1243
1243
  () => i.value ? `.${o} {
1244
1244
  ${i.value}
1245
1245
  }` : ""
1246
- ), f = h(
1247
- () => !t.isComposeMode && ge({
1246
+ ), u = h(
1247
+ () => !t.isComposeMode && he({
1248
1248
  containerAttributes: t.displayItemList.containerAttributes,
1249
1249
  deviceDisplayType: t.deviceDisplayType
1250
1250
  })
1251
1251
  ), m = h(
1252
- () => He({
1252
+ () => _e({
1253
1253
  containerAttributes: t.displayItemList.containerAttributes,
1254
1254
  deviceDisplayType: t.deviceDisplayType,
1255
1255
  isComposeMode: t.isComposeMode
1256
1256
  })
1257
1257
  ), c = h(() => {
1258
1258
  var I;
1259
- const g = ((I = t.displayItemList.containerAttributes) == null ? void 0 : I[oe]) || [], p = Xn(m.value);
1260
- return t.isComposeMode && !t.isWithinCollection || t.showDropContainers || g.length > 0 || p || s(t.isComposeMode, t.displayItemList.rows, t.isWithinCollection);
1259
+ const g = ((I = t.displayItemList.containerAttributes) == null ? void 0 : I[se]) || [], f = Zn(m.value);
1260
+ return t.isComposeMode && !t.isWithinCollection || t.showDropContainers || g.length > 0 || f || s(t.isComposeMode, t.displayItemList.rows, t.isWithinCollection);
1261
1261
  }), a = h(
1262
1262
  () => [i.value ? o : void 0, m.value.cssClasses].filter(Boolean).join(" ")
1263
- ), u = h(() => ({
1264
- ...ze({
1263
+ ), d = h(() => ({
1264
+ ...He({
1265
1265
  containerAttributes: t.displayItemList.containerAttributes,
1266
1266
  widgetContainerStyles: m.value
1267
1267
  }) ? {} : { height: t.isWithinCollection ? "auto" : "100%" },
1268
1268
  display: "flex",
1269
1269
  flexDirection: "column",
1270
1270
  ...m.value.styles
1271
- })), d = h(() => c.value ? a.value : ""), l = h(() => f.value ? { display: "none" } : c.value ? u.value : { display: "contents" });
1272
- return (g, p) => (y(), b("div", {
1273
- hidden: f.value || void 0,
1274
- class: K(d.value || void 0),
1271
+ })), p = h(() => c.value ? a.value : ""), l = h(() => u.value ? { display: "none" } : c.value ? d.value : { display: "contents" });
1272
+ return (g, f) => (y(), b("div", {
1273
+ hidden: u.value || void 0,
1274
+ class: H(p.value || void 0),
1275
1275
  style: S(l.value)
1276
1276
  }, [
1277
- i.value ? (y(), C(W("style"), { key: 0 }, {
1278
- default: M(() => [
1279
- le(q(r.value), 1)
1277
+ i.value ? (y(), w(M("style"), { key: 0 }, {
1278
+ default: E(() => [
1279
+ z(U(r.value), 1)
1280
1280
  ]),
1281
1281
  _: 1
1282
- })) : N("", !0),
1283
- re(g.$slots, "default")
1284
- ], 14, go));
1282
+ })) : P("", !0),
1283
+ le(g.$slots, "default")
1284
+ ], 14, ho));
1285
1285
  }
1286
- }), ho = ["hidden"], De = /* @__PURE__ */ D({
1286
+ }), bo = ["hidden"], Te = /* @__PURE__ */ D({
1287
1287
  __name: "EmbedInRow",
1288
1288
  props: {
1289
1289
  row: {},
@@ -1294,15 +1294,15 @@ ${i.value}
1294
1294
  },
1295
1295
  setup(e) {
1296
1296
  const t = e;
1297
- function n(c, a, u) {
1297
+ function n(c, a, d) {
1298
1298
  var l;
1299
- const d = c && !u ? 3 : 1;
1300
- return !!((l = a == null ? void 0 : a.columns) != null && l.length) && a.columns.length > d;
1299
+ const p = c && !d ? 3 : 1;
1300
+ return !!((l = a == null ? void 0 : a.columns) != null && l.length) && a.columns.length > p;
1301
1301
  }
1302
1302
  const o = h(
1303
- () => !t.isComposeMode && Un({ row: t.row, deviceDisplayType: t.deviceDisplayType })
1303
+ () => !t.isComposeMode && _n({ row: t.row, deviceDisplayType: t.deviceDisplayType })
1304
1304
  ), s = h(
1305
- () => t.showDropContainers || Kn(t.row) || n(t.isComposeMode, t.row, t.isWithinCollection)
1305
+ () => t.showDropContainers || Un(t.row) || n(t.isComposeMode, t.row, t.isWithinCollection)
1306
1306
  ), i = h(
1307
1307
  () => Hn({
1308
1308
  row: t.row,
@@ -1311,21 +1311,21 @@ ${i.value}
1311
1311
  })
1312
1312
  ), r = h(() => {
1313
1313
  var a;
1314
- const c = L({
1314
+ const c = N({
1315
1315
  deviceDisplayType: t.deviceDisplayType,
1316
1316
  componentAttributes: t.row.rowAttributes
1317
1317
  });
1318
- return me(
1319
- (a = c == null ? void 0 : c.componentAttributesSpecificToDeviceType) == null ? void 0 : a[ye]
1318
+ return ge(
1319
+ (a = c == null ? void 0 : c.componentAttributesSpecificToDeviceType) == null ? void 0 : a[me]
1320
1320
  ) ?? "";
1321
- }), f = h(() => s.value ? r.value : ""), m = h(() => o.value ? { display: "none" } : s.value ? i.value : { display: "contents" });
1321
+ }), u = h(() => s.value ? r.value : ""), m = h(() => o.value ? { display: "none" } : s.value ? i.value : { display: "contents" });
1322
1322
  return (c, a) => (y(), b("div", {
1323
1323
  hidden: o.value || void 0,
1324
- class: K(f.value || void 0),
1324
+ class: H(u.value || void 0),
1325
1325
  style: S(m.value)
1326
1326
  }, [
1327
- re(c.$slots, "default")
1328
- ], 14, ho));
1327
+ le(c.$slots, "default")
1328
+ ], 14, bo));
1329
1329
  }
1330
1330
  }), qe = [
1331
1331
  "minWidth",
@@ -1379,20 +1379,20 @@ ${i.value}
1379
1379
  "textAlign",
1380
1380
  "textDecoration",
1381
1381
  "textTransform"
1382
- ], bo = (e) => e != null && e !== "", wo = (e) => e ? qe.reduce(
1382
+ ], wo = (e) => e != null && e !== "", Co = (e) => e ? qe.reduce(
1383
1383
  (t, n) => {
1384
1384
  const o = e[n];
1385
- return bo(o) && (t[n] = o), t;
1385
+ return wo(o) && (t[n] = o), t;
1386
1386
  },
1387
1387
  {}
1388
- ) : {}, Co = (e) => {
1388
+ ) : {}, vo = (e) => {
1389
1389
  if (!e)
1390
1390
  return;
1391
1391
  const t = { ...e };
1392
1392
  for (const n of qe)
1393
1393
  delete t[n];
1394
1394
  return Object.keys(t).length ? t : void 0;
1395
- }, vo = (e) => Object.keys(e).length > 0, Ao = (e, t) => {
1395
+ }, Ao = (e) => Object.keys(e).length > 0, Io = (e, t) => {
1396
1396
  const n = (e == null ? void 0 : e.noContainer) ?? !1, o = e == null ? void 0 : e.resolveNoContainer;
1397
1397
  if (typeof o != "function")
1398
1398
  return n;
@@ -1410,7 +1410,7 @@ ${i.value}
1410
1410
  );
1411
1411
  }
1412
1412
  return n;
1413
- }, Io = (e, t) => {
1413
+ }, So = (e, t) => {
1414
1414
  const n = e == null ? void 0 : e.resolveRendersOwnElement;
1415
1415
  if (typeof n != "function")
1416
1416
  return !1;
@@ -1428,7 +1428,7 @@ ${i.value}
1428
1428
  );
1429
1429
  }
1430
1430
  return !1;
1431
- }, Te = /* @__PURE__ */ D({
1431
+ }, xe = /* @__PURE__ */ D({
1432
1432
  __name: "DisplayComponent",
1433
1433
  props: {
1434
1434
  componentType: {},
@@ -1440,7 +1440,7 @@ ${i.value}
1440
1440
  mounts: {}
1441
1441
  },
1442
1442
  setup(e) {
1443
- const t = e, n = h(() => t.components[Re(t.libraryId, t.componentType)]), o = h(() => {
1443
+ const t = e, n = h(() => t.components[Me(t.libraryId, t.componentType)]), o = h(() => {
1444
1444
  var g;
1445
1445
  const l = (g = n.value) == null ? void 0 : g.card;
1446
1446
  return l || (console.error(
@@ -1450,41 +1450,41 @@ ${i.value}
1450
1450
  componentAttributes: t.componentAttributes,
1451
1451
  styleProps: t.styleProps
1452
1452
  })), i = h(
1453
- () => n.value ? Ao(n.value, s.value) : !1
1454
- ), r = h(() => wo(t.styleProps)), f = h(
1455
- () => i.value ? Co(t.styleProps) : t.styleProps
1453
+ () => n.value ? Io(n.value, s.value) : !1
1454
+ ), r = h(() => Co(t.styleProps)), u = h(
1455
+ () => i.value ? vo(t.styleProps) : t.styleProps
1456
1456
  ), m = h(
1457
1457
  () => {
1458
1458
  var l;
1459
- return me((l = t.componentAttributes) == null ? void 0 : l[ye]);
1459
+ return ge((l = t.componentAttributes) == null ? void 0 : l[me]);
1460
1460
  }
1461
- ), c = h(() => i.value && vo(r.value)), a = h(
1462
- () => !i.value || (n.value ? Io(n.value, s.value) : !1)
1463
- ), u = h(
1461
+ ), c = h(() => i.value && Ao(r.value)), a = h(
1462
+ () => !i.value || (n.value ? So(n.value, s.value) : !1)
1463
+ ), d = h(
1464
1464
  () => !c.value && a.value ? m.value : void 0
1465
- ), d = h(() => ({
1465
+ ), p = h(() => ({
1466
1466
  componentAttributes: t.componentAttributes,
1467
- styleProps: f.value,
1468
- className: u.value,
1467
+ styleProps: u.value,
1468
+ className: d.value,
1469
1469
  widgetInstanceProps: t.widgetInstanceProps,
1470
1470
  mounts: t.mounts
1471
1471
  }));
1472
1472
  return (l, g) => o.value ? (y(), b(A, { key: 0 }, [
1473
1473
  c.value ? (y(), b("div", {
1474
1474
  key: 0,
1475
- class: K(m.value || void 0),
1475
+ class: H(m.value || void 0),
1476
1476
  style: S(r.value)
1477
1477
  }, [
1478
- (y(), C(W(o.value), J(we(d.value)), null, 16))
1478
+ (y(), w(M(o.value), Q(Ce(p.value)), null, 16))
1479
1479
  ], 6)) : !a.value && m.value ? (y(), b("div", {
1480
1480
  key: 1,
1481
- class: K(m.value)
1481
+ class: H(m.value)
1482
1482
  }, [
1483
- (y(), C(W(o.value), J(we(d.value)), null, 16))
1484
- ], 2)) : (y(), C(W(o.value), J(ot({ key: 2 }, d.value)), null, 16))
1485
- ], 64)) : N("", !0);
1483
+ (y(), w(M(o.value), Q(Ce(p.value)), null, 16))
1484
+ ], 2)) : (y(), w(M(o.value), Q(st({ key: 2 }, p.value)), null, 16))
1485
+ ], 64)) : P("", !0);
1486
1486
  }
1487
- }), So = ["data-rulecms-overlay-layer"], ko = /* @__PURE__ */ D({
1487
+ }), Do = ["data-rulecms-overlay-layer"], ko = /* @__PURE__ */ D({
1488
1488
  __name: "RenderComponentsInner",
1489
1489
  props: {
1490
1490
  displayItemList: {},
@@ -1500,41 +1500,41 @@ ${i.value}
1500
1500
  ancestorColumnIds: {}
1501
1501
  },
1502
1502
  setup(e) {
1503
- const t = e, n = () => ne(t.plugins).components, o = h(
1504
- () => !t.isComposeMode && Jn(t.displayItemList) && !ge({
1503
+ const t = e, n = () => oe(t.plugins).components, o = h(
1504
+ () => !t.isComposeMode && Qn(t.displayItemList) && !he({
1505
1505
  containerAttributes: t.displayItemList.containerAttributes,
1506
1506
  deviceDisplayType: t.deviceDisplayType
1507
1507
  })
1508
1508
  ), s = h(() => {
1509
- const u = Se({
1509
+ const d = De({
1510
1510
  containerAttributes: t.displayItemList.containerAttributes,
1511
1511
  deviceDisplayType: t.deviceDisplayType
1512
1512
  });
1513
- return no({
1513
+ return oo({
1514
1514
  isWithinCollection: t.isWithinCollection,
1515
- baseDeclaresOwnHeight: ze({
1515
+ baseDeclaresOwnHeight: He({
1516
1516
  containerAttributes: t.displayItemList.containerAttributes,
1517
- widgetContainerStyles: He({
1517
+ widgetContainerStyles: _e({
1518
1518
  containerAttributes: t.displayItemList.containerAttributes,
1519
1519
  deviceDisplayType: t.deviceDisplayType,
1520
1520
  isComposeMode: t.isComposeMode
1521
1521
  })
1522
1522
  }),
1523
- baseZIndex: u
1523
+ baseZIndex: d
1524
1524
  });
1525
1525
  }), i = h(() => {
1526
1526
  var l;
1527
- const u = ((l = t.displayItemList.overlayLayers) == null ? void 0 : l.layers) ?? [], d = Se({
1527
+ const d = ((l = t.displayItemList.overlayLayers) == null ? void 0 : l.layers) ?? [], p = De({
1528
1528
  containerAttributes: t.displayItemList.containerAttributes,
1529
1529
  deviceDisplayType: t.deviceDisplayType
1530
1530
  });
1531
- return u.flatMap((g, p) => to({ layer: g, deviceDisplayType: t.deviceDisplayType }) ? [] : [
1531
+ return d.flatMap((g, f) => no({ layer: g, deviceDisplayType: t.deviceDisplayType }) ? [] : [
1532
1532
  {
1533
- index: p,
1533
+ index: f,
1534
1534
  layer: g,
1535
- boxStyles: oo({
1536
- zIndex: Qn(d, p),
1537
- pointerEvents: eo({
1535
+ boxStyles: so({
1536
+ zIndex: eo(p, f),
1537
+ pointerEvents: to({
1538
1538
  containerAttributes: g.containerAttributes,
1539
1539
  deviceDisplayType: t.deviceDisplayType
1540
1540
  })
@@ -1542,65 +1542,65 @@ ${i.value}
1542
1542
  }
1543
1543
  ]);
1544
1544
  });
1545
- function r(u) {
1546
- if (t.isComposeMode && u.type === ce.DroppableBox)
1545
+ function r(d) {
1546
+ if (t.isComposeMode && d.type === ce.DroppableBox)
1547
1547
  return !1;
1548
- const { componentAttributesBasedOnDevice: d } = Ie({
1549
- col: u,
1548
+ const { componentAttributesBasedOnDevice: p } = Se({
1549
+ col: d,
1550
1550
  deviceDisplayType: t.deviceDisplayType,
1551
1551
  isComposeMode: t.isComposeMode,
1552
- sourceComponentsPlugin: ne(t.plugins)
1553
- }), l = !!d && d["hide-component-3-resolutions"] === "true";
1552
+ sourceComponentsPlugin: oe(t.plugins)
1553
+ }), l = !!p && p["hide-component-3-resolutions"] === "true";
1554
1554
  return !(!t.isComposeMode && l);
1555
1555
  }
1556
- function f(u) {
1557
- const { componentAttributesBasedOnDevice: d, componentStyles: l } = Ie({
1558
- col: u,
1556
+ function u(d) {
1557
+ const { componentAttributesBasedOnDevice: p, componentStyles: l } = Se({
1558
+ col: d,
1559
1559
  deviceDisplayType: t.deviceDisplayType,
1560
1560
  isComposeMode: t.isComposeMode,
1561
- sourceComponentsPlugin: ne(t.plugins)
1561
+ sourceComponentsPlugin: oe(t.plugins)
1562
1562
  });
1563
1563
  return {
1564
- componentAttributes: d,
1564
+ componentAttributes: p,
1565
1565
  styleProps: l
1566
1566
  };
1567
1567
  }
1568
- function m(u) {
1569
- const d = je(u.type);
1570
- if (!(d != null && d.length))
1568
+ function m(d) {
1569
+ const p = Ve(d.type);
1570
+ if (!(p != null && p.length))
1571
1571
  return null;
1572
- const l = u.collection ?? t.widgetCollections[d];
1572
+ const l = d.collection ?? t.widgetCollections[p];
1573
1573
  if (!l)
1574
1574
  throw new Error(
1575
- `DisplayCollection - Collection with ID ${d} not found in widgetCollections. Available collections: ${Object.keys(t.widgetCollections).join(", ")}`
1575
+ `DisplayCollection - Collection with ID ${p} not found in widgetCollections. Available collections: ${Object.keys(t.widgetCollections).join(", ")}`
1576
1576
  );
1577
1577
  return !l.collectionRows || !Fn(l.collectionRows) ? null : l.collectionRows;
1578
1578
  }
1579
- function c(u) {
1580
- return [...t.ancestorColumnIds ?? [], u];
1579
+ function c(d) {
1580
+ return [...t.ancestorColumnIds ?? [], d];
1581
1581
  }
1582
- function a(u) {
1583
- return so({
1582
+ function a(d) {
1583
+ return io({
1584
1584
  componentProps: t.componentProps,
1585
1585
  ancestorColumnIds: t.ancestorColumnIds,
1586
- columnId: u
1586
+ columnId: d
1587
1587
  });
1588
1588
  }
1589
- return (u, d) => {
1590
- const l = st("RenderComponentsInner", !0);
1589
+ return (d, p) => {
1590
+ const l = it("RenderComponentsInner", !0);
1591
1591
  return o.value ? (y(), b("div", {
1592
1592
  key: 0,
1593
1593
  style: S(s.value)
1594
1594
  }, [
1595
- U(ke, {
1595
+ j(ke, {
1596
1596
  "display-item-list": e.displayItemList,
1597
1597
  "is-compose-mode": e.isComposeMode,
1598
1598
  "show-drop-containers": e.showDropContainers,
1599
1599
  "is-within-collection": e.isWithinCollection,
1600
1600
  "device-display-type": e.deviceDisplayType
1601
1601
  }, {
1602
- default: M(() => [
1603
- (y(!0), b(A, null, R(e.displayItemList.rows, (g) => (y(), C(De, {
1602
+ default: E(() => [
1603
+ (y(!0), b(A, null, O(e.displayItemList.rows, (g) => (y(), w(Te, {
1604
1604
  key: g.id,
1605
1605
  row: g,
1606
1606
  "is-compose-mode": e.isComposeMode,
@@ -1608,14 +1608,14 @@ ${i.value}
1608
1608
  "is-within-collection": e.isWithinCollection,
1609
1609
  "device-display-type": e.deviceDisplayType
1610
1610
  }, {
1611
- default: M(() => [
1612
- (y(!0), b(A, null, R(g.columns, (p) => (y(), b(A, {
1613
- key: p.id
1611
+ default: E(() => [
1612
+ (y(!0), b(A, null, O(g.columns, (f) => (y(), b(A, {
1613
+ key: f.id
1614
1614
  }, [
1615
- r(p) ? (y(), b(A, { key: 0 }, [
1616
- m(p) ? (y(), C(l, {
1615
+ r(f) ? (y(), b(A, { key: 0 }, [
1616
+ m(f) ? (y(), w(l, {
1617
1617
  key: 0,
1618
- "display-item-list": m(p),
1618
+ "display-item-list": m(f),
1619
1619
  "is-compose-mode": e.isComposeMode,
1620
1620
  "is-within-collection": !0,
1621
1621
  "widget-collections": e.widgetCollections,
@@ -1625,18 +1625,18 @@ ${i.value}
1625
1625
  "device-display-type": e.deviceDisplayType,
1626
1626
  "component-props": e.componentProps,
1627
1627
  mounts: e.mounts,
1628
- "ancestor-column-ids": c(p.id)
1629
- }, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])) : (y(), C(Te, {
1628
+ "ancestor-column-ids": c(f.id)
1629
+ }, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])) : (y(), w(xe, {
1630
1630
  key: 1,
1631
- "component-type": p.type,
1632
- "library-id": p.libraryId,
1633
- "component-attributes": f(p).componentAttributes,
1631
+ "component-type": f.type,
1632
+ "library-id": f.libraryId,
1633
+ "component-attributes": u(f).componentAttributes,
1634
1634
  components: n(),
1635
- "style-props": f(p).styleProps,
1636
- "widget-instance-props": a(p.id),
1635
+ "style-props": u(f).styleProps,
1636
+ "widget-instance-props": a(f.id),
1637
1637
  mounts: e.mounts
1638
1638
  }, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "mounts"]))
1639
- ], 64)) : N("", !0)
1639
+ ], 64)) : P("", !0)
1640
1640
  ], 64))), 128))
1641
1641
  ]),
1642
1642
  _: 2
@@ -1644,12 +1644,12 @@ ${i.value}
1644
1644
  ]),
1645
1645
  _: 1
1646
1646
  }, 8, ["display-item-list", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]),
1647
- (y(!0), b(A, null, R(i.value, (g) => (y(), b("div", {
1647
+ (y(!0), b(A, null, O(i.value, (g) => (y(), b("div", {
1648
1648
  key: g.index,
1649
1649
  "data-rulecms-overlay-layer": g.index,
1650
1650
  style: S(g.boxStyles)
1651
1651
  }, [
1652
- U(l, {
1652
+ j(l, {
1653
1653
  "display-item-list": g.layer,
1654
1654
  "is-compose-mode": e.isComposeMode,
1655
1655
  "is-within-collection": !1,
@@ -1662,8 +1662,8 @@ ${i.value}
1662
1662
  mounts: e.mounts,
1663
1663
  "ancestor-column-ids": e.ancestorColumnIds
1664
1664
  }, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])
1665
- ], 12, So))), 128))
1666
- ], 4)) : (y(), C(ke, {
1665
+ ], 12, Do))), 128))
1666
+ ], 4)) : (y(), w(ke, {
1667
1667
  key: 1,
1668
1668
  "display-item-list": e.displayItemList,
1669
1669
  "is-compose-mode": e.isComposeMode,
@@ -1671,8 +1671,8 @@ ${i.value}
1671
1671
  "is-within-collection": e.isWithinCollection,
1672
1672
  "device-display-type": e.deviceDisplayType
1673
1673
  }, {
1674
- default: M(() => [
1675
- (y(!0), b(A, null, R(e.displayItemList.rows, (g) => (y(), C(De, {
1674
+ default: E(() => [
1675
+ (y(!0), b(A, null, O(e.displayItemList.rows, (g) => (y(), w(Te, {
1676
1676
  key: g.id,
1677
1677
  row: g,
1678
1678
  "is-compose-mode": e.isComposeMode,
@@ -1680,14 +1680,14 @@ ${i.value}
1680
1680
  "is-within-collection": e.isWithinCollection,
1681
1681
  "device-display-type": e.deviceDisplayType
1682
1682
  }, {
1683
- default: M(() => [
1684
- (y(!0), b(A, null, R(g.columns, (p) => (y(), b(A, {
1685
- key: p.id
1683
+ default: E(() => [
1684
+ (y(!0), b(A, null, O(g.columns, (f) => (y(), b(A, {
1685
+ key: f.id
1686
1686
  }, [
1687
- r(p) ? (y(), b(A, { key: 0 }, [
1688
- m(p) ? (y(), C(l, {
1687
+ r(f) ? (y(), b(A, { key: 0 }, [
1688
+ m(f) ? (y(), w(l, {
1689
1689
  key: 0,
1690
- "display-item-list": m(p),
1690
+ "display-item-list": m(f),
1691
1691
  "is-compose-mode": e.isComposeMode,
1692
1692
  "is-within-collection": !0,
1693
1693
  "widget-collections": e.widgetCollections,
@@ -1697,18 +1697,18 @@ ${i.value}
1697
1697
  "device-display-type": e.deviceDisplayType,
1698
1698
  "component-props": e.componentProps,
1699
1699
  mounts: e.mounts,
1700
- "ancestor-column-ids": c(p.id)
1701
- }, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])) : (y(), C(Te, {
1700
+ "ancestor-column-ids": c(f.id)
1701
+ }, null, 8, ["display-item-list", "is-compose-mode", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])) : (y(), w(xe, {
1702
1702
  key: 1,
1703
- "component-type": p.type,
1704
- "library-id": p.libraryId,
1705
- "component-attributes": f(p).componentAttributes,
1703
+ "component-type": f.type,
1704
+ "library-id": f.libraryId,
1705
+ "component-attributes": u(f).componentAttributes,
1706
1706
  components: n(),
1707
- "style-props": f(p).styleProps,
1708
- "widget-instance-props": a(p.id),
1707
+ "style-props": u(f).styleProps,
1708
+ "widget-instance-props": a(f.id),
1709
1709
  mounts: e.mounts
1710
1710
  }, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "mounts"]))
1711
- ], 64)) : N("", !0)
1711
+ ], 64)) : P("", !0)
1712
1712
  ], 64))), 128))
1713
1713
  ]),
1714
1714
  _: 2
@@ -1718,7 +1718,7 @@ ${i.value}
1718
1718
  }, 8, ["display-item-list", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]));
1719
1719
  };
1720
1720
  }
1721
- }), ie = /* @__PURE__ */ D({
1721
+ }), re = /* @__PURE__ */ D({
1722
1722
  __name: "RenderComponentsForDevice",
1723
1723
  props: {
1724
1724
  displayItemList: {},
@@ -1736,7 +1736,7 @@ ${i.value}
1736
1736
  setup(e) {
1737
1737
  return (t, n) => {
1738
1738
  var o, s;
1739
- return (s = (o = e.displayItemList) == null ? void 0 : o.rows) != null && s.length ? (y(), C(ko, {
1739
+ return (s = (o = e.displayItemList) == null ? void 0 : o.rows) != null && s.length ? (y(), w(ko, {
1740
1740
  key: 0,
1741
1741
  "display-item-list": e.displayItemList,
1742
1742
  "is-compose-mode": e.isComposeMode,
@@ -1749,7 +1749,7 @@ ${i.value}
1749
1749
  "component-props": e.componentProps,
1750
1750
  mounts: e.mounts,
1751
1751
  "ancestor-column-ids": e.ancestorColumnIds
1752
- }, null, 8, ["display-item-list", "is-compose-mode", "is-within-collection", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])) : N("", !0);
1752
+ }, null, 8, ["display-item-list", "is-compose-mode", "is-within-collection", "widget-collections", "show-drop-containers", "redux-device-display-type", "plugins", "device-display-type", "component-props", "mounts", "ancestor-column-ids"])) : P("", !0);
1753
1753
  };
1754
1754
  }
1755
1755
  }), Xe = /* @__PURE__ */ D({
@@ -1758,17 +1758,17 @@ ${i.value}
1758
1758
  stylesheets: {}
1759
1759
  },
1760
1760
  setup(e) {
1761
- return (t, n) => (y(!0), b(A, null, R(e.stylesheets ?? [], (o) => (y(), C(W("style"), {
1761
+ return (t, n) => (y(!0), b(A, null, O(e.stylesheets ?? [], (o) => (y(), w(M("style"), {
1762
1762
  key: o,
1763
1763
  "data-rulecms-library-stylesheet": ""
1764
1764
  }, {
1765
- default: M(() => [
1766
- le(q(o), 1)
1765
+ default: E(() => [
1766
+ z(U(o), 1)
1767
1767
  ]),
1768
1768
  _: 2
1769
1769
  }, 1024))), 128));
1770
1770
  }
1771
- }), Do = /* @__PURE__ */ D({
1771
+ }), To = /* @__PURE__ */ D({
1772
1772
  __name: "BreakpointVariantRender",
1773
1773
  props: {
1774
1774
  displayItemList: {},
@@ -1782,39 +1782,39 @@ ${i.value}
1782
1782
  const t = ["Phone", "Tablet", "Desktop"];
1783
1783
  let n = 0;
1784
1784
  const o = e, s = `rulecms-bp-${++n}`, i = h(() => o.scopeIdInput ?? s), r = h(
1785
- () => po(o.displayItemList, o.widgetCollections)
1786
- ), f = h(() => mo(i.value));
1785
+ () => fo(o.displayItemList, o.widgetCollections)
1786
+ ), u = h(() => go(i.value));
1787
1787
  return (m, c) => {
1788
1788
  var a;
1789
1789
  return y(), b(A, null, [
1790
- U(Xe, {
1790
+ j(Xe, {
1791
1791
  stylesheets: (a = e.plugins.sourceComponents) == null ? void 0 : a.stylesheets
1792
1792
  }, null, 8, ["stylesheets"]),
1793
1793
  r.value ? (y(), b(A, { key: 1 }, [
1794
- (y(), C(W("style"), null, {
1795
- default: M(() => [
1796
- le(q(f.value), 1)
1794
+ (y(), w(M("style"), null, {
1795
+ default: E(() => [
1796
+ z(U(u.value), 1)
1797
1797
  ]),
1798
1798
  _: 1
1799
1799
  })),
1800
- (y(), b(A, null, R(t, (u) => $("div", {
1801
- key: u,
1802
- class: K(`${i.value}-${u.toLowerCase()}`)
1800
+ (y(), b(A, null, O(t, (d) => W("div", {
1801
+ key: d,
1802
+ class: H(`${i.value}-${d.toLowerCase()}`)
1803
1803
  }, [
1804
- U(ie, {
1804
+ j(re, {
1805
1805
  "display-item-list": e.displayItemList,
1806
1806
  "is-compose-mode": !1,
1807
1807
  "is-within-collection": !1,
1808
1808
  "widget-collections": e.widgetCollections,
1809
1809
  "show-drop-containers": !1,
1810
1810
  "redux-device-display-type": "desktop",
1811
- "device-display-type": u,
1811
+ "device-display-type": d,
1812
1812
  plugins: e.plugins,
1813
1813
  "component-props": e.componentProps,
1814
1814
  mounts: e.mounts
1815
1815
  }, null, 8, ["display-item-list", "widget-collections", "device-display-type", "plugins", "component-props", "mounts"])
1816
1816
  ], 2)), 64))
1817
- ], 64)) : (y(), C(ie, {
1817
+ ], 64)) : (y(), w(re, {
1818
1818
  key: 0,
1819
1819
  "display-item-list": e.displayItemList,
1820
1820
  "is-compose-mode": !1,
@@ -1831,7 +1831,7 @@ ${i.value}
1831
1831
  };
1832
1832
  }
1833
1833
  });
1834
- function To(e, t, n) {
1834
+ function xo(e, t, n) {
1835
1835
  if (e)
1836
1836
  return "Phone";
1837
1837
  if (t)
@@ -1839,7 +1839,7 @@ function To(e, t, n) {
1839
1839
  const o = (n == null ? void 0 : n.toLowerCase()) || "desktop";
1840
1840
  return o === "phone" ? "Phone" : o === "tablet" ? "Tablet" : "Desktop";
1841
1841
  }
1842
- const xo = `(max-width: ${Fe})`, Eo = `(max-width: ${Ve})`, Po = /* @__PURE__ */ D({
1842
+ const Eo = `(max-width: ${Fe})`, Po = `(max-width: ${Ke})`, $o = /* @__PURE__ */ D({
1843
1843
  __name: "RenderComponents",
1844
1844
  props: {
1845
1845
  displayItemList: {},
@@ -1853,27 +1853,27 @@ const xo = `(max-width: ${Fe})`, Eo = `(max-width: ${Ve})`, Po = /* @__PURE__ */
1853
1853
  mounts: {}
1854
1854
  },
1855
1855
  setup(e) {
1856
- const t = e, n = V("Desktop");
1856
+ const t = e, n = _("Desktop");
1857
1857
  let o, s;
1858
1858
  function i() {
1859
- n.value = To(
1859
+ n.value = xo(
1860
1860
  (o == null ? void 0 : o.matches) ?? !1,
1861
1861
  (s == null ? void 0 : s.matches) ?? !1,
1862
1862
  t.reduxDeviceDisplayType
1863
1863
  );
1864
1864
  }
1865
- return it(() => {
1866
- typeof matchMedia == "function" && (o = matchMedia(xo), s = matchMedia(Eo), o.addEventListener("change", i), s.addEventListener("change", i)), i();
1867
- }), $e(() => {
1865
+ return rt(() => {
1866
+ typeof matchMedia == "function" && (o = matchMedia(Eo), s = matchMedia(Po), o.addEventListener("change", i), s.addEventListener("change", i)), i();
1867
+ }), Re(() => {
1868
1868
  o == null || o.removeEventListener("change", i), s == null || s.removeEventListener("change", i);
1869
- }), (r, f) => {
1869
+ }), (r, u) => {
1870
1870
  var m;
1871
1871
  return y(), b(A, null, [
1872
- e.isWithinCollection ? N("", !0) : (y(), C(Xe, {
1872
+ e.isWithinCollection ? P("", !0) : (y(), w(Xe, {
1873
1873
  key: 0,
1874
1874
  stylesheets: (m = e.plugins.sourceComponents) == null ? void 0 : m.stylesheets
1875
1875
  }, null, 8, ["stylesheets"])),
1876
- U(ie, {
1876
+ j(re, {
1877
1877
  "display-item-list": e.displayItemList,
1878
1878
  "is-compose-mode": e.isComposeMode,
1879
1879
  "is-within-collection": e.isWithinCollection,
@@ -1889,7 +1889,115 @@ const xo = `(max-width: ${Fe})`, Eo = `(max-width: ${Ve})`, Po = /* @__PURE__ */
1889
1889
  };
1890
1890
  }
1891
1891
  });
1892
- function Lo(e) {
1892
+ function Ze(e) {
1893
+ return e !== !1;
1894
+ }
1895
+ const Lo = (e) => e.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), Ro = (e) => e.replace(/[^A-Za-z0-9_-]/g, (t) => `\\${t}`), Mo = ["</", "<script", "@import", "javascript:", "vbscript:", "expression("], No = /[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/, Wo = /[\s{};"]/, Oo = /^[A-Za-z0-9_:%./[\]%-]+$/, jo = (e) => {
1896
+ let t = 0;
1897
+ for (const n of e)
1898
+ if (n === "{")
1899
+ t += 1;
1900
+ else if (n === "}" && (t -= 1, t < 0))
1901
+ return !1;
1902
+ return t === 0;
1903
+ }, Vo = (e) => {
1904
+ const t = e.startsWith(".") ? e.slice(1) : e;
1905
+ return !t || t.length > 200 || t.startsWith(".") || Wo.test(t) ? !1 : Oo.test(t);
1906
+ }, Bo = (e) => {
1907
+ const t = e.trim();
1908
+ if (!t || t.length > 4e3 || No.test(t) || !jo(t))
1909
+ return !1;
1910
+ const n = t.toLowerCase();
1911
+ return !Mo.some((o) => n.includes(o));
1912
+ }, Fo = (e) => {
1913
+ if (!e)
1914
+ return {};
1915
+ const t = {};
1916
+ for (const [n, o] of Object.entries(e)) {
1917
+ const s = n.startsWith(".") ? n.slice(1) : n.trim();
1918
+ if (!Vo(s) || typeof o != "string")
1919
+ continue;
1920
+ const i = o.trim();
1921
+ Bo(i) && (t[s] = i);
1922
+ }
1923
+ return t;
1924
+ }, Ko = (e) => e.split(`
1925
+ `).map((t) => ` ${t}`).join(`
1926
+ `), Uo = (e, t, n) => {
1927
+ if (!Ze(n))
1928
+ return null;
1929
+ const o = Fo(t), s = Object.keys(o);
1930
+ if (s.length === 0 || !e)
1931
+ return null;
1932
+ const i = `[data-rulecms-published-key="${Lo(e)}"]`;
1933
+ return s.sort((r, u) => r.localeCompare(u)).map(
1934
+ (r) => `${i} .${Ro(r)} {
1935
+ ${Ko(o[r])}
1936
+ }`
1937
+ ).join(`
1938
+ `);
1939
+ }, _o = /* @__PURE__ */ D({
1940
+ __name: "ProjectCssClassesStylesheet",
1941
+ props: {
1942
+ publishedKey: {},
1943
+ classes: {}
1944
+ },
1945
+ setup(e) {
1946
+ const t = e, n = h(
1947
+ () => Uo(t.publishedKey, t.classes)
1948
+ );
1949
+ return (o, s) => n.value ? (y(), w(M("style"), {
1950
+ key: 0,
1951
+ "data-rulecms-project-class-definitions": ""
1952
+ }, {
1953
+ default: E(() => [
1954
+ z(U(n.value), 1)
1955
+ ]),
1956
+ _: 1
1957
+ })) : P("", !0);
1958
+ }
1959
+ }), Ho = (e) => e.replace(/\\/g, "\\\\").replace(/"/g, '\\"'), zo = /[{};]/, Go = (e) => {
1960
+ if (!e)
1961
+ return {};
1962
+ const t = {};
1963
+ for (const [n, o] of Object.entries(e)) {
1964
+ if (!ue(n) || typeof o != "string")
1965
+ continue;
1966
+ const s = o.trim();
1967
+ s === "" || zo.test(s) || (t[n.trim()] = s);
1968
+ }
1969
+ return t;
1970
+ }, Yo = (e, t) => {
1971
+ const n = Go(t), o = Object.keys(n);
1972
+ if (o.length === 0 || !e)
1973
+ return null;
1974
+ const s = `[data-rulecms-published-key="${Ho(e)}"] > *`, i = o.sort((r, u) => r.localeCompare(u)).map((r) => ` ${r}: ${n[r]};`).join(`
1975
+ `);
1976
+ return `${s} {
1977
+ ${i}
1978
+ }`;
1979
+ }, qo = /* @__PURE__ */ D({
1980
+ __name: "ProjectCssVariablesStylesheet",
1981
+ props: {
1982
+ publishedKey: {},
1983
+ variables: {}
1984
+ },
1985
+ setup(e) {
1986
+ const t = e, n = h(
1987
+ () => Yo(t.publishedKey, t.variables)
1988
+ );
1989
+ return (o, s) => n.value ? (y(), w(M("style"), {
1990
+ key: 0,
1991
+ "data-rulecms-project-css-variables": ""
1992
+ }, {
1993
+ default: E(() => [
1994
+ z(U(n.value), 1)
1995
+ ]),
1996
+ _: 1
1997
+ })) : P("", !0);
1998
+ }
1999
+ });
2000
+ function Xo(e) {
1893
2001
  const t = {};
1894
2002
  return Object.entries(e).forEach(([n, o]) => {
1895
2003
  const s = { ...o };
@@ -1903,62 +2011,64 @@ function Lo(e) {
1903
2011
  s.parentId && (i = `${i}@${s.parentId}`), t[i] = s;
1904
2012
  }), t;
1905
2013
  }
1906
- function $o(e) {
2014
+ function Zo(e) {
1907
2015
  return typeof e.itemList == "string" ? JSON.parse(e.itemList) : e.itemList;
1908
2016
  }
1909
- function Ze(e) {
2017
+ function Je(e) {
1910
2018
  return {
1911
- displayItemList: $o(e.widget),
1912
- widgetCollections: Lo(e.childCollections),
1913
- ...e.libraries ? { libraries: e.libraries } : {}
2019
+ displayItemList: Zo(e.widget),
2020
+ widgetCollections: Xo(e.childCollections),
2021
+ ...e.libraries ? { libraries: e.libraries } : {},
2022
+ ...e.cssVariables && Object.keys(e.cssVariables).length > 0 ? { cssVariables: e.cssVariables } : {},
2023
+ ...Ze(e.includeClassDefinitions) && e.classDefinitions && Object.keys(e.classDefinitions).length > 0 ? { classDefinitions: e.classDefinitions } : {}
1914
2024
  };
1915
2025
  }
1916
- function Ro(e) {
1917
- const t = e.registry ?? X(), n = ae({
2026
+ function Jo(e) {
2027
+ const t = e.registry ?? J(), n = ae({
1918
2028
  displayItemList: e.displayItemList,
1919
2029
  widgetCollections: e.widgetCollections
1920
2030
  });
1921
2031
  return t.resolveSync({ registrations: e.libraries, referenced: n });
1922
2032
  }
1923
- function Mo(e) {
1924
- const t = e.registry ?? X(), n = ae({
2033
+ function Qo(e) {
2034
+ const t = e.registry ?? J(), n = ae({
1925
2035
  displayItemList: e.displayItemList,
1926
2036
  widgetCollections: e.widgetCollections
1927
2037
  });
1928
2038
  return t.resolve({ registrations: e.libraries, referenced: n });
1929
2039
  }
1930
- const No = {
2040
+ const es = {
1931
2041
  display: "flex",
1932
2042
  justifyContent: "center",
1933
2043
  alignItems: "center",
1934
2044
  padding: "3rem",
1935
2045
  color: "#e2e8f0"
1936
- }, Wo = {
2046
+ }, ts = {
1937
2047
  display: "flex",
1938
2048
  alignItems: "center",
1939
2049
  gap: "1rem"
1940
- }, Oo = {
2050
+ }, ns = {
1941
2051
  width: "40px",
1942
2052
  height: "40px",
1943
2053
  border: "4px solid #4a5568",
1944
2054
  borderTopColor: "#63b3ed",
1945
2055
  borderRadius: "50%",
1946
2056
  animation: "spin 1s linear infinite"
1947
- }, xe = {
2057
+ }, Ee = {
1948
2058
  padding: "1.5rem",
1949
2059
  backgroundColor: "#742a2a",
1950
2060
  border: "1px solid #9b2c2c",
1951
2061
  borderRadius: "8px",
1952
2062
  color: "#fed7d7"
1953
- }, Ee = {
2063
+ }, Pe = {
1954
2064
  fontSize: "16px",
1955
2065
  fontWeight: "600",
1956
2066
  marginBottom: "0.5rem",
1957
2067
  color: "#feb2b2"
1958
- }, Pe = {
2068
+ }, $e = {
1959
2069
  fontSize: "14px",
1960
2070
  color: "#fed7d7"
1961
- }, jo = `
2071
+ }, os = `
1962
2072
  @keyframes spin {
1963
2073
  from {
1964
2074
  transform: rotate(0deg);
@@ -1967,7 +2077,7 @@ const No = {
1967
2077
  transform: rotate(360deg);
1968
2078
  }
1969
2079
  }
1970
- `, ns = "data-rulecms-published-key", Bo = ["data-rulecms-published-key"], os = /* @__PURE__ */ D({
2080
+ `, vs = "data-rulecms-published-key", ss = ["data-rulecms-published-key"], As = /* @__PURE__ */ D({
1971
2081
  __name: "RuleCMSWidget",
1972
2082
  props: {
1973
2083
  publishedKey: {},
@@ -1980,36 +2090,36 @@ const No = {
1980
2090
  mounts: {}
1981
2091
  },
1982
2092
  setup(e) {
1983
- const t = e, n = rt(Be, null), o = V(!1), s = V(null), i = V(null), r = V(null), f = h(() => t.mode === "pre-fetched"), m = h(() => ({
2093
+ const t = e, n = lt(Be, null), o = _(!1), s = _(null), i = _(null), r = _(null), u = h(() => t.mode === "pre-fetched"), m = h(() => ({
1984
2094
  sourceComponents: r.value ?? void 0
1985
2095
  }));
1986
- let c = null, a = null, u = !1;
1987
- function d() {
2096
+ let c = null, a = null, d = !1;
2097
+ function p() {
1988
2098
  if (!i.value) {
1989
2099
  r.value = null;
1990
2100
  return;
1991
2101
  }
1992
- const v = t.libraries ?? (n == null ? void 0 : n.libraries), T = n == null ? void 0 : n.libraryRegistry, F = Ro({
2102
+ const v = t.libraries ?? (n == null ? void 0 : n.libraries), T = n == null ? void 0 : n.libraryRegistry, L = Jo({
1993
2103
  displayItemList: i.value.displayItemList,
1994
2104
  widgetCollections: i.value.widgetCollections,
1995
2105
  libraries: v,
1996
2106
  registry: T
1997
2107
  });
1998
- if (F) {
1999
- r.value = F;
2108
+ if (L) {
2109
+ r.value = L;
2000
2110
  return;
2001
2111
  }
2002
- Mo({
2112
+ Qo({
2003
2113
  displayItemList: i.value.displayItemList,
2004
2114
  widgetCollections: i.value.widgetCollections,
2005
2115
  libraries: v,
2006
2116
  registry: T
2007
- }).then((Z) => {
2008
- r.value = Z;
2117
+ }).then((V) => {
2118
+ r.value = V;
2009
2119
  });
2010
2120
  }
2011
2121
  function l() {
2012
- i.value && co({
2122
+ i.value && ao({
2013
2123
  componentProps: t.componentProps,
2014
2124
  displayItemList: i.value.displayItemList,
2015
2125
  widgetCollections: i.value.widgetCollections,
@@ -2017,55 +2127,55 @@ const No = {
2017
2127
  });
2018
2128
  }
2019
2129
  function g() {
2020
- if (u || typeof document > "u")
2130
+ if (d || typeof document > "u")
2021
2131
  return;
2022
2132
  const v = "rulecms-widget-spinner-styles";
2023
2133
  if (!document.getElementById(v)) {
2024
2134
  const T = document.createElement("style");
2025
- T.id = v, T.textContent = jo, document.head.appendChild(T);
2135
+ T.id = v, T.textContent = os, document.head.appendChild(T);
2026
2136
  }
2027
- u = !0;
2137
+ d = !0;
2028
2138
  }
2029
- function p() {
2139
+ function f() {
2030
2140
  const v = t.token ?? (n == null ? void 0 : n.token), T = t.endpoint ?? (n == null ? void 0 : n.endpoint);
2031
2141
  if (!t.publishedKey || !v) {
2032
- s.value = t.publishedKey ? "Token is required. Provide it either directly as a prop (`token`) or via RuleCMSWidgetProvider." : O(v) ? "Widget key is required" : "Published key is required", i.value = null;
2142
+ s.value = t.publishedKey ? "Token is required. Provide it either directly as a prop (`token`) or via RuleCMSWidgetProvider." : B(v) ? "Widget key is required" : "Published key is required", i.value = null;
2033
2143
  return;
2034
2144
  }
2035
- const F = `${t.publishedKey}|${v}`;
2036
- if (a === F && i.value) {
2037
- d();
2145
+ const L = `${t.publishedKey}|${v}`;
2146
+ if (a === L && i.value) {
2147
+ p();
2038
2148
  return;
2039
2149
  }
2040
2150
  c == null || c.abort(), c = new AbortController();
2041
- const Z = c.signal;
2042
- a = F, o.value = !0, s.value = null;
2043
- const Je = We({ publishedKey: t.publishedKey, token: v, endpoint: T });
2044
- fetch(Je, {
2151
+ const V = c.signal;
2152
+ a = L, o.value = !0, s.value = null;
2153
+ const Qe = Oe({ publishedKey: t.publishedKey, token: v, endpoint: T });
2154
+ fetch(Qe, {
2045
2155
  method: "GET",
2046
2156
  headers: { "Content-Type": "application/json" },
2047
- ...O(v) ? { cache: "no-store" } : {},
2048
- signal: Z
2049
- }).then(async (P) => {
2050
- if (P.ok) {
2051
- const z = await P.json();
2052
- z.success ? (i.value = Ze(z.data), s.value = null, d(), l()) : (s.value = "Failed to fetch widget data", i.value = null);
2157
+ ...B(v) ? { cache: "no-store" } : {},
2158
+ signal: V
2159
+ }).then(async (R) => {
2160
+ if (R.ok) {
2161
+ const Y = await R.json();
2162
+ Y.success ? (i.value = Je(Y.data), s.value = null, p(), l()) : (s.value = "Failed to fetch widget data", i.value = null);
2053
2163
  } else {
2054
- const z = await P.json().catch(() => ({ error: "Unknown error" }));
2055
- s.value = z.error || `Request failed with status ${P.status}`, i.value = null;
2164
+ const Y = await R.json().catch(() => ({ error: "Unknown error" }));
2165
+ s.value = Y.error || `Request failed with status ${R.status}`, i.value = null;
2056
2166
  }
2057
- }).catch((P) => {
2058
- P instanceof DOMException && P.name === "AbortError" || (console.error("Error fetching widget:", P), s.value = "Failed to fetch widget", i.value = null);
2167
+ }).catch((R) => {
2168
+ R instanceof DOMException && R.name === "AbortError" || (console.error("Error fetching widget:", R), s.value = "Failed to fetch widget", i.value = null);
2059
2169
  }).finally(() => {
2060
2170
  o.value = !1;
2061
2171
  });
2062
2172
  }
2063
2173
  function I() {
2064
2174
  if (t.mode === "pre-fetched") {
2065
- i.value = t.initialData ?? null, o.value = !1, s.value = null, d(), l();
2175
+ i.value = t.initialData ?? null, o.value = !1, s.value = null, p(), l();
2066
2176
  return;
2067
2177
  }
2068
- g(), p();
2178
+ g(), f();
2069
2179
  }
2070
2180
  return Le(
2071
2181
  () => [
@@ -2081,255 +2191,266 @@ const No = {
2081
2191
  I();
2082
2192
  },
2083
2193
  { immediate: !0 }
2084
- ), $e(() => {
2194
+ ), Re(() => {
2085
2195
  c == null || c.abort();
2086
- }), (v, T) => (y(), b("span", {
2087
- "data-rulecms-published-key": e.publishedKey,
2088
- style: { display: "contents" }
2089
- }, [
2090
- e.mode !== "pre-fetched" && o.value ? (y(), b("div", {
2091
- key: 0,
2092
- style: S(x(No))
2196
+ }), (v, T) => {
2197
+ var L, V;
2198
+ return y(), b("span", {
2199
+ "data-rulecms-published-key": e.publishedKey,
2200
+ style: { display: "contents" }
2093
2201
  }, [
2094
- $("div", {
2095
- style: S(x(Wo))
2202
+ j(qo, {
2203
+ "published-key": e.publishedKey,
2204
+ variables: (L = i.value) == null ? void 0 : L.cssVariables
2205
+ }, null, 8, ["published-key", "variables"]),
2206
+ j(_o, {
2207
+ "published-key": e.publishedKey,
2208
+ classes: (V = i.value) == null ? void 0 : V.classDefinitions
2209
+ }, null, 8, ["published-key", "classes"]),
2210
+ e.mode !== "pre-fetched" && o.value ? (y(), b("div", {
2211
+ key: 0,
2212
+ style: S(x(es))
2096
2213
  }, [
2097
- $("div", {
2098
- style: S(x(Oo))
2099
- }, null, 4)
2100
- ], 4)
2101
- ], 4)) : e.mode !== "pre-fetched" && s.value ? (y(), b("div", {
2102
- key: 1,
2103
- style: S(x(xe))
2104
- }, [
2105
- $("div", {
2214
+ W("div", {
2215
+ style: S(x(ts))
2216
+ }, [
2217
+ W("div", {
2218
+ style: S(x(ns))
2219
+ }, null, 4)
2220
+ ], 4)
2221
+ ], 4)) : e.mode !== "pre-fetched" && s.value ? (y(), b("div", {
2222
+ key: 1,
2106
2223
  style: S(x(Ee))
2107
- }, "Error Loading Widget", 4),
2108
- $("div", {
2109
- style: S(x(Pe))
2110
- }, q(s.value), 5)
2111
- ], 4)) : e.mode !== "pre-fetched" && !i.value ? (y(), b("div", {
2112
- key: 2,
2113
- style: S(x(xe))
2114
- }, [
2115
- $("div", {
2224
+ }, [
2225
+ W("div", {
2226
+ style: S(x(Pe))
2227
+ }, "Error Loading Widget", 4),
2228
+ W("div", {
2229
+ style: S(x($e))
2230
+ }, U(s.value), 5)
2231
+ ], 4)) : e.mode !== "pre-fetched" && !i.value ? (y(), b("div", {
2232
+ key: 2,
2116
2233
  style: S(x(Ee))
2117
- }, "No Widget Data", 4),
2118
- $("div", {
2119
- style: S(x(Pe))
2120
- }, "No widget data available", 4)
2121
- ], 4)) : r.value && i.value ? (y(), b(A, { key: 3 }, [
2122
- f.value ? (y(), C(Do, {
2123
- key: 0,
2124
- "display-item-list": i.value.displayItemList,
2125
- "widget-collections": i.value.widgetCollections,
2126
- plugins: m.value,
2127
- "component-props": e.componentProps,
2128
- mounts: e.mounts
2129
- }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts"])) : (y(), C(Po, {
2130
- key: 1,
2131
- "display-item-list": i.value.displayItemList,
2132
- "is-compose-mode": !1,
2133
- "is-within-collection": !1,
2134
- "widget-collections": i.value.widgetCollections,
2135
- "show-drop-containers": !1,
2136
- "redux-device-display-type": "desktop",
2137
- plugins: m.value,
2138
- "component-props": e.componentProps,
2139
- mounts: e.mounts
2140
- }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts"]))
2141
- ], 64)) : N("", !0)
2142
- ], 8, Bo));
2234
+ }, [
2235
+ W("div", {
2236
+ style: S(x(Pe))
2237
+ }, "No Widget Data", 4),
2238
+ W("div", {
2239
+ style: S(x($e))
2240
+ }, "No widget data available", 4)
2241
+ ], 4)) : r.value && i.value ? (y(), b(A, { key: 3 }, [
2242
+ u.value ? (y(), w(To, {
2243
+ key: 0,
2244
+ "display-item-list": i.value.displayItemList,
2245
+ "widget-collections": i.value.widgetCollections,
2246
+ plugins: m.value,
2247
+ "component-props": e.componentProps,
2248
+ mounts: e.mounts
2249
+ }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts"])) : (y(), w($o, {
2250
+ key: 1,
2251
+ "display-item-list": i.value.displayItemList,
2252
+ "is-compose-mode": !1,
2253
+ "is-within-collection": !1,
2254
+ "widget-collections": i.value.widgetCollections,
2255
+ "show-drop-containers": !1,
2256
+ "redux-device-display-type": "desktop",
2257
+ plugins: m.value,
2258
+ "component-props": e.componentProps,
2259
+ mounts: e.mounts
2260
+ }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts"]))
2261
+ ], 64)) : P("", !0)
2262
+ ], 8, ss);
2263
+ };
2143
2264
  }
2144
2265
  });
2145
- class _ extends Error {
2266
+ class X extends Error {
2146
2267
  constructor(n, o) {
2147
2268
  super(n);
2148
- be(this, "status");
2269
+ we(this, "status");
2149
2270
  this.name = "FetchRuleCMSWidgetError", this.status = o;
2150
2271
  }
2151
2272
  }
2152
- async function ss(e) {
2273
+ async function Is(e) {
2153
2274
  const { publishedKey: t, token: n, endpoint: o, fetchOptions: s } = e;
2154
2275
  if (!t)
2155
- throw new _(
2156
- O(n) ? "Widget key is required" : "Published key is required"
2276
+ throw new X(
2277
+ B(n) ? "Widget key is required" : "Published key is required"
2157
2278
  );
2158
2279
  if (!n)
2159
- throw new _("Token is required");
2160
- const i = We({ publishedKey: t, token: n, endpoint: o }), r = await fetch(i, {
2280
+ throw new X("Token is required");
2281
+ const i = Oe({ publishedKey: t, token: n, endpoint: o }), r = await fetch(i, {
2161
2282
  method: "GET",
2162
2283
  headers: { "Content-Type": "application/json" },
2163
- ...O(n) ? { cache: "no-store" } : {},
2284
+ ...B(n) ? { cache: "no-store" } : {},
2164
2285
  ...s
2165
2286
  });
2166
2287
  if (!r.ok) {
2167
2288
  const m = await r.json().catch(() => ({ error: "Unknown error" }));
2168
- throw new _(
2289
+ throw new X(
2169
2290
  m.error || `Request failed with status ${r.status}`,
2170
2291
  r.status
2171
2292
  );
2172
2293
  }
2173
- const f = await r.json();
2174
- if (!f.success)
2175
- throw new _("Failed to fetch widget data");
2176
- return Ze(f.data);
2294
+ const u = await r.json();
2295
+ if (!u.success)
2296
+ throw new X("Failed to fetch widget data");
2297
+ return Je(u.data);
2177
2298
  }
2178
- async function is(e) {
2299
+ async function Ss(e) {
2179
2300
  const { data: t, libraries: n } = e, o = ae({
2180
2301
  displayItemList: t.displayItemList,
2181
2302
  widgetCollections: t.widgetCollections
2182
2303
  });
2183
- return X().resolve({ registrations: n, referenced: o });
2304
+ return J().resolve({ registrations: n, referenced: o });
2184
2305
  }
2185
2306
  export {
2186
- Uo as AlignContentTypes,
2187
- Do as BreakpointVariantRender,
2188
- Ne as COLLECTION_TYPE_PREFIX,
2189
- he as COMPONENT_PROPS_PATH_SEPARATOR,
2190
- ye as CSS_CLASSES_ATTRIBUTE_NAME,
2307
+ cs as AlignContentTypes,
2308
+ To as BreakpointVariantRender,
2309
+ We as COLLECTION_TYPE_PREFIX,
2310
+ be as COMPONENT_PROPS_PATH_SEPARATOR,
2311
+ me as CSS_CLASSES_ATTRIBUTE_NAME,
2191
2312
  zt as CSS_VARIABLE_NAME_MAX_LENGTH,
2192
2313
  Ht as CSS_VARIABLE_NAME_PATTERN,
2193
- Ge as DEFAULT_BASE_Z_INDEX,
2194
- Dt as DEFAULT_CLOUDINARY_CLOUD_NAME,
2195
- H as DEFAULT_LIBRARY_ID,
2196
- Vn as DEFAULT_ROW_GAP,
2197
- dt as DEV_CLIENT_TOKEN_PREFIX,
2198
- mt as DEV_WIDGET_API_PATH,
2199
- Ho as DeviceDisplayTypes,
2200
- Te as DisplayComponent,
2314
+ ze as DEFAULT_BASE_Z_INDEX,
2315
+ Tt as DEFAULT_CLOUDINARY_CLOUD_NAME,
2316
+ G as DEFAULT_LIBRARY_ID,
2317
+ Kn as DEFAULT_ROW_GAP,
2318
+ pt as DEV_CLIENT_TOKEN_PREFIX,
2319
+ gt as DEV_WIDGET_API_PATH,
2320
+ as as DeviceDisplayTypes,
2321
+ xe as DisplayComponent,
2201
2322
  ce as DisplayItemTypes,
2202
- Me as DragItemIdPrefixTypes,
2203
- At as EMBEDDED_KEY_SEPARATOR,
2204
- mn as FLEX_LAYOUT_STYLE_KEYS_THAT_DERIVE_DISPLAY,
2205
- _ as FetchRuleCMSWidgetError,
2323
+ Ne as DragItemIdPrefixTypes,
2324
+ It as EMBEDDED_KEY_SEPARATOR,
2325
+ gn as FLEX_LAYOUT_STYLE_KEYS_THAT_DERIVE_DISPLAY,
2326
+ X as FetchRuleCMSWidgetError,
2206
2327
  Ue as HIDE_WIDGET_ATTRIBUTE_NAME,
2207
- Ae as JustifyContentTypes,
2208
- _n as POINTER_EVENTS_ATTRIBUTE_NAME,
2209
- vt as PUBLISHED_KEY_SEPARATOR,
2210
- yt as PUBLISHED_WIDGET_API_PATH,
2211
- Ko as PageViewTypes,
2212
- pt as RULECMS_API_ORIGIN,
2213
- ns as RULECMS_PUBLISHED_KEY_ATTRIBUTE,
2328
+ Ie as JustifyContentTypes,
2329
+ Yn as POINTER_EVENTS_ATTRIBUTE_NAME,
2330
+ At as PUBLISHED_KEY_SEPARATOR,
2331
+ mt as PUBLISHED_WIDGET_API_PATH,
2332
+ ls as PageViewTypes,
2333
+ ft as RULECMS_API_ORIGIN,
2334
+ vs as RULECMS_PUBLISHED_KEY_ATTRIBUTE,
2214
2335
  Be as RULECMS_WIDGET_CONTEXT_KEY,
2215
- Po as RenderComponents,
2216
- ie as RenderComponentsForDevice,
2336
+ $o as RenderComponents,
2337
+ re as RenderComponentsForDevice,
2217
2338
  ko as RenderComponentsInner,
2218
- os as RuleCMSWidget,
2219
- Jo as RuleCMSWidgetProvider,
2220
- Yn as WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE,
2221
- ft as WIDGET_CACHE_API_ORIGIN,
2222
- Zn as Z_INDEX_WIDGET_ATTRIBUTE_NAME,
2223
- un as alignContentAllowlist,
2224
- cn as alignItemsAllowlist,
2225
- fn as backgroundPositionAllowlist,
2226
- yn as backgroundRepeatAllowlist,
2227
- pn as backgroundSizeAllowlist,
2228
- gn as borderStyleKeywords,
2229
- Yt as boxSpacingSideKeys,
2230
- ts as boxSpacingStyleAttributeEntries,
2231
- Ut as buildCloudinaryBackgroundUrl,
2232
- oo as buildOverlayLayerBoxStyles,
2233
- no as buildOverlayStackStyles,
2234
- We as buildWidgetFetchUrl,
2235
- io as collectComponentInstancePaths,
2339
+ As as RuleCMSWidget,
2340
+ hs as RuleCMSWidgetProvider,
2341
+ qn as WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE,
2342
+ yt as WIDGET_CACHE_API_ORIGIN,
2343
+ Jn as Z_INDEX_WIDGET_ATTRIBUTE_NAME,
2344
+ dn as alignContentAllowlist,
2345
+ an as alignItemsAllowlist,
2346
+ yn as backgroundPositionAllowlist,
2347
+ mn as backgroundRepeatAllowlist,
2348
+ fn as backgroundSizeAllowlist,
2349
+ hn as borderStyleKeywords,
2350
+ qt as boxSpacingSideKeys,
2351
+ Cs as boxSpacingStyleAttributeEntries,
2352
+ _t as buildCloudinaryBackgroundUrl,
2353
+ so as buildOverlayLayerBoxStyles,
2354
+ oo as buildOverlayStackStyles,
2355
+ Oe as buildWidgetFetchUrl,
2356
+ ro as collectComponentInstancePaths,
2236
2357
  ae as collectReferencedLibraryIds,
2237
- ut as composeSourceComponentsPlugin,
2238
- X as createComponentLibraryRegistry,
2239
- oe as cssAttrArrayKey,
2358
+ dt as composeSourceComponentsPlugin,
2359
+ J as createComponentLibraryRegistry,
2360
+ se as cssAttrArrayKey,
2240
2361
  kt as defaultPageWidth,
2241
- On as deriveDisplayFlexIfNeeded,
2242
- Qo as desktopModeWidth,
2243
- ss as fetchRuleCMSWidget,
2244
- lo as findUnmatchedComponentPropsKeys,
2245
- dn as flexDirectionAllowlist,
2246
- an as flexWrapAllowlist,
2247
- Qt as fontFamilyAllowlist,
2248
- tn as fontStyleAllowlist,
2249
- en as fontWeightAllowlist,
2362
+ jn as deriveDisplayFlexIfNeeded,
2363
+ bs as desktopModeWidth,
2364
+ Is as fetchRuleCMSWidget,
2365
+ co as findUnmatchedComponentPropsKeys,
2366
+ pn as flexDirectionAllowlist,
2367
+ un as flexWrapAllowlist,
2368
+ en as fontFamilyAllowlist,
2369
+ nn as fontStyleAllowlist,
2370
+ tn as fontWeightAllowlist,
2250
2371
  kn as formatBackgroundImageStyles,
2251
- Dn as formatBorderStyles,
2252
- Tn as formatBoxShadowStyles,
2253
- En as formatBoxSpacingStyles,
2254
- Pn as formatCssColorStyles,
2255
- pe as formatCssColorValue,
2372
+ Tn as formatBorderStyles,
2373
+ xn as formatBoxShadowStyles,
2374
+ Pn as formatBoxSpacingStyles,
2375
+ $n as formatCssColorStyles,
2376
+ fe as formatCssColorValue,
2256
2377
  Ln as formatCssEnumStyles,
2257
- $n as formatCssLengthStyles,
2378
+ Rn as formatCssLengthStyles,
2258
2379
  k as formatCssVariable,
2259
- es as formatCssVariableStyles,
2260
- Rn as formatLineHeightStyles,
2261
- Nn as formatObjectStyleAttribute,
2262
- Mn as formatOpacityStyles,
2263
- B as formatSpacingSideValue,
2264
- It as generatePublishedKey,
2265
- Xo as generatePublishedKeyForEmbedded,
2266
- je as getCollectionIdForCollectionType,
2267
- Y as getColumnAttributes,
2268
- Ie as getComponentAttributesAndStyles,
2269
- ne as getComponentsPluginFromPlugins,
2270
- w as getCssVariableFromLeaf,
2271
- jn as getDefaultDimensionAttributes,
2272
- L as getDeviceTypeBasedAttributes,
2273
- zo as getDragItemId,
2274
- ht as getDragItemPrefixAndId,
2275
- bt as getIdAndPrefix,
2380
+ ws as formatCssVariableStyles,
2381
+ Mn as formatLineHeightStyles,
2382
+ Wn as formatObjectStyleAttribute,
2383
+ Nn as formatOpacityStyles,
2384
+ K as formatSpacingSideValue,
2385
+ St as generatePublishedKey,
2386
+ ms as generatePublishedKeyForEmbedded,
2387
+ Ve as getCollectionIdForCollectionType,
2388
+ Z as getColumnAttributes,
2389
+ Se as getComponentAttributesAndStyles,
2390
+ oe as getComponentsPluginFromPlugins,
2391
+ C as getCssVariableFromLeaf,
2392
+ Vn as getDefaultDimensionAttributes,
2393
+ N as getDeviceTypeBasedAttributes,
2394
+ us as getDragItemId,
2395
+ bt as getDragItemPrefixAndId,
2396
+ wt as getIdAndPrefix,
2276
2397
  Bn as getMergedAttributes,
2277
- Go as getNameAndInstanceIdFromWidgetKey,
2278
- _o as getNameFromWidgetKey,
2279
- Qn as getOverlayLayerZIndex,
2280
- wt as getWidgetKeyForCollection,
2281
- Yo as getWidgetKeyForCollectionWithPrefix,
2282
- Ct as getWidgetKeyForPublishedCollection,
2283
- qo as getWidgetKeyForPublishedCollectionWithPrefix,
2284
- An as hasBoxShadowLeaf,
2285
- po as hasDeviceDivergentValues,
2286
- E as hasInvalidCssVariable,
2398
+ ds as getNameAndInstanceIdFromWidgetKey,
2399
+ ps as getNameFromWidgetKey,
2400
+ eo as getOverlayLayerZIndex,
2401
+ Ct as getWidgetKeyForCollection,
2402
+ fs as getWidgetKeyForCollectionWithPrefix,
2403
+ vt as getWidgetKeyForPublishedCollection,
2404
+ ys as getWidgetKeyForPublishedCollectionWithPrefix,
2405
+ In as hasBoxShadowLeaf,
2406
+ fo as hasDeviceDivergentValues,
2407
+ $ as hasInvalidCssVariable,
2287
2408
  Fn as hasItems,
2288
- Jn as hasOverlayLayers,
2289
- Zo as incrementVersion,
2409
+ Qn as hasOverlayLayers,
2410
+ gs as incrementVersion,
2290
2411
  Gt as isBackgroundImageValue,
2291
- hn as isBorderStyleValue,
2292
- bn as isBorderValue,
2293
- vn as isBoxShadowValue,
2294
- qt as isBoxSpacingValue,
2295
- jt as isCloudinaryCloudName,
2296
- Ot as isCloudinaryPublicId,
2412
+ bn as isBorderStyleValue,
2413
+ wn as isBorderValue,
2414
+ An as isBoxShadowValue,
2415
+ Xt as isBoxSpacingValue,
2416
+ Vt as isCloudinaryCloudName,
2417
+ jt as isCloudinaryPublicId,
2297
2418
  Ft as isCloudinaryTransformationString,
2298
- de as isCssColorValue,
2299
- Jt as isCssEnumValue,
2300
- Ke as isCssVariableName,
2301
- O as isDevClientToken,
2302
- In as isLineHeightValue,
2303
- Sn as isOpacityValue,
2304
- to as isOverlayLayerEmptyForDevice,
2305
- Un as isRowHiddenForDevice,
2419
+ pe as isCssColorValue,
2420
+ Qt as isCssEnumValue,
2421
+ ue as isCssVariableName,
2422
+ B as isDevClientToken,
2423
+ Sn as isLineHeightValue,
2424
+ Dn as isOpacityValue,
2425
+ no as isOverlayLayerEmptyForDevice,
2426
+ _n as isRowHiddenForDevice,
2306
2427
  Bt as isSafeImageUrl,
2307
- j as isSpacingSideValue,
2308
- ge as isWidgetHiddenForDevice,
2309
- ln as justifyContentAllowlist,
2310
- me as normalizeCssClasses,
2311
- fe as objectStyleAttributeRegistry,
2312
- ee as overflowAllowlist,
2428
+ F as isSpacingSideValue,
2429
+ he as isWidgetHiddenForDevice,
2430
+ cn as justifyContentAllowlist,
2431
+ ge as normalizeCssClasses,
2432
+ ye as objectStyleAttributeRegistry,
2433
+ te as overflowAllowlist,
2313
2434
  Fe as phoneModeWidth,
2314
- rn as pointerEventsAllowlist,
2315
- Ze as prepareRuleCMSWidgetData,
2316
- Se as resolveBaseZIndex,
2317
- Re as resolveKey,
2318
- eo as resolveOverlayLayerPointerEvents,
2435
+ ln as pointerEventsAllowlist,
2436
+ Je as prepareRuleCMSWidgetData,
2437
+ De as resolveBaseZIndex,
2438
+ Me as resolveKey,
2439
+ to as resolveOverlayLayerPointerEvents,
2319
2440
  Hn as resolveRowStyles,
2320
- gt as resolveWidgetApiOrigin,
2321
- He as resolveWidgetContainerStyles,
2322
- so as resolveWidgetInstanceProps,
2323
- is as resolveWidgetLibraries,
2324
- Kn as rowBasedPropertiesAreAssigned,
2325
- ue as spacingKeywords,
2326
- _t as spacingLengthUnits,
2327
- Ve as tabletModeWidth,
2328
- nn as textAlignAllowlist,
2329
- on as textDecorationAllowlist,
2330
- sn as textTransformAllowlist,
2331
- Oe as typeHasPrefix,
2332
- co as warnUnmatchedComponentProps,
2333
- Xn as widgetBasedPropertiesAreAssigned,
2334
- ze as widgetDeclaresOwnHeight
2441
+ ht as resolveWidgetApiOrigin,
2442
+ _e as resolveWidgetContainerStyles,
2443
+ io as resolveWidgetInstanceProps,
2444
+ Ss as resolveWidgetLibraries,
2445
+ Un as rowBasedPropertiesAreAssigned,
2446
+ de as spacingKeywords,
2447
+ Yt as spacingLengthUnits,
2448
+ Ke as tabletModeWidth,
2449
+ on as textAlignAllowlist,
2450
+ sn as textDecorationAllowlist,
2451
+ rn as textTransformAllowlist,
2452
+ je as typeHasPrefix,
2453
+ ao as warnUnmatchedComponentProps,
2454
+ Zn as widgetBasedPropertiesAreAssigned,
2455
+ He as widgetDeclaresOwnHeight
2335
2456
  };