@rulecms/widget-vue 0.3.0 → 0.4.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 He = Object.defineProperty;
2
- var Ge = (e, t, n) => t in e ? He(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var ye = (e, t, n) => Ge(e, typeof t != "symbol" ? t + "" : t, n);
4
- import { defineComponent as D, reactive as ze, watch as De, provide as Ye, renderSlot as se, computed as y, openBlock as m, createElementBlock as b, normalizeStyle as S, normalizeClass as F, createBlock as A, resolveDynamicComponent as R, withCtx as V, createTextVNode as ie, toDisplayString as Y, createCommentVNode as W, Fragment as I, normalizeProps as Z, guardReactiveProps as ge, mergeProps as qe, resolveComponent as Xe, renderList as z, createVNode as ne, createElementVNode as $, ref as B, onMounted as Ze, onBeforeUnmount as xe, inject as Je, unref as T } from "vue";
5
- const _ = "default";
6
- function Te(e, t) {
7
- return !(e != null && e.length) || e === _ ? t : `${e}/${t}`;
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}`;
8
8
  }
9
- const Qe = `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 he(e) {
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) {
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 et(e) {
17
- if (he(e))
16
+ function ct(e) {
17
+ if (Ce(e))
18
18
  return e;
19
19
  const t = e;
20
- return he(t == null ? void 0 : t.default) ? t.default : null;
20
+ return Ce(t == null ? void 0 : t.default) ? t.default : null;
21
21
  }
22
- function J(e) {
23
- return e.usesDefaultLibrary ? [_, ...e.libraryIds] : [...e.libraryIds];
22
+ function Q(e) {
23
+ return e.usesDefaultLibrary ? [H, ...e.libraryIds] : [...e.libraryIds];
24
24
  }
25
- function be({ registrations: e, referenced: t }) {
26
- if (t.usesDefaultLibrary && !(e != null && e[_]))
27
- throw new Error(Qe);
25
+ function ve({ registrations: e, referenced: t }) {
26
+ if (t.usesDefaultLibrary && !(e != null && e[H]))
27
+ throw new Error(lt);
28
28
  }
29
- function tt(e) {
29
+ function at(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,109 +36,109 @@ function tt(e) {
36
36
  }
37
37
  return t.length > 0 ? t : void 0;
38
38
  }
39
- function nt(e) {
39
+ function ut(e) {
40
40
  const t = {};
41
41
  for (const [o, s] of e) {
42
- const i = o === _;
43
- for (const [c, d] of Object.entries(s.components))
44
- t[i ? c : `${o}/${c}`] = d;
42
+ const i = o === H;
43
+ for (const [r, f] of Object.entries(s.components))
44
+ t[i ? r : `${o}/${r}`] = f;
45
45
  }
46
- const n = tt(e);
46
+ const n = at(e);
47
47
  return n ? { components: t, stylesheets: n } : { components: t };
48
48
  }
49
- function q() {
49
+ function X() {
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
- function i(r, l) {
53
- var f;
54
- e.get(r) !== l && ((f = l.manifest) != null && f.id && l.manifest.id !== r && console.warn(
55
- `RuleCMS widget: component library registered as "${r}" declares manifest id "${l.manifest.id}". The registered id wins for resolution.`
56
- ), e.set(r, l), s += 1);
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(
55
+ `RuleCMS widget: component library registered as "${c}" declares manifest id "${a.manifest.id}". The registered id wins for resolution.`
56
+ ), e.set(c, a), s += 1);
57
57
  }
58
- function c(r) {
59
- const l = J(r), f = [...l].sort().join("|"), u = o.get(f);
60
- if (u && u.loadedVersion === s)
61
- return u.plugin;
62
- const p = /* @__PURE__ */ new Map();
63
- for (const g of l) {
64
- const v = e.get(g);
65
- v && p.set(g, v);
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;
62
+ const l = /* @__PURE__ */ new Map();
63
+ for (const p of a) {
64
+ const I = e.get(p);
65
+ I && l.set(p, I);
66
66
  }
67
- const h = nt(p);
68
- return o.set(f, { loadedVersion: s, plugin: h }), h;
67
+ const g = ut(l);
68
+ return o.set(u, { loadedVersion: s, plugin: g }), g;
69
69
  }
70
- function d(r) {
71
- be(r);
72
- const { registrations: l, referenced: f } = r;
73
- for (const u of J(f)) {
74
- if (e.has(u) || n.has(u))
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))
75
75
  continue;
76
- const p = l == null ? void 0 : l[u];
77
- if (!p) {
76
+ const l = a == null ? void 0 : a[d];
77
+ if (!l) {
78
78
  console.error(
79
- `RuleCMS widget: no component library registered for libraryId "${u}"; its components will not render.`
80
- ), n.set(u, new Error(`No registration for libraryId "${u}"`));
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}"`));
81
81
  continue;
82
82
  }
83
- if (typeof p == "function")
83
+ if (typeof l == "function")
84
84
  return null;
85
- i(u, p);
85
+ i(d, l);
86
86
  }
87
- return c(f);
87
+ return r(u);
88
88
  }
89
- async function a(r) {
90
- be(r);
91
- const { registrations: l, referenced: f } = r, u = J(f);
89
+ async function m(c) {
90
+ ve(c);
91
+ const { registrations: a, referenced: u } = c, d = Q(u);
92
92
  return await Promise.all(
93
- u.map(async (p) => {
94
- if (e.has(p) || n.has(p))
93
+ d.map(async (l) => {
94
+ if (e.has(l) || n.has(l))
95
95
  return;
96
- const h = l == null ? void 0 : l[p];
97
- if (!h) {
96
+ const g = a == null ? void 0 : a[l];
97
+ if (!g) {
98
98
  console.error(
99
- `RuleCMS widget: no component library registered for libraryId "${p}"; its components will not render.`
100
- ), n.set(p, new Error(`No registration for libraryId "${p}"`));
99
+ `RuleCMS widget: no component library registered for libraryId "${l}"; its components will not render.`
100
+ ), n.set(l, new Error(`No registration for libraryId "${l}"`));
101
101
  return;
102
102
  }
103
- if (typeof h != "function") {
104
- i(p, h);
103
+ if (typeof g != "function") {
104
+ i(l, g);
105
105
  return;
106
106
  }
107
- let g = t.get(p);
108
- g || (g = h().then((v) => {
109
- const C = et(v);
110
- if (!C)
107
+ let p = t.get(l);
108
+ p || (p = g().then((I) => {
109
+ const v = ct(I);
110
+ if (!v)
111
111
  throw new Error(
112
- `Registration for libraryId "${p}" did not resolve to a ComponentLibraryModule (expected { manifest, components }).`
112
+ `Registration for libraryId "${l}" did not resolve to a ComponentLibraryModule (expected { manifest, components }).`
113
113
  );
114
- i(p, C);
115
- }).catch((v) => {
116
- n.set(p, v), console.error(
117
- `RuleCMS widget: failed to load component library "${p}":`,
118
- v
114
+ i(l, v);
115
+ }).catch((I) => {
116
+ n.set(l, I), console.error(
117
+ `RuleCMS widget: failed to load component library "${l}":`,
118
+ I
119
119
  );
120
120
  }).finally(() => {
121
- t.delete(p);
122
- }), t.set(p, g)), await g;
121
+ t.delete(l);
122
+ }), t.set(l, p)), await p;
123
123
  })
124
- ), c(f);
124
+ ), r(u);
125
125
  }
126
- return { resolveSync: d, resolve: a };
126
+ return { resolveSync: f, resolve: m };
127
127
  }
128
- const Po = {
128
+ const Ko = {
129
129
  Preview: "Preview",
130
130
  Compose: "Compose",
131
131
  RenderedPage: "RenderedPage"
132
- }, re = {
132
+ }, ce = {
133
133
  DroppableBox: "droppable-box"
134
- }, we = {
134
+ }, Ae = {
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
- }, Eo = {
141
+ }, Uo = {
142
142
  FlexStart: "flex-start",
143
143
  FlexEnd: "flex-end",
144
144
  Center: "center",
@@ -146,49 +146,49 @@ const Po = {
146
146
  SpaceAround: "space-around",
147
147
  SpaceEvenly: "space-evenly",
148
148
  Stretch: "stretch"
149
- }, Q = "cssAttrArray", $o = {
149
+ }, oe = "cssAttrArray", Ho = {
150
150
  Phone: "phone",
151
151
  Tablet: "tablet",
152
152
  Desktop: "desktop"
153
- }, Pe = {
153
+ }, Me = {
154
154
  ComposerComponent: "ComposerWidget",
155
155
  Collection: "Collection",
156
156
  MoveComponentHandle: "MoveWidgetHandle"
157
- }, Ee = `${Pe.Collection}_`, ot = "dev.", st = "https://rulecms.com", it = "https://widget-cache.rulecms.com", rt = "/api/v1/c/widget/get", lt = "/api/v1/c/dev/widget/get";
158
- function L(e) {
159
- return typeof e == "string" && e.startsWith(ot);
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);
160
160
  }
161
- function ct(e, t) {
162
- return t ? t.replace(/\/$/, "") : L(e) ? st : it;
161
+ function gt(e, t) {
162
+ return t ? t.replace(/\/$/, "") : O(e) ? pt : ft;
163
163
  }
164
- function $e({
164
+ function We({
165
165
  publishedKey: e,
166
166
  token: t,
167
167
  endpoint: n
168
168
  }) {
169
- const o = L(t), s = o ? lt : rt, i = o ? new URLSearchParams({ widgetKey: e, token: t }) : new URLSearchParams({ publishedKey: e, token: t });
170
- return `${ct(t, n)}${s}?${i.toString()}`;
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()}`;
171
171
  }
172
- const Ro = ({ id: e, prefix: t }) => `${t}_${e}`, at = (e) => {
172
+ const zo = ({ id: e, prefix: t }) => `${t}_${e}`, ht = (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 ut(e);
178
- }, Re = (e) => e.includes("_"), ut = (e) => {
177
+ return bt(e);
178
+ }, Oe = (e) => e.includes("_"), bt = (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
- }, Le = (e) => {
185
- if (!Re(e))
184
+ }, je = (e) => {
185
+ if (!Oe(e))
186
186
  return;
187
- const n = at(e);
188
- return (n == null ? void 0 : n.prefix) === Pe.Collection || console.error(
187
+ const n = ht(e);
188
+ return (n == null ? void 0 : n.prefix) === Me.Collection || console.error(
189
189
  "getCollectionIdForCollectionType - Invalid component type: ${componentType}. Invalid prefix type."
190
190
  ), n == null ? void 0 : n.id;
191
- }, Lo = (e) => {
191
+ }, Go = (e) => {
192
192
  if (!(e != null && e.length)) {
193
193
  console.error("getNameAndInstanceIdFromWidgetKey: Missing widget key");
194
194
  return;
@@ -203,47 +203,47 @@ const Ro = ({ id: e, prefix: t }) => `${t}_${e}`, at = (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
- }, Mo = (e) => {
206
+ }, _o = (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
- }, dt = (e) => {
212
- var s, i, c, d;
211
+ }, wt = (e) => {
212
+ var s, i, r, f;
213
213
  if (!e)
214
214
  return { error: "getWidgetKeyForCollection: Missing collection" };
215
215
  if (!((s = e.name) != null && s.length))
216
216
  return { error: "getWidgetKeyForCollection: Missing collection name" };
217
217
  const t = (i = e.name) == null ? void 0 : i.trim().toLowerCase();
218
- if (!((c = e.id) != null && c.length))
218
+ if (!((r = e.id) != null && r.length))
219
219
  return { error: "getWidgetKeyForCollection: Missing collection id" };
220
- const o = ((d = e.parentId) == null ? void 0 : d.length) ? `${e.id}@${e.parentId}` : `${e.id}`;
220
+ const o = ((f = e.parentId) == null ? void 0 : f.length) ? `${e.id}@${e.parentId}` : `${e.id}`;
221
221
  return { data: `${t}$${o}` };
222
- }, pt = (e) => {
223
- var s, i, c, d;
222
+ }, Ct = (e) => {
223
+ var s, i, r, f;
224
224
  if (!e)
225
225
  return { error: "getWidgetKeyForPublishedCollection: Missing collection" };
226
226
  if (!((s = e.name) != null && s.length))
227
227
  return { error: "getWidgetKeyForPublishedCollection: Missing collection name" };
228
228
  const t = (i = e.name) == null ? void 0 : i.trim().toLowerCase();
229
- if (!((c = e.publishedKey) != null && c.length))
229
+ if (!((r = e.publishedKey) != null && r.length))
230
230
  return { error: "getWidgetKeyForPublishedCollection: Missing collection publishedKey" };
231
- const o = ((d = e.parentId) == null ? void 0 : d.length) ? `${e.publishedKey}@${e.parentId}` : `${e.publishedKey}`;
231
+ const o = ((f = e.parentId) == null ? void 0 : f.length) ? `${e.publishedKey}@${e.parentId}` : `${e.publishedKey}`;
232
232
  return { data: `${t}$${o}` };
233
- }, No = (e) => {
234
- const t = dt(e);
235
- return `${Ee}${t.data}`;
236
- }, Wo = (e) => {
237
- const t = pt(e);
238
- return `${Ee}${t.data}`;
239
- }, ft = "---", mt = "___";
240
- function yt(e, t) {
241
- return `${e}${ft}${t}`;
233
+ }, Yo = (e) => {
234
+ const t = wt(e);
235
+ return `${Ne}${t.data}`;
236
+ }, qo = (e) => {
237
+ const t = Ct(e);
238
+ return `${Ne}${t.data}`;
239
+ }, vt = "---", At = "___";
240
+ function It(e, t) {
241
+ return `${e}${vt}${t}`;
242
242
  }
243
- function Oo(e, t, n) {
244
- return `${yt(e, t)}${mt}${n}`;
243
+ function Xo(e, t, n) {
244
+ return `${It(e, t)}${At}${n}`;
245
245
  }
246
- function jo(e) {
246
+ function Zo(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`);
@@ -252,19 +252,19 @@ function jo(e) {
252
252
  throw new Error(`Invalid patch version: ${t[2]}. Expected a number.`);
253
253
  return `${n}.${o}.${s + 1}`;
254
254
  }
255
- function le({
255
+ function ae({
256
256
  displayItemList: e,
257
257
  widgetCollections: t
258
258
  }) {
259
259
  const n = /* @__PURE__ */ new Set();
260
260
  let o = !1;
261
261
  const s = (i) => {
262
- var c, d, a;
263
- if ((c = i == null ? void 0 : i.rows) != null && c.length) {
264
- for (const r of i.rows)
265
- if ((d = r == null ? void 0 : r.columns) != null && d.length)
266
- for (const l of r.columns)
267
- l.collection && s(l.collection.collectionRows), !(!l.type || l.type === re.DroppableBox) && (Re(l.type) || (!((a = l.libraryId) != null && a.length) || l.libraryId === _ ? o = !0 : n.add(l.libraryId)));
262
+ var r, f, m;
263
+ if ((r = i == null ? void 0 : i.rows) != null && r.length) {
264
+ for (const c of i.rows)
265
+ if ((f = c == null ? void 0 : c.columns) != null && f.length)
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)));
268
268
  }
269
269
  };
270
270
  s(e);
@@ -272,16 +272,16 @@ function le({
272
272
  s(i == null ? void 0 : i.collectionRows);
273
273
  return { libraryIds: Array.from(n), usesDefaultLibrary: o };
274
274
  }
275
- const Me = Symbol("rulecms-widget-context");
276
- function gt() {
275
+ const Be = Symbol("rulecms-widget-context");
276
+ function St() {
277
277
  return {
278
278
  token: "",
279
279
  endpoint: void 0,
280
280
  libraries: void 0,
281
- libraryRegistry: q()
281
+ libraryRegistry: X()
282
282
  };
283
283
  }
284
- const Bo = /* @__PURE__ */ D({
284
+ const Jo = /* @__PURE__ */ D({
285
285
  __name: "RuleCMSWidgetProvider",
286
286
  props: {
287
287
  token: {},
@@ -289,97 +289,97 @@ const Bo = /* @__PURE__ */ D({
289
289
  libraries: {}
290
290
  },
291
291
  setup(e) {
292
- const t = e, n = ze(gt());
293
- return De(
292
+ const t = e, n = tt(St());
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
- ), Ye(Me, n), (o, s) => se(o.$slots, "default");
299
+ ), nt(Be, n), (o, s) => re(o.$slots, "default");
300
300
  }
301
- }), ht = "1200px", Ne = "500px", We = "820px", Fo = ht, bt = "rulecms", wt = 1920, Ct = {
301
+ }), kt = "1200px", Fe = "500px", Ve = "820px", Qo = kt, Dt = "rulecms", Tt = 1920, xt = {
302
302
  f: "auto",
303
303
  q: "auto",
304
304
  c: "limit"
305
- }, vt = /^[A-Za-z0-9][A-Za-z0-9._\-/]*$/, At = 300, St = /^[A-Za-z0-9][A-Za-z0-9_-]*$/, It = 100, kt = /^https:\/\/[^\s"'()\\<>]+$/, Dt = 2e3, xt = /^[A-Za-z0-9_,.:\-/]*$/, Tt = 300, Pt = (e) => typeof e == "string" && e.length <= At && vt.test(e), Et = (e) => typeof e == "string" && e.length <= It && St.test(e), $t = (e) => typeof e == "string" && e.length <= Dt && kt.test(e), Rt = (e) => typeof e == "string" && e.length <= Tt && xt.test(e), Lt = (e) => Object.entries(e).map(([t, n]) => `${t}_${n}`).join(","), Mt = (e) => {
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) => {
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
- }, Nt = ({
312
+ }, Ut = ({
313
313
  publicId: e,
314
- cloudName: t = bt,
314
+ cloudName: t = Dt,
315
315
  transformations: n,
316
- width: o = wt
316
+ width: o = Tt
317
317
  }) => {
318
- const s = typeof n == "string" ? Mt(n) : n, i = {
319
- ...Ct,
318
+ const s = typeof n == "string" ? Kt(n) : n, i = {
319
+ ...xt,
320
320
  ...s,
321
321
  w: o
322
322
  };
323
323
  return encodeURI(
324
- `https://res.cloudinary.com/${t}/image/upload/${Lt(i)}/${e}`
324
+ `https://res.cloudinary.com/${t}/image/upload/${Vt(i)}/${e}`
325
325
  );
326
- }, Wt = /^--[A-Za-z0-9_-]+$/, Ot = 200, Oe = (e) => {
326
+ }, Ht = /^--[A-Za-z0-9_-]+$/, zt = 200, Ke = (e) => {
327
327
  if (typeof e != "string")
328
328
  return !1;
329
329
  const t = e.trim();
330
- return t.length <= Ot && Wt.test(t);
330
+ return t.length <= zt && Ht.test(t);
331
331
  }, k = (e) => `var(${e.trim()})`, w = (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 Oe(t) ? t.trim() : void 0;
337
- }, P = (e) => {
336
+ return Ke(t) ? t.trim() : void 0;
337
+ }, E = (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 : !Oe(t);
342
- }, Vo = (e, t) => {
341
+ return t == null ? !1 : !Ke(t);
342
+ }, es = (e, t) => {
343
343
  const n = w(e);
344
344
  return n ? { [t]: k(n) } : void 0;
345
- }, jt = (e) => {
346
- if (typeof e != "object" || e === null || Array.isArray(e) || P(e))
345
+ }, Gt = (e) => {
346
+ if (typeof e != "object" || e === null || Array.isArray(e) || E(e))
347
347
  return !1;
348
348
  if (w(e))
349
349
  return !0;
350
350
  const t = e;
351
- return t.source === "none" ? !0 : t.source === "url" ? $t(t.url) : t.source === "cloudinary" ? !Pt(t.publicId) || t.cloudName !== void 0 && t.cloudName !== null && !Et(t.cloudName) ? !1 : t.transformations === void 0 || t.transformations === null || Rt(t.transformations) : !1;
352
- }, Bt = ["px", "%", "em", "rem", "vh", "vw"], ce = ["inherit", "unset"], Ft = ["allSides", "top", "right", "bottom", "left"], M = (e, t = {}) => {
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 = {}) => {
353
353
  if (typeof e != "object" || e === null || Array.isArray(e))
354
354
  return !1;
355
355
  const n = e;
356
- return P(e) ? !1 : w(e) ? !0 : n.unit === "auto" ? t.allowAuto !== !1 : n.unit === "keyword" ? t.allowKeywords !== !1 && ce.includes(n.keyword) : Bt.includes(n.unit) ? typeof n.value != "number" || !Number.isFinite(n.value) ? !1 : t.allowNegative !== !1 || n.value >= 0 : !1;
357
- }, Vt = (e, t = {}) => {
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 = {}) => {
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 Ft) {
361
+ for (const o of Yt) {
362
362
  const s = n[o];
363
- if (s != null && !M(s, t))
363
+ if (s != null && !j(s, t))
364
364
  return !1;
365
365
  }
366
366
  return !0;
367
- }, _t = [...ce, "transparent", "currentColor"], Kt = /^(#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})|rgba?\([^)]+\)|hsla?\([^)]+\))$/, ae = (e) => {
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) => {
368
368
  if (typeof e != "object" || e === null || Array.isArray(e))
369
369
  return !1;
370
370
  const t = e;
371
- return P(e) ? !1 : w(e) ? !0 : t.unit === "keyword" ? _t.includes(t.keyword) : t.unit === "color" ? typeof t.value == "string" && Kt.test(t.value.trim()) : !1;
372
- }, ue = (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
373
  const t = w(e);
374
374
  return t ? k(t) : "unit" in e ? e.unit === "keyword" ? e.keyword : e.value.trim() : "";
375
- }, Ut = (e, t) => typeof e == "object" && e !== null && !Array.isArray(e) ? !P(e) && !!w(e) : typeof e != "string" || !e.length ? !1 : t.includes(e) ? !0 : ce.includes(e), Ht = [
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 = [
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
- ], Gt = [
382
+ ], en = [
383
383
  "normal",
384
384
  "bold",
385
385
  "100",
@@ -391,19 +391,19 @@ const Bo = /* @__PURE__ */ D({
391
391
  "700",
392
392
  "800",
393
393
  "900"
394
- ], zt = ["normal", "italic", "oblique"], Yt = [
394
+ ], tn = ["normal", "italic", "oblique"], nn = [
395
395
  "left",
396
396
  "center",
397
397
  "right",
398
398
  "justify",
399
399
  "start",
400
400
  "end"
401
- ], qt = [
401
+ ], on = [
402
402
  "none",
403
403
  "underline",
404
404
  "line-through",
405
405
  "overline"
406
- ], Xt = [
406
+ ], sn = [
407
407
  "none",
408
408
  "uppercase",
409
409
  "lowercase",
@@ -414,20 +414,20 @@ const Bo = /* @__PURE__ */ D({
414
414
  "scroll",
415
415
  "auto",
416
416
  "clip"
417
- ], Zt = [
417
+ ], rn = ["auto", "none"], ln = [
418
418
  "flex-start",
419
419
  "flex-end",
420
420
  "center",
421
421
  "space-between",
422
422
  "space-around",
423
423
  "space-evenly"
424
- ], Jt = [
424
+ ], cn = [
425
425
  "flex-start",
426
426
  "flex-end",
427
427
  "center",
428
428
  "baseline",
429
429
  "stretch"
430
- ], Qt = ["wrap", "nowrap"], en = [
430
+ ], an = ["wrap", "nowrap"], un = [
431
431
  "flex-start",
432
432
  "flex-end",
433
433
  "center",
@@ -435,12 +435,12 @@ const Bo = /* @__PURE__ */ D({
435
435
  "space-around",
436
436
  "space-evenly",
437
437
  "stretch"
438
- ], tn = [
438
+ ], dn = [
439
439
  "row",
440
440
  "row-reverse",
441
441
  "column",
442
442
  "column-reverse"
443
- ], nn = ["cover", "contain", "auto"], on = [
443
+ ], pn = ["cover", "contain", "auto"], fn = [
444
444
  "center center",
445
445
  "center top",
446
446
  "center bottom",
@@ -450,20 +450,20 @@ const Bo = /* @__PURE__ */ D({
450
450
  "right center",
451
451
  "right top",
452
452
  "right bottom"
453
- ], sn = [
453
+ ], yn = [
454
454
  "no-repeat",
455
455
  "repeat",
456
456
  "repeat-x",
457
457
  "repeat-y",
458
458
  "space",
459
459
  "round"
460
- ], rn = [
460
+ ], mn = [
461
461
  "justifyContent",
462
462
  "alignItems",
463
463
  "flexWrap",
464
464
  "alignContent",
465
465
  "flexDirection"
466
- ], ln = [
466
+ ], gn = [
467
467
  "none",
468
468
  "solid",
469
469
  "dashed",
@@ -473,107 +473,107 @@ const Bo = /* @__PURE__ */ D({
473
473
  "ridge",
474
474
  "inset",
475
475
  "outset"
476
- ], cn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !P(e) && !!w(e) : ln.includes(e), an = (e) => {
476
+ ], hn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !E(e) && !!w(e) : gn.includes(e), bn = (e) => {
477
477
  if (typeof e != "object" || e === null || Array.isArray(e))
478
478
  return !1;
479
479
  const t = e;
480
- return P(e) ? !1 : w(e) ? !0 : !(t.width !== void 0 && t.width !== null && !M(t.width, { allowAuto: !1, allowNegative: !1 }) || t.style !== void 0 && t.style !== null && !cn(t.style) || t.color !== void 0 && t.color !== null && !ae(t.color));
481
- }, un = {
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 = {
482
482
  allowAuto: !1,
483
483
  allowKeywords: !1,
484
484
  allowNegative: !0
485
- }, dn = {
485
+ }, Cn = {
486
486
  allowAuto: !1,
487
487
  allowKeywords: !1,
488
488
  allowNegative: !1
489
- }, pn = (e) => {
489
+ }, vn = (e) => {
490
490
  if (typeof e != "object" || e === null || Array.isArray(e))
491
491
  return !1;
492
492
  const t = e;
493
- if (P(e))
493
+ if (E(e))
494
494
  return !1;
495
495
  if (w(e))
496
496
  return !0;
497
497
  for (const n of ["offsetX", "offsetY", "spread"]) {
498
498
  const o = t[n];
499
- if (o != null && !M(o, un))
499
+ if (o != null && !j(o, wn))
500
500
  return !1;
501
501
  }
502
- return !(t.blur !== void 0 && t.blur !== null && !M(t.blur, dn) || t.color !== void 0 && t.color !== null && !ae(t.color) || t.inset !== void 0 && t.inset !== null && typeof t.inset != "boolean");
503
- }, fn = (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, mn = (e) => {
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) => {
504
504
  if (typeof e != "object" || e === null || Array.isArray(e))
505
505
  return !1;
506
506
  const t = e;
507
- return P(e) ? !1 : w(e) ? !0 : t.unit === "number" ? typeof t.value == "number" && Number.isFinite(t.value) && t.value > 0 : M(e, { allowAuto: !1, allowNegative: !1 });
508
- }, yn = (e) => typeof e == "object" && e !== null && !Array.isArray(e) ? !P(e) && !!w(e) : typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= 1, gn = (e) => {
509
- if (!jt(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) => {
509
+ if (!Gt(e))
510
510
  return {};
511
511
  const t = w(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("${Nt({
516
+ backgroundImage: `url("${Ut({
517
517
  publicId: n.publicId,
518
518
  cloudName: n.cloudName,
519
519
  transformations: n.transformations
520
520
  })}")`
521
521
  };
522
- }, N = (e) => {
522
+ }, B = (e) => {
523
523
  const t = w(e);
524
524
  return t ? k(t) : "unit" in e ? e.unit === "auto" ? "auto" : e.unit === "keyword" ? e.keyword : `${e.value}${e.unit}` : "";
525
- }, hn = (e) => {
526
- if (!an(e))
525
+ }, Dn = (e) => {
526
+ if (!bn(e))
527
527
  return {};
528
528
  const t = w(e);
529
529
  if (t)
530
530
  return { border: k(t) };
531
531
  const n = {};
532
- if (e.width && (n.borderWidth = N(e.width)), e.style) {
532
+ if (e.width && (n.borderWidth = B(e.width)), e.style) {
533
533
  const o = w(e.style);
534
534
  n.borderStyle = o ? k(o) : e.style;
535
535
  }
536
- return e.color && (n.borderColor = ue(e.color)), n;
537
- }, U = (e) => e ? N(e) : "0px", bn = (e) => {
538
- if (!pn(e) || !fn(e))
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))
539
539
  return {};
540
540
  const t = w(e);
541
541
  if (t)
542
542
  return { boxShadow: k(t) };
543
543
  const n = [
544
- U(e.offsetX),
545
- U(e.offsetY),
546
- U(e.blur),
547
- U(e.spread)
544
+ G(e.offsetX),
545
+ G(e.offsetY),
546
+ G(e.blur),
547
+ G(e.spread)
548
548
  ];
549
- return e.color && n.push(ue(e.color)), e.inset && n.unshift("inset"), { boxShadow: n.join(" ") };
550
- }, wn = (e) => `${e.charAt(0).toUpperCase()}${e.slice(1)}`, Cn = (e, t) => {
551
- if (!Vt(e))
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))
552
552
  return {};
553
553
  if (e.allSides)
554
- return { [t]: N(e.allSides) };
554
+ return { [t]: B(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}${wn(o)}`] = N(s));
558
+ s && (n[`${t}${xn(o)}`] = B(s));
559
559
  }
560
560
  return n;
561
- }, vn = (e, t) => ae(e) ? { [t]: ue(e) } : {}, An = (e, t, n) => {
562
- if (!Ut(e, n))
561
+ }, Pn = (e, t) => de(e) ? { [t]: pe(e) } : {}, Ln = (e, t, n) => {
562
+ if (!Jt(e, n))
563
563
  return {};
564
564
  const o = w(e);
565
565
  return o ? { [t]: k(o) } : { [t]: e };
566
- }, Sn = (e, t, n = {}) => M(e, n) ? { [t]: N(e) } : {}, In = (e) => {
567
- if (!mn(e))
566
+ }, $n = (e, t, n = {}) => j(e, n) ? { [t]: B(e) } : {}, Rn = (e) => {
567
+ if (!In(e))
568
568
  return {};
569
569
  const t = w(e);
570
- return t ? { lineHeight: k(t) } : "unit" in e && e.unit === "number" ? { lineHeight: e.value } : { lineHeight: N(e) };
571
- }, kn = (e) => {
572
- if (!yn(e))
570
+ return t ? { lineHeight: k(t) } : "unit" in e && e.unit === "number" ? { lineHeight: e.value } : { lineHeight: B(e) };
571
+ }, Mn = (e) => {
572
+ if (!Sn(e))
573
573
  return {};
574
574
  const t = w(e);
575
575
  return t ? { opacity: k(t) } : { opacity: e };
576
- }, de = {
576
+ }, fe = {
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,27 +627,27 @@ const Bo = /* @__PURE__ */ D({
627
627
  "justify-content-3-resolutions": {
628
628
  kind: "enum",
629
629
  cssProperty: "justifyContent",
630
- allowedValues: Zt
630
+ allowedValues: ln
631
631
  },
632
632
  "align-items-3-resolutions": {
633
633
  kind: "enum",
634
634
  cssProperty: "alignItems",
635
- allowedValues: Jt
635
+ allowedValues: cn
636
636
  },
637
637
  "flex-wrap-3-resolutions": {
638
638
  kind: "enum",
639
639
  cssProperty: "flexWrap",
640
- allowedValues: Qt
640
+ allowedValues: an
641
641
  },
642
642
  "align-content-3-resolutions": {
643
643
  kind: "enum",
644
644
  cssProperty: "alignContent",
645
- allowedValues: en
645
+ allowedValues: un
646
646
  },
647
647
  "flex-direction-3-resolutions": {
648
648
  kind: "enum",
649
649
  cssProperty: "flexDirection",
650
- allowedValues: tn
650
+ allowedValues: dn
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.
@@ -667,6 +667,13 @@ const Bo = /* @__PURE__ */ D({
667
667
  allowedValues: ee
668
668
  },
669
669
  // Color
670
+ // Pointer input. On an overlay layer this is lifted onto the absolutely
671
+ // positioned layer box — see resolveOverlayLayerPointerEvents.
672
+ "pointer-events-3-resolutions": {
673
+ kind: "enum",
674
+ cssProperty: "pointerEvents",
675
+ allowedValues: rn
676
+ },
670
677
  "background-color-3-resolutions": { kind: "color", cssProperty: "backgroundColor" },
671
678
  "color-3-resolutions": { kind: "color", cssProperty: "color" },
672
679
  // Background image and the painting properties that go with it. Independent
@@ -676,17 +683,17 @@ const Bo = /* @__PURE__ */ D({
676
683
  "background-size-3-resolutions": {
677
684
  kind: "enum",
678
685
  cssProperty: "backgroundSize",
679
- allowedValues: nn
686
+ allowedValues: pn
680
687
  },
681
688
  "background-position-3-resolutions": {
682
689
  kind: "enum",
683
690
  cssProperty: "backgroundPosition",
684
- allowedValues: on
691
+ allowedValues: fn
685
692
  },
686
693
  "background-repeat-3-resolutions": {
687
694
  kind: "enum",
688
695
  cssProperty: "backgroundRepeat",
689
- allowedValues: sn
696
+ allowedValues: yn
690
697
  },
691
698
  // Opacity (0–1 number)
692
699
  "opacity-3-resolutions": { kind: "opacity" },
@@ -694,7 +701,7 @@ const Bo = /* @__PURE__ */ D({
694
701
  "font-family-3-resolutions": {
695
702
  kind: "enum",
696
703
  cssProperty: "fontFamily",
697
- allowedValues: Ht
704
+ allowedValues: Qt
698
705
  },
699
706
  "font-size-3-resolutions": {
700
707
  kind: "length",
@@ -704,12 +711,12 @@ const Bo = /* @__PURE__ */ D({
704
711
  "font-weight-3-resolutions": {
705
712
  kind: "enum",
706
713
  cssProperty: "fontWeight",
707
- allowedValues: Gt
714
+ allowedValues: en
708
715
  },
709
716
  "font-style-3-resolutions": {
710
717
  kind: "enum",
711
718
  cssProperty: "fontStyle",
712
- allowedValues: zt
719
+ allowedValues: tn
713
720
  },
714
721
  "line-height-3-resolutions": { kind: "lineHeight" },
715
722
  "letter-spacing-3-resolutions": {
@@ -720,68 +727,68 @@ const Bo = /* @__PURE__ */ D({
720
727
  "text-align-3-resolutions": {
721
728
  kind: "enum",
722
729
  cssProperty: "textAlign",
723
- allowedValues: Yt
730
+ allowedValues: nn
724
731
  },
725
732
  "text-decoration-3-resolutions": {
726
733
  kind: "enum",
727
734
  cssProperty: "textDecoration",
728
- allowedValues: qt
735
+ allowedValues: on
729
736
  },
730
737
  "text-transform-3-resolutions": {
731
738
  kind: "enum",
732
739
  cssProperty: "textTransform",
733
- allowedValues: Xt
740
+ allowedValues: sn
734
741
  }
735
- }, Dn = (e, t) => {
736
- const n = de[e];
742
+ }, Nn = (e, t) => {
743
+ const n = fe[e];
737
744
  if (!n)
738
745
  return {};
739
746
  switch (n.kind) {
740
747
  case "boxSpacing":
741
- return Cn(t, n.cssProperty);
748
+ return En(t, n.cssProperty);
742
749
  case "length":
743
- return Sn(t, n.cssProperty, n.capabilities);
750
+ return $n(t, n.cssProperty, n.capabilities);
744
751
  case "border":
745
- return hn(t);
752
+ return Dn(t);
746
753
  case "boxShadow":
747
- return bn(t);
754
+ return Tn(t);
748
755
  case "color":
749
- return vn(t, n.cssProperty);
756
+ return Pn(t, n.cssProperty);
750
757
  case "opacity":
751
- return kn(t);
758
+ return Mn(t);
752
759
  case "enum":
753
- return An(t, n.cssProperty, n.allowedValues);
760
+ return Ln(t, n.cssProperty, n.allowedValues);
754
761
  case "lineHeight":
755
- return In(t);
762
+ return Rn(t);
756
763
  case "backgroundImage":
757
- return gn(t);
764
+ return kn(t);
758
765
  default:
759
766
  return {};
760
767
  }
761
- }, _o = Object.fromEntries(
762
- Object.entries(de).filter(([, e]) => e.kind === "boxSpacing").map(([e, t]) => [
768
+ }, ts = Object.fromEntries(
769
+ Object.entries(fe).filter(([, e]) => e.kind === "boxSpacing").map(([e, t]) => [
763
770
  e,
764
771
  t.cssProperty
765
772
  ])
766
- ), xn = (e) => e != null && e !== "", Tn = (e) => e ? !rn.some(
767
- (n) => xn(e[n])
768
- ) || e.display === "flex" ? e : { ...e, display: "flex" } : {}, Pn = ({
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 = ({
769
776
  dbEntryType: e,
770
777
  libraryId: t,
771
778
  sourceComponentsPlugin: n
772
779
  }) => {
773
780
  if (!(e != null && e.length))
774
781
  return;
775
- const o = n.components[Te(t, e)];
782
+ const o = n.components[Re(t, e)];
776
783
  if (!o || !("defaultAttributeValues" in o))
777
784
  return;
778
785
  const i = o.defaultAttributeValues;
779
786
  if (i != null && i.length)
780
- return i.reduce((c, d) => ({
781
- ...c,
782
- [d.name]: d.defaultValues
787
+ return i.reduce((r, f) => ({
788
+ ...r,
789
+ [f.name]: f.defaultValues
783
790
  }), {});
784
- }, O = ({
791
+ }, L = ({
785
792
  deviceDisplayType: e,
786
793
  componentAttributes: t
787
794
  }) => {
@@ -793,8 +800,8 @@ const Bo = /* @__PURE__ */ D({
793
800
  )) {
794
801
  if (!s.includes("3-resolutions") || !i)
795
802
  continue;
796
- const c = i.all, d = c ?? i[e.toLowerCase()];
797
- o[s] = d, de[s] && Object.assign(n, Dn(s, d));
803
+ const r = i.all, f = r ?? i[e.toLowerCase()];
804
+ o[s] = f, fe[s] && Object.assign(n, Nn(s, f));
798
805
  }
799
806
  return Object.keys(n).length || Object.keys(o).length ? {
800
807
  styles: Object.keys(n).length ? n : void 0,
@@ -802,86 +809,86 @@ const Bo = /* @__PURE__ */ D({
802
809
  o
803
810
  ).length ? o : void 0
804
811
  } : void 0;
805
- }, En = ({
812
+ }, Bn = ({
806
813
  defaultAttributes: e,
807
814
  userModifiedAttributes: t
808
815
  }) => e ? t ? { ...e, ...t } : e : t;
809
- function G(e) {
816
+ function Y(e) {
810
817
  return e.componentAttributes ?? e.widgetAttributes;
811
818
  }
812
- function Ce({
819
+ function Ie({
813
820
  col: e,
814
821
  deviceDisplayType: t,
815
822
  isComposeMode: n,
816
823
  sourceComponentsPlugin: o
817
824
  }) {
818
- const s = G(e), i = Pn({
825
+ const s = Y(e), i = jn({
819
826
  dbEntryType: e.type,
820
827
  libraryId: e.libraryId,
821
828
  sourceComponentsPlugin: o
822
- }) || [], c = En({
829
+ }) || [], r = Bn({
823
830
  defaultAttributes: i,
824
831
  userModifiedAttributes: s
825
- }), { styles: d, componentAttributesSpecificToDeviceType: a } = O({
832
+ }), { styles: f, componentAttributesSpecificToDeviceType: m } = L({
826
833
  deviceDisplayType: t,
827
- componentAttributes: c
834
+ componentAttributes: r
828
835
  }) || {
829
836
  styles: void 0,
830
837
  componentAttributesSpecificToDeviceType: void 0
831
838
  };
832
- let r = {};
833
- const l = {};
834
- if (d)
835
- for (const [u, p] of Object.entries(d))
836
- n && l[u] || (r = {
837
- ...r,
838
- [u]: p
839
+ let c = {};
840
+ const a = {};
841
+ if (f)
842
+ for (const [d, l] of Object.entries(f))
843
+ n && a[d] || (c = {
844
+ ...c,
845
+ [d]: l
839
846
  });
840
- let f = G(e);
841
- for (const u in a)
842
- if (u.includes("3-resolutions")) {
843
- f = {
844
- ...G(e) || {},
845
- ...a || {}
847
+ let u = Y(e);
848
+ for (const d in m)
849
+ if (d.includes("3-resolutions")) {
850
+ u = {
851
+ ...Y(e) || {},
852
+ ...m || {}
846
853
  };
847
854
  break;
848
855
  }
849
856
  return {
850
- componentAttributesBasedOnDevice: f,
851
- componentStyles: Tn(r)
857
+ componentAttributesBasedOnDevice: u,
858
+ componentStyles: On(c)
852
859
  };
853
860
  }
854
- const $n = (e) => {
861
+ const Fn = (e) => {
855
862
  const t = (e == null ? void 0 : e.rows) || [];
856
863
  for (const n of t)
857
864
  if (((n == null ? void 0 : n.columns) || []).length > 0)
858
865
  return !0;
859
866
  return (e == null ? void 0 : e.containerAttributes) && Object.keys(e.containerAttributes).length > 0;
860
- }, Rn = "var(--sl-spacing-x-small)";
861
- function Ln(e) {
867
+ }, Vn = "var(--sl-spacing-x-small)";
868
+ function Kn(e) {
862
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);
863
870
  }
864
- function Mn({
871
+ function Un({
865
872
  row: e,
866
873
  deviceDisplayType: t
867
874
  }) {
868
875
  var o;
869
- const n = O({
876
+ const n = L({
870
877
  deviceDisplayType: t,
871
878
  componentAttributes: e.rowAttributes
872
879
  });
873
880
  return ((o = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : o["hide-component-3-resolutions"]) === "true";
874
881
  }
875
- function Nn({
882
+ function Hn({
876
883
  row: e,
877
884
  deviceDisplayType: t,
878
885
  isComposeMode: n
879
886
  }) {
880
- var p;
881
- const o = ((p = O({
887
+ var l;
888
+ const o = ((l = L({
882
889
  deviceDisplayType: t,
883
890
  componentAttributes: e.rowAttributes
884
- })) == null ? void 0 : p.styles) || {}, s = o.justifyContent ?? e.horizontalAlignment ?? we.Center, i = o.alignItems ?? e.verticalAlignment ?? we.Center, c = o.flexDirection ?? "row", d = o.gap ?? e.gap ?? Rn, a = n ? "nowrap" : o.flexWrap ?? e.flexWrap ?? "nowrap", r = o.alignContent ?? e.alignContent ?? void 0, l = /* @__PURE__ */ new Set([
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([
885
892
  "justifyContent",
886
893
  "alignItems",
887
894
  "flexDirection",
@@ -889,26 +896,26 @@ function Nn({
889
896
  "flexWrap",
890
897
  "alignContent",
891
898
  "display"
892
- ]), f = {};
893
- for (const [h, g] of Object.entries(o))
894
- l.has(h) || (f[h] = g);
895
- const u = {
899
+ ]), u = {};
900
+ for (const [g, p] of Object.entries(o))
901
+ a.has(g) || (u[g] = p);
902
+ const d = {
896
903
  display: "flex",
897
- flexDirection: c,
898
- gap: d,
899
- flexWrap: a,
904
+ flexDirection: r,
905
+ gap: f,
906
+ flexWrap: m,
900
907
  justifyContent: s,
901
908
  alignItems: i,
902
- ...f
909
+ ...u
903
910
  };
904
- return r !== void 0 && (u.alignContent = r), u;
911
+ return c !== void 0 && (d.alignContent = c), d;
905
912
  }
906
- const pe = "css-classes-3-resolutions", Wn = 500, On = /[\x00-\x1f\x7f]/g, fe = (e) => {
913
+ const ye = "css-classes-3-resolutions", zn = 500, Gn = /[\x00-\x1f\x7f]/g, me = (e) => {
907
914
  if (typeof e != "string")
908
915
  return;
909
916
  const t = /* @__PURE__ */ new Set(), n = [];
910
917
  for (const s of e.split(/\s+/)) {
911
- const i = s.replace(On, "");
918
+ const i = s.replace(Gn, "");
912
919
  i && (t.has(i) || (t.add(i), n.push(i)));
913
920
  }
914
921
  if (!n.length)
@@ -916,12 +923,12 @@ const pe = "css-classes-3-resolutions", Wn = 500, On = /[\x00-\x1f\x7f]/g, fe =
916
923
  let o = "";
917
924
  for (const s of n) {
918
925
  const i = o ? `${o} ${s}` : s;
919
- if (i.length > Wn)
926
+ if (i.length > zn)
920
927
  break;
921
928
  o = i;
922
929
  }
923
930
  return o.length ? o : void 0;
924
- }, je = "hide-component-3-resolutions", jn = [
931
+ }, Ue = "hide-component-3-resolutions", _n = "pointer-events-3-resolutions", Yn = [
925
932
  "width-3-resolutions",
926
933
  "min-width-3-resolutions",
927
934
  "max-width-3-resolutions",
@@ -936,22 +943,23 @@ const pe = "css-classes-3-resolutions", Wn = 500, On = /[\x00-\x1f\x7f]/g, fe =
936
943
  "overflow-3-resolutions",
937
944
  "overflow-x-3-resolutions",
938
945
  "overflow-y-3-resolutions",
939
- je
940
- ], Bn = new Set(
941
- jn
946
+ Ue,
947
+ _n
948
+ ], qn = new Set(
949
+ Yn
942
950
  );
943
- function Fn({
951
+ function ge({
944
952
  containerAttributes: e,
945
953
  deviceDisplayType: t
946
954
  }) {
947
955
  var o;
948
- const n = O({
956
+ const n = L({
949
957
  deviceDisplayType: t,
950
958
  componentAttributes: e
951
959
  });
952
- return ((o = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : o[je]) === "true";
960
+ return ((o = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : o[Ue]) === "true";
953
961
  }
954
- function Vn({
962
+ function He({
955
963
  containerAttributes: e,
956
964
  deviceDisplayType: t,
957
965
  isComposeMode: n
@@ -961,24 +969,108 @@ function Vn({
961
969
  return { styles: {} };
962
970
  const o = n ? Object.fromEntries(
963
971
  Object.entries(e).filter(
964
- ([c]) => !Bn.has(c)
972
+ ([r]) => !qn.has(r)
965
973
  )
966
- ) : e, s = O({
974
+ ) : e, s = L({
967
975
  deviceDisplayType: t,
968
976
  componentAttributes: o
969
977
  });
970
978
  return {
971
979
  styles: (s == null ? void 0 : s.styles) ?? {},
972
- cssClasses: fe(
973
- (i = s == null ? void 0 : s.componentAttributesSpecificToDeviceType) == null ? void 0 : i[pe]
980
+ cssClasses: me(
981
+ (i = s == null ? void 0 : s.componentAttributesSpecificToDeviceType) == null ? void 0 : i[ye]
974
982
  )
975
983
  };
976
984
  }
977
- function _n(e) {
985
+ function Xn(e) {
978
986
  return Object.keys(e.styles).length > 0 || !!e.cssClasses;
979
987
  }
980
- const me = "/";
981
- function Kn({
988
+ function ze({
989
+ containerAttributes: e,
990
+ widgetContainerStyles: t
991
+ }) {
992
+ return ((e == null ? void 0 : e[oe]) || []).some(
993
+ (o) => o.toLowerCase().startsWith("height:")
994
+ ) || t.styles.height !== void 0;
995
+ }
996
+ const Zn = "z-index-3-resolutions", Ge = 0;
997
+ function Jn(e) {
998
+ var t, n;
999
+ return !!((n = (t = e == null ? void 0 : e.overlayLayers) == null ? void 0 : t.layers) != null && n.length);
1000
+ }
1001
+ function Se({
1002
+ containerAttributes: e,
1003
+ deviceDisplayType: t
1004
+ }) {
1005
+ var s;
1006
+ const n = L({
1007
+ deviceDisplayType: t,
1008
+ componentAttributes: e
1009
+ }), o = (s = n == null ? void 0 : n.componentAttributesSpecificToDeviceType) == null ? void 0 : s[Zn];
1010
+ if (typeof o == "number" && Number.isFinite(o))
1011
+ return o;
1012
+ if (typeof o == "string" && o.trim().length) {
1013
+ const i = Number(o);
1014
+ if (Number.isFinite(i))
1015
+ return i;
1016
+ }
1017
+ return Ge;
1018
+ }
1019
+ function Qn(e, t) {
1020
+ return e + t + 1;
1021
+ }
1022
+ function eo({
1023
+ containerAttributes: e,
1024
+ deviceDisplayType: t
1025
+ }) {
1026
+ var s;
1027
+ const n = L({
1028
+ deviceDisplayType: t,
1029
+ componentAttributes: e
1030
+ }), o = (s = n == null ? void 0 : n.styles) == null ? void 0 : s.pointerEvents;
1031
+ return typeof o == "string" ? o : void 0;
1032
+ }
1033
+ function to({
1034
+ layer: e,
1035
+ deviceDisplayType: t
1036
+ }) {
1037
+ var n;
1038
+ return (n = e == null ? void 0 : e.rows) != null && n.length ? ge({
1039
+ containerAttributes: e.containerAttributes,
1040
+ deviceDisplayType: t
1041
+ }) : !0;
1042
+ }
1043
+ function no({
1044
+ isWithinCollection: e,
1045
+ baseDeclaresOwnHeight: t,
1046
+ baseZIndex: n
1047
+ }) {
1048
+ return {
1049
+ position: "relative",
1050
+ isolation: "isolate",
1051
+ display: "flex",
1052
+ flexDirection: "column",
1053
+ ...t ? {} : { height: e ? "auto" : "100%" },
1054
+ ...n === Ge ? {} : { zIndex: n }
1055
+ };
1056
+ }
1057
+ function oo({
1058
+ zIndex: e,
1059
+ pointerEvents: t
1060
+ }) {
1061
+ return {
1062
+ position: "absolute",
1063
+ top: 0,
1064
+ left: 0,
1065
+ width: "100%",
1066
+ height: "100%",
1067
+ boxSizing: "border-box",
1068
+ zIndex: e,
1069
+ ...t ? { pointerEvents: t } : {}
1070
+ };
1071
+ }
1072
+ const he = "/";
1073
+ function so({
982
1074
  componentProps: e,
983
1075
  ancestorColumnIds: t,
984
1076
  columnId: n
@@ -987,40 +1079,40 @@ function Kn({
987
1079
  return;
988
1080
  const o = [...t ?? [], n];
989
1081
  for (let s = 0; s < o.length; s += 1) {
990
- const i = o.slice(s).join(me), c = e[i];
991
- if (c)
992
- return c;
1082
+ const i = o.slice(s).join(he), r = e[i];
1083
+ if (r)
1084
+ return r;
993
1085
  }
994
1086
  }
995
- function Un({
1087
+ function io({
996
1088
  displayItemList: e,
997
1089
  widgetCollections: t
998
1090
  }) {
999
1091
  const n = [], o = (s, i) => {
1000
- var c;
1001
- if ((c = s == null ? void 0 : s.rows) != null && c.length)
1002
- for (const d of s.rows)
1003
- for (const a of d.columns) {
1004
- if (!a.id || a.type === re.DroppableBox)
1092
+ var r;
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) {
1096
+ if (!m.id || m.type === ce.DroppableBox)
1005
1097
  continue;
1006
- const r = Le(a.type);
1007
- if (r != null && r.length) {
1008
- const l = a.collection ?? (t == null ? void 0 : t[r]);
1009
- l && !i.includes(a.id) && o(l.collectionRows, [...i, a.id]);
1098
+ const c = je(m.type);
1099
+ if (c != null && c.length) {
1100
+ const a = m.collection ?? (t == null ? void 0 : t[c]);
1101
+ a && !i.includes(m.id) && o(a.collectionRows, [...i, m.id]);
1010
1102
  continue;
1011
1103
  }
1012
1104
  n.push(
1013
- [...i, a.id].join(me)
1105
+ [...i, m.id].join(he)
1014
1106
  );
1015
1107
  }
1016
1108
  };
1017
1109
  return o(e, []), n;
1018
1110
  }
1019
- function Hn(e, t) {
1020
- const n = `${me}${e}`;
1111
+ function ro(e, t) {
1112
+ const n = `${he}${e}`;
1021
1113
  return t.some((o) => o === e || o.endsWith(n));
1022
1114
  }
1023
- function Gn({
1115
+ function lo({
1024
1116
  componentProps: e,
1025
1117
  displayItemList: t,
1026
1118
  widgetCollections: n
@@ -1028,13 +1120,13 @@ function Gn({
1028
1120
  const o = e ? Object.keys(e) : [];
1029
1121
  if (!o.length)
1030
1122
  return [];
1031
- const s = Un({
1123
+ const s = io({
1032
1124
  displayItemList: t,
1033
1125
  widgetCollections: n
1034
1126
  });
1035
- return o.filter((i) => !Hn(i, s));
1127
+ return o.filter((i) => !ro(i, s));
1036
1128
  }
1037
- function zn({
1129
+ function co({
1038
1130
  componentProps: e,
1039
1131
  displayItemList: t,
1040
1132
  widgetCollections: n,
@@ -1042,7 +1134,7 @@ function zn({
1042
1134
  }) {
1043
1135
  if (process.env.NODE_ENV === "production")
1044
1136
  return;
1045
- const s = Gn({
1137
+ const s = lo({
1046
1138
  componentProps: e,
1047
1139
  displayItemList: t,
1048
1140
  widgetCollections: n
@@ -1051,63 +1143,68 @@ function zn({
1051
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.`
1052
1144
  );
1053
1145
  }
1054
- function Yn(e) {
1146
+ function ao(e) {
1055
1147
  return typeof e == "object" && e !== null && !Array.isArray(e);
1056
1148
  }
1057
- function qn(e) {
1149
+ function uo(e) {
1058
1150
  if (e.all !== void 0 && e.all !== null)
1059
1151
  return !1;
1060
1152
  const t = e.phone, n = e.tablet, o = e.desktop;
1061
1153
  return t !== n || t !== o || n !== o;
1062
1154
  }
1063
- function ve(e) {
1064
- var t;
1155
+ function se(e) {
1156
+ var t, n;
1065
1157
  if (!((t = e == null ? void 0 : e.rows) != null && t.length))
1066
1158
  return !1;
1067
- for (const n of e.rows) {
1068
- if (Ae(n.rowAttributes))
1159
+ if (te(e.containerAttributes))
1160
+ return !0;
1161
+ for (const o of e.rows) {
1162
+ if (te(o.rowAttributes))
1069
1163
  return !0;
1070
- for (const o of n.columns)
1071
- if (Ae(G(o)))
1164
+ for (const s of o.columns)
1165
+ if (te(Y(s)))
1072
1166
  return !0;
1073
1167
  }
1168
+ for (const o of ((n = e.overlayLayers) == null ? void 0 : n.layers) ?? [])
1169
+ if (se(o))
1170
+ return !0;
1074
1171
  return !1;
1075
1172
  }
1076
- function Ae(e) {
1173
+ function te(e) {
1077
1174
  if (!e)
1078
1175
  return !1;
1079
1176
  for (const [t, n] of Object.entries(e))
1080
- if (!(!t.includes("3-resolutions") || !Yn(n))) {
1177
+ if (!(!t.includes("3-resolutions") || !ao(n))) {
1081
1178
  if (t === "hide-component-3-resolutions") {
1082
1179
  const o = n, s = (i) => i === "true" || i === !0;
1083
1180
  if (s(o.phone) !== s(o.tablet) || s(o.phone) !== s(o.desktop))
1084
1181
  return !0;
1085
1182
  continue;
1086
1183
  }
1087
- if (qn(n))
1184
+ if (uo(n))
1088
1185
  return !0;
1089
1186
  }
1090
1187
  return !1;
1091
1188
  }
1092
- function Xn(e, t) {
1093
- if (ve(e))
1189
+ function po(e, t) {
1190
+ if (se(e))
1094
1191
  return !0;
1095
1192
  for (const n of Object.values(t))
1096
- if (ve(n.collectionRows))
1193
+ if (se(n.collectionRows))
1097
1194
  return !0;
1098
1195
  return !1;
1099
1196
  }
1100
- const Be = parseInt(Ne, 10), Fe = parseInt(We, 10), Zn = Be + 1, Jn = Fe + 1;
1101
- function Qn(e) {
1197
+ const _e = parseInt(Fe, 10), Ye = parseInt(Ve, 10), fo = _e + 1, yo = Ye + 1;
1198
+ function mo(e) {
1102
1199
  const t = `.${e}-phone`, n = `.${e}-tablet`, o = `.${e}-desktop`;
1103
1200
  return `
1104
1201
  ${t}, ${n}, ${o} { display: none; }
1105
- @media (max-width: ${Be}px) { ${t} { display: block; } }
1106
- @media (min-width: ${Zn}px) and (max-width: ${Fe}px) { ${n} { display: block; } }
1107
- @media (min-width: ${Jn}px) { ${o} { display: block; } }
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; } }
1108
1205
  `.trim();
1109
1206
  }
1110
- function te(e) {
1207
+ function ne(e) {
1111
1208
  if (!e)
1112
1209
  throw new Error("Source components plugin is required, but no plugins were provided");
1113
1210
  const t = e.sourceComponents;
@@ -1121,7 +1218,7 @@ function te(e) {
1121
1218
  );
1122
1219
  return t;
1123
1220
  }
1124
- const eo = ["hidden"], to = /* @__PURE__ */ D({
1221
+ const go = ["hidden"], ke = /* @__PURE__ */ D({
1125
1222
  __name: "EmbedInVerticalContainer",
1126
1223
  props: {
1127
1224
  displayItemList: {},
@@ -1134,59 +1231,59 @@ const eo = ["hidden"], to = /* @__PURE__ */ D({
1134
1231
  const t = e;
1135
1232
  let n = 0;
1136
1233
  const o = `rulecms-vc-${++n}`;
1137
- function s(h, g, v) {
1138
- const C = h && !v ? 3 : 1;
1139
- return !!(g != null && g.length) && g.length > C;
1234
+ function s(g, p, I) {
1235
+ const v = g && !I ? 3 : 1;
1236
+ return !!(p != null && p.length) && p.length > v;
1140
1237
  }
1141
- const i = y(() => {
1142
- var g;
1143
- return (((g = t.displayItemList.containerAttributes) == null ? void 0 : g[Q]) || []).join(`;
1238
+ const i = h(() => {
1239
+ var p;
1240
+ return (((p = t.displayItemList.containerAttributes) == null ? void 0 : p[oe]) || []).join(`;
1144
1241
  `);
1145
- }), c = y(
1242
+ }), r = h(
1146
1243
  () => i.value ? `.${o} {
1147
1244
  ${i.value}
1148
1245
  }` : ""
1149
- ), d = y(
1150
- () => !t.isComposeMode && Fn({
1246
+ ), f = h(
1247
+ () => !t.isComposeMode && ge({
1151
1248
  containerAttributes: t.displayItemList.containerAttributes,
1152
1249
  deviceDisplayType: t.deviceDisplayType
1153
1250
  })
1154
- ), a = y(
1155
- () => Vn({
1251
+ ), m = h(
1252
+ () => He({
1156
1253
  containerAttributes: t.displayItemList.containerAttributes,
1157
1254
  deviceDisplayType: t.deviceDisplayType,
1158
1255
  isComposeMode: t.isComposeMode
1159
1256
  })
1160
- ), r = y(() => {
1161
- var v;
1162
- const h = ((v = t.displayItemList.containerAttributes) == null ? void 0 : v[Q]) || [], g = _n(a.value);
1163
- return t.isComposeMode && !t.isWithinCollection || t.showDropContainers || h.length > 0 || g || s(t.isComposeMode, t.displayItemList.rows, t.isWithinCollection);
1164
- }), l = y(
1165
- () => [i.value ? o : void 0, a.value.cssClasses].filter(Boolean).join(" ")
1166
- ), f = y(() => {
1167
- var g;
1168
- return {
1169
- ...(((g = t.displayItemList.containerAttributes) == null ? void 0 : g[Q]) || []).some((v) => v.toLowerCase().startsWith("height:")) ? {} : { height: t.isWithinCollection ? "auto" : "100%" },
1170
- display: "flex",
1171
- flexDirection: "column",
1172
- ...a.value.styles
1173
- };
1174
- }), u = y(() => r.value ? l.value : ""), p = y(() => d.value ? { display: "none" } : r.value ? f.value : { display: "contents" });
1175
- return (h, g) => (m(), b("div", {
1176
- hidden: d.value || void 0,
1177
- class: F(u.value || void 0),
1178
- style: S(p.value)
1257
+ ), c = h(() => {
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);
1261
+ }), a = h(
1262
+ () => [i.value ? o : void 0, m.value.cssClasses].filter(Boolean).join(" ")
1263
+ ), u = h(() => ({
1264
+ ...ze({
1265
+ containerAttributes: t.displayItemList.containerAttributes,
1266
+ widgetContainerStyles: m.value
1267
+ }) ? {} : { height: t.isWithinCollection ? "auto" : "100%" },
1268
+ display: "flex",
1269
+ flexDirection: "column",
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),
1275
+ style: S(l.value)
1179
1276
  }, [
1180
- i.value ? (m(), A(R("style"), { key: 0 }, {
1181
- default: V(() => [
1182
- ie(Y(c.value), 1)
1277
+ i.value ? (y(), C(W("style"), { key: 0 }, {
1278
+ default: M(() => [
1279
+ le(q(r.value), 1)
1183
1280
  ]),
1184
1281
  _: 1
1185
- })) : W("", !0),
1186
- se(h.$slots, "default")
1187
- ], 14, eo));
1282
+ })) : N("", !0),
1283
+ re(g.$slots, "default")
1284
+ ], 14, go));
1188
1285
  }
1189
- }), no = ["hidden"], oo = /* @__PURE__ */ D({
1286
+ }), ho = ["hidden"], De = /* @__PURE__ */ D({
1190
1287
  __name: "EmbedInRow",
1191
1288
  props: {
1192
1289
  row: {},
@@ -1197,40 +1294,40 @@ ${i.value}
1197
1294
  },
1198
1295
  setup(e) {
1199
1296
  const t = e;
1200
- function n(r, l, f) {
1201
- var p;
1202
- const u = r && !f ? 3 : 1;
1203
- return !!((p = l == null ? void 0 : l.columns) != null && p.length) && l.columns.length > u;
1297
+ function n(c, a, u) {
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;
1204
1301
  }
1205
- const o = y(
1206
- () => !t.isComposeMode && Mn({ row: t.row, deviceDisplayType: t.deviceDisplayType })
1207
- ), s = y(
1208
- () => t.showDropContainers || Ln(t.row) || n(t.isComposeMode, t.row, t.isWithinCollection)
1209
- ), i = y(
1210
- () => Nn({
1302
+ const o = h(
1303
+ () => !t.isComposeMode && Un({ row: t.row, deviceDisplayType: t.deviceDisplayType })
1304
+ ), s = h(
1305
+ () => t.showDropContainers || Kn(t.row) || n(t.isComposeMode, t.row, t.isWithinCollection)
1306
+ ), i = h(
1307
+ () => Hn({
1211
1308
  row: t.row,
1212
1309
  deviceDisplayType: t.deviceDisplayType,
1213
1310
  isComposeMode: t.isComposeMode
1214
1311
  })
1215
- ), c = y(() => {
1216
- var l;
1217
- const r = O({
1312
+ ), r = h(() => {
1313
+ var a;
1314
+ const c = L({
1218
1315
  deviceDisplayType: t.deviceDisplayType,
1219
1316
  componentAttributes: t.row.rowAttributes
1220
1317
  });
1221
- return fe(
1222
- (l = r == null ? void 0 : r.componentAttributesSpecificToDeviceType) == null ? void 0 : l[pe]
1318
+ return me(
1319
+ (a = c == null ? void 0 : c.componentAttributesSpecificToDeviceType) == null ? void 0 : a[ye]
1223
1320
  ) ?? "";
1224
- }), d = y(() => s.value ? c.value : ""), a = y(() => o.value ? { display: "none" } : s.value ? i.value : { display: "contents" });
1225
- return (r, l) => (m(), b("div", {
1321
+ }), f = h(() => s.value ? r.value : ""), m = h(() => o.value ? { display: "none" } : s.value ? i.value : { display: "contents" });
1322
+ return (c, a) => (y(), b("div", {
1226
1323
  hidden: o.value || void 0,
1227
- class: F(d.value || void 0),
1228
- style: S(a.value)
1324
+ class: K(f.value || void 0),
1325
+ style: S(m.value)
1229
1326
  }, [
1230
- se(r.$slots, "default")
1231
- ], 14, no));
1327
+ re(c.$slots, "default")
1328
+ ], 14, ho));
1232
1329
  }
1233
- }), Ve = [
1330
+ }), qe = [
1234
1331
  "minWidth",
1235
1332
  "maxWidth",
1236
1333
  "minHeight",
@@ -1282,20 +1379,20 @@ ${i.value}
1282
1379
  "textAlign",
1283
1380
  "textDecoration",
1284
1381
  "textTransform"
1285
- ], so = (e) => e != null && e !== "", io = (e) => e ? Ve.reduce(
1382
+ ], bo = (e) => e != null && e !== "", wo = (e) => e ? qe.reduce(
1286
1383
  (t, n) => {
1287
1384
  const o = e[n];
1288
- return so(o) && (t[n] = o), t;
1385
+ return bo(o) && (t[n] = o), t;
1289
1386
  },
1290
1387
  {}
1291
- ) : {}, ro = (e) => {
1388
+ ) : {}, Co = (e) => {
1292
1389
  if (!e)
1293
1390
  return;
1294
1391
  const t = { ...e };
1295
- for (const n of Ve)
1392
+ for (const n of qe)
1296
1393
  delete t[n];
1297
1394
  return Object.keys(t).length ? t : void 0;
1298
- }, lo = (e) => Object.keys(e).length > 0, co = (e, t) => {
1395
+ }, vo = (e) => Object.keys(e).length > 0, Ao = (e, t) => {
1299
1396
  const n = (e == null ? void 0 : e.noContainer) ?? !1, o = e == null ? void 0 : e.resolveNoContainer;
1300
1397
  if (typeof o != "function")
1301
1398
  return n;
@@ -1313,7 +1410,7 @@ ${i.value}
1313
1410
  );
1314
1411
  }
1315
1412
  return n;
1316
- }, ao = (e, t) => {
1413
+ }, Io = (e, t) => {
1317
1414
  const n = e == null ? void 0 : e.resolveRendersOwnElement;
1318
1415
  if (typeof n != "function")
1319
1416
  return !1;
@@ -1331,7 +1428,7 @@ ${i.value}
1331
1428
  );
1332
1429
  }
1333
1430
  return !1;
1334
- }, uo = /* @__PURE__ */ D({
1431
+ }, Te = /* @__PURE__ */ D({
1335
1432
  __name: "DisplayComponent",
1336
1433
  props: {
1337
1434
  componentType: {},
@@ -1343,51 +1440,51 @@ ${i.value}
1343
1440
  mounts: {}
1344
1441
  },
1345
1442
  setup(e) {
1346
- const t = e, n = y(() => t.components[Te(t.libraryId, t.componentType)]), o = y(() => {
1347
- var h;
1348
- const p = (h = n.value) == null ? void 0 : h.card;
1349
- return p || (console.error(
1443
+ const t = e, n = h(() => t.components[Re(t.libraryId, t.componentType)]), o = h(() => {
1444
+ var g;
1445
+ const l = (g = n.value) == null ? void 0 : g.card;
1446
+ return l || (console.error(
1350
1447
  `DisplayComponent: Component with type ${t.componentType}${t.libraryId ? ` (library "${t.libraryId}")` : ""} not found in components`
1351
1448
  ), null);
1352
- }), s = y(() => ({
1449
+ }), s = h(() => ({
1353
1450
  componentAttributes: t.componentAttributes,
1354
1451
  styleProps: t.styleProps
1355
- })), i = y(
1356
- () => n.value ? co(n.value, s.value) : !1
1357
- ), c = y(() => io(t.styleProps)), d = y(
1358
- () => i.value ? ro(t.styleProps) : t.styleProps
1359
- ), a = y(
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
1456
+ ), m = h(
1360
1457
  () => {
1361
- var p;
1362
- return fe((p = t.componentAttributes) == null ? void 0 : p[pe]);
1458
+ var l;
1459
+ return me((l = t.componentAttributes) == null ? void 0 : l[ye]);
1363
1460
  }
1364
- ), r = y(() => i.value && lo(c.value)), l = y(
1365
- () => !i.value || (n.value ? ao(n.value, s.value) : !1)
1366
- ), f = y(
1367
- () => !r.value && l.value ? a.value : void 0
1368
- ), u = y(() => ({
1461
+ ), c = h(() => i.value && vo(r.value)), a = h(
1462
+ () => !i.value || (n.value ? Io(n.value, s.value) : !1)
1463
+ ), u = h(
1464
+ () => !c.value && a.value ? m.value : void 0
1465
+ ), d = h(() => ({
1369
1466
  componentAttributes: t.componentAttributes,
1370
- styleProps: d.value,
1371
- className: f.value,
1467
+ styleProps: f.value,
1468
+ className: u.value,
1372
1469
  widgetInstanceProps: t.widgetInstanceProps,
1373
1470
  mounts: t.mounts
1374
1471
  }));
1375
- return (p, h) => o.value ? (m(), b(I, { key: 0 }, [
1376
- r.value ? (m(), b("div", {
1472
+ return (l, g) => o.value ? (y(), b(A, { key: 0 }, [
1473
+ c.value ? (y(), b("div", {
1377
1474
  key: 0,
1378
- class: F(a.value || void 0),
1379
- style: S(c.value)
1475
+ class: K(m.value || void 0),
1476
+ style: S(r.value)
1380
1477
  }, [
1381
- (m(), A(R(o.value), Z(ge(u.value)), null, 16))
1382
- ], 6)) : !l.value && a.value ? (m(), b("div", {
1478
+ (y(), C(W(o.value), J(we(d.value)), null, 16))
1479
+ ], 6)) : !a.value && m.value ? (y(), b("div", {
1383
1480
  key: 1,
1384
- class: F(a.value)
1481
+ class: K(m.value)
1385
1482
  }, [
1386
- (m(), A(R(o.value), Z(ge(u.value)), null, 16))
1387
- ], 2)) : (m(), A(R(o.value), Z(qe({ key: 2 }, u.value)), null, 16))
1388
- ], 64)) : W("", !0);
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);
1389
1486
  }
1390
- }), po = /* @__PURE__ */ D({
1487
+ }), So = ["data-rulecms-overlay-layer"], ko = /* @__PURE__ */ D({
1391
1488
  __name: "RenderComponentsInner",
1392
1489
  props: {
1393
1490
  displayItemList: {},
@@ -1403,77 +1500,194 @@ ${i.value}
1403
1500
  ancestorColumnIds: {}
1404
1501
  },
1405
1502
  setup(e) {
1406
- const t = e, n = () => te(t.plugins).components;
1407
- function o(a) {
1408
- if (t.isComposeMode && a.type === re.DroppableBox)
1503
+ const t = e, n = () => ne(t.plugins).components, o = h(
1504
+ () => !t.isComposeMode && Jn(t.displayItemList) && !ge({
1505
+ containerAttributes: t.displayItemList.containerAttributes,
1506
+ deviceDisplayType: t.deviceDisplayType
1507
+ })
1508
+ ), s = h(() => {
1509
+ const u = Se({
1510
+ containerAttributes: t.displayItemList.containerAttributes,
1511
+ deviceDisplayType: t.deviceDisplayType
1512
+ });
1513
+ return no({
1514
+ isWithinCollection: t.isWithinCollection,
1515
+ baseDeclaresOwnHeight: ze({
1516
+ containerAttributes: t.displayItemList.containerAttributes,
1517
+ widgetContainerStyles: He({
1518
+ containerAttributes: t.displayItemList.containerAttributes,
1519
+ deviceDisplayType: t.deviceDisplayType,
1520
+ isComposeMode: t.isComposeMode
1521
+ })
1522
+ }),
1523
+ baseZIndex: u
1524
+ });
1525
+ }), i = h(() => {
1526
+ var l;
1527
+ const u = ((l = t.displayItemList.overlayLayers) == null ? void 0 : l.layers) ?? [], d = Se({
1528
+ containerAttributes: t.displayItemList.containerAttributes,
1529
+ deviceDisplayType: t.deviceDisplayType
1530
+ });
1531
+ return u.flatMap((g, p) => to({ layer: g, deviceDisplayType: t.deviceDisplayType }) ? [] : [
1532
+ {
1533
+ index: p,
1534
+ layer: g,
1535
+ boxStyles: oo({
1536
+ zIndex: Qn(d, p),
1537
+ pointerEvents: eo({
1538
+ containerAttributes: g.containerAttributes,
1539
+ deviceDisplayType: t.deviceDisplayType
1540
+ })
1541
+ })
1542
+ }
1543
+ ]);
1544
+ });
1545
+ function r(u) {
1546
+ if (t.isComposeMode && u.type === ce.DroppableBox)
1409
1547
  return !1;
1410
- const { componentAttributesBasedOnDevice: r } = Ce({
1411
- col: a,
1548
+ const { componentAttributesBasedOnDevice: d } = Ie({
1549
+ col: u,
1412
1550
  deviceDisplayType: t.deviceDisplayType,
1413
1551
  isComposeMode: t.isComposeMode,
1414
- sourceComponentsPlugin: te(t.plugins)
1415
- }), l = !!r && r["hide-component-3-resolutions"] === "true";
1552
+ sourceComponentsPlugin: ne(t.plugins)
1553
+ }), l = !!d && d["hide-component-3-resolutions"] === "true";
1416
1554
  return !(!t.isComposeMode && l);
1417
1555
  }
1418
- function s(a) {
1419
- const { componentAttributesBasedOnDevice: r, componentStyles: l } = Ce({
1420
- col: a,
1556
+ function f(u) {
1557
+ const { componentAttributesBasedOnDevice: d, componentStyles: l } = Ie({
1558
+ col: u,
1421
1559
  deviceDisplayType: t.deviceDisplayType,
1422
1560
  isComposeMode: t.isComposeMode,
1423
- sourceComponentsPlugin: te(t.plugins)
1561
+ sourceComponentsPlugin: ne(t.plugins)
1424
1562
  });
1425
1563
  return {
1426
- componentAttributes: r,
1564
+ componentAttributes: d,
1427
1565
  styleProps: l
1428
1566
  };
1429
1567
  }
1430
- function i(a) {
1431
- const r = Le(a.type);
1432
- if (!(r != null && r.length))
1568
+ function m(u) {
1569
+ const d = je(u.type);
1570
+ if (!(d != null && d.length))
1433
1571
  return null;
1434
- const l = a.collection ?? t.widgetCollections[r];
1572
+ const l = u.collection ?? t.widgetCollections[d];
1435
1573
  if (!l)
1436
1574
  throw new Error(
1437
- `DisplayCollection - Collection with ID ${r} not found in widgetCollections. Available collections: ${Object.keys(t.widgetCollections).join(", ")}`
1575
+ `DisplayCollection - Collection with ID ${d} not found in widgetCollections. Available collections: ${Object.keys(t.widgetCollections).join(", ")}`
1438
1576
  );
1439
- return !l.collectionRows || !$n(l.collectionRows) ? null : l.collectionRows;
1577
+ return !l.collectionRows || !Fn(l.collectionRows) ? null : l.collectionRows;
1440
1578
  }
1441
- function c(a) {
1442
- return [...t.ancestorColumnIds ?? [], a];
1579
+ function c(u) {
1580
+ return [...t.ancestorColumnIds ?? [], u];
1443
1581
  }
1444
- function d(a) {
1445
- return Kn({
1582
+ function a(u) {
1583
+ return so({
1446
1584
  componentProps: t.componentProps,
1447
1585
  ancestorColumnIds: t.ancestorColumnIds,
1448
- columnId: a
1586
+ columnId: u
1449
1587
  });
1450
1588
  }
1451
- return (a, r) => {
1452
- const l = Xe("RenderComponentsInner", !0);
1453
- return m(), A(to, {
1589
+ return (u, d) => {
1590
+ const l = st("RenderComponentsInner", !0);
1591
+ return o.value ? (y(), b("div", {
1592
+ key: 0,
1593
+ style: S(s.value)
1594
+ }, [
1595
+ U(ke, {
1596
+ "display-item-list": e.displayItemList,
1597
+ "is-compose-mode": e.isComposeMode,
1598
+ "show-drop-containers": e.showDropContainers,
1599
+ "is-within-collection": e.isWithinCollection,
1600
+ "device-display-type": e.deviceDisplayType
1601
+ }, {
1602
+ default: M(() => [
1603
+ (y(!0), b(A, null, R(e.displayItemList.rows, (g) => (y(), C(De, {
1604
+ key: g.id,
1605
+ row: g,
1606
+ "is-compose-mode": e.isComposeMode,
1607
+ "show-drop-containers": e.showDropContainers,
1608
+ "is-within-collection": e.isWithinCollection,
1609
+ "device-display-type": e.deviceDisplayType
1610
+ }, {
1611
+ default: M(() => [
1612
+ (y(!0), b(A, null, R(g.columns, (p) => (y(), b(A, {
1613
+ key: p.id
1614
+ }, [
1615
+ r(p) ? (y(), b(A, { key: 0 }, [
1616
+ m(p) ? (y(), C(l, {
1617
+ key: 0,
1618
+ "display-item-list": m(p),
1619
+ "is-compose-mode": e.isComposeMode,
1620
+ "is-within-collection": !0,
1621
+ "widget-collections": e.widgetCollections,
1622
+ "show-drop-containers": e.showDropContainers,
1623
+ "redux-device-display-type": e.reduxDeviceDisplayType,
1624
+ plugins: e.plugins,
1625
+ "device-display-type": e.deviceDisplayType,
1626
+ "component-props": e.componentProps,
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, {
1630
+ key: 1,
1631
+ "component-type": p.type,
1632
+ "library-id": p.libraryId,
1633
+ "component-attributes": f(p).componentAttributes,
1634
+ components: n(),
1635
+ "style-props": f(p).styleProps,
1636
+ "widget-instance-props": a(p.id),
1637
+ mounts: e.mounts
1638
+ }, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "mounts"]))
1639
+ ], 64)) : N("", !0)
1640
+ ], 64))), 128))
1641
+ ]),
1642
+ _: 2
1643
+ }, 1032, ["row", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]))), 128))
1644
+ ]),
1645
+ _: 1
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", {
1648
+ key: g.index,
1649
+ "data-rulecms-overlay-layer": g.index,
1650
+ style: S(g.boxStyles)
1651
+ }, [
1652
+ U(l, {
1653
+ "display-item-list": g.layer,
1654
+ "is-compose-mode": e.isComposeMode,
1655
+ "is-within-collection": !1,
1656
+ "widget-collections": e.widgetCollections,
1657
+ "show-drop-containers": !1,
1658
+ "redux-device-display-type": e.reduxDeviceDisplayType,
1659
+ plugins: e.plugins,
1660
+ "device-display-type": e.deviceDisplayType,
1661
+ "component-props": e.componentProps,
1662
+ mounts: e.mounts,
1663
+ "ancestor-column-ids": e.ancestorColumnIds
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, {
1667
+ key: 1,
1454
1668
  "display-item-list": e.displayItemList,
1455
1669
  "is-compose-mode": e.isComposeMode,
1456
1670
  "show-drop-containers": e.showDropContainers,
1457
1671
  "is-within-collection": e.isWithinCollection,
1458
1672
  "device-display-type": e.deviceDisplayType
1459
1673
  }, {
1460
- default: V(() => [
1461
- (m(!0), b(I, null, z(e.displayItemList.rows, (f) => (m(), A(oo, {
1462
- key: f.id,
1463
- row: f,
1674
+ default: M(() => [
1675
+ (y(!0), b(A, null, R(e.displayItemList.rows, (g) => (y(), C(De, {
1676
+ key: g.id,
1677
+ row: g,
1464
1678
  "is-compose-mode": e.isComposeMode,
1465
1679
  "show-drop-containers": e.showDropContainers,
1466
1680
  "is-within-collection": e.isWithinCollection,
1467
1681
  "device-display-type": e.deviceDisplayType
1468
1682
  }, {
1469
- default: V(() => [
1470
- (m(!0), b(I, null, z(f.columns, (u) => (m(), b(I, {
1471
- key: u.id
1683
+ default: M(() => [
1684
+ (y(!0), b(A, null, R(g.columns, (p) => (y(), b(A, {
1685
+ key: p.id
1472
1686
  }, [
1473
- o(u) ? (m(), b(I, { key: 0 }, [
1474
- i(u) ? (m(), A(l, {
1687
+ r(p) ? (y(), b(A, { key: 0 }, [
1688
+ m(p) ? (y(), C(l, {
1475
1689
  key: 0,
1476
- "display-item-list": i(u),
1690
+ "display-item-list": m(p),
1477
1691
  "is-compose-mode": e.isComposeMode,
1478
1692
  "is-within-collection": !0,
1479
1693
  "widget-collections": e.widgetCollections,
@@ -1483,28 +1697,28 @@ ${i.value}
1483
1697
  "device-display-type": e.deviceDisplayType,
1484
1698
  "component-props": e.componentProps,
1485
1699
  mounts: e.mounts,
1486
- "ancestor-column-ids": c(u.id)
1487
- }, 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"])) : (m(), A(uo, {
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, {
1488
1702
  key: 1,
1489
- "component-type": u.type,
1490
- "library-id": u.libraryId,
1491
- "component-attributes": s(u).componentAttributes,
1703
+ "component-type": p.type,
1704
+ "library-id": p.libraryId,
1705
+ "component-attributes": f(p).componentAttributes,
1492
1706
  components: n(),
1493
- "style-props": s(u).styleProps,
1494
- "widget-instance-props": d(u.id),
1707
+ "style-props": f(p).styleProps,
1708
+ "widget-instance-props": a(p.id),
1495
1709
  mounts: e.mounts
1496
1710
  }, null, 8, ["component-type", "library-id", "component-attributes", "components", "style-props", "widget-instance-props", "mounts"]))
1497
- ], 64)) : W("", !0)
1711
+ ], 64)) : N("", !0)
1498
1712
  ], 64))), 128))
1499
1713
  ]),
1500
1714
  _: 2
1501
1715
  }, 1032, ["row", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]))), 128))
1502
1716
  ]),
1503
1717
  _: 1
1504
- }, 8, ["display-item-list", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]);
1718
+ }, 8, ["display-item-list", "is-compose-mode", "show-drop-containers", "is-within-collection", "device-display-type"]));
1505
1719
  };
1506
1720
  }
1507
- }), oe = /* @__PURE__ */ D({
1721
+ }), ie = /* @__PURE__ */ D({
1508
1722
  __name: "RenderComponentsForDevice",
1509
1723
  props: {
1510
1724
  displayItemList: {},
@@ -1522,7 +1736,7 @@ ${i.value}
1522
1736
  setup(e) {
1523
1737
  return (t, n) => {
1524
1738
  var o, s;
1525
- return (s = (o = e.displayItemList) == null ? void 0 : o.rows) != null && s.length ? (m(), A(po, {
1739
+ return (s = (o = e.displayItemList) == null ? void 0 : o.rows) != null && s.length ? (y(), C(ko, {
1526
1740
  key: 0,
1527
1741
  "display-item-list": e.displayItemList,
1528
1742
  "is-compose-mode": e.isComposeMode,
@@ -1535,26 +1749,26 @@ ${i.value}
1535
1749
  "component-props": e.componentProps,
1536
1750
  mounts: e.mounts,
1537
1751
  "ancestor-column-ids": e.ancestorColumnIds
1538
- }, 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"])) : W("", !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"])) : N("", !0);
1539
1753
  };
1540
1754
  }
1541
- }), _e = /* @__PURE__ */ D({
1755
+ }), Xe = /* @__PURE__ */ D({
1542
1756
  __name: "LibraryStylesheets",
1543
1757
  props: {
1544
1758
  stylesheets: {}
1545
1759
  },
1546
1760
  setup(e) {
1547
- return (t, n) => (m(!0), b(I, null, z(e.stylesheets ?? [], (o) => (m(), A(R("style"), {
1761
+ return (t, n) => (y(!0), b(A, null, R(e.stylesheets ?? [], (o) => (y(), C(W("style"), {
1548
1762
  key: o,
1549
1763
  "data-rulecms-library-stylesheet": ""
1550
1764
  }, {
1551
- default: V(() => [
1552
- ie(Y(o), 1)
1765
+ default: M(() => [
1766
+ le(q(o), 1)
1553
1767
  ]),
1554
1768
  _: 2
1555
1769
  }, 1024))), 128));
1556
1770
  }
1557
- }), fo = /* @__PURE__ */ D({
1771
+ }), Do = /* @__PURE__ */ D({
1558
1772
  __name: "BreakpointVariantRender",
1559
1773
  props: {
1560
1774
  displayItemList: {},
@@ -1567,40 +1781,40 @@ ${i.value}
1567
1781
  setup(e) {
1568
1782
  const t = ["Phone", "Tablet", "Desktop"];
1569
1783
  let n = 0;
1570
- const o = e, s = `rulecms-bp-${++n}`, i = y(() => o.scopeIdInput ?? s), c = y(
1571
- () => Xn(o.displayItemList, o.widgetCollections)
1572
- ), d = y(() => Qn(i.value));
1573
- return (a, r) => {
1574
- var l;
1575
- return m(), b(I, null, [
1576
- ne(_e, {
1577
- stylesheets: (l = e.plugins.sourceComponents) == null ? void 0 : l.stylesheets
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));
1787
+ return (m, c) => {
1788
+ var a;
1789
+ return y(), b(A, null, [
1790
+ U(Xe, {
1791
+ stylesheets: (a = e.plugins.sourceComponents) == null ? void 0 : a.stylesheets
1578
1792
  }, null, 8, ["stylesheets"]),
1579
- c.value ? (m(), b(I, { key: 1 }, [
1580
- (m(), A(R("style"), null, {
1581
- default: V(() => [
1582
- ie(Y(d.value), 1)
1793
+ r.value ? (y(), b(A, { key: 1 }, [
1794
+ (y(), C(W("style"), null, {
1795
+ default: M(() => [
1796
+ le(q(f.value), 1)
1583
1797
  ]),
1584
1798
  _: 1
1585
1799
  })),
1586
- (m(), b(I, null, z(t, (f) => $("div", {
1587
- key: f,
1588
- class: F(`${i.value}-${f.toLowerCase()}`)
1800
+ (y(), b(A, null, R(t, (u) => $("div", {
1801
+ key: u,
1802
+ class: K(`${i.value}-${u.toLowerCase()}`)
1589
1803
  }, [
1590
- ne(oe, {
1804
+ U(ie, {
1591
1805
  "display-item-list": e.displayItemList,
1592
1806
  "is-compose-mode": !1,
1593
1807
  "is-within-collection": !1,
1594
1808
  "widget-collections": e.widgetCollections,
1595
1809
  "show-drop-containers": !1,
1596
1810
  "redux-device-display-type": "desktop",
1597
- "device-display-type": f,
1811
+ "device-display-type": u,
1598
1812
  plugins: e.plugins,
1599
1813
  "component-props": e.componentProps,
1600
1814
  mounts: e.mounts
1601
1815
  }, null, 8, ["display-item-list", "widget-collections", "device-display-type", "plugins", "component-props", "mounts"])
1602
1816
  ], 2)), 64))
1603
- ], 64)) : (m(), A(oe, {
1817
+ ], 64)) : (y(), C(ie, {
1604
1818
  key: 0,
1605
1819
  "display-item-list": e.displayItemList,
1606
1820
  "is-compose-mode": !1,
@@ -1617,7 +1831,7 @@ ${i.value}
1617
1831
  };
1618
1832
  }
1619
1833
  });
1620
- function mo(e, t, n) {
1834
+ function To(e, t, n) {
1621
1835
  if (e)
1622
1836
  return "Phone";
1623
1837
  if (t)
@@ -1625,7 +1839,7 @@ function mo(e, t, n) {
1625
1839
  const o = (n == null ? void 0 : n.toLowerCase()) || "desktop";
1626
1840
  return o === "phone" ? "Phone" : o === "tablet" ? "Tablet" : "Desktop";
1627
1841
  }
1628
- const yo = `(max-width: ${Ne})`, go = `(max-width: ${We})`, ho = /* @__PURE__ */ D({
1842
+ const xo = `(max-width: ${Fe})`, Eo = `(max-width: ${Ve})`, Po = /* @__PURE__ */ D({
1629
1843
  __name: "RenderComponents",
1630
1844
  props: {
1631
1845
  displayItemList: {},
@@ -1639,27 +1853,27 @@ const yo = `(max-width: ${Ne})`, go = `(max-width: ${We})`, ho = /* @__PURE__ */
1639
1853
  mounts: {}
1640
1854
  },
1641
1855
  setup(e) {
1642
- const t = e, n = B("Desktop");
1856
+ const t = e, n = V("Desktop");
1643
1857
  let o, s;
1644
1858
  function i() {
1645
- n.value = mo(
1859
+ n.value = To(
1646
1860
  (o == null ? void 0 : o.matches) ?? !1,
1647
1861
  (s == null ? void 0 : s.matches) ?? !1,
1648
1862
  t.reduxDeviceDisplayType
1649
1863
  );
1650
1864
  }
1651
- return Ze(() => {
1652
- typeof matchMedia == "function" && (o = matchMedia(yo), s = matchMedia(go), o.addEventListener("change", i), s.addEventListener("change", i)), i();
1653
- }), xe(() => {
1865
+ return it(() => {
1866
+ typeof matchMedia == "function" && (o = matchMedia(xo), s = matchMedia(Eo), o.addEventListener("change", i), s.addEventListener("change", i)), i();
1867
+ }), $e(() => {
1654
1868
  o == null || o.removeEventListener("change", i), s == null || s.removeEventListener("change", i);
1655
- }), (c, d) => {
1656
- var a;
1657
- return m(), b(I, null, [
1658
- e.isWithinCollection ? W("", !0) : (m(), A(_e, {
1869
+ }), (r, f) => {
1870
+ var m;
1871
+ return y(), b(A, null, [
1872
+ e.isWithinCollection ? N("", !0) : (y(), C(Xe, {
1659
1873
  key: 0,
1660
- stylesheets: (a = e.plugins.sourceComponents) == null ? void 0 : a.stylesheets
1874
+ stylesheets: (m = e.plugins.sourceComponents) == null ? void 0 : m.stylesheets
1661
1875
  }, null, 8, ["stylesheets"])),
1662
- ne(oe, {
1876
+ U(ie, {
1663
1877
  "display-item-list": e.displayItemList,
1664
1878
  "is-compose-mode": e.isComposeMode,
1665
1879
  "is-within-collection": e.isWithinCollection,
@@ -1675,76 +1889,76 @@ const yo = `(max-width: ${Ne})`, go = `(max-width: ${We})`, ho = /* @__PURE__ */
1675
1889
  };
1676
1890
  }
1677
1891
  });
1678
- function bo(e) {
1892
+ function Lo(e) {
1679
1893
  const t = {};
1680
1894
  return Object.entries(e).forEach(([n, o]) => {
1681
1895
  const s = { ...o };
1682
1896
  if (s.itemList)
1683
1897
  try {
1684
1898
  s.collectionRows = typeof s.itemList == "string" ? JSON.parse(s.itemList) : s.itemList;
1685
- } catch (c) {
1686
- console.error(`Failed to parse itemList for collection ${n}:`, c), s.collectionRows = { rows: [] };
1899
+ } catch (r) {
1900
+ console.error(`Failed to parse itemList for collection ${n}:`, r), s.collectionRows = { rows: [] };
1687
1901
  }
1688
1902
  let i = `${s.name}$${n}`;
1689
1903
  s.parentId && (i = `${i}@${s.parentId}`), t[i] = s;
1690
1904
  }), t;
1691
1905
  }
1692
- function wo(e) {
1906
+ function $o(e) {
1693
1907
  return typeof e.itemList == "string" ? JSON.parse(e.itemList) : e.itemList;
1694
1908
  }
1695
- function Ke(e) {
1909
+ function Ze(e) {
1696
1910
  return {
1697
- displayItemList: wo(e.widget),
1698
- widgetCollections: bo(e.childCollections),
1911
+ displayItemList: $o(e.widget),
1912
+ widgetCollections: Lo(e.childCollections),
1699
1913
  ...e.libraries ? { libraries: e.libraries } : {}
1700
1914
  };
1701
1915
  }
1702
- function Co(e) {
1703
- const t = e.registry ?? q(), n = le({
1916
+ function Ro(e) {
1917
+ const t = e.registry ?? X(), n = ae({
1704
1918
  displayItemList: e.displayItemList,
1705
1919
  widgetCollections: e.widgetCollections
1706
1920
  });
1707
1921
  return t.resolveSync({ registrations: e.libraries, referenced: n });
1708
1922
  }
1709
- function vo(e) {
1710
- const t = e.registry ?? q(), n = le({
1923
+ function Mo(e) {
1924
+ const t = e.registry ?? X(), n = ae({
1711
1925
  displayItemList: e.displayItemList,
1712
1926
  widgetCollections: e.widgetCollections
1713
1927
  });
1714
1928
  return t.resolve({ registrations: e.libraries, referenced: n });
1715
1929
  }
1716
- const Ao = {
1930
+ const No = {
1717
1931
  display: "flex",
1718
1932
  justifyContent: "center",
1719
1933
  alignItems: "center",
1720
1934
  padding: "3rem",
1721
1935
  color: "#e2e8f0"
1722
- }, So = {
1936
+ }, Wo = {
1723
1937
  display: "flex",
1724
1938
  alignItems: "center",
1725
1939
  gap: "1rem"
1726
- }, Io = {
1940
+ }, Oo = {
1727
1941
  width: "40px",
1728
1942
  height: "40px",
1729
1943
  border: "4px solid #4a5568",
1730
1944
  borderTopColor: "#63b3ed",
1731
1945
  borderRadius: "50%",
1732
1946
  animation: "spin 1s linear infinite"
1733
- }, Se = {
1947
+ }, xe = {
1734
1948
  padding: "1.5rem",
1735
1949
  backgroundColor: "#742a2a",
1736
1950
  border: "1px solid #9b2c2c",
1737
1951
  borderRadius: "8px",
1738
1952
  color: "#fed7d7"
1739
- }, Ie = {
1953
+ }, Ee = {
1740
1954
  fontSize: "16px",
1741
1955
  fontWeight: "600",
1742
1956
  marginBottom: "0.5rem",
1743
1957
  color: "#feb2b2"
1744
- }, ke = {
1958
+ }, Pe = {
1745
1959
  fontSize: "14px",
1746
1960
  color: "#fed7d7"
1747
- }, ko = `
1961
+ }, jo = `
1748
1962
  @keyframes spin {
1749
1963
  from {
1750
1964
  transform: rotate(0deg);
@@ -1753,7 +1967,7 @@ const Ao = {
1753
1967
  transform: rotate(360deg);
1754
1968
  }
1755
1969
  }
1756
- `, Ko = "data-rulecms-published-key", Do = ["data-rulecms-published-key"], Uo = /* @__PURE__ */ D({
1970
+ `, ns = "data-rulecms-published-key", Bo = ["data-rulecms-published-key"], os = /* @__PURE__ */ D({
1757
1971
  __name: "RuleCMSWidget",
1758
1972
  props: {
1759
1973
  publishedKey: {},
@@ -1766,94 +1980,94 @@ const Ao = {
1766
1980
  mounts: {}
1767
1981
  },
1768
1982
  setup(e) {
1769
- const t = e, n = Je(Me, null), o = B(!1), s = B(null), i = B(null), c = B(null), d = y(() => t.mode === "pre-fetched"), a = y(() => ({
1770
- sourceComponents: c.value ?? void 0
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(() => ({
1984
+ sourceComponents: r.value ?? void 0
1771
1985
  }));
1772
- let r = null, l = null, f = !1;
1773
- function u() {
1986
+ let c = null, a = null, u = !1;
1987
+ function d() {
1774
1988
  if (!i.value) {
1775
- c.value = null;
1989
+ r.value = null;
1776
1990
  return;
1777
1991
  }
1778
- const C = t.libraries ?? (n == null ? void 0 : n.libraries), x = n == null ? void 0 : n.libraryRegistry, j = Co({
1992
+ const v = t.libraries ?? (n == null ? void 0 : n.libraries), T = n == null ? void 0 : n.libraryRegistry, F = Ro({
1779
1993
  displayItemList: i.value.displayItemList,
1780
1994
  widgetCollections: i.value.widgetCollections,
1781
- libraries: C,
1782
- registry: x
1995
+ libraries: v,
1996
+ registry: T
1783
1997
  });
1784
- if (j) {
1785
- c.value = j;
1998
+ if (F) {
1999
+ r.value = F;
1786
2000
  return;
1787
2001
  }
1788
- vo({
2002
+ Mo({
1789
2003
  displayItemList: i.value.displayItemList,
1790
2004
  widgetCollections: i.value.widgetCollections,
1791
- libraries: C,
1792
- registry: x
1793
- }).then((X) => {
1794
- c.value = X;
2005
+ libraries: v,
2006
+ registry: T
2007
+ }).then((Z) => {
2008
+ r.value = Z;
1795
2009
  });
1796
2010
  }
1797
- function p() {
1798
- i.value && zn({
2011
+ function l() {
2012
+ i.value && co({
1799
2013
  componentProps: t.componentProps,
1800
2014
  displayItemList: i.value.displayItemList,
1801
2015
  widgetCollections: i.value.widgetCollections,
1802
2016
  publishedKey: t.publishedKey
1803
2017
  });
1804
2018
  }
1805
- function h() {
1806
- if (f || typeof document > "u")
2019
+ function g() {
2020
+ if (u || typeof document > "u")
1807
2021
  return;
1808
- const C = "rulecms-widget-spinner-styles";
1809
- if (!document.getElementById(C)) {
1810
- const x = document.createElement("style");
1811
- x.id = C, x.textContent = ko, document.head.appendChild(x);
2022
+ const v = "rulecms-widget-spinner-styles";
2023
+ if (!document.getElementById(v)) {
2024
+ const T = document.createElement("style");
2025
+ T.id = v, T.textContent = jo, document.head.appendChild(T);
1812
2026
  }
1813
- f = !0;
2027
+ u = !0;
1814
2028
  }
1815
- function g() {
1816
- const C = t.token ?? (n == null ? void 0 : n.token), x = t.endpoint ?? (n == null ? void 0 : n.endpoint);
1817
- if (!t.publishedKey || !C) {
1818
- s.value = t.publishedKey ? "Token is required. Provide it either directly as a prop (`token`) or via RuleCMSWidgetProvider." : L(C) ? "Widget key is required" : "Published key is required", i.value = null;
2029
+ function p() {
2030
+ const v = t.token ?? (n == null ? void 0 : n.token), T = t.endpoint ?? (n == null ? void 0 : n.endpoint);
2031
+ 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;
1819
2033
  return;
1820
2034
  }
1821
- const j = `${t.publishedKey}|${C}`;
1822
- if (l === j && i.value) {
1823
- u();
2035
+ const F = `${t.publishedKey}|${v}`;
2036
+ if (a === F && i.value) {
2037
+ d();
1824
2038
  return;
1825
2039
  }
1826
- r == null || r.abort(), r = new AbortController();
1827
- const X = r.signal;
1828
- l = j, o.value = !0, s.value = null;
1829
- const Ue = $e({ publishedKey: t.publishedKey, token: C, endpoint: x });
1830
- fetch(Ue, {
2040
+ 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, {
1831
2045
  method: "GET",
1832
2046
  headers: { "Content-Type": "application/json" },
1833
- ...L(C) ? { cache: "no-store" } : {},
1834
- signal: X
1835
- }).then(async (E) => {
1836
- if (E.ok) {
1837
- const K = await E.json();
1838
- K.success ? (i.value = Ke(K.data), s.value = null, u(), p()) : (s.value = "Failed to fetch widget data", i.value = null);
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);
1839
2053
  } else {
1840
- const K = await E.json().catch(() => ({ error: "Unknown error" }));
1841
- s.value = K.error || `Request failed with status ${E.status}`, i.value = null;
2054
+ const z = await P.json().catch(() => ({ error: "Unknown error" }));
2055
+ s.value = z.error || `Request failed with status ${P.status}`, i.value = null;
1842
2056
  }
1843
- }).catch((E) => {
1844
- E instanceof DOMException && E.name === "AbortError" || (console.error("Error fetching widget:", E), s.value = "Failed to fetch widget", i.value = null);
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);
1845
2059
  }).finally(() => {
1846
2060
  o.value = !1;
1847
2061
  });
1848
2062
  }
1849
- function v() {
2063
+ function I() {
1850
2064
  if (t.mode === "pre-fetched") {
1851
- i.value = t.initialData ?? null, o.value = !1, s.value = null, u(), p();
2065
+ i.value = t.initialData ?? null, o.value = !1, s.value = null, d(), l();
1852
2066
  return;
1853
2067
  }
1854
- h(), g();
2068
+ g(), p();
1855
2069
  }
1856
- return De(
2070
+ return Le(
1857
2071
  () => [
1858
2072
  t.publishedKey,
1859
2073
  t.token,
@@ -1864,55 +2078,55 @@ const Ao = {
1864
2078
  t.componentProps
1865
2079
  ],
1866
2080
  () => {
1867
- v();
2081
+ I();
1868
2082
  },
1869
2083
  { immediate: !0 }
1870
- ), xe(() => {
1871
- r == null || r.abort();
1872
- }), (C, x) => (m(), b("span", {
2084
+ ), $e(() => {
2085
+ c == null || c.abort();
2086
+ }), (v, T) => (y(), b("span", {
1873
2087
  "data-rulecms-published-key": e.publishedKey,
1874
2088
  style: { display: "contents" }
1875
2089
  }, [
1876
- e.mode !== "pre-fetched" && o.value ? (m(), b("div", {
2090
+ e.mode !== "pre-fetched" && o.value ? (y(), b("div", {
1877
2091
  key: 0,
1878
- style: S(T(Ao))
2092
+ style: S(x(No))
1879
2093
  }, [
1880
2094
  $("div", {
1881
- style: S(T(So))
2095
+ style: S(x(Wo))
1882
2096
  }, [
1883
2097
  $("div", {
1884
- style: S(T(Io))
2098
+ style: S(x(Oo))
1885
2099
  }, null, 4)
1886
2100
  ], 4)
1887
- ], 4)) : e.mode !== "pre-fetched" && s.value ? (m(), b("div", {
2101
+ ], 4)) : e.mode !== "pre-fetched" && s.value ? (y(), b("div", {
1888
2102
  key: 1,
1889
- style: S(T(Se))
2103
+ style: S(x(xe))
1890
2104
  }, [
1891
2105
  $("div", {
1892
- style: S(T(Ie))
2106
+ style: S(x(Ee))
1893
2107
  }, "Error Loading Widget", 4),
1894
2108
  $("div", {
1895
- style: S(T(ke))
1896
- }, Y(s.value), 5)
1897
- ], 4)) : e.mode !== "pre-fetched" && !i.value ? (m(), b("div", {
2109
+ style: S(x(Pe))
2110
+ }, q(s.value), 5)
2111
+ ], 4)) : e.mode !== "pre-fetched" && !i.value ? (y(), b("div", {
1898
2112
  key: 2,
1899
- style: S(T(Se))
2113
+ style: S(x(xe))
1900
2114
  }, [
1901
2115
  $("div", {
1902
- style: S(T(Ie))
2116
+ style: S(x(Ee))
1903
2117
  }, "No Widget Data", 4),
1904
2118
  $("div", {
1905
- style: S(T(ke))
2119
+ style: S(x(Pe))
1906
2120
  }, "No widget data available", 4)
1907
- ], 4)) : c.value && i.value ? (m(), b(I, { key: 3 }, [
1908
- d.value ? (m(), A(fo, {
2121
+ ], 4)) : r.value && i.value ? (y(), b(A, { key: 3 }, [
2122
+ f.value ? (y(), C(Do, {
1909
2123
  key: 0,
1910
2124
  "display-item-list": i.value.displayItemList,
1911
2125
  "widget-collections": i.value.widgetCollections,
1912
- plugins: a.value,
2126
+ plugins: m.value,
1913
2127
  "component-props": e.componentProps,
1914
2128
  mounts: e.mounts
1915
- }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts"])) : (m(), A(ho, {
2129
+ }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts"])) : (y(), C(Po, {
1916
2130
  key: 1,
1917
2131
  "display-item-list": i.value.displayItemList,
1918
2132
  "is-compose-mode": !1,
@@ -1920,190 +2134,202 @@ const Ao = {
1920
2134
  "widget-collections": i.value.widgetCollections,
1921
2135
  "show-drop-containers": !1,
1922
2136
  "redux-device-display-type": "desktop",
1923
- plugins: a.value,
2137
+ plugins: m.value,
1924
2138
  "component-props": e.componentProps,
1925
2139
  mounts: e.mounts
1926
2140
  }, null, 8, ["display-item-list", "widget-collections", "plugins", "component-props", "mounts"]))
1927
- ], 64)) : W("", !0)
1928
- ], 8, Do));
2141
+ ], 64)) : N("", !0)
2142
+ ], 8, Bo));
1929
2143
  }
1930
2144
  });
1931
- class H extends Error {
2145
+ class _ extends Error {
1932
2146
  constructor(n, o) {
1933
2147
  super(n);
1934
- ye(this, "status");
2148
+ be(this, "status");
1935
2149
  this.name = "FetchRuleCMSWidgetError", this.status = o;
1936
2150
  }
1937
2151
  }
1938
- async function Ho(e) {
2152
+ async function ss(e) {
1939
2153
  const { publishedKey: t, token: n, endpoint: o, fetchOptions: s } = e;
1940
2154
  if (!t)
1941
- throw new H(
1942
- L(n) ? "Widget key is required" : "Published key is required"
2155
+ throw new _(
2156
+ O(n) ? "Widget key is required" : "Published key is required"
1943
2157
  );
1944
2158
  if (!n)
1945
- throw new H("Token is required");
1946
- const i = $e({ publishedKey: t, token: n, endpoint: o }), c = await fetch(i, {
2159
+ throw new _("Token is required");
2160
+ const i = We({ publishedKey: t, token: n, endpoint: o }), r = await fetch(i, {
1947
2161
  method: "GET",
1948
2162
  headers: { "Content-Type": "application/json" },
1949
- ...L(n) ? { cache: "no-store" } : {},
2163
+ ...O(n) ? { cache: "no-store" } : {},
1950
2164
  ...s
1951
2165
  });
1952
- if (!c.ok) {
1953
- const a = await c.json().catch(() => ({ error: "Unknown error" }));
1954
- throw new H(
1955
- a.error || `Request failed with status ${c.status}`,
1956
- c.status
2166
+ if (!r.ok) {
2167
+ const m = await r.json().catch(() => ({ error: "Unknown error" }));
2168
+ throw new _(
2169
+ m.error || `Request failed with status ${r.status}`,
2170
+ r.status
1957
2171
  );
1958
2172
  }
1959
- const d = await c.json();
1960
- if (!d.success)
1961
- throw new H("Failed to fetch widget data");
1962
- return Ke(d.data);
2173
+ const f = await r.json();
2174
+ if (!f.success)
2175
+ throw new _("Failed to fetch widget data");
2176
+ return Ze(f.data);
1963
2177
  }
1964
- async function Go(e) {
1965
- const { data: t, libraries: n } = e, o = le({
2178
+ async function is(e) {
2179
+ const { data: t, libraries: n } = e, o = ae({
1966
2180
  displayItemList: t.displayItemList,
1967
2181
  widgetCollections: t.widgetCollections
1968
2182
  });
1969
- return q().resolve({ registrations: n, referenced: o });
2183
+ return X().resolve({ registrations: n, referenced: o });
1970
2184
  }
1971
2185
  export {
1972
- Eo as AlignContentTypes,
1973
- fo as BreakpointVariantRender,
1974
- Ee as COLLECTION_TYPE_PREFIX,
1975
- me as COMPONENT_PROPS_PATH_SEPARATOR,
1976
- pe as CSS_CLASSES_ATTRIBUTE_NAME,
1977
- Ot as CSS_VARIABLE_NAME_MAX_LENGTH,
1978
- Wt as CSS_VARIABLE_NAME_PATTERN,
1979
- bt as DEFAULT_CLOUDINARY_CLOUD_NAME,
1980
- _ as DEFAULT_LIBRARY_ID,
1981
- Rn as DEFAULT_ROW_GAP,
1982
- ot as DEV_CLIENT_TOKEN_PREFIX,
1983
- lt as DEV_WIDGET_API_PATH,
1984
- $o as DeviceDisplayTypes,
1985
- uo as DisplayComponent,
1986
- re as DisplayItemTypes,
1987
- Pe as DragItemIdPrefixTypes,
1988
- mt as EMBEDDED_KEY_SEPARATOR,
1989
- rn as FLEX_LAYOUT_STYLE_KEYS_THAT_DERIVE_DISPLAY,
1990
- H as FetchRuleCMSWidgetError,
1991
- je as HIDE_WIDGET_ATTRIBUTE_NAME,
1992
- we as JustifyContentTypes,
1993
- ft as PUBLISHED_KEY_SEPARATOR,
1994
- rt as PUBLISHED_WIDGET_API_PATH,
1995
- Po as PageViewTypes,
1996
- st as RULECMS_API_ORIGIN,
1997
- Ko as RULECMS_PUBLISHED_KEY_ATTRIBUTE,
1998
- Me as RULECMS_WIDGET_CONTEXT_KEY,
1999
- ho as RenderComponents,
2000
- oe as RenderComponentsForDevice,
2001
- po as RenderComponentsInner,
2002
- Uo as RuleCMSWidget,
2003
- Bo as RuleCMSWidgetProvider,
2004
- jn as WIDGET_ATTRIBUTES_IGNORED_IN_COMPOSE_MODE,
2005
- it as WIDGET_CACHE_API_ORIGIN,
2006
- en as alignContentAllowlist,
2007
- Jt as alignItemsAllowlist,
2008
- on as backgroundPositionAllowlist,
2009
- sn as backgroundRepeatAllowlist,
2010
- nn as backgroundSizeAllowlist,
2011
- ln as borderStyleKeywords,
2012
- Ft as boxSpacingSideKeys,
2013
- _o as boxSpacingStyleAttributeEntries,
2014
- Nt as buildCloudinaryBackgroundUrl,
2015
- $e as buildWidgetFetchUrl,
2016
- Un as collectComponentInstancePaths,
2017
- le as collectReferencedLibraryIds,
2018
- nt as composeSourceComponentsPlugin,
2019
- q as createComponentLibraryRegistry,
2020
- Q as cssAttrArrayKey,
2021
- ht as defaultPageWidth,
2022
- Tn as deriveDisplayFlexIfNeeded,
2023
- Fo as desktopModeWidth,
2024
- Ho as fetchRuleCMSWidget,
2025
- Gn as findUnmatchedComponentPropsKeys,
2026
- tn as flexDirectionAllowlist,
2027
- Qt as flexWrapAllowlist,
2028
- Ht as fontFamilyAllowlist,
2029
- zt as fontStyleAllowlist,
2030
- Gt as fontWeightAllowlist,
2031
- gn as formatBackgroundImageStyles,
2032
- hn as formatBorderStyles,
2033
- bn as formatBoxShadowStyles,
2034
- Cn as formatBoxSpacingStyles,
2035
- vn as formatCssColorStyles,
2036
- ue as formatCssColorValue,
2037
- An as formatCssEnumStyles,
2038
- Sn as formatCssLengthStyles,
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,
2191
+ zt as CSS_VARIABLE_NAME_MAX_LENGTH,
2192
+ 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,
2201
+ 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,
2206
+ 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,
2214
+ Be as RULECMS_WIDGET_CONTEXT_KEY,
2215
+ Po as RenderComponents,
2216
+ ie as RenderComponentsForDevice,
2217
+ 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,
2236
+ ae as collectReferencedLibraryIds,
2237
+ ut as composeSourceComponentsPlugin,
2238
+ X as createComponentLibraryRegistry,
2239
+ oe as cssAttrArrayKey,
2240
+ 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,
2250
+ kn as formatBackgroundImageStyles,
2251
+ Dn as formatBorderStyles,
2252
+ Tn as formatBoxShadowStyles,
2253
+ En as formatBoxSpacingStyles,
2254
+ Pn as formatCssColorStyles,
2255
+ pe as formatCssColorValue,
2256
+ Ln as formatCssEnumStyles,
2257
+ $n as formatCssLengthStyles,
2039
2258
  k as formatCssVariable,
2040
- Vo as formatCssVariableStyles,
2041
- In as formatLineHeightStyles,
2042
- Dn as formatObjectStyleAttribute,
2043
- kn as formatOpacityStyles,
2044
- N as formatSpacingSideValue,
2045
- yt as generatePublishedKey,
2046
- Oo as generatePublishedKeyForEmbedded,
2047
- Le as getCollectionIdForCollectionType,
2048
- G as getColumnAttributes,
2049
- Ce as getComponentAttributesAndStyles,
2050
- te as getComponentsPluginFromPlugins,
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,
2051
2270
  w as getCssVariableFromLeaf,
2052
- Pn as getDefaultDimensionAttributes,
2053
- O as getDeviceTypeBasedAttributes,
2054
- Ro as getDragItemId,
2055
- at as getDragItemPrefixAndId,
2056
- ut as getIdAndPrefix,
2057
- En as getMergedAttributes,
2058
- Lo as getNameAndInstanceIdFromWidgetKey,
2059
- Mo as getNameFromWidgetKey,
2060
- dt as getWidgetKeyForCollection,
2061
- No as getWidgetKeyForCollectionWithPrefix,
2062
- pt as getWidgetKeyForPublishedCollection,
2063
- Wo as getWidgetKeyForPublishedCollectionWithPrefix,
2064
- fn as hasBoxShadowLeaf,
2065
- Xn as hasDeviceDivergentValues,
2066
- P as hasInvalidCssVariable,
2067
- $n as hasItems,
2068
- jo as incrementVersion,
2069
- jt as isBackgroundImageValue,
2070
- cn as isBorderStyleValue,
2071
- an as isBorderValue,
2072
- pn as isBoxShadowValue,
2073
- Vt as isBoxSpacingValue,
2074
- Et as isCloudinaryCloudName,
2075
- Pt as isCloudinaryPublicId,
2076
- Rt as isCloudinaryTransformationString,
2077
- ae as isCssColorValue,
2078
- Ut as isCssEnumValue,
2079
- Oe as isCssVariableName,
2080
- L as isDevClientToken,
2081
- mn as isLineHeightValue,
2082
- yn as isOpacityValue,
2083
- Mn as isRowHiddenForDevice,
2084
- $t as isSafeImageUrl,
2085
- M as isSpacingSideValue,
2086
- Fn as isWidgetHiddenForDevice,
2087
- Zt as justifyContentAllowlist,
2088
- fe as normalizeCssClasses,
2089
- de as objectStyleAttributeRegistry,
2271
+ jn as getDefaultDimensionAttributes,
2272
+ L as getDeviceTypeBasedAttributes,
2273
+ zo as getDragItemId,
2274
+ ht as getDragItemPrefixAndId,
2275
+ bt as getIdAndPrefix,
2276
+ 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,
2287
+ Fn as hasItems,
2288
+ Jn as hasOverlayLayers,
2289
+ Zo as incrementVersion,
2290
+ 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,
2297
+ 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,
2306
+ Bt as isSafeImageUrl,
2307
+ j as isSpacingSideValue,
2308
+ ge as isWidgetHiddenForDevice,
2309
+ ln as justifyContentAllowlist,
2310
+ me as normalizeCssClasses,
2311
+ fe as objectStyleAttributeRegistry,
2090
2312
  ee as overflowAllowlist,
2091
- Ne as phoneModeWidth,
2092
- Ke as prepareRuleCMSWidgetData,
2093
- Te as resolveKey,
2094
- Nn as resolveRowStyles,
2095
- ct as resolveWidgetApiOrigin,
2096
- Vn as resolveWidgetContainerStyles,
2097
- Kn as resolveWidgetInstanceProps,
2098
- Go as resolveWidgetLibraries,
2099
- Ln as rowBasedPropertiesAreAssigned,
2100
- ce as spacingKeywords,
2101
- Bt as spacingLengthUnits,
2102
- We as tabletModeWidth,
2103
- Yt as textAlignAllowlist,
2104
- qt as textDecorationAllowlist,
2105
- Xt as textTransformAllowlist,
2106
- Re as typeHasPrefix,
2107
- zn as warnUnmatchedComponentProps,
2108
- _n as widgetBasedPropertiesAreAssigned
2313
+ Fe as phoneModeWidth,
2314
+ rn as pointerEventsAllowlist,
2315
+ Ze as prepareRuleCMSWidgetData,
2316
+ Se as resolveBaseZIndex,
2317
+ Re as resolveKey,
2318
+ eo as resolveOverlayLayerPointerEvents,
2319
+ 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
2109
2335
  };