pennsieve-dashboard 0.3.6 → 0.3.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  var Fs = Object.defineProperty;
2
2
  var Us = (a, e, t) => e in a ? Fs(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
3
  var $ = (a, e, t) => Us(a, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as ue, openBlock as C, createElementBlock as z, createElementVNode as D, ref as P, reactive as si, isRef as Ws, isReactive as Gs, markRaw as Vs, computed as de, watch as fe, resolveComponent as ie, createBlock as Q, withCtx as W, createVNode as V, Fragment as De, renderList as qe, unref as Y, createTextVNode as Oe, inject as qs, shallowRef as hs, renderSlot as Tt, mergeProps as di, toDisplayString as pe, withDirectives as Me, withKeys as us, vShow as Rt, vModelText as js, createCommentVNode as Ve, toRaw as Ys, onMounted as ds, onBeforeUnmount as fs, normalizeClass as ps, resolveDynamicComponent as ji, onBeforeMount as Xs, provide as Ks, defineAsyncComponent as Zs, nextTick as Yi } from "vue";
4
+ import { defineComponent as de, openBlock as C, createElementBlock as z, createElementVNode as D, ref as B, reactive as si, isRef as Ws, isReactive as Gs, markRaw as Vs, computed as ue, watch as fe, resolveComponent as ie, createBlock as Q, withCtx as W, createVNode as V, Fragment as De, renderList as qe, unref as Y, createTextVNode as Oe, inject as qs, shallowRef as hs, renderSlot as Tt, mergeProps as di, toDisplayString as pe, withDirectives as Me, withKeys as us, vShow as Rt, vModelText as js, createCommentVNode as Ve, toRaw as Ys, onMounted as ds, onBeforeUnmount as fs, normalizeClass as ps, resolveDynamicComponent as ji, onBeforeMount as Xs, provide as Ks, defineAsyncComponent as Zs, nextTick as Yi } from "vue";
5
5
  import { defineStore as Qs, storeToRefs as ni } from "pinia";
6
6
  import { ElTag as Js, ElTooltip as ri } from "element-plus";
7
7
  /*! Element Plus Icons Vue v2.3.2 */
8
- var en = /* @__PURE__ */ ue({
8
+ var en = /* @__PURE__ */ de({
9
9
  name: "CircleCloseFilled",
10
10
  __name: "circle-close-filled",
11
11
  setup(a) {
@@ -19,7 +19,7 @@ var en = /* @__PURE__ */ ue({
19
19
  })
20
20
  ]));
21
21
  }
22
- }), tn = en, sn = /* @__PURE__ */ ue({
22
+ }), tn = en, sn = /* @__PURE__ */ de({
23
23
  name: "Close",
24
24
  __name: "close",
25
25
  setup(a) {
@@ -33,7 +33,7 @@ var en = /* @__PURE__ */ ue({
33
33
  })
34
34
  ]));
35
35
  }
36
- }), nn = sn, rn = /* @__PURE__ */ ue({
36
+ }), nn = sn, rn = /* @__PURE__ */ de({
37
37
  name: "Edit",
38
38
  __name: "edit",
39
39
  setup(a) {
@@ -51,7 +51,7 @@ var en = /* @__PURE__ */ ue({
51
51
  })
52
52
  ]));
53
53
  }
54
- }), gs = rn, on = /* @__PURE__ */ ue({
54
+ }), gs = rn, on = /* @__PURE__ */ de({
55
55
  name: "FullScreen",
56
56
  __name: "full-screen",
57
57
  setup(a) {
@@ -65,7 +65,7 @@ var en = /* @__PURE__ */ ue({
65
65
  })
66
66
  ]));
67
67
  }
68
- }), an = on, ln = /* @__PURE__ */ ue({
68
+ }), an = on, ln = /* @__PURE__ */ de({
69
69
  name: "Lock",
70
70
  __name: "lock",
71
71
  setup(a) {
@@ -83,7 +83,7 @@ var en = /* @__PURE__ */ ue({
83
83
  })
84
84
  ]));
85
85
  }
86
- }), cn = ln, hn = /* @__PURE__ */ ue({
86
+ }), cn = ln, hn = /* @__PURE__ */ de({
87
87
  name: "ScaleToOriginal",
88
88
  __name: "scale-to-original",
89
89
  setup(a) {
@@ -97,7 +97,7 @@ var en = /* @__PURE__ */ ue({
97
97
  })
98
98
  ]));
99
99
  }
100
- }), un = hn, dn = /* @__PURE__ */ ue({
100
+ }), un = hn, dn = /* @__PURE__ */ de({
101
101
  name: "Unlock",
102
102
  __name: "unlock",
103
103
  setup(a) {
@@ -117,30 +117,30 @@ var en = /* @__PURE__ */ ue({
117
117
  }
118
118
  }), fn = dn;
119
119
  const lt = Qs("globalPensieveDashVars", () => {
120
- const a = P([]), e = P({}), t = "dashboard-globalVarsStore", i = P([]), s = P([]), n = P({}), o = si({}), r = si({});
120
+ const a = B([]), e = B({}), t = "dashboard-globalVarsStore", i = B([]), s = B([]), n = B({}), r = si({}), o = si({});
121
121
  function h(g, m, F = !1) {
122
- o[g] = m, r[g] = F;
122
+ r[g] = m, o[g] = F;
123
123
  }
124
124
  function c(g = {}) {
125
- for (const m of Object.keys(o)) delete o[m];
126
- Object.assign(o, g);
125
+ for (const m of Object.keys(r)) delete r[m];
126
+ Object.assign(r, g);
127
127
  }
128
128
  const l = (g) => {
129
- delete o[g];
129
+ delete r[g];
130
130
  };
131
131
  function d() {
132
- for (const g of Object.keys(o)) delete o[g];
132
+ for (const g of Object.keys(r)) delete r[g];
133
133
  }
134
134
  function f() {
135
135
  s.value = [...a.value], c({});
136
136
  }
137
137
  const y = (g) => s.value.find((m) => m.id === g), v = (g, m) => {
138
138
  i.value.push({ name: g, value: m });
139
- }, w = () => {
139
+ }, b = () => {
140
140
  i.value = [];
141
- }, B = (g) => {
141
+ }, O = (g) => {
142
142
  n.value = A(g);
143
- }, T = () => n.value;
143
+ }, E = () => n.value;
144
144
  function A(g) {
145
145
  const m = {};
146
146
  if (!g || typeof g != "object") return m;
@@ -155,7 +155,7 @@ const lt = Qs("globalPensieveDashVars", () => {
155
155
  const S = (g) => {
156
156
  const m = s.value.find((F) => F.id === g);
157
157
  m && (m.Props = m.Props || {}, m.Props.locked = !m.Props.locked);
158
- }, E = (g) => g.map((m) => {
158
+ }, T = (g) => g.map((m) => {
159
159
  const F = e.value[m.componentKey];
160
160
  return F ? {
161
161
  ...m,
@@ -163,7 +163,7 @@ const lt = Qs("globalPensieveDashVars", () => {
163
163
  // attach runtime component
164
164
  } : null;
165
165
  }).filter((m) => !!m);
166
- function M(g) {
166
+ function H(g) {
167
167
  }
168
168
  function oe() {
169
169
  }
@@ -173,9 +173,9 @@ const lt = Qs("globalPensieveDashVars", () => {
173
173
  ComponentRegistry: e,
174
174
  optionsData: i,
175
175
  Services: n,
176
- Filters: o,
177
- displayFilters: r,
178
- registerGridProvider: M,
176
+ Filters: r,
177
+ displayFilters: o,
178
+ registerGridProvider: H,
179
179
  unregisterGridProvider: oe,
180
180
  setFilter: h,
181
181
  clearFilter: l,
@@ -185,7 +185,7 @@ const lt = Qs("globalPensieveDashVars", () => {
185
185
  getDashItem: y,
186
186
  toggleWidgetLock: S,
187
187
  addOptionsDataItems: v,
188
- clearOptionsDataItems: w,
188
+ clearOptionsDataItems: b,
189
189
  //saveToLocalStorage,
190
190
  loadFromLocalStorage: () => {
191
191
  const g = localStorage.getItem(t);
@@ -195,15 +195,15 @@ const lt = Qs("globalPensieveDashVars", () => {
195
195
  }
196
196
  try {
197
197
  const m = JSON.parse(g);
198
- s.value = Array.isArray(m.items) ? E(m.items) : [...a.value], c(m.filters ?? {});
198
+ s.value = Array.isArray(m.items) ? T(m.items) : [...a.value], c(m.filters ?? {});
199
199
  } catch (m) {
200
200
  console.error("Failed to parse globalVarsStore:", m), s.value = [...a.value], c({});
201
201
  }
202
202
  },
203
- setOptionServices: B,
204
- getServices: T
203
+ setOptionServices: O,
204
+ getServices: E
205
205
  };
206
- }), pn = { class: "widget-settings-container" }, gn = { class: "widget-setting" }, mn = { class: "dialog-footer" }, _n = /* @__PURE__ */ ue({
206
+ }), pn = { class: "widget-settings-container" }, gn = { class: "widget-setting" }, mn = { class: "dialog-footer" }, _n = /* @__PURE__ */ de({
207
207
  __name: "TextWidgetSettings",
208
208
  props: {
209
209
  showDialog: { type: Boolean },
@@ -213,14 +213,14 @@ const lt = Qs("globalPensieveDashVars", () => {
213
213
  },
214
214
  emits: ["close-dialog", "update-text-var"],
215
215
  setup(a, { emit: e }) {
216
- const t = lt(), { optionsData: i } = ni(t), s = e, n = a, o = de({
216
+ const t = lt(), { optionsData: i } = ni(t), s = e, n = a, r = ue({
217
217
  get: () => n.showDialog,
218
218
  set: (d) => {
219
219
  d || s("close-dialog");
220
220
  }
221
- }), r = P(n.reactiveSourceValue ?? ""), h = P(n.manualEntryValue ?? ""), c = P(!!n.hideHeaderValue);
221
+ }), o = B(n.reactiveSourceValue ?? ""), h = B(n.manualEntryValue ?? ""), c = B(!!n.hideHeaderValue);
222
222
  fe(() => n.reactiveSourceValue, (d) => {
223
- r.value = d ?? "";
223
+ o.value = d ?? "";
224
224
  }), fe(() => n.manualEntryValue, (d) => {
225
225
  h.value = d ?? "";
226
226
  }, { immediate: !0 }), fe(() => n.hideHeaderValue, (d) => {
@@ -228,34 +228,34 @@ const lt = Qs("globalPensieveDashVars", () => {
228
228
  });
229
229
  function l() {
230
230
  var v;
231
- const d = (r.value || "").trim(), f = d !== "", y = f ? null : ((v = h.value) == null ? void 0 : v.trim()) || "";
231
+ const d = (o.value || "").trim(), f = d !== "", y = f ? null : ((v = h.value) == null ? void 0 : v.trim()) || "";
232
232
  s("update-text-var", {
233
233
  reactiveSource: f ? d : null,
234
234
  manualEdit: y,
235
235
  hideHeader: c.value
236
- }), o.value = !1;
236
+ }), r.value = !1;
237
237
  }
238
238
  return (d, f) => {
239
- const y = ie("el-option"), v = ie("el-select"), w = ie("el-input"), B = ie("el-checkbox"), T = ie("el-button"), A = ie("el-dialog");
239
+ const y = ie("el-option"), v = ie("el-select"), b = ie("el-input"), O = ie("el-checkbox"), E = ie("el-button"), A = ie("el-dialog");
240
240
  return C(), Q(A, {
241
241
  class: "full-dialog-dashboard",
242
- modelValue: o.value,
243
- "onUpdate:modelValue": f[4] || (f[4] = (S) => o.value = S),
242
+ modelValue: r.value,
243
+ "onUpdate:modelValue": f[4] || (f[4] = (S) => r.value = S),
244
244
  title: "Text Widget Settings",
245
245
  "append-to-body": !0
246
246
  }, {
247
247
  footer: W(() => [
248
248
  D("div", mn, [
249
- V(T, {
249
+ V(E, {
250
250
  class: "secondary",
251
- onClick: f[3] || (f[3] = (S) => o.value = !1)
251
+ onClick: f[3] || (f[3] = (S) => r.value = !1)
252
252
  }, {
253
253
  default: W(() => [...f[8] || (f[8] = [
254
254
  Oe("Cancel", -1)
255
255
  ])]),
256
256
  _: 1
257
257
  }),
258
- V(T, { onClick: l }, {
258
+ V(E, { onClick: l }, {
259
259
  default: W(() => [...f[9] || (f[9] = [
260
260
  Oe("Save", -1)
261
261
  ])]),
@@ -269,8 +269,8 @@ const lt = Qs("globalPensieveDashVars", () => {
269
269
  f[5] || (f[5] = D("h4", null, "Select This Widget's Value", -1)),
270
270
  f[6] || (f[6] = D("h5", null, "Select From Variables", -1)),
271
271
  V(v, {
272
- modelValue: r.value,
273
- "onUpdate:modelValue": f[0] || (f[0] = (S) => r.value = S),
272
+ modelValue: o.value,
273
+ "onUpdate:modelValue": f[0] || (f[0] = (S) => o.value = S),
274
274
  class: "text-settings-height"
275
275
  }, {
276
276
  default: W(() => [
@@ -288,12 +288,12 @@ const lt = Qs("globalPensieveDashVars", () => {
288
288
  _: 1
289
289
  }, 8, ["modelValue"]),
290
290
  f[7] || (f[7] = D("h5", null, "Manual Entry", -1)),
291
- V(w, {
291
+ V(b, {
292
292
  modelValue: h.value,
293
293
  "onUpdate:modelValue": f[1] || (f[1] = (S) => h.value = S),
294
294
  class: "text-settings-height"
295
295
  }, null, 8, ["modelValue"]),
296
- V(B, {
296
+ V(O, {
297
297
  modelValue: c.value,
298
298
  "onUpdate:modelValue": f[2] || (f[2] = (S) => c.value = S),
299
299
  label: "Hide Header"
@@ -319,7 +319,7 @@ const lt = Qs("globalPensieveDashVars", () => {
319
319
  unmounted(a) {
320
320
  document.removeEventListener("click", a._clickOutsideHandler), delete a._clickOutsideHandler;
321
321
  }
322
- }, yn = { key: 0 }, bn = /* @__PURE__ */ ue({
322
+ }, yn = { key: 0 }, bn = /* @__PURE__ */ de({
323
323
  inheritAttrs: !1,
324
324
  __name: "TextWidget",
325
325
  props: {
@@ -331,46 +331,46 @@ const lt = Qs("globalPensieveDashVars", () => {
331
331
  setup(a) {
332
332
  const e = lt(), t = a;
333
333
  qs("dashboard:globalVars", null);
334
- const i = P(t.displayText ?? "");
335
- fe(() => t.displayText, (T) => {
336
- i.value = T ?? "";
334
+ const i = B(t.displayText ?? "");
335
+ fe(() => t.displayText, (E) => {
336
+ i.value = E ?? "";
337
337
  }, { immediate: !0 });
338
- const s = de(() => !!(t.bindedKey && t.bindedKey.trim() !== "")), n = de(() => {
339
- var E;
340
- const T = (E = t.bindedKey) == null ? void 0 : E.trim();
341
- if (!T) return "—";
342
- const A = e.optionsData.find((M) => (M == null ? void 0 : M.name) === T), S = A == null ? void 0 : A.value;
338
+ const s = ue(() => !!(t.bindedKey && t.bindedKey.trim() !== "")), n = ue(() => {
339
+ var T;
340
+ const E = (T = t.bindedKey) == null ? void 0 : T.trim();
341
+ if (!E) return "—";
342
+ const A = e.optionsData.find((H) => (H == null ? void 0 : H.name) === E), S = A == null ? void 0 : A.value;
343
343
  return Array.isArray(S) ? S.join(", ") : S && typeof S == "object" ? JSON.stringify(S) : S ?? "—";
344
- }), o = P("Text Widget"), r = hs([{ comp: gs, event: y, tooltip: "open Text settings" }]), h = P(!1), c = P(null);
344
+ }), r = B("Text Widget"), o = hs([{ comp: gs, event: y, tooltip: "open Text settings" }]), h = B(!1), c = B(null);
345
345
  function l() {
346
- var T, A;
347
- h.value = !0, (A = (T = c.value) == null ? void 0 : T.focus) == null || A.call(T);
346
+ var E, A;
347
+ h.value = !0, (A = (E = c.value) == null ? void 0 : E.focus) == null || A.call(E);
348
348
  }
349
349
  function d() {
350
350
  h.value = !1;
351
351
  }
352
- const f = P(!1);
352
+ const f = B(!1);
353
353
  function y() {
354
354
  f.value = !0;
355
355
  }
356
356
  function v() {
357
357
  f.value = !1;
358
358
  }
359
- function w({ manualEdit: T, reactiveSource: A, hideHeader: S }) {
360
- const E = e.getDashItem(t.widgetID);
361
- E && (E.hideHeader = S, A && A.trim() !== "" ? (E.Props = E.Props || {}, E.Props.bindedKey = A, E.Props.displayText = null, E.componentName = B(A)) : (E.Props = E.Props || {}, E.Props.bindedKey = null, E.Props.displayText = T ?? "", E.componentName = T ?? "Text"));
359
+ function b({ manualEdit: E, reactiveSource: A, hideHeader: S }) {
360
+ const T = e.getDashItem(t.widgetID);
361
+ T && (T.hideHeader = S, A && A.trim() !== "" ? (T.Props = T.Props || {}, T.Props.bindedKey = A, T.Props.displayText = null, T.componentName = O(A)) : (T.Props = T.Props || {}, T.Props.bindedKey = null, T.Props.displayText = E ?? "", T.componentName = E ?? "Text"));
362
362
  }
363
- function B(T) {
364
- return T ? T.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (A) => A.toUpperCase()) : "";
363
+ function O(E) {
364
+ return E ? E.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (A) => A.toUpperCase()) : "";
365
365
  }
366
- return (T, A) => {
366
+ return (E, A) => {
367
367
  const S = ie("el-input");
368
368
  return C(), z(De, null, [
369
- Tt(T.$slots, "default", {
370
- widgetName: o.value,
371
- childIcons: r.value
369
+ Tt(E.$slots, "default", {
370
+ widgetName: r.value,
371
+ childIcons: o.value
372
372
  }, void 0, !0),
373
- D("div", di({ class: "text-widget-wrap" }, T.$attrs), [
373
+ D("div", di({ class: "text-widget-wrap" }, E.$attrs), [
374
374
  s.value ? (C(), z("div", yn, [
375
375
  D("h2", null, pe(n.value), 1)
376
376
  ])) : Me((C(), z("div", {
@@ -383,17 +383,17 @@ const lt = Qs("globalPensieveDashVars", () => {
383
383
  ref_key: "textUserInput",
384
384
  ref: c,
385
385
  modelValue: i.value,
386
- "onUpdate:modelValue": A[0] || (A[0] = (E) => i.value = E),
387
- onFocus: A[1] || (A[1] = (E) => {
388
- var M, oe;
389
- return (oe = (M = E.target) == null ? void 0 : M.select) == null ? void 0 : oe.call(M);
386
+ "onUpdate:modelValue": A[0] || (A[0] = (T) => i.value = T),
387
+ onFocus: A[1] || (A[1] = (T) => {
388
+ var H, oe;
389
+ return (oe = (H = T.target) == null ? void 0 : H.select) == null ? void 0 : oe.call(H);
390
390
  })
391
391
  }, null, 8, ["modelValue"])
392
392
  ], 512), [
393
393
  [Rt, h.value]
394
394
  ]),
395
395
  Me(D("div", {
396
- onClick: A[2] || (A[2] = (E) => l()),
396
+ onClick: A[2] || (A[2] = (T) => l()),
397
397
  class: "tw-w-full tw-h-full"
398
398
  }, [
399
399
  D("h2", null, pe(i.value), 1)
@@ -410,7 +410,7 @@ const lt = Qs("globalPensieveDashVars", () => {
410
410
  "manual-entry-value": i.value,
411
411
  "hide-header-value": t.hideHeader || !1,
412
412
  onCloseDialog: v,
413
- onUpdateTextVar: w
413
+ onUpdateTextVar: b
414
414
  }, null, 8, ["show-dialog", "reactive-source-value", "manual-entry-value", "hide-header-value"])
415
415
  ], 64);
416
416
  };
@@ -430,17 +430,17 @@ function fi() {
430
430
  walkTokens: null
431
431
  };
432
432
  }
433
- var Ie = fi();
433
+ var Pe = fi();
434
434
  function _s(a) {
435
- Ie = a;
435
+ Pe = a;
436
436
  }
437
437
  var rt = { exec: () => null };
438
438
  function I(a, e = "") {
439
439
  let t = typeof a == "string" ? a : a.source;
440
440
  const i = {
441
441
  replace: (s, n) => {
442
- let o = typeof n == "string" ? n : n.source;
443
- return o = o.replace(se.caret, "$1"), t = t.replace(s, o), i;
442
+ let r = typeof n == "string" ? n : n.source;
443
+ return r = r.replace(se.caret, "$1"), t = t.replace(s, r), i;
444
444
  },
445
445
  getRegex: () => new RegExp(t, e)
446
446
  };
@@ -539,7 +539,7 @@ var se = {
539
539
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
540
540
  paragraph: I(gi).replace("hr", ct).replace("heading", ` *#{1,6} *[^
541
541
  ]`).replace("lheading", ys).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
542
- }, zn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, On = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ws = /^( {2,}|\\)\n(?!\s*$)/, Mn = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ht = /[\p{P}\p{S}]/u, yi = /[\s\p{P}\p{S}]/u, xs = /[^\s\p{P}\p{S}]/u, Hn = I(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, yi).getRegex(), ks = /(?!~)[\p{P}\p{S}]/u, In = /(?!~)[\s\p{P}\p{S}]/u, Pn = /(?:[^\s\p{P}\p{S}]|~)/u, Bn = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, Es = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, $n = I(Es, "u").replace(/punct/g, Ht).getRegex(), Fn = I(Es, "u").replace(/punct/g, ks).getRegex(), Ts = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Un = I(Ts, "gu").replace(/notPunctSpace/g, xs).replace(/punctSpace/g, yi).replace(/punct/g, Ht).getRegex(), Wn = I(Ts, "gu").replace(/notPunctSpace/g, Pn).replace(/punctSpace/g, In).replace(/punct/g, ks).getRegex(), Gn = I(
542
+ }, zn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, On = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ws = /^( {2,}|\\)\n(?!\s*$)/, Mn = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ht = /[\p{P}\p{S}]/u, yi = /[\s\p{P}\p{S}]/u, xs = /[^\s\p{P}\p{S}]/u, Hn = I(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, yi).getRegex(), ks = /(?!~)[\p{P}\p{S}]/u, Pn = /(?!~)[\s\p{P}\p{S}]/u, In = /(?:[^\s\p{P}\p{S}]|~)/u, Bn = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, Es = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, $n = I(Es, "u").replace(/punct/g, Ht).getRegex(), Fn = I(Es, "u").replace(/punct/g, ks).getRegex(), Ts = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Un = I(Ts, "gu").replace(/notPunctSpace/g, xs).replace(/punctSpace/g, yi).replace(/punct/g, Ht).getRegex(), Wn = I(Ts, "gu").replace(/notPunctSpace/g, In).replace(/punctSpace/g, Pn).replace(/punct/g, ks).getRegex(), Gn = I(
543
543
  "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)",
544
544
  "gu"
545
545
  ).replace(/notPunctSpace/g, xs).replace(/punctSpace/g, yi).replace(/punct/g, Ht).getRegex(), Vn = I(/\\(punct)/, "gu").replace(/punct/g, Ht).getRegex(), qn = I(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), jn = I(_i).replace("(?:-->|$)", "-->").getRegex(), Yn = I(
@@ -615,8 +615,8 @@ function Zi(a) {
615
615
  }
616
616
  function Qi(a, e) {
617
617
  var n;
618
- const t = a.replace(se.findPipe, (o, r, h) => {
619
- let c = !1, l = r;
618
+ const t = a.replace(se.findPipe, (r, o, h) => {
619
+ let c = !1, l = o;
620
620
  for (; --l >= 0 && h[l] === "\\"; ) c = !c;
621
621
  return c ? "|" : " |";
622
622
  }), i = t.split(se.splitPipe);
@@ -653,15 +653,15 @@ function er(a, e) {
653
653
  return t > 0 ? -2 : -1;
654
654
  }
655
655
  function Ji(a, e, t, i, s) {
656
- const n = e.href, o = e.title || null, r = a[1].replace(s.other.outputLinkReplace, "$1");
656
+ const n = e.href, r = e.title || null, o = a[1].replace(s.other.outputLinkReplace, "$1");
657
657
  i.state.inLink = !0;
658
658
  const h = {
659
659
  type: a[0].charAt(0) === "!" ? "image" : "link",
660
660
  raw: t,
661
661
  href: n,
662
- title: o,
663
- text: r,
664
- tokens: i.inlineTokens(r)
662
+ title: r,
663
+ text: o,
664
+ tokens: i.inlineTokens(o)
665
665
  };
666
666
  return i.state.inLink = !1, h;
667
667
  }
@@ -672,11 +672,11 @@ function tr(a, e, t) {
672
672
  const s = i[1];
673
673
  return e.split(`
674
674
  `).map((n) => {
675
- const o = n.match(t.other.beginningSpace);
676
- if (o === null)
675
+ const r = n.match(t.other.beginningSpace);
676
+ if (r === null)
677
677
  return n;
678
- const [r] = o;
679
- return r.length >= s.length ? n.slice(s.length) : n;
678
+ const [o] = r;
679
+ return o.length >= s.length ? n.slice(s.length) : n;
680
680
  }).join(`
681
681
  `);
682
682
  }
@@ -687,7 +687,7 @@ var At = class {
687
687
  $(this, "rules");
688
688
  // set by the lexer
689
689
  $(this, "lexer");
690
- this.options = a || Ie;
690
+ this.options = a || Pe;
691
691
  }
692
692
  space(a) {
693
693
  const e = this.rules.block.newline.exec(a);
@@ -756,18 +756,18 @@ var At = class {
756
756
  `), i = "", s = "";
757
757
  const n = [];
758
758
  for (; t.length > 0; ) {
759
- let o = !1;
760
- const r = [];
759
+ let r = !1;
760
+ const o = [];
761
761
  let h;
762
762
  for (h = 0; h < t.length; h++)
763
763
  if (this.rules.other.blockquoteStart.test(t[h]))
764
- r.push(t[h]), o = !0;
765
- else if (!o)
766
- r.push(t[h]);
764
+ o.push(t[h]), r = !0;
765
+ else if (!r)
766
+ o.push(t[h]);
767
767
  else
768
768
  break;
769
769
  t = t.slice(h);
770
- const c = r.join(`
770
+ const c = o.join(`
771
771
  `), l = c.replace(this.rules.other.blockquoteSetextReplace, `
772
772
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
773
773
  i = i ? `${i}
@@ -782,14 +782,14 @@ ${l}` : l;
782
782
  if ((f == null ? void 0 : f.type) === "blockquote") {
783
783
  const y = f, v = y.raw + `
784
784
  ` + t.join(`
785
- `), w = this.blockquote(v);
786
- n[n.length - 1] = w, i = i.substring(0, i.length - y.raw.length) + w.raw, s = s.substring(0, s.length - y.text.length) + w.text;
785
+ `), b = this.blockquote(v);
786
+ n[n.length - 1] = b, i = i.substring(0, i.length - y.raw.length) + b.raw, s = s.substring(0, s.length - y.text.length) + b.text;
787
787
  break;
788
788
  } else if ((f == null ? void 0 : f.type) === "list") {
789
789
  const y = f, v = y.raw + `
790
790
  ` + t.join(`
791
- `), w = this.list(v);
792
- n[n.length - 1] = w, i = i.substring(0, i.length - f.raw.length) + w.raw, s = s.substring(0, s.length - y.raw.length) + w.raw, t = v.substring(n.at(-1).raw.length).split(`
791
+ `), b = this.list(v);
792
+ n[n.length - 1] = b, i = i.substring(0, i.length - f.raw.length) + b.raw, s = s.substring(0, s.length - y.raw.length) + b.raw, t = v.substring(n.at(-1).raw.length).split(`
793
793
  `);
794
794
  continue;
795
795
  }
@@ -816,29 +816,29 @@ ${l}` : l;
816
816
  };
817
817
  t = i ? `\\d{1,9}\\${t.slice(-1)}` : `\\${t}`, this.options.pedantic && (t = i ? t : "[*+-]");
818
818
  const n = this.rules.other.listItemRegex(t);
819
- let o = !1;
819
+ let r = !1;
820
820
  for (; a; ) {
821
821
  let h = !1, c = "", l = "";
822
822
  if (!(e = n.exec(a)) || this.rules.block.hr.test(a))
823
823
  break;
824
824
  c = e[0], a = a.substring(c.length);
825
825
  let d = e[2].split(`
826
- `, 1)[0].replace(this.rules.other.listReplaceTabs, (T) => " ".repeat(3 * T.length)), f = a.split(`
826
+ `, 1)[0].replace(this.rules.other.listReplaceTabs, (E) => " ".repeat(3 * E.length)), f = a.split(`
827
827
  `, 1)[0], y = !d.trim(), v = 0;
828
828
  if (this.options.pedantic ? (v = 2, l = d.trimStart()) : y ? v = e[1].length + 1 : (v = e[2].search(this.rules.other.nonSpaceChar), v = v > 4 ? 1 : v, l = d.slice(v), v += e[1].length), y && this.rules.other.blankLine.test(f) && (c += f + `
829
829
  `, a = a.substring(f.length + 1), h = !0), !h) {
830
- const T = this.rules.other.nextBulletRegex(v), A = this.rules.other.hrRegex(v), S = this.rules.other.fencesBeginRegex(v), E = this.rules.other.headingBeginRegex(v), M = this.rules.other.htmlBeginRegex(v);
830
+ const E = this.rules.other.nextBulletRegex(v), A = this.rules.other.hrRegex(v), S = this.rules.other.fencesBeginRegex(v), T = this.rules.other.headingBeginRegex(v), H = this.rules.other.htmlBeginRegex(v);
831
831
  for (; a; ) {
832
832
  const oe = a.split(`
833
833
  `, 1)[0];
834
834
  let me;
835
- if (f = oe, this.options.pedantic ? (f = f.replace(this.rules.other.listReplaceNesting, " "), me = f) : me = f.replace(this.rules.other.tabCharGlobal, " "), S.test(f) || E.test(f) || M.test(f) || T.test(f) || A.test(f))
835
+ if (f = oe, this.options.pedantic ? (f = f.replace(this.rules.other.listReplaceNesting, " "), me = f) : me = f.replace(this.rules.other.tabCharGlobal, " "), S.test(f) || T.test(f) || H.test(f) || E.test(f) || A.test(f))
836
836
  break;
837
837
  if (me.search(this.rules.other.nonSpaceChar) >= v || !f.trim())
838
838
  l += `
839
839
  ` + me.slice(v);
840
840
  else {
841
- if (y || d.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || S.test(d) || E.test(d) || A.test(d))
841
+ if (y || d.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || S.test(d) || T.test(d) || A.test(d))
842
842
  break;
843
843
  l += `
844
844
  ` + f;
@@ -847,21 +847,21 @@ ${l}` : l;
847
847
  `, a = a.substring(oe.length + 1), d = me.slice(v);
848
848
  }
849
849
  }
850
- s.loose || (o ? s.loose = !0 : this.rules.other.doubleBlankLine.test(c) && (o = !0));
851
- let w = null, B;
852
- this.options.gfm && (w = this.rules.other.listIsTask.exec(l), w && (B = w[0] !== "[ ] ", l = l.replace(this.rules.other.listReplaceTask, ""))), s.items.push({
850
+ s.loose || (r ? s.loose = !0 : this.rules.other.doubleBlankLine.test(c) && (r = !0));
851
+ let b = null, O;
852
+ this.options.gfm && (b = this.rules.other.listIsTask.exec(l), b && (O = b[0] !== "[ ] ", l = l.replace(this.rules.other.listReplaceTask, ""))), s.items.push({
853
853
  type: "list_item",
854
854
  raw: c,
855
- task: !!w,
856
- checked: B,
855
+ task: !!b,
856
+ checked: O,
857
857
  loose: !1,
858
858
  text: l,
859
859
  tokens: []
860
860
  }), s.raw += c;
861
861
  }
862
- const r = s.items.at(-1);
863
- if (r)
864
- r.raw = r.raw.trimEnd(), r.text = r.text.trimEnd();
862
+ const o = s.items.at(-1);
863
+ if (o)
864
+ o.raw = o.raw.trimEnd(), o.text = o.text.trimEnd();
865
865
  else
866
866
  return;
867
867
  s.raw = s.raw.trimEnd();
@@ -901,11 +901,11 @@ ${l}` : l;
901
901
  }
902
902
  }
903
903
  table(a) {
904
- var o;
904
+ var r;
905
905
  const e = this.rules.block.table.exec(a);
906
906
  if (!e || !this.rules.other.tableDelimiter.test(e[2]))
907
907
  return;
908
- const t = Qi(e[1]), i = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), s = (o = e[3]) != null && o.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
908
+ const t = Qi(e[1]), i = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), s = (r = e[3]) != null && r.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
909
909
  `) : [], n = {
910
910
  type: "table",
911
911
  raw: e[0],
@@ -914,17 +914,17 @@ ${l}` : l;
914
914
  rows: []
915
915
  };
916
916
  if (t.length === i.length) {
917
- for (const r of i)
918
- this.rules.other.tableAlignRight.test(r) ? n.align.push("right") : this.rules.other.tableAlignCenter.test(r) ? n.align.push("center") : this.rules.other.tableAlignLeft.test(r) ? n.align.push("left") : n.align.push(null);
919
- for (let r = 0; r < t.length; r++)
917
+ for (const o of i)
918
+ this.rules.other.tableAlignRight.test(o) ? n.align.push("right") : this.rules.other.tableAlignCenter.test(o) ? n.align.push("center") : this.rules.other.tableAlignLeft.test(o) ? n.align.push("left") : n.align.push(null);
919
+ for (let o = 0; o < t.length; o++)
920
920
  n.header.push({
921
- text: t[r],
922
- tokens: this.lexer.inline(t[r]),
921
+ text: t[o],
922
+ tokens: this.lexer.inline(t[o]),
923
923
  header: !0,
924
- align: n.align[r]
924
+ align: n.align[o]
925
925
  });
926
- for (const r of s)
927
- n.rows.push(Qi(r, n.header.length).map((h, c) => ({
926
+ for (const o of s)
927
+ n.rows.push(Qi(o, n.header.length).map((h, c) => ({
928
928
  text: h,
929
929
  tokens: this.lexer.inline(h),
930
930
  header: !1,
@@ -1003,8 +1003,8 @@ ${l}` : l;
1003
1003
  if (n === -2)
1004
1004
  return;
1005
1005
  if (n > -1) {
1006
- const r = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + n;
1007
- e[2] = e[2].substring(0, n), e[0] = e[0].substring(0, r).trim(), e[3] = "";
1006
+ const o = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + n;
1007
+ e[2] = e[2].substring(0, n), e[0] = e[0].substring(0, o).trim(), e[3] = "";
1008
1008
  }
1009
1009
  }
1010
1010
  let i = e[2], s = "";
@@ -1039,21 +1039,21 @@ ${l}` : l;
1039
1039
  if (!i || i[3] && t.match(this.rules.other.unicodeAlphaNumeric)) return;
1040
1040
  if (!(i[1] || i[2] || "") || !t || this.rules.inline.punctuation.exec(t)) {
1041
1041
  const n = [...i[0]].length - 1;
1042
- let o, r, h = n, c = 0;
1042
+ let r, o, h = n, c = 0;
1043
1043
  const l = i[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1044
1044
  for (l.lastIndex = 0, e = e.slice(-1 * a.length + n); (i = l.exec(e)) != null; ) {
1045
- if (o = i[1] || i[2] || i[3] || i[4] || i[5] || i[6], !o) continue;
1046
- if (r = [...o].length, i[3] || i[4]) {
1047
- h += r;
1045
+ if (r = i[1] || i[2] || i[3] || i[4] || i[5] || i[6], !r) continue;
1046
+ if (o = [...r].length, i[3] || i[4]) {
1047
+ h += o;
1048
1048
  continue;
1049
- } else if ((i[5] || i[6]) && n % 3 && !((n + r) % 3)) {
1050
- c += r;
1049
+ } else if ((i[5] || i[6]) && n % 3 && !((n + o) % 3)) {
1050
+ c += o;
1051
1051
  continue;
1052
1052
  }
1053
- if (h -= r, h > 0) continue;
1054
- r = Math.min(r, r + h + c);
1055
- const d = [...i[0]][0].length, f = a.slice(0, n + i.index + d + r);
1056
- if (Math.min(n, r) % 2) {
1053
+ if (h -= o, h > 0) continue;
1054
+ o = Math.min(o, o + h + c);
1055
+ const d = [...i[0]][0].length, f = a.slice(0, n + i.index + d + o);
1056
+ if (Math.min(n, o) % 2) {
1057
1057
  const v = f.slice(1, -1);
1058
1058
  return {
1059
1059
  type: "em",
@@ -1169,7 +1169,7 @@ ${l}` : l;
1169
1169
  $(this, "state");
1170
1170
  $(this, "tokenizer");
1171
1171
  $(this, "inlineQueue");
1172
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || Ie, this.options.tokenizer = this.options.tokenizer || new At(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1172
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || Pe, this.options.tokenizer = this.options.tokenizer || new At(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
1173
1173
  inLink: !1,
1174
1174
  inRawBlock: !1,
1175
1175
  top: !0
@@ -1215,71 +1215,71 @@ ${l}` : l;
1215
1215
  return this.inlineQueue = [], this.tokens;
1216
1216
  }
1217
1217
  blockTokens(e, t = [], i = !1) {
1218
- var s, n, o;
1218
+ var s, n, r;
1219
1219
  for (this.options.pedantic && (e = e.replace(se.tabCharGlobal, " ").replace(se.spaceLine, "")); e; ) {
1220
- let r;
1221
- if ((n = (s = this.options.extensions) == null ? void 0 : s.block) != null && n.some((c) => (r = c.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1))
1220
+ let o;
1221
+ if ((n = (s = this.options.extensions) == null ? void 0 : s.block) != null && n.some((c) => (o = c.call({ lexer: this }, e, t)) ? (e = e.substring(o.raw.length), t.push(o), !0) : !1))
1222
1222
  continue;
1223
- if (r = this.tokenizer.space(e)) {
1224
- e = e.substring(r.raw.length);
1223
+ if (o = this.tokenizer.space(e)) {
1224
+ e = e.substring(o.raw.length);
1225
1225
  const c = t.at(-1);
1226
- r.raw.length === 1 && c !== void 0 ? c.raw += `
1227
- ` : t.push(r);
1226
+ o.raw.length === 1 && c !== void 0 ? c.raw += `
1227
+ ` : t.push(o);
1228
1228
  continue;
1229
1229
  }
1230
- if (r = this.tokenizer.code(e)) {
1231
- e = e.substring(r.raw.length);
1230
+ if (o = this.tokenizer.code(e)) {
1231
+ e = e.substring(o.raw.length);
1232
1232
  const c = t.at(-1);
1233
1233
  (c == null ? void 0 : c.type) === "paragraph" || (c == null ? void 0 : c.type) === "text" ? (c.raw += `
1234
- ` + r.raw, c.text += `
1235
- ` + r.text, this.inlineQueue.at(-1).src = c.text) : t.push(r);
1234
+ ` + o.raw, c.text += `
1235
+ ` + o.text, this.inlineQueue.at(-1).src = c.text) : t.push(o);
1236
1236
  continue;
1237
1237
  }
1238
- if (r = this.tokenizer.fences(e)) {
1239
- e = e.substring(r.raw.length), t.push(r);
1238
+ if (o = this.tokenizer.fences(e)) {
1239
+ e = e.substring(o.raw.length), t.push(o);
1240
1240
  continue;
1241
1241
  }
1242
- if (r = this.tokenizer.heading(e)) {
1243
- e = e.substring(r.raw.length), t.push(r);
1242
+ if (o = this.tokenizer.heading(e)) {
1243
+ e = e.substring(o.raw.length), t.push(o);
1244
1244
  continue;
1245
1245
  }
1246
- if (r = this.tokenizer.hr(e)) {
1247
- e = e.substring(r.raw.length), t.push(r);
1246
+ if (o = this.tokenizer.hr(e)) {
1247
+ e = e.substring(o.raw.length), t.push(o);
1248
1248
  continue;
1249
1249
  }
1250
- if (r = this.tokenizer.blockquote(e)) {
1251
- e = e.substring(r.raw.length), t.push(r);
1250
+ if (o = this.tokenizer.blockquote(e)) {
1251
+ e = e.substring(o.raw.length), t.push(o);
1252
1252
  continue;
1253
1253
  }
1254
- if (r = this.tokenizer.list(e)) {
1255
- e = e.substring(r.raw.length), t.push(r);
1254
+ if (o = this.tokenizer.list(e)) {
1255
+ e = e.substring(o.raw.length), t.push(o);
1256
1256
  continue;
1257
1257
  }
1258
- if (r = this.tokenizer.html(e)) {
1259
- e = e.substring(r.raw.length), t.push(r);
1258
+ if (o = this.tokenizer.html(e)) {
1259
+ e = e.substring(o.raw.length), t.push(o);
1260
1260
  continue;
1261
1261
  }
1262
- if (r = this.tokenizer.def(e)) {
1263
- e = e.substring(r.raw.length);
1262
+ if (o = this.tokenizer.def(e)) {
1263
+ e = e.substring(o.raw.length);
1264
1264
  const c = t.at(-1);
1265
1265
  (c == null ? void 0 : c.type) === "paragraph" || (c == null ? void 0 : c.type) === "text" ? (c.raw += `
1266
- ` + r.raw, c.text += `
1267
- ` + r.raw, this.inlineQueue.at(-1).src = c.text) : this.tokens.links[r.tag] || (this.tokens.links[r.tag] = {
1268
- href: r.href,
1269
- title: r.title
1266
+ ` + o.raw, c.text += `
1267
+ ` + o.raw, this.inlineQueue.at(-1).src = c.text) : this.tokens.links[o.tag] || (this.tokens.links[o.tag] = {
1268
+ href: o.href,
1269
+ title: o.title
1270
1270
  });
1271
1271
  continue;
1272
1272
  }
1273
- if (r = this.tokenizer.table(e)) {
1274
- e = e.substring(r.raw.length), t.push(r);
1273
+ if (o = this.tokenizer.table(e)) {
1274
+ e = e.substring(o.raw.length), t.push(o);
1275
1275
  continue;
1276
1276
  }
1277
- if (r = this.tokenizer.lheading(e)) {
1278
- e = e.substring(r.raw.length), t.push(r);
1277
+ if (o = this.tokenizer.lheading(e)) {
1278
+ e = e.substring(o.raw.length), t.push(o);
1279
1279
  continue;
1280
1280
  }
1281
1281
  let h = e;
1282
- if ((o = this.options.extensions) != null && o.startBlock) {
1282
+ if ((r = this.options.extensions) != null && r.startBlock) {
1283
1283
  let c = 1 / 0;
1284
1284
  const l = e.slice(1);
1285
1285
  let d;
@@ -1287,19 +1287,19 @@ ${l}` : l;
1287
1287
  d = f.call({ lexer: this }, l), typeof d == "number" && d >= 0 && (c = Math.min(c, d));
1288
1288
  }), c < 1 / 0 && c >= 0 && (h = e.substring(0, c + 1));
1289
1289
  }
1290
- if (this.state.top && (r = this.tokenizer.paragraph(h))) {
1290
+ if (this.state.top && (o = this.tokenizer.paragraph(h))) {
1291
1291
  const c = t.at(-1);
1292
1292
  i && (c == null ? void 0 : c.type) === "paragraph" ? (c.raw += `
1293
- ` + r.raw, c.text += `
1294
- ` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = c.text) : t.push(r), i = h.length !== e.length, e = e.substring(r.raw.length);
1293
+ ` + o.raw, c.text += `
1294
+ ` + o.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = c.text) : t.push(o), i = h.length !== e.length, e = e.substring(o.raw.length);
1295
1295
  continue;
1296
1296
  }
1297
- if (r = this.tokenizer.text(e)) {
1298
- e = e.substring(r.raw.length);
1297
+ if (o = this.tokenizer.text(e)) {
1298
+ e = e.substring(o.raw.length);
1299
1299
  const c = t.at(-1);
1300
1300
  (c == null ? void 0 : c.type) === "text" ? (c.raw += `
1301
- ` + r.raw, c.text += `
1302
- ` + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = c.text) : t.push(r);
1301
+ ` + o.raw, c.text += `
1302
+ ` + o.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = c.text) : t.push(o);
1303
1303
  continue;
1304
1304
  }
1305
1305
  if (e) {
@@ -1320,7 +1320,7 @@ ${l}` : l;
1320
1320
  * Lexing/Compiling
1321
1321
  */
1322
1322
  inlineTokens(e, t = []) {
1323
- var r, h, c;
1323
+ var o, h, c;
1324
1324
  let i = e, s = null;
1325
1325
  if (this.tokens.links) {
1326
1326
  const l = Object.keys(this.tokens.links);
@@ -1332,11 +1332,11 @@ ${l}` : l;
1332
1332
  i = i.slice(0, s.index) + "++" + i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
1333
1333
  for (; (s = this.tokenizer.rules.inline.blockSkip.exec(i)) != null; )
1334
1334
  i = i.slice(0, s.index) + "[" + "a".repeat(s[0].length - 2) + "]" + i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
1335
- let n = !1, o = "";
1335
+ let n = !1, r = "";
1336
1336
  for (; e; ) {
1337
- n || (o = ""), n = !1;
1337
+ n || (r = ""), n = !1;
1338
1338
  let l;
1339
- if ((h = (r = this.options.extensions) == null ? void 0 : r.inline) != null && h.some((f) => (l = f.call({ lexer: this }, e, t)) ? (e = e.substring(l.raw.length), t.push(l), !0) : !1))
1339
+ if ((h = (o = this.options.extensions) == null ? void 0 : o.inline) != null && h.some((f) => (l = f.call({ lexer: this }, e, t)) ? (e = e.substring(l.raw.length), t.push(l), !0) : !1))
1340
1340
  continue;
1341
1341
  if (l = this.tokenizer.escape(e)) {
1342
1342
  e = e.substring(l.raw.length), t.push(l);
@@ -1356,7 +1356,7 @@ ${l}` : l;
1356
1356
  l.type === "text" && (f == null ? void 0 : f.type) === "text" ? (f.raw += l.raw, f.text += l.text) : t.push(l);
1357
1357
  continue;
1358
1358
  }
1359
- if (l = this.tokenizer.emStrong(e, i, o)) {
1359
+ if (l = this.tokenizer.emStrong(e, i, r)) {
1360
1360
  e = e.substring(l.raw.length), t.push(l);
1361
1361
  continue;
1362
1362
  }
@@ -1385,12 +1385,12 @@ ${l}` : l;
1385
1385
  let f = 1 / 0;
1386
1386
  const y = e.slice(1);
1387
1387
  let v;
1388
- this.options.extensions.startInline.forEach((w) => {
1389
- v = w.call({ lexer: this }, y), typeof v == "number" && v >= 0 && (f = Math.min(f, v));
1388
+ this.options.extensions.startInline.forEach((b) => {
1389
+ v = b.call({ lexer: this }, y), typeof v == "number" && v >= 0 && (f = Math.min(f, v));
1390
1390
  }), f < 1 / 0 && f >= 0 && (d = e.substring(0, f + 1));
1391
1391
  }
1392
1392
  if (l = this.tokenizer.inlineText(d)) {
1393
- e = e.substring(l.raw.length), l.raw.slice(-1) !== "_" && (o = l.raw.slice(-1)), n = !0;
1393
+ e = e.substring(l.raw.length), l.raw.slice(-1) !== "_" && (r = l.raw.slice(-1)), n = !0;
1394
1394
  const f = t.at(-1);
1395
1395
  (f == null ? void 0 : f.type) === "text" ? (f.raw += l.raw, f.text += l.text) : t.push(l);
1396
1396
  continue;
@@ -1411,7 +1411,7 @@ ${l}` : l;
1411
1411
  constructor(a) {
1412
1412
  $(this, "options");
1413
1413
  $(this, "parser");
1414
- this.options = a || Ie;
1414
+ this.options = a || Pe;
1415
1415
  }
1416
1416
  space(a) {
1417
1417
  return "";
@@ -1443,9 +1443,9 @@ ${this.parser.parse(a)}</blockquote>
1443
1443
  list(a) {
1444
1444
  const e = a.ordered, t = a.start;
1445
1445
  let i = "";
1446
- for (let o = 0; o < a.items.length; o++) {
1447
- const r = a.items[o];
1448
- i += this.listitem(r);
1446
+ for (let r = 0; r < a.items.length; r++) {
1447
+ const o = a.items[r];
1448
+ i += this.listitem(o);
1449
1449
  }
1450
1450
  const s = e ? "ol" : "ul", n = e && t !== 1 ? ' start="' + t + '"' : "";
1451
1451
  return "<" + s + n + `>
@@ -1483,8 +1483,8 @@ ${this.parser.parse(a)}</blockquote>
1483
1483
  for (let s = 0; s < a.rows.length; s++) {
1484
1484
  const n = a.rows[s];
1485
1485
  t = "";
1486
- for (let o = 0; o < n.length; o++)
1487
- t += this.tablecell(n[o]);
1486
+ for (let r = 0; r < n.length; r++)
1487
+ t += this.tablecell(n[r]);
1488
1488
  i += this.tablerow({ text: t });
1489
1489
  }
1490
1490
  return i && (i = `<tbody>${i}</tbody>`), `<table>
@@ -1575,7 +1575,7 @@ ${a}</tr>
1575
1575
  $(this, "options");
1576
1576
  $(this, "renderer");
1577
1577
  $(this, "textRenderer");
1578
- this.options = e || Ie, this.options.renderer = this.options.renderer || new St(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new wi();
1578
+ this.options = e || Pe, this.options.renderer = this.options.renderer || new St(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new wi();
1579
1579
  }
1580
1580
  /**
1581
1581
  * Static Parse Method
@@ -1595,16 +1595,16 @@ ${a}</tr>
1595
1595
  parse(e, t = !0) {
1596
1596
  var s, n;
1597
1597
  let i = "";
1598
- for (let o = 0; o < e.length; o++) {
1599
- const r = e[o];
1600
- if ((n = (s = this.options.extensions) == null ? void 0 : s.renderers) != null && n[r.type]) {
1601
- const c = r, l = this.options.extensions.renderers[c.type].call({ parser: this }, c);
1598
+ for (let r = 0; r < e.length; r++) {
1599
+ const o = e[r];
1600
+ if ((n = (s = this.options.extensions) == null ? void 0 : s.renderers) != null && n[o.type]) {
1601
+ const c = o, l = this.options.extensions.renderers[c.type].call({ parser: this }, c);
1602
1602
  if (l !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(c.type)) {
1603
1603
  i += l || "";
1604
1604
  continue;
1605
1605
  }
1606
1606
  }
1607
- const h = r;
1607
+ const h = o;
1608
1608
  switch (h.type) {
1609
1609
  case "space": {
1610
1610
  i += this.renderer.space(h);
@@ -1644,8 +1644,8 @@ ${a}</tr>
1644
1644
  }
1645
1645
  case "text": {
1646
1646
  let c = h, l = this.renderer.text(c);
1647
- for (; o + 1 < e.length && e[o + 1].type === "text"; )
1648
- c = e[++o], l += `
1647
+ for (; r + 1 < e.length && e[r + 1].type === "text"; )
1648
+ c = e[++r], l += `
1649
1649
  ` + this.renderer.text(c);
1650
1650
  t ? i += this.renderer.paragraph({
1651
1651
  type: "paragraph",
@@ -1671,16 +1671,16 @@ ${a}</tr>
1671
1671
  parseInline(e, t = this.renderer) {
1672
1672
  var s, n;
1673
1673
  let i = "";
1674
- for (let o = 0; o < e.length; o++) {
1675
- const r = e[o];
1676
- if ((n = (s = this.options.extensions) == null ? void 0 : s.renderers) != null && n[r.type]) {
1677
- const c = this.options.extensions.renderers[r.type].call({ parser: this }, r);
1678
- if (c !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(r.type)) {
1674
+ for (let r = 0; r < e.length; r++) {
1675
+ const o = e[r];
1676
+ if ((n = (s = this.options.extensions) == null ? void 0 : s.renderers) != null && n[o.type]) {
1677
+ const c = this.options.extensions.renderers[o.type].call({ parser: this }, o);
1678
+ if (c !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(o.type)) {
1679
1679
  i += c || "";
1680
1680
  continue;
1681
1681
  }
1682
1682
  }
1683
- const h = r;
1683
+ const h = o;
1684
1684
  switch (h.type) {
1685
1685
  case "escape": {
1686
1686
  i += t.text(h);
@@ -1736,7 +1736,7 @@ ${a}</tr>
1736
1736
  constructor(a) {
1737
1737
  $(this, "options");
1738
1738
  $(this, "block");
1739
- this.options = a || Ie;
1739
+ this.options = a || Pe;
1740
1740
  }
1741
1741
  /**
1742
1742
  * Process markdown before marked
@@ -1795,25 +1795,25 @@ ${a}</tr>
1795
1795
  for (const n of a)
1796
1796
  switch (t = t.concat(e.call(this, n)), n.type) {
1797
1797
  case "table": {
1798
- const o = n;
1799
- for (const r of o.header)
1800
- t = t.concat(this.walkTokens(r.tokens, e));
1801
- for (const r of o.rows)
1802
- for (const h of r)
1798
+ const r = n;
1799
+ for (const o of r.header)
1800
+ t = t.concat(this.walkTokens(o.tokens, e));
1801
+ for (const o of r.rows)
1802
+ for (const h of o)
1803
1803
  t = t.concat(this.walkTokens(h.tokens, e));
1804
1804
  break;
1805
1805
  }
1806
1806
  case "list": {
1807
- const o = n;
1808
- t = t.concat(this.walkTokens(o.items, e));
1807
+ const r = n;
1808
+ t = t.concat(this.walkTokens(r.items, e));
1809
1809
  break;
1810
1810
  }
1811
1811
  default: {
1812
- const o = n;
1813
- (s = (i = this.defaults.extensions) == null ? void 0 : i.childTokens) != null && s[o.type] ? this.defaults.extensions.childTokens[o.type].forEach((r) => {
1814
- const h = o[r].flat(1 / 0);
1812
+ const r = n;
1813
+ (s = (i = this.defaults.extensions) == null ? void 0 : i.childTokens) != null && s[r.type] ? this.defaults.extensions.childTokens[r.type].forEach((o) => {
1814
+ const h = r[o].flat(1 / 0);
1815
1815
  t = t.concat(this.walkTokens(h, e));
1816
- }) : o.tokens && (t = t.concat(this.walkTokens(o.tokens, e)));
1816
+ }) : r.tokens && (t = t.concat(this.walkTokens(r.tokens, e)));
1817
1817
  }
1818
1818
  }
1819
1819
  return t;
@@ -1827,9 +1827,9 @@ ${a}</tr>
1827
1827
  throw new Error("extension name required");
1828
1828
  if ("renderer" in s) {
1829
1829
  const n = e.renderers[s.name];
1830
- n ? e.renderers[s.name] = function(...o) {
1831
- let r = s.renderer.apply(this, o);
1832
- return r === !1 && (r = n.apply(this, o)), r;
1830
+ n ? e.renderers[s.name] = function(...r) {
1831
+ let o = s.renderer.apply(this, r);
1832
+ return o === !1 && (o = n.apply(this, r)), o;
1833
1833
  } : e.renderers[s.name] = s.renderer;
1834
1834
  }
1835
1835
  if ("tokenizer" in s) {
@@ -1846,9 +1846,9 @@ ${a}</tr>
1846
1846
  throw new Error(`renderer '${n}' does not exist`);
1847
1847
  if (["options", "parser"].includes(n))
1848
1848
  continue;
1849
- const o = n, r = t.renderer[o], h = s[o];
1850
- s[o] = (...c) => {
1851
- let l = r.apply(s, c);
1849
+ const r = n, o = t.renderer[r], h = s[r];
1850
+ s[r] = (...c) => {
1851
+ let l = o.apply(s, c);
1852
1852
  return l === !1 && (l = h.apply(s, c)), l || "";
1853
1853
  };
1854
1854
  }
@@ -1861,9 +1861,9 @@ ${a}</tr>
1861
1861
  throw new Error(`tokenizer '${n}' does not exist`);
1862
1862
  if (["options", "rules", "lexer"].includes(n))
1863
1863
  continue;
1864
- const o = n, r = t.tokenizer[o], h = s[o];
1865
- s[o] = (...c) => {
1866
- let l = r.apply(s, c);
1864
+ const r = n, o = t.tokenizer[r], h = s[r];
1865
+ s[r] = (...c) => {
1866
+ let l = o.apply(s, c);
1867
1867
  return l === !1 && (l = h.apply(s, c)), l;
1868
1868
  };
1869
1869
  }
@@ -1876,14 +1876,14 @@ ${a}</tr>
1876
1876
  throw new Error(`hook '${n}' does not exist`);
1877
1877
  if (["options", "block"].includes(n))
1878
1878
  continue;
1879
- const o = n, r = t.hooks[o], h = s[o];
1880
- kt.passThroughHooks.has(n) ? s[o] = (c) => {
1879
+ const r = n, o = t.hooks[r], h = s[r];
1880
+ kt.passThroughHooks.has(n) ? s[r] = (c) => {
1881
1881
  if (this.defaults.async)
1882
- return Promise.resolve(r.call(s, c)).then((d) => h.call(s, d));
1883
- const l = r.call(s, c);
1882
+ return Promise.resolve(o.call(s, c)).then((d) => h.call(s, d));
1883
+ const l = o.call(s, c);
1884
1884
  return h.call(s, l);
1885
- } : s[o] = (...c) => {
1886
- let l = r.apply(s, c);
1885
+ } : s[r] = (...c) => {
1886
+ let l = o.apply(s, c);
1887
1887
  return l === !1 && (l = h.apply(s, c)), l;
1888
1888
  };
1889
1889
  }
@@ -1891,9 +1891,9 @@ ${a}</tr>
1891
1891
  }
1892
1892
  if (t.walkTokens) {
1893
1893
  const s = this.defaults.walkTokens, n = t.walkTokens;
1894
- i.walkTokens = function(o) {
1895
- let r = [];
1896
- return r.push(n.call(this, o)), s && (r = r.concat(s.call(this, o))), r;
1894
+ i.walkTokens = function(r) {
1895
+ let o = [];
1896
+ return o.push(n.call(this, r)), s && (o = o.concat(s.call(this, r))), o;
1897
1897
  };
1898
1898
  }
1899
1899
  this.defaults = { ...this.defaults, ...i };
@@ -1910,25 +1910,25 @@ ${a}</tr>
1910
1910
  }
1911
1911
  parseMarkdown(a) {
1912
1912
  return (t, i) => {
1913
- const s = { ...i }, n = { ...this.defaults, ...s }, o = this.onError(!!n.silent, !!n.async);
1913
+ const s = { ...i }, n = { ...this.defaults, ...s }, r = this.onError(!!n.silent, !!n.async);
1914
1914
  if (this.defaults.async === !0 && s.async === !1)
1915
- return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
1915
+ return r(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
1916
1916
  if (typeof t > "u" || t === null)
1917
- return o(new Error("marked(): input parameter is undefined or null"));
1917
+ return r(new Error("marked(): input parameter is undefined or null"));
1918
1918
  if (typeof t != "string")
1919
- return o(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
1919
+ return r(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
1920
1920
  n.hooks && (n.hooks.options = n, n.hooks.block = a);
1921
- const r = n.hooks ? n.hooks.provideLexer() : a ? Ce.lex : Ce.lexInline, h = n.hooks ? n.hooks.provideParser() : a ? Ae.parse : Ae.parseInline;
1921
+ const o = n.hooks ? n.hooks.provideLexer() : a ? Ce.lex : Ce.lexInline, h = n.hooks ? n.hooks.provideParser() : a ? Ae.parse : Ae.parseInline;
1922
1922
  if (n.async)
1923
- return Promise.resolve(n.hooks ? n.hooks.preprocess(t) : t).then((c) => r(c, n)).then((c) => n.hooks ? n.hooks.processAllTokens(c) : c).then((c) => n.walkTokens ? Promise.all(this.walkTokens(c, n.walkTokens)).then(() => c) : c).then((c) => h(c, n)).then((c) => n.hooks ? n.hooks.postprocess(c) : c).catch(o);
1923
+ return Promise.resolve(n.hooks ? n.hooks.preprocess(t) : t).then((c) => o(c, n)).then((c) => n.hooks ? n.hooks.processAllTokens(c) : c).then((c) => n.walkTokens ? Promise.all(this.walkTokens(c, n.walkTokens)).then(() => c) : c).then((c) => h(c, n)).then((c) => n.hooks ? n.hooks.postprocess(c) : c).catch(r);
1924
1924
  try {
1925
1925
  n.hooks && (t = n.hooks.preprocess(t));
1926
- let c = r(t, n);
1926
+ let c = o(t, n);
1927
1927
  n.hooks && (c = n.hooks.processAllTokens(c)), n.walkTokens && this.walkTokens(c, n.walkTokens);
1928
1928
  let l = h(c, n);
1929
1929
  return n.hooks && (l = n.hooks.postprocess(l)), l;
1930
1930
  } catch (c) {
1931
- return o(c);
1931
+ return r(c);
1932
1932
  }
1933
1933
  };
1934
1934
  }
@@ -1945,35 +1945,35 @@ Please report this to https://github.com/markedjs/marked.`, a) {
1945
1945
  };
1946
1946
  }
1947
1947
  }, He = new ir();
1948
- function H(a, e) {
1948
+ function P(a, e) {
1949
1949
  return He.parse(a, e);
1950
1950
  }
1951
- H.options = H.setOptions = function(a) {
1952
- return He.setOptions(a), H.defaults = He.defaults, _s(H.defaults), H;
1951
+ P.options = P.setOptions = function(a) {
1952
+ return He.setOptions(a), P.defaults = He.defaults, _s(P.defaults), P;
1953
1953
  };
1954
- H.getDefaults = fi;
1955
- H.defaults = Ie;
1956
- H.use = function(...a) {
1957
- return He.use(...a), H.defaults = He.defaults, _s(H.defaults), H;
1954
+ P.getDefaults = fi;
1955
+ P.defaults = Pe;
1956
+ P.use = function(...a) {
1957
+ return He.use(...a), P.defaults = He.defaults, _s(P.defaults), P;
1958
1958
  };
1959
- H.walkTokens = function(a, e) {
1959
+ P.walkTokens = function(a, e) {
1960
1960
  return He.walkTokens(a, e);
1961
1961
  };
1962
- H.parseInline = He.parseInline;
1963
- H.Parser = Ae;
1964
- H.parser = Ae.parse;
1965
- H.Renderer = St;
1966
- H.TextRenderer = wi;
1967
- H.Lexer = Ce;
1968
- H.lexer = Ce.lex;
1969
- H.Tokenizer = At;
1970
- H.Hooks = kt;
1971
- H.parse = H;
1972
- H.options;
1973
- H.setOptions;
1974
- H.use;
1975
- H.walkTokens;
1976
- H.parseInline;
1962
+ P.parseInline = He.parseInline;
1963
+ P.Parser = Ae;
1964
+ P.parser = Ae.parse;
1965
+ P.Renderer = St;
1966
+ P.TextRenderer = wi;
1967
+ P.Lexer = Ce;
1968
+ P.lexer = Ce.lex;
1969
+ P.Tokenizer = At;
1970
+ P.Hooks = kt;
1971
+ P.parse = P;
1972
+ P.options;
1973
+ P.setOptions;
1974
+ P.use;
1975
+ P.walkTokens;
1976
+ P.parseInline;
1977
1977
  Ae.parse;
1978
1978
  Ce.lex;
1979
1979
  /*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */
@@ -2103,11 +2103,11 @@ const nt = {
2103
2103
  const n = "dompurify" + (i ? "#" + i : "");
2104
2104
  try {
2105
2105
  return e.createPolicy(n, {
2106
- createHTML(o) {
2107
- return o;
2106
+ createHTML(r) {
2107
+ return r;
2108
2108
  },
2109
- createScriptURL(o) {
2110
- return o;
2109
+ createScriptURL(r) {
2110
+ return r;
2111
2111
  }
2112
2112
  });
2113
2113
  } catch {
@@ -2136,20 +2136,20 @@ function Ls() {
2136
2136
  } = a;
2137
2137
  const i = t, s = i.currentScript, {
2138
2138
  DocumentFragment: n,
2139
- HTMLTemplateElement: o,
2140
- Node: r,
2139
+ HTMLTemplateElement: r,
2140
+ Node: o,
2141
2141
  Element: h,
2142
2142
  NodeFilter: c,
2143
2143
  NamedNodeMap: l = a.NamedNodeMap || a.MozNamedAttrMap,
2144
2144
  HTMLFormElement: d,
2145
2145
  DOMParser: f,
2146
2146
  trustedTypes: y
2147
- } = a, v = h.prototype, w = st(v, "cloneNode"), B = st(v, "remove"), T = st(v, "nextSibling"), A = st(v, "childNodes"), S = st(v, "parentNode");
2148
- if (typeof o == "function") {
2147
+ } = a, v = h.prototype, b = st(v, "cloneNode"), O = st(v, "remove"), E = st(v, "nextSibling"), A = st(v, "childNodes"), S = st(v, "parentNode");
2148
+ if (typeof r == "function") {
2149
2149
  const k = t.createElement("template");
2150
2150
  k.content && k.content.ownerDocument && (t = k.content.ownerDocument);
2151
2151
  }
2152
- let E, M = "";
2152
+ let T, H = "";
2153
2153
  const {
2154
2154
  implementation: oe,
2155
2155
  createNodeIterator: me,
@@ -2163,7 +2163,7 @@ function Ls() {
2163
2163
  const {
2164
2164
  MUSTACHE_EXPR: le,
2165
2165
  ERB_EXPR: Se,
2166
- TMPLIT_EXPR: O,
2166
+ TMPLIT_EXPR: M,
2167
2167
  DATA_ATTR: je,
2168
2168
  ARIA_ATTR: ht,
2169
2169
  IS_SCRIPT_OR_DATA: ut,
@@ -2195,8 +2195,8 @@ function Ls() {
2195
2195
  enumerable: !0,
2196
2196
  value: !1
2197
2197
  }
2198
- })), Xe = null, Pt = null;
2199
- const Pe = Object.seal(ci(null, {
2198
+ })), Xe = null, It = null;
2199
+ const Ie = Object.seal(ci(null, {
2200
2200
  tagCheck: {
2201
2201
  writable: !0,
2202
2202
  configurable: !1,
@@ -2223,32 +2223,32 @@ function Ls() {
2223
2223
  let vt = L({}, ["mi", "mo", "mn", "ms", "mtext"]), yt = L({}, ["annotation-xml"]);
2224
2224
  const Ms = L({}, ["title", "style", "font", "a", "script"]);
2225
2225
  let Ze = null;
2226
- const Hs = ["application/xhtml+xml", "text/html"], Is = "text/html";
2226
+ const Hs = ["application/xhtml+xml", "text/html"], Ps = "text/html";
2227
2227
  let j = null, We = null;
2228
- const Ps = t.createElement("form"), Mi = function(u) {
2228
+ const Is = t.createElement("form"), Mi = function(u) {
2229
2229
  return u instanceof RegExp || u instanceof Function;
2230
2230
  }, jt = function() {
2231
2231
  let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2232
2232
  if (!(We && We === u)) {
2233
2233
  if ((!u || typeof u != "object") && (u = {}), u = xe(u), Ze = // eslint-disable-next-line unicorn/prefer-includes
2234
- Hs.indexOf(u.PARSER_MEDIA_TYPE) === -1 ? Is : u.PARSER_MEDIA_TYPE, j = Ze === "application/xhtml+xml" ? Kt : Et, X = _e(u, "ALLOWED_TAGS") ? L({}, u.ALLOWED_TAGS, j) : Ti, K = _e(u, "ALLOWED_ATTR") ? L({}, u.ALLOWED_ATTR, j) : Ri, qt = _e(u, "ALLOWED_NAMESPACES") ? L({}, u.ALLOWED_NAMESPACES, Kt) : Os, Gt = _e(u, "ADD_URI_SAFE_ATTR") ? L(xe(Oi), u.ADD_URI_SAFE_ATTR, j) : Oi, Ni = _e(u, "ADD_DATA_URI_TAGS") ? L(xe(zi), u.ADD_DATA_URI_TAGS, j) : zi, ye = _e(u, "FORBID_CONTENTS") ? L({}, u.FORBID_CONTENTS, j) : Wt, Xe = _e(u, "FORBID_TAGS") ? L({}, u.FORBID_TAGS, j) : xe({}), Pt = _e(u, "FORBID_ATTR") ? L({}, u.FORBID_ATTR, j) : xe({}), Fe = _e(u, "USE_PROFILES") ? u.USE_PROFILES : !1, Ci = u.ALLOW_ARIA_ATTR !== !1, Bt = u.ALLOW_DATA_ATTR !== !1, Ai = u.ALLOW_UNKNOWN_PROTOCOLS || !1, Si = u.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Be = u.SAFE_FOR_TEMPLATES || !1, ft = u.SAFE_FOR_XML !== !1, Ne = u.WHOLE_DOCUMENT || !1, $e = u.RETURN_DOM || !1, pt = u.RETURN_DOM_FRAGMENT || !1, gt = u.RETURN_TRUSTED_TYPE || !1, Ft = u.FORCE_BODY || !1, Di = u.SANITIZE_DOM !== !1, Li = u.SANITIZE_NAMED_PROPS || !1, Ut = u.KEEP_CONTENT !== !1, Ke = u.IN_PLACE || !1, Ei = u.ALLOWED_URI_REGEXP || Ss, Ue = u.NAMESPACE || ke, vt = u.MATHML_TEXT_INTEGRATION_POINTS || vt, yt = u.HTML_INTEGRATION_POINTS || yt, G = u.CUSTOM_ELEMENT_HANDLING || {}, u.CUSTOM_ELEMENT_HANDLING && Mi(u.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (G.tagNameCheck = u.CUSTOM_ELEMENT_HANDLING.tagNameCheck), u.CUSTOM_ELEMENT_HANDLING && Mi(u.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (G.attributeNameCheck = u.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), u.CUSTOM_ELEMENT_HANDLING && typeof u.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (G.allowCustomizedBuiltInElements = u.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Be && (Bt = !1), pt && ($e = !0), Fe && (X = L({}, ss), K = [], Fe.html === !0 && (L(X, is), L(K, ns)), Fe.svg === !0 && (L(X, Qt), L(K, ti), L(K, xt)), Fe.svgFilters === !0 && (L(X, Jt), L(K, ti), L(K, xt)), Fe.mathMl === !0 && (L(X, ei), L(K, rs), L(K, xt))), u.ADD_TAGS && (typeof u.ADD_TAGS == "function" ? Pe.tagCheck = u.ADD_TAGS : (X === Ti && (X = xe(X)), L(X, u.ADD_TAGS, j))), u.ADD_ATTR && (typeof u.ADD_ATTR == "function" ? Pe.attributeCheck = u.ADD_ATTR : (K === Ri && (K = xe(K)), L(K, u.ADD_ATTR, j))), u.ADD_URI_SAFE_ATTR && L(Gt, u.ADD_URI_SAFE_ATTR, j), u.FORBID_CONTENTS && (ye === Wt && (ye = xe(ye)), L(ye, u.FORBID_CONTENTS, j)), u.ADD_FORBID_CONTENTS && (ye === Wt && (ye = xe(ye)), L(ye, u.ADD_FORBID_CONTENTS, j)), Ut && (X["#text"] = !0), Ne && L(X, ["html", "head", "body"]), X.table && (L(X, ["tbody"]), delete Xe.tbody), u.TRUSTED_TYPES_POLICY) {
2234
+ Hs.indexOf(u.PARSER_MEDIA_TYPE) === -1 ? Ps : u.PARSER_MEDIA_TYPE, j = Ze === "application/xhtml+xml" ? Kt : Et, X = _e(u, "ALLOWED_TAGS") ? L({}, u.ALLOWED_TAGS, j) : Ti, K = _e(u, "ALLOWED_ATTR") ? L({}, u.ALLOWED_ATTR, j) : Ri, qt = _e(u, "ALLOWED_NAMESPACES") ? L({}, u.ALLOWED_NAMESPACES, Kt) : Os, Gt = _e(u, "ADD_URI_SAFE_ATTR") ? L(xe(Oi), u.ADD_URI_SAFE_ATTR, j) : Oi, Ni = _e(u, "ADD_DATA_URI_TAGS") ? L(xe(zi), u.ADD_DATA_URI_TAGS, j) : zi, ye = _e(u, "FORBID_CONTENTS") ? L({}, u.FORBID_CONTENTS, j) : Wt, Xe = _e(u, "FORBID_TAGS") ? L({}, u.FORBID_TAGS, j) : xe({}), It = _e(u, "FORBID_ATTR") ? L({}, u.FORBID_ATTR, j) : xe({}), Fe = _e(u, "USE_PROFILES") ? u.USE_PROFILES : !1, Ci = u.ALLOW_ARIA_ATTR !== !1, Bt = u.ALLOW_DATA_ATTR !== !1, Ai = u.ALLOW_UNKNOWN_PROTOCOLS || !1, Si = u.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Be = u.SAFE_FOR_TEMPLATES || !1, ft = u.SAFE_FOR_XML !== !1, Ne = u.WHOLE_DOCUMENT || !1, $e = u.RETURN_DOM || !1, pt = u.RETURN_DOM_FRAGMENT || !1, gt = u.RETURN_TRUSTED_TYPE || !1, Ft = u.FORCE_BODY || !1, Di = u.SANITIZE_DOM !== !1, Li = u.SANITIZE_NAMED_PROPS || !1, Ut = u.KEEP_CONTENT !== !1, Ke = u.IN_PLACE || !1, Ei = u.ALLOWED_URI_REGEXP || Ss, Ue = u.NAMESPACE || ke, vt = u.MATHML_TEXT_INTEGRATION_POINTS || vt, yt = u.HTML_INTEGRATION_POINTS || yt, G = u.CUSTOM_ELEMENT_HANDLING || {}, u.CUSTOM_ELEMENT_HANDLING && Mi(u.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (G.tagNameCheck = u.CUSTOM_ELEMENT_HANDLING.tagNameCheck), u.CUSTOM_ELEMENT_HANDLING && Mi(u.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (G.attributeNameCheck = u.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), u.CUSTOM_ELEMENT_HANDLING && typeof u.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (G.allowCustomizedBuiltInElements = u.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Be && (Bt = !1), pt && ($e = !0), Fe && (X = L({}, ss), K = [], Fe.html === !0 && (L(X, is), L(K, ns)), Fe.svg === !0 && (L(X, Qt), L(K, ti), L(K, xt)), Fe.svgFilters === !0 && (L(X, Jt), L(K, ti), L(K, xt)), Fe.mathMl === !0 && (L(X, ei), L(K, rs), L(K, xt))), u.ADD_TAGS && (typeof u.ADD_TAGS == "function" ? Ie.tagCheck = u.ADD_TAGS : (X === Ti && (X = xe(X)), L(X, u.ADD_TAGS, j))), u.ADD_ATTR && (typeof u.ADD_ATTR == "function" ? Ie.attributeCheck = u.ADD_ATTR : (K === Ri && (K = xe(K)), L(K, u.ADD_ATTR, j))), u.ADD_URI_SAFE_ATTR && L(Gt, u.ADD_URI_SAFE_ATTR, j), u.FORBID_CONTENTS && (ye === Wt && (ye = xe(ye)), L(ye, u.FORBID_CONTENTS, j)), u.ADD_FORBID_CONTENTS && (ye === Wt && (ye = xe(ye)), L(ye, u.ADD_FORBID_CONTENTS, j)), Ut && (X["#text"] = !0), Ne && L(X, ["html", "head", "body"]), X.table && (L(X, ["tbody"]), delete Xe.tbody), u.TRUSTED_TYPES_POLICY) {
2235
2235
  if (typeof u.TRUSTED_TYPES_POLICY.createHTML != "function")
2236
2236
  throw it('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
2237
2237
  if (typeof u.TRUSTED_TYPES_POLICY.createScriptURL != "function")
2238
2238
  throw it('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
2239
- E = u.TRUSTED_TYPES_POLICY, M = E.createHTML("");
2239
+ T = u.TRUSTED_TYPES_POLICY, H = T.createHTML("");
2240
2240
  } else
2241
- E === void 0 && (E = kr(y, s)), E !== null && typeof M == "string" && (M = E.createHTML(""));
2241
+ T === void 0 && (T = kr(y, s)), T !== null && typeof H == "string" && (H = T.createHTML(""));
2242
2242
  ne && ne(u), We = u;
2243
2243
  }
2244
- }, Hi = L({}, [...Qt, ...Jt, ...dr]), Ii = L({}, [...ei, ...fr]), Bs = function(u) {
2244
+ }, Hi = L({}, [...Qt, ...Jt, ...dr]), Pi = L({}, [...ei, ...fr]), Bs = function(u) {
2245
2245
  let _ = S(u);
2246
2246
  (!_ || !_.tagName) && (_ = {
2247
2247
  namespaceURI: Ue,
2248
2248
  tagName: "template"
2249
2249
  });
2250
- const b = Et(u.tagName), U = Et(_.tagName);
2251
- return qt[u.namespaceURI] ? u.namespaceURI === _t ? _.namespaceURI === ke ? b === "svg" : _.namespaceURI === mt ? b === "svg" && (U === "annotation-xml" || vt[U]) : !!Hi[b] : u.namespaceURI === mt ? _.namespaceURI === ke ? b === "math" : _.namespaceURI === _t ? b === "math" && yt[U] : !!Ii[b] : u.namespaceURI === ke ? _.namespaceURI === _t && !yt[U] || _.namespaceURI === mt && !vt[U] ? !1 : !Ii[b] && (Ms[b] || !Hi[b]) : !!(Ze === "application/xhtml+xml" && qt[u.namespaceURI]) : !1;
2250
+ const w = Et(u.tagName), U = Et(_.tagName);
2251
+ return qt[u.namespaceURI] ? u.namespaceURI === _t ? _.namespaceURI === ke ? w === "svg" : _.namespaceURI === mt ? w === "svg" && (U === "annotation-xml" || vt[U]) : !!Hi[w] : u.namespaceURI === mt ? _.namespaceURI === ke ? w === "math" : _.namespaceURI === _t ? w === "math" && yt[U] : !!Pi[w] : u.namespaceURI === ke ? _.namespaceURI === _t && !yt[U] || _.namespaceURI === mt && !vt[U] ? !1 : !Pi[w] && (Ms[w] || !Hi[w]) : !!(Ze === "application/xhtml+xml" && qt[u.namespaceURI]) : !1;
2252
2252
  }, be = function(u) {
2253
2253
  et(e.removed, {
2254
2254
  element: u
@@ -2256,7 +2256,7 @@ function Ls() {
2256
2256
  try {
2257
2257
  S(u).removeChild(u);
2258
2258
  } catch {
2259
- B(u);
2259
+ O(u);
2260
2260
  }
2261
2261
  }, ze = function(u, _) {
2262
2262
  try {
@@ -2281,16 +2281,16 @@ function Ls() {
2281
2281
  _.setAttribute(u, "");
2282
2282
  } catch {
2283
2283
  }
2284
- }, Pi = function(u) {
2285
- let _ = null, b = null;
2284
+ }, Ii = function(u) {
2285
+ let _ = null, w = null;
2286
2286
  if (Ft)
2287
2287
  u = "<remove></remove>" + u;
2288
2288
  else {
2289
2289
  const q = Zt(u, /^[\r\n\t ]+/);
2290
- b = q && q[0];
2290
+ w = q && q[0];
2291
2291
  }
2292
2292
  Ze === "application/xhtml+xml" && Ue === ke && (u = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + u + "</body></html>");
2293
- const U = E ? E.createHTML(u) : u;
2293
+ const U = T ? T.createHTML(u) : u;
2294
2294
  if (Ue === ke)
2295
2295
  try {
2296
2296
  _ = new f().parseFromString(U, Ze);
@@ -2299,12 +2299,12 @@ function Ls() {
2299
2299
  if (!_ || !_.documentElement) {
2300
2300
  _ = oe.createDocument(Ue, "template", null);
2301
2301
  try {
2302
- _.documentElement.innerHTML = Vt ? M : U;
2302
+ _.documentElement.innerHTML = Vt ? H : U;
2303
2303
  } catch {
2304
2304
  }
2305
2305
  }
2306
2306
  const J = _.body || _.documentElement;
2307
- return u && b && J.insertBefore(t.createTextNode(b), J.childNodes[0] || null), Ue === ke ? m.call(_, Ne ? "html" : "body")[0] : Ne ? _.documentElement : J;
2307
+ return u && w && J.insertBefore(t.createTextNode(w), J.childNodes[0] || null), Ue === ke ? m.call(_, Ne ? "html" : "body")[0] : Ne ? _.documentElement : J;
2308
2308
  }, Bi = function(u) {
2309
2309
  return me.call(
2310
2310
  u.ownerDocument || u,
@@ -2316,63 +2316,63 @@ function Ls() {
2316
2316
  }, Yt = function(u) {
2317
2317
  return u instanceof d && (typeof u.nodeName != "string" || typeof u.textContent != "string" || typeof u.removeChild != "function" || !(u.attributes instanceof l) || typeof u.removeAttribute != "function" || typeof u.setAttribute != "function" || typeof u.namespaceURI != "string" || typeof u.insertBefore != "function" || typeof u.hasChildNodes != "function");
2318
2318
  }, $i = function(u) {
2319
- return typeof r == "function" && u instanceof r;
2319
+ return typeof o == "function" && u instanceof o;
2320
2320
  };
2321
2321
  function Ee(k, u, _) {
2322
- wt(k, (b) => {
2323
- b.call(e, u, _, We);
2322
+ wt(k, (w) => {
2323
+ w.call(e, u, _, We);
2324
2324
  });
2325
2325
  }
2326
2326
  const Fi = function(u) {
2327
2327
  let _ = null;
2328
2328
  if (Ee(N.beforeSanitizeElements, u, null), Yt(u))
2329
2329
  return be(u), !0;
2330
- const b = j(u.nodeName);
2330
+ const w = j(u.nodeName);
2331
2331
  if (Ee(N.uponSanitizeElement, u, {
2332
- tagName: b,
2332
+ tagName: w,
2333
2333
  allowedTags: X
2334
2334
  }), ft && u.hasChildNodes() && !$i(u.firstElementChild) && ee(/<[/\w!]/g, u.innerHTML) && ee(/<[/\w!]/g, u.textContent) || u.nodeType === nt.progressingInstruction || ft && u.nodeType === nt.comment && ee(/<[/\w]/g, u.data))
2335
2335
  return be(u), !0;
2336
- if (!(Pe.tagCheck instanceof Function && Pe.tagCheck(b)) && (!X[b] || Xe[b])) {
2337
- if (!Xe[b] && Wi(b) && (G.tagNameCheck instanceof RegExp && ee(G.tagNameCheck, b) || G.tagNameCheck instanceof Function && G.tagNameCheck(b)))
2336
+ if (!(Ie.tagCheck instanceof Function && Ie.tagCheck(w)) && (!X[w] || Xe[w])) {
2337
+ if (!Xe[w] && Wi(w) && (G.tagNameCheck instanceof RegExp && ee(G.tagNameCheck, w) || G.tagNameCheck instanceof Function && G.tagNameCheck(w)))
2338
2338
  return !1;
2339
- if (Ut && !ye[b]) {
2339
+ if (Ut && !ye[w]) {
2340
2340
  const U = S(u) || u.parentNode, J = A(u) || u.childNodes;
2341
2341
  if (J && U) {
2342
2342
  const q = J.length;
2343
2343
  for (let ae = q - 1; ae >= 0; --ae) {
2344
- const Te = w(J[ae], !0);
2345
- Te.__removalCount = (u.__removalCount || 0) + 1, U.insertBefore(Te, T(u));
2344
+ const Te = b(J[ae], !0);
2345
+ Te.__removalCount = (u.__removalCount || 0) + 1, U.insertBefore(Te, E(u));
2346
2346
  }
2347
2347
  }
2348
2348
  }
2349
2349
  return be(u), !0;
2350
2350
  }
2351
- return u instanceof h && !Bs(u) || (b === "noscript" || b === "noembed" || b === "noframes") && ee(/<\/no(script|embed|frames)/i, u.innerHTML) ? (be(u), !0) : (Be && u.nodeType === nt.text && (_ = u.textContent, wt([le, Se, O], (U) => {
2351
+ return u instanceof h && !Bs(u) || (w === "noscript" || w === "noembed" || w === "noframes") && ee(/<\/no(script|embed|frames)/i, u.innerHTML) ? (be(u), !0) : (Be && u.nodeType === nt.text && (_ = u.textContent, wt([le, Se, M], (U) => {
2352
2352
  _ = tt(_, U, " ");
2353
2353
  }), u.textContent !== _ && (et(e.removed, {
2354
2354
  element: u.cloneNode()
2355
2355
  }), u.textContent = _)), Ee(N.afterSanitizeElements, u, null), !1);
2356
- }, Ui = function(u, _, b) {
2357
- if (Di && (_ === "id" || _ === "name") && (b in t || b in Ps))
2356
+ }, Ui = function(u, _, w) {
2357
+ if (Di && (_ === "id" || _ === "name") && (w in t || w in Is))
2358
2358
  return !1;
2359
- if (!(Bt && !Pt[_] && ee(je, _))) {
2359
+ if (!(Bt && !It[_] && ee(je, _))) {
2360
2360
  if (!(Ci && ee(ht, _))) {
2361
- if (!(Pe.attributeCheck instanceof Function && Pe.attributeCheck(_, u))) {
2362
- if (!K[_] || Pt[_]) {
2361
+ if (!(Ie.attributeCheck instanceof Function && Ie.attributeCheck(_, u))) {
2362
+ if (!K[_] || It[_]) {
2363
2363
  if (
2364
2364
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
2365
2365
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
2366
2366
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
2367
2367
  !(Wi(u) && (G.tagNameCheck instanceof RegExp && ee(G.tagNameCheck, u) || G.tagNameCheck instanceof Function && G.tagNameCheck(u)) && (G.attributeNameCheck instanceof RegExp && ee(G.attributeNameCheck, _) || G.attributeNameCheck instanceof Function && G.attributeNameCheck(_, u)) || // Alternative, second condition checks if it's an `is`-attribute, AND
2368
2368
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
2369
- _ === "is" && G.allowCustomizedBuiltInElements && (G.tagNameCheck instanceof RegExp && ee(G.tagNameCheck, b) || G.tagNameCheck instanceof Function && G.tagNameCheck(b)))
2369
+ _ === "is" && G.allowCustomizedBuiltInElements && (G.tagNameCheck instanceof RegExp && ee(G.tagNameCheck, w) || G.tagNameCheck instanceof Function && G.tagNameCheck(w)))
2370
2370
  ) return !1;
2371
2371
  } else if (!Gt[_]) {
2372
- if (!ee(Ei, tt(b, Ye, ""))) {
2373
- if (!((_ === "src" || _ === "xlink:href" || _ === "href") && u !== "script" && lr(b, "data:") === 0 && Ni[u])) {
2374
- if (!(Ai && !ee(ut, tt(b, Ye, "")))) {
2375
- if (b)
2372
+ if (!ee(Ei, tt(w, Ye, ""))) {
2373
+ if (!((_ === "src" || _ === "xlink:href" || _ === "href") && u !== "script" && lr(w, "data:") === 0 && Ni[u])) {
2374
+ if (!(Ai && !ee(ut, tt(w, Ye, "")))) {
2375
+ if (w)
2376
2376
  return !1;
2377
2377
  }
2378
2378
  }
@@ -2391,7 +2391,7 @@ function Ls() {
2391
2391
  } = u;
2392
2392
  if (!_ || Yt(u))
2393
2393
  return;
2394
- const b = {
2394
+ const w = {
2395
2395
  attrName: "",
2396
2396
  attrValue: "",
2397
2397
  keepAttr: !0,
@@ -2406,7 +2406,7 @@ function Ls() {
2406
2406
  value: Te
2407
2407
  } = J, Ge = j(q), Xt = Te;
2408
2408
  let Z = q === "value" ? Xt : cr(Xt);
2409
- if (b.attrName = Ge, b.attrValue = Z, b.keepAttr = !0, b.forceKeepAttr = void 0, Ee(N.uponSanitizeAttribute, u, b), Z = b.attrValue, Li && (Ge === "id" || Ge === "name") && (ze(q, u), Z = zs + Z), ft && ee(/((--!?|])>)|<\/(style|title|textarea)/i, Z)) {
2409
+ if (w.attrName = Ge, w.attrValue = Z, w.keepAttr = !0, w.forceKeepAttr = void 0, Ee(N.uponSanitizeAttribute, u, w), Z = w.attrValue, Li && (Ge === "id" || Ge === "name") && (ze(q, u), Z = zs + Z), ft && ee(/((--!?|])>)|<\/(style|title|textarea)/i, Z)) {
2410
2410
  ze(q, u);
2411
2411
  continue;
2412
2412
  }
@@ -2414,9 +2414,9 @@ function Ls() {
2414
2414
  ze(q, u);
2415
2415
  continue;
2416
2416
  }
2417
- if (b.forceKeepAttr)
2417
+ if (w.forceKeepAttr)
2418
2418
  continue;
2419
- if (!b.keepAttr) {
2419
+ if (!w.keepAttr) {
2420
2420
  ze(q, u);
2421
2421
  continue;
2422
2422
  }
@@ -2424,7 +2424,7 @@ function Ls() {
2424
2424
  ze(q, u);
2425
2425
  continue;
2426
2426
  }
2427
- Be && wt([le, Se, O], (qi) => {
2427
+ Be && wt([le, Se, M], (qi) => {
2428
2428
  Z = tt(Z, qi, " ");
2429
2429
  });
2430
2430
  const Vi = j(u.nodeName);
@@ -2432,14 +2432,14 @@ function Ls() {
2432
2432
  ze(q, u);
2433
2433
  continue;
2434
2434
  }
2435
- if (E && typeof y == "object" && typeof y.getAttributeType == "function" && !ae)
2435
+ if (T && typeof y == "object" && typeof y.getAttributeType == "function" && !ae)
2436
2436
  switch (y.getAttributeType(Vi, Ge)) {
2437
2437
  case "TrustedHTML": {
2438
- Z = E.createHTML(Z);
2438
+ Z = T.createHTML(Z);
2439
2439
  break;
2440
2440
  }
2441
2441
  case "TrustedScriptURL": {
2442
- Z = E.createScriptURL(Z);
2442
+ Z = T.createScriptURL(Z);
2443
2443
  break;
2444
2444
  }
2445
2445
  }
@@ -2453,13 +2453,13 @@ function Ls() {
2453
2453
  Ee(N.afterSanitizeAttributes, u, null);
2454
2454
  }, $s = function k(u) {
2455
2455
  let _ = null;
2456
- const b = Bi(u);
2457
- for (Ee(N.beforeSanitizeShadowDOM, u, null); _ = b.nextNode(); )
2456
+ const w = Bi(u);
2457
+ for (Ee(N.beforeSanitizeShadowDOM, u, null); _ = w.nextNode(); )
2458
2458
  Ee(N.uponSanitizeShadowNode, _, null), Fi(_), Gi(_), _.content instanceof n && k(_.content);
2459
2459
  Ee(N.afterSanitizeShadowDOM, u, null);
2460
2460
  };
2461
2461
  return e.sanitize = function(k) {
2462
- let u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ = null, b = null, U = null, J = null;
2462
+ let u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ = null, w = null, U = null, J = null;
2463
2463
  if (Vt = !k, Vt && (k = "<!-->"), typeof k != "string" && !$i(k))
2464
2464
  if (typeof k.toString == "function") {
2465
2465
  if (k = k.toString(), typeof k != "string")
@@ -2474,14 +2474,14 @@ function Ls() {
2474
2474
  if (!X[Te] || Xe[Te])
2475
2475
  throw it("root node is forbidden and cannot be sanitized in-place");
2476
2476
  }
2477
- } else if (k instanceof r)
2478
- _ = Pi("<!---->"), b = _.ownerDocument.importNode(k, !0), b.nodeType === nt.element && b.nodeName === "BODY" || b.nodeName === "HTML" ? _ = b : _.appendChild(b);
2477
+ } else if (k instanceof o)
2478
+ _ = Ii("<!---->"), w = _.ownerDocument.importNode(k, !0), w.nodeType === nt.element && w.nodeName === "BODY" || w.nodeName === "HTML" ? _ = w : _.appendChild(w);
2479
2479
  else {
2480
2480
  if (!$e && !Be && !Ne && // eslint-disable-next-line unicorn/prefer-includes
2481
2481
  k.indexOf("<") === -1)
2482
- return E && gt ? E.createHTML(k) : k;
2483
- if (_ = Pi(k), !_)
2484
- return $e ? null : gt ? M : "";
2482
+ return T && gt ? T.createHTML(k) : k;
2483
+ if (_ = Ii(k), !_)
2484
+ return $e ? null : gt ? H : "";
2485
2485
  }
2486
2486
  _ && Ft && be(_.firstChild);
2487
2487
  const q = Bi(Ke ? k : _);
@@ -2499,9 +2499,9 @@ function Ls() {
2499
2499
  }
2500
2500
  let ae = Ne ? _.outerHTML : _.innerHTML;
2501
2501
  return Ne && X["!doctype"] && _.ownerDocument && _.ownerDocument.doctype && _.ownerDocument.doctype.name && ee(Ds, _.ownerDocument.doctype.name) && (ae = "<!DOCTYPE " + _.ownerDocument.doctype.name + `>
2502
- ` + ae), Be && wt([le, Se, O], (Te) => {
2502
+ ` + ae), Be && wt([le, Se, M], (Te) => {
2503
2503
  ae = tt(ae, Te, " ");
2504
- }), E && gt ? E.createHTML(ae) : ae;
2504
+ }), T && gt ? T.createHTML(ae) : ae;
2505
2505
  }, e.setConfig = function() {
2506
2506
  let k = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2507
2507
  jt(k), $t = !0;
@@ -2509,8 +2509,8 @@ function Ls() {
2509
2509
  We = null, $t = !1;
2510
2510
  }, e.isValidAttribute = function(k, u, _) {
2511
2511
  We || jt({});
2512
- const b = j(k), U = j(u);
2513
- return Ui(b, U, _);
2512
+ const w = j(k), U = j(u);
2513
+ return Ui(w, U, _);
2514
2514
  }, e.addHook = function(k, u) {
2515
2515
  typeof u == "function" && et(N[k], u);
2516
2516
  }, e.removeHook = function(k, u) {
@@ -2526,7 +2526,7 @@ function Ls() {
2526
2526
  }, e;
2527
2527
  }
2528
2528
  var Er = Ls();
2529
- const Tr = ["innerHTML"], Rr = "Markdown", Cr = /* @__PURE__ */ ue({
2529
+ const Tr = ["innerHTML"], Rr = "Markdown", Cr = /* @__PURE__ */ de({
2530
2530
  inheritAttrs: !1,
2531
2531
  __name: "Markdown",
2532
2532
  props: {
@@ -2538,27 +2538,27 @@ const Tr = ["innerHTML"], Rr = "Markdown", Cr = /* @__PURE__ */ ue({
2538
2538
  emits: ["update:markdownText", "changeMode"],
2539
2539
  setup(a, { emit: e }) {
2540
2540
  const t = a, i = e, s = hs([{ comp: gs, event: c, tooltip: "Edit Markdown" }]);
2541
- H.setOptions({
2541
+ P.setOptions({
2542
2542
  gfm: !0,
2543
2543
  breaks: !0
2544
2544
  });
2545
- const n = P(t.markdownText ?? "");
2545
+ const n = B(t.markdownText ?? "");
2546
2546
  fe(() => t.markdownText, (l) => {
2547
2547
  l !== void 0 && l !== n.value && (n.value = l);
2548
2548
  });
2549
- const o = P(t.mode ? t.mode === "edit" : !1);
2549
+ const r = B(t.mode ? t.mode === "edit" : !1);
2550
2550
  fe(() => t.mode, (l) => {
2551
- l && (o.value = l === "edit");
2551
+ l && (r.value = l === "edit");
2552
2552
  });
2553
- const r = de(() => {
2554
- const l = t.inputFormat === "html" ? n.value ?? "" : H.parse(n.value ?? "");
2553
+ const o = ue(() => {
2554
+ const l = t.inputFormat === "html" ? n.value ?? "" : P.parse(n.value ?? "");
2555
2555
  return t.sanitize === !1 ? l : Er.sanitize(l);
2556
2556
  });
2557
2557
  function h() {
2558
2558
  i("update:markdownText", n.value);
2559
2559
  }
2560
2560
  function c() {
2561
- o.value = !o.value, i("changeMode", o.value ? "edit" : "preview");
2561
+ r.value = !r.value, i("changeMode", r.value ? "edit" : "preview");
2562
2562
  }
2563
2563
  return (l, d) => (C(), z(De, null, [
2564
2564
  Tt(l.$slots, "default", {
@@ -2566,7 +2566,7 @@ const Tr = ["innerHTML"], Rr = "Markdown", Cr = /* @__PURE__ */ ue({
2566
2566
  childIcons: s.value
2567
2567
  }, void 0, !0),
2568
2568
  D("div", di({ class: "markdown-widget-wrap" }, l.$attrs), [
2569
- o.value ? Me((C(), z("textarea", {
2569
+ r.value ? Me((C(), z("textarea", {
2570
2570
  key: 0,
2571
2571
  "onUpdate:modelValue": d[0] || (d[0] = (f) => n.value = f),
2572
2572
  onInput: h,
@@ -2577,7 +2577,7 @@ const Tr = ["innerHTML"], Rr = "Markdown", Cr = /* @__PURE__ */ ue({
2577
2577
  ]) : (C(), z("div", {
2578
2578
  key: 1,
2579
2579
  class: "markdown-output",
2580
- innerHTML: r.value
2580
+ innerHTML: o.value
2581
2581
  }, null, 8, Tr))
2582
2582
  ], 16)
2583
2583
  ], 64));
@@ -2737,8 +2737,8 @@ class p {
2737
2737
  const i = e.x > t.x ? e.x : t.x, s = e.x + e.w < t.x + t.w ? e.x + e.w : t.x + t.w;
2738
2738
  if (s <= i)
2739
2739
  return 0;
2740
- const n = e.y > t.y ? e.y : t.y, o = e.y + e.h < t.y + t.h ? e.y + e.h : t.y + t.h;
2741
- return o <= n ? 0 : (s - i) * (o - n);
2740
+ const n = e.y > t.y ? e.y : t.y, r = e.y + e.h < t.y + t.h ? e.y + e.h : t.y + t.h;
2741
+ return r <= n ? 0 : (s - i) * (r - n);
2742
2742
  }
2743
2743
  /**
2744
2744
  * Calculate the total area of a grid position.
@@ -2765,8 +2765,8 @@ class p {
2765
2765
  */
2766
2766
  static sort(e, t = 1) {
2767
2767
  return e.sort((s, n) => {
2768
- const o = t * ((s.y ?? 1e4) - (n.y ?? 1e4));
2769
- return o === 0 ? t * ((s.x ?? 1e4) - (n.x ?? 1e4)) : o;
2768
+ const r = t * ((s.y ?? 1e4) - (n.y ?? 1e4));
2769
+ return r === 0 ? t * ((s.x ?? 1e4) - (n.x ?? 1e4)) : r;
2770
2770
  });
2771
2771
  }
2772
2772
  /**
@@ -2957,8 +2957,8 @@ class p {
2957
2957
  const s = p.getScrollElement(e);
2958
2958
  if (!s)
2959
2959
  return;
2960
- const n = e.getBoundingClientRect(), o = s.getBoundingClientRect(), r = window.innerHeight || document.documentElement.clientHeight, h = n.bottom - Math.min(o.bottom, r), c = n.top - Math.max(o.top, 0), l = s.scrollTop;
2961
- c < 0 && i < 0 ? e.offsetHeight > o.height ? s.scrollTop += i : s.scrollTop += Math.abs(c) > Math.abs(i) ? i : c : h > 0 && i > 0 && (e.offsetHeight > o.height ? s.scrollTop += i : s.scrollTop += h > i ? i : h), t.top += s.scrollTop - l;
2960
+ const n = e.getBoundingClientRect(), r = s.getBoundingClientRect(), o = window.innerHeight || document.documentElement.clientHeight, h = n.bottom - Math.min(r.bottom, o), c = n.top - Math.max(r.top, 0), l = s.scrollTop;
2961
+ c < 0 && i < 0 ? e.offsetHeight > r.height ? s.scrollTop += i : s.scrollTop += Math.abs(c) > Math.abs(i) ? i : c : h > 0 && i > 0 && (e.offsetHeight > r.height ? s.scrollTop += i : s.scrollTop += h > i ? i : h), t.top += s.scrollTop - l;
2962
2962
  }
2963
2963
  /**
2964
2964
  * @internal Function used to scroll the page.
@@ -2968,8 +2968,8 @@ class p {
2968
2968
  * @param distance Distance from the V edges to start scrolling
2969
2969
  */
2970
2970
  static updateScrollResize(e, t, i) {
2971
- const s = p.getScrollElement(t), n = s.clientHeight, o = s === p.getScrollElement() ? 0 : s.getBoundingClientRect().top, r = e.clientY - o, h = r < i, c = r > n - i;
2972
- h ? s.scrollBy({ behavior: "smooth", top: r - i }) : c && s.scrollBy({ behavior: "smooth", top: i - (n - r) });
2971
+ const s = p.getScrollElement(t), n = s.clientHeight, r = s === p.getScrollElement() ? 0 : s.getBoundingClientRect().top, o = e.clientY - r, h = o < i, c = o > n - i;
2972
+ h ? s.scrollBy({ behavior: "smooth", top: o - i }) : c && s.scrollBy({ behavior: "smooth", top: i - (n - o) });
2973
2973
  }
2974
2974
  /** single level clone, returning a new object with same top fields. This will share sub objects and arrays */
2975
2975
  static clone(e) {
@@ -3121,8 +3121,8 @@ class Re {
3121
3121
  return !0;
3122
3122
  let n = t;
3123
3123
  !this._loading && this._useEntireRowArea(e, t) && (n = { x: 0, w: this.column, y: t.y, h: t.h }, i = this.collide(e, n, s.skip));
3124
- let o = !1;
3125
- const r = { nested: !0, pack: !1 };
3124
+ let r = !1;
3125
+ const o = { nested: !0, pack: !1 };
3126
3126
  let h = 0;
3127
3127
  for (; i = i || this.collide(e, n, s.skip); ) {
3128
3128
  if (h++ > this.nodes.length * 2)
@@ -3131,15 +3131,15 @@ class Re {
3131
3131
  if (i.locked || this._loading || e._moving && !e._skipDown && t.y > e.y && !this.float && // can take space we had, or before where we're going
3132
3132
  (!this.collide(i, { ...i, y: e.y }, e) || !this.collide(i, { ...i, y: t.y - i.h }, e))) {
3133
3133
  e._skipDown = e._skipDown || t.y > e.y;
3134
- const l = { ...t, y: i.y + i.h, ...r };
3135
- c = this._loading && p.samePos(e, l) ? !0 : this.moveNode(e, l), (i.locked || this._loading) && c ? p.copyPos(t, e) : !i.locked && c && s.pack && (this._packNodes(), t.y = i.y + i.h, p.copyPos(e, t)), o = o || c;
3134
+ const l = { ...t, y: i.y + i.h, ...o };
3135
+ c = this._loading && p.samePos(e, l) ? !0 : this.moveNode(e, l), (i.locked || this._loading) && c ? p.copyPos(t, e) : !i.locked && c && s.pack && (this._packNodes(), t.y = i.y + i.h, p.copyPos(e, t)), r = r || c;
3136
3136
  } else
3137
- c = this.moveNode(i, { ...i, y: t.y + t.h, skip: e, ...r });
3137
+ c = this.moveNode(i, { ...i, y: t.y + t.h, skip: e, ...o });
3138
3138
  if (!c)
3139
- return o;
3139
+ return r;
3140
3140
  i = void 0;
3141
3141
  }
3142
- return o;
3142
+ return r;
3143
3143
  }
3144
3144
  /**
3145
3145
  * Return the first node that intercepts/collides with the given node or area.
@@ -3158,7 +3158,7 @@ class Re {
3158
3158
  */
3159
3159
  collide(e, t = e, i) {
3160
3160
  const s = e._id, n = i == null ? void 0 : i._id;
3161
- return this.nodes.find((o) => o._id !== s && o._id !== n && p.isIntercepted(o, t));
3161
+ return this.nodes.find((r) => r._id !== s && r._id !== n && p.isIntercepted(r, t));
3162
3162
  }
3163
3163
  /**
3164
3164
  * Return all nodes that intercept/collide with the given node or area.
@@ -3175,7 +3175,7 @@ class Re {
3175
3175
  */
3176
3176
  collideAll(e, t = e, i) {
3177
3177
  const s = e._id, n = i == null ? void 0 : i._id;
3178
- return this.nodes.filter((o) => o._id !== s && o._id !== n && p.isIntercepted(o, t));
3178
+ return this.nodes.filter((r) => r._id !== s && r._id !== n && p.isIntercepted(r, t));
3179
3179
  }
3180
3180
  /** does a pixel coverage collision based on where we started, returning the node that has the most coverage that is >50% mid line */
3181
3181
  directionCollideCoverage(e, t, i) {
@@ -3183,7 +3183,7 @@ class Re {
3183
3183
  return;
3184
3184
  const s = e._rect, n = { ...t.rect };
3185
3185
  n.y > s.y ? (n.h += n.y - s.y, n.y = s.y) : n.h += s.y - n.y, n.x > s.x ? (n.w += n.x - s.x, n.x = s.x) : n.w += s.x - n.x;
3186
- let o, r = 0.5;
3186
+ let r, o = 0.5;
3187
3187
  for (let h of i) {
3188
3188
  if (h.locked || !h._rect)
3189
3189
  break;
@@ -3191,9 +3191,9 @@ class Re {
3191
3191
  let l = Number.MAX_VALUE, d = Number.MAX_VALUE;
3192
3192
  s.y < c.y ? l = (n.y + n.h - c.y) / c.h : s.y + s.h > c.y + c.h && (l = (c.y + c.h - n.y) / c.h), s.x < c.x ? d = (n.x + n.w - c.x) / c.w : s.x + s.w > c.x + c.w && (d = (c.x + c.w - n.x) / c.w);
3193
3193
  const f = Math.min(d, l);
3194
- f > r && (r = f, o = h);
3194
+ f > o && (o = f, r = h);
3195
3195
  }
3196
- return t.collide = o, o;
3196
+ return t.collide = r, r;
3197
3197
  }
3198
3198
  /** does a pixel coverage returning the node that has the most coverage by area */
3199
3199
  /*
@@ -3225,12 +3225,12 @@ class Re {
3225
3225
  *
3226
3226
  * @internal This is typically called by GridStack during resize events
3227
3227
  */
3228
- cacheRects(e, t, i, s, n, o) {
3229
- return this.nodes.forEach((r) => r._rect = {
3230
- y: r.y * t + i,
3231
- x: r.x * e + o,
3232
- w: r.w * e - o - s,
3233
- h: r.h * t - i - n
3228
+ cacheRects(e, t, i, s, n, r) {
3229
+ return this.nodes.forEach((o) => o._rect = {
3230
+ y: o.y * t + i,
3231
+ x: o.x * e + r,
3232
+ w: o.w * e - r - s,
3233
+ h: o.h * t - i - n
3234
3234
  }), this;
3235
3235
  }
3236
3236
  /**
@@ -3251,8 +3251,8 @@ class Re {
3251
3251
  if (!t || t.locked || !e || e.locked)
3252
3252
  return !1;
3253
3253
  function i() {
3254
- const n = t.x, o = t.y;
3255
- return t.x = e.x, t.y = e.y, e.h != t.h ? (e.x = n, e.y = t.y + t.h) : e.w != t.w ? (e.x = t.x + t.w, e.y = o) : (e.x = n, e.y = o), e._dirty = t._dirty = !0, !0;
3254
+ const n = t.x, r = t.y;
3255
+ return t.x = e.x, t.y = e.y, e.h != t.h ? (e.x = n, e.y = t.y + t.h) : e.w != t.w ? (e.x = t.x + t.w, e.y = r) : (e.x = n, e.y = r), e._dirty = t._dirty = !0, !0;
3256
3256
  }
3257
3257
  let s;
3258
3258
  if (e.w === t.w && e.h === t.h && (e.x === t.x || e.y === t.y) && (s = p.isTouching(e, t)))
@@ -3321,9 +3321,9 @@ class Re {
3321
3321
  const s = this._inColumnResize;
3322
3322
  s || (this._inColumnResize = !0);
3323
3323
  const n = this.nodes;
3324
- return this.nodes = [], n.forEach((o, r, h) => {
3324
+ return this.nodes = [], n.forEach((r, o, h) => {
3325
3325
  let c;
3326
- o.locked || (o.autoPosition = !0, e === "list" && r && (c = h[r - 1])), this.addNode(o, !1, c);
3326
+ r.locked || (r.autoPosition = !0, e === "list" && o && (c = h[o - 1])), this.addNode(r, !1, c);
3327
3327
  }), s || delete this._inColumnResize, i || this.batchUpdate(!1), this;
3328
3328
  }
3329
3329
  /**
@@ -3402,7 +3402,7 @@ class Re {
3402
3402
  const i = e.id;
3403
3403
  if (i) {
3404
3404
  let n = 1;
3405
- for (; this.nodes.find((o) => o.id === e.id && o !== e); )
3405
+ for (; this.nodes.find((r) => r.id === e.id && r !== e); )
3406
3406
  e.id = i + "_" + n++;
3407
3407
  }
3408
3408
  (e.x === void 0 || e.y === void 0 || e.x === null || e.y === null) && (e.autoPosition = !0);
@@ -3513,15 +3513,15 @@ class Re {
3513
3513
  */
3514
3514
  findEmptyPosition(e, t = this.nodes, i = this.column, s) {
3515
3515
  const n = s ? s.y * i + (s.x + s.w) : 0;
3516
- let o = !1;
3517
- for (let r = n; !o; ++r) {
3518
- const h = r % i, c = Math.floor(r / i);
3516
+ let r = !1;
3517
+ for (let o = n; !r; ++o) {
3518
+ const h = o % i, c = Math.floor(o / i);
3519
3519
  if (h + e.w > i)
3520
3520
  continue;
3521
3521
  const l = { x: h, y: c, w: e.w, h: e.h };
3522
- t.find((d) => p.isIntercepted(l, d)) || ((e.x !== h || e.y !== c) && (e._dirty = !0), e.x = h, e.y = c, delete e.autoPosition, o = !0);
3522
+ t.find((d) => p.isIntercepted(l, d)) || ((e.x !== h || e.y !== c) && (e._dirty = !0), e.x = h, e.y = c, delete e.autoPosition, r = !0);
3523
3523
  }
3524
- return o;
3524
+ return r;
3525
3525
  }
3526
3526
  /**
3527
3527
  * Add the given node to the grid, handling collision detection and re-packing.
@@ -3537,7 +3537,7 @@ class Re {
3537
3537
  * const added = engine.addNode(node, true);
3538
3538
  */
3539
3539
  addNode(e, t = !1, i) {
3540
- const s = this.nodes.find((o) => o._id === e._id);
3540
+ const s = this.nodes.find((r) => r._id === e._id);
3541
3541
  if (s)
3542
3542
  return s;
3543
3543
  this._inColumnResize ? this.nodeBoundFix(e) : this.prepareNode(e), delete e._temporaryRemoved, delete e._removeDOM;
@@ -3601,19 +3601,19 @@ class Re {
3601
3601
  const s = new Re({
3602
3602
  column: this.column,
3603
3603
  float: this.float,
3604
- nodes: this.nodes.map((o) => o._id === e._id ? (i = { ...o }, i) : { ...o })
3604
+ nodes: this.nodes.map((r) => r._id === e._id ? (i = { ...r }, i) : { ...r })
3605
3605
  });
3606
3606
  if (!i)
3607
3607
  return !1;
3608
3608
  const n = s.moveNode(i, t) && s.getRow() <= Math.max(this.getRow(), this.maxRow);
3609
3609
  if (!n && !t.resizing && t.collide) {
3610
- const o = t.collide.el.gridstackNode;
3611
- if (this.swap(e, o))
3610
+ const r = t.collide.el.gridstackNode;
3611
+ if (this.swap(e, r))
3612
3612
  return this._notify(), !0;
3613
3613
  }
3614
- return n ? (s.nodes.filter((o) => o._dirty).forEach((o) => {
3615
- const r = this.nodes.find((h) => h._id === o._id);
3616
- r && (p.copyPos(r, o), r._dirty = !0);
3614
+ return n ? (s.nodes.filter((r) => r._dirty).forEach((r) => {
3615
+ const o = this.nodes.find((h) => h._id === r._id);
3616
+ o && (p.copyPos(o, r), o._dirty = !0);
3617
3617
  }), this._notify(), !0) : !1;
3618
3618
  }
3619
3619
  /** return true if can fit in grid height constrain only (always true if no maxRow) */
@@ -3642,18 +3642,18 @@ class Re {
3642
3642
  const s = e.w !== t.w || e.h !== t.h, n = p.copyPos({}, e, !0);
3643
3643
  if (p.copyPos(n, t), this.nodeBoundFix(n, s), p.copyPos(t, n), !t.forceCollide && p.samePos(e, t))
3644
3644
  return !1;
3645
- const o = p.copyPos({}, e), r = this.collideAll(e, n, t.skip);
3645
+ const r = p.copyPos({}, e), o = this.collideAll(e, n, t.skip);
3646
3646
  let h = !0;
3647
- if (r.length) {
3647
+ if (o.length) {
3648
3648
  const d = e._moving && !t.nested;
3649
- let f = d ? this.directionCollideCoverage(e, t, r) : r[0];
3649
+ let f = d ? this.directionCollideCoverage(e, t, o) : o[0];
3650
3650
  if (d && f && ((l = (c = e.grid) == null ? void 0 : c.opts) != null && l.subGridDynamic) && !e.grid._isTemp) {
3651
- const y = p.areaIntercept(t.rect, f._rect), v = p.area(t.rect), w = p.area(f._rect);
3652
- y / (v < w ? v : w) > 0.8 && (f.grid.makeSubGrid(f.el, void 0, e), f = void 0);
3651
+ const y = p.areaIntercept(t.rect, f._rect), v = p.area(t.rect), b = p.area(f._rect);
3652
+ y / (v < b ? v : b) > 0.8 && (f.grid.makeSubGrid(f.el, void 0, e), f = void 0);
3653
3653
  }
3654
3654
  f ? h = !this._fixCollisions(e, n, f, t) : (h = !1, i && delete t.pack);
3655
3655
  }
3656
- return h && !p.samePos(e, n) && (e._dirty = !0, p.copyPos(e, n)), t.pack && this._packNodes()._notify(), !p.samePos(e, o);
3656
+ return h && !p.samePos(e, n) && (e._dirty = !0, p.copyPos(e, n)), t.pack && this._packNodes()._notify(), !p.samePos(e, r);
3657
3657
  }
3658
3658
  getRow() {
3659
3659
  return this.nodes.reduce((e, t) => Math.max(e, t.y + t.h), 0);
@@ -3673,15 +3673,15 @@ class Re {
3673
3673
  * Note: nested grids will ALWAYS save the container w to match overall layouts (parent + child) to be consistent.
3674
3674
  */
3675
3675
  save(e = !0, t, i) {
3676
- var r;
3677
- const s = ((r = this._layouts) == null ? void 0 : r.length) || 0;
3676
+ var o;
3677
+ const s = ((o = this._layouts) == null ? void 0 : o.length) || 0;
3678
3678
  let n;
3679
3679
  s && (i ? i !== this.column && (n = this._layouts[i]) : this.column !== s - 1 && (n = this._layouts[s - 1]));
3680
- const o = [];
3680
+ const r = [];
3681
3681
  return this.sortNodes(), this.nodes.forEach((h) => {
3682
3682
  const c = n == null ? void 0 : n.find((d) => d._id === h._id), l = { ...h, ...c || {} };
3683
- p.removeInternalForSave(l, !e), t && t(h, l), o.push(l);
3684
- }), o;
3683
+ p.removeInternalForSave(l, !e), t && t(h, l), r.push(l);
3684
+ }), r;
3685
3685
  }
3686
3686
  /** @internal called whenever a node is added or moved - updates the cached layouts */
3687
3687
  layoutsNodesChange(e) {
@@ -3695,8 +3695,8 @@ class Re {
3695
3695
  e.forEach((n) => {
3696
3696
  if (!n._orig)
3697
3697
  return;
3698
- const o = t.find((r) => r._id === n._id);
3699
- o && (o.y >= 0 && n.y !== n._orig.y && (o.y += n.y - n._orig.y, o.y < 0 && (o.y = 0)), n.x !== n._orig.x && (o.x = Math.round(n.x * s), o.x < 0 && (o.x = 0)), n.w !== n._orig.w && (o.w = Math.round(n.w * s), o.w < 1 && (o.w = 1)));
3698
+ const r = t.find((o) => o._id === n._id);
3699
+ r && (r.y >= 0 && n.y !== n._orig.y && (r.y += n.y - n._orig.y, r.y < 0 && (r.y = 0)), n.x !== n._orig.x && (r.x = Math.round(n.x * s), r.x < 0 && (r.x = 0)), n.w !== n._orig.w && (r.w = Math.round(n.w * s), r.w < 1 && (r.w = 1)));
3700
3700
  });
3701
3701
  }
3702
3702
  }), this);
@@ -3712,40 +3712,40 @@ class Re {
3712
3712
  * Note: items will never be outside of the current column boundaries. default (moveScale). Ignored for 1 column
3713
3713
  */
3714
3714
  columnChanged(e, t, i = "moveScale") {
3715
- var r;
3715
+ var o;
3716
3716
  if (!this.nodes.length || !t || e === t)
3717
3717
  return this;
3718
3718
  const s = i === "compact" || i === "list";
3719
3719
  s && this.sortNodes(1), t < e && this.cacheLayout(this.nodes, e), this.batchUpdate();
3720
- let n = [], o = s ? this.nodes : p.sort(this.nodes, -1);
3720
+ let n = [], r = s ? this.nodes : p.sort(this.nodes, -1);
3721
3721
  if (t > e && this._layouts) {
3722
3722
  const h = this._layouts[t] || [], c = this._layouts.length - 1;
3723
- !h.length && e !== c && ((r = this._layouts[c]) != null && r.length) && (e = c, this._layouts[c].forEach((l) => {
3724
- const d = o.find((f) => f._id === l._id);
3723
+ !h.length && e !== c && ((o = this._layouts[c]) != null && o.length) && (e = c, this._layouts[c].forEach((l) => {
3724
+ const d = r.find((f) => f._id === l._id);
3725
3725
  d && (!s && !l.autoPosition && (d.x = l.x ?? d.x, d.y = l.y ?? d.y), d.w = l.w ?? d.w, (l.x == null || l.y === void 0) && (d.autoPosition = !0));
3726
3726
  })), h.forEach((l) => {
3727
- const d = o.findIndex((f) => f._id === l._id);
3727
+ const d = r.findIndex((f) => f._id === l._id);
3728
3728
  if (d !== -1) {
3729
- const f = o[d];
3729
+ const f = r[d];
3730
3730
  if (s) {
3731
3731
  f.w = l.w;
3732
3732
  return;
3733
3733
  }
3734
- (l.autoPosition || isNaN(l.x) || isNaN(l.y)) && this.findEmptyPosition(l, n), l.autoPosition || (f.x = l.x ?? f.x, f.y = l.y ?? f.y, f.w = l.w ?? f.w, n.push(f)), o.splice(d, 1);
3734
+ (l.autoPosition || isNaN(l.x) || isNaN(l.y)) && this.findEmptyPosition(l, n), l.autoPosition || (f.x = l.x ?? f.x, f.y = l.y ?? f.y, f.w = l.w ?? f.w, n.push(f)), r.splice(d, 1);
3735
3735
  }
3736
3736
  });
3737
3737
  }
3738
3738
  if (s)
3739
3739
  this.compact(i, !1);
3740
3740
  else {
3741
- if (o.length)
3741
+ if (r.length)
3742
3742
  if (typeof i == "function")
3743
- i(t, e, n, o);
3743
+ i(t, e, n, r);
3744
3744
  else {
3745
3745
  const h = s || i === "none" ? 1 : t / e, c = i === "move" || i === "moveScale", l = i === "scale" || i === "moveScale";
3746
- o.forEach((d) => {
3746
+ r.forEach((d) => {
3747
3747
  d.x = t === 1 ? 0 : c ? Math.round(d.x * h) : Math.min(d.x, t - 1), d.w = t === 1 || e === 1 ? 1 : l ? Math.round(d.w * h) || 1 : Math.min(d.w, t), n.push(d);
3748
- }), o = [];
3748
+ }), r = [];
3749
3749
  }
3750
3750
  n = p.sort(n, -1), this._inColumnResize = !0, this.nodes = [], n.forEach((h) => {
3751
3751
  this.addNode(h, !1), delete h._orig;
@@ -3761,12 +3761,12 @@ class Re {
3761
3761
  */
3762
3762
  cacheLayout(e, t, i = !1) {
3763
3763
  const s = [];
3764
- return e.forEach((n, o) => {
3764
+ return e.forEach((n, r) => {
3765
3765
  if (n._id === void 0) {
3766
- const r = n.id ? this.nodes.find((h) => h.id === n.id) : void 0;
3767
- n._id = (r == null ? void 0 : r._id) ?? Re._idSeq++;
3766
+ const o = n.id ? this.nodes.find((h) => h.id === n.id) : void 0;
3767
+ n._id = (o == null ? void 0 : o._id) ?? Re._idSeq++;
3768
3768
  }
3769
- s[o] = { x: n.x, y: n.y, w: n.w, _id: n._id };
3769
+ s[r] = { x: n.x, y: n.y, w: n.w, _id: n._id };
3770
3770
  }), this._layouts = i ? [] : this._layouts || [], this._layouts[t] = s, this;
3771
3771
  }
3772
3772
  /**
@@ -3864,7 +3864,7 @@ function cs(a) {
3864
3864
  delete he.pointerLeaveTimeout, Ns(a, "mouseleave");
3865
3865
  }, 10));
3866
3866
  }
3867
- class It {
3867
+ class Pt {
3868
3868
  constructor(e, t, i) {
3869
3869
  this.host = e, this.dir = t, this.option = i, this.moving = !1, this._mouseDown = this._mouseDown.bind(this), this._mouseMove = this._mouseMove.bind(this), this._mouseUp = this._mouseUp.bind(this), this._keyEvent = this._keyEvent.bind(this), this._init();
3870
3870
  }
@@ -3876,7 +3876,7 @@ class It {
3876
3876
  } catch (e) {
3877
3877
  this.option.element = void 0, console.error("Query for resizeable handle failed, falling back", e);
3878
3878
  }
3879
- return this.el || (this.el = document.createElement("div"), this.host.appendChild(this.el)), this.el.classList.add("ui-resizable-handle"), this.el.classList.add(`${It.prefix}${this.dir}`), this.el.style.zIndex = "100", this.el.style.userSelect = "none", this.el.addEventListener("mousedown", this._mouseDown), ve && (this.el.addEventListener("touchstart", Lt), this.el.addEventListener("pointerdown", Ot)), this;
3879
+ return this.el || (this.el = document.createElement("div"), this.host.appendChild(this.el)), this.el.classList.add("ui-resizable-handle"), this.el.classList.add(`${Pt.prefix}${this.dir}`), this.el.style.zIndex = "100", this.el.style.userSelect = "none", this.el.addEventListener("mousedown", this._mouseDown), ve && (this.el.addEventListener("touchstart", Lt), this.el.addEventListener("pointerdown", Ot)), this;
3880
3880
  }
3881
3881
  /** call this when resize handle needs to be removed and cleaned up */
3882
3882
  destroy() {
@@ -3905,7 +3905,7 @@ class It {
3905
3905
  return this.option[e] && this.option[e](t), this;
3906
3906
  }
3907
3907
  }
3908
- It.prefix = "ui-resizable-";
3908
+ Pt.prefix = "ui-resizable-";
3909
3909
  class xi {
3910
3910
  constructor() {
3911
3911
  this._eventRegister = {};
@@ -3976,15 +3976,15 @@ class ot extends xi {
3976
3976
  height: this.originalRect.height + this.scrolled,
3977
3977
  left: this.originalRect.left,
3978
3978
  top: this.originalRect.top - this.scrolled
3979
- }, o = this.temporalRect || n;
3979
+ }, r = this.temporalRect || n;
3980
3980
  return {
3981
3981
  position: {
3982
- left: (o.left - s.left) * this.rectScale.x,
3983
- top: (o.top - s.top) * this.rectScale.y
3982
+ left: (r.left - s.left) * this.rectScale.x,
3983
+ top: (r.top - s.top) * this.rectScale.y
3984
3984
  },
3985
3985
  size: {
3986
- width: o.width * this.rectScale.x,
3987
- height: o.height * this.rectScale.y
3986
+ width: r.width * this.rectScale.x,
3987
+ height: r.height * this.rectScale.y
3988
3988
  }
3989
3989
  /* Gridstack ONLY needs position set above... keep around in case.
3990
3990
  element: [this.el], // The object representing the element to be resized
@@ -4037,7 +4037,7 @@ class ot extends xi {
4037
4037
  }
4038
4038
  /** @internal */
4039
4039
  _setupHandlers() {
4040
- return this.handlers = this.option.handles.split(",").map((e) => e.trim()).map((e) => new It(this.el, e, {
4040
+ return this.handlers = this.option.handles.split(",").map((e) => e.trim()).map((e) => new Pt(this.el, e, {
4041
4041
  element: this.option.element,
4042
4042
  start: (t) => this._resizeStart(t),
4043
4043
  stop: (t) => this._resizeStop(t),
@@ -4083,15 +4083,15 @@ class ot extends xi {
4083
4083
  height: this.originalRect.height + this.scrolled,
4084
4084
  left: this.originalRect.left,
4085
4085
  top: this.originalRect.top - this.scrolled
4086
- }, n = e.clientX - i.clientX, o = this.sizeToContent ? 0 : e.clientY - i.clientY;
4087
- let r, h;
4088
- t.indexOf("e") > -1 ? s.width += n : t.indexOf("w") > -1 && (s.width -= n, s.left += n, r = !0), t.indexOf("s") > -1 ? s.height += o : t.indexOf("n") > -1 && (s.height -= o, s.top += o, h = !0);
4089
- const c = this._constrainSize(s.width, s.height, r, h);
4086
+ }, n = e.clientX - i.clientX, r = this.sizeToContent ? 0 : e.clientY - i.clientY;
4087
+ let o, h;
4088
+ t.indexOf("e") > -1 ? s.width += n : t.indexOf("w") > -1 && (s.width -= n, s.left += n, o = !0), t.indexOf("s") > -1 ? s.height += r : t.indexOf("n") > -1 && (s.height -= r, s.top += r, h = !0);
4089
+ const c = this._constrainSize(s.width, s.height, o, h);
4090
4090
  return Math.round(s.width) !== Math.round(c.width) && (t.indexOf("w") > -1 && (s.left += s.width - c.width), s.width = c.width), Math.round(s.height) !== Math.round(c.height) && (t.indexOf("n") > -1 && (s.top += s.height - c.height), s.height = c.height), s;
4091
4091
  }
4092
4092
  /** @internal constrain the size to the set min/max values */
4093
4093
  _constrainSize(e, t, i, s) {
4094
- const n = this.option, o = (i ? n.maxWidthMoveLeft : n.maxWidth) || Number.MAX_SAFE_INTEGER, r = n.minWidth / this.rectScale.x || e, h = (s ? n.maxHeightMoveUp : n.maxHeight) || Number.MAX_SAFE_INTEGER, c = n.minHeight / this.rectScale.y || t, l = Math.min(o, Math.max(r, e)), d = Math.min(h, Math.max(c, t));
4094
+ const n = this.option, r = (i ? n.maxWidthMoveLeft : n.maxWidth) || Number.MAX_SAFE_INTEGER, o = n.minWidth / this.rectScale.x || e, h = (s ? n.maxHeightMoveUp : n.maxHeight) || Number.MAX_SAFE_INTEGER, c = n.minHeight / this.rectScale.y || t, l = Math.min(r, Math.max(o, e)), d = Math.min(h, Math.max(c, t));
4095
4095
  return { width: l, height: d };
4096
4096
  }
4097
4097
  /** @internal */
@@ -4220,8 +4220,8 @@ class at extends xi {
4220
4220
  this.helper.classList.remove("ui-draggable-dragging"), (i = (t = this.el.gridstackNode) == null ? void 0 : t.grid) == null || i.el.classList.remove("grid-stack-dragging");
4221
4221
  const e = (s = this.helper) == null ? void 0 : s.gridstackNode;
4222
4222
  if (!(e != null && e._isAboutToRemove) && this.dragElementOriginStyle) {
4223
- const n = this.helper, o = this.dragElementOriginStyle.transition || null;
4224
- n.style.transition = this.dragElementOriginStyle.transition = "none", at.originStyleProp.forEach((r) => n.style[r] = this.dragElementOriginStyle[r] || null), setTimeout(() => n.style.transition = o, 50);
4223
+ const n = this.helper, r = this.dragElementOriginStyle.transition || null;
4224
+ n.style.transition = this.dragElementOriginStyle.transition = "none", at.originStyleProp.forEach((o) => n.style[o] = this.dragElementOriginStyle[o] || null), setTimeout(() => n.style.transition = r, 50);
4225
4225
  }
4226
4226
  return delete this.dragElementOriginStyle, this;
4227
4227
  }
@@ -4238,14 +4238,14 @@ class at extends xi {
4238
4238
  _getDragOffset(e, t, i) {
4239
4239
  let s = 0, n = 0;
4240
4240
  i && (s = this.dragTransform.xOffset, n = this.dragTransform.yOffset);
4241
- const o = t.getBoundingClientRect();
4241
+ const r = t.getBoundingClientRect();
4242
4242
  return {
4243
- left: o.left,
4244
- top: o.top,
4245
- offsetLeft: -e.clientX + o.left - s,
4246
- offsetTop: -e.clientY + o.top - n,
4247
- width: o.width * this.dragTransform.xScale,
4248
- height: o.height * this.dragTransform.yScale
4243
+ left: r.left,
4244
+ top: r.top,
4245
+ offsetLeft: -e.clientX + r.left - s,
4246
+ offsetTop: -e.clientY + r.top - n,
4247
+ width: r.width * this.dragTransform.xScale,
4248
+ height: r.height * this.dragTransform.yScale
4249
4249
  };
4250
4250
  }
4251
4251
  /** @internal TODO: set to public as called by DDDroppable! */
@@ -4302,9 +4302,9 @@ class Sr extends xi {
4302
4302
  e.preventDefault(), e.stopPropagation();
4303
4303
  const i = p.initEvent(e, { target: this.el, type: "dropout" });
4304
4304
  if (this.option.out && this.option.out(i, this._ui(R.dragElement)), this.triggerEvent("dropout", i), R.dropElement === this && (delete R.dropElement, !t)) {
4305
- let n, o = this.el.parentElement;
4306
- for (; !n && o; )
4307
- n = (s = o.ddElement) == null ? void 0 : s.ddDroppable, o = o.parentElement;
4305
+ let n, r = this.el.parentElement;
4306
+ for (; !n && r; )
4307
+ n = (s = r.ddElement) == null ? void 0 : s.ddDroppable, r = r.parentElement;
4308
4308
  n && n._mouseEnter(e);
4309
4309
  }
4310
4310
  }
@@ -4385,12 +4385,12 @@ class Dr {
4385
4385
  else if (t === "option")
4386
4386
  n.setupResizable({ [i]: s });
4387
4387
  else {
4388
- const r = n.el.gridstackNode.grid;
4389
- let h = n.el.getAttribute("gs-resize-handles") || r.opts.resizable.handles || "e,s,se";
4388
+ const o = n.el.gridstackNode.grid;
4389
+ let h = n.el.getAttribute("gs-resize-handles") || o.opts.resizable.handles || "e,s,se";
4390
4390
  h === "all" && (h = "n,e,s,w,se,sw,ne,nw");
4391
- const c = !r.opts.alwaysShowResizeHandle;
4391
+ const c = !o.opts.alwaysShowResizeHandle;
4392
4392
  n.setupResizable({
4393
- ...r.opts.resizable,
4393
+ ...o.opts.resizable,
4394
4394
  handles: h,
4395
4395
  autoHide: c,
4396
4396
  start: t.start,
@@ -4422,9 +4422,9 @@ class Dr {
4422
4422
  else if (t === "option")
4423
4423
  n.setupDraggable({ [i]: s });
4424
4424
  else {
4425
- const o = n.el.gridstackNode.grid;
4425
+ const r = n.el.gridstackNode.grid;
4426
4426
  n.setupDraggable({
4427
- ...o.opts.draggable,
4427
+ ...r.opts.draggable,
4428
4428
  // containment: (grid.parentGridNode && grid.opts.dragOut === false) ? grid.el.parentElement : (grid.opts.draggable.containment || null),
4429
4429
  start: t.start,
4430
4430
  stop: t.stop,
@@ -4467,7 +4467,7 @@ class Dr {
4467
4467
  /** @internal returns a list of DD elements, creating them on the fly by default unless option is to destroy or disable */
4468
4468
  _getDDElements(e, t) {
4469
4469
  const i = e.gridstack || t !== "destroy" && t !== "disable", s = p.getElements(e);
4470
- return s.length ? s.map((o) => o.ddElement || (i ? ki.init(o) : null)).filter((o) => o) : [];
4470
+ return s.length ? s.map((r) => r.ddElement || (i ? ki.init(r) : null)).filter((r) => r) : [];
4471
4471
  }
4472
4472
  }
4473
4473
  /*!
@@ -4527,8 +4527,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4527
4527
  return null;
4528
4528
  let i = e;
4529
4529
  if (i.gridstack) {
4530
- const o = i.gridstack;
4531
- return t && (o.opts = { ...o.opts, ...t }), t.children !== void 0 && o.load(t.children), o;
4530
+ const r = i.gridstack;
4531
+ return t && (r.opts = { ...r.opts, ...t }), t.children !== void 0 && r.load(t.children), r;
4532
4532
  }
4533
4533
  return (!e.classList.contains("grid-stack") || x.addRemoveCB) && (x.addRemoveCB ? i = x.addRemoveCB(e, t, !0, !0) : i = p.createDiv(["grid-stack", t.class], e)), x.init(t, i);
4534
4534
  }
@@ -4582,8 +4582,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4582
4582
  }
4583
4583
  };
4584
4584
  e.getAttribute("gs-animate") && (n.animate = p.toBool(e.getAttribute("gs-animate"))), t = p.defaults(t, n), this._initMargin(), this.checkDynamicColumn(), this._updateColumnVar(t), t.rtl === "auto" && (t.rtl = e.style.direction === "rtl"), t.rtl && this.el.classList.add("grid-stack-rtl");
4585
- const o = this.el.closest("." + ce.itemClass), r = o == null ? void 0 : o.gridstackNode;
4586
- if (r && (r.subGrid = this, this.parentGridNode = r, this.el.classList.add("grid-stack-nested"), r.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = t.cellHeight === "auto", this._isAutoCellHeight || t.cellHeight === "initial")
4585
+ const r = this.el.closest("." + ce.itemClass), o = r == null ? void 0 : r.gridstackNode;
4586
+ if (o && (o.subGrid = this, this.parentGridNode = o, this.el.classList.add("grid-stack-nested"), o.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = t.cellHeight === "auto", this._isAutoCellHeight || t.cellHeight === "initial")
4587
4587
  this.cellHeight(void 0);
4588
4588
  else {
4589
4589
  typeof t.cellHeight == "number" && t.cellHeightUnit && t.cellHeightUnit !== ce.cellHeightUnit && (t.cellHeight = t.cellHeight + t.cellHeightUnit, delete t.cellHeightUnit);
@@ -4653,8 +4653,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4653
4653
  createWidgetDivs(e) {
4654
4654
  const t = p.createDiv(["grid-stack-item", this.opts.itemClass]), i = p.createDiv(["grid-stack-item-content"], t);
4655
4655
  return p.lazyLoad(e) ? e.visibleObservable || (e.visibleObservable = new IntersectionObserver(([s]) => {
4656
- var n, o;
4657
- s.isIntersecting && ((n = e.visibleObservable) == null || n.disconnect(), delete e.visibleObservable, x.renderCB(i, e), (o = e.grid) == null || o.prepareDragDrop(e.el));
4656
+ var n, r;
4657
+ s.isIntersecting && ((n = e.visibleObservable) == null || n.disconnect(), delete e.visibleObservable, x.renderCB(i, e), (r = e.grid) == null || r.prepareDragDrop(e.el));
4658
4658
  }), window.setTimeout(() => {
4659
4659
  var s;
4660
4660
  return (s = e.visibleObservable) == null ? void 0 : s.observe(t);
@@ -4670,13 +4670,13 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4670
4670
  * @returns newly created grid
4671
4671
  */
4672
4672
  makeSubGrid(e, t, i, s = !0) {
4673
- var y, v, w;
4673
+ var y, v, b;
4674
4674
  let n = e.gridstackNode;
4675
4675
  if (n || (n = this.makeWidget(e).gridstackNode), (y = n.subGrid) != null && y.el)
4676
4676
  return n.subGrid;
4677
- let o, r = this;
4678
- for (; r && !o; )
4679
- o = (v = r.opts) == null ? void 0 : v.subGridOpts, r = (w = r.parentGridNode) == null ? void 0 : w.grid;
4677
+ let r, o = this;
4678
+ for (; o && !r; )
4679
+ r = (v = o.opts) == null ? void 0 : v.subGridOpts, o = (b = o.parentGridNode) == null ? void 0 : b.grid;
4680
4680
  t = p.cloneDeep({
4681
4681
  // by default sub-grid inherit from us | parent, other than id, children, etc...
4682
4682
  ...this.opts,
@@ -4686,15 +4686,15 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4686
4686
  columnOpts: void 0,
4687
4687
  layout: "list",
4688
4688
  subGridOpts: void 0,
4689
- ...o || {},
4689
+ ...r || {},
4690
4690
  ...t || n.subGridOpts || {}
4691
4691
  }), n.subGridOpts = t;
4692
4692
  let h;
4693
4693
  t.column === "auto" && (h = !0, t.column = Math.max(n.w || 1, (i == null ? void 0 : i.w) || 1), delete t.columnOpts);
4694
4694
  let c = n.el.querySelector(".grid-stack-item-content"), l, d;
4695
4695
  if (s && (this._removeDD(n.el), d = { ...n, x: 0, y: 0 }, p.removeInternalForSave(d), delete d.subGridOpts, n.content && (d.content = n.content, delete n.content), x.addRemoveCB ? l = x.addRemoveCB(this.el, d, !0, !1) : (l = p.createDiv(["grid-stack-item"]), l.appendChild(c), c = p.createDiv(["grid-stack-item-content"], n.el)), this.prepareDragDrop(n.el)), i) {
4696
- const B = h ? t.column : n.w, T = n.h + i.h, A = n.el.style;
4697
- A.transition = "none", this.update(n.el, { w: B, h: T }), setTimeout(() => A.transition = null);
4696
+ const O = h ? t.column : n.w, E = n.h + i.h, A = n.el.style;
4697
+ A.transition = "none", this.update(n.el, { w: O, h: E }), setTimeout(() => A.transition = null);
4698
4698
  }
4699
4699
  const f = n.subGrid = x.addGrid(c, t);
4700
4700
  return i != null && i._moving && (f._isTemp = !0), h && (f._autoColumn = !0), s && f.makeWidget(l, d), i && (i._moving ? window.setTimeout(() => p.simulateMouseEvent(i._event, "mouseenter", f.el), 0) : f.makeWidget(n.el, n)), this.resizeToContentCheck(!1, n), f;
@@ -4725,21 +4725,21 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4725
4725
  */
4726
4726
  save(e = !0, t = !1, i = x.saveCB, s) {
4727
4727
  const n = this.engine.save(e, i, s);
4728
- if (n.forEach((o) => {
4729
- var r;
4730
- if (e && o.el && !o.subGrid && !i) {
4731
- const h = o.el.querySelector(".grid-stack-item-content");
4732
- o.content = h == null ? void 0 : h.innerHTML, o.content || delete o.content;
4733
- } else if (!e && !i && delete o.content, (r = o.subGrid) != null && r.el) {
4734
- const h = o.w || o.subGrid.getColumn(), c = o.subGrid.save(e, t, i, h);
4735
- o.subGridOpts = t ? c : { children: c }, delete o.subGrid;
4728
+ if (n.forEach((r) => {
4729
+ var o;
4730
+ if (e && r.el && !r.subGrid && !i) {
4731
+ const h = r.el.querySelector(".grid-stack-item-content");
4732
+ r.content = h == null ? void 0 : h.innerHTML, r.content || delete r.content;
4733
+ } else if (!e && !i && delete r.content, (o = r.subGrid) != null && o.el) {
4734
+ const h = r.w || r.subGrid.getColumn(), c = r.subGrid.save(e, t, i, h);
4735
+ r.subGridOpts = t ? c : { children: c }, delete r.subGrid;
4736
4736
  }
4737
- delete o.el;
4737
+ delete r.el;
4738
4738
  }), t) {
4739
- const o = p.cloneDeep(this.opts);
4740
- o.marginBottom === o.marginTop && o.marginRight === o.marginLeft && o.marginTop === o.marginRight && (o.margin = o.marginTop, delete o.marginTop, delete o.marginRight, delete o.marginBottom, delete o.marginLeft), o.rtl === (this.el.style.direction === "rtl") && (o.rtl = "auto"), this._isAutoCellHeight && (o.cellHeight = "auto"), this._autoColumn && (o.column = "auto");
4741
- const r = o._alwaysShowResizeHandle;
4742
- return delete o._alwaysShowResizeHandle, r !== void 0 ? o.alwaysShowResizeHandle = r : delete o.alwaysShowResizeHandle, p.removeInternalAndSame(o, ce), o.children = n, o;
4739
+ const r = p.cloneDeep(this.opts);
4740
+ r.marginBottom === r.marginTop && r.marginRight === r.marginLeft && r.marginTop === r.marginRight && (r.margin = r.marginTop, delete r.marginTop, delete r.marginRight, delete r.marginBottom, delete r.marginLeft), r.rtl === (this.el.style.direction === "rtl") && (r.rtl = "auto"), this._isAutoCellHeight && (r.cellHeight = "auto"), this._autoColumn && (r.column = "auto");
4741
+ const o = r._alwaysShowResizeHandle;
4742
+ return delete r._alwaysShowResizeHandle, o !== void 0 ? r.alwaysShowResizeHandle = o : delete r.alwaysShowResizeHandle, p.removeInternalAndSame(r, ce), r.children = n, r;
4743
4743
  }
4744
4744
  return n;
4745
4745
  }
@@ -4790,13 +4790,13 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4790
4790
  }), s > this.engine.defaultColumn && (this.engine.defaultColumn = s), s > i && (this.engine.nodes.length === 0 && this.responseLayout ? (this.engine.nodes = e, this.engine.columnChanged(s, i, this.responseLayout), e = this.engine.nodes, this.engine.nodes = [], delete this.responseLayout) : this.engine.cacheLayout(e, s, !0));
4791
4791
  const n = x.addRemoveCB;
4792
4792
  typeof t == "function" && (x.addRemoveCB = t);
4793
- const o = [];
4793
+ const r = [];
4794
4794
  this.batchUpdate();
4795
- const r = !this.engine.nodes.length, h = r && this.opts.animate;
4796
- h && this.setAnimation(!1), !r && t && [...this.engine.nodes].forEach((d) => {
4795
+ const o = !this.engine.nodes.length, h = o && this.opts.animate;
4796
+ h && this.setAnimation(!1), !o && t && [...this.engine.nodes].forEach((d) => {
4797
4797
  if (!d.id)
4798
4798
  return;
4799
- p.find(e, d.id) || (x.addRemoveCB && x.addRemoveCB(this.el, d, !1, !1), o.push(d), this.removeWidget(d.el, !0, !1));
4799
+ p.find(e, d.id) || (x.addRemoveCB && x.addRemoveCB(this.el, d, !1, !1), r.push(d), this.removeWidget(d.el, !0, !1));
4800
4800
  }), this.engine._loading = !0;
4801
4801
  const c = [];
4802
4802
  return this.engine.nodes = this.engine.nodes.filter((l) => p.find(e, l.id) ? (c.push(l), !1) : !0), e.forEach((l) => {
@@ -4808,7 +4808,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4808
4808
  y && y.gridstack && y.gridstack.load(l.subGridOpts.children);
4809
4809
  }
4810
4810
  } else t && this.addWidget(l);
4811
- }), delete this.engine._loading, this.engine.removedNodes = o, this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this.engine.skipCacheUpdate, n ? x.addRemoveCB = n : delete x.addRemoveCB, h && this.setAnimation(!0, !0), this;
4811
+ }), delete this.engine._loading, this.engine.removedNodes = r, this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this.engine.skipCacheUpdate, n ? x.addRemoveCB = n : delete x.addRemoveCB, h && this.setAnimation(!0, !0), this;
4812
4812
  }
4813
4813
  /**
4814
4814
  * use before calling a bunch of `addWidget()` to prevent un-necessary relayouts in between (more efficient)
@@ -4897,7 +4897,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4897
4897
  }
4898
4898
  /** checks for dynamic column count for our current size, returning true if changed */
4899
4899
  checkDynamicColumn() {
4900
- var n, o;
4900
+ var n, r;
4901
4901
  const e = this.opts.columnOpts;
4902
4902
  if (!e || !e.columnWidth && !((n = e.breakpoints) != null && n.length))
4903
4903
  return !1;
@@ -4908,13 +4908,13 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4908
4908
  i = Math.min(Math.round(s / e.columnWidth) || 1, e.columnMax);
4909
4909
  else {
4910
4910
  i = e.columnMax;
4911
- let r = 0;
4912
- for (; r < e.breakpoints.length && s <= e.breakpoints[r].w; )
4913
- i = e.breakpoints[r++].c || t;
4911
+ let o = 0;
4912
+ for (; o < e.breakpoints.length && s <= e.breakpoints[o].w; )
4913
+ i = e.breakpoints[o++].c || t;
4914
4914
  }
4915
4915
  if (i !== t) {
4916
- const r = (o = e.breakpoints) == null ? void 0 : o.find((h) => h.c === i);
4917
- return this.column(i, (r == null ? void 0 : r.layout) || e.layout), !0;
4916
+ const o = (r = e.breakpoints) == null ? void 0 : r.find((h) => h.c === i);
4917
+ return this.column(i, (o == null ? void 0 : o.layout) || e.layout), !0;
4918
4918
  }
4919
4919
  return !1;
4920
4920
  }
@@ -5065,8 +5065,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
5065
5065
  const i = this.el.getBoundingClientRect();
5066
5066
  let s;
5067
5067
  t ? s = { top: i.top + document.documentElement.scrollTop, left: i.left } : s = { top: this.el.offsetTop, left: this.el.offsetLeft };
5068
- const n = e.left - s.left, o = e.top - s.top, r = i.width / this.getColumn(), h = i.height / parseInt(this.el.getAttribute("gs-current-row"));
5069
- return { x: Math.floor(n / r), y: Math.floor(o / h) };
5068
+ const n = e.left - s.left, r = e.top - s.top, o = i.width / this.getColumn(), h = i.height / parseInt(this.el.getAttribute("gs-current-row"));
5069
+ return { x: Math.floor(n / o), y: Math.floor(r / h) };
5070
5070
  }
5071
5071
  /**
5072
5072
  * Returns the current number of rows, which will be at least `minRow` if set.
@@ -5167,7 +5167,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
5167
5167
  if (s.parentElement && s.parentElement !== this.el)
5168
5168
  return;
5169
5169
  let n = s.gridstackNode;
5170
- n || (n = this.engine.nodes.find((o) => s === o.el)), n && (t && x.addRemoveCB && x.addRemoveCB(this.el, n, !1, !1), delete s.gridstackNode, this._removeDD(s), this.engine.removeNode(n, t, i), t && s.parentElement && s.remove());
5170
+ n || (n = this.engine.nodes.find((r) => s === r.el)), n && (t && x.addRemoveCB && x.addRemoveCB(this.el, n, !1, !1), delete s.gridstackNode, this._removeDD(s), this.engine.removeNode(n, t, i), t && s.parentElement && s.remove());
5171
5171
  }), i && (this._triggerRemoveEvent(), this._triggerChangeEvent()), this) : (console.error("Error: GridStack.removeWidget(undefined) called"), this);
5172
5172
  }
5173
5173
  /**
@@ -5250,22 +5250,22 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
5250
5250
  return;
5251
5251
  const n = { ...p.copyPos({}, s), ...p.cloneDeep(t) };
5252
5252
  this.engine.nodeBoundFix(n), delete n.autoPosition;
5253
- const o = ["x", "y", "w", "h"];
5254
- let r;
5255
- if (o.some((d) => n[d] !== void 0 && n[d] !== s[d]) && (r = {}, o.forEach((d) => {
5256
- r[d] = n[d] !== void 0 ? n[d] : s[d], delete n[d];
5257
- })), !r && (n.minW || n.minH || n.maxW || n.maxH) && (r = {}), n.content !== void 0) {
5253
+ const r = ["x", "y", "w", "h"];
5254
+ let o;
5255
+ if (r.some((d) => n[d] !== void 0 && n[d] !== s[d]) && (o = {}, r.forEach((d) => {
5256
+ o[d] = n[d] !== void 0 ? n[d] : s[d], delete n[d];
5257
+ })), !o && (n.minW || n.minH || n.maxW || n.maxH) && (o = {}), n.content !== void 0) {
5258
5258
  const d = i.querySelector(".grid-stack-item-content");
5259
5259
  d && d.textContent !== n.content && (s.content = n.content, x.renderCB(d, n), (l = s.subGrid) != null && l.el && (d.appendChild(s.subGrid.el), s.subGrid._updateContainerHeight())), delete n.content;
5260
5260
  }
5261
5261
  let h = !1, c = !1;
5262
5262
  for (const d in n)
5263
5263
  d[0] !== "_" && s[d] !== n[d] && (s[d] = n[d], h = !0, c = c || !this.opts.staticGrid && (d === "noResize" || d === "noMove" || d === "locked"));
5264
- if (p.sanitizeMinMax(s), r) {
5265
- const d = r.w !== void 0 && r.w !== s.w;
5266
- this.moveNode(s, r), d && s.subGrid ? s.subGrid.onResize(this.hasAnimationCSS() ? s.w : void 0) : this.resizeToContentCheck(d, s), delete s._orig;
5264
+ if (p.sanitizeMinMax(s), o) {
5265
+ const d = o.w !== void 0 && o.w !== s.w;
5266
+ this.moveNode(s, o), d && s.subGrid ? s.subGrid.onResize(this.hasAnimationCSS() ? s.w : void 0) : this.resizeToContentCheck(d, s), delete s._orig;
5267
5267
  }
5268
- (r || h) && this._writeAttr(i, s), c && this.prepareDragDrop(s.el), x.updateCB && x.updateCB(s);
5268
+ (o || h) && this._writeAttr(i, s), c && this.prepareDragDrop(s.el), x.updateCB && x.updateCB(s);
5269
5269
  }), this;
5270
5270
  }
5271
5271
  moveNode(e, t) {
@@ -5303,20 +5303,20 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
5303
5303
  const s = i.getCellHeight(!0);
5304
5304
  if (!s)
5305
5305
  return;
5306
- let n = t.h ? t.h * s : e.clientHeight, o;
5307
- if (t.resizeToContentParent && (o = e.querySelector(t.resizeToContentParent)), o || (o = e.querySelector(x.resizeToContentParent)), !o)
5306
+ let n = t.h ? t.h * s : e.clientHeight, r;
5307
+ if (t.resizeToContentParent && (r = e.querySelector(t.resizeToContentParent)), r || (r = e.querySelector(x.resizeToContentParent)), !r)
5308
5308
  return;
5309
- const r = e.clientHeight - o.clientHeight, h = t.h ? t.h * s - r : o.clientHeight;
5309
+ const o = e.clientHeight - r.clientHeight, h = t.h ? t.h * s - o : r.clientHeight;
5310
5310
  let c;
5311
5311
  if (t.subGrid) {
5312
5312
  c = t.subGrid.getRow() * t.subGrid.getCellHeight(!0);
5313
- const v = t.subGrid.el.getBoundingClientRect(), w = e.getBoundingClientRect();
5314
- c += v.top - w.top;
5313
+ const v = t.subGrid.el.getBoundingClientRect(), b = e.getBoundingClientRect();
5314
+ c += v.top - b.top;
5315
5315
  } else {
5316
5316
  if ((y = (f = t.subGridOpts) == null ? void 0 : f.children) != null && y.length)
5317
5317
  return;
5318
5318
  {
5319
- const v = o.firstElementChild;
5319
+ const v = r.firstElementChild;
5320
5320
  if (!v) {
5321
5321
  console.error(`Error: GridStack.resizeToContent() widget id:${t.id} '${x.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);
5322
5322
  return;
@@ -5357,14 +5357,14 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
5357
5357
  return;
5358
5358
  const n = { w: s.h, h: s.w, minH: s.minW, minW: s.minH, maxH: s.maxW, maxW: s.maxH };
5359
5359
  if (t) {
5360
- const r = t.left > 0 ? Math.floor(t.left / this.cellWidth()) : 0, h = t.top > 0 ? Math.floor(t.top / this.opts.cellHeight) : 0;
5361
- n.x = s.x + r - (s.h - (h + 1)), n.y = s.y + h - r;
5360
+ const o = t.left > 0 ? Math.floor(t.left / this.cellWidth()) : 0, h = t.top > 0 ? Math.floor(t.top / this.opts.cellHeight) : 0;
5361
+ n.x = s.x + o - (s.h - (h + 1)), n.y = s.y + h - o;
5362
5362
  }
5363
- Object.keys(n).forEach((r) => {
5364
- n[r] === void 0 && delete n[r];
5363
+ Object.keys(n).forEach((o) => {
5364
+ n[o] === void 0 && delete n[o];
5365
5365
  });
5366
- const o = s._orig;
5367
- this.update(i, n), s._orig = o;
5366
+ const r = s._orig;
5367
+ this.update(i, n), s._orig = r;
5368
5368
  }), this;
5369
5369
  }
5370
5370
  /**
@@ -5474,8 +5474,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
5474
5474
  if (!e && !this.opts.minRow) {
5475
5475
  const n = p.parseHeight(getComputedStyle(this.el).minHeight);
5476
5476
  if (n.h > 0 && n.unit === s) {
5477
- const o = Math.floor(n.h / i);
5478
- t < o && (t = o);
5477
+ const r = Math.floor(n.h / i);
5478
+ t < r && (t = r);
5479
5479
  }
5480
5480
  }
5481
5481
  return this.el.setAttribute("gs-current-row", String(t)), this.el.style.removeProperty("min-height"), this.el.style.removeProperty("height"), t && (this.el.style[e ? "minHeight" : "height"] = t * i + s), e && p.shouldSizeToContent(e) && e.grid.resizeToContentCBCheck(e.el), this;
@@ -5579,8 +5579,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
5579
5579
  /** @internal initialize margin top/bottom/left/right and units */
5580
5580
  _initMargin() {
5581
5581
  let e, t = 0, i = [];
5582
- typeof this.opts.margin == "string" && (i = this.opts.margin.split(" ")), i.length === 2 ? (this.opts.marginTop = this.opts.marginBottom = i[0], this.opts.marginLeft = this.opts.marginRight = i[1]) : i.length === 4 ? (this.opts.marginTop = i[0], this.opts.marginRight = i[1], this.opts.marginBottom = i[2], this.opts.marginLeft = i[3]) : (e = p.parseHeight(this.opts.margin), this.opts.marginUnit = e.unit, t = this.opts.margin = e.h), ["marginTop", "marginRight", "marginBottom", "marginLeft"].forEach((o) => {
5583
- this.opts[o] === void 0 ? this.opts[o] = t : (e = p.parseHeight(this.opts[o]), this.opts[o] = e.h, delete this.opts.margin);
5582
+ typeof this.opts.margin == "string" && (i = this.opts.margin.split(" ")), i.length === 2 ? (this.opts.marginTop = this.opts.marginBottom = i[0], this.opts.marginLeft = this.opts.marginRight = i[1]) : i.length === 4 ? (this.opts.marginTop = i[0], this.opts.marginRight = i[1], this.opts.marginBottom = i[2], this.opts.marginLeft = i[3]) : (e = p.parseHeight(this.opts.margin), this.opts.marginUnit = e.unit, t = this.opts.margin = e.h), ["marginTop", "marginRight", "marginBottom", "marginLeft"].forEach((r) => {
5583
+ this.opts[r] === void 0 ? this.opts[r] = t : (e = p.parseHeight(this.opts[r]), this.opts[r] = e.h, delete this.opts.margin);
5584
5584
  }), this.opts.marginUnit = e.unit, this.opts.marginTop === this.opts.marginBottom && this.opts.marginLeft === this.opts.marginRight && this.opts.marginTop === this.opts.marginRight && (this.opts.margin = this.opts.marginTop);
5585
5585
  const n = this.el.style;
5586
5586
  return n.setProperty("--gs-item-margin-top", `${this.opts.marginTop}${this.opts.marginUnit}`), n.setProperty("--gs-item-margin-bottom", `${this.opts.marginBottom}${this.opts.marginUnit}`), n.setProperty("--gs-item-margin-right", `${this.opts.marginRight}${this.opts.marginUnit}`), n.setProperty("--gs-item-margin-left", `${this.opts.marginLeft}${this.opts.marginUnit}`), this;
@@ -5613,8 +5613,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
5613
5613
  * @param root optional root which defaults to document (for shadow dom pass the parent HTMLDocument)
5614
5614
  */
5615
5615
  static setupDragIn(e, t, i, s = document) {
5616
- (t == null ? void 0 : t.pause) !== void 0 && (R.pauseDrag = t.pause), t = { appendTo: "body", helper: "clone", ...t || {} }, (typeof e == "string" ? p.getElements(e, s) : e).forEach((o, r) => {
5617
- te.isDraggable(o) || te.dragIn(o, t), i != null && i[r] && (o.gridstackNode = i[r]);
5616
+ (t == null ? void 0 : t.pause) !== void 0 && (R.pauseDrag = t.pause), t = { appendTo: "body", helper: "clone", ...t || {} }, (typeof e == "string" ? p.getElements(e, s) : e).forEach((r, o) => {
5617
+ te.isDraggable(r) || te.dragIn(r, t), i != null && i[o] && (r.gridstackNode = i[o]);
5618
5618
  });
5619
5619
  }
5620
5620
  /**
@@ -5773,18 +5773,18 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
5773
5773
  if (this.opts.staticGrid || !this.opts.acceptWidgets && !this.opts.removable)
5774
5774
  return te.droppable(this.el, "destroy"), this;
5775
5775
  let e, t;
5776
- const i = (s, n, o) => {
5776
+ const i = (s, n, r) => {
5777
5777
  var f;
5778
- o = o || n;
5779
- const r = o.gridstackNode;
5780
- if (!r)
5778
+ r = r || n;
5779
+ const o = r.gridstackNode;
5780
+ if (!o)
5781
5781
  return;
5782
- if (!((f = r.grid) != null && f.el)) {
5783
- o.style.transform = `scale(${1 / this.dragTransform.xScale},${1 / this.dragTransform.yScale})`;
5784
- const y = o.getBoundingClientRect();
5785
- o.style.left = y.x + (this.dragTransform.xScale - 1) * (s.clientX - y.x) / this.dragTransform.xScale + "px", o.style.top = y.y + (this.dragTransform.yScale - 1) * (s.clientY - y.y) / this.dragTransform.yScale + "px", o.style.transformOrigin = "0px 0px";
5782
+ if (!((f = o.grid) != null && f.el)) {
5783
+ r.style.transform = `scale(${1 / this.dragTransform.xScale},${1 / this.dragTransform.yScale})`;
5784
+ const y = r.getBoundingClientRect();
5785
+ r.style.left = y.x + (this.dragTransform.xScale - 1) * (s.clientX - y.x) / this.dragTransform.xScale + "px", r.style.top = y.y + (this.dragTransform.yScale - 1) * (s.clientY - y.y) / this.dragTransform.yScale + "px", r.style.transformOrigin = "0px 0px";
5786
5786
  }
5787
- let { top: h, left: c } = o.getBoundingClientRect();
5787
+ let { top: h, left: c } = r.getBoundingClientRect();
5788
5788
  const l = this.el.getBoundingClientRect();
5789
5789
  c -= l.left, h -= l.top;
5790
5790
  const d = {
@@ -5793,17 +5793,17 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
5793
5793
  left: c * this.dragTransform.yScale
5794
5794
  }
5795
5795
  };
5796
- if (r._temporaryRemoved) {
5797
- if (r.x = Math.max(0, Math.round(c / t)), r.y = Math.max(0, Math.round(h / e)), delete r.autoPosition, this.engine.nodeBoundFix(r), !this.engine.willItFit(r)) {
5798
- if (r.autoPosition = !0, !this.engine.willItFit(r)) {
5796
+ if (o._temporaryRemoved) {
5797
+ if (o.x = Math.max(0, Math.round(c / t)), o.y = Math.max(0, Math.round(h / e)), delete o.autoPosition, this.engine.nodeBoundFix(o), !this.engine.willItFit(o)) {
5798
+ if (o.autoPosition = !0, !this.engine.willItFit(o)) {
5799
5799
  te.off(n, "drag");
5800
5800
  return;
5801
5801
  }
5802
- r._willFitPos && (p.copyPos(r, r._willFitPos), delete r._willFitPos);
5802
+ o._willFitPos && (p.copyPos(o, o._willFitPos), delete o._willFitPos);
5803
5803
  }
5804
- this._onStartMoving(o, s, d, r, t, e);
5804
+ this._onStartMoving(r, s, d, o, t, e);
5805
5805
  } else
5806
- this._dragOrResize(o, s, d, r, t, e);
5806
+ this._dragOrResize(r, s, d, o, t, e);
5807
5807
  };
5808
5808
  return te.droppable(this.el, {
5809
5809
  accept: (s) => {
@@ -5812,58 +5812,58 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
5812
5812
  return !0;
5813
5813
  if (!this.opts.acceptWidgets)
5814
5814
  return !1;
5815
- let o = !0;
5815
+ let r = !0;
5816
5816
  if (typeof this.opts.acceptWidgets == "function")
5817
- o = this.opts.acceptWidgets(s);
5817
+ r = this.opts.acceptWidgets(s);
5818
5818
  else {
5819
- const r = this.opts.acceptWidgets === !0 ? ".grid-stack-item" : this.opts.acceptWidgets;
5820
- o = s.matches(r);
5819
+ const o = this.opts.acceptWidgets === !0 ? ".grid-stack-item" : this.opts.acceptWidgets;
5820
+ r = s.matches(o);
5821
5821
  }
5822
- if (o && n && this.opts.maxRow) {
5823
- const r = { w: n.w, h: n.h, minW: n.minW, minH: n.minH };
5824
- o = this.engine.willItFit(r);
5822
+ if (r && n && this.opts.maxRow) {
5823
+ const o = { w: n.w, h: n.h, minW: n.minW, minH: n.minH };
5824
+ r = this.engine.willItFit(o);
5825
5825
  }
5826
- return o;
5826
+ return r;
5827
5827
  }
5828
- }).on(this.el, "dropover", (s, n, o) => {
5829
- let r = (o == null ? void 0 : o.gridstackNode) || n.gridstackNode;
5830
- if ((r == null ? void 0 : r.grid) === this && !r._temporaryRemoved)
5828
+ }).on(this.el, "dropover", (s, n, r) => {
5829
+ let o = (r == null ? void 0 : r.gridstackNode) || n.gridstackNode;
5830
+ if ((o == null ? void 0 : o.grid) === this && !o._temporaryRemoved)
5831
5831
  return !1;
5832
- if (r != null && r._sidebarOrig && (r.w = r._sidebarOrig.w, r.h = r._sidebarOrig.h), r != null && r.grid && r.grid !== this && !r._temporaryRemoved && r.grid._leave(n, o), o = o || n, t = this.cellWidth(), e = this.getCellHeight(!0), !r) {
5833
- const l = o.getAttribute("data-gs-widget") || o.getAttribute("gridstacknode");
5832
+ if (o != null && o._sidebarOrig && (o.w = o._sidebarOrig.w, o.h = o._sidebarOrig.h), o != null && o.grid && o.grid !== this && !o._temporaryRemoved && o.grid._leave(n, r), r = r || n, t = this.cellWidth(), e = this.getCellHeight(!0), !o) {
5833
+ const l = r.getAttribute("data-gs-widget") || r.getAttribute("gridstacknode");
5834
5834
  if (l) {
5835
5835
  try {
5836
- r = JSON.parse(l);
5836
+ o = JSON.parse(l);
5837
5837
  } catch {
5838
5838
  console.error("Gridstack dropover: Bad JSON format: ", l);
5839
5839
  }
5840
- o.removeAttribute("data-gs-widget"), o.removeAttribute("gridstacknode");
5840
+ r.removeAttribute("data-gs-widget"), r.removeAttribute("gridstacknode");
5841
5841
  }
5842
- r || (r = this._readAttr(o)), r._sidebarOrig = { w: r.w, h: r.h };
5842
+ o || (o = this._readAttr(r)), o._sidebarOrig = { w: o.w, h: o.h };
5843
5843
  }
5844
- r.grid || (r.el || (r = { ...r }), r._isExternal = !0, o.gridstackNode = r);
5845
- const h = r.w || Math.round(o.offsetWidth / t) || 1, c = r.h || Math.round(o.offsetHeight / e) || 1;
5846
- return r.grid && r.grid !== this ? (n._gridstackNodeOrig || (n._gridstackNodeOrig = r), n.gridstackNode = r = { ...r, w: h, h: c, grid: this }, delete r.x, delete r.y, this.engine.cleanupNode(r).nodeBoundFix(r), r._initDD = r._isExternal = // DOM needs to be re-parented on a drop
5847
- r._temporaryRemoved = !0) : (r.w = h, r.h = c, r._temporaryRemoved = !0), x._itemRemoving(r.el, !1), te.on(n, "drag", i), i(s, n, o), !1;
5848
- }).on(this.el, "dropout", (s, n, o) => {
5849
- const r = (o == null ? void 0 : o.gridstackNode) || n.gridstackNode;
5850
- return r && (!r.grid || r.grid === this) && (this._leave(n, o), this._isTemp && this.removeAsSubGrid(r)), !1;
5851
- }).on(this.el, "drop", (s, n, o) => {
5844
+ o.grid || (o.el || (o = { ...o }), o._isExternal = !0, r.gridstackNode = o);
5845
+ const h = o.w || Math.round(r.offsetWidth / t) || 1, c = o.h || Math.round(r.offsetHeight / e) || 1;
5846
+ return o.grid && o.grid !== this ? (n._gridstackNodeOrig || (n._gridstackNodeOrig = o), n.gridstackNode = o = { ...o, w: h, h: c, grid: this }, delete o.x, delete o.y, this.engine.cleanupNode(o).nodeBoundFix(o), o._initDD = o._isExternal = // DOM needs to be re-parented on a drop
5847
+ o._temporaryRemoved = !0) : (o.w = h, o.h = c, o._temporaryRemoved = !0), x._itemRemoving(o.el, !1), te.on(n, "drag", i), i(s, n, r), !1;
5848
+ }).on(this.el, "dropout", (s, n, r) => {
5849
+ const o = (r == null ? void 0 : r.gridstackNode) || n.gridstackNode;
5850
+ return o && (!o.grid || o.grid === this) && (this._leave(n, r), this._isTemp && this.removeAsSubGrid(o)), !1;
5851
+ }).on(this.el, "drop", (s, n, r) => {
5852
5852
  var f, y, v;
5853
- const r = (o == null ? void 0 : o.gridstackNode) || n.gridstackNode;
5854
- if ((r == null ? void 0 : r.grid) === this && !r._isExternal)
5853
+ const o = (r == null ? void 0 : r.gridstackNode) || n.gridstackNode;
5854
+ if ((o == null ? void 0 : o.grid) === this && !o._isExternal)
5855
5855
  return !1;
5856
- const h = !!this.placeholder.parentElement, c = n !== o;
5856
+ const h = !!this.placeholder.parentElement, c = n !== r;
5857
5857
  this.placeholder.remove(), delete this.placeholder.gridstackNode, h && this.opts.animate && (this.setAnimation(!1), this.setAnimation(!0, !0));
5858
5858
  const l = n._gridstackNodeOrig;
5859
5859
  if (delete n._gridstackNodeOrig, h && (l != null && l.grid) && l.grid !== this) {
5860
- const w = l.grid;
5861
- w.engine.removeNodeFromLayoutCache(l), w.engine.removedNodes.push(l), w._triggerRemoveEvent()._triggerChangeEvent(), w.parentGridNode && !w.engine.nodes.length && w.opts.subGridDynamic && w.removeAsSubGrid();
5860
+ const b = l.grid;
5861
+ b.engine.removeNodeFromLayoutCache(l), b.engine.removedNodes.push(l), b._triggerRemoveEvent()._triggerChangeEvent(), b.parentGridNode && !b.engine.nodes.length && b.opts.subGridDynamic && b.removeAsSubGrid();
5862
5862
  }
5863
- if (!r || (h && (this.engine.cleanupNode(r), r.grid = this), (f = r.grid) == null || delete f._isTemp, te.off(n, "drag"), o !== n ? (o.remove(), n = o) : n.remove(), this._removeDD(n), !h))
5863
+ if (!o || (h && (this.engine.cleanupNode(o), o.grid = this), (f = o.grid) == null || delete f._isTemp, te.off(n, "drag"), r !== n ? (r.remove(), n = r) : n.remove(), this._removeDD(n), !h))
5864
5864
  return !1;
5865
- const d = (v = (y = r.subGrid) == null ? void 0 : y.el) == null ? void 0 : v.gridstack;
5866
- return p.copyPos(r, this._readAttr(this.placeholder)), p.removePositioningStyles(n), c && (r.content || r.subGridOpts || x.addRemoveCB) ? (delete r.el, n = this.addWidget(r)) : (this._prepareElement(n, !0, r), this.el.appendChild(n), this.resizeToContentCheck(!1, r), d && (d.parentGridNode = r), this._updateContainerHeight()), this.engine.addedNodes.push(r), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({ ...s, type: "dropped" }, l && l.grid ? l : void 0, r), !1;
5865
+ const d = (v = (y = o.subGrid) == null ? void 0 : y.el) == null ? void 0 : v.gridstack;
5866
+ return p.copyPos(o, this._readAttr(this.placeholder)), p.removePositioningStyles(n), c && (o.content || o.subGridOpts || x.addRemoveCB) ? (delete o.el, n = this.addWidget(o)) : (this._prepareElement(n, !0, o), this.el.appendChild(n), this.resizeToContentCheck(!1, o), d && (d.parentGridNode = o), this._updateContainerHeight()), this.engine.addedNodes.push(o), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({ ...s, type: "dropped" }, l && l.grid ? l : void 0, o), !1;
5867
5867
  }), this;
5868
5868
  }
5869
5869
  /** @internal mark item for removal */
@@ -5889,22 +5889,22 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
5889
5889
  const i = e == null ? void 0 : e.gridstackNode;
5890
5890
  if (!i)
5891
5891
  return;
5892
- const s = i.noMove || this.opts.disableDrag, n = i.noResize || this.opts.disableResize, o = this.opts.staticGrid || s && n;
5893
- if ((t || o) && (i._initDD && (this._removeDD(e), delete i._initDD), o && e.classList.add("ui-draggable-disabled", "ui-resizable-disabled"), !t))
5892
+ const s = i.noMove || this.opts.disableDrag, n = i.noResize || this.opts.disableResize, r = this.opts.staticGrid || s && n;
5893
+ if ((t || r) && (i._initDD && (this._removeDD(e), delete i._initDD), r && e.classList.add("ui-draggable-disabled", "ui-resizable-disabled"), !t))
5894
5894
  return this;
5895
5895
  if (!i._initDD) {
5896
- let r, h;
5896
+ let o, h;
5897
5897
  const c = (f, y) => {
5898
- this.triggerEvent(f, f.target), r = this.cellWidth(), h = this.getCellHeight(!0), this._onStartMoving(e, f, y, i, r, h);
5898
+ this.triggerEvent(f, f.target), o = this.cellWidth(), h = this.getCellHeight(!0), this._onStartMoving(e, f, y, i, o, h);
5899
5899
  }, l = (f, y) => {
5900
- this._dragOrResize(e, f, y, i, r, h);
5900
+ this._dragOrResize(e, f, y, i, o, h);
5901
5901
  }, d = (f) => {
5902
5902
  this.placeholder.remove(), delete this.placeholder.gridstackNode, delete i._moving, delete i._resizing, delete i._event, delete i._lastTried;
5903
5903
  const y = i.w !== i._orig.w, v = f.target;
5904
5904
  if (!(!v.gridstackNode || v.gridstackNode.grid !== this)) {
5905
5905
  if (i.el = v, i._isAboutToRemove) {
5906
- const w = e.gridstackNode.grid;
5907
- w._gsEventHandler[f.type] && w._gsEventHandler[f.type](f, v), w.engine.nodes.push(i), w.removeWidget(e, !0, !0);
5906
+ const b = e.gridstackNode.grid;
5907
+ b._gsEventHandler[f.type] && b._gsEventHandler[f.type](f, v), b.engine.nodes.push(i), b.removeWidget(e, !0, !0);
5908
5908
  } else
5909
5909
  p.removePositioningStyles(v), i._temporaryRemoved ? (this._writePosAttr(v, i), this.engine.addNode(i)) : this._writePosAttr(v, i), this.triggerEvent(f, v);
5910
5910
  this._extraDragRow = 0, this._updateContainerHeight(), this._triggerChangeEvent(), this.engine.endUpdate(), f.type === "resizestop" && (Number.isInteger(i.sizeToContent) && (i.sizeToContent = i.h), this.resizeToContentCheck(y, i));
@@ -5923,9 +5923,9 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
5923
5923
  return te.draggable(e, s ? "disable" : "enable").resizable(e, n ? "disable" : "enable"), this;
5924
5924
  }
5925
5925
  /** @internal handles actual drag/resize start */
5926
- _onStartMoving(e, t, i, s, n, o) {
5927
- var r;
5928
- if (this.engine.cleanNodes().beginUpdate(s), this._writePosAttr(this.placeholder, s), this.el.appendChild(this.placeholder), this.placeholder.gridstackNode = s, (r = s.grid) != null && r.el)
5926
+ _onStartMoving(e, t, i, s, n, r) {
5927
+ var o;
5928
+ if (this.engine.cleanNodes().beginUpdate(s), this._writePosAttr(this.placeholder, s), this.el.appendChild(this.placeholder), this.placeholder.gridstackNode = s, (o = s.grid) != null && o.el)
5929
5929
  this.dragTransform = p.getValuesFromTransformedElement(e);
5930
5930
  else if (this.placeholder && this.placeholder.closest(".grid-stack")) {
5931
5931
  const h = this.placeholder.closest(".grid-stack");
@@ -5937,49 +5937,49 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
5937
5937
  yScale: 1,
5938
5938
  yOffset: 0
5939
5939
  };
5940
- if (s.el = this.placeholder, s._lastUiPosition = i.position, s._prevYPix = i.position.top, s._moving = t.type === "dragstart", s._resizing = t.type === "resizestart", delete s._lastTried, t.type === "dropover" && s._temporaryRemoved && (this.engine.addNode(s), s._moving = !0), this.engine.cacheRects(n, o, this.opts.marginTop, this.opts.marginRight, this.opts.marginBottom, this.opts.marginLeft), t.type === "resizestart") {
5940
+ if (s.el = this.placeholder, s._lastUiPosition = i.position, s._prevYPix = i.position.top, s._moving = t.type === "dragstart", s._resizing = t.type === "resizestart", delete s._lastTried, t.type === "dropover" && s._temporaryRemoved && (this.engine.addNode(s), s._moving = !0), this.engine.cacheRects(n, r, this.opts.marginTop, this.opts.marginRight, this.opts.marginBottom, this.opts.marginLeft), t.type === "resizestart") {
5941
5941
  const h = this.getColumn() - s.x, c = (this.opts.maxRow || Number.MAX_SAFE_INTEGER) - s.y;
5942
- te.resizable(e, "option", "minWidth", n * Math.min(s.minW || 1, h)).resizable(e, "option", "minHeight", o * Math.min(s.minH || 1, c)).resizable(e, "option", "maxWidth", n * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, h)).resizable(e, "option", "maxWidthMoveLeft", n * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, s.x + s.w)).resizable(e, "option", "maxHeight", o * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, c)).resizable(e, "option", "maxHeightMoveUp", o * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, s.y + s.h));
5942
+ te.resizable(e, "option", "minWidth", n * Math.min(s.minW || 1, h)).resizable(e, "option", "minHeight", r * Math.min(s.minH || 1, c)).resizable(e, "option", "maxWidth", n * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, h)).resizable(e, "option", "maxWidthMoveLeft", n * Math.min(s.maxW || Number.MAX_SAFE_INTEGER, s.x + s.w)).resizable(e, "option", "maxHeight", r * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, c)).resizable(e, "option", "maxHeightMoveUp", r * Math.min(s.maxH || Number.MAX_SAFE_INTEGER, s.y + s.h));
5943
5943
  }
5944
5944
  }
5945
5945
  /** @internal handles actual drag/resize */
5946
- _dragOrResize(e, t, i, s, n, o) {
5947
- const r = { ...s._orig };
5946
+ _dragOrResize(e, t, i, s, n, r) {
5947
+ const o = { ...s._orig };
5948
5948
  let h, c = this.opts.marginLeft, l = this.opts.marginRight, d = this.opts.marginTop, f = this.opts.marginBottom;
5949
- const y = Math.round(o * 0.1), v = Math.round(n * 0.1);
5949
+ const y = Math.round(r * 0.1), v = Math.round(n * 0.1);
5950
5950
  if (c = Math.min(c, v), l = Math.min(l, v), d = Math.min(d, y), f = Math.min(f, y), t.type === "drag") {
5951
5951
  if (s._temporaryRemoved)
5952
5952
  return;
5953
- const B = i.position.top - s._prevYPix;
5954
- s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && p.updateScrollPosition(e, i.position, B);
5955
- const T = i.position.left + (i.position.left > s._lastUiPosition.left ? -l : c), A = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : d);
5956
- r.x = Math.round(T / n), r.y = Math.round(A / o);
5953
+ const O = i.position.top - s._prevYPix;
5954
+ s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && p.updateScrollPosition(e, i.position, O);
5955
+ const E = i.position.left + (i.position.left > s._lastUiPosition.left ? -l : c), A = i.position.top + (i.position.top > s._lastUiPosition.top ? -f : d);
5956
+ o.x = Math.round(E / n), o.y = Math.round(A / r);
5957
5957
  const S = this._extraDragRow;
5958
- if (this.engine.collide(s, r)) {
5959
- const E = this.getRow();
5960
- let M = Math.max(0, r.y + s.h - E);
5961
- this.opts.maxRow && E + M > this.opts.maxRow && (M = Math.max(0, this.opts.maxRow - E)), this._extraDragRow = M;
5958
+ if (this.engine.collide(s, o)) {
5959
+ const T = this.getRow();
5960
+ let H = Math.max(0, o.y + s.h - T);
5961
+ this.opts.maxRow && T + H > this.opts.maxRow && (H = Math.max(0, this.opts.maxRow - T)), this._extraDragRow = H;
5962
5962
  } else
5963
5963
  this._extraDragRow = 0;
5964
- if (this._extraDragRow !== S && this._updateContainerHeight(), s.x === r.x && s.y === r.y)
5964
+ if (this._extraDragRow !== S && this._updateContainerHeight(), s.x === o.x && s.y === o.y)
5965
5965
  return;
5966
5966
  } else if (t.type === "resize") {
5967
- if (r.x < 0 || (p.updateScrollResize(t, e, o), r.w = Math.round((i.size.width - c) / n), r.h = Math.round((i.size.height - d) / o), s.w === r.w && s.h === r.h) || s._lastTried && s._lastTried.w === r.w && s._lastTried.h === r.h)
5967
+ if (o.x < 0 || (p.updateScrollResize(t, e, r), o.w = Math.round((i.size.width - c) / n), o.h = Math.round((i.size.height - d) / r), s.w === o.w && s.h === o.h) || s._lastTried && s._lastTried.w === o.w && s._lastTried.h === o.h)
5968
5968
  return;
5969
- const B = i.position.left + c, T = i.position.top + d;
5970
- r.x = Math.round(B / n), r.y = Math.round(T / o), h = !0;
5969
+ const O = i.position.left + c, E = i.position.top + d;
5970
+ o.x = Math.round(O / n), o.y = Math.round(E / r), h = !0;
5971
5971
  }
5972
- s._event = t, s._lastTried = r;
5973
- const w = {
5972
+ s._event = t, s._lastTried = o;
5973
+ const b = {
5974
5974
  x: i.position.left + c,
5975
5975
  y: i.position.top + d,
5976
5976
  w: (i.size ? i.size.width : s.w * n) - c - l,
5977
- h: (i.size ? i.size.height : s.h * o) - d - f
5977
+ h: (i.size ? i.size.height : s.h * r) - d - f
5978
5978
  };
5979
- if (this.engine.moveNodeCheck(s, { ...r, cellWidth: n, cellHeight: o, rect: w, resizing: h })) {
5980
- s._lastUiPosition = i.position, this.engine.cacheRects(n, o, d, l, f, c), delete s._skipDown, h && s.subGrid && s.subGrid.onResize(), this._extraDragRow = 0, this._updateContainerHeight();
5981
- const B = t.target;
5982
- s._sidebarOrig || this._writePosAttr(B, s), this.triggerEvent(t, B);
5979
+ if (this.engine.moveNodeCheck(s, { ...o, cellWidth: n, cellHeight: r, rect: b, resizing: h })) {
5980
+ s._lastUiPosition = i.position, this.engine.cacheRects(n, r, d, l, f, c), delete s._skipDown, h && s.subGrid && s.subGrid.onResize(), this._extraDragRow = 0, this._updateContainerHeight();
5981
+ const O = t.target;
5982
+ s._sidebarOrig || this._writePosAttr(O, s), this.triggerEvent(t, O);
5983
5983
  }
5984
5984
  }
5985
5985
  /** call given event callback on our main top-most grid (if we're nested) */
@@ -6016,29 +6016,29 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6016
6016
  }, Mr = {
6017
6017
  key: 0,
6018
6018
  class: "clear-filter-div"
6019
- }, Hr = /* @__PURE__ */ ue({
6019
+ }, Hr = /* @__PURE__ */ de({
6020
6020
  __name: "Filter",
6021
6021
  props: {
6022
6022
  order: {}
6023
6023
  },
6024
6024
  setup(a) {
6025
- const e = a, t = lt(), i = de(() => ({ ...t.Filters })), s = de(() => ({ ...t.displayFilters })), n = de(() => {
6025
+ const e = a, t = lt(), i = ue(() => ({ ...t.Filters })), s = ue(() => ({ ...t.displayFilters })), n = ue(() => {
6026
6026
  const l = i.value;
6027
6027
  return Object.keys(l).map((d) => ({ key: d, value: l[d] })).filter(({ value: d }) => !(d == null || typeof d == "string" && d.trim() === "" || Array.isArray(d) && d.length === 0));
6028
- }), o = de(() => {
6028
+ }), r = ue(() => {
6029
6029
  var d;
6030
6030
  const l = n.value.filter((f) => s.value.hasOwnProperty(f.key) && s.value[f.key]);
6031
6031
  if ((d = e.order) != null && d.length) {
6032
6032
  const f = new Map(e.order.map((y, v) => [y, v]));
6033
6033
  l.sort((y, v) => {
6034
- const w = f.has(y.key) ? f.get(y.key) : Number.MAX_SAFE_INTEGER, B = f.has(v.key) ? f.get(v.key) : Number.MAX_SAFE_INTEGER;
6035
- return w - B || y.key.localeCompare(v.key);
6034
+ const b = f.has(y.key) ? f.get(y.key) : Number.MAX_SAFE_INTEGER, O = f.has(v.key) ? f.get(v.key) : Number.MAX_SAFE_INTEGER;
6035
+ return b - O || y.key.localeCompare(v.key);
6036
6036
  });
6037
6037
  } else
6038
6038
  l.sort((f, y) => f.key.localeCompare(y.key));
6039
6039
  return l;
6040
6040
  });
6041
- function r(l) {
6041
+ function o(l) {
6042
6042
  return Array.isArray(l) ? Ys(l).map((f) => f && typeof f == "object" ? f.name ?? JSON.stringify(f).replace(/[{}"]/g, "") : String(f ?? "")).join(", ") : l && typeof l == "object" ? JSON.stringify(l).replace(/[{}"]/g, "") : String(l ?? "");
6043
6043
  }
6044
6044
  function h(l) {
@@ -6057,22 +6057,22 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6057
6057
  }, {
6058
6058
  default: W(() => [
6059
6059
  D("div", Lr, [
6060
- o.value.length ? (C(!0), z(De, { key: 0 }, qe(o.value, (v) => (C(), Q(Y(Js), {
6060
+ r.value.length ? (C(!0), z(De, { key: 0 }, qe(r.value, (v) => (C(), Q(Y(Js), {
6061
6061
  class: "color-background",
6062
6062
  key: v.key,
6063
6063
  closable: "",
6064
- onClose: (w) => h(v.key),
6064
+ onClose: (b) => h(v.key),
6065
6065
  effect: "dark",
6066
6066
  type: "info"
6067
6067
  }, {
6068
6068
  default: W(() => [
6069
6069
  D("b", Nr, pe(v.key) + ": ", 1),
6070
- D("span", zr, pe(r(v.value)), 1)
6070
+ D("span", zr, pe(o(v.value)), 1)
6071
6071
  ]),
6072
6072
  _: 2
6073
6073
  }, 1032, ["onClose"]))), 128)) : (C(), z("span", Or))
6074
6074
  ]),
6075
- o.value.length ? (C(), z("div", Mr, [
6075
+ r.value.length ? (C(), z("div", Mr, [
6076
6076
  V(Y(ri), {
6077
6077
  placement: "top-start",
6078
6078
  content: "Clear All Filters"
@@ -6096,7 +6096,7 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6096
6096
  });
6097
6097
  };
6098
6098
  }
6099
- }), Ir = /* @__PURE__ */ Le(Hr, [["__scopeId", "data-v-55b985b8"]]), Pr = {
6099
+ }), Pr = /* @__PURE__ */ Le(Hr, [["__scopeId", "data-v-55b985b8"]]), Ir = {
6100
6100
  key: 0,
6101
6101
  class: "content-header dash-header-visible stick-to-top tw-flex tw-flex-row tw-items-center tw-justify-between tw-h-10"
6102
6102
  }, Br = { class: "editing-div" }, $r = { class: "tw-m-4 tw-leading-none tw-pl-1 widget-name" }, Fr = { class: "header-slot-icon" }, Ur = {
@@ -6117,15 +6117,15 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6117
6117
  hideHeader: Boolean
6118
6118
  },
6119
6119
  setup(a) {
6120
- const e = lt(), t = a, i = P(null);
6120
+ const e = lt(), t = a, i = B(null);
6121
6121
  fe(() => t.widgetName, (h) => {
6122
6122
  i.value = h;
6123
6123
  }, { immediate: !0 });
6124
- const s = P(!1), n = P(null);
6125
- function o() {
6124
+ const s = B(!1), n = B(null);
6125
+ function r() {
6126
6126
  s.value = !0, n.value && n.value.focus();
6127
6127
  }
6128
- function r() {
6128
+ function o() {
6129
6129
  if (!s.value)
6130
6130
  return;
6131
6131
  s.value = !1;
@@ -6138,10 +6138,10 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6138
6138
  D("div", Wr, [
6139
6139
  Tt(h.$slots, "default", {}, void 0, !0)
6140
6140
  ])
6141
- ])) : (C(), z("div", Pr, [
6141
+ ])) : (C(), z("div", Ir, [
6142
6142
  D("div", null, [
6143
6143
  Me((C(), z("div", {
6144
- onKeyup: us(r, ["enter"]),
6144
+ onKeyup: us(o, ["enter"]),
6145
6145
  class: "tw-flex"
6146
6146
  }, [
6147
6147
  Me(D("div", Br, [
@@ -6156,7 +6156,7 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6156
6156
  [Rt, s.value]
6157
6157
  ]),
6158
6158
  Me(D("div", {
6159
- onClick: c[2] || (c[2] = (d) => o()),
6159
+ onClick: c[2] || (c[2] = (d) => r()),
6160
6160
  class: "visible-div"
6161
6161
  }, [
6162
6162
  D("div", $r, pe(i.value), 1)
@@ -6164,7 +6164,7 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6164
6164
  [Rt, !s.value]
6165
6165
  ])
6166
6166
  ], 32)), [
6167
- [Y(ms), r]
6167
+ [Y(ms), o]
6168
6168
  ])
6169
6169
  ]),
6170
6170
  D("div", Fr, [
@@ -6186,21 +6186,21 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6186
6186
  },
6187
6187
  emits: ["removeWidget", "toggle-lock"],
6188
6188
  setup(a, { emit: e }) {
6189
- const t = e, i = a, s = P(null), n = P(!1);
6190
- fe(() => i.isLocked, (T) => n.value = T, { immediate: !0 });
6191
- const o = P(null);
6192
- fe(() => i.hideWidgetsHeader, (T) => o.value = T, { immediate: !0 });
6193
- const r = P(!1), h = P(!1), c = () => document.fullscreenElement === s.value;
6189
+ const t = e, i = a, s = B(null), n = B(!1);
6190
+ fe(() => i.isLocked, (E) => n.value = E, { immediate: !0 });
6191
+ const r = B(null);
6192
+ fe(() => i.hideWidgetsHeader, (E) => r.value = E, { immediate: !0 });
6193
+ const o = B(!1), h = B(!1), c = () => document.fullscreenElement === s.value;
6194
6194
  async function l() {
6195
- const T = s.value;
6196
- if (T) {
6197
- if (T.requestFullscreen)
6195
+ const E = s.value;
6196
+ if (E) {
6197
+ if (E.requestFullscreen)
6198
6198
  try {
6199
- await T.requestFullscreen(), h.value = !0, r.value = !0;
6199
+ await E.requestFullscreen(), h.value = !0, o.value = !0;
6200
6200
  return;
6201
6201
  } catch {
6202
6202
  }
6203
- h.value = !1, r.value = !0, w(!0);
6203
+ h.value = !1, o.value = !0, b(!0);
6204
6204
  }
6205
6205
  }
6206
6206
  async function d() {
@@ -6208,72 +6208,72 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6208
6208
  try {
6209
6209
  await document.exitFullscreen();
6210
6210
  } catch {
6211
- h.value = !1, r.value = !1, w(!1);
6211
+ h.value = !1, o.value = !1, b(!1);
6212
6212
  }
6213
6213
  return;
6214
6214
  }
6215
- h.value = !1, r.value = !1, w(!1);
6215
+ h.value = !1, o.value = !1, b(!1);
6216
6216
  }
6217
6217
  function f() {
6218
- r.value ? d() : l();
6218
+ o.value ? d() : l();
6219
6219
  }
6220
6220
  function y() {
6221
6221
  t("toggle-lock", { id: i.widgetID, isLocked: n.value });
6222
6222
  }
6223
6223
  let v = "";
6224
- function w(T) {
6225
- T ? (v = document.body.style.overflow || "", document.body.style.overflow = "hidden") : document.body.style.overflow = v;
6224
+ function b(E) {
6225
+ E ? (v = document.body.style.overflow || "", document.body.style.overflow = "hidden") : document.body.style.overflow = v;
6226
6226
  }
6227
- function B() {
6228
- h.value = !!document.fullscreenElement, h.value ? (r.value = c(), r.value || w(!1)) : (r.value = !1, w(!1));
6227
+ function O() {
6228
+ h.value = !!document.fullscreenElement, h.value ? (o.value = c(), o.value || b(!1)) : (o.value = !1, b(!1));
6229
6229
  }
6230
6230
  return ds(() => {
6231
- document.addEventListener("fullscreenchange", B);
6231
+ document.addEventListener("fullscreenchange", O);
6232
6232
  }), fs(() => {
6233
- document.removeEventListener("fullscreenchange", B), w(!1);
6234
- }), (T, A) => {
6233
+ document.removeEventListener("fullscreenchange", O), b(!1);
6234
+ }), (E, A) => {
6235
6235
  const S = ie("el-icon");
6236
6236
  return C(), z("div", {
6237
6237
  ref_key: "instance",
6238
6238
  ref: s,
6239
6239
  class: ps(["grid-stack-item-content", {
6240
6240
  "locked-widget": a.isLocked,
6241
- "gs-fullscreen": r.value && !h.value
6241
+ "gs-fullscreen": o.value && !h.value
6242
6242
  }])
6243
6243
  }, [
6244
6244
  (C(), Q(ji(a.componentTag), di({
6245
- class: ["widget-body", { "widget-body-no-head": o.value }],
6245
+ class: ["widget-body", { "widget-body-no-head": r.value }],
6246
6246
  widgetID: a.widgetID,
6247
- hideHeader: o.value
6247
+ hideHeader: r.value
6248
6248
  }, i.componentProperties, {
6249
6249
  style: { pointerEvents: n.value ? "none" : "auto" },
6250
6250
  isLocked: n.value
6251
6251
  }), {
6252
- default: W((E) => [
6253
- E ? (C(), Q(Vr, {
6252
+ default: W((T) => [
6253
+ T ? (C(), Q(Vr, {
6254
6254
  key: 0,
6255
6255
  widgetName: i.componentName,
6256
6256
  widgetID: a.widgetID,
6257
6257
  staticMode: a.staticMode,
6258
- hideHeader: o.value
6258
+ hideHeader: r.value
6259
6259
  }, {
6260
6260
  default: W(() => [
6261
6261
  D("div", qr, [
6262
- (C(!0), z(De, null, qe(E.childIcons, (M) => (C(), Q(Y(ri), { placement: "bottom-start" }, {
6262
+ (C(!0), z(De, null, qe(T.childIcons, (H) => (C(), Q(Y(ri), { placement: "bottom-start" }, {
6263
6263
  content: W(() => [
6264
- Oe(pe(M.tooltip), 1)
6264
+ Oe(pe(H.tooltip), 1)
6265
6265
  ]),
6266
6266
  default: W(() => [
6267
- (C(), Q(ji(M.comp), {
6267
+ (C(), Q(ji(H.comp), {
6268
6268
  class: "tw-w-4 header-icon",
6269
- onClick: M.event
6269
+ onClick: H.event
6270
6270
  }, null, 8, ["onClick"]))
6271
6271
  ]),
6272
6272
  _: 2
6273
6273
  }, 1024))), 256)),
6274
6274
  V(Y(ri), { placement: "bottom-start" }, {
6275
6275
  content: W(() => [
6276
- Oe(pe(r.value ? "Exit Fullscreen" : "Fullscreen"), 1)
6276
+ Oe(pe(o.value ? "Exit Fullscreen" : "Fullscreen"), 1)
6277
6277
  ]),
6278
6278
  default: W(() => [
6279
6279
  V(S, {
@@ -6281,7 +6281,7 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6281
6281
  onClick: f
6282
6282
  }, {
6283
6283
  default: W(() => [
6284
- r.value ? (C(), Q(Y(un), { key: 0 })) : (C(), Q(Y(an), { key: 1 }))
6284
+ o.value ? (C(), Q(Y(un), { key: 0 })) : (C(), Q(Y(an), { key: 1 }))
6285
6285
  ]),
6286
6286
  _: 1
6287
6287
  })
@@ -6290,7 +6290,7 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6290
6290
  }),
6291
6291
  V(S, {
6292
6292
  class: "header-icon lock-toggle",
6293
- onClick: A[0] || (A[0] = (M) => y())
6293
+ onClick: A[0] || (A[0] = (H) => y())
6294
6294
  }, {
6295
6295
  default: W(() => [
6296
6296
  n.value ? (C(), Q(Y(cn), { key: 0 })) : (C(), Q(Y(fn), { key: 1 }))
@@ -6300,7 +6300,7 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6300
6300
  !a.staticMode && !a.isLocked ? (C(), Q(S, {
6301
6301
  key: 0,
6302
6302
  class: "item-widget-button",
6303
- onClick: A[1] || (A[1] = (M) => T.$emit("removeWidget"))
6303
+ onClick: A[1] || (A[1] = (H) => E.$emit("removeWidget"))
6304
6304
  }, {
6305
6305
  default: W(() => [
6306
6306
  V(Y(nn))
@@ -6326,7 +6326,7 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6326
6326
  }, Qr = {
6327
6327
  key: 1,
6328
6328
  class: "tw-h-10 dash-header"
6329
- }, Jr = { class: "tw-float-left tw-m-1" }, eo = { class: "tw-m-4 tw-w-50 tw-flex-row tw-flex" }, to = { class: "tw-m-w-4 tw-w-40" }, io = ["gs-x", "gs-y", "gs-w", "gs-h", "gs-id", "id", "props", "gs-locked", "gs-no-move", "gs-no-resize"], so = /* @__PURE__ */ ue({
6329
+ }, Jr = { class: "tw-float-left tw-m-1" }, eo = { class: "tw-m-4 tw-w-50 tw-flex-row tw-flex" }, to = { class: "tw-m-w-4 tw-w-40" }, io = ["gs-x", "gs-y", "gs-w", "gs-h", "gs-id", "id", "props", "gs-locked", "gs-no-move", "gs-no-resize"], so = /* @__PURE__ */ de({
6330
6330
  __name: "Dashboard",
6331
6331
  props: {
6332
6332
  hideHeader: {},
@@ -6334,27 +6334,27 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6334
6334
  },
6335
6335
  setup(a) {
6336
6336
  const e = a, t = lt(), { DASHBOARD_ITEMS: i } = ni(t);
6337
- let s = P("Edit Grid"), n = null;
6338
- const o = P(null);
6339
- let r = 0;
6340
- const h = de(
6337
+ let s = B("Edit Grid"), n = null;
6338
+ const r = B(null);
6339
+ let o = 0;
6340
+ const h = ue(
6341
6341
  () => {
6342
6342
  var g;
6343
6343
  return ((g = e.options) == null ? void 0 : g.hideEditGrid) ?? !1;
6344
6344
  }
6345
- ), c = de(
6345
+ ), c = ue(
6346
6346
  () => {
6347
6347
  var g;
6348
6348
  return ((g = e.options) == null ? void 0 : g.hideHeader) !== void 0 ? e.options.hideHeader : e.hideHeader ?? !1;
6349
6349
  }
6350
6350
  );
6351
- let l = P(!0);
6352
- const d = P([]), { ComponentRegistry: f } = ni(t), y = si({});
6351
+ let l = B(!0);
6352
+ const d = B([]), { ComponentRegistry: f } = ni(t), y = si({});
6353
6353
  Xs(() => {
6354
6354
  var g;
6355
- v(), w(), t.loadFromLocalStorage(), r = ((g = i.value) == null ? void 0 : g.length) + 1;
6355
+ v(), b(), t.loadFromLocalStorage(), o = ((g = i.value) == null ? void 0 : g.length) + 1;
6356
6356
  }), ds(() => {
6357
- T(), S();
6357
+ E(), S();
6358
6358
  }), fs(() => {
6359
6359
  A(), t.unregisterGridProvider();
6360
6360
  });
@@ -6362,13 +6362,13 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6362
6362
  var g, m;
6363
6363
  t.DefaultLayout = (g = e.options) == null ? void 0 : g.defaultLayout, t.setOptionServices((m = e.options) == null ? void 0 : m.services);
6364
6364
  }
6365
- function w() {
6365
+ function b() {
6366
6366
  const g = {
6367
- apiUrl: de(() => {
6367
+ apiUrl: ue(() => {
6368
6368
  var m;
6369
6369
  return (m = t.Services) == null ? void 0 : m.ApiUrl;
6370
6370
  }),
6371
- s3Url: de(() => {
6371
+ s3Url: ue(() => {
6372
6372
  var m;
6373
6373
  return (m = t.Services) == null ? void 0 : m.s3Url;
6374
6374
  }),
@@ -6380,7 +6380,7 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6380
6380
  };
6381
6381
  Ks("dashboard:globalVars", g);
6382
6382
  }
6383
- async function B() {
6383
+ async function O() {
6384
6384
  if (t.resetGridLayout(), await Yi(), !!n) {
6385
6385
  n.batchUpdate(), n.removeAll();
6386
6386
  for (const g of i.value) {
@@ -6394,7 +6394,7 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6394
6394
  n.commit();
6395
6395
  }
6396
6396
  }
6397
- function T() {
6397
+ function E() {
6398
6398
  const g = {
6399
6399
  float: !0,
6400
6400
  column: 12,
@@ -6457,10 +6457,10 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6457
6457
  },
6458
6458
  { deep: !0 }
6459
6459
  );
6460
- function E(g) {
6460
+ function T(g) {
6461
6461
  if (!g)
6462
6462
  return;
6463
- const m = `${g}-${r}`, F = {
6463
+ const m = `${g}-${o}`, F = {
6464
6464
  id: m,
6465
6465
  w: 2,
6466
6466
  h: 6,
@@ -6470,11 +6470,11 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6470
6470
  componentName: g,
6471
6471
  Props: {}
6472
6472
  };
6473
- r++, i.value.push(F), Yi(() => {
6473
+ o++, i.value.push(F), Yi(() => {
6474
6474
  n == null || n.makeWidget(`#${m}`);
6475
6475
  });
6476
6476
  }
6477
- function M(g) {
6477
+ function H(g) {
6478
6478
  var m = i.value.findIndex((N) => N.id == g);
6479
6479
  i.value.splice(m, 1);
6480
6480
  const F = `#${g}`;
@@ -6501,7 +6501,7 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6501
6501
  D("span", Jr, [
6502
6502
  V(F, {
6503
6503
  class: "edit-button",
6504
- onClick: m[1] || (m[1] = (O) => me())
6504
+ onClick: m[1] || (m[1] = (M) => me())
6505
6505
  }, {
6506
6506
  default: W(() => [
6507
6507
  Oe(pe(Y(s)), 1)
@@ -6513,7 +6513,7 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6513
6513
  h.value ? Ve("", !0) : (C(), z("span", Zr, [
6514
6514
  V(F, {
6515
6515
  class: "edit-button",
6516
- onClick: m[0] || (m[0] = (O) => me())
6516
+ onClick: m[0] || (m[0] = (M) => me())
6517
6517
  }, {
6518
6518
  default: W(() => [
6519
6519
  Oe(pe(Y(s)), 1)
@@ -6521,25 +6521,25 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6521
6521
  _: 1
6522
6522
  })
6523
6523
  ])),
6524
- V(Ir)
6524
+ V(Pr)
6525
6525
  ])),
6526
6526
  !Y(l) && !h.value ? (C(), Q(Se, { key: 2 }, {
6527
6527
  default: W(() => [
6528
6528
  D("div", eo, [
6529
6529
  V(le, { placeholder: "Add New Widget" }, {
6530
6530
  default: W(() => [
6531
- (C(!0), z(De, null, qe(d.value, (O) => (C(), Q(N, {
6532
- key: O,
6533
- label: O,
6534
- value: O,
6535
- onClick: (je) => E(O)
6531
+ (C(!0), z(De, null, qe(d.value, (M) => (C(), Q(N, {
6532
+ key: M,
6533
+ label: M,
6534
+ value: M,
6535
+ onClick: (je) => T(M)
6536
6536
  }, null, 8, ["label", "value", "onClick"]))), 128))
6537
6537
  ]),
6538
6538
  _: 1
6539
6539
  }),
6540
6540
  D("div", to, [
6541
6541
  V(F, {
6542
- onClick: m[2] || (m[2] = (O) => B())
6542
+ onClick: m[2] || (m[2] = (M) => O())
6543
6543
  }, {
6544
6544
  default: W(() => [...m[3] || (m[3] = [
6545
6545
  Oe("Reset Grid Layout", -1)
@@ -6553,37 +6553,37 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6553
6553
  })) : Ve("", !0),
6554
6554
  D("div", {
6555
6555
  ref_key: "root",
6556
- ref: o,
6556
+ ref: r,
6557
6557
  class: "grid-stack"
6558
6558
  }, [
6559
- (C(!0), z(De, null, qe(Y(i), (O) => {
6559
+ (C(!0), z(De, null, qe(Y(i), (M) => {
6560
6560
  var je, ht, ut, Ye;
6561
6561
  return C(), z("div", {
6562
6562
  class: "grid-stack-item",
6563
6563
  ref_for: !0,
6564
- ref: (dt) => y[O.id] = dt,
6565
- "gs-x": O.x,
6566
- "gs-y": O.y,
6567
- "gs-w": O.w,
6568
- "gs-h": O.h,
6569
- "gs-id": O.id,
6570
- id: O.id,
6571
- key: O.id,
6572
- props: O.Props,
6573
- "gs-locked": (je = O.Props) == null ? void 0 : je.locked,
6574
- "gs-no-move": (ht = O.Props) == null ? void 0 : ht.locked,
6575
- "gs-no-resize": (ut = O.Props) == null ? void 0 : ut.locked
6564
+ ref: (dt) => y[M.id] = dt,
6565
+ "gs-x": M.x,
6566
+ "gs-y": M.y,
6567
+ "gs-w": M.w,
6568
+ "gs-h": M.h,
6569
+ "gs-id": M.id,
6570
+ id: M.id,
6571
+ key: M.id,
6572
+ props: M.Props,
6573
+ "gs-locked": (je = M.Props) == null ? void 0 : je.locked,
6574
+ "gs-no-move": (ht = M.Props) == null ? void 0 : ht.locked,
6575
+ "gs-no-resize": (ut = M.Props) == null ? void 0 : ut.locked
6576
6576
  }, [
6577
6577
  V(Yr, {
6578
- widgetID: O.id,
6579
- onRemoveWidget: (dt) => M(O.id),
6578
+ widgetID: M.id,
6579
+ onRemoveWidget: (dt) => H(M.id),
6580
6580
  onToggleLock: oe,
6581
6581
  "static-mode": Y(l),
6582
- componentTag: O.component,
6583
- componentProperties: O.Props,
6584
- componentName: O.componentName,
6585
- hideWidgetsHeader: O.hideHeader,
6586
- "is-locked": (Ye = O.Props) == null ? void 0 : Ye.locked
6582
+ componentTag: M.component,
6583
+ componentProperties: M.Props,
6584
+ componentName: M.componentName,
6585
+ hideWidgetsHeader: M.hideHeader,
6586
+ "is-locked": (Ye = M.Props) == null ? void 0 : Ye.locked
6587
6587
  }, null, 8, ["widgetID", "onRemoveWidget", "static-mode", "componentTag", "componentProperties", "componentName", "hideWidgetsHeader", "is-locked"])
6588
6588
  ], 8, io);
6589
6589
  }), 128))
@@ -6591,7 +6591,7 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6591
6591
  ]);
6592
6592
  };
6593
6593
  }
6594
- }), no = /* @__PURE__ */ Le(so, [["__scopeId", "data-v-63d1bf1b"]]), ro = { class: "dashboard-multi-wrap" }, oo = { class: "dash-main-header" }, ao = { class: "header-title" }, lo = { class: "header-description" }, co = { class: "button-group" }, ho = ["onClick"], uo = { class: "dashboard-content" }, fo = /* @__PURE__ */ ue({
6594
+ }), no = /* @__PURE__ */ Le(so, [["__scopeId", "data-v-63d1bf1b"]]), ro = { class: "dashboard-multi-wrap" }, oo = { class: "dash-main-header" }, ao = { class: "header-title" }, lo = { class: "header-description" }, co = { class: "button-group" }, ho = ["onClick"], uo = { class: "dashboard-content" }, fo = /* @__PURE__ */ de({
6595
6595
  __name: "DashboardWrap",
6596
6596
  props: {
6597
6597
  dashboardOptions: {},
@@ -6600,42 +6600,58 @@ const Lr = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Nr = { class:
6600
6600
  headerDescription: { default: "" }
6601
6601
  },
6602
6602
  setup(a) {
6603
- const e = a, t = P(
6604
- e.default || e.dashboardOptions && e.dashboardOptions[0] || {}
6605
- ), i = P(e.dashboardOptions), s = (n) => {
6606
- t.value = n;
6603
+ var f, y, v;
6604
+ const e = a, t = new URLSearchParams(window.location.search), i = ((f = t.get("gene")) == null ? void 0 : f.toUpperCase()) ?? null, s = ((y = t.get("gene2")) == null ? void 0 : y.toUpperCase()) ?? null, n = t.get("dashboard"), r = (b) => b.toLowerCase().replace(/\s+/g, ""), o = n ? ((v = e.dashboardOptions) == null ? void 0 : v.find(
6605
+ (b) => r(b.name) === r(n)
6606
+ )) ?? null : null, h = B(
6607
+ o || e.default || e.dashboardOptions && e.dashboardOptions[0] || {}
6608
+ ), c = B(e.dashboardOptions), l = ue(() => {
6609
+ const b = h.value;
6610
+ return !(b != null && b.defaultLayout) || !i && !s ? b : {
6611
+ ...b,
6612
+ defaultLayout: b.defaultLayout.map((O) => ({
6613
+ ...O,
6614
+ Props: {
6615
+ ...O.Props,
6616
+ ...i ? { initialGene: i, initialGene1: i } : {},
6617
+ ...s ? { initialGene2: s } : {}
6618
+ }
6619
+ }))
6620
+ };
6621
+ }), d = (b) => {
6622
+ h.value = b;
6607
6623
  };
6608
- return (n, o) => {
6609
- var r;
6624
+ return (b, O) => {
6625
+ var E;
6610
6626
  return C(), z("div", ro, [
6611
6627
  D("div", oo, [
6612
6628
  D("h4", ao, pe(a.headerTitle), 1),
6613
6629
  D("p", lo, pe(a.headerDescription), 1),
6614
6630
  D("div", co, [
6615
- (C(!0), z(De, null, qe(i.value, (h) => {
6616
- var c;
6631
+ (C(!0), z(De, null, qe(c.value, (A) => {
6632
+ var S;
6617
6633
  return C(), z("button", {
6618
- key: h.name,
6634
+ key: A.name,
6619
6635
  class: ps([
6620
6636
  "dashboard-button",
6621
- { active: ((c = t.value) == null ? void 0 : c.name) === h.name }
6637
+ { active: ((S = h.value) == null ? void 0 : S.name) === A.name }
6622
6638
  ]),
6623
- onClick: (l) => s(h)
6624
- }, pe(h.name), 11, ho);
6639
+ onClick: (T) => d(A)
6640
+ }, pe(A.name), 11, ho);
6625
6641
  }), 128))
6626
6642
  ])
6627
6643
  ]),
6628
6644
  D("div", uo, [
6629
6645
  (C(), Q(Y(no), {
6630
6646
  class: "dashboard-app",
6631
- key: (r = t.value) == null ? void 0 : r.name,
6632
- options: t.value
6647
+ key: (E = h.value) == null ? void 0 : E.name,
6648
+ options: l.value
6633
6649
  }, null, 8, ["options"]))
6634
6650
  ])
6635
6651
  ]);
6636
6652
  };
6637
6653
  }
6638
- }), bo = /* @__PURE__ */ Le(fo, [["__scopeId", "data-v-857f3bfd"]]);
6654
+ }), bo = /* @__PURE__ */ Le(fo, [["__scopeId", "data-v-5c609848"]]);
6639
6655
  export {
6640
6656
  yo as MarkdownWidget,
6641
6657
  bo as MultiDashboard,