@rulecms/widget-vue 0.5.0 → 0.6.0

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