pennsieve-dashboard 0.1.6 → 0.1.8

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,215 +1,182 @@
1
- var Hs = Object.defineProperty;
2
- var Os = (o, e, t) => e in o ? Hs(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
- var O = (o, e, t) => Os(o, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as we, createElementBlock as $, openBlock as R, createElementVNode as z, ref as B, reactive as ns, watch as ce, isRef as Ps, isReactive as $s, markRaw as Bs, computed as Ce, resolveComponent as ie, createBlock as ae, withCtx as q, createVNode as X, Fragment as ze, renderList as it, unref as ue, createTextVNode as We, inject as Us, shallowRef as os, resolveDirective as ls, renderSlot as wt, mergeProps as li, withDirectives as Le, toDisplayString as Ae, withKeys as as, vShow as xt, vModelText as Fs, createCommentVNode as kt, normalizeClass as Ws, resolveDynamicComponent as Fi, provide as Gs, onBeforeMount as Vs, onMounted as qs, onBeforeUnmount as js, defineAsyncComponent as Ys, nextTick as Xs } from "vue";
5
- import { defineStore as Ks, storeToRefs as ti } from "pinia";
6
- import { ElTag as Zs, ElTooltip as hs } from "element-plus";
1
+ var Os = Object.defineProperty;
2
+ var Ps = (o, e, t) => e in o ? Os(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
+ var $ = (o, e, t) => Ps(o, typeof e != "symbol" ? e + "" : e, t);
4
+ import { defineComponent as be, createElementBlock as B, openBlock as S, createElementVNode as N, ref as F, reactive as Qt, isRef as $s, isReactive as Bs, markRaw as Us, computed as de, watch as fe, resolveComponent as ie, createBlock as le, withCtx as V, createVNode as Y, Fragment as Le, renderList as tt, unref as he, createTextVNode as Ae, inject as Fs, shallowRef as os, resolveDirective as ls, renderSlot as vt, mergeProps as ni, withDirectives as De, toDisplayString as Re, withKeys as as, vShow as xt, vModelText as Ws, createCommentVNode as kt, toRaw as Gs, normalizeClass as Vs, resolveDynamicComponent as Fi, provide as qs, onBeforeMount as js, onMounted as Ys, onBeforeUnmount as Xs, defineAsyncComponent as Zs, nextTick as Wi } from "vue";
5
+ import { defineStore as Ks, storeToRefs as Jt } from "pinia";
6
+ import { ElTag as Qs, ElTooltip as hs } from "element-plus";
7
7
  /*! Element Plus Icons Vue v2.3.2 */
8
- var Qs = /* @__PURE__ */ we({
8
+ var Js = /* @__PURE__ */ be({
9
9
  name: "CircleCloseFilled",
10
10
  __name: "circle-close-filled",
11
11
  setup(o) {
12
- return (e, t) => (R(), $("svg", {
12
+ return (e, t) => (S(), B("svg", {
13
13
  xmlns: "http://www.w3.org/2000/svg",
14
14
  viewBox: "0 0 1024 1024"
15
15
  }, [
16
- z("path", {
16
+ N("path", {
17
17
  fill: "currentColor",
18
18
  d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"
19
19
  })
20
20
  ]));
21
21
  }
22
- }), Js = Qs, er = /* @__PURE__ */ we({
22
+ }), er = Js, tr = /* @__PURE__ */ be({
23
23
  name: "Close",
24
24
  __name: "close",
25
25
  setup(o) {
26
- return (e, t) => (R(), $("svg", {
26
+ return (e, t) => (S(), B("svg", {
27
27
  xmlns: "http://www.w3.org/2000/svg",
28
28
  viewBox: "0 0 1024 1024"
29
29
  }, [
30
- z("path", {
30
+ N("path", {
31
31
  fill: "currentColor",
32
32
  d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
33
33
  })
34
34
  ]));
35
35
  }
36
- }), tr = er, ir = /* @__PURE__ */ we({
36
+ }), ir = tr, sr = /* @__PURE__ */ be({
37
37
  name: "Edit",
38
38
  __name: "edit",
39
39
  setup(o) {
40
- return (e, t) => (R(), $("svg", {
40
+ return (e, t) => (S(), B("svg", {
41
41
  xmlns: "http://www.w3.org/2000/svg",
42
42
  viewBox: "0 0 1024 1024"
43
43
  }, [
44
- z("path", {
44
+ N("path", {
45
45
  fill: "currentColor",
46
46
  d: "M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"
47
47
  }),
48
- z("path", {
48
+ N("path", {
49
49
  fill: "currentColor",
50
50
  d: "m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"
51
51
  })
52
52
  ]));
53
53
  }
54
- }), us = ir, sr = /* @__PURE__ */ we({
54
+ }), us = sr, rr = /* @__PURE__ */ be({
55
55
  name: "Lock",
56
56
  __name: "lock",
57
57
  setup(o) {
58
- return (e, t) => (R(), $("svg", {
58
+ return (e, t) => (S(), B("svg", {
59
59
  xmlns: "http://www.w3.org/2000/svg",
60
60
  viewBox: "0 0 1024 1024"
61
61
  }, [
62
- z("path", {
62
+ N("path", {
63
63
  fill: "currentColor",
64
64
  d: "M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"
65
65
  }),
66
- z("path", {
66
+ N("path", {
67
67
  fill: "currentColor",
68
68
  d: "M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"
69
69
  })
70
70
  ]));
71
71
  }
72
- }), rr = sr, nr = /* @__PURE__ */ we({
72
+ }), nr = rr, or = /* @__PURE__ */ be({
73
73
  name: "Unlock",
74
74
  __name: "unlock",
75
75
  setup(o) {
76
- return (e, t) => (R(), $("svg", {
76
+ return (e, t) => (S(), B("svg", {
77
77
  xmlns: "http://www.w3.org/2000/svg",
78
78
  viewBox: "0 0 1024 1024"
79
79
  }, [
80
- z("path", {
80
+ N("path", {
81
81
  fill: "currentColor",
82
82
  d: "M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"
83
83
  }),
84
- z("path", {
84
+ N("path", {
85
85
  fill: "currentColor",
86
86
  d: "M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m178.304-295.296A192.064 192.064 0 0 0 320 320v64h352l96 38.4V448H256V320a256 256 0 0 1 493.76-95.104z"
87
87
  })
88
88
  ]));
89
89
  }
90
- }), or = nr;
91
- const nt = Ks("globalPensieveDashVars", () => {
92
- const o = B([]), e = B({}), t = "dashboard-globalVarsStore", i = B([]), s = B([]), r = B({}), l = ns({});
93
- function n(x, E) {
94
- l[x] = E;
90
+ }), lr = or;
91
+ const rt = Ks("globalPensieveDashVars", () => {
92
+ const o = F([]), e = F({}), t = "dashboard-globalVarsStore", i = F([]), s = F([]), r = F({}), l = Qt({}), n = Qt({});
93
+ function u(T, k, q = !1) {
94
+ l[T] = k, n[T] = q;
95
95
  }
96
- function u(x = {}) {
97
- for (const E of Object.keys(l)) delete l[E];
98
- Object.assign(l, x);
96
+ function a(T = {}) {
97
+ for (const k of Object.keys(l)) delete l[k];
98
+ Object.assign(l, T);
99
99
  }
100
- const a = (x) => {
101
- delete l[x], me();
100
+ const h = (T) => {
101
+ delete l[T];
102
102
  };
103
- function h() {
104
- for (const x of Object.keys(l)) delete l[x];
105
- }
106
103
  function p() {
107
- return JSON.parse(JSON.stringify(l));
104
+ for (const T of Object.keys(l)) delete l[T];
105
+ }
106
+ function c() {
107
+ s.value = [...o.value], a({});
108
108
  }
109
- const d = (x) => s.value.find((E) => E.id === x), _ = (x, E) => {
110
- i.value.push({ name: x, value: E });
111
- }, v = () => {
109
+ const m = (T) => s.value.find((k) => k.id === T), b = (T, k) => {
110
+ i.value.push({ name: T, value: k });
111
+ }, z = () => {
112
112
  i.value = [];
113
- }, L = (x) => {
114
- const E = C(x);
115
- r.value = E;
116
- }, H = () => r.value;
117
- function C(x) {
118
- const E = {};
119
- if (!x || typeof x != "object") return E;
120
- for (const [K, W] of Object.entries(x))
121
- if (W && typeof W == "object" && !(Ps(W) || $s(W))) {
122
- const oe = Object.getPrototypeOf(W) === Object.prototype;
123
- E[K] = oe ? { ...W } : Bs(W);
113
+ }, O = (T) => {
114
+ const k = L(T);
115
+ r.value = k;
116
+ }, C = () => r.value;
117
+ function L(T) {
118
+ const k = {};
119
+ if (!T || typeof T != "object") return k;
120
+ for (const [q, P] of Object.entries(T))
121
+ if (P && typeof P == "object" && !($s(P) || Bs(P))) {
122
+ const M = Object.getPrototypeOf(P) === Object.prototype;
123
+ k[q] = M ? { ...P } : Us(P);
124
124
  } else
125
- E[K] = W;
126
- return E;
127
- }
128
- const D = (x) => {
129
- const E = s.value.find((K) => K.id === x);
130
- E && (E.Props = E.Props || {}, E.Props.locked = !E.Props.locked);
131
- }, S = (x) => x.map((E) => {
132
- const K = e.value[E.componentKey];
133
- return K ? {
134
- ...E,
135
- component: K
125
+ k[q] = P;
126
+ return k;
127
+ }
128
+ const A = (T) => {
129
+ const k = s.value.find((q) => q.id === T);
130
+ k && (k.Props = k.Props || {}, k.Props.locked = !k.Props.locked);
131
+ }, E = (T) => T.map((k) => {
132
+ const q = e.value[k.componentKey];
133
+ return q ? {
134
+ ...k,
135
+ component: q
136
136
  // attach runtime component
137
137
  } : null;
138
- }).filter((E) => !!E);
139
- let m = null;
140
- function y(x) {
141
- m = x;
142
- }
143
- function P() {
144
- m = null;
145
- }
146
- function U() {
147
- return m ? m() : null;
148
- }
149
- function pe() {
150
- var E, K;
151
- return (((K = (E = U()) == null ? void 0 : E.save) == null ? void 0 : K.call(E)) ?? []).map((W) => {
152
- const oe = s.value.find((at) => at.id === W.id);
153
- if (!oe || !oe.componentKey)
154
- return console.warn(`save: missing item or componentKey for id=${W == null ? void 0 : W.id}`), null;
155
- const { x: It, y: Ht, w: lt, h: Ot } = W;
156
- return {
157
- id: oe.id,
158
- componentKey: oe.componentKey,
159
- componentName: oe.componentName,
160
- hideHeader: oe.hideHeader,
161
- Props: oe.Props ?? {},
162
- x: It,
163
- y: Ht,
164
- w: lt,
165
- h: Ot
166
- };
167
- }).filter((W) => !!W);
168
- }
169
- const me = () => {
170
- var E;
171
- const x = {
172
- version: 1,
173
- items: pe(),
174
- filters: p()
175
- };
176
- ((E = x.items) == null ? void 0 : E.length) < 1 || localStorage.setItem(t, JSON.stringify(x));
177
- }, N = () => {
178
- const x = localStorage.getItem(t);
179
- if (!x) {
180
- s.value = o.value, u({});
181
- return;
182
- }
183
- try {
184
- const E = JSON.parse(x);
185
- s.value = Array.isArray(E.items) ? S(E.items) : o.value, u(E.filters ?? {});
186
- } catch (E) {
187
- console.error("Failed to parse globalVarsStore:", E), s.value = o.value, u({});
188
- }
189
- };
190
- return ce(l, () => me(), { deep: !0 }), {
138
+ }).filter((k) => !!k);
139
+ function U(T) {
140
+ }
141
+ function _() {
142
+ }
143
+ return {
191
144
  DASHBOARD_ITEMS: s,
192
145
  DefaultLayout: o,
193
146
  ComponentRegistry: e,
194
147
  optionsData: i,
195
148
  Services: r,
196
149
  Filters: l,
197
- registerGridProvider: y,
198
- unregisterGridProvider: P,
199
- setFilter: n,
200
- clearFilter: a,
201
- clearAllFilters: h,
202
- resetFilters: u,
203
- getDashItem: d,
204
- toggleWidgetLock: D,
205
- addOptionsDataItems: _,
206
- clearOptionsDataItems: v,
207
- saveToLocalStorage: me,
208
- loadFromLocalStorage: N,
209
- setOptionServices: L,
210
- getServices: H
150
+ displayFilters: n,
151
+ registerGridProvider: U,
152
+ unregisterGridProvider: _,
153
+ setFilter: u,
154
+ clearFilter: h,
155
+ clearAllFilters: p,
156
+ resetFilters: a,
157
+ resetGridLayout: c,
158
+ getDashItem: m,
159
+ toggleWidgetLock: A,
160
+ addOptionsDataItems: b,
161
+ clearOptionsDataItems: z,
162
+ //saveToLocalStorage,
163
+ loadFromLocalStorage: () => {
164
+ const T = localStorage.getItem(t);
165
+ if (!T) {
166
+ c();
167
+ return;
168
+ }
169
+ try {
170
+ const k = JSON.parse(T);
171
+ s.value = Array.isArray(k.items) ? E(k.items) : [...o.value], a(k.filters ?? {});
172
+ } catch (k) {
173
+ console.error("Failed to parse globalVarsStore:", k), s.value = [...o.value], a({});
174
+ }
175
+ },
176
+ setOptionServices: O,
177
+ getServices: C
211
178
  };
212
- }), lr = { class: "widget-settings-container" }, ar = { class: "widget-setting" }, hr = { class: "dialog-footer" }, ur = /* @__PURE__ */ we({
179
+ }), ar = { class: "widget-settings-container" }, hr = { class: "widget-setting" }, ur = { class: "dialog-footer" }, cr = /* @__PURE__ */ be({
213
180
  __name: "TextWidgetSettings",
214
181
  props: {
215
182
  showDialog: { type: Boolean },
@@ -219,89 +186,89 @@ const nt = Ks("globalPensieveDashVars", () => {
219
186
  },
220
187
  emits: ["close-dialog", "update-text-var"],
221
188
  setup(o, { emit: e }) {
222
- const t = nt(), { optionsData: i } = ti(t), s = e, r = o, l = Ce({
189
+ const t = rt(), { optionsData: i } = Jt(t), s = e, r = o, l = de({
223
190
  get: () => r.showDialog,
224
191
  set: (p) => {
225
192
  p || s("close-dialog");
226
193
  }
227
- }), n = B(r.reactiveSourceValue ?? ""), u = B(r.manualEntryValue ?? ""), a = B(!!r.hideHeaderValue);
228
- ce(() => r.reactiveSourceValue, (p) => {
194
+ }), n = F(r.reactiveSourceValue ?? ""), u = F(r.manualEntryValue ?? ""), a = F(!!r.hideHeaderValue);
195
+ fe(() => r.reactiveSourceValue, (p) => {
229
196
  n.value = p ?? "";
230
- }), ce(() => r.manualEntryValue, (p) => {
197
+ }), fe(() => r.manualEntryValue, (p) => {
231
198
  u.value = p ?? "";
232
- }, { immediate: !0 }), ce(() => r.hideHeaderValue, (p) => {
199
+ }, { immediate: !0 }), fe(() => r.hideHeaderValue, (p) => {
233
200
  a.value = !!p;
234
201
  });
235
202
  function h() {
236
- var v;
237
- const p = (n.value || "").trim(), d = p !== "", _ = d ? null : ((v = u.value) == null ? void 0 : v.trim()) || "";
203
+ var b;
204
+ const p = (n.value || "").trim(), c = p !== "", m = c ? null : ((b = u.value) == null ? void 0 : b.trim()) || "";
238
205
  s("update-text-var", {
239
- reactiveSource: d ? p : null,
240
- manualEdit: _,
206
+ reactiveSource: c ? p : null,
207
+ manualEdit: m,
241
208
  hideHeader: a.value
242
209
  }), l.value = !1;
243
210
  }
244
- return (p, d) => {
245
- const _ = ie("el-option"), v = ie("el-select"), L = ie("el-input"), H = ie("el-checkbox"), C = ie("el-button"), D = ie("el-dialog");
246
- return R(), ae(D, {
211
+ return (p, c) => {
212
+ const m = ie("el-option"), b = ie("el-select"), z = ie("el-input"), O = ie("el-checkbox"), C = ie("el-button"), L = ie("el-dialog");
213
+ return S(), le(L, {
247
214
  class: "full-dialog-dashboard",
248
215
  modelValue: l.value,
249
- "onUpdate:modelValue": d[4] || (d[4] = (S) => l.value = S),
216
+ "onUpdate:modelValue": c[4] || (c[4] = (A) => l.value = A),
250
217
  title: "Text Widget Settings",
251
218
  "append-to-body": !0
252
219
  }, {
253
- footer: q(() => [
254
- z("div", hr, [
255
- X(C, {
220
+ footer: V(() => [
221
+ N("div", ur, [
222
+ Y(C, {
256
223
  class: "secondary",
257
- onClick: d[3] || (d[3] = (S) => l.value = !1)
224
+ onClick: c[3] || (c[3] = (A) => l.value = !1)
258
225
  }, {
259
- default: q(() => [...d[8] || (d[8] = [
260
- We("Cancel", -1)
226
+ default: V(() => [...c[8] || (c[8] = [
227
+ Ae("Cancel", -1)
261
228
  ])]),
262
229
  _: 1
263
230
  }),
264
- X(C, { onClick: h }, {
265
- default: q(() => [...d[9] || (d[9] = [
266
- We("Save", -1)
231
+ Y(C, { onClick: h }, {
232
+ default: V(() => [...c[9] || (c[9] = [
233
+ Ae("Save", -1)
267
234
  ])]),
268
235
  _: 1
269
236
  })
270
237
  ])
271
238
  ]),
272
- default: q(() => [
273
- z("div", lr, [
274
- z("div", ar, [
275
- d[5] || (d[5] = z("h4", null, "Select This Widget's Value", -1)),
276
- d[6] || (d[6] = z("h5", null, "Select From Variables", -1)),
277
- X(v, {
239
+ default: V(() => [
240
+ N("div", ar, [
241
+ N("div", hr, [
242
+ c[5] || (c[5] = N("h4", null, "Select This Widget's Value", -1)),
243
+ c[6] || (c[6] = N("h5", null, "Select From Variables", -1)),
244
+ Y(b, {
278
245
  modelValue: n.value,
279
- "onUpdate:modelValue": d[0] || (d[0] = (S) => n.value = S),
246
+ "onUpdate:modelValue": c[0] || (c[0] = (A) => n.value = A),
280
247
  class: "text-settings-height"
281
248
  }, {
282
- default: q(() => [
283
- (R(), ae(_, {
249
+ default: V(() => [
250
+ (S(), le(m, {
284
251
  value: "",
285
252
  key: "__manual__",
286
253
  label: "Manual entry"
287
254
  })),
288
- (R(!0), $(ze, null, it(ue(i), (S) => (R(), ae(_, {
289
- key: S.name,
290
- label: S.name,
291
- value: S.name
255
+ (S(!0), B(Le, null, tt(he(i), (A) => (S(), le(m, {
256
+ key: A.name,
257
+ label: A.name,
258
+ value: A.name
292
259
  }, null, 8, ["label", "value"]))), 128))
293
260
  ]),
294
261
  _: 1
295
262
  }, 8, ["modelValue"]),
296
- d[7] || (d[7] = z("h5", null, "Manual Entry", -1)),
297
- X(L, {
263
+ c[7] || (c[7] = N("h5", null, "Manual Entry", -1)),
264
+ Y(z, {
298
265
  modelValue: u.value,
299
- "onUpdate:modelValue": d[1] || (d[1] = (S) => u.value = S),
266
+ "onUpdate:modelValue": c[1] || (c[1] = (A) => u.value = A),
300
267
  class: "text-settings-height"
301
268
  }, null, 8, ["modelValue"]),
302
- X(H, {
269
+ Y(O, {
303
270
  modelValue: a.value,
304
- "onUpdate:modelValue": d[2] || (d[2] = (S) => a.value = S),
271
+ "onUpdate:modelValue": c[2] || (c[2] = (A) => a.value = A),
305
272
  label: "Hide Header"
306
273
  }, null, 8, ["modelValue"])
307
274
  ])
@@ -311,12 +278,12 @@ const nt = Ks("globalPensieveDashVars", () => {
311
278
  }, 8, ["modelValue"]);
312
279
  };
313
280
  }
314
- }), Me = (o, e) => {
281
+ }), Ne = (o, e) => {
315
282
  const t = o.__vccOpts || o;
316
283
  for (const [i, s] of e)
317
284
  t[i] = s;
318
285
  return t;
319
- }, cr = /* @__PURE__ */ Me(ur, [["__scopeId", "data-v-769ea864"]]), dr = { key: 0 }, pr = /* @__PURE__ */ we({
286
+ }, dr = /* @__PURE__ */ Ne(cr, [["__scopeId", "data-v-769ea864"]]), pr = { key: 0 }, fr = /* @__PURE__ */ be({
320
287
  inheritAttrs: !1,
321
288
  __name: "TextWidget",
322
289
  props: {
@@ -326,117 +293,117 @@ const nt = Ks("globalPensieveDashVars", () => {
326
293
  hideHeader: { type: Boolean }
327
294
  },
328
295
  setup(o) {
329
- const e = nt(), t = o;
330
- Us("dashboard:globalVars", null);
331
- const i = B(t.displayText ?? "");
332
- ce(() => t.displayText, (C) => {
296
+ const e = rt(), t = o;
297
+ Fs("dashboard:globalVars", null);
298
+ const i = F(t.displayText ?? "");
299
+ fe(() => t.displayText, (C) => {
333
300
  i.value = C ?? "";
334
301
  }, { immediate: !0 });
335
- const s = Ce(() => !!(t.bindedKey && t.bindedKey.trim() !== "")), r = Ce(() => {
336
- var m;
337
- const C = (m = t.bindedKey) == null ? void 0 : m.trim();
302
+ const s = de(() => !!(t.bindedKey && t.bindedKey.trim() !== "")), r = de(() => {
303
+ var E;
304
+ const C = (E = t.bindedKey) == null ? void 0 : E.trim();
338
305
  if (!C) return "—";
339
- const D = e.optionsData.find((y) => (y == null ? void 0 : y.name) === C), S = D == null ? void 0 : D.value;
340
- return Array.isArray(S) ? S.join(", ") : S && typeof S == "object" ? JSON.stringify(S) : S ?? "—";
341
- }), l = B("Text Widget"), n = os([{ comp: us, event: _, tooltip: "open Text settings" }]), u = B(!1), a = B(null);
306
+ const L = e.optionsData.find((U) => (U == null ? void 0 : U.name) === C), A = L == null ? void 0 : L.value;
307
+ return Array.isArray(A) ? A.join(", ") : A && typeof A == "object" ? JSON.stringify(A) : A ?? "—";
308
+ }), l = F("Text Widget"), n = os([{ comp: us, event: m, tooltip: "open Text settings" }]), u = F(!1), a = F(null);
342
309
  function h() {
343
- var C, D;
344
- u.value = !0, (D = (C = a.value) == null ? void 0 : C.focus) == null || D.call(C);
310
+ var C, L;
311
+ u.value = !0, (L = (C = a.value) == null ? void 0 : C.focus) == null || L.call(C);
345
312
  }
346
313
  function p() {
347
314
  u.value = !1;
348
315
  }
349
- const d = B(!1);
350
- function _() {
351
- d.value = !0;
316
+ const c = F(!1);
317
+ function m() {
318
+ c.value = !0;
352
319
  }
353
- function v() {
354
- d.value = !1, e.saveToLocalStorage();
320
+ function b() {
321
+ c.value = !1;
355
322
  }
356
- function L({ manualEdit: C, reactiveSource: D, hideHeader: S }) {
357
- const m = e.getDashItem(t.widgetID);
358
- m && (m.hideHeader = S, D && D.trim() !== "" ? (m.Props = m.Props || {}, m.Props.bindedKey = D, m.Props.displayText = null, m.componentName = H(D)) : (m.Props = m.Props || {}, m.Props.bindedKey = null, m.Props.displayText = C ?? "", m.componentName = C ?? "Text"), e.saveToLocalStorage());
323
+ function z({ manualEdit: C, reactiveSource: L, hideHeader: A }) {
324
+ const E = e.getDashItem(t.widgetID);
325
+ E && (E.hideHeader = A, L && L.trim() !== "" ? (E.Props = E.Props || {}, E.Props.bindedKey = L, E.Props.displayText = null, E.componentName = O(L)) : (E.Props = E.Props || {}, E.Props.bindedKey = null, E.Props.displayText = C ?? "", E.componentName = C ?? "Text"), e.saveToLocalStorage());
359
326
  }
360
- function H(C) {
361
- return C ? C.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (D) => D.toUpperCase()) : "";
327
+ function O(C) {
328
+ return C ? C.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (L) => L.toUpperCase()) : "";
362
329
  }
363
- return (C, D) => {
364
- const S = ie("el-input"), m = ls("click-out");
365
- return R(), $(ze, null, [
366
- wt(C.$slots, "default", {
330
+ return (C, L) => {
331
+ const A = ie("el-input"), E = ls("click-out");
332
+ return S(), B(Le, null, [
333
+ vt(C.$slots, "default", {
367
334
  widgetName: l.value,
368
335
  childIcons: n.value
369
336
  }, void 0, !0),
370
- z("div", li({ class: "text-widget-wrap" }, C.$attrs), [
371
- s.value ? (R(), $("div", dr, [
372
- z("h2", null, Ae(r.value), 1)
373
- ])) : Le((R(), $("div", {
337
+ N("div", ni({ class: "text-widget-wrap" }, C.$attrs), [
338
+ s.value ? (S(), B("div", pr, [
339
+ N("h2", null, Re(r.value), 1)
340
+ ])) : De((S(), B("div", {
374
341
  key: 1,
375
342
  onKeyup: as(p, ["enter"]),
376
343
  class: "tw-flex"
377
344
  }, [
378
- Le(z("div", null, [
379
- X(S, {
345
+ De(N("div", null, [
346
+ Y(A, {
380
347
  ref_key: "textUserInput",
381
348
  ref: a,
382
349
  modelValue: i.value,
383
- "onUpdate:modelValue": D[0] || (D[0] = (y) => i.value = y),
384
- onFocus: D[1] || (D[1] = (y) => {
385
- var P, U;
386
- return (U = (P = y.target) == null ? void 0 : P.select) == null ? void 0 : U.call(P);
350
+ "onUpdate:modelValue": L[0] || (L[0] = (U) => i.value = U),
351
+ onFocus: L[1] || (L[1] = (U) => {
352
+ var _, y;
353
+ return (y = (_ = U.target) == null ? void 0 : _.select) == null ? void 0 : y.call(_);
387
354
  })
388
355
  }, null, 8, ["modelValue"])
389
356
  ], 512), [
390
357
  [xt, u.value]
391
358
  ]),
392
- Le(z("div", {
393
- onClick: D[2] || (D[2] = (y) => h()),
359
+ De(N("div", {
360
+ onClick: L[2] || (L[2] = (U) => h()),
394
361
  class: "tw-w-full tw-h-full"
395
362
  }, [
396
- z("h2", null, Ae(i.value), 1)
363
+ N("h2", null, Re(i.value), 1)
397
364
  ], 512), [
398
365
  [xt, !u.value]
399
366
  ])
400
367
  ], 32)), [
401
- [m, p]
368
+ [E, p]
402
369
  ])
403
370
  ], 16),
404
- X(cr, {
405
- "show-dialog": d.value,
371
+ Y(dr, {
372
+ "show-dialog": c.value,
406
373
  "reactive-source-value": t.bindedKey || "",
407
374
  "manual-entry-value": i.value,
408
375
  "hide-header-value": t.hideHeader || !1,
409
- onCloseDialog: v,
410
- onUpdateTextVar: L
376
+ onCloseDialog: b,
377
+ onUpdateTextVar: z
411
378
  }, null, 8, ["show-dialog", "reactive-source-value", "manual-entry-value", "hide-header-value"])
412
379
  ], 64);
413
380
  };
414
381
  }
415
- }), so = /* @__PURE__ */ Me(pr, [["__scopeId", "data-v-4743c11f"]]);
416
- function ai() {
382
+ }), no = /* @__PURE__ */ Ne(fr, [["__scopeId", "data-v-5e485ae3"]]);
383
+ function oi() {
417
384
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
418
385
  }
419
- var Ie = ai();
386
+ var Me = oi();
420
387
  function cs(o) {
421
- Ie = o;
388
+ Me = o;
422
389
  }
423
- var tt = { exec: () => null };
424
- function I(o, e = "") {
390
+ var et = { exec: () => null };
391
+ function H(o, e = "") {
425
392
  let t = typeof o == "string" ? o : o.source, i = { replace: (s, r) => {
426
393
  let l = typeof r == "string" ? r : r.source;
427
394
  return l = l.replace(se.caret, "$1"), t = t.replace(s, l), i;
428
395
  }, getRegex: () => new RegExp(t, e) };
429
396
  return i;
430
397
  }
431
- var se = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (o) => new RegExp(`^( {0,3}${o})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}#`), htmlBeginRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}<(?:[a-z].*>|!--)`, "i") }, fr = /^(?:[ \t]*(?:\n|$))+/, gr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, mr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ot = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, _r = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, hi = /(?:[*+-]|\d{1,9}[.)])/, ds = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ps = I(ds).replace(/bull/g, hi).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), yr = I(ds).replace(/bull/g, hi).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), ui = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, br = /^[^\n]+/, ci = /(?!\s*\])(?:\\.|[^\[\]\\])+/, vr = I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", ci).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), wr = I(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, hi).getRegex(), zt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", di = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, xr = I("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", di).replace("tag", zt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), fs = I(ui).replace("hr", ot).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", zt).getRegex(), kr = I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", fs).getRegex(), pi = { blockquote: kr, code: gr, def: vr, fences: mr, heading: _r, hr: ot, html: xr, lheading: ps, list: wr, newline: fr, paragraph: fs, table: tt, text: br }, Wi = I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", ot).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", zt).getRegex(), Er = { ...pi, lheading: yr, table: Wi, paragraph: I(ui).replace("hr", ot).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Wi).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", zt).getRegex() }, Tr = { ...pi, html: I(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", di).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: tt, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: I(ui).replace("hr", ot).replace("heading", ` *#{1,6} *[^
432
- ]`).replace("lheading", ps).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Rr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Sr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, gs = /^( {2,}|\\)\n(?!\s*$)/, Cr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Nt = /[\p{P}\p{S}]/u, fi = /[\s\p{P}\p{S}]/u, ms = /[^\s\p{P}\p{S}]/u, Ar = I(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, fi).getRegex(), _s = /(?!~)[\p{P}\p{S}]/u, Dr = /(?!~)[\s\p{P}\p{S}]/u, Lr = /(?:[^\s\p{P}\p{S}]|~)/u, zr = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, ys = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Nr = I(ys, "u").replace(/punct/g, Nt).getRegex(), Mr = I(ys, "u").replace(/punct/g, _s).getRegex(), bs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ir = I(bs, "gu").replace(/notPunctSpace/g, ms).replace(/punctSpace/g, fi).replace(/punct/g, Nt).getRegex(), Hr = I(bs, "gu").replace(/notPunctSpace/g, Lr).replace(/punctSpace/g, Dr).replace(/punct/g, _s).getRegex(), Or = I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ms).replace(/punctSpace/g, fi).replace(/punct/g, Nt).getRegex(), Pr = I(/\\(punct)/, "gu").replace(/punct/g, Nt).getRegex(), $r = 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(), Br = I(di).replace("(?:-->|$)", "-->").getRegex(), Ur = I("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Br).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Et = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Fr = I(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", Et).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), vs = I(/^!?\[(label)\]\[(ref)\]/).replace("label", Et).replace("ref", ci).getRegex(), ws = I(/^!?\[(ref)\](?:\[\])?/).replace("ref", ci).getRegex(), Wr = I("reflink|nolink(?!\\()", "g").replace("reflink", vs).replace("nolink", ws).getRegex(), gi = { _backpedal: tt, anyPunctuation: Pr, autolink: $r, blockSkip: zr, br: gs, code: Sr, del: tt, emStrongLDelim: Nr, emStrongRDelimAst: Ir, emStrongRDelimUnd: Or, escape: Rr, link: Fr, nolink: ws, punctuation: Ar, reflink: vs, reflinkSearch: Wr, tag: Ur, text: Cr, url: tt }, Gr = { ...gi, link: I(/^!?\[(label)\]\((.*?)\)/).replace("label", Et).getRegex(), reflink: I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Et).getRegex() }, ii = { ...gi, emStrongRDelimAst: Hr, emStrongLDelim: Mr, url: I(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/, text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ }, Vr = { ...ii, br: I(gs).replace("{2,}", "*").getRegex(), text: I(ii.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, mt = { normal: pi, gfm: Er, pedantic: Tr }, Ye = { normal: gi, gfm: ii, breaks: Vr, pedantic: Gr }, qr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Gi = (o) => qr[o];
433
- function ye(o, e) {
398
+ var se = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] /, listReplaceTask: /^\[[ xX]\] +/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (o) => new RegExp(`^( {0,3}${o})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}#`), htmlBeginRegex: (o) => new RegExp(`^ {0,${Math.min(3, o - 1)}}<(?:[a-z].*>|!--)`, "i") }, gr = /^(?:[ \t]*(?:\n|$))+/, mr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, _r = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, nt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, yr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, li = /(?:[*+-]|\d{1,9}[.)])/, ds = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ps = H(ds).replace(/bull/g, li).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), br = H(ds).replace(/bull/g, li).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), ai = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, wr = /^[^\n]+/, hi = /(?!\s*\])(?:\\.|[^\[\]\\])+/, vr = H(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", hi).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), xr = H(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, li).getRegex(), zt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", ui = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, kr = H("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", ui).replace("tag", zt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), fs = H(ai).replace("hr", nt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", zt).getRegex(), Er = H(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", fs).getRegex(), ci = { blockquote: Er, code: mr, def: vr, fences: _r, heading: yr, hr: nt, html: kr, lheading: ps, list: xr, newline: gr, paragraph: fs, table: et, text: wr }, Gi = H("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", nt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", zt).getRegex(), Tr = { ...ci, lheading: br, table: Gi, paragraph: H(ai).replace("hr", nt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Gi).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", zt).getRegex() }, Rr = { ...ci, html: H(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", ui).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: et, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: H(ai).replace("hr", nt).replace("heading", ` *#{1,6} *[^
399
+ ]`).replace("lheading", ps).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Sr = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Cr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, gs = /^( {2,}|\\)\n(?!\s*$)/, Ar = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Nt = /[\p{P}\p{S}]/u, di = /[\s\p{P}\p{S}]/u, ms = /[^\s\p{P}\p{S}]/u, Dr = H(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, di).getRegex(), _s = /(?!~)[\p{P}\p{S}]/u, Lr = /(?!~)[\s\p{P}\p{S}]/u, zr = /(?:[^\s\p{P}\p{S}]|~)/u, Nr = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g, ys = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Mr = H(ys, "u").replace(/punct/g, Nt).getRegex(), Ir = H(ys, "u").replace(/punct/g, _s).getRegex(), bs = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Hr = H(bs, "gu").replace(/notPunctSpace/g, ms).replace(/punctSpace/g, di).replace(/punct/g, Nt).getRegex(), Or = H(bs, "gu").replace(/notPunctSpace/g, zr).replace(/punctSpace/g, Lr).replace(/punct/g, _s).getRegex(), Pr = H("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ms).replace(/punctSpace/g, di).replace(/punct/g, Nt).getRegex(), $r = H(/\\(punct)/, "gu").replace(/punct/g, Nt).getRegex(), Br = H(/^<(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(), Ur = H(ui).replace("(?:-->|$)", "-->").getRegex(), Fr = H("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Ur).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Et = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Wr = H(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", Et).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ws = H(/^!?\[(label)\]\[(ref)\]/).replace("label", Et).replace("ref", hi).getRegex(), vs = H(/^!?\[(ref)\](?:\[\])?/).replace("ref", hi).getRegex(), Gr = H("reflink|nolink(?!\\()", "g").replace("reflink", ws).replace("nolink", vs).getRegex(), pi = { _backpedal: et, anyPunctuation: $r, autolink: Br, blockSkip: Nr, br: gs, code: Cr, del: et, emStrongLDelim: Mr, emStrongRDelimAst: Hr, emStrongRDelimUnd: Pr, escape: Sr, link: Wr, nolink: vs, punctuation: Dr, reflink: ws, reflinkSearch: Gr, tag: Fr, text: Ar, url: et }, Vr = { ...pi, link: H(/^!?\[(label)\]\((.*?)\)/).replace("label", Et).getRegex(), reflink: H(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Et).getRegex() }, ei = { ...pi, emStrongRDelimAst: Or, emStrongLDelim: Ir, url: H(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/, text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/ }, qr = { ...ei, br: H(gs).replace("{2,}", "*").getRegex(), text: H(ei.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, mt = { normal: ci, gfm: Tr, pedantic: Rr }, je = { normal: pi, gfm: ei, breaks: qr, pedantic: Vr }, jr = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Vi = (o) => jr[o];
400
+ function me(o, e) {
434
401
  if (e) {
435
- if (se.escapeTest.test(o)) return o.replace(se.escapeReplace, Gi);
436
- } else if (se.escapeTestNoEncode.test(o)) return o.replace(se.escapeReplaceNoEncode, Gi);
402
+ if (se.escapeTest.test(o)) return o.replace(se.escapeReplace, Vi);
403
+ } else if (se.escapeTestNoEncode.test(o)) return o.replace(se.escapeReplaceNoEncode, Vi);
437
404
  return o;
438
405
  }
439
- function Vi(o) {
406
+ function qi(o) {
440
407
  try {
441
408
  o = encodeURI(o).replace(se.percentDecode, "%");
442
409
  } catch {
@@ -444,7 +411,7 @@ function Vi(o) {
444
411
  }
445
412
  return o;
446
413
  }
447
- function qi(o, e) {
414
+ function ji(o, e) {
448
415
  var r;
449
416
  let t = o.replace(se.findPipe, (l, n, u) => {
450
417
  let a = !1, h = n;
@@ -456,7 +423,7 @@ function qi(o, e) {
456
423
  for (; s < i.length; s++) i[s] = i[s].trim().replace(se.slashPipe, "|");
457
424
  return i;
458
425
  }
459
- function Xe(o, e, t) {
426
+ function Ye(o, e, t) {
460
427
  let i = o.length;
461
428
  if (i === 0) return "";
462
429
  let s = 0;
@@ -464,7 +431,7 @@ function Xe(o, e, t) {
464
431
  s++;
465
432
  return o.slice(0, i - s);
466
433
  }
467
- function jr(o, e) {
434
+ function Yr(o, e) {
468
435
  if (o.indexOf(e[1]) === -1) return -1;
469
436
  let t = 0;
470
437
  for (let i = 0; i < o.length; i++) if (o[i] === "\\") i++;
@@ -472,13 +439,13 @@ function jr(o, e) {
472
439
  else if (o[i] === e[1] && (t--, t < 0)) return i;
473
440
  return t > 0 ? -2 : -1;
474
441
  }
475
- function ji(o, e, t, i, s) {
442
+ function Yi(o, e, t, i, s) {
476
443
  let r = e.href, l = e.title || null, n = o[1].replace(s.other.outputLinkReplace, "$1");
477
444
  i.state.inLink = !0;
478
445
  let u = { type: o[0].charAt(0) === "!" ? "image" : "link", raw: t, href: r, title: l, text: n, tokens: i.inlineTokens(n) };
479
446
  return i.state.inLink = !1, u;
480
447
  }
481
- function Yr(o, e, t) {
448
+ function Xr(o, e, t) {
482
449
  let i = o.match(t.other.indentCodeCompensation);
483
450
  if (i === null) return e;
484
451
  let s = i[1];
@@ -493,10 +460,10 @@ function Yr(o, e, t) {
493
460
  }
494
461
  var Tt = class {
495
462
  constructor(o) {
496
- O(this, "options");
497
- O(this, "rules");
498
- O(this, "lexer");
499
- this.options = o || Ie;
463
+ $(this, "options");
464
+ $(this, "rules");
465
+ $(this, "lexer");
466
+ this.options = o || Me;
500
467
  }
501
468
  space(o) {
502
469
  let e = this.rules.block.newline.exec(o);
@@ -506,14 +473,14 @@ var Tt = class {
506
473
  let e = this.rules.block.code.exec(o);
507
474
  if (e) {
508
475
  let t = e[0].replace(this.rules.other.codeRemoveIndent, "");
509
- return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? t : Xe(t, `
476
+ return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? t : Ye(t, `
510
477
  `) };
511
478
  }
512
479
  }
513
480
  fences(o) {
514
481
  let e = this.rules.block.fences.exec(o);
515
482
  if (e) {
516
- let t = e[0], i = Yr(t, e[3] || "", this.rules);
483
+ let t = e[0], i = Xr(t, e[3] || "", this.rules);
517
484
  return { type: "code", raw: t, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: i };
518
485
  }
519
486
  }
@@ -522,7 +489,7 @@ var Tt = class {
522
489
  if (e) {
523
490
  let t = e[2].trim();
524
491
  if (this.rules.other.endingHash.test(t)) {
525
- let i = Xe(t, "#");
492
+ let i = Ye(t, "#");
526
493
  (this.options.pedantic || !i || this.rules.other.endingSpaceChar.test(i)) && (t = i.trim());
527
494
  }
528
495
  return { type: "heading", raw: e[0], depth: e[1].length, text: t, tokens: this.lexer.inline(t) };
@@ -530,13 +497,13 @@ var Tt = class {
530
497
  }
531
498
  hr(o) {
532
499
  let e = this.rules.block.hr.exec(o);
533
- if (e) return { type: "hr", raw: Xe(e[0], `
500
+ if (e) return { type: "hr", raw: Ye(e[0], `
534
501
  `) };
535
502
  }
536
503
  blockquote(o) {
537
504
  let e = this.rules.block.blockquote.exec(o);
538
505
  if (e) {
539
- let t = Xe(e[0], `
506
+ let t = Ye(e[0], `
540
507
  `).split(`
541
508
  `), i = "", s = "", r = [];
542
509
  for (; t.length > 0; ) {
@@ -553,19 +520,19 @@ ${a}` : a, s = s ? `${s}
553
520
  ${h}` : h;
554
521
  let p = this.lexer.state.top;
555
522
  if (this.lexer.state.top = !0, this.lexer.blockTokens(h, r, !0), this.lexer.state.top = p, t.length === 0) break;
556
- let d = r.at(-1);
557
- if ((d == null ? void 0 : d.type) === "code") break;
558
- if ((d == null ? void 0 : d.type) === "blockquote") {
559
- let _ = d, v = _.raw + `
523
+ let c = r.at(-1);
524
+ if ((c == null ? void 0 : c.type) === "code") break;
525
+ if ((c == null ? void 0 : c.type) === "blockquote") {
526
+ let m = c, b = m.raw + `
560
527
  ` + t.join(`
561
- `), L = this.blockquote(v);
562
- r[r.length - 1] = L, i = i.substring(0, i.length - _.raw.length) + L.raw, s = s.substring(0, s.length - _.text.length) + L.text;
528
+ `), z = this.blockquote(b);
529
+ r[r.length - 1] = z, i = i.substring(0, i.length - m.raw.length) + z.raw, s = s.substring(0, s.length - m.text.length) + z.text;
563
530
  break;
564
- } else if ((d == null ? void 0 : d.type) === "list") {
565
- let _ = d, v = _.raw + `
531
+ } else if ((c == null ? void 0 : c.type) === "list") {
532
+ let m = c, b = m.raw + `
566
533
  ` + t.join(`
567
- `), L = this.list(v);
568
- r[r.length - 1] = L, i = i.substring(0, i.length - d.raw.length) + L.raw, s = s.substring(0, s.length - _.raw.length) + L.raw, t = v.substring(r.at(-1).raw.length).split(`
534
+ `), z = this.list(b);
535
+ r[r.length - 1] = z, i = i.substring(0, i.length - c.raw.length) + z.raw, s = s.substring(0, s.length - m.raw.length) + z.raw, t = b.substring(r.at(-1).raw.length).split(`
569
536
  `);
570
537
  continue;
571
538
  }
@@ -584,29 +551,29 @@ ${h}` : h;
584
551
  if (!(e = r.exec(o)) || this.rules.block.hr.test(o)) break;
585
552
  a = e[0], o = o.substring(a.length);
586
553
  let p = e[2].split(`
587
- `, 1)[0].replace(this.rules.other.listReplaceTabs, (C) => " ".repeat(3 * C.length)), d = o.split(`
588
- `, 1)[0], _ = !p.trim(), v = 0;
589
- if (this.options.pedantic ? (v = 2, h = p.trimStart()) : _ ? v = e[1].length + 1 : (v = e[2].search(this.rules.other.nonSpaceChar), v = v > 4 ? 1 : v, h = p.slice(v), v += e[1].length), _ && this.rules.other.blankLine.test(d) && (a += d + `
590
- `, o = o.substring(d.length + 1), u = !0), !u) {
591
- let C = this.rules.other.nextBulletRegex(v), D = this.rules.other.hrRegex(v), S = this.rules.other.fencesBeginRegex(v), m = this.rules.other.headingBeginRegex(v), y = this.rules.other.htmlBeginRegex(v);
554
+ `, 1)[0].replace(this.rules.other.listReplaceTabs, (C) => " ".repeat(3 * C.length)), c = o.split(`
555
+ `, 1)[0], m = !p.trim(), b = 0;
556
+ if (this.options.pedantic ? (b = 2, h = p.trimStart()) : m ? b = e[1].length + 1 : (b = e[2].search(this.rules.other.nonSpaceChar), b = b > 4 ? 1 : b, h = p.slice(b), b += e[1].length), m && this.rules.other.blankLine.test(c) && (a += c + `
557
+ `, o = o.substring(c.length + 1), u = !0), !u) {
558
+ let C = this.rules.other.nextBulletRegex(b), L = this.rules.other.hrRegex(b), A = this.rules.other.fencesBeginRegex(b), E = this.rules.other.headingBeginRegex(b), U = this.rules.other.htmlBeginRegex(b);
592
559
  for (; o; ) {
593
- let P = o.split(`
594
- `, 1)[0], U;
595
- if (d = P, this.options.pedantic ? (d = d.replace(this.rules.other.listReplaceNesting, " "), U = d) : U = d.replace(this.rules.other.tabCharGlobal, " "), S.test(d) || m.test(d) || y.test(d) || C.test(d) || D.test(d)) break;
596
- if (U.search(this.rules.other.nonSpaceChar) >= v || !d.trim()) h += `
597
- ` + U.slice(v);
560
+ let _ = o.split(`
561
+ `, 1)[0], y;
562
+ if (c = _, this.options.pedantic ? (c = c.replace(this.rules.other.listReplaceNesting, " "), y = c) : y = c.replace(this.rules.other.tabCharGlobal, " "), A.test(c) || E.test(c) || U.test(c) || C.test(c) || L.test(c)) break;
563
+ if (y.search(this.rules.other.nonSpaceChar) >= b || !c.trim()) h += `
564
+ ` + y.slice(b);
598
565
  else {
599
- if (_ || p.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || S.test(p) || m.test(p) || D.test(p)) break;
566
+ if (m || p.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || A.test(p) || E.test(p) || L.test(p)) break;
600
567
  h += `
601
- ` + d;
568
+ ` + c;
602
569
  }
603
- !_ && !d.trim() && (_ = !0), a += P + `
604
- `, o = o.substring(P.length + 1), p = U.slice(v);
570
+ !m && !c.trim() && (m = !0), a += _ + `
571
+ `, o = o.substring(_.length + 1), p = y.slice(b);
605
572
  }
606
573
  }
607
574
  s.loose || (l ? s.loose = !0 : this.rules.other.doubleBlankLine.test(a) && (l = !0));
608
- let L = null, H;
609
- this.options.gfm && (L = this.rules.other.listIsTask.exec(h), L && (H = L[0] !== "[ ] ", h = h.replace(this.rules.other.listReplaceTask, ""))), s.items.push({ type: "list_item", raw: a, task: !!L, checked: H, loose: !1, text: h, tokens: [] }), s.raw += a;
575
+ let z = null, O;
576
+ this.options.gfm && (z = this.rules.other.listIsTask.exec(h), z && (O = z[0] !== "[ ] ", h = h.replace(this.rules.other.listReplaceTask, ""))), s.items.push({ type: "list_item", raw: a, task: !!z, checked: O, loose: !1, text: h, tokens: [] }), s.raw += a;
610
577
  }
611
578
  let n = s.items.at(-1);
612
579
  if (n) n.raw = n.raw.trimEnd(), n.text = n.text.trimEnd();
@@ -635,12 +602,12 @@ ${h}` : h;
635
602
  var l;
636
603
  let e = this.rules.block.table.exec(o);
637
604
  if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
638
- let t = qi(e[1]), i = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), s = (l = e[3]) != null && l.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
605
+ let t = ji(e[1]), i = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), s = (l = e[3]) != null && l.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
639
606
  `) : [], r = { type: "table", raw: e[0], header: [], align: [], rows: [] };
640
607
  if (t.length === i.length) {
641
608
  for (let n of i) this.rules.other.tableAlignRight.test(n) ? r.align.push("right") : this.rules.other.tableAlignCenter.test(n) ? r.align.push("center") : this.rules.other.tableAlignLeft.test(n) ? r.align.push("left") : r.align.push(null);
642
609
  for (let n = 0; n < t.length; n++) r.header.push({ text: t[n], tokens: this.lexer.inline(t[n]), header: !0, align: r.align[n] });
643
- for (let n of s) r.rows.push(qi(n, r.header.length).map((u, a) => ({ text: u, tokens: this.lexer.inline(u), header: !1, align: r.align[a] })));
610
+ for (let n of s) r.rows.push(ji(n, r.header.length).map((u, a) => ({ text: u, tokens: this.lexer.inline(u), header: !1, align: r.align[a] })));
644
611
  return r;
645
612
  }
646
613
  }
@@ -674,10 +641,10 @@ ${h}` : h;
674
641
  let t = e[2].trim();
675
642
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(t)) {
676
643
  if (!this.rules.other.endAngleBracket.test(t)) return;
677
- let r = Xe(t.slice(0, -1), "\\");
644
+ let r = Ye(t.slice(0, -1), "\\");
678
645
  if ((t.length - r.length) % 2 === 0) return;
679
646
  } else {
680
- let r = jr(e[2], "()");
647
+ let r = Yr(e[2], "()");
681
648
  if (r === -2) return;
682
649
  if (r > -1) {
683
650
  let l = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + r;
@@ -689,7 +656,7 @@ ${h}` : h;
689
656
  let r = this.rules.other.pedanticHrefTitle.exec(i);
690
657
  r && (i = r[1], s = r[3]);
691
658
  } else s = e[3] ? e[3].slice(1, -1) : "";
692
- return i = i.trim(), this.rules.other.startAngleBracket.test(i) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(t) ? i = i.slice(1) : i = i.slice(1, -1)), ji(e, { href: i && i.replace(this.rules.inline.anyPunctuation, "$1"), title: s && s.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
659
+ return i = i.trim(), this.rules.other.startAngleBracket.test(i) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(t) ? i = i.slice(1) : i = i.slice(1, -1)), Yi(e, { href: i && i.replace(this.rules.inline.anyPunctuation, "$1"), title: s && s.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
693
660
  }
694
661
  }
695
662
  reflink(o, e) {
@@ -700,7 +667,7 @@ ${h}` : h;
700
667
  let r = t[0].charAt(0);
701
668
  return { type: "text", raw: r, text: r };
702
669
  }
703
- return ji(t, s, t[0], this.lexer, this.rules);
670
+ return Yi(t, s, t[0], this.lexer, this.rules);
704
671
  }
705
672
  }
706
673
  emStrong(o, e, t = "") {
@@ -720,11 +687,11 @@ ${h}` : h;
720
687
  l = Math.min(l, l + n + u);
721
688
  let h = [...i[0]][0].length, p = o.slice(0, s + i.index + h + l);
722
689
  if (Math.min(s, l) % 2) {
723
- let _ = p.slice(1, -1);
724
- return { type: "em", raw: p, text: _, tokens: this.lexer.inlineTokens(_) };
690
+ let m = p.slice(1, -1);
691
+ return { type: "em", raw: p, text: m, tokens: this.lexer.inlineTokens(m) };
725
692
  }
726
- let d = p.slice(2, -2);
727
- return { type: "strong", raw: p, text: d, tokens: this.lexer.inlineTokens(d) };
693
+ let c = p.slice(2, -2);
694
+ return { type: "strong", raw: p, text: c, tokens: this.lexer.inlineTokens(c) };
728
695
  }
729
696
  }
730
697
  }
@@ -773,25 +740,25 @@ ${h}` : h;
773
740
  return { type: "text", raw: e[0], text: e[0], escaped: t };
774
741
  }
775
742
  }
776
- }, Re = class si {
743
+ }, Ee = class ti {
777
744
  constructor(e) {
778
- O(this, "tokens");
779
- O(this, "options");
780
- O(this, "state");
781
- O(this, "tokenizer");
782
- O(this, "inlineQueue");
783
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || Ie, this.options.tokenizer = this.options.tokenizer || new Tt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
784
- let t = { other: se, block: mt.normal, inline: Ye.normal };
785
- this.options.pedantic ? (t.block = mt.pedantic, t.inline = Ye.pedantic) : this.options.gfm && (t.block = mt.gfm, this.options.breaks ? t.inline = Ye.breaks : t.inline = Ye.gfm), this.tokenizer.rules = t;
745
+ $(this, "tokens");
746
+ $(this, "options");
747
+ $(this, "state");
748
+ $(this, "tokenizer");
749
+ $(this, "inlineQueue");
750
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || Me, this.options.tokenizer = this.options.tokenizer || new Tt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
751
+ let t = { other: se, block: mt.normal, inline: je.normal };
752
+ this.options.pedantic ? (t.block = mt.pedantic, t.inline = je.pedantic) : this.options.gfm && (t.block = mt.gfm, this.options.breaks ? t.inline = je.breaks : t.inline = je.gfm), this.tokenizer.rules = t;
786
753
  }
787
754
  static get rules() {
788
- return { block: mt, inline: Ye };
755
+ return { block: mt, inline: je };
789
756
  }
790
757
  static lex(e, t) {
791
- return new si(t).lex(e);
758
+ return new ti(t).lex(e);
792
759
  }
793
760
  static lexInline(e, t) {
794
- return new si(t).inlineTokens(e);
761
+ return new ti(t).inlineTokens(e);
795
762
  }
796
763
  lex(e) {
797
764
  e = e.replace(se.carriageReturn, `
@@ -867,8 +834,8 @@ ${h}` : h;
867
834
  let u = e;
868
835
  if ((l = this.options.extensions) != null && l.startBlock) {
869
836
  let a = 1 / 0, h = e.slice(1), p;
870
- this.options.extensions.startBlock.forEach((d) => {
871
- p = d.call({ lexer: this }, h), typeof p == "number" && p >= 0 && (a = Math.min(a, p));
837
+ this.options.extensions.startBlock.forEach((c) => {
838
+ p = c.call({ lexer: this }, h), typeof p == "number" && p >= 0 && (a = Math.min(a, p));
872
839
  }), a < 1 / 0 && a >= 0 && (u = e.substring(0, a + 1));
873
840
  }
874
841
  if (this.state.top && (n = this.tokenizer.paragraph(u))) {
@@ -914,7 +881,7 @@ ${h}` : h;
914
881
  for (; e; ) {
915
882
  r || (l = ""), r = !1;
916
883
  let h;
917
- if ((u = (n = this.options.extensions) == null ? void 0 : n.inline) != null && u.some((d) => (h = d.call({ lexer: this }, e, t)) ? (e = e.substring(h.raw.length), t.push(h), !0) : !1)) continue;
884
+ if ((u = (n = this.options.extensions) == null ? void 0 : n.inline) != null && u.some((c) => (h = c.call({ lexer: this }, e, t)) ? (e = e.substring(h.raw.length), t.push(h), !0) : !1)) continue;
918
885
  if (h = this.tokenizer.escape(e)) {
919
886
  e = e.substring(h.raw.length), t.push(h);
920
887
  continue;
@@ -929,8 +896,8 @@ ${h}` : h;
929
896
  }
930
897
  if (h = this.tokenizer.reflink(e, this.tokens.links)) {
931
898
  e = e.substring(h.raw.length);
932
- let d = t.at(-1);
933
- h.type === "text" && (d == null ? void 0 : d.type) === "text" ? (d.raw += h.raw, d.text += h.text) : t.push(h);
899
+ let c = t.at(-1);
900
+ h.type === "text" && (c == null ? void 0 : c.type) === "text" ? (c.raw += h.raw, c.text += h.text) : t.push(h);
934
901
  continue;
935
902
  }
936
903
  if (h = this.tokenizer.emStrong(e, i, l)) {
@@ -959,32 +926,32 @@ ${h}` : h;
959
926
  }
960
927
  let p = e;
961
928
  if ((a = this.options.extensions) != null && a.startInline) {
962
- let d = 1 / 0, _ = e.slice(1), v;
963
- this.options.extensions.startInline.forEach((L) => {
964
- v = L.call({ lexer: this }, _), typeof v == "number" && v >= 0 && (d = Math.min(d, v));
965
- }), d < 1 / 0 && d >= 0 && (p = e.substring(0, d + 1));
929
+ let c = 1 / 0, m = e.slice(1), b;
930
+ this.options.extensions.startInline.forEach((z) => {
931
+ b = z.call({ lexer: this }, m), typeof b == "number" && b >= 0 && (c = Math.min(c, b));
932
+ }), c < 1 / 0 && c >= 0 && (p = e.substring(0, c + 1));
966
933
  }
967
934
  if (h = this.tokenizer.inlineText(p)) {
968
935
  e = e.substring(h.raw.length), h.raw.slice(-1) !== "_" && (l = h.raw.slice(-1)), r = !0;
969
- let d = t.at(-1);
970
- (d == null ? void 0 : d.type) === "text" ? (d.raw += h.raw, d.text += h.text) : t.push(h);
936
+ let c = t.at(-1);
937
+ (c == null ? void 0 : c.type) === "text" ? (c.raw += h.raw, c.text += h.text) : t.push(h);
971
938
  continue;
972
939
  }
973
940
  if (e) {
974
- let d = "Infinite loop on byte: " + e.charCodeAt(0);
941
+ let c = "Infinite loop on byte: " + e.charCodeAt(0);
975
942
  if (this.options.silent) {
976
- console.error(d);
943
+ console.error(c);
977
944
  break;
978
- } else throw new Error(d);
945
+ } else throw new Error(c);
979
946
  }
980
947
  }
981
948
  return t;
982
949
  }
983
950
  }, Rt = class {
984
951
  constructor(o) {
985
- O(this, "options");
986
- O(this, "parser");
987
- this.options = o || Ie;
952
+ $(this, "options");
953
+ $(this, "parser");
954
+ this.options = o || Me;
988
955
  }
989
956
  space(o) {
990
957
  return "";
@@ -993,8 +960,8 @@ ${h}` : h;
993
960
  var r;
994
961
  let i = (r = (e || "").match(se.notSpaceStart)) == null ? void 0 : r[0], s = o.replace(se.endingNewline, "") + `
995
962
  `;
996
- return i ? '<pre><code class="language-' + ye(i) + '">' + (t ? s : ye(s, !0)) + `</code></pre>
997
- ` : "<pre><code>" + (t ? s : ye(s, !0)) + `</code></pre>
963
+ return i ? '<pre><code class="language-' + me(i) + '">' + (t ? s : me(s, !0)) + `</code></pre>
964
+ ` : "<pre><code>" + (t ? s : me(s, !0)) + `</code></pre>
998
965
  `;
999
966
  }
1000
967
  blockquote({ tokens: o }) {
@@ -1032,7 +999,7 @@ ${this.parser.parse(o)}</blockquote>
1032
999
  let e = "";
1033
1000
  if (o.task) {
1034
1001
  let i = this.checkbox({ checked: !!o.checked });
1035
- o.loose ? ((t = o.tokens[0]) == null ? void 0 : t.type) === "paragraph" ? (o.tokens[0].text = i + " " + o.tokens[0].text, o.tokens[0].tokens && o.tokens[0].tokens.length > 0 && o.tokens[0].tokens[0].type === "text" && (o.tokens[0].tokens[0].text = i + " " + ye(o.tokens[0].tokens[0].text), o.tokens[0].tokens[0].escaped = !0)) : o.tokens.unshift({ type: "text", raw: i + " ", text: i + " ", escaped: !0 }) : e += i + " ";
1002
+ o.loose ? ((t = o.tokens[0]) == null ? void 0 : t.type) === "paragraph" ? (o.tokens[0].text = i + " " + o.tokens[0].text, o.tokens[0].tokens && o.tokens[0].tokens.length > 0 && o.tokens[0].tokens[0].type === "text" && (o.tokens[0].tokens[0].text = i + " " + me(o.tokens[0].tokens[0].text), o.tokens[0].tokens[0].escaped = !0)) : o.tokens.unshift({ type: "text", raw: i + " ", text: i + " ", escaped: !0 }) : e += i + " ";
1036
1003
  }
1037
1004
  return e += this.parser.parse(o.tokens, !!o.loose), `<li>${e}</li>
1038
1005
  `;
@@ -1078,7 +1045,7 @@ ${o}</tr>
1078
1045
  return `<em>${this.parser.parseInline(o)}</em>`;
1079
1046
  }
1080
1047
  codespan({ text: o }) {
1081
- return `<code>${ye(o, !0)}</code>`;
1048
+ return `<code>${me(o, !0)}</code>`;
1082
1049
  }
1083
1050
  br(o) {
1084
1051
  return "<br>";
@@ -1087,24 +1054,24 @@ ${o}</tr>
1087
1054
  return `<del>${this.parser.parseInline(o)}</del>`;
1088
1055
  }
1089
1056
  link({ href: o, title: e, tokens: t }) {
1090
- let i = this.parser.parseInline(t), s = Vi(o);
1057
+ let i = this.parser.parseInline(t), s = qi(o);
1091
1058
  if (s === null) return i;
1092
1059
  o = s;
1093
1060
  let r = '<a href="' + o + '"';
1094
- return e && (r += ' title="' + ye(e) + '"'), r += ">" + i + "</a>", r;
1061
+ return e && (r += ' title="' + me(e) + '"'), r += ">" + i + "</a>", r;
1095
1062
  }
1096
1063
  image({ href: o, title: e, text: t, tokens: i }) {
1097
1064
  i && (t = this.parser.parseInline(i, this.parser.textRenderer));
1098
- let s = Vi(o);
1099
- if (s === null) return ye(t);
1065
+ let s = qi(o);
1066
+ if (s === null) return me(t);
1100
1067
  o = s;
1101
1068
  let r = `<img src="${o}" alt="${t}"`;
1102
- return e && (r += ` title="${ye(e)}"`), r += ">", r;
1069
+ return e && (r += ` title="${me(e)}"`), r += ">", r;
1103
1070
  }
1104
1071
  text(o) {
1105
- return "tokens" in o && o.tokens ? this.parser.parseInline(o.tokens) : "escaped" in o && o.escaped ? o.text : ye(o.text);
1072
+ return "tokens" in o && o.tokens ? this.parser.parseInline(o.tokens) : "escaped" in o && o.escaped ? o.text : me(o.text);
1106
1073
  }
1107
- }, mi = class {
1074
+ }, fi = class {
1108
1075
  strong({ text: o }) {
1109
1076
  return o;
1110
1077
  }
@@ -1132,18 +1099,18 @@ ${o}</tr>
1132
1099
  br() {
1133
1100
  return "";
1134
1101
  }
1135
- }, Se = class ri {
1102
+ }, Te = class ii {
1136
1103
  constructor(e) {
1137
- O(this, "options");
1138
- O(this, "renderer");
1139
- O(this, "textRenderer");
1140
- this.options = e || Ie, this.options.renderer = this.options.renderer || new Rt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new mi();
1104
+ $(this, "options");
1105
+ $(this, "renderer");
1106
+ $(this, "textRenderer");
1107
+ this.options = e || Me, this.options.renderer = this.options.renderer || new Rt(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new fi();
1141
1108
  }
1142
1109
  static parse(e, t) {
1143
- return new ri(t).parse(e);
1110
+ return new ii(t).parse(e);
1144
1111
  }
1145
1112
  static parseInline(e, t) {
1146
- return new ri(t).parseInline(e);
1113
+ return new ii(t).parseInline(e);
1147
1114
  }
1148
1115
  parse(e, t = !0) {
1149
1116
  var s, r;
@@ -1278,11 +1245,11 @@ ${o}</tr>
1278
1245
  }
1279
1246
  return i;
1280
1247
  }
1281
- }, ei, bt = (ei = class {
1248
+ }, Kt, bt = (Kt = class {
1282
1249
  constructor(o) {
1283
- O(this, "options");
1284
- O(this, "block");
1285
- this.options = o || Ie;
1250
+ $(this, "options");
1251
+ $(this, "block");
1252
+ this.options = o || Me;
1286
1253
  }
1287
1254
  preprocess(o) {
1288
1255
  return o;
@@ -1294,23 +1261,23 @@ ${o}</tr>
1294
1261
  return o;
1295
1262
  }
1296
1263
  provideLexer() {
1297
- return this.block ? Re.lex : Re.lexInline;
1264
+ return this.block ? Ee.lex : Ee.lexInline;
1298
1265
  }
1299
1266
  provideParser() {
1300
- return this.block ? Se.parse : Se.parseInline;
1267
+ return this.block ? Te.parse : Te.parseInline;
1301
1268
  }
1302
- }, O(ei, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), ei), Xr = class {
1269
+ }, $(Kt, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), Kt), Zr = class {
1303
1270
  constructor(...o) {
1304
- O(this, "defaults", ai());
1305
- O(this, "options", this.setOptions);
1306
- O(this, "parse", this.parseMarkdown(!0));
1307
- O(this, "parseInline", this.parseMarkdown(!1));
1308
- O(this, "Parser", Se);
1309
- O(this, "Renderer", Rt);
1310
- O(this, "TextRenderer", mi);
1311
- O(this, "Lexer", Re);
1312
- O(this, "Tokenizer", Tt);
1313
- O(this, "Hooks", bt);
1271
+ $(this, "defaults", oi());
1272
+ $(this, "options", this.setOptions);
1273
+ $(this, "parse", this.parseMarkdown(!0));
1274
+ $(this, "parseInline", this.parseMarkdown(!1));
1275
+ $(this, "Parser", Te);
1276
+ $(this, "Renderer", Rt);
1277
+ $(this, "TextRenderer", fi);
1278
+ $(this, "Lexer", Ee);
1279
+ $(this, "Tokenizer", Tt);
1280
+ $(this, "Hooks", bt);
1314
1281
  this.use(...o);
1315
1282
  }
1316
1283
  walkTokens(o, e) {
@@ -1414,10 +1381,10 @@ ${o}</tr>
1414
1381
  return this.defaults = { ...this.defaults, ...o }, this;
1415
1382
  }
1416
1383
  lexer(o, e) {
1417
- return Re.lex(o, e ?? this.defaults);
1384
+ return Ee.lex(o, e ?? this.defaults);
1418
1385
  }
1419
1386
  parser(o, e) {
1420
- return Se.parse(o, e ?? this.defaults);
1387
+ return Te.parse(o, e ?? this.defaults);
1421
1388
  }
1422
1389
  parseMarkdown(o) {
1423
1390
  return (e, t) => {
@@ -1426,7 +1393,7 @@ ${o}</tr>
1426
1393
  if (typeof e > "u" || e === null) return r(new Error("marked(): input parameter is undefined or null"));
1427
1394
  if (typeof e != "string") return r(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
1428
1395
  s.hooks && (s.hooks.options = s, s.hooks.block = o);
1429
- let l = s.hooks ? s.hooks.provideLexer() : o ? Re.lex : Re.lexInline, n = s.hooks ? s.hooks.provideParser() : o ? Se.parse : Se.parseInline;
1396
+ let l = s.hooks ? s.hooks.provideLexer() : o ? Ee.lex : Ee.lexInline, n = s.hooks ? s.hooks.provideParser() : o ? Te.parse : Te.parseInline;
1430
1397
  if (s.async) return Promise.resolve(s.hooks ? s.hooks.preprocess(e) : e).then((u) => l(u, s)).then((u) => s.hooks ? s.hooks.processAllTokens(u) : u).then((u) => s.walkTokens ? Promise.all(this.walkTokens(u, s.walkTokens)).then(() => u) : u).then((u) => n(u, s)).then((u) => s.hooks ? s.hooks.postprocess(u) : u).catch(r);
1431
1398
  try {
1432
1399
  s.hooks && (e = s.hooks.preprocess(e));
@@ -1443,92 +1410,92 @@ ${o}</tr>
1443
1410
  return (t) => {
1444
1411
  if (t.message += `
1445
1412
  Please report this to https://github.com/markedjs/marked.`, o) {
1446
- let i = "<p>An error occurred:</p><pre>" + ye(t.message + "", !0) + "</pre>";
1413
+ let i = "<p>An error occurred:</p><pre>" + me(t.message + "", !0) + "</pre>";
1447
1414
  return e ? Promise.resolve(i) : i;
1448
1415
  }
1449
1416
  if (e) return Promise.reject(t);
1450
1417
  throw t;
1451
1418
  };
1452
1419
  }
1453
- }, Ne = new Xr();
1454
- function M(o, e) {
1455
- return Ne.parse(o, e);
1420
+ }, ze = new Zr();
1421
+ function I(o, e) {
1422
+ return ze.parse(o, e);
1456
1423
  }
1457
- M.options = M.setOptions = function(o) {
1458
- return Ne.setOptions(o), M.defaults = Ne.defaults, cs(M.defaults), M;
1424
+ I.options = I.setOptions = function(o) {
1425
+ return ze.setOptions(o), I.defaults = ze.defaults, cs(I.defaults), I;
1459
1426
  };
1460
- M.getDefaults = ai;
1461
- M.defaults = Ie;
1462
- M.use = function(...o) {
1463
- return Ne.use(...o), M.defaults = Ne.defaults, cs(M.defaults), M;
1427
+ I.getDefaults = oi;
1428
+ I.defaults = Me;
1429
+ I.use = function(...o) {
1430
+ return ze.use(...o), I.defaults = ze.defaults, cs(I.defaults), I;
1464
1431
  };
1465
- M.walkTokens = function(o, e) {
1466
- return Ne.walkTokens(o, e);
1432
+ I.walkTokens = function(o, e) {
1433
+ return ze.walkTokens(o, e);
1467
1434
  };
1468
- M.parseInline = Ne.parseInline;
1469
- M.Parser = Se;
1470
- M.parser = Se.parse;
1471
- M.Renderer = Rt;
1472
- M.TextRenderer = mi;
1473
- M.Lexer = Re;
1474
- M.lexer = Re.lex;
1475
- M.Tokenizer = Tt;
1476
- M.Hooks = bt;
1477
- M.parse = M;
1478
- M.options;
1479
- M.setOptions;
1480
- M.use;
1481
- M.walkTokens;
1482
- M.parseInline;
1483
- Se.parse;
1484
- Re.lex;
1435
+ I.parseInline = ze.parseInline;
1436
+ I.Parser = Te;
1437
+ I.parser = Te.parse;
1438
+ I.Renderer = Rt;
1439
+ I.TextRenderer = fi;
1440
+ I.Lexer = Ee;
1441
+ I.lexer = Ee.lex;
1442
+ I.Tokenizer = Tt;
1443
+ I.Hooks = bt;
1444
+ I.parse = I;
1445
+ I.options;
1446
+ I.setOptions;
1447
+ I.use;
1448
+ I.walkTokens;
1449
+ I.parseInline;
1450
+ Te.parse;
1451
+ Ee.lex;
1485
1452
  /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */
1486
1453
  const {
1487
1454
  entries: xs,
1488
- setPrototypeOf: Yi,
1455
+ setPrototypeOf: Xi,
1489
1456
  isFrozen: Kr,
1490
- getPrototypeOf: Zr,
1491
- getOwnPropertyDescriptor: Qr
1457
+ getPrototypeOf: Qr,
1458
+ getOwnPropertyDescriptor: Jr
1492
1459
  } = Object;
1493
1460
  let {
1494
1461
  freeze: re,
1495
- seal: de,
1462
+ seal: ue,
1496
1463
  create: ks
1497
1464
  } = Object, {
1498
- apply: ni,
1499
- construct: oi
1465
+ apply: si,
1466
+ construct: ri
1500
1467
  } = typeof Reflect < "u" && Reflect;
1501
1468
  re || (re = function(e) {
1502
1469
  return e;
1503
1470
  });
1504
- de || (de = function(e) {
1471
+ ue || (ue = function(e) {
1505
1472
  return e;
1506
1473
  });
1507
- ni || (ni = function(e, t, i) {
1474
+ si || (si = function(e, t, i) {
1508
1475
  return e.apply(t, i);
1509
1476
  });
1510
- oi || (oi = function(e, t) {
1477
+ ri || (ri = function(e, t) {
1511
1478
  return new e(...t);
1512
1479
  });
1513
- const _t = ne(Array.prototype.forEach), Jr = ne(Array.prototype.lastIndexOf), Xi = ne(Array.prototype.pop), Ke = ne(Array.prototype.push), en = ne(Array.prototype.splice), vt = ne(String.prototype.toLowerCase), Xt = ne(String.prototype.toString), Ki = ne(String.prototype.match), Ze = ne(String.prototype.replace), tn = ne(String.prototype.indexOf), sn = ne(String.prototype.trim), fe = ne(Object.prototype.hasOwnProperty), te = ne(RegExp.prototype.test), Qe = rn(TypeError);
1480
+ const _t = ne(Array.prototype.forEach), en = ne(Array.prototype.lastIndexOf), Zi = ne(Array.prototype.pop), Xe = ne(Array.prototype.push), tn = ne(Array.prototype.splice), wt = ne(String.prototype.toLowerCase), qt = ne(String.prototype.toString), Ki = ne(String.prototype.match), Ze = ne(String.prototype.replace), sn = ne(String.prototype.indexOf), rn = ne(String.prototype.trim), ce = ne(Object.prototype.hasOwnProperty), te = ne(RegExp.prototype.test), Ke = nn(TypeError);
1514
1481
  function ne(o) {
1515
1482
  return function(e) {
1516
1483
  e instanceof RegExp && (e.lastIndex = 0);
1517
1484
  for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
1518
1485
  i[s - 1] = arguments[s];
1519
- return ni(o, e, i);
1486
+ return si(o, e, i);
1520
1487
  };
1521
1488
  }
1522
- function rn(o) {
1489
+ function nn(o) {
1523
1490
  return function() {
1524
1491
  for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
1525
1492
  t[i] = arguments[i];
1526
- return oi(o, t);
1493
+ return ri(o, t);
1527
1494
  };
1528
1495
  }
1529
- function A(o, e) {
1530
- let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : vt;
1531
- Yi && Yi(o, null);
1496
+ function D(o, e) {
1497
+ let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : wt;
1498
+ Xi && Xi(o, null);
1532
1499
  let i = e.length;
1533
1500
  for (; i--; ) {
1534
1501
  let s = e[i];
@@ -1540,63 +1507,63 @@ function A(o, e) {
1540
1507
  }
1541
1508
  return o;
1542
1509
  }
1543
- function nn(o) {
1510
+ function on(o) {
1544
1511
  for (let e = 0; e < o.length; e++)
1545
- fe(o, e) || (o[e] = null);
1512
+ ce(o, e) || (o[e] = null);
1546
1513
  return o;
1547
1514
  }
1548
- function Te(o) {
1515
+ function ke(o) {
1549
1516
  const e = ks(null);
1550
1517
  for (const [t, i] of xs(o))
1551
- fe(o, t) && (Array.isArray(i) ? e[t] = nn(i) : i && typeof i == "object" && i.constructor === Object ? e[t] = Te(i) : e[t] = i);
1518
+ ce(o, t) && (Array.isArray(i) ? e[t] = on(i) : i && typeof i == "object" && i.constructor === Object ? e[t] = ke(i) : e[t] = i);
1552
1519
  return e;
1553
1520
  }
1554
- function Je(o, e) {
1521
+ function Qe(o, e) {
1555
1522
  for (; o !== null; ) {
1556
- const i = Qr(o, e);
1523
+ const i = Jr(o, e);
1557
1524
  if (i) {
1558
1525
  if (i.get)
1559
1526
  return ne(i.get);
1560
1527
  if (typeof i.value == "function")
1561
1528
  return ne(i.value);
1562
1529
  }
1563
- o = Zr(o);
1530
+ o = Qr(o);
1564
1531
  }
1565
1532
  function t() {
1566
1533
  return null;
1567
1534
  }
1568
1535
  return t;
1569
1536
  }
1570
- const Zi = re(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Kt = re(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Zt = re(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), on = re(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Qt = re(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), ln = re(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Qi = re(["#text"]), Ji = re(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Jt = re(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), es = re(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), yt = re(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), an = de(/\{\{[\w\W]*|[\w\W]*\}\}/gm), hn = de(/<%[\w\W]*|[\w\W]*%>/gm), un = de(/\$\{[\w\W]*/gm), cn = de(/^data-[\-\w.\u00B7-\uFFFF]+$/), dn = de(/^aria-[\-\w]+$/), Es = de(
1537
+ const Qi = re(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), jt = re(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Yt = re(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), ln = re(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Xt = re(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), an = re(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Ji = re(["#text"]), es = re(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Zt = re(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), ts = re(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), yt = re(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), hn = ue(/\{\{[\w\W]*|[\w\W]*\}\}/gm), un = ue(/<%[\w\W]*|[\w\W]*%>/gm), cn = ue(/\$\{[\w\W]*/gm), dn = ue(/^data-[\-\w.\u00B7-\uFFFF]+$/), pn = ue(/^aria-[\-\w]+$/), Es = ue(
1571
1538
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
1572
1539
  // eslint-disable-line no-useless-escape
1573
- ), pn = de(/^(?:\w+script|data):/i), fn = de(
1540
+ ), fn = ue(/^(?:\w+script|data):/i), gn = ue(
1574
1541
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
1575
1542
  // eslint-disable-line no-control-regex
1576
- ), Ts = de(/^html$/i), gn = de(/^[a-z][.\w]*(-[.\w]+)+$/i);
1577
- var ts = /* @__PURE__ */ Object.freeze({
1543
+ ), Ts = ue(/^html$/i), mn = ue(/^[a-z][.\w]*(-[.\w]+)+$/i);
1544
+ var is = /* @__PURE__ */ Object.freeze({
1578
1545
  __proto__: null,
1579
- ARIA_ATTR: dn,
1580
- ATTR_WHITESPACE: fn,
1581
- CUSTOM_ELEMENT: gn,
1582
- DATA_ATTR: cn,
1546
+ ARIA_ATTR: pn,
1547
+ ATTR_WHITESPACE: gn,
1548
+ CUSTOM_ELEMENT: mn,
1549
+ DATA_ATTR: dn,
1583
1550
  DOCTYPE_NAME: Ts,
1584
- ERB_EXPR: hn,
1551
+ ERB_EXPR: un,
1585
1552
  IS_ALLOWED_URI: Es,
1586
- IS_SCRIPT_OR_DATA: pn,
1587
- MUSTACHE_EXPR: an,
1588
- TMPLIT_EXPR: un
1553
+ IS_SCRIPT_OR_DATA: fn,
1554
+ MUSTACHE_EXPR: hn,
1555
+ TMPLIT_EXPR: cn
1589
1556
  });
1590
- const et = {
1557
+ const Je = {
1591
1558
  element: 1,
1592
1559
  text: 3,
1593
1560
  // Deprecated
1594
1561
  progressingInstruction: 7,
1595
1562
  comment: 8,
1596
1563
  document: 9
1597
- }, mn = function() {
1564
+ }, _n = function() {
1598
1565
  return typeof window > "u" ? null : window;
1599
- }, _n = function(e, t) {
1566
+ }, yn = function(e, t) {
1600
1567
  if (typeof e != "object" || typeof e.createPolicy != "function")
1601
1568
  return null;
1602
1569
  let i = null;
@@ -1615,7 +1582,7 @@ const et = {
1615
1582
  } catch {
1616
1583
  return console.warn("TrustedTypes policy " + r + " could not be created."), null;
1617
1584
  }
1618
- }, is = function() {
1585
+ }, ss = function() {
1619
1586
  return {
1620
1587
  afterSanitizeAttributes: [],
1621
1588
  afterSanitizeElements: [],
@@ -1629,9 +1596,9 @@ const et = {
1629
1596
  };
1630
1597
  };
1631
1598
  function Rs() {
1632
- let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : mn();
1633
- const e = (w) => Rs(w);
1634
- if (e.version = "3.2.6", e.removed = [], !o || !o.document || o.document.nodeType !== et.document || !o.Element)
1599
+ let o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : _n();
1600
+ const e = (v) => Rs(v);
1601
+ if (e.version = "3.2.6", e.removed = [], !o || !o.document || o.document.nodeType !== Je.document || !o.Element)
1635
1602
  return e.isSupported = !1, e;
1636
1603
  let {
1637
1604
  document: t
@@ -1644,40 +1611,40 @@ function Rs() {
1644
1611
  NodeFilter: a,
1645
1612
  NamedNodeMap: h = o.NamedNodeMap || o.MozNamedAttrMap,
1646
1613
  HTMLFormElement: p,
1647
- DOMParser: d,
1648
- trustedTypes: _
1649
- } = o, v = u.prototype, L = Je(v, "cloneNode"), H = Je(v, "remove"), C = Je(v, "nextSibling"), D = Je(v, "childNodes"), S = Je(v, "parentNode");
1614
+ DOMParser: c,
1615
+ trustedTypes: m
1616
+ } = o, b = u.prototype, z = Qe(b, "cloneNode"), O = Qe(b, "remove"), C = Qe(b, "nextSibling"), L = Qe(b, "childNodes"), A = Qe(b, "parentNode");
1650
1617
  if (typeof l == "function") {
1651
- const w = t.createElement("template");
1652
- w.content && w.content.ownerDocument && (t = w.content.ownerDocument);
1618
+ const v = t.createElement("template");
1619
+ v.content && v.content.ownerDocument && (t = v.content.ownerDocument);
1653
1620
  }
1654
- let m, y = "";
1621
+ let E, U = "";
1655
1622
  const {
1656
- implementation: P,
1657
- createNodeIterator: U,
1658
- createDocumentFragment: pe,
1659
- getElementsByTagName: me
1623
+ implementation: _,
1624
+ createNodeIterator: y,
1625
+ createDocumentFragment: T,
1626
+ getElementsByTagName: k
1660
1627
  } = t, {
1661
- importNode: N
1628
+ importNode: q
1662
1629
  } = i;
1663
- let x = is();
1664
- e.isSupported = typeof xs == "function" && typeof S == "function" && P && P.createHTMLDocument !== void 0;
1630
+ let P = ss();
1631
+ e.isSupported = typeof xs == "function" && typeof A == "function" && _ && _.createHTMLDocument !== void 0;
1665
1632
  const {
1666
- MUSTACHE_EXPR: E,
1667
- ERB_EXPR: K,
1668
- TMPLIT_EXPR: W,
1669
- DATA_ATTR: oe,
1670
- ARIA_ATTR: It,
1671
- IS_SCRIPT_OR_DATA: Ht,
1672
- ATTR_WHITESPACE: lt,
1673
- CUSTOM_ELEMENT: Ot
1674
- } = ts;
1633
+ MUSTACHE_EXPR: M,
1634
+ ERB_EXPR: Se,
1635
+ TMPLIT_EXPR: Ie,
1636
+ DATA_ATTR: ot,
1637
+ ARIA_ATTR: lt,
1638
+ IS_SCRIPT_OR_DATA: at,
1639
+ ATTR_WHITESPACE: _i,
1640
+ CUSTOM_ELEMENT: Cs
1641
+ } = is;
1675
1642
  let {
1676
- IS_ALLOWED_URI: at
1677
- } = ts, j = null;
1678
- const bi = A({}, [...Zi, ...Kt, ...Zt, ...Qt, ...Qi]);
1679
- let Z = null;
1680
- const vi = A({}, [...Ji, ...Jt, ...es, ...yt]);
1643
+ IS_ALLOWED_URI: yi
1644
+ } = is, X = null;
1645
+ const bi = D({}, [...Qi, ...jt, ...Yt, ...Xt, ...Ji]);
1646
+ let K = null;
1647
+ const wi = D({}, [...es, ...Zt, ...ts, ...yt]);
1681
1648
  let G = Object.seal(ks(null, {
1682
1649
  tagNameCheck: {
1683
1650
  writable: !0,
@@ -1697,168 +1664,168 @@ function Rs() {
1697
1664
  enumerable: !0,
1698
1665
  value: !1
1699
1666
  }
1700
- })), Ge = null, Pt = null, wi = !0, $t = !0, xi = !1, ki = !0, He = !1, ht = !0, De = !1, Bt = !1, Ut = !1, Oe = !1, ut = !1, ct = !1, Ei = !0, Ti = !1;
1701
- const Cs = "user-content-";
1702
- let Ft = !0, Ve = !1, Pe = {}, $e = null;
1703
- const Ri = A({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
1667
+ })), We = null, It = null, vi = !0, Ht = !0, xi = !1, ki = !0, He = !1, ht = !0, Ce = !1, Ot = !1, Pt = !1, Oe = !1, ut = !1, ct = !1, Ei = !0, Ti = !1;
1668
+ const As = "user-content-";
1669
+ let $t = !0, Ge = !1, Pe = {}, $e = null;
1670
+ const Ri = D({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
1704
1671
  let Si = null;
1705
- const Ci = A({}, ["audio", "video", "img", "source", "image", "track"]);
1706
- let Wt = null;
1707
- const Ai = A({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), dt = "http://www.w3.org/1998/Math/MathML", pt = "http://www.w3.org/2000/svg", xe = "http://www.w3.org/1999/xhtml";
1708
- let Be = xe, Gt = !1, Vt = null;
1709
- const As = A({}, [dt, pt, xe], Xt);
1710
- let ft = A({}, ["mi", "mo", "mn", "ms", "mtext"]), gt = A({}, ["annotation-xml"]);
1711
- const Ds = A({}, ["title", "style", "font", "a", "script"]);
1712
- let qe = null;
1713
- const Ls = ["application/xhtml+xml", "text/html"], zs = "text/html";
1714
- let Y = null, Ue = null;
1715
- const Ns = t.createElement("form"), Di = function(c) {
1716
- return c instanceof RegExp || c instanceof Function;
1717
- }, qt = function() {
1718
- let c = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1719
- if (!(Ue && Ue === c)) {
1720
- if ((!c || typeof c != "object") && (c = {}), c = Te(c), qe = // eslint-disable-next-line unicorn/prefer-includes
1721
- Ls.indexOf(c.PARSER_MEDIA_TYPE) === -1 ? zs : c.PARSER_MEDIA_TYPE, Y = qe === "application/xhtml+xml" ? Xt : vt, j = fe(c, "ALLOWED_TAGS") ? A({}, c.ALLOWED_TAGS, Y) : bi, Z = fe(c, "ALLOWED_ATTR") ? A({}, c.ALLOWED_ATTR, Y) : vi, Vt = fe(c, "ALLOWED_NAMESPACES") ? A({}, c.ALLOWED_NAMESPACES, Xt) : As, Wt = fe(c, "ADD_URI_SAFE_ATTR") ? A(Te(Ai), c.ADD_URI_SAFE_ATTR, Y) : Ai, Si = fe(c, "ADD_DATA_URI_TAGS") ? A(Te(Ci), c.ADD_DATA_URI_TAGS, Y) : Ci, $e = fe(c, "FORBID_CONTENTS") ? A({}, c.FORBID_CONTENTS, Y) : Ri, Ge = fe(c, "FORBID_TAGS") ? A({}, c.FORBID_TAGS, Y) : Te({}), Pt = fe(c, "FORBID_ATTR") ? A({}, c.FORBID_ATTR, Y) : Te({}), Pe = fe(c, "USE_PROFILES") ? c.USE_PROFILES : !1, wi = c.ALLOW_ARIA_ATTR !== !1, $t = c.ALLOW_DATA_ATTR !== !1, xi = c.ALLOW_UNKNOWN_PROTOCOLS || !1, ki = c.ALLOW_SELF_CLOSE_IN_ATTR !== !1, He = c.SAFE_FOR_TEMPLATES || !1, ht = c.SAFE_FOR_XML !== !1, De = c.WHOLE_DOCUMENT || !1, Oe = c.RETURN_DOM || !1, ut = c.RETURN_DOM_FRAGMENT || !1, ct = c.RETURN_TRUSTED_TYPE || !1, Ut = c.FORCE_BODY || !1, Ei = c.SANITIZE_DOM !== !1, Ti = c.SANITIZE_NAMED_PROPS || !1, Ft = c.KEEP_CONTENT !== !1, Ve = c.IN_PLACE || !1, at = c.ALLOWED_URI_REGEXP || Es, Be = c.NAMESPACE || xe, ft = c.MATHML_TEXT_INTEGRATION_POINTS || ft, gt = c.HTML_INTEGRATION_POINTS || gt, G = c.CUSTOM_ELEMENT_HANDLING || {}, c.CUSTOM_ELEMENT_HANDLING && Di(c.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (G.tagNameCheck = c.CUSTOM_ELEMENT_HANDLING.tagNameCheck), c.CUSTOM_ELEMENT_HANDLING && Di(c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (G.attributeNameCheck = c.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), c.CUSTOM_ELEMENT_HANDLING && typeof c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (G.allowCustomizedBuiltInElements = c.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), He && ($t = !1), ut && (Oe = !0), Pe && (j = A({}, Qi), Z = [], Pe.html === !0 && (A(j, Zi), A(Z, Ji)), Pe.svg === !0 && (A(j, Kt), A(Z, Jt), A(Z, yt)), Pe.svgFilters === !0 && (A(j, Zt), A(Z, Jt), A(Z, yt)), Pe.mathMl === !0 && (A(j, Qt), A(Z, es), A(Z, yt))), c.ADD_TAGS && (j === bi && (j = Te(j)), A(j, c.ADD_TAGS, Y)), c.ADD_ATTR && (Z === vi && (Z = Te(Z)), A(Z, c.ADD_ATTR, Y)), c.ADD_URI_SAFE_ATTR && A(Wt, c.ADD_URI_SAFE_ATTR, Y), c.FORBID_CONTENTS && ($e === Ri && ($e = Te($e)), A($e, c.FORBID_CONTENTS, Y)), Ft && (j["#text"] = !0), De && A(j, ["html", "head", "body"]), j.table && (A(j, ["tbody"]), delete Ge.tbody), c.TRUSTED_TYPES_POLICY) {
1722
- if (typeof c.TRUSTED_TYPES_POLICY.createHTML != "function")
1723
- throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
1724
- if (typeof c.TRUSTED_TYPES_POLICY.createScriptURL != "function")
1725
- throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
1726
- m = c.TRUSTED_TYPES_POLICY, y = m.createHTML("");
1672
+ const Ci = D({}, ["audio", "video", "img", "source", "image", "track"]);
1673
+ let Bt = null;
1674
+ const Ai = D({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), dt = "http://www.w3.org/1998/Math/MathML", pt = "http://www.w3.org/2000/svg", we = "http://www.w3.org/1999/xhtml";
1675
+ let Be = we, Ut = !1, Ft = null;
1676
+ const Ds = D({}, [dt, pt, we], qt);
1677
+ let ft = D({}, ["mi", "mo", "mn", "ms", "mtext"]), gt = D({}, ["annotation-xml"]);
1678
+ const Ls = D({}, ["title", "style", "font", "a", "script"]);
1679
+ let Ve = null;
1680
+ const zs = ["application/xhtml+xml", "text/html"], Ns = "text/html";
1681
+ let Z = null, Ue = null;
1682
+ const Ms = t.createElement("form"), Di = function(d) {
1683
+ return d instanceof RegExp || d instanceof Function;
1684
+ }, Wt = function() {
1685
+ let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1686
+ if (!(Ue && Ue === d)) {
1687
+ if ((!d || typeof d != "object") && (d = {}), d = ke(d), Ve = // eslint-disable-next-line unicorn/prefer-includes
1688
+ zs.indexOf(d.PARSER_MEDIA_TYPE) === -1 ? Ns : d.PARSER_MEDIA_TYPE, Z = Ve === "application/xhtml+xml" ? qt : wt, X = ce(d, "ALLOWED_TAGS") ? D({}, d.ALLOWED_TAGS, Z) : bi, K = ce(d, "ALLOWED_ATTR") ? D({}, d.ALLOWED_ATTR, Z) : wi, Ft = ce(d, "ALLOWED_NAMESPACES") ? D({}, d.ALLOWED_NAMESPACES, qt) : Ds, Bt = ce(d, "ADD_URI_SAFE_ATTR") ? D(ke(Ai), d.ADD_URI_SAFE_ATTR, Z) : Ai, Si = ce(d, "ADD_DATA_URI_TAGS") ? D(ke(Ci), d.ADD_DATA_URI_TAGS, Z) : Ci, $e = ce(d, "FORBID_CONTENTS") ? D({}, d.FORBID_CONTENTS, Z) : Ri, We = ce(d, "FORBID_TAGS") ? D({}, d.FORBID_TAGS, Z) : ke({}), It = ce(d, "FORBID_ATTR") ? D({}, d.FORBID_ATTR, Z) : ke({}), Pe = ce(d, "USE_PROFILES") ? d.USE_PROFILES : !1, vi = d.ALLOW_ARIA_ATTR !== !1, Ht = d.ALLOW_DATA_ATTR !== !1, xi = d.ALLOW_UNKNOWN_PROTOCOLS || !1, ki = d.ALLOW_SELF_CLOSE_IN_ATTR !== !1, He = d.SAFE_FOR_TEMPLATES || !1, ht = d.SAFE_FOR_XML !== !1, Ce = d.WHOLE_DOCUMENT || !1, Oe = d.RETURN_DOM || !1, ut = d.RETURN_DOM_FRAGMENT || !1, ct = d.RETURN_TRUSTED_TYPE || !1, Pt = d.FORCE_BODY || !1, Ei = d.SANITIZE_DOM !== !1, Ti = d.SANITIZE_NAMED_PROPS || !1, $t = d.KEEP_CONTENT !== !1, Ge = d.IN_PLACE || !1, yi = d.ALLOWED_URI_REGEXP || Es, Be = d.NAMESPACE || we, ft = d.MATHML_TEXT_INTEGRATION_POINTS || ft, gt = d.HTML_INTEGRATION_POINTS || gt, G = d.CUSTOM_ELEMENT_HANDLING || {}, d.CUSTOM_ELEMENT_HANDLING && Di(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (G.tagNameCheck = d.CUSTOM_ELEMENT_HANDLING.tagNameCheck), d.CUSTOM_ELEMENT_HANDLING && Di(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (G.attributeNameCheck = d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), d.CUSTOM_ELEMENT_HANDLING && typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (G.allowCustomizedBuiltInElements = d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), He && (Ht = !1), ut && (Oe = !0), Pe && (X = D({}, Ji), K = [], Pe.html === !0 && (D(X, Qi), D(K, es)), Pe.svg === !0 && (D(X, jt), D(K, Zt), D(K, yt)), Pe.svgFilters === !0 && (D(X, Yt), D(K, Zt), D(K, yt)), Pe.mathMl === !0 && (D(X, Xt), D(K, ts), D(K, yt))), d.ADD_TAGS && (X === bi && (X = ke(X)), D(X, d.ADD_TAGS, Z)), d.ADD_ATTR && (K === wi && (K = ke(K)), D(K, d.ADD_ATTR, Z)), d.ADD_URI_SAFE_ATTR && D(Bt, d.ADD_URI_SAFE_ATTR, Z), d.FORBID_CONTENTS && ($e === Ri && ($e = ke($e)), D($e, d.FORBID_CONTENTS, Z)), $t && (X["#text"] = !0), Ce && D(X, ["html", "head", "body"]), X.table && (D(X, ["tbody"]), delete We.tbody), d.TRUSTED_TYPES_POLICY) {
1689
+ if (typeof d.TRUSTED_TYPES_POLICY.createHTML != "function")
1690
+ throw Ke('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
1691
+ if (typeof d.TRUSTED_TYPES_POLICY.createScriptURL != "function")
1692
+ throw Ke('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
1693
+ E = d.TRUSTED_TYPES_POLICY, U = E.createHTML("");
1727
1694
  } else
1728
- m === void 0 && (m = _n(_, s)), m !== null && typeof y == "string" && (y = m.createHTML(""));
1729
- re && re(c), Ue = c;
1695
+ E === void 0 && (E = yn(m, s)), E !== null && typeof U == "string" && (U = E.createHTML(""));
1696
+ re && re(d), Ue = d;
1730
1697
  }
1731
- }, Li = A({}, [...Kt, ...Zt, ...on]), zi = A({}, [...Qt, ...ln]), Ms = function(c) {
1732
- let g = S(c);
1698
+ }, Li = D({}, [...jt, ...Yt, ...ln]), zi = D({}, [...Xt, ...an]), Is = function(d) {
1699
+ let g = A(d);
1733
1700
  (!g || !g.tagName) && (g = {
1734
1701
  namespaceURI: Be,
1735
1702
  tagName: "template"
1736
1703
  });
1737
- const b = vt(c.tagName), F = vt(g.tagName);
1738
- return Vt[c.namespaceURI] ? c.namespaceURI === pt ? g.namespaceURI === xe ? b === "svg" : g.namespaceURI === dt ? b === "svg" && (F === "annotation-xml" || ft[F]) : !!Li[b] : c.namespaceURI === dt ? g.namespaceURI === xe ? b === "math" : g.namespaceURI === pt ? b === "math" && gt[F] : !!zi[b] : c.namespaceURI === xe ? g.namespaceURI === pt && !gt[F] || g.namespaceURI === dt && !ft[F] ? !1 : !zi[b] && (Ds[b] || !Li[b]) : !!(qe === "application/xhtml+xml" && Vt[c.namespaceURI]) : !1;
1739
- }, _e = function(c) {
1740
- Ke(e.removed, {
1741
- element: c
1704
+ const w = wt(d.tagName), W = wt(g.tagName);
1705
+ return Ft[d.namespaceURI] ? d.namespaceURI === pt ? g.namespaceURI === we ? w === "svg" : g.namespaceURI === dt ? w === "svg" && (W === "annotation-xml" || ft[W]) : !!Li[w] : d.namespaceURI === dt ? g.namespaceURI === we ? w === "math" : g.namespaceURI === pt ? w === "math" && gt[W] : !!zi[w] : d.namespaceURI === we ? g.namespaceURI === pt && !gt[W] || g.namespaceURI === dt && !ft[W] ? !1 : !zi[w] && (Ls[w] || !Li[w]) : !!(Ve === "application/xhtml+xml" && Ft[d.namespaceURI]) : !1;
1706
+ }, ge = function(d) {
1707
+ Xe(e.removed, {
1708
+ element: d
1742
1709
  });
1743
1710
  try {
1744
- S(c).removeChild(c);
1711
+ A(d).removeChild(d);
1745
1712
  } catch {
1746
- H(c);
1713
+ O(d);
1747
1714
  }
1748
- }, Fe = function(c, g) {
1715
+ }, Fe = function(d, g) {
1749
1716
  try {
1750
- Ke(e.removed, {
1751
- attribute: g.getAttributeNode(c),
1717
+ Xe(e.removed, {
1718
+ attribute: g.getAttributeNode(d),
1752
1719
  from: g
1753
1720
  });
1754
1721
  } catch {
1755
- Ke(e.removed, {
1722
+ Xe(e.removed, {
1756
1723
  attribute: null,
1757
1724
  from: g
1758
1725
  });
1759
1726
  }
1760
- if (g.removeAttribute(c), c === "is")
1727
+ if (g.removeAttribute(d), d === "is")
1761
1728
  if (Oe || ut)
1762
1729
  try {
1763
- _e(g);
1730
+ ge(g);
1764
1731
  } catch {
1765
1732
  }
1766
1733
  else
1767
1734
  try {
1768
- g.setAttribute(c, "");
1735
+ g.setAttribute(d, "");
1769
1736
  } catch {
1770
1737
  }
1771
- }, Ni = function(c) {
1772
- let g = null, b = null;
1773
- if (Ut)
1774
- c = "<remove></remove>" + c;
1738
+ }, Ni = function(d) {
1739
+ let g = null, w = null;
1740
+ if (Pt)
1741
+ d = "<remove></remove>" + d;
1775
1742
  else {
1776
- const V = Ki(c, /^[\r\n\t ]+/);
1777
- b = V && V[0];
1743
+ const j = Ki(d, /^[\r\n\t ]+/);
1744
+ w = j && j[0];
1778
1745
  }
1779
- qe === "application/xhtml+xml" && Be === xe && (c = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + c + "</body></html>");
1780
- const F = m ? m.createHTML(c) : c;
1781
- if (Be === xe)
1746
+ Ve === "application/xhtml+xml" && Be === we && (d = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + d + "</body></html>");
1747
+ const W = E ? E.createHTML(d) : d;
1748
+ if (Be === we)
1782
1749
  try {
1783
- g = new d().parseFromString(F, qe);
1750
+ g = new c().parseFromString(W, Ve);
1784
1751
  } catch {
1785
1752
  }
1786
1753
  if (!g || !g.documentElement) {
1787
- g = P.createDocument(Be, "template", null);
1754
+ g = _.createDocument(Be, "template", null);
1788
1755
  try {
1789
- g.documentElement.innerHTML = Gt ? y : F;
1756
+ g.documentElement.innerHTML = Ut ? U : W;
1790
1757
  } catch {
1791
1758
  }
1792
1759
  }
1793
1760
  const J = g.body || g.documentElement;
1794
- return c && b && J.insertBefore(t.createTextNode(b), J.childNodes[0] || null), Be === xe ? me.call(g, De ? "html" : "body")[0] : De ? g.documentElement : J;
1795
- }, Mi = function(c) {
1796
- return U.call(
1797
- c.ownerDocument || c,
1798
- c,
1761
+ return d && w && J.insertBefore(t.createTextNode(w), J.childNodes[0] || null), Be === we ? k.call(g, Ce ? "html" : "body")[0] : Ce ? g.documentElement : J;
1762
+ }, Mi = function(d) {
1763
+ return y.call(
1764
+ d.ownerDocument || d,
1765
+ d,
1799
1766
  // eslint-disable-next-line no-bitwise
1800
1767
  a.SHOW_ELEMENT | a.SHOW_COMMENT | a.SHOW_TEXT | a.SHOW_PROCESSING_INSTRUCTION | a.SHOW_CDATA_SECTION,
1801
1768
  null
1802
1769
  );
1803
- }, jt = function(c) {
1804
- return c instanceof p && (typeof c.nodeName != "string" || typeof c.textContent != "string" || typeof c.removeChild != "function" || !(c.attributes instanceof h) || typeof c.removeAttribute != "function" || typeof c.setAttribute != "function" || typeof c.namespaceURI != "string" || typeof c.insertBefore != "function" || typeof c.hasChildNodes != "function");
1805
- }, Ii = function(c) {
1806
- return typeof n == "function" && c instanceof n;
1770
+ }, Gt = function(d) {
1771
+ return d instanceof p && (typeof d.nodeName != "string" || typeof d.textContent != "string" || typeof d.removeChild != "function" || !(d.attributes instanceof h) || typeof d.removeAttribute != "function" || typeof d.setAttribute != "function" || typeof d.namespaceURI != "string" || typeof d.insertBefore != "function" || typeof d.hasChildNodes != "function");
1772
+ }, Ii = function(d) {
1773
+ return typeof n == "function" && d instanceof n;
1807
1774
  };
1808
- function ke(w, c, g) {
1809
- _t(w, (b) => {
1810
- b.call(e, c, g, Ue);
1775
+ function ve(v, d, g) {
1776
+ _t(v, (w) => {
1777
+ w.call(e, d, g, Ue);
1811
1778
  });
1812
1779
  }
1813
- const Hi = function(c) {
1780
+ const Hi = function(d) {
1814
1781
  let g = null;
1815
- if (ke(x.beforeSanitizeElements, c, null), jt(c))
1816
- return _e(c), !0;
1817
- const b = Y(c.nodeName);
1818
- if (ke(x.uponSanitizeElement, c, {
1819
- tagName: b,
1820
- allowedTags: j
1821
- }), ht && c.hasChildNodes() && !Ii(c.firstElementChild) && te(/<[/\w!]/g, c.innerHTML) && te(/<[/\w!]/g, c.textContent) || c.nodeType === et.progressingInstruction || ht && c.nodeType === et.comment && te(/<[/\w]/g, c.data))
1822
- return _e(c), !0;
1823
- if (!j[b] || Ge[b]) {
1824
- if (!Ge[b] && Pi(b) && (G.tagNameCheck instanceof RegExp && te(G.tagNameCheck, b) || G.tagNameCheck instanceof Function && G.tagNameCheck(b)))
1782
+ if (ve(P.beforeSanitizeElements, d, null), Gt(d))
1783
+ return ge(d), !0;
1784
+ const w = Z(d.nodeName);
1785
+ if (ve(P.uponSanitizeElement, d, {
1786
+ tagName: w,
1787
+ allowedTags: X
1788
+ }), ht && d.hasChildNodes() && !Ii(d.firstElementChild) && te(/<[/\w!]/g, d.innerHTML) && te(/<[/\w!]/g, d.textContent) || d.nodeType === Je.progressingInstruction || ht && d.nodeType === Je.comment && te(/<[/\w]/g, d.data))
1789
+ return ge(d), !0;
1790
+ if (!X[w] || We[w]) {
1791
+ if (!We[w] && Pi(w) && (G.tagNameCheck instanceof RegExp && te(G.tagNameCheck, w) || G.tagNameCheck instanceof Function && G.tagNameCheck(w)))
1825
1792
  return !1;
1826
- if (Ft && !$e[b]) {
1827
- const F = S(c) || c.parentNode, J = D(c) || c.childNodes;
1828
- if (J && F) {
1829
- const V = J.length;
1830
- for (let le = V - 1; le >= 0; --le) {
1831
- const Ee = L(J[le], !0);
1832
- Ee.__removalCount = (c.__removalCount || 0) + 1, F.insertBefore(Ee, C(c));
1793
+ if ($t && !$e[w]) {
1794
+ const W = A(d) || d.parentNode, J = L(d) || d.childNodes;
1795
+ if (J && W) {
1796
+ const j = J.length;
1797
+ for (let oe = j - 1; oe >= 0; --oe) {
1798
+ const xe = z(J[oe], !0);
1799
+ xe.__removalCount = (d.__removalCount || 0) + 1, W.insertBefore(xe, C(d));
1833
1800
  }
1834
1801
  }
1835
1802
  }
1836
- return _e(c), !0;
1803
+ return ge(d), !0;
1837
1804
  }
1838
- return c instanceof u && !Ms(c) || (b === "noscript" || b === "noembed" || b === "noframes") && te(/<\/no(script|embed|frames)/i, c.innerHTML) ? (_e(c), !0) : (He && c.nodeType === et.text && (g = c.textContent, _t([E, K, W], (F) => {
1839
- g = Ze(g, F, " ");
1840
- }), c.textContent !== g && (Ke(e.removed, {
1841
- element: c.cloneNode()
1842
- }), c.textContent = g)), ke(x.afterSanitizeElements, c, null), !1);
1843
- }, Oi = function(c, g, b) {
1844
- if (Ei && (g === "id" || g === "name") && (b in t || b in Ns))
1805
+ return d instanceof u && !Is(d) || (w === "noscript" || w === "noembed" || w === "noframes") && te(/<\/no(script|embed|frames)/i, d.innerHTML) ? (ge(d), !0) : (He && d.nodeType === Je.text && (g = d.textContent, _t([M, Se, Ie], (W) => {
1806
+ g = Ze(g, W, " ");
1807
+ }), d.textContent !== g && (Xe(e.removed, {
1808
+ element: d.cloneNode()
1809
+ }), d.textContent = g)), ve(P.afterSanitizeElements, d, null), !1);
1810
+ }, Oi = function(d, g, w) {
1811
+ if (Ei && (g === "id" || g === "name") && (w in t || w in Ms))
1845
1812
  return !1;
1846
- if (!($t && !Pt[g] && te(oe, g))) {
1847
- if (!(wi && te(It, g))) {
1848
- if (!Z[g] || Pt[g]) {
1813
+ if (!(Ht && !It[g] && te(ot, g))) {
1814
+ if (!(vi && te(lt, g))) {
1815
+ if (!K[g] || It[g]) {
1849
1816
  if (
1850
1817
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1851
1818
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1852
1819
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1853
- !(Pi(c) && (G.tagNameCheck instanceof RegExp && te(G.tagNameCheck, c) || G.tagNameCheck instanceof Function && G.tagNameCheck(c)) && (G.attributeNameCheck instanceof RegExp && te(G.attributeNameCheck, g) || G.attributeNameCheck instanceof Function && G.attributeNameCheck(g)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1820
+ !(Pi(d) && (G.tagNameCheck instanceof RegExp && te(G.tagNameCheck, d) || G.tagNameCheck instanceof Function && G.tagNameCheck(d)) && (G.attributeNameCheck instanceof RegExp && te(G.attributeNameCheck, g) || G.attributeNameCheck instanceof Function && G.attributeNameCheck(g)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1854
1821
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1855
- g === "is" && G.allowCustomizedBuiltInElements && (G.tagNameCheck instanceof RegExp && te(G.tagNameCheck, b) || G.tagNameCheck instanceof Function && G.tagNameCheck(b)))
1822
+ g === "is" && G.allowCustomizedBuiltInElements && (G.tagNameCheck instanceof RegExp && te(G.tagNameCheck, w) || G.tagNameCheck instanceof Function && G.tagNameCheck(w)))
1856
1823
  ) return !1;
1857
- } else if (!Wt[g]) {
1858
- if (!te(at, Ze(b, lt, ""))) {
1859
- if (!((g === "src" || g === "xlink:href" || g === "href") && c !== "script" && tn(b, "data:") === 0 && Si[c])) {
1860
- if (!(xi && !te(Ht, Ze(b, lt, "")))) {
1861
- if (b)
1824
+ } else if (!Bt[g]) {
1825
+ if (!te(yi, Ze(w, _i, ""))) {
1826
+ if (!((g === "src" || g === "xlink:href" || g === "href") && d !== "script" && sn(w, "data:") === 0 && Si[d])) {
1827
+ if (!(xi && !te(at, Ze(w, _i, "")))) {
1828
+ if (w)
1862
1829
  return !1;
1863
1830
  }
1864
1831
  }
@@ -1867,147 +1834,147 @@ function Rs() {
1867
1834
  }
1868
1835
  }
1869
1836
  return !0;
1870
- }, Pi = function(c) {
1871
- return c !== "annotation-xml" && Ki(c, Ot);
1872
- }, $i = function(c) {
1873
- ke(x.beforeSanitizeAttributes, c, null);
1837
+ }, Pi = function(d) {
1838
+ return d !== "annotation-xml" && Ki(d, Cs);
1839
+ }, $i = function(d) {
1840
+ ve(P.beforeSanitizeAttributes, d, null);
1874
1841
  const {
1875
1842
  attributes: g
1876
- } = c;
1877
- if (!g || jt(c))
1843
+ } = d;
1844
+ if (!g || Gt(d))
1878
1845
  return;
1879
- const b = {
1846
+ const w = {
1880
1847
  attrName: "",
1881
1848
  attrValue: "",
1882
1849
  keepAttr: !0,
1883
- allowedAttributes: Z,
1850
+ allowedAttributes: K,
1884
1851
  forceKeepAttr: void 0
1885
1852
  };
1886
- let F = g.length;
1887
- for (; F--; ) {
1888
- const J = g[F], {
1889
- name: V,
1890
- namespaceURI: le,
1891
- value: Ee
1892
- } = J, je = Y(V), Yt = Ee;
1893
- let ee = V === "value" ? Yt : sn(Yt);
1894
- if (b.attrName = je, b.attrValue = ee, b.keepAttr = !0, b.forceKeepAttr = void 0, ke(x.uponSanitizeAttribute, c, b), ee = b.attrValue, Ti && (je === "id" || je === "name") && (Fe(V, c), ee = Cs + ee), ht && te(/((--!?|])>)|<\/(style|title)/i, ee)) {
1895
- Fe(V, c);
1853
+ let W = g.length;
1854
+ for (; W--; ) {
1855
+ const J = g[W], {
1856
+ name: j,
1857
+ namespaceURI: oe,
1858
+ value: xe
1859
+ } = J, qe = Z(j), Vt = xe;
1860
+ let ee = j === "value" ? Vt : rn(Vt);
1861
+ if (w.attrName = qe, w.attrValue = ee, w.keepAttr = !0, w.forceKeepAttr = void 0, ve(P.uponSanitizeAttribute, d, w), ee = w.attrValue, Ti && (qe === "id" || qe === "name") && (Fe(j, d), ee = As + ee), ht && te(/((--!?|])>)|<\/(style|title)/i, ee)) {
1862
+ Fe(j, d);
1896
1863
  continue;
1897
1864
  }
1898
- if (b.forceKeepAttr)
1865
+ if (w.forceKeepAttr)
1899
1866
  continue;
1900
- if (!b.keepAttr) {
1901
- Fe(V, c);
1867
+ if (!w.keepAttr) {
1868
+ Fe(j, d);
1902
1869
  continue;
1903
1870
  }
1904
1871
  if (!ki && te(/\/>/i, ee)) {
1905
- Fe(V, c);
1872
+ Fe(j, d);
1906
1873
  continue;
1907
1874
  }
1908
- He && _t([E, K, W], (Ui) => {
1875
+ He && _t([M, Se, Ie], (Ui) => {
1909
1876
  ee = Ze(ee, Ui, " ");
1910
1877
  });
1911
- const Bi = Y(c.nodeName);
1912
- if (!Oi(Bi, je, ee)) {
1913
- Fe(V, c);
1878
+ const Bi = Z(d.nodeName);
1879
+ if (!Oi(Bi, qe, ee)) {
1880
+ Fe(j, d);
1914
1881
  continue;
1915
1882
  }
1916
- if (m && typeof _ == "object" && typeof _.getAttributeType == "function" && !le)
1917
- switch (_.getAttributeType(Bi, je)) {
1883
+ if (E && typeof m == "object" && typeof m.getAttributeType == "function" && !oe)
1884
+ switch (m.getAttributeType(Bi, qe)) {
1918
1885
  case "TrustedHTML": {
1919
- ee = m.createHTML(ee);
1886
+ ee = E.createHTML(ee);
1920
1887
  break;
1921
1888
  }
1922
1889
  case "TrustedScriptURL": {
1923
- ee = m.createScriptURL(ee);
1890
+ ee = E.createScriptURL(ee);
1924
1891
  break;
1925
1892
  }
1926
1893
  }
1927
- if (ee !== Yt)
1894
+ if (ee !== Vt)
1928
1895
  try {
1929
- le ? c.setAttributeNS(le, V, ee) : c.setAttribute(V, ee), jt(c) ? _e(c) : Xi(e.removed);
1896
+ oe ? d.setAttributeNS(oe, j, ee) : d.setAttribute(j, ee), Gt(d) ? ge(d) : Zi(e.removed);
1930
1897
  } catch {
1931
- Fe(V, c);
1898
+ Fe(j, d);
1932
1899
  }
1933
1900
  }
1934
- ke(x.afterSanitizeAttributes, c, null);
1935
- }, Is = function w(c) {
1901
+ ve(P.afterSanitizeAttributes, d, null);
1902
+ }, Hs = function v(d) {
1936
1903
  let g = null;
1937
- const b = Mi(c);
1938
- for (ke(x.beforeSanitizeShadowDOM, c, null); g = b.nextNode(); )
1939
- ke(x.uponSanitizeShadowNode, g, null), Hi(g), $i(g), g.content instanceof r && w(g.content);
1940
- ke(x.afterSanitizeShadowDOM, c, null);
1904
+ const w = Mi(d);
1905
+ for (ve(P.beforeSanitizeShadowDOM, d, null); g = w.nextNode(); )
1906
+ ve(P.uponSanitizeShadowNode, g, null), Hi(g), $i(g), g.content instanceof r && v(g.content);
1907
+ ve(P.afterSanitizeShadowDOM, d, null);
1941
1908
  };
1942
- return e.sanitize = function(w) {
1943
- let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, g = null, b = null, F = null, J = null;
1944
- if (Gt = !w, Gt && (w = "<!-->"), typeof w != "string" && !Ii(w))
1945
- if (typeof w.toString == "function") {
1946
- if (w = w.toString(), typeof w != "string")
1947
- throw Qe("dirty is not a string, aborting");
1909
+ return e.sanitize = function(v) {
1910
+ let d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, g = null, w = null, W = null, J = null;
1911
+ if (Ut = !v, Ut && (v = "<!-->"), typeof v != "string" && !Ii(v))
1912
+ if (typeof v.toString == "function") {
1913
+ if (v = v.toString(), typeof v != "string")
1914
+ throw Ke("dirty is not a string, aborting");
1948
1915
  } else
1949
- throw Qe("toString is not a function");
1916
+ throw Ke("toString is not a function");
1950
1917
  if (!e.isSupported)
1951
- return w;
1952
- if (Bt || qt(c), e.removed = [], typeof w == "string" && (Ve = !1), Ve) {
1953
- if (w.nodeName) {
1954
- const Ee = Y(w.nodeName);
1955
- if (!j[Ee] || Ge[Ee])
1956
- throw Qe("root node is forbidden and cannot be sanitized in-place");
1918
+ return v;
1919
+ if (Ot || Wt(d), e.removed = [], typeof v == "string" && (Ge = !1), Ge) {
1920
+ if (v.nodeName) {
1921
+ const xe = Z(v.nodeName);
1922
+ if (!X[xe] || We[xe])
1923
+ throw Ke("root node is forbidden and cannot be sanitized in-place");
1957
1924
  }
1958
- } else if (w instanceof n)
1959
- g = Ni("<!---->"), b = g.ownerDocument.importNode(w, !0), b.nodeType === et.element && b.nodeName === "BODY" || b.nodeName === "HTML" ? g = b : g.appendChild(b);
1925
+ } else if (v instanceof n)
1926
+ g = Ni("<!---->"), w = g.ownerDocument.importNode(v, !0), w.nodeType === Je.element && w.nodeName === "BODY" || w.nodeName === "HTML" ? g = w : g.appendChild(w);
1960
1927
  else {
1961
- if (!Oe && !He && !De && // eslint-disable-next-line unicorn/prefer-includes
1962
- w.indexOf("<") === -1)
1963
- return m && ct ? m.createHTML(w) : w;
1964
- if (g = Ni(w), !g)
1965
- return Oe ? null : ct ? y : "";
1928
+ if (!Oe && !He && !Ce && // eslint-disable-next-line unicorn/prefer-includes
1929
+ v.indexOf("<") === -1)
1930
+ return E && ct ? E.createHTML(v) : v;
1931
+ if (g = Ni(v), !g)
1932
+ return Oe ? null : ct ? U : "";
1966
1933
  }
1967
- g && Ut && _e(g.firstChild);
1968
- const V = Mi(Ve ? w : g);
1969
- for (; F = V.nextNode(); )
1970
- Hi(F), $i(F), F.content instanceof r && Is(F.content);
1971
- if (Ve)
1972
- return w;
1934
+ g && Pt && ge(g.firstChild);
1935
+ const j = Mi(Ge ? v : g);
1936
+ for (; W = j.nextNode(); )
1937
+ Hi(W), $i(W), W.content instanceof r && Hs(W.content);
1938
+ if (Ge)
1939
+ return v;
1973
1940
  if (Oe) {
1974
1941
  if (ut)
1975
- for (J = pe.call(g.ownerDocument); g.firstChild; )
1942
+ for (J = T.call(g.ownerDocument); g.firstChild; )
1976
1943
  J.appendChild(g.firstChild);
1977
1944
  else
1978
1945
  J = g;
1979
- return (Z.shadowroot || Z.shadowrootmode) && (J = N.call(i, J, !0)), J;
1946
+ return (K.shadowroot || K.shadowrootmode) && (J = q.call(i, J, !0)), J;
1980
1947
  }
1981
- let le = De ? g.outerHTML : g.innerHTML;
1982
- return De && j["!doctype"] && g.ownerDocument && g.ownerDocument.doctype && g.ownerDocument.doctype.name && te(Ts, g.ownerDocument.doctype.name) && (le = "<!DOCTYPE " + g.ownerDocument.doctype.name + `>
1983
- ` + le), He && _t([E, K, W], (Ee) => {
1984
- le = Ze(le, Ee, " ");
1985
- }), m && ct ? m.createHTML(le) : le;
1948
+ let oe = Ce ? g.outerHTML : g.innerHTML;
1949
+ return Ce && X["!doctype"] && g.ownerDocument && g.ownerDocument.doctype && g.ownerDocument.doctype.name && te(Ts, g.ownerDocument.doctype.name) && (oe = "<!DOCTYPE " + g.ownerDocument.doctype.name + `>
1950
+ ` + oe), He && _t([M, Se, Ie], (xe) => {
1951
+ oe = Ze(oe, xe, " ");
1952
+ }), E && ct ? E.createHTML(oe) : oe;
1986
1953
  }, e.setConfig = function() {
1987
- let w = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1988
- qt(w), Bt = !0;
1954
+ let v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1955
+ Wt(v), Ot = !0;
1989
1956
  }, e.clearConfig = function() {
1990
- Ue = null, Bt = !1;
1991
- }, e.isValidAttribute = function(w, c, g) {
1992
- Ue || qt({});
1993
- const b = Y(w), F = Y(c);
1994
- return Oi(b, F, g);
1995
- }, e.addHook = function(w, c) {
1996
- typeof c == "function" && Ke(x[w], c);
1997
- }, e.removeHook = function(w, c) {
1998
- if (c !== void 0) {
1999
- const g = Jr(x[w], c);
2000
- return g === -1 ? void 0 : en(x[w], g, 1)[0];
1957
+ Ue = null, Ot = !1;
1958
+ }, e.isValidAttribute = function(v, d, g) {
1959
+ Ue || Wt({});
1960
+ const w = Z(v), W = Z(d);
1961
+ return Oi(w, W, g);
1962
+ }, e.addHook = function(v, d) {
1963
+ typeof d == "function" && Xe(P[v], d);
1964
+ }, e.removeHook = function(v, d) {
1965
+ if (d !== void 0) {
1966
+ const g = en(P[v], d);
1967
+ return g === -1 ? void 0 : tn(P[v], g, 1)[0];
2001
1968
  }
2002
- return Xi(x[w]);
2003
- }, e.removeHooks = function(w) {
2004
- x[w] = [];
1969
+ return Zi(P[v]);
1970
+ }, e.removeHooks = function(v) {
1971
+ P[v] = [];
2005
1972
  }, e.removeAllHooks = function() {
2006
- x = is();
1973
+ P = ss();
2007
1974
  }, e;
2008
1975
  }
2009
- var yn = Rs();
2010
- const bn = ["innerHTML"], vn = "Markdown", wn = /* @__PURE__ */ we({
1976
+ var bn = Rs();
1977
+ const wn = ["innerHTML"], vn = "Markdown", xn = /* @__PURE__ */ be({
2011
1978
  inheritAttrs: !1,
2012
1979
  __name: "Markdown",
2013
1980
  props: {
@@ -2019,21 +1986,21 @@ const bn = ["innerHTML"], vn = "Markdown", wn = /* @__PURE__ */ we({
2019
1986
  emits: ["update:markdownText", "changeMode"],
2020
1987
  setup(o, { emit: e }) {
2021
1988
  const t = o, i = e, s = os([{ comp: us, event: a, tooltip: "Edit Markdown" }]);
2022
- M.setOptions({
1989
+ I.setOptions({
2023
1990
  gfm: !0,
2024
1991
  breaks: !0
2025
1992
  });
2026
- const r = B(t.markdownText ?? "");
2027
- ce(() => t.markdownText, (h) => {
1993
+ const r = F(t.markdownText ?? "");
1994
+ fe(() => t.markdownText, (h) => {
2028
1995
  h !== void 0 && h !== r.value && (r.value = h);
2029
1996
  });
2030
- const l = B(t.mode ? t.mode === "edit" : !1);
2031
- ce(() => t.mode, (h) => {
1997
+ const l = F(t.mode ? t.mode === "edit" : !1);
1998
+ fe(() => t.mode, (h) => {
2032
1999
  h && (l.value = h === "edit");
2033
2000
  });
2034
- const n = Ce(() => {
2035
- const h = t.inputFormat === "html" ? r.value ?? "" : M.parse(r.value ?? "");
2036
- return t.sanitize === !1 ? h : yn.sanitize(h);
2001
+ const n = de(() => {
2002
+ const h = t.inputFormat === "html" ? r.value ?? "" : I.parse(r.value ?? "");
2003
+ return t.sanitize === !1 ? h : bn.sanitize(h);
2037
2004
  });
2038
2005
  function u() {
2039
2006
  i("update:markdownText", r.value);
@@ -2041,30 +2008,30 @@ const bn = ["innerHTML"], vn = "Markdown", wn = /* @__PURE__ */ we({
2041
2008
  function a() {
2042
2009
  l.value = !l.value, i("changeMode", l.value ? "edit" : "preview");
2043
2010
  }
2044
- return (h, p) => (R(), $(ze, null, [
2045
- wt(h.$slots, "default", {
2011
+ return (h, p) => (S(), B(Le, null, [
2012
+ vt(h.$slots, "default", {
2046
2013
  widgetName: vn,
2047
2014
  childIcons: s.value
2048
2015
  }, void 0, !0),
2049
- z("div", li({ class: "markdown-widget-wrap" }, h.$attrs), [
2050
- l.value ? Le((R(), $("textarea", {
2016
+ N("div", ni({ class: "markdown-widget-wrap" }, h.$attrs), [
2017
+ l.value ? De((S(), B("textarea", {
2051
2018
  key: 0,
2052
- "onUpdate:modelValue": p[0] || (p[0] = (d) => r.value = d),
2019
+ "onUpdate:modelValue": p[0] || (p[0] = (c) => r.value = c),
2053
2020
  onInput: u,
2054
2021
  class: "markdown-input",
2055
2022
  placeholder: "Write markdown here…"
2056
2023
  }, null, 544)), [
2057
- [Fs, r.value]
2058
- ]) : (R(), $("div", {
2024
+ [Ws, r.value]
2025
+ ]) : (S(), B("div", {
2059
2026
  key: 1,
2060
2027
  class: "markdown-output",
2061
2028
  innerHTML: n.value
2062
- }, null, 8, bn))
2029
+ }, null, 8, wn))
2063
2030
  ], 16)
2064
2031
  ], 64));
2065
2032
  }
2066
- }), ro = /* @__PURE__ */ Me(wn, [["__scopeId", "data-v-b2d32c29"]]);
2067
- function xn(o, e, t, i, s) {
2033
+ }), oo = /* @__PURE__ */ Ne(xn, [["__scopeId", "data-v-b2d32c29"]]);
2034
+ function kn(o, e, t, i, s) {
2068
2035
  let r = (...l) => (console.warn("gridstack.js: Function `" + t + "` is deprecated in " + s + " and has been replaced with `" + i + "`. It will be **removed** in a future release"), e.apply(o, l));
2069
2036
  return r.prototype = e.prototype, r;
2070
2037
  }
@@ -2365,7 +2332,7 @@ class f {
2365
2332
  ), (i || e.target).dispatchEvent(s);
2366
2333
  }
2367
2334
  }
2368
- class be {
2335
+ class _e {
2369
2336
  constructor(e = {}) {
2370
2337
  this.addedNodes = [], this.removedNodes = [], this.column = e.column || 12, this.maxRow = e.maxRow, this._float = e.float, this.nodes = e.nodes || [], this.onChange = e.onChange;
2371
2338
  }
@@ -2416,8 +2383,8 @@ class be {
2416
2383
  return;
2417
2384
  let a = u._rect, h = Number.MAX_VALUE, p = Number.MAX_VALUE;
2418
2385
  s.y < a.y ? h = (r.y + r.h - a.y) / a.h : s.y + s.h > a.y + a.h && (h = (a.y + a.h - r.y) / a.h), s.x < a.x ? p = (r.x + r.w - a.x) / a.w : s.x + s.w > a.x + a.w && (p = (a.x + a.w - r.x) / a.w);
2419
- let d = Math.min(p, h);
2420
- d > n && (n = d, l = u);
2386
+ let c = Math.min(p, h);
2387
+ c > n && (n = c, l = u);
2421
2388
  }), t.collide = l, l;
2422
2389
  }
2423
2390
  /** does a pixel coverage returning the node that has the most coverage by area */
@@ -2531,7 +2498,7 @@ class be {
2531
2498
  * @param resizing if out of bound, resize down or move into the grid to fit ?
2532
2499
  */
2533
2500
  prepareNode(e, t) {
2534
- e._id = e._id ?? be._idSeq++, (e.x === void 0 || e.y === void 0 || e.x === null || e.y === null) && (e.autoPosition = !0);
2501
+ e._id = e._id ?? _e._idSeq++, (e.x === void 0 || e.y === void 0 || e.x === null || e.y === null) && (e.autoPosition = !0);
2535
2502
  let i = { x: 0, y: 0, w: 1, h: 1 };
2536
2503
  return f.defaults(e, i), e.autoPosition || delete e.autoPosition, e.noResize || delete e.noResize, e.noMove || delete e.noMove, f.sanitizeMinMax(e), typeof e.x == "string" && (e.x = Number(e.x)), typeof e.y == "string" && (e.y = Number(e.y)), typeof e.w == "string" && (e.w = Number(e.w)), typeof e.h == "string" && (e.h = Number(e.h)), isNaN(e.x) && (e.x = i.x, e.autoPosition = !0), isNaN(e.y) && (e.y = i.y, e.autoPosition = !0), isNaN(e.w) && (e.w = i.w), isNaN(e.h) && (e.h = i.h), this.nodeBoundFix(e, t), e;
2537
2504
  }
@@ -2613,7 +2580,7 @@ class be {
2613
2580
  return !1;
2614
2581
  if (t.pack = !0, !this.maxRow)
2615
2582
  return this.moveNode(e, t);
2616
- let i, s = new be({
2583
+ let i, s = new _e({
2617
2584
  column: this.column,
2618
2585
  float: this.float,
2619
2586
  nodes: this.nodes.map((l) => l._id === e._id ? (i = { ...l }, i) : { ...l })
@@ -2635,7 +2602,7 @@ class be {
2635
2602
  willItFit(e) {
2636
2603
  if (delete e._willFitPos, !this.maxRow)
2637
2604
  return !0;
2638
- let t = new be({
2605
+ let t = new _e({
2639
2606
  column: this.column,
2640
2607
  float: this.float,
2641
2608
  nodes: this.nodes.map((s) => ({ ...s }))
@@ -2659,12 +2626,12 @@ class be {
2659
2626
  return !1;
2660
2627
  let l = f.copyPos({}, e), n = this.collideAll(e, r, t.skip), u = !0;
2661
2628
  if (n.length) {
2662
- let p = e._moving && !t.nested, d = p ? this.directionCollideCoverage(e, t, n) : n[0];
2663
- if (p && d && ((h = (a = e.grid) == null ? void 0 : a.opts) != null && h.subGridDynamic) && !e.grid._isTemp) {
2664
- let _ = f.areaIntercept(t.rect, d._rect), v = f.area(t.rect), L = f.area(d._rect);
2665
- _ / (v < L ? v : L) > 0.8 && (d.grid.makeSubGrid(d.el, void 0, e), d = void 0);
2629
+ let p = e._moving && !t.nested, c = p ? this.directionCollideCoverage(e, t, n) : n[0];
2630
+ if (p && c && ((h = (a = e.grid) == null ? void 0 : a.opts) != null && h.subGridDynamic) && !e.grid._isTemp) {
2631
+ let m = f.areaIntercept(t.rect, c._rect), b = f.area(t.rect), z = f.area(c._rect);
2632
+ m / (b < z ? b : z) > 0.8 && (c.grid.makeSubGrid(c.el, void 0, e), c = void 0);
2666
2633
  }
2667
- d ? u = !this._fixCollisions(e, r, d, t) : (u = !1, i && delete t.pack);
2634
+ c ? u = !this._fixCollisions(e, r, c, t) : (u = !1, i && delete t.pack);
2668
2635
  }
2669
2636
  return u && (e._dirty = !0, f.copyPos(e, r)), t.pack && this._packNodes()._notify(), !f.samePos(e, l);
2670
2637
  }
@@ -2736,17 +2703,17 @@ class be {
2736
2703
  const a = this._layouts[t] || [];
2737
2704
  let h = this._layouts.length - 1;
2738
2705
  !a.length && e !== h && ((u = this._layouts[h]) != null && u.length) && (e = h, this._layouts[h].forEach((p) => {
2739
- let d = i.find((_) => _._id === p._id);
2740
- d && (!r && !p.autoPosition && (d.x = p.x ?? d.x, d.y = p.y ?? d.y), d.w = p.w ?? d.w, (p.x == null || p.y === void 0) && (d.autoPosition = !0));
2706
+ let c = i.find((m) => m._id === p._id);
2707
+ c && (!r && !p.autoPosition && (c.x = p.x ?? c.x, c.y = p.y ?? c.y), c.w = p.w ?? c.w, (p.x == null || p.y === void 0) && (c.autoPosition = !0));
2741
2708
  })), a.forEach((p) => {
2742
- let d = i.findIndex((_) => _._id === p._id);
2743
- if (d !== -1) {
2744
- const _ = i[d];
2709
+ let c = i.findIndex((m) => m._id === p._id);
2710
+ if (c !== -1) {
2711
+ const m = i[c];
2745
2712
  if (r) {
2746
- _.w = p.w;
2713
+ m.w = p.w;
2747
2714
  return;
2748
2715
  }
2749
- (p.autoPosition || isNaN(p.x) || isNaN(p.y)) && this.findEmptyPosition(p, l), p.autoPosition || (_.x = p.x ?? _.x, _.y = p.y ?? _.y, _.w = p.w ?? _.w, l.push(_)), i.splice(d, 1);
2716
+ (p.autoPosition || isNaN(p.x) || isNaN(p.y)) && this.findEmptyPosition(p, l), p.autoPosition || (m.x = p.x ?? m.x, m.y = p.y ?? m.y, m.w = p.w ?? m.w, l.push(m)), i.splice(c, 1);
2750
2717
  }
2751
2718
  });
2752
2719
  }
@@ -2758,8 +2725,8 @@ class be {
2758
2725
  s(t, e, l, i);
2759
2726
  else if (!n) {
2760
2727
  let a = r || s === "none" ? 1 : t / e, h = s === "move" || s === "moveScale", p = s === "scale" || s === "moveScale";
2761
- i.forEach((d) => {
2762
- d.x = t === 1 ? 0 : h ? Math.round(d.x * a) : Math.min(d.x, t - 1), d.w = t === 1 || e === 1 ? 1 : p ? Math.round(d.w * a) || 1 : Math.min(d.w, t), l.push(d);
2728
+ i.forEach((c) => {
2729
+ c.x = t === 1 ? 0 : h ? Math.round(c.x * a) : Math.min(c.x, t - 1), c.w = t === 1 || e === 1 ? 1 : p ? Math.round(c.w * a) || 1 : Math.min(c.w, t), l.push(c);
2763
2730
  }), i = [];
2764
2731
  }
2765
2732
  }
@@ -2780,7 +2747,7 @@ class be {
2780
2747
  return e.forEach((r, l) => {
2781
2748
  if (r._id === void 0) {
2782
2749
  const n = r.id ? this.nodes.find((u) => u.id === r.id) : void 0;
2783
- r._id = (n == null ? void 0 : n._id) ?? be._idSeq++;
2750
+ r._id = (n == null ? void 0 : n._id) ?? _e._idSeq++;
2784
2751
  }
2785
2752
  s[l] = { x: r.x, y: r.y, w: r.w, _id: r._id };
2786
2753
  }), this._layouts = i ? [] : this._layouts || [], this._layouts[t] = s, this;
@@ -2791,7 +2758,7 @@ class be {
2791
2758
  * @param column corresponding column index to save it under
2792
2759
  */
2793
2760
  cacheOneLayout(e, t) {
2794
- e._id = e._id ?? be._idSeq++;
2761
+ e._id = e._id ?? _e._idSeq++;
2795
2762
  let i = { x: e.x, y: e.y, w: e.w, _id: e._id };
2796
2763
  (e.autoPosition || e.x === void 0) && (delete i.x, delete i.y, e.autoPosition && (i.autoPosition = !0)), this._layouts = this._layouts || [], this._layouts[t] = this._layouts[t] || [];
2797
2764
  let s = this.findCacheLayout(e, t);
@@ -2815,8 +2782,8 @@ class be {
2815
2782
  return this;
2816
2783
  }
2817
2784
  }
2818
- be._idSeq = 0;
2819
- const he = {
2785
+ _e._idSeq = 0;
2786
+ const ae = {
2820
2787
  alwaysShowResizeHandle: "mobile",
2821
2788
  animate: !0,
2822
2789
  auto: !0,
@@ -2848,16 +2815,16 @@ const he = {
2848
2815
  // staticGrid: false,
2849
2816
  // styleInHead: false,
2850
2817
  //removable
2851
- }, kn = {
2818
+ }, En = {
2852
2819
  handle: ".grid-stack-item-content",
2853
2820
  appendTo: "body"
2854
2821
  // revert: 'invalid',
2855
2822
  // scroll: false,
2856
2823
  };
2857
- class k {
2824
+ class x {
2858
2825
  }
2859
- const ge = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
2860
- class ve {
2826
+ const pe = typeof window < "u" && typeof document < "u" && ("ontouchstart" in document || "ontouchstart" in window || window.DocumentTouch && document instanceof window.DocumentTouch || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0);
2827
+ class ye {
2861
2828
  }
2862
2829
  function St(o, e) {
2863
2830
  if (o.touches.length > 1)
@@ -2934,27 +2901,27 @@ function Ss(o, e) {
2934
2901
  ), o.target.dispatchEvent(t);
2935
2902
  }
2936
2903
  function Ct(o) {
2937
- ve.touchHandled || (ve.touchHandled = !0, St(o, "mousedown"));
2904
+ ye.touchHandled || (ye.touchHandled = !0, St(o, "mousedown"));
2938
2905
  }
2939
2906
  function At(o) {
2940
- ve.touchHandled && St(o, "mousemove");
2907
+ ye.touchHandled && St(o, "mousemove");
2941
2908
  }
2942
2909
  function Dt(o) {
2943
- if (!ve.touchHandled)
2910
+ if (!ye.touchHandled)
2944
2911
  return;
2945
- ve.pointerLeaveTimeout && (window.clearTimeout(ve.pointerLeaveTimeout), delete ve.pointerLeaveTimeout);
2946
- const e = !!k.dragElement;
2947
- St(o, "mouseup"), e || St(o, "click"), ve.touchHandled = !1;
2912
+ ye.pointerLeaveTimeout && (window.clearTimeout(ye.pointerLeaveTimeout), delete ye.pointerLeaveTimeout);
2913
+ const e = !!x.dragElement;
2914
+ St(o, "mouseup"), e || St(o, "click"), ye.touchHandled = !1;
2948
2915
  }
2949
2916
  function Lt(o) {
2950
2917
  o.pointerType !== "mouse" && o.target.releasePointerCapture(o.pointerId);
2951
2918
  }
2952
- function ss(o) {
2953
- k.dragElement && o.pointerType !== "mouse" && Ss(o, "mouseenter");
2954
- }
2955
2919
  function rs(o) {
2956
- k.dragElement && o.pointerType !== "mouse" && (ve.pointerLeaveTimeout = window.setTimeout(() => {
2957
- delete ve.pointerLeaveTimeout, Ss(o, "mouseleave");
2920
+ x.dragElement && o.pointerType !== "mouse" && Ss(o, "mouseenter");
2921
+ }
2922
+ function ns(o) {
2923
+ x.dragElement && o.pointerType !== "mouse" && (ye.pointerLeaveTimeout = window.setTimeout(() => {
2924
+ delete ye.pointerLeaveTimeout, Ss(o, "mouseleave");
2958
2925
  }, 10));
2959
2926
  }
2960
2927
  class Mt {
@@ -2964,15 +2931,15 @@ class Mt {
2964
2931
  /** @internal */
2965
2932
  _init() {
2966
2933
  const e = document.createElement("div");
2967
- return e.classList.add("ui-resizable-handle"), e.classList.add(`${Mt.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.el = e, this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), ge && (this.el.addEventListener("touchstart", Ct), this.el.addEventListener("pointerdown", Lt)), this;
2934
+ return e.classList.add("ui-resizable-handle"), e.classList.add(`${Mt.prefix}${this.dir}`), e.style.zIndex = "100", e.style.userSelect = "none", this.el = e, this.host.appendChild(this.el), this.el.addEventListener("mousedown", this._mouseDown), pe && (this.el.addEventListener("touchstart", Ct), this.el.addEventListener("pointerdown", Lt)), this;
2968
2935
  }
2969
2936
  /** call this when resize handle needs to be removed and cleaned up */
2970
2937
  destroy() {
2971
- return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), ge && (this.el.removeEventListener("touchstart", Ct), this.el.removeEventListener("pointerdown", Lt)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
2938
+ return this.moving && this._mouseUp(this.mouseDownEvent), this.el.removeEventListener("mousedown", this._mouseDown), pe && (this.el.removeEventListener("touchstart", Ct), this.el.removeEventListener("pointerdown", Lt)), this.host.removeChild(this.el), delete this.el, delete this.host, this;
2972
2939
  }
2973
2940
  /** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */
2974
2941
  _mouseDown(e) {
2975
- this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, !0), document.addEventListener("mouseup", this._mouseUp, !0), ge && (this.el.addEventListener("touchmove", At), this.el.addEventListener("touchend", Dt)), e.stopPropagation(), e.preventDefault();
2942
+ this.mouseDownEvent = e, document.addEventListener("mousemove", this._mouseMove, !0), document.addEventListener("mouseup", this._mouseUp, !0), pe && (this.el.addEventListener("touchmove", At), this.el.addEventListener("touchend", Dt)), e.stopPropagation(), e.preventDefault();
2976
2943
  }
2977
2944
  /** @internal */
2978
2945
  _mouseMove(e) {
@@ -2981,7 +2948,7 @@ class Mt {
2981
2948
  }
2982
2949
  /** @internal */
2983
2950
  _mouseUp(e) {
2984
- this.moving && this._triggerEvent("stop", e), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), ge && (this.el.removeEventListener("touchmove", At), this.el.removeEventListener("touchend", Dt)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
2951
+ this.moving && this._triggerEvent("stop", e), document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), pe && (this.el.removeEventListener("touchmove", At), this.el.removeEventListener("touchend", Dt)), delete this.moving, delete this.mouseDownEvent, e.stopPropagation(), e.preventDefault();
2985
2952
  }
2986
2953
  /** @internal */
2987
2954
  _triggerEvent(e, t) {
@@ -2989,7 +2956,7 @@ class Mt {
2989
2956
  }
2990
2957
  }
2991
2958
  Mt.prefix = "ui-resizable-";
2992
- class _i {
2959
+ class gi {
2993
2960
  constructor() {
2994
2961
  this._eventRegister = {};
2995
2962
  }
@@ -3017,7 +2984,7 @@ class _i {
3017
2984
  return this._eventRegister[e](t);
3018
2985
  }
3019
2986
  }
3020
- class st extends _i {
2987
+ class it extends gi {
3021
2988
  constructor(e, t = {}) {
3022
2989
  super(), this.rectScale = { x: 1, y: 1 }, this._ui = () => {
3023
2990
  const s = this.el.parentElement.getBoundingClientRect(), r = {
@@ -3072,17 +3039,17 @@ class st extends _i {
3072
3039
  }
3073
3040
  /** @internal turns auto hide on/off */
3074
3041
  _setupAutoHide(e) {
3075
- return e ? (this.el.classList.add("ui-resizable-autohide"), this.el.addEventListener("mouseover", this._mouseOver), this.el.addEventListener("mouseout", this._mouseOut)) : (this.el.classList.remove("ui-resizable-autohide"), this.el.removeEventListener("mouseover", this._mouseOver), this.el.removeEventListener("mouseout", this._mouseOut), k.overResizeElement === this && delete k.overResizeElement), this;
3042
+ return e ? (this.el.classList.add("ui-resizable-autohide"), this.el.addEventListener("mouseover", this._mouseOver), this.el.addEventListener("mouseout", this._mouseOut)) : (this.el.classList.remove("ui-resizable-autohide"), this.el.removeEventListener("mouseover", this._mouseOver), this.el.removeEventListener("mouseout", this._mouseOut), x.overResizeElement === this && delete x.overResizeElement), this;
3076
3043
  }
3077
3044
  /** @internal */
3078
3045
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3079
3046
  _mouseOver(e) {
3080
- k.overResizeElement || k.dragElement || (k.overResizeElement = this, this.el.classList.remove("ui-resizable-autohide"));
3047
+ x.overResizeElement || x.dragElement || (x.overResizeElement = this, this.el.classList.remove("ui-resizable-autohide"));
3081
3048
  }
3082
3049
  /** @internal */
3083
3050
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3084
3051
  _mouseOut(e) {
3085
- k.overResizeElement === this && (delete k.overResizeElement, this.el.classList.add("ui-resizable-autohide"));
3052
+ x.overResizeElement === this && (delete x.overResizeElement, this.el.classList.add("ui-resizable-autohide"));
3086
3053
  }
3087
3054
  /** @internal */
3088
3055
  _setupHandlers() {
@@ -3118,7 +3085,7 @@ class st extends _i {
3118
3085
  }
3119
3086
  /** @internal */
3120
3087
  _setupHelper() {
3121
- this.elOriginStyleVal = st._originStyleProp.map((s) => this.el.style[s]), this.parentOriginStylePosition = this.el.parentElement.style.position;
3088
+ this.elOriginStyleVal = it._originStyleProp.map((s) => this.el.style[s]), this.parentOriginStylePosition = this.el.parentElement.style.position;
3122
3089
  const e = this.el.parentElement, t = document.createElement("div");
3123
3090
  f.addElStyles(t, {
3124
3091
  opacity: "0",
@@ -3137,7 +3104,7 @@ class st extends _i {
3137
3104
  }
3138
3105
  /** @internal */
3139
3106
  _cleanHelper() {
3140
- return st._originStyleProp.forEach((e, t) => {
3107
+ return it._originStyleProp.forEach((e, t) => {
3141
3108
  this.el.style[e] = this.elOriginStyleVal[t] || null;
3142
3109
  }), this.el.parentElement.style.position = this.parentOriginStylePosition || null, this;
3143
3110
  }
@@ -3175,9 +3142,9 @@ class st extends _i {
3175
3142
  return this.handlers.forEach((e) => e.destroy()), delete this.handlers, this;
3176
3143
  }
3177
3144
  }
3178
- st._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
3179
- const En = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
3180
- class rt extends _i {
3145
+ it._originStyleProp = ["width", "height", "position", "left", "top", "opacity", "zIndex"];
3146
+ const Tn = 'input,textarea,button,select,option,[contenteditable="true"],.ui-resizable-handle';
3147
+ class st extends gi {
3181
3148
  constructor(e, t = {}) {
3182
3149
  super(), this.dragScale = { x: 1, y: 1 }, this.el = e, this.option = t;
3183
3150
  let i = t.handle.substring(1);
@@ -3190,10 +3157,10 @@ class rt extends _i {
3190
3157
  super.off(e);
3191
3158
  }
3192
3159
  enable() {
3193
- this.disabled !== !1 && (super.enable(), this.dragEl.addEventListener("mousedown", this._mouseDown), ge && (this.dragEl.addEventListener("touchstart", Ct), this.dragEl.addEventListener("pointerdown", Lt)), this.el.classList.remove("ui-draggable-disabled"));
3160
+ this.disabled !== !1 && (super.enable(), this.dragEl.addEventListener("mousedown", this._mouseDown), pe && (this.dragEl.addEventListener("touchstart", Ct), this.dragEl.addEventListener("pointerdown", Lt)), this.el.classList.remove("ui-draggable-disabled"));
3194
3161
  }
3195
3162
  disable(e = !1) {
3196
- this.disabled !== !0 && (super.disable(), this.dragEl.removeEventListener("mousedown", this._mouseDown), ge && (this.dragEl.removeEventListener("touchstart", Ct), this.dragEl.removeEventListener("pointerdown", Lt)), e || this.el.classList.add("ui-draggable-disabled"));
3163
+ this.disabled !== !0 && (super.disable(), this.dragEl.removeEventListener("mousedown", this._mouseDown), pe && (this.dragEl.removeEventListener("touchstart", Ct), this.dragEl.removeEventListener("pointerdown", Lt)), e || this.el.classList.add("ui-draggable-disabled"));
3197
3164
  }
3198
3165
  destroy() {
3199
3166
  this.dragTimeout && window.clearTimeout(this.dragTimeout), delete this.dragTimeout, this.mouseDownEvent && this._mouseUp(this.mouseDownEvent), this.disable(!0), delete this.el, delete this.helper, delete this.option, super.destroy();
@@ -3203,8 +3170,8 @@ class rt extends _i {
3203
3170
  }
3204
3171
  /** @internal call when mouse goes down before a dragstart happens */
3205
3172
  _mouseDown(e) {
3206
- if (!k.mouseHandled)
3207
- return e.button !== 0 || e.target.closest(En) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete k.dragElement, delete k.dropElement, document.addEventListener("mousemove", this._mouseMove, !0), document.addEventListener("mouseup", this._mouseUp, !0), ge && (this.dragEl.addEventListener("touchmove", At), this.dragEl.addEventListener("touchend", Dt)), e.preventDefault(), document.activeElement && document.activeElement.blur(), k.mouseHandled = !0), !0;
3173
+ if (!x.mouseHandled)
3174
+ return e.button !== 0 || e.target.closest(Tn) || this.option.cancel && e.target.closest(this.option.cancel) || (this.mouseDownEvent = e, delete this.dragging, delete x.dragElement, delete x.dropElement, document.addEventListener("mousemove", this._mouseMove, !0), document.addEventListener("mouseup", this._mouseUp, !0), pe && (this.dragEl.addEventListener("touchmove", At), this.dragEl.addEventListener("touchend", Dt)), e.preventDefault(), document.activeElement && document.activeElement.blur(), x.mouseHandled = !0), !0;
3208
3175
  }
3209
3176
  /** @internal method to call actual drag event */
3210
3177
  _callDrag(e) {
@@ -3218,15 +3185,15 @@ class rt extends _i {
3218
3185
  var i;
3219
3186
  let t = this.mouseDownEvent;
3220
3187
  if (this.dragging)
3221
- if (this._dragFollow(e), k.pauseDrag) {
3222
- const s = Number.isInteger(k.pauseDrag) ? k.pauseDrag : 100;
3188
+ if (this._dragFollow(e), x.pauseDrag) {
3189
+ const s = Number.isInteger(x.pauseDrag) ? x.pauseDrag : 100;
3223
3190
  this.dragTimeout && window.clearTimeout(this.dragTimeout), this.dragTimeout = window.setTimeout(() => this._callDrag(e), s);
3224
3191
  } else
3225
3192
  this._callDrag(e);
3226
3193
  else if (Math.abs(e.x - t.x) + Math.abs(e.y - t.y) > 3) {
3227
- this.dragging = !0, k.dragElement = this;
3194
+ this.dragging = !0, x.dragElement = this;
3228
3195
  let s = (i = this.el.gridstackNode) == null ? void 0 : i.grid;
3229
- s ? k.dropElement = s.el.ddElement.ddDroppable : delete k.dropElement, this.helper = this._createHelper(e), this._setupHelperContainmentStyle(), this.dragOffset = this._getDragOffset(e, this.el, this.helperContainment);
3196
+ s ? x.dropElement = s.el.ddElement.ddDroppable : delete x.dropElement, this.helper = this._createHelper(e), this._setupHelperContainmentStyle(), this.dragOffset = this._getDragOffset(e, this.el, this.helperContainment);
3230
3197
  const r = f.initEvent(e, { target: this.el, type: "dragstart" });
3231
3198
  this._setupHelperStyle(e), this.option.start && this.option.start(r, this.ui()), this.triggerEvent("dragstart", r);
3232
3199
  }
@@ -3235,17 +3202,17 @@ class rt extends _i {
3235
3202
  /** @internal call when the mouse gets released to drop the item at current location */
3236
3203
  _mouseUp(e) {
3237
3204
  var t;
3238
- if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), ge && (this.dragEl.removeEventListener("touchmove", At, !0), this.dragEl.removeEventListener("touchend", Dt, !0)), this.dragging) {
3239
- delete this.dragging, ((t = k.dropElement) == null ? void 0 : t.el) === this.el.parentElement && delete k.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper === this.el ? this._removeHelperStyle() : this.helper.remove();
3205
+ if (document.removeEventListener("mousemove", this._mouseMove, !0), document.removeEventListener("mouseup", this._mouseUp, !0), pe && (this.dragEl.removeEventListener("touchmove", At, !0), this.dragEl.removeEventListener("touchend", Dt, !0)), this.dragging) {
3206
+ delete this.dragging, ((t = x.dropElement) == null ? void 0 : t.el) === this.el.parentElement && delete x.dropElement, this.helperContainment.style.position = this.parentOriginStylePosition || null, this.helper === this.el ? this._removeHelperStyle() : this.helper.remove();
3240
3207
  const i = f.initEvent(e, { target: this.el, type: "dragstop" });
3241
- this.option.stop && this.option.stop(i), this.triggerEvent("dragstop", i), k.dropElement && k.dropElement.drop(e);
3208
+ this.option.stop && this.option.stop(i), this.triggerEvent("dragstop", i), x.dropElement && x.dropElement.drop(e);
3242
3209
  }
3243
- delete this.helper, delete this.mouseDownEvent, delete k.dragElement, delete k.dropElement, delete k.mouseHandled, e.preventDefault();
3210
+ delete this.helper, delete this.mouseDownEvent, delete x.dragElement, delete x.dropElement, delete x.mouseHandled, e.preventDefault();
3244
3211
  }
3245
3212
  /** @internal create a clone copy (or user defined method) of the original drag item if set */
3246
3213
  _createHelper(e) {
3247
3214
  let t = this.el;
3248
- return typeof this.option.helper == "function" ? t = this.option.helper(e) : this.option.helper === "clone" && (t = f.cloneNode(this.el)), document.body.contains(t) || f.appendTo(t, this.option.appendTo === "parent" ? this.el.parentElement : this.option.appendTo), t === this.el && (this.dragElementOriginStyle = rt.originStyleProp.map((i) => this.el.style[i])), t;
3215
+ return typeof this.option.helper == "function" ? t = this.option.helper(e) : this.option.helper === "clone" && (t = f.cloneNode(this.el)), document.body.contains(t) || f.appendTo(t, this.option.appendTo === "parent" ? this.el.parentElement : this.option.appendTo), t === this.el && (this.dragElementOriginStyle = st.originStyleProp.map((i) => this.el.style[i])), t;
3249
3216
  }
3250
3217
  /** @internal set the fix position of the dragged item */
3251
3218
  _setupHelperStyle(e) {
@@ -3262,7 +3229,7 @@ class rt extends _i {
3262
3229
  let e = (t = this.helper) == null ? void 0 : t.gridstackNode;
3263
3230
  if (!(e != null && e._isAboutToRemove) && this.dragElementOriginStyle) {
3264
3231
  let i = this.helper, s = this.dragElementOriginStyle.transition || null;
3265
- i.style.transition = this.dragElementOriginStyle.transition = "none", rt.originStyleProp.forEach((r) => i.style[r] = this.dragElementOriginStyle[r] || null), setTimeout(() => i.style.transition = s, 50);
3232
+ i.style.transition = this.dragElementOriginStyle.transition = "none", st.originStyleProp.forEach((r) => i.style[r] = this.dragElementOriginStyle[r] || null), setTimeout(() => i.style.transition = s, 50);
3266
3233
  }
3267
3234
  return delete this.dragElementOriginStyle, this;
3268
3235
  }
@@ -3321,8 +3288,8 @@ class rt extends _i {
3321
3288
  };
3322
3289
  }
3323
3290
  }
3324
- rt.originStyleProp = ["transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
3325
- class Tn extends _i {
3291
+ st.originStyleProp = ["transition", "pointerEvents", "position", "left", "top", "minWidth", "willChange"];
3292
+ class Rn extends gi {
3326
3293
  constructor(e, t = {}) {
3327
3294
  super(), this.el = e, this.option = t, this._mouseEnter = this._mouseEnter.bind(this), this._mouseLeave = this._mouseLeave.bind(this), this.enable(), this._setupAccept();
3328
3295
  }
@@ -3333,10 +3300,10 @@ class Tn extends _i {
3333
3300
  super.off(e);
3334
3301
  }
3335
3302
  enable() {
3336
- this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave), ge && (this.el.addEventListener("pointerenter", ss), this.el.addEventListener("pointerleave", rs)));
3303
+ this.disabled !== !1 && (super.enable(), this.el.classList.add("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), this.el.addEventListener("mouseenter", this._mouseEnter), this.el.addEventListener("mouseleave", this._mouseLeave), pe && (this.el.addEventListener("pointerenter", rs), this.el.addEventListener("pointerleave", ns)));
3337
3304
  }
3338
3305
  disable(e = !1) {
3339
- this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave), ge && (this.el.removeEventListener("pointerenter", ss), this.el.removeEventListener("pointerleave", rs)));
3306
+ this.disabled !== !0 && (super.disable(), this.el.classList.remove("ui-droppable"), e || this.el.classList.add("ui-droppable-disabled"), this.el.removeEventListener("mouseenter", this._mouseEnter), this.el.removeEventListener("mouseleave", this._mouseLeave), pe && (this.el.removeEventListener("pointerenter", rs), this.el.removeEventListener("pointerleave", ns)));
3340
3307
  }
3341
3308
  destroy() {
3342
3309
  this.disable(!0), this.el.classList.remove("ui-droppable"), this.el.classList.remove("ui-droppable-disabled"), super.destroy();
@@ -3346,21 +3313,21 @@ class Tn extends _i {
3346
3313
  }
3347
3314
  /** @internal called when the cursor enters our area - prepare for a possible drop and track leaving */
3348
3315
  _mouseEnter(e) {
3349
- if (!k.dragElement || !this._canDrop(k.dragElement.el))
3316
+ if (!x.dragElement || !this._canDrop(x.dragElement.el))
3350
3317
  return;
3351
- e.preventDefault(), e.stopPropagation(), k.dropElement && k.dropElement !== this && k.dropElement._mouseLeave(e), k.dropElement = this;
3318
+ e.preventDefault(), e.stopPropagation(), x.dropElement && x.dropElement !== this && x.dropElement._mouseLeave(e), x.dropElement = this;
3352
3319
  const t = f.initEvent(e, { target: this.el, type: "dropover" });
3353
- this.option.over && this.option.over(t, this._ui(k.dragElement)), this.triggerEvent("dropover", t), this.el.classList.add("ui-droppable-over");
3320
+ this.option.over && this.option.over(t, this._ui(x.dragElement)), this.triggerEvent("dropover", t), this.el.classList.add("ui-droppable-over");
3354
3321
  }
3355
3322
  /** @internal called when the item is leaving our area, stop tracking if we had moving item */
3356
3323
  _mouseLeave(e) {
3357
3324
  var i;
3358
- if (!k.dragElement || k.dropElement !== this)
3325
+ if (!x.dragElement || x.dropElement !== this)
3359
3326
  return;
3360
3327
  e.preventDefault(), e.stopPropagation();
3361
3328
  const t = f.initEvent(e, { target: this.el, type: "dropout" });
3362
- if (this.option.out && this.option.out(t, this._ui(k.dragElement)), this.triggerEvent("dropout", t), k.dropElement === this) {
3363
- delete k.dropElement;
3329
+ if (this.option.out && this.option.out(t, this._ui(x.dragElement)), this.triggerEvent("dropout", t), x.dropElement === this) {
3330
+ delete x.dropElement;
3364
3331
  let s, r = this.el.parentElement;
3365
3332
  for (; !s && r; )
3366
3333
  s = (i = r.ddElement) == null ? void 0 : i.ddDroppable, r = r.parentElement;
@@ -3371,7 +3338,7 @@ class Tn extends _i {
3371
3338
  drop(e) {
3372
3339
  e.preventDefault();
3373
3340
  const t = f.initEvent(e, { target: this.el, type: "drop" });
3374
- this.option.drop && this.option.drop(t, this._ui(k.dragElement)), this.triggerEvent("drop", t);
3341
+ this.option.drop && this.option.drop(t, this._ui(x.dragElement)), this.triggerEvent("drop", t);
3375
3342
  }
3376
3343
  /** @internal true if element matches the string/method accept option */
3377
3344
  _canDrop(e) {
@@ -3389,9 +3356,9 @@ class Tn extends _i {
3389
3356
  };
3390
3357
  }
3391
3358
  }
3392
- class yi {
3359
+ class mi {
3393
3360
  static init(e) {
3394
- return e.ddElement || (e.ddElement = new yi(e)), e.ddElement;
3361
+ return e.ddElement || (e.ddElement = new mi(e)), e.ddElement;
3395
3362
  }
3396
3363
  constructor(e) {
3397
3364
  this.el = e;
@@ -3403,25 +3370,25 @@ class yi {
3403
3370
  return this.ddDraggable && ["drag", "dragstart", "dragstop"].indexOf(e) > -1 ? this.ddDraggable.off(e) : this.ddDroppable && ["drop", "dropover", "dropout"].indexOf(e) > -1 ? this.ddDroppable.off(e) : this.ddResizable && ["resizestart", "resize", "resizestop"].indexOf(e) > -1 && this.ddResizable.off(e), this;
3404
3371
  }
3405
3372
  setupDraggable(e) {
3406
- return this.ddDraggable ? this.ddDraggable.updateOption(e) : this.ddDraggable = new rt(this.el, e), this;
3373
+ return this.ddDraggable ? this.ddDraggable.updateOption(e) : this.ddDraggable = new st(this.el, e), this;
3407
3374
  }
3408
3375
  cleanDraggable() {
3409
3376
  return this.ddDraggable && (this.ddDraggable.destroy(), delete this.ddDraggable), this;
3410
3377
  }
3411
3378
  setupResizable(e) {
3412
- return this.ddResizable ? this.ddResizable.updateOption(e) : this.ddResizable = new st(this.el, e), this;
3379
+ return this.ddResizable ? this.ddResizable.updateOption(e) : this.ddResizable = new it(this.el, e), this;
3413
3380
  }
3414
3381
  cleanResizable() {
3415
3382
  return this.ddResizable && (this.ddResizable.destroy(), delete this.ddResizable), this;
3416
3383
  }
3417
3384
  setupDroppable(e) {
3418
- return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new Tn(this.el, e), this;
3385
+ return this.ddDroppable ? this.ddDroppable.updateOption(e) : this.ddDroppable = new Rn(this.el, e), this;
3419
3386
  }
3420
3387
  cleanDroppable() {
3421
3388
  return this.ddDroppable && (this.ddDroppable.destroy(), delete this.ddDroppable), this;
3422
3389
  }
3423
3390
  }
3424
- class Rn {
3391
+ class Sn {
3425
3392
  resizable(e, t, i, s) {
3426
3393
  return this._getDDElements(e).forEach((r) => {
3427
3394
  if (t === "disable" || t === "enable")
@@ -3486,7 +3453,7 @@ class Rn {
3486
3453
  }
3487
3454
  on(e, t, i) {
3488
3455
  return this._getDDElements(e).forEach((s) => s.on(t, (r) => {
3489
- i(r, k.dragElement ? k.dragElement.el : r.target, k.dragElement ? k.dragElement.helper : null);
3456
+ i(r, x.dragElement ? x.dragElement.el : r.target, x.dragElement ? x.dragElement.helper : null);
3490
3457
  })), this;
3491
3458
  }
3492
3459
  off(e, t) {
@@ -3497,7 +3464,7 @@ class Rn {
3497
3464
  let i = f.getElements(e);
3498
3465
  if (!i.length)
3499
3466
  return [];
3500
- let s = i.map((r) => r.ddElement || (t ? yi.init(r) : null));
3467
+ let s = i.map((r) => r.ddElement || (t ? mi.init(r) : null));
3501
3468
  return t || s.filter((r) => r), s;
3502
3469
  }
3503
3470
  }
@@ -3508,8 +3475,8 @@ class Rn {
3508
3475
  * Copyright (c) 2021-2022 Alain Dumesny
3509
3476
  * see root license https://github.com/gridstack/gridstack.js/tree/master/LICENSE
3510
3477
  */
3511
- const Q = new Rn();
3512
- class T {
3478
+ const Q = new Sn();
3479
+ class R {
3513
3480
  /**
3514
3481
  * initializing the HTML element, or selector string, into a grid will return the grid. Calling it again will
3515
3482
  * simply return the existing instance (ignore any passed options). There is also an initAll() version that support
@@ -3524,8 +3491,8 @@ class T {
3524
3491
  * let grid = document.querySelector('.grid-stack').gridstack;
3525
3492
  */
3526
3493
  static init(e = {}, t = ".grid-stack") {
3527
- let i = T.getGridElement(t);
3528
- return i ? (i.gridstack || (i.gridstack = new T(i, f.cloneDeep(e))), i.gridstack) : (console.error(typeof t == "string" ? 'GridStack.initAll() no grid was found with selector "' + t + `" - element missing or wrong selector ?
3494
+ let i = R.getGridElement(t);
3495
+ return i ? (i.gridstack || (i.gridstack = new R(i, f.cloneDeep(e))), i.gridstack) : (console.error(typeof t == "string" ? 'GridStack.initAll() no grid was found with selector "' + t + `" - element missing or wrong selector ?
3529
3496
  Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.` : "GridStack.init() no grid element was passed."), null);
3530
3497
  }
3531
3498
  /**
@@ -3539,8 +3506,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3539
3506
  */
3540
3507
  static initAll(e = {}, t = ".grid-stack") {
3541
3508
  let i = [];
3542
- return T.getGridElements(t).forEach((s) => {
3543
- s.gridstack || (s.gridstack = new T(s, f.cloneDeep(e))), i.push(s.gridstack);
3509
+ return R.getGridElements(t).forEach((s) => {
3510
+ s.gridstack || (s.gridstack = new R(s, f.cloneDeep(e))), i.push(s.gridstack);
3544
3511
  }), i.length === 0 && console.error('GridStack.initAll() no grid was found with selector "' + t + `" - element missing or wrong selector ?
3545
3512
  Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the default selector.`), i;
3546
3513
  }
@@ -3559,27 +3526,27 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3559
3526
  const l = i.gridstack;
3560
3527
  return t && (l.opts = { ...l.opts, ...t }), t.children !== void 0 && l.load(t.children), l;
3561
3528
  }
3562
- if (!e.classList.contains("grid-stack") || T.addRemoveCB)
3563
- if (T.addRemoveCB)
3564
- i = T.addRemoveCB(e, t, !0, !0);
3529
+ if (!e.classList.contains("grid-stack") || R.addRemoveCB)
3530
+ if (R.addRemoveCB)
3531
+ i = R.addRemoveCB(e, t, !0, !0);
3565
3532
  else {
3566
3533
  let l = document.implementation.createHTMLDocument("");
3567
3534
  l.body.innerHTML = `<div class="grid-stack ${t.class || ""}"></div>`, i = l.body.children[0], e.appendChild(i);
3568
3535
  }
3569
- return T.init(t, i);
3536
+ return R.init(t, i);
3570
3537
  }
3571
3538
  /** call this method to register your engine instead of the default one.
3572
3539
  * See instead `GridStackOptions.engineClass` if you only need to
3573
3540
  * replace just one instance.
3574
3541
  */
3575
3542
  static registerEngine(e) {
3576
- T.engineClass = e;
3543
+ R.engineClass = e;
3577
3544
  }
3578
3545
  /** @internal create placeholder DIV as needed */
3579
3546
  get placeholder() {
3580
3547
  if (!this._placeholder) {
3581
3548
  let e = document.createElement("div");
3582
- e.className = "placeholder-content", this.opts.placeholderText && (e.innerHTML = this.opts.placeholderText), this._placeholder = document.createElement("div"), this._placeholder.classList.add(this.opts.placeholderClass, he.itemClass, this.opts.itemClass), this.placeholder.appendChild(e);
3549
+ e.className = "placeholder-content", this.opts.placeholderText && (e.innerHTML = this.opts.placeholderText), this._placeholder = document.createElement("div"), this._placeholder.classList.add(this.opts.placeholderClass, ae.itemClass, this.opts.itemClass), this.placeholder.appendChild(e);
3583
3550
  }
3584
3551
  return this._placeholder;
3585
3552
  }
@@ -3594,42 +3561,42 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3594
3561
  let i = f.toNumber(e.getAttribute("gs-row"));
3595
3562
  t.column === "auto" && delete t.column, t.alwaysShowResizeHandle !== void 0 && (t._alwaysShowResizeHandle = t.alwaysShowResizeHandle);
3596
3563
  let s = {
3597
- ...f.cloneDeep(he),
3598
- column: f.toNumber(e.getAttribute("gs-column")) || he.column,
3599
- minRow: i || f.toNumber(e.getAttribute("gs-min-row")) || he.minRow,
3600
- maxRow: i || f.toNumber(e.getAttribute("gs-max-row")) || he.maxRow,
3601
- staticGrid: f.toBool(e.getAttribute("gs-static")) || he.staticGrid,
3564
+ ...f.cloneDeep(ae),
3565
+ column: f.toNumber(e.getAttribute("gs-column")) || ae.column,
3566
+ minRow: i || f.toNumber(e.getAttribute("gs-min-row")) || ae.minRow,
3567
+ maxRow: i || f.toNumber(e.getAttribute("gs-max-row")) || ae.maxRow,
3568
+ staticGrid: f.toBool(e.getAttribute("gs-static")) || ae.staticGrid,
3602
3569
  draggable: {
3603
- handle: (t.handleClass ? "." + t.handleClass : t.handle ? t.handle : "") || he.draggable.handle
3570
+ handle: (t.handleClass ? "." + t.handleClass : t.handle ? t.handle : "") || ae.draggable.handle
3604
3571
  },
3605
3572
  removableOptions: {
3606
- accept: t.itemClass || he.removableOptions.accept,
3607
- decline: he.removableOptions.decline
3573
+ accept: t.itemClass || ae.removableOptions.accept,
3574
+ decline: ae.removableOptions.decline
3608
3575
  }
3609
3576
  };
3610
3577
  e.getAttribute("gs-animate") && (s.animate = f.toBool(e.getAttribute("gs-animate"))), this.opts = f.defaults(t, s), t = null, this._initMargin(), this.opts.column !== 1 && !this.opts.disableOneColumnMode && this._widthOrContainer() <= this.opts.oneColumnSize && (this._prevColumn = this.getColumn(), this.opts.column = 1), this.opts.rtl === "auto" && (this.opts.rtl = e.style.direction === "rtl"), this.opts.rtl && this.el.classList.add("grid-stack-rtl");
3611
3578
  const r = (u = this.el.parentElement) == null ? void 0 : u.parentElement;
3612
- let l = r != null && r.classList.contains(he.itemClass) ? r.gridstackNode : void 0;
3613
- l && (l.subGrid = this, this.parentGridItem = l, this.el.classList.add("grid-stack-nested"), l.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = this.opts.cellHeight === "auto", this._isAutoCellHeight || this.opts.cellHeight === "initial" ? this.cellHeight(void 0, !1) : (typeof this.opts.cellHeight == "number" && this.opts.cellHeightUnit && this.opts.cellHeightUnit !== he.cellHeightUnit && (this.opts.cellHeight = this.opts.cellHeight + this.opts.cellHeightUnit, delete this.opts.cellHeightUnit), this.cellHeight(this.opts.cellHeight, !1)), this.opts.alwaysShowResizeHandle === "mobile" && (this.opts.alwaysShowResizeHandle = ge), this._styleSheetClass = "gs-id-" + be._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
3614
- let n = this.opts.engineClass || T.engineClass || be;
3579
+ let l = r != null && r.classList.contains(ae.itemClass) ? r.gridstackNode : void 0;
3580
+ l && (l.subGrid = this, this.parentGridItem = l, this.el.classList.add("grid-stack-nested"), l.el.classList.add("grid-stack-sub-grid")), this._isAutoCellHeight = this.opts.cellHeight === "auto", this._isAutoCellHeight || this.opts.cellHeight === "initial" ? this.cellHeight(void 0, !1) : (typeof this.opts.cellHeight == "number" && this.opts.cellHeightUnit && this.opts.cellHeightUnit !== ae.cellHeightUnit && (this.opts.cellHeight = this.opts.cellHeight + this.opts.cellHeightUnit, delete this.opts.cellHeightUnit), this.cellHeight(this.opts.cellHeight, !1)), this.opts.alwaysShowResizeHandle === "mobile" && (this.opts.alwaysShowResizeHandle = pe), this._styleSheetClass = "gs-id-" + _e._idSeq++, this.el.classList.add(this._styleSheetClass), this._setStaticClass();
3581
+ let n = this.opts.engineClass || R.engineClass || _e;
3615
3582
  if (this.engine = new n({
3616
3583
  column: this.getColumn(),
3617
3584
  float: this.opts.float,
3618
3585
  maxRow: this.opts.maxRow,
3619
3586
  onChange: (h) => {
3620
3587
  let p = 0;
3621
- this.engine.nodes.forEach((d) => {
3622
- p = Math.max(p, d.y + d.h);
3623
- }), h.forEach((d) => {
3624
- let _ = d.el;
3625
- _ && (d._removeDOM ? (_ && _.remove(), delete d._removeDOM) : this._writePosAttr(_, d));
3588
+ this.engine.nodes.forEach((c) => {
3589
+ p = Math.max(p, c.y + c.h);
3590
+ }), h.forEach((c) => {
3591
+ let m = c.el;
3592
+ m && (c._removeDOM ? (m && m.remove(), delete c._removeDOM) : this._writePosAttr(m, c));
3626
3593
  }), this._updateStyles(!1, p);
3627
3594
  }
3628
3595
  }), this.opts.auto && (this.batchUpdate(), this.getGridItems().forEach((h) => this._prepareElement(h)), this.batchUpdate(!1)), this.opts.children) {
3629
3596
  let h = this.opts.children;
3630
3597
  delete this.opts.children, h.length && this.load(h);
3631
3598
  }
3632
- this.setAnimation(this.opts.animate), this._updateStyles(), this.el.classList.add("gs-" + this.opts.column), this.opts.subGridDynamic && !k.pauseDrag && (k.pauseDrag = !0), ((a = this.opts.draggable) == null ? void 0 : a.pause) !== void 0 && (k.pauseDrag = this.opts.draggable.pause), this._setupRemoveDrop(), this._setupAcceptWidget(), this._updateResizeEvent();
3599
+ this.setAnimation(this.opts.animate), this._updateStyles(), this.el.classList.add("gs-" + this.opts.column), this.opts.subGridDynamic && !x.pauseDrag && (x.pauseDrag = !0), ((a = this.opts.draggable) == null ? void 0 : a.pause) !== void 0 && (x.pauseDrag = this.opts.draggable.pause), this._setupRemoveDrop(), this._setupAcceptWidget(), this._updateResizeEvent();
3633
3600
  }
3634
3601
  /**
3635
3602
  * add a new widget and returns it.
@@ -3657,8 +3624,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3657
3624
  } else if (arguments.length === 0 || arguments.length === 1 && i(e))
3658
3625
  if (r = t = e, r != null && r.el)
3659
3626
  s = r.el;
3660
- else if (T.addRemoveCB)
3661
- s = T.addRemoveCB(this.el, t, !0, !1);
3627
+ else if (R.addRemoveCB)
3628
+ s = R.addRemoveCB(this.el, t, !0, !1);
3662
3629
  else {
3663
3630
  let n = (t == null ? void 0 : t.content) || "", u = document.implementation.createHTMLDocument("");
3664
3631
  u.body.innerHTML = `<div class="grid-stack-item ${this.opts.itemClass || ""}"><div class="grid-stack-item-content">${n}</div></div>`, s = u.body.children[0];
@@ -3681,32 +3648,32 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3681
3648
  * @returns newly created grid
3682
3649
  */
3683
3650
  makeSubGrid(e, t, i, s = !0) {
3684
- var _, v, L;
3651
+ var m, b, z;
3685
3652
  let r = e.gridstackNode;
3686
- if (r || (r = this.makeWidget(e).gridstackNode), (_ = r.subGrid) != null && _.el)
3653
+ if (r || (r = this.makeWidget(e).gridstackNode), (m = r.subGrid) != null && m.el)
3687
3654
  return r.subGrid;
3688
3655
  let l, n = this;
3689
3656
  for (; n && !l; )
3690
- l = (v = n.opts) == null ? void 0 : v.subGridOpts, n = (L = n.parentGridItem) == null ? void 0 : L.grid;
3657
+ l = (b = n.opts) == null ? void 0 : b.subGridOpts, n = (z = n.parentGridItem) == null ? void 0 : z.grid;
3691
3658
  t = f.cloneDeep({ ...l || {}, children: void 0, ...t || r.subGridOpts }), r.subGridOpts = t;
3692
3659
  let u;
3693
3660
  t.column === "auto" && (u = !0, t.column = Math.max(r.w || 1, (i == null ? void 0 : i.w) || 1), t.disableOneColumnMode = !0);
3694
3661
  let a = r.el.querySelector(".grid-stack-item-content"), h, p;
3695
3662
  if (s) {
3696
- if (this._removeDD(r.el), p = { ...r, x: 0, y: 0 }, f.removeInternalForSave(p), delete p.subGridOpts, r.content && (p.content = r.content, delete r.content), T.addRemoveCB)
3697
- h = T.addRemoveCB(this.el, p, !0, !1);
3663
+ if (this._removeDD(r.el), p = { ...r, x: 0, y: 0 }, f.removeInternalForSave(p), delete p.subGridOpts, r.content && (p.content = r.content, delete r.content), R.addRemoveCB)
3664
+ h = R.addRemoveCB(this.el, p, !0, !1);
3698
3665
  else {
3699
- let H = document.implementation.createHTMLDocument("");
3700
- H.body.innerHTML = '<div class="grid-stack-item"></div>', h = H.body.children[0], h.appendChild(a), H.body.innerHTML = '<div class="grid-stack-item-content"></div>', a = H.body.children[0], r.el.appendChild(a);
3666
+ let O = document.implementation.createHTMLDocument("");
3667
+ O.body.innerHTML = '<div class="grid-stack-item"></div>', h = O.body.children[0], h.appendChild(a), O.body.innerHTML = '<div class="grid-stack-item-content"></div>', a = O.body.children[0], r.el.appendChild(a);
3701
3668
  }
3702
3669
  this._prepareDragDropByNode(r);
3703
3670
  }
3704
3671
  if (i) {
3705
- let H = u ? t.column : r.w, C = r.h + i.h, D = r.el.style;
3706
- D.transition = "none", this.update(r.el, { w: H, h: C }), setTimeout(() => D.transition = null);
3672
+ let O = u ? t.column : r.w, C = r.h + i.h, L = r.el.style;
3673
+ L.transition = "none", this.update(r.el, { w: O, h: C }), setTimeout(() => L.transition = null);
3707
3674
  }
3708
- let d = r.subGrid = T.addGrid(a, t);
3709
- return i != null && i._moving && (d._isTemp = !0), u && (d._autoColumn = !0), s && d.addWidget(h, p), i && (i._moving ? window.setTimeout(() => f.simulateMouseEvent(i._event, "mouseenter", d.el), 0) : d.addWidget(r.el, r)), d;
3675
+ let c = r.subGrid = R.addGrid(a, t);
3676
+ return i != null && i._moving && (c._isTemp = !0), u && (c._autoColumn = !0), s && c.addWidget(h, p), i && (i._moving ? window.setTimeout(() => f.simulateMouseEvent(i._event, "mouseenter", c.el), 0) : c.addWidget(r.el, r)), c;
3710
3677
  }
3711
3678
  /**
3712
3679
  * called when an item was converted into a nested grid to accommodate a dragged over item, but then item leaves - return back
@@ -3728,7 +3695,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3728
3695
  * @param saveCB callback for each node -> widget, so application can insert additional data to be saved into the widget data structure.
3729
3696
  * @returns list of widgets or full grid option, including .children list of widgets
3730
3697
  */
3731
- save(e = !0, t = !1, i = T.saveCB) {
3698
+ save(e = !0, t = !1, i = R.saveCB) {
3732
3699
  let s = this.engine.save(e, i);
3733
3700
  if (s.forEach((r) => {
3734
3701
  var l;
@@ -3744,7 +3711,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3744
3711
  let r = f.cloneDeep(this.opts);
3745
3712
  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", delete r.disableOneColumnMode);
3746
3713
  const l = r._alwaysShowResizeHandle;
3747
- return delete r._alwaysShowResizeHandle, l !== void 0 ? r.alwaysShowResizeHandle = l : delete r.alwaysShowResizeHandle, f.removeInternalAndSame(r, he), r.children = s, r;
3714
+ return delete r._alwaysShowResizeHandle, l !== void 0 ? r.alwaysShowResizeHandle = l : delete r.alwaysShowResizeHandle, f.removeInternalAndSame(r, ae), r.children = s, r;
3748
3715
  }
3749
3716
  return s;
3750
3717
  }
@@ -3758,19 +3725,19 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3758
3725
  * @example
3759
3726
  * see http://gridstackjs.com/demo/serialization.html
3760
3727
  */
3761
- load(e, t = T.addRemoveCB || !0) {
3728
+ load(e, t = R.addRemoveCB || !0) {
3762
3729
  e = f.cloneDeep(e);
3763
3730
  const i = e.some((a) => a.x !== void 0 || a.y !== void 0);
3764
3731
  i && (e = f.sort(e, -1, this._prevColumn || this.getColumn())), this._insertNotAppend = i;
3765
3732
  const s = this.opts.column;
3766
3733
  this._prevColumn && this._prevColumn !== s && e.some((a) => (a.x || 0) + a.w > s) && (this._ignoreLayoutsNodeChange = !0, this.engine.cacheLayout(e, this._prevColumn, !0));
3767
- const r = T.addRemoveCB;
3768
- typeof t == "function" && (T.addRemoveCB = t);
3734
+ const r = R.addRemoveCB;
3735
+ typeof t == "function" && (R.addRemoveCB = t);
3769
3736
  let l = [];
3770
3737
  this.batchUpdate(), t && [...this.engine.nodes].forEach((h) => {
3771
3738
  if (!h.id)
3772
3739
  return;
3773
- f.find(e, h.id) || (T.addRemoveCB && T.addRemoveCB(this.el, h, !1, !1), l.push(h), this.removeWidget(h.el, !0, !1));
3740
+ f.find(e, h.id) || (R.addRemoveCB && R.addRemoveCB(this.el, h, !1, !1), l.push(h), this.removeWidget(h.el, !0, !1));
3774
3741
  });
3775
3742
  let n = [];
3776
3743
  this.engine.nodes = this.engine.nodes.filter((a) => f.find(e, a.id) ? (n.push(a), !1) : !0);
@@ -3780,11 +3747,11 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3780
3747
  let h = f.find(n, a.id);
3781
3748
  if (h) {
3782
3749
  if (f.shouldSizeToContent(h) && (a.h = h.h), this.engine.nodeBoundFix(a), (a.autoPosition || a.x === void 0 || a.y === void 0) && (a.w = a.w || h.w, a.h = a.h || h.h, this.engine.findEmptyPosition(a)), u = u || a.w !== void 0 && a.w !== h.w, this.engine.nodes.push(h), f.samePos(h, a) && this.moveNode(h, { ...a, forceCollide: !0 }), this.update(h.el, a), (p = a.subGridOpts) != null && p.children) {
3783
- let d = h.el.querySelector(".grid-stack");
3784
- d && d.gridstack && (d.gridstack.load(a.subGridOpts.children), this._insertNotAppend = !0);
3750
+ let c = h.el.querySelector(".grid-stack");
3751
+ c && c.gridstack && (c.gridstack.load(a.subGridOpts.children), this._insertNotAppend = !0);
3785
3752
  }
3786
3753
  } else t && this.addWidget(a);
3787
- }), this.engine.removedNodes = l, this.doContentResize(u, !0), this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this._insertNotAppend, r ? T.addRemoveCB = r : delete T.addRemoveCB, this;
3754
+ }), this.engine.removedNodes = l, this.doContentResize(u, !0), this.batchUpdate(!1), delete this._ignoreLayoutsNodeChange, delete this._insertNotAppend, r ? R.addRemoveCB = r : delete R.addRemoveCB, this;
3788
3755
  }
3789
3756
  /**
3790
3757
  * use before calling a bunch of `addWidget()` to prevent un-necessary relayouts in between (more efficient)
@@ -3940,7 +3907,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3940
3907
  * grid.makeWidget('2', {w:2, content: 'hello'});
3941
3908
  */
3942
3909
  makeWidget(e, t) {
3943
- let i = T.getElement(e);
3910
+ let i = R.getElement(e);
3944
3911
  this._prepareElement(i, !0, t);
3945
3912
  const s = i.gridstackNode;
3946
3913
  return this._updateContainerHeight(), this.doContentResize(!1, !1, s), s.subGridOpts && this.makeSubGrid(i, s.subGridOpts, void 0, !1), this._prevColumn && this.opts.column === 1 && (this._ignoreLayoutsNodeChange = !0), this._triggerAddEvent(), this._triggerChangeEvent(), delete this._ignoreLayoutsNodeChange, i;
@@ -3982,11 +3949,11 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
3982
3949
  * @param triggerEvent if `false` (quiet mode) element will not be added to removed list and no 'removed' callbacks will be called (Default? true).
3983
3950
  */
3984
3951
  removeWidget(e, t = !0, i = !0) {
3985
- return T.getElements(e).forEach((s) => {
3952
+ return R.getElements(e).forEach((s) => {
3986
3953
  if (s.parentElement && s.parentElement !== this.el)
3987
3954
  return;
3988
3955
  let r = s.gridstackNode;
3989
- r || (r = this.engine.nodes.find((l) => s === l.el)), r && (T.addRemoveCB && T.addRemoveCB(this.el, r, !1, !1), delete s.gridstackNode, this._removeDD(s), this.engine.removeNode(r, t, i), t && s.parentElement && s.remove());
3956
+ r || (r = this.engine.nodes.find((l) => s === l.el)), r && (R.addRemoveCB && R.addRemoveCB(this.el, r, !1, !1), delete s.gridstackNode, this._removeDD(s), this.engine.removeNode(r, t, i), t && s.parentElement && s.remove());
3990
3957
  }), i && (this._triggerRemoveEvent(), this._triggerChangeEvent()), this;
3991
3958
  }
3992
3959
  /**
@@ -4028,7 +3995,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4028
3995
  let i = arguments, s = 1;
4029
3996
  return t = { x: i[s++], y: i[s++], w: i[s++], h: i[s++] }, this.update(e, t);
4030
3997
  }
4031
- return T.getElements(e).forEach((i) => {
3998
+ return R.getElements(e).forEach((i) => {
4032
3999
  var h;
4033
4000
  let s = i == null ? void 0 : i.gridstackNode;
4034
4001
  if (!s)
@@ -4069,30 +4036,30 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4069
4036
  if (!r)
4070
4037
  return;
4071
4038
  let l = t && i.h ? i.h * r : e.clientHeight, n;
4072
- if (i.resizeToContentParent && (n = e.querySelector(i.resizeToContentParent)), n || (n = e.querySelector(T.resizeToContentParent)), !n)
4039
+ if (i.resizeToContentParent && (n = e.querySelector(i.resizeToContentParent)), n || (n = e.querySelector(R.resizeToContentParent)), !n)
4073
4040
  return;
4074
4041
  const u = e.clientHeight - n.clientHeight, a = t && i.h ? i.h * r - u : n.clientHeight;
4075
4042
  let h;
4076
4043
  if (i.subGrid)
4077
4044
  h = i.subGrid.getRow() * i.subGrid.getCellHeight();
4078
4045
  else {
4079
- const _ = n.firstElementChild;
4080
- if (!_) {
4081
- console.log(`Error: resizeToContent() '${T.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);
4046
+ const m = n.firstElementChild;
4047
+ if (!m) {
4048
+ console.log(`Error: resizeToContent() '${R.resizeToContentParent}'.firstElementChild is null, make sure to have a div like container. Skipping sizing.`);
4082
4049
  return;
4083
4050
  }
4084
- h = _.getBoundingClientRect().height || a;
4051
+ h = m.getBoundingClientRect().height || a;
4085
4052
  }
4086
4053
  if (a === h)
4087
4054
  return;
4088
4055
  l += h - a;
4089
4056
  let p = Math.ceil(l / r);
4090
- const d = Number.isInteger(i.sizeToContent) ? i.sizeToContent : 0;
4091
- d && p > d && (p = d, e.classList.add("size-to-content-max")), i.minH && p < i.minH ? p = i.minH : i.maxH && p > i.maxH && (p = i.maxH), p !== i.h && (s._ignoreLayoutsNodeChange = !0, s.moveNode(i, { h: p }), delete s._ignoreLayoutsNodeChange);
4057
+ const c = Number.isInteger(i.sizeToContent) ? i.sizeToContent : 0;
4058
+ c && p > c && (p = c, e.classList.add("size-to-content-max")), i.minH && p < i.minH ? p = i.minH : i.maxH && p > i.maxH && (p = i.maxH), p !== i.h && (s._ignoreLayoutsNodeChange = !0, s.moveNode(i, { h: p }), delete s._ignoreLayoutsNodeChange);
4092
4059
  }
4093
4060
  /** call the user resize (so they can do extra work) else our build in version */
4094
4061
  resizeToContentCheck(e, t = !1) {
4095
- T.resizeToContentCB ? T.resizeToContentCB(e, t) : this.resizeToContent(e, t);
4062
+ R.resizeToContentCB ? R.resizeToContentCB(e, t) : this.resizeToContent(e, t);
4096
4063
  }
4097
4064
  /**
4098
4065
  * Updates the margins which will set all 4 sides at once - see `GridStackOptions.margin` for format options (CSS string format of 1,2,4 values or single number).
@@ -4170,8 +4137,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4170
4137
  }), !this._styles)
4171
4138
  return this;
4172
4139
  this._styles._max = 0, f.addCSSRule(this._styles, r, `height: ${i}${s}`);
4173
- let n = this.opts.marginTop + this.opts.marginUnit, u = this.opts.marginBottom + this.opts.marginUnit, a = this.opts.marginRight + this.opts.marginUnit, h = this.opts.marginLeft + this.opts.marginUnit, p = `${r} > .grid-stack-item-content`, d = `.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;
4174
- f.addCSSRule(this._styles, p, `top: ${n}; right: ${a}; bottom: ${u}; left: ${h};`), f.addCSSRule(this._styles, d, `top: ${n}; right: ${a}; bottom: ${u}; left: ${h};`), f.addCSSRule(this._styles, `${r} > .ui-resizable-ne`, `right: ${a}`), f.addCSSRule(this._styles, `${r} > .ui-resizable-e`, `right: ${a}`), f.addCSSRule(this._styles, `${r} > .ui-resizable-se`, `right: ${a}; bottom: ${u}`), f.addCSSRule(this._styles, `${r} > .ui-resizable-nw`, `left: ${h}`), f.addCSSRule(this._styles, `${r} > .ui-resizable-w`, `left: ${h}`), f.addCSSRule(this._styles, `${r} > .ui-resizable-sw`, `left: ${h}; bottom: ${u}`);
4140
+ let n = this.opts.marginTop + this.opts.marginUnit, u = this.opts.marginBottom + this.opts.marginUnit, a = this.opts.marginRight + this.opts.marginUnit, h = this.opts.marginLeft + this.opts.marginUnit, p = `${r} > .grid-stack-item-content`, c = `.${this._styleSheetClass} > .grid-stack-placeholder > .placeholder-content`;
4141
+ f.addCSSRule(this._styles, p, `top: ${n}; right: ${a}; bottom: ${u}; left: ${h};`), f.addCSSRule(this._styles, c, `top: ${n}; right: ${a}; bottom: ${u}; left: ${h};`), f.addCSSRule(this._styles, `${r} > .ui-resizable-ne`, `right: ${a}`), f.addCSSRule(this._styles, `${r} > .ui-resizable-e`, `right: ${a}`), f.addCSSRule(this._styles, `${r} > .ui-resizable-se`, `right: ${a}; bottom: ${u}`), f.addCSSRule(this._styles, `${r} > .ui-resizable-nw`, `left: ${h}`), f.addCSSRule(this._styles, `${r} > .ui-resizable-w`, `left: ${h}`), f.addCSSRule(this._styles, `${r} > .ui-resizable-sw`, `left: ${h}; bottom: ${u}`);
4175
4142
  }
4176
4143
  if (t = t || this._styles._max, t > this._styles._max) {
4177
4144
  let l = (n) => i * n + s;
@@ -4292,7 +4259,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4292
4259
  }
4293
4260
  /** @internal */
4294
4261
  static getGridElement(e) {
4295
- return T.getElement(e);
4262
+ return R.getElement(e);
4296
4263
  }
4297
4264
  /** @internal */
4298
4265
  static getGridElements(e) {
@@ -4321,7 +4288,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4321
4288
  * @param root optional root which defaults to document (for shadow dom pas the parent HTMLDocument)
4322
4289
  */
4323
4290
  static setupDragIn(e, t, i = document) {
4324
- (t == null ? void 0 : t.pause) !== void 0 && (k.pauseDrag = t.pause), t = { ...kn, ...t || {} };
4291
+ (t == null ? void 0 : t.pause) !== void 0 && (x.pauseDrag = t.pause), t = { ...En, ...t || {} };
4325
4292
  let s = typeof e == "string" ? f.getElements(e, i) : e;
4326
4293
  s.length && (s == null || s.forEach((r) => {
4327
4294
  Q.isDraggable(r) || Q.dragIn(r, t);
@@ -4334,7 +4301,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4334
4301
  * @param val if true widget will be draggable, assuming the parent grid isn't noMove or static.
4335
4302
  */
4336
4303
  movable(e, t) {
4337
- return this.opts.staticGrid ? this : (T.getElements(e).forEach((i) => {
4304
+ return this.opts.staticGrid ? this : (R.getElements(e).forEach((i) => {
4338
4305
  let s = i.gridstackNode;
4339
4306
  s && (t ? delete s.noMove : s.noMove = !0, this._prepareDragDropByNode(s));
4340
4307
  }), this);
@@ -4345,7 +4312,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4345
4312
  * @param val if true widget will be resizable, assuming the parent grid isn't noResize or static.
4346
4313
  */
4347
4314
  resizable(e, t) {
4348
- return this.opts.staticGrid ? this : (T.getElements(e).forEach((i) => {
4315
+ return this.opts.staticGrid ? this : (R.getElements(e).forEach((i) => {
4349
4316
  let s = i.gridstackNode;
4350
4317
  s && (t ? delete s.noResize : s.noResize = !0, this._prepareDragDropByNode(s));
4351
4318
  }), this);
@@ -4455,7 +4422,7 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4455
4422
  let n = r.gridstackNode;
4456
4423
  return n && (!n.grid || n.grid === this) && (this._leave(r, l), this._isTemp && this.removeAsSubGrid(n)), !1;
4457
4424
  }).on(this.el, "drop", (s, r, l) => {
4458
- var p, d;
4425
+ var p, c;
4459
4426
  let n = r.gridstackNode;
4460
4427
  if ((n == null ? void 0 : n.grid) === this && !n._isExternal)
4461
4428
  return !1;
@@ -4463,14 +4430,14 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4463
4430
  this.placeholder.remove();
4464
4431
  let a = r._gridstackNodeOrig;
4465
4432
  if (delete r._gridstackNodeOrig, u && (a != null && a.grid) && a.grid !== this) {
4466
- let _ = a.grid;
4467
- _.engine.removeNodeFromLayoutCache(a), _.engine.removedNodes.push(a), _._triggerRemoveEvent()._triggerChangeEvent(), _.parentGridItem && !_.engine.nodes.length && _.opts.subGridDynamic && _.removeAsSubGrid();
4433
+ let m = a.grid;
4434
+ m.engine.removeNodeFromLayoutCache(a), m.engine.removedNodes.push(a), m._triggerRemoveEvent()._triggerChangeEvent(), m.parentGridItem && !m.engine.nodes.length && m.opts.subGridDynamic && m.removeAsSubGrid();
4468
4435
  }
4469
4436
  if (!n || (u && (this.engine.cleanupNode(n), n.grid = this), delete n.grid._isTemp, Q.off(r, "drag"), l !== r ? (l.remove(), r.gridstackNode = a, u && (r = r.cloneNode(!0))) : (r.remove(), this._removeDD(r)), !u))
4470
4437
  return !1;
4471
4438
  r.gridstackNode = n, n.el = r;
4472
- let h = (d = (p = n.subGrid) == null ? void 0 : p.el) == null ? void 0 : d.gridstack;
4473
- return f.copyPos(n, this._readAttr(this.placeholder)), f.removePositioningStyles(r), this._writeAttr(r, n), r.classList.add(he.itemClass, this.opts.itemClass), this.el.appendChild(r), h && (h.parentGridItem = n, h.opts.styleInHead || h._updateStyles(!0)), this._prepareDragDropByNode(n), this._updateContainerHeight(), this.engine.addedNodes.push(n), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({ ...s, type: "dropped" }, a && a.grid ? a : void 0, n), !1;
4439
+ let h = (c = (p = n.subGrid) == null ? void 0 : p.el) == null ? void 0 : c.gridstack;
4440
+ return f.copyPos(n, this._readAttr(this.placeholder)), f.removePositioningStyles(r), this._writeAttr(r, n), r.classList.add(ae.itemClass, this.opts.itemClass), this.el.appendChild(r), h && (h.parentGridItem = n, h.opts.styleInHead || h._updateStyles(!0)), this._prepareDragDropByNode(n), this._updateContainerHeight(), this.engine.addedNodes.push(n), this._triggerAddEvent(), this._triggerChangeEvent(), this.engine.endUpdate(), this._gsEventHandler.dropped && this._gsEventHandler.dropped({ ...s, type: "dropped" }, a && a.grid ? a : void 0, n), !1;
4474
4441
  }), this;
4475
4442
  }
4476
4443
  /** @internal mark item for removal */
@@ -4504,8 +4471,8 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4504
4471
  let p = h.target;
4505
4472
  if (!(!p.gridstackNode || p.gridstackNode.grid !== this)) {
4506
4473
  if (e.el = p, e._isAboutToRemove) {
4507
- let d = t.gridstackNode.grid;
4508
- d._gsEventHandler[h.type] && d._gsEventHandler[h.type](h, p), d.engine.nodes.push(e), d.removeWidget(t, !0, !0);
4474
+ let c = t.gridstackNode.grid;
4475
+ c._gsEventHandler[h.type] && c._gsEventHandler[h.type](h, p), c.engine.nodes.push(e), c.removeWidget(t, !0, !0);
4509
4476
  } else
4510
4477
  f.removePositioningStyles(p), e._temporaryRemoved ? (f.copyPos(e, e._orig), this._writePosAttr(p, e), this.engine.addNode(e)) : this._writePosAttr(p, e), this._gsEventHandler[h.type] && this._gsEventHandler[h.type](h, p);
4511
4478
  this._extraDragRow = 0, this._updateContainerHeight(), this._triggerChangeEvent(), this.engine.endUpdate(), h.type === "resizestop" && (Number.isInteger(e.sizeToContent) && (e.sizeToContent = e.h), this.doContentResize(!1, !0, e));
@@ -4529,39 +4496,39 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4529
4496
  }
4530
4497
  /** @internal handles actual drag/resize */
4531
4498
  _dragOrResize(e, t, i, s, r, l) {
4532
- let n = { ...s._orig }, u, a = this.opts.marginLeft, h = this.opts.marginRight, p = this.opts.marginTop, d = this.opts.marginBottom, _ = Math.round(l * 0.1), v = Math.round(r * 0.1);
4533
- if (a = Math.min(a, v), h = Math.min(h, v), p = Math.min(p, _), d = Math.min(d, _), t.type === "drag") {
4499
+ let n = { ...s._orig }, u, a = this.opts.marginLeft, h = this.opts.marginRight, p = this.opts.marginTop, c = this.opts.marginBottom, m = Math.round(l * 0.1), b = Math.round(r * 0.1);
4500
+ if (a = Math.min(a, b), h = Math.min(h, b), p = Math.min(p, m), c = Math.min(c, m), t.type === "drag") {
4534
4501
  if (s._temporaryRemoved)
4535
4502
  return;
4536
- let H = i.position.top - s._prevYPix;
4537
- s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && f.updateScrollPosition(e, i.position, H);
4538
- let C = i.position.left + (i.position.left > s._lastUiPosition.left ? -h : a), D = i.position.top + (i.position.top > s._lastUiPosition.top ? -d : p);
4539
- n.x = Math.round(C / r), n.y = Math.round(D / l);
4540
- let S = this._extraDragRow;
4503
+ let O = i.position.top - s._prevYPix;
4504
+ s._prevYPix = i.position.top, this.opts.draggable.scroll !== !1 && f.updateScrollPosition(e, i.position, O);
4505
+ let C = i.position.left + (i.position.left > s._lastUiPosition.left ? -h : a), L = i.position.top + (i.position.top > s._lastUiPosition.top ? -c : p);
4506
+ n.x = Math.round(C / r), n.y = Math.round(L / l);
4507
+ let A = this._extraDragRow;
4541
4508
  if (this.engine.collide(s, n)) {
4542
- let m = this.getRow(), y = Math.max(0, n.y + s.h - m);
4543
- this.opts.maxRow && m + y > this.opts.maxRow && (y = Math.max(0, this.opts.maxRow - m)), this._extraDragRow = y;
4509
+ let E = this.getRow(), U = Math.max(0, n.y + s.h - E);
4510
+ this.opts.maxRow && E + U > this.opts.maxRow && (U = Math.max(0, this.opts.maxRow - E)), this._extraDragRow = U;
4544
4511
  } else
4545
4512
  this._extraDragRow = 0;
4546
- if (this._extraDragRow !== S && this._updateContainerHeight(), s.x === n.x && s.y === n.y)
4513
+ if (this._extraDragRow !== A && this._updateContainerHeight(), s.x === n.x && s.y === n.y)
4547
4514
  return;
4548
4515
  } else if (t.type === "resize") {
4549
4516
  if (n.x < 0 || (f.updateScrollResize(t, e, l), n.w = Math.round((i.size.width - a) / r), n.h = Math.round((i.size.height - p) / l), s.w === n.w && s.h === n.h) || s._lastTried && s._lastTried.w === n.w && s._lastTried.h === n.h)
4550
4517
  return;
4551
- let H = i.position.left + a, C = i.position.top + p;
4552
- n.x = Math.round(H / r), n.y = Math.round(C / l), u = !0;
4518
+ let O = i.position.left + a, C = i.position.top + p;
4519
+ n.x = Math.round(O / r), n.y = Math.round(C / l), u = !0;
4553
4520
  }
4554
4521
  s._event = t, s._lastTried = n;
4555
- let L = {
4522
+ let z = {
4556
4523
  x: i.position.left + a,
4557
4524
  y: i.position.top + p,
4558
4525
  w: (i.size ? i.size.width : s.w * r) - a - h,
4559
- h: (i.size ? i.size.height : s.h * l) - p - d
4526
+ h: (i.size ? i.size.height : s.h * l) - p - c
4560
4527
  };
4561
- if (this.engine.moveNodeCheck(s, { ...n, cellWidth: r, cellHeight: l, rect: L, resizing: u })) {
4562
- s._lastUiPosition = i.position, this.engine.cacheRects(r, l, p, h, d, a), delete s._skipDown, u && s.subGrid && s.subGrid.onResize(), this._extraDragRow = 0, this._updateContainerHeight();
4563
- let H = t.target;
4564
- this._writePosAttr(H, s), this._gsEventHandler[t.type] && this._gsEventHandler[t.type](t, H);
4528
+ if (this.engine.moveNodeCheck(s, { ...n, cellWidth: r, cellHeight: l, rect: z, resizing: u })) {
4529
+ s._lastUiPosition = i.position, this.engine.cacheRects(r, l, p, h, c, a), delete s._skipDown, u && s.subGrid && s.subGrid.onResize(), this._extraDragRow = 0, this._updateContainerHeight();
4530
+ let O = t.target;
4531
+ this._writePosAttr(O, s), this._gsEventHandler[t.type] && this._gsEventHandler[t.type](t, O);
4565
4532
  }
4566
4533
  }
4567
4534
  /** @internal called when item leaving our area by either cursor dropout event
@@ -4574,88 +4541,87 @@ Note: ".grid-stack" is required for proper CSS styling and drag/drop, and is the
4574
4541
  }
4575
4542
  // legacy method removed
4576
4543
  commit() {
4577
- return xn(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
4544
+ return kn(this, this.batchUpdate(!1), "commit", "batchUpdate", "5.2"), this;
4578
4545
  }
4579
4546
  }
4580
- T.resizeToContentParent = ".grid-stack-item-content";
4581
- T.Utils = f;
4582
- T.Engine = be;
4583
- T.GDRev = "9.5.1";
4584
- const Sn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Cn = { class: "color-primary" }, An = { class: "color-secondary" }, Dn = {
4547
+ R.resizeToContentParent = ".grid-stack-item-content";
4548
+ R.Utils = f;
4549
+ R.Engine = _e;
4550
+ R.GDRev = "9.5.1";
4551
+ const Cn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, An = { class: "color-primary" }, Dn = { class: "color-secondary" }, Ln = {
4585
4552
  key: 1,
4586
4553
  class: "empty"
4587
- }, Ln = {
4554
+ }, zn = {
4588
4555
  key: 0,
4589
4556
  class: "clear-filter-div"
4590
- }, zn = /* @__PURE__ */ we({
4557
+ }, Nn = /* @__PURE__ */ be({
4591
4558
  __name: "Filter",
4592
4559
  props: {
4593
- order: {},
4594
- exclude: {}
4560
+ order: {}
4595
4561
  },
4596
4562
  setup(o) {
4597
- const e = o, t = nt(), i = Ce(() => ({ ...t.Filters })), s = Ce(() => {
4598
- const a = i.value;
4599
- return Object.keys(a).map((h) => ({ key: h, value: a[h] })).filter(({ value: h }) => !(h == null || typeof h == "string" && h.trim() === "" || Array.isArray(h) && h.length === 0));
4600
- }), r = Ce(() => {
4563
+ const e = o, t = rt(), i = de(() => ({ ...t.Filters })), s = de(() => ({ ...t.displayFilters })), r = de(() => {
4564
+ const h = i.value;
4565
+ return Object.keys(h).map((p) => ({ key: p, value: h[p] })).filter(({ value: p }) => !(p == null || typeof p == "string" && p.trim() === "" || Array.isArray(p) && p.length === 0));
4566
+ }), l = de(() => {
4601
4567
  var p;
4602
- const a = new Set(e.exclude ?? []), h = s.value.filter((d) => !a.has(d.key));
4568
+ const h = r.value.filter((c) => s.value.hasOwnProperty(c.key) && s.value[c.key]);
4603
4569
  if ((p = e.order) != null && p.length) {
4604
- const d = new Map(e.order.map((_, v) => [_, v]));
4605
- h.sort((_, v) => {
4606
- const L = d.has(_.key) ? d.get(_.key) : Number.MAX_SAFE_INTEGER, H = d.has(v.key) ? d.get(v.key) : Number.MAX_SAFE_INTEGER;
4607
- return L - H || _.key.localeCompare(v.key);
4570
+ const c = new Map(e.order.map((m, b) => [m, b]));
4571
+ h.sort((m, b) => {
4572
+ const z = c.has(m.key) ? c.get(m.key) : Number.MAX_SAFE_INTEGER, O = c.has(b.key) ? c.get(b.key) : Number.MAX_SAFE_INTEGER;
4573
+ return z - O || m.key.localeCompare(b.key);
4608
4574
  });
4609
4575
  } else
4610
- h.sort((d, _) => d.key.localeCompare(_.key));
4576
+ h.sort((c, m) => c.key.localeCompare(m.key));
4611
4577
  return h;
4612
4578
  });
4613
- function l(a) {
4614
- return Array.isArray(a) ? a.join(", ") : a && typeof a == "object" ? JSON.stringify(a) : String(a ?? "");
4579
+ function n(h) {
4580
+ return Array.isArray(h) ? Gs(h).map((c) => c && typeof c == "object" ? c.name ?? JSON.stringify(c).replace(/[{}"]/g, "") : String(c ?? "")).join(", ") : h && typeof h == "object" ? JSON.stringify(h).replace(/[{}"]/g, "") : String(h ?? "");
4615
4581
  }
4616
- function n(a) {
4617
- const h = t;
4618
- typeof h.clearFilter == "function" ? h.clearFilter(a) : typeof h.clearAllFilters == "function" ? h.clearAllFilters(a) : t.setFilter(a, void 0);
4582
+ function u(h) {
4583
+ const p = t;
4584
+ typeof p.clearFilter == "function" ? p.clearFilter(h) : typeof p.clearAllFilters == "function" ? p.clearAllFilters(h) : t.setFilter(h, void 0);
4619
4585
  }
4620
- function u() {
4586
+ function a() {
4621
4587
  t.resetFilters({});
4622
4588
  }
4623
- return (a, h) => {
4624
- const p = ie("el-icon"), d = ie("el-row");
4625
- return R(), ae(d, {
4589
+ return (h, p) => {
4590
+ const c = ie("el-icon"), m = ie("el-row");
4591
+ return S(), le(m, {
4626
4592
  class: "filter-wrapper tw-m-1",
4627
4593
  align: "middle",
4628
4594
  justify: "space-between"
4629
4595
  }, {
4630
- default: q(() => [
4631
- z("div", Sn, [
4632
- r.value.length ? (R(!0), $(ze, { key: 0 }, it(r.value, (_) => (R(), ae(ue(Zs), {
4596
+ default: V(() => [
4597
+ N("div", Cn, [
4598
+ l.value.length ? (S(!0), B(Le, { key: 0 }, tt(l.value, (b) => (S(), le(he(Qs), {
4633
4599
  class: "color-background",
4634
- key: _.key,
4600
+ key: b.key,
4635
4601
  closable: "",
4636
- onClose: (v) => n(_.key),
4602
+ onClose: (z) => u(b.key),
4637
4603
  effect: "dark",
4638
4604
  type: "info"
4639
4605
  }, {
4640
- default: q(() => [
4641
- z("b", Cn, Ae(_.key) + ": ", 1),
4642
- z("span", An, Ae(l(_.value)), 1)
4606
+ default: V(() => [
4607
+ N("b", An, Re(b.key) + ": ", 1),
4608
+ N("span", Dn, Re(n(b.value)), 1)
4643
4609
  ]),
4644
4610
  _: 2
4645
- }, 1032, ["onClose"]))), 128)) : (R(), $("span", Dn))
4611
+ }, 1032, ["onClose"]))), 128)) : (S(), B("span", Ln))
4646
4612
  ]),
4647
- r.value.length ? (R(), $("div", Ln, [
4648
- X(ue(hs), {
4613
+ l.value.length ? (S(), B("div", zn, [
4614
+ Y(he(hs), {
4649
4615
  placement: "top-start",
4650
4616
  content: "Clear All Filters"
4651
4617
  }, {
4652
- default: q(() => [
4653
- X(p, {
4618
+ default: V(() => [
4619
+ Y(c, {
4654
4620
  color: "#FFFF",
4655
- onClick: u
4621
+ onClick: a
4656
4622
  }, {
4657
- default: q(() => [
4658
- X(ue(Js))
4623
+ default: V(() => [
4624
+ Y(he(er))
4659
4625
  ]),
4660
4626
  _: 1
4661
4627
  })
@@ -4668,13 +4634,13 @@ const Sn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Cn = { class:
4668
4634
  });
4669
4635
  };
4670
4636
  }
4671
- }), Nn = /* @__PURE__ */ Me(zn, [["__scopeId", "data-v-3487ec9b"]]), Mn = {
4637
+ }), Mn = /* @__PURE__ */ Ne(Nn, [["__scopeId", "data-v-55b985b8"]]), In = {
4672
4638
  key: 0,
4673
4639
  class: "content-header dash-header-visible stick-to-top tw-flex tw-flex-row tw-items-center tw-justify-between tw-h-10"
4674
- }, In = { class: "editing-div" }, Hn = { class: "tw-m-4 tw-leading-none tw-pl-1 widget-name" }, On = { class: "header-slot-icon" }, Pn = {
4640
+ }, Hn = { class: "editing-div" }, On = { class: "tw-m-4 tw-leading-none tw-pl-1 widget-name" }, Pn = { class: "header-slot-icon" }, $n = {
4675
4641
  key: 1,
4676
4642
  class: "dash-header-hide content-header"
4677
- }, $n = { class: "header-slot-icon" }, Bn = {
4643
+ }, Bn = { class: "header-slot-icon" }, Un = {
4678
4644
  __name: "DashHeader",
4679
4645
  props: {
4680
4646
  widgetName: {
@@ -4689,11 +4655,11 @@ const Sn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Cn = { class:
4689
4655
  hideHeader: Boolean
4690
4656
  },
4691
4657
  setup(o) {
4692
- const e = nt(), t = o, i = B(null);
4693
- ce(() => t.widgetName, (u) => {
4658
+ const e = rt(), t = o, i = F(null);
4659
+ fe(() => t.widgetName, (u) => {
4694
4660
  i.value = u;
4695
4661
  }, { immediate: !0 });
4696
- const s = B(!1), r = B(null);
4662
+ const s = F(!1), r = F(null);
4697
4663
  function l() {
4698
4664
  s.value = !0, r.value && r.value.focus();
4699
4665
  }
@@ -4706,32 +4672,32 @@ const Sn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Cn = { class:
4706
4672
  }
4707
4673
  return (u, a) => {
4708
4674
  const h = ie("el-input"), p = ls("click-out");
4709
- return o.hideHeader ? (R(), $("div", Pn, [
4710
- z("div", $n, [
4711
- wt(u.$slots, "default", {}, void 0, !0)
4675
+ return o.hideHeader ? (S(), B("div", $n, [
4676
+ N("div", Bn, [
4677
+ vt(u.$slots, "default", {}, void 0, !0)
4712
4678
  ])
4713
- ])) : (R(), $("div", Mn, [
4714
- z("div", null, [
4715
- Le((R(), $("div", {
4679
+ ])) : (S(), B("div", In, [
4680
+ N("div", null, [
4681
+ De((S(), B("div", {
4716
4682
  onKeyup: as(n, ["enter"]),
4717
4683
  class: "tw-flex"
4718
4684
  }, [
4719
- Le(z("div", In, [
4720
- X(h, {
4721
- onFocus: a[0] || (a[0] = (d) => d.target.select()),
4685
+ De(N("div", Hn, [
4686
+ Y(h, {
4687
+ onFocus: a[0] || (a[0] = (c) => c.target.select()),
4722
4688
  ref_key: "textUserInput",
4723
4689
  ref: r,
4724
4690
  modelValue: i.value,
4725
- "onUpdate:modelValue": a[1] || (a[1] = (d) => i.value = d)
4691
+ "onUpdate:modelValue": a[1] || (a[1] = (c) => i.value = c)
4726
4692
  }, null, 8, ["modelValue"])
4727
4693
  ], 512), [
4728
4694
  [xt, s.value]
4729
4695
  ]),
4730
- Le(z("div", {
4731
- onClick: a[2] || (a[2] = (d) => l()),
4696
+ De(N("div", {
4697
+ onClick: a[2] || (a[2] = (c) => l()),
4732
4698
  class: "visible-div"
4733
4699
  }, [
4734
- z("div", Hn, Ae(i.value), 1)
4700
+ N("div", On, Re(i.value), 1)
4735
4701
  ], 512), [
4736
4702
  [xt, !s.value]
4737
4703
  ])
@@ -4739,13 +4705,13 @@ const Sn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Cn = { class:
4739
4705
  [p, n]
4740
4706
  ])
4741
4707
  ]),
4742
- z("div", On, [
4743
- wt(u.$slots, "default", {}, void 0, !0)
4708
+ N("div", Pn, [
4709
+ vt(u.$slots, "default", {}, void 0, !0)
4744
4710
  ])
4745
4711
  ]));
4746
4712
  };
4747
4713
  }
4748
- }, Un = /* @__PURE__ */ Me(Bn, [["__scopeId", "data-v-4f4aa869"]]), Fn = { class: "tw-flex" }, Wn = {
4714
+ }, Fn = /* @__PURE__ */ Ne(Un, [["__scopeId", "data-v-4f4aa869"]]), Wn = { class: "tw-flex" }, Gn = {
4749
4715
  __name: "WidgetWrapper",
4750
4716
  props: {
4751
4717
  widgetID: {
@@ -4777,13 +4743,13 @@ const Sn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Cn = { class:
4777
4743
  emits: ["removeWidget", "toggle-lock"],
4778
4744
  setup(o, { emit: e }) {
4779
4745
  const t = e, i = o;
4780
- let s = B(null);
4781
- const r = B(!1);
4782
- ce(() => i.isLocked, (u) => {
4746
+ let s = F(null);
4747
+ const r = F(!1);
4748
+ fe(() => i.isLocked, (u) => {
4783
4749
  r.value = u;
4784
4750
  }, { immediate: !0 });
4785
- const l = B(null);
4786
- ce(() => i.hideWidgetsHeader, (u) => {
4751
+ const l = F(null);
4752
+ fe(() => i.hideWidgetsHeader, (u) => {
4787
4753
  l.value = u;
4788
4754
  }, { immediate: !0 });
4789
4755
  function n() {
@@ -4794,12 +4760,12 @@ const Sn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Cn = { class:
4794
4760
  }
4795
4761
  return (u, a) => {
4796
4762
  const h = ie("el-icon");
4797
- return R(), $("div", {
4763
+ return S(), B("div", {
4798
4764
  ref_key: "instance",
4799
4765
  ref: s,
4800
- class: Ws(["grid-stack-item-content", { "locked-widget": o.isLocked }])
4766
+ class: Vs(["grid-stack-item-content", { "locked-widget": o.isLocked }])
4801
4767
  }, [
4802
- (R(), ae(Fi(o.componentTag), li({
4768
+ (S(), le(Fi(o.componentTag), ni({
4803
4769
  class: ["widget-body", { "widget-body-no-head": l.value }],
4804
4770
  widgetID: o.widgetID,
4805
4771
  hideHeader: l.value
@@ -4807,44 +4773,44 @@ const Sn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Cn = { class:
4807
4773
  style: { pointerEvents: r.value ? "none" : "auto" },
4808
4774
  isLocked: r.value
4809
4775
  }), {
4810
- default: q((p) => [
4811
- p ? (R(), ae(Un, {
4776
+ default: V((p) => [
4777
+ p ? (S(), le(Fn, {
4812
4778
  key: 0,
4813
4779
  widgetName: i.componentName,
4814
4780
  widgetID: o.widgetID,
4815
4781
  staticMode: o.staticMode,
4816
4782
  hideHeader: l.value
4817
4783
  }, {
4818
- default: q(() => [
4819
- z("div", Fn, [
4820
- (R(!0), $(ze, null, it(p.childIcons, (d) => (R(), ae(ue(hs), { placement: "bottom-start" }, {
4821
- content: q(() => [
4822
- We(Ae(d.tooltip), 1)
4784
+ default: V(() => [
4785
+ N("div", Wn, [
4786
+ (S(!0), B(Le, null, tt(p.childIcons, (c) => (S(), le(he(hs), { placement: "bottom-start" }, {
4787
+ content: V(() => [
4788
+ Ae(Re(c.tooltip), 1)
4823
4789
  ]),
4824
- default: q(() => [
4825
- (R(), ae(Fi(d.comp), {
4790
+ default: V(() => [
4791
+ (S(), le(Fi(c.comp), {
4826
4792
  class: "tw-w-4 header-icon",
4827
- onClick: d.event
4793
+ onClick: c.event
4828
4794
  }, null, 8, ["onClick"]))
4829
4795
  ]),
4830
4796
  _: 2
4831
4797
  }, 1024))), 256)),
4832
- X(h, {
4798
+ Y(h, {
4833
4799
  class: "header-icon lock-toggle",
4834
- onClick: a[0] || (a[0] = (d) => n())
4800
+ onClick: a[0] || (a[0] = (c) => n())
4835
4801
  }, {
4836
- default: q(() => [
4837
- r.value ? (R(), ae(ue(rr), { key: 0 })) : (R(), ae(ue(or), { key: 1 }))
4802
+ default: V(() => [
4803
+ r.value ? (S(), le(he(nr), { key: 0 })) : (S(), le(he(lr), { key: 1 }))
4838
4804
  ]),
4839
4805
  _: 1
4840
4806
  }),
4841
- !o.staticMode && !o.isLocked ? (R(), ae(h, {
4807
+ !o.staticMode && !o.isLocked ? (S(), le(h, {
4842
4808
  key: 0,
4843
4809
  class: "item-widget-button",
4844
- onClick: a[1] || (a[1] = (d) => u.$emit("removeWidget"))
4810
+ onClick: a[1] || (a[1] = (c) => u.$emit("removeWidget"))
4845
4811
  }, {
4846
- default: q(() => [
4847
- X(ue(tr))
4812
+ default: V(() => [
4813
+ Y(he(ir))
4848
4814
  ]),
4849
4815
  _: 1
4850
4816
  })) : kt("", !0)
@@ -4858,50 +4824,67 @@ const Sn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Cn = { class:
4858
4824
  ], 2);
4859
4825
  };
4860
4826
  }
4861
- }, Gn = /* @__PURE__ */ Me(Wn, [["__scopeId", "data-v-a2daf4ac"]]), Vn = { class: "dashboard-app" }, qn = {
4827
+ }, Vn = /* @__PURE__ */ Ne(Gn, [["__scopeId", "data-v-a2daf4ac"]]), qn = { class: "dashboard-app" }, jn = {
4862
4828
  key: 0,
4863
4829
  class: "dash-header tw-max-h-screen tw-flex tw-flex-col"
4864
- }, jn = { class: "tw-float-left tw-m-1 button" }, Yn = {
4830
+ }, Yn = { class: "tw-float-left tw-m-1 button" }, Xn = {
4865
4831
  key: 1,
4866
4832
  class: "tw-h-10 dash-header"
4867
- }, Xn = { class: "tw-float-left tw-m-1" }, Kn = { class: "tw-m-4 tw-w-40" }, Zn = ["gs-x", "gs-y", "gs-w", "gs-h", "gs-id", "id", "props", "gs-locked", "gs-no-move", "gs-no-resize"], Qn = /* @__PURE__ */ we({
4833
+ }, Zn = { class: "tw-float-left tw-m-1" }, Kn = { class: "tw-m-4 tw-w-50 tw-flex-row tw-flex" }, Qn = { class: "tw-m-w-4 tw-w-40" }, Jn = ["gs-x", "gs-y", "gs-w", "gs-h", "gs-id", "id", "props", "gs-locked", "gs-no-move", "gs-no-resize"], eo = /* @__PURE__ */ be({
4868
4834
  __name: "Dashboard",
4869
4835
  props: {
4870
4836
  hideHeader: {},
4871
4837
  options: {}
4872
4838
  },
4873
4839
  setup(o) {
4874
- const e = o, t = nt(), { DASHBOARD_ITEMS: i } = ti(t), s = {
4875
- apiUrl: Ce(() => {
4876
- var m;
4877
- return (m = t.Services) == null ? void 0 : m.ApiUrl;
4840
+ const e = o, t = rt(), { DASHBOARD_ITEMS: i } = Jt(t), s = {
4841
+ apiUrl: de(() => {
4842
+ var _;
4843
+ return (_ = t.Services) == null ? void 0 : _.ApiUrl;
4878
4844
  }),
4879
- s3Url: Ce(() => {
4880
- var m;
4881
- return (m = t.Services) == null ? void 0 : m.s3Url;
4845
+ s3Url: de(() => {
4846
+ var _;
4847
+ return (_ = t.Services) == null ? void 0 : _.s3Url;
4882
4848
  }),
4849
+ services: de(() => t.Services),
4883
4850
  filters: t.Filters,
4884
4851
  setFilter: t.setFilter,
4885
4852
  clearFilter: t.clearFilter,
4886
4853
  resetFilters: t.resetFilters
4887
4854
  };
4888
- Gs("dashboard:globalVars", s);
4889
- let r = B("Edit Grid"), l = null;
4890
- const n = B(null);
4891
- let u = B(!0), a = 0;
4892
- const h = B([]), { ComponentRegistry: p } = ti(t), d = ns({});
4893
- Vs(() => {
4894
- var m;
4895
- _(), t.loadFromLocalStorage(), a = ((m = i.value) == null ? void 0 : m.length) + 1;
4896
- }), qs(() => {
4897
- v(), L();
4898
- }), js(() => t.unregisterGridProvider());
4899
- function _() {
4900
- var m, y;
4901
- t.DefaultLayout = (m = e.options) == null ? void 0 : m.defaultLayout, t.setOptionServices((y = e.options) == null ? void 0 : y.services);
4855
+ qs("dashboard:globalVars", s);
4856
+ let r = F("Edit Grid"), l = null;
4857
+ const n = F(null);
4858
+ let u = F(!0), a = 0;
4859
+ const h = F([]), { ComponentRegistry: p } = Jt(t), c = Qt({});
4860
+ js(() => {
4861
+ var _;
4862
+ m(), t.loadFromLocalStorage(), a = ((_ = i.value) == null ? void 0 : _.length) + 1;
4863
+ }), Ys(() => {
4864
+ z(), C();
4865
+ }), Xs(() => {
4866
+ O(), t.unregisterGridProvider();
4867
+ });
4868
+ function m() {
4869
+ var _, y;
4870
+ t.DefaultLayout = (_ = e.options) == null ? void 0 : _.defaultLayout, t.setOptionServices((y = e.options) == null ? void 0 : y.services);
4902
4871
  }
4903
- function v() {
4904
- const m = {
4872
+ async function b() {
4873
+ if (t.resetGridLayout(), await Wi(), !!l) {
4874
+ l.batchUpdate(), l.removeAll();
4875
+ for (const _ of i.value) {
4876
+ const y = document.getElementById(_.id);
4877
+ if (!y) {
4878
+ console.warn("makeWidget: element not found for id", _.id);
4879
+ continue;
4880
+ }
4881
+ y.classList.add("grid-stack-item"), _.w != null && y.setAttribute("gs-w", String(_.w)), _.h != null && y.setAttribute("gs-h", String(_.h)), _.x != null && y.setAttribute("gs-x", String(_.x)), _.y != null && y.setAttribute("gs-y", String(_.y)), _.x == null && _.y == null && _.autoPosition && y.setAttribute("gs-auto-position", "true"), !y.gridstackNode && l.makeWidget(y);
4882
+ }
4883
+ l.commit();
4884
+ }
4885
+ }
4886
+ function z() {
4887
+ const _ = {
4905
4888
  float: !0,
4906
4889
  column: 12,
4907
4890
  cellHeight: "70px",
@@ -4912,168 +4895,181 @@ const Sn = { class: "tw-flex tw-flex-row tw-flex-wrap tw-gap-2" }, Cn = { class:
4912
4895
  handles: "e,se,s,sw,w,n"
4913
4896
  }
4914
4897
  };
4915
- l = T.init(m), t.registerGridProvider(() => l), l.setStatic(u.value);
4898
+ l = R.init(_), t.registerGridProvider(() => l), l.setStatic(u.value);
4916
4899
  }
4917
- ce(
4900
+ function O() {
4901
+ l && (l.destroy(!1), l = null);
4902
+ }
4903
+ fe(
4918
4904
  () => {
4919
- var m;
4920
- return (m = e.options) == null ? void 0 : m.availableWidgets;
4905
+ var _;
4906
+ return (_ = e.options) == null ? void 0 : _.availableWidgets;
4921
4907
  },
4922
- (m) => {
4923
- p.value = {}, h.value = [], m && m.forEach((y, P) => {
4924
- let U, pe;
4908
+ (_) => {
4909
+ p.value = {}, h.value = [], _ && _.forEach((y, T) => {
4910
+ let k, q;
4925
4911
  if (y && typeof y == "object" && "name" in y && "component" in y)
4926
- U = y.name, pe = y.component;
4912
+ k = y.name, q = y.component;
4927
4913
  else if (y && typeof y == "object" && "name" in y && "loader" in y)
4928
- U = y.name, pe = Ys(async () => {
4929
- const me = await y.loader();
4930
- return me.default ?? me;
4914
+ k = y.name, q = Zs(async () => {
4915
+ const P = await y.loader();
4916
+ return P.default ?? P;
4931
4917
  });
4932
4918
  else if (y && (typeof y == "function" || typeof y == "object"))
4933
- pe = y, U = y.name || `Widget${P + 1}`;
4919
+ q = y, k = y.name || `Widget${T + 1}`;
4934
4920
  else if (typeof y == "function")
4935
4921
  return;
4936
- !U || !pe || p.value[U] || (p.value[U] = pe, h.value.push(U));
4922
+ !k || !q || p.value[k] || (p.value[k] = q, h.value.push(k));
4937
4923
  });
4938
4924
  },
4939
4925
  { immediate: !0, deep: !0 }
4940
4926
  );
4941
- function L() {
4942
- const m = e.options.globalData;
4943
- if (m) {
4927
+ function C() {
4928
+ const _ = e.options.globalData;
4929
+ if (_) {
4944
4930
  t.clearOptionsDataItems();
4945
- for (const y in m)
4946
- t.addOptionsDataItems(y, m[y]);
4931
+ for (const y in _)
4932
+ t.addOptionsDataItems(y, _[y]);
4947
4933
  }
4948
4934
  }
4949
- ce(() => u.value, (m) => {
4950
- l.setStatic(m), r.value = m ? "Edit Grid" : "Save Grid";
4935
+ fe(() => u.value, (_) => {
4936
+ l.setStatic(_), r.value = _ ? "Edit Grid" : "Save Grid";
4951
4937
  });
4952
- function H(m) {
4953
- if (!m)
4938
+ function L(_) {
4939
+ if (!_)
4954
4940
  return;
4955
- const y = `${m}-${a}`, P = {
4941
+ const y = `${_}-${a}`, T = {
4956
4942
  id: y,
4957
4943
  w: 2,
4958
4944
  h: 6,
4959
4945
  autoPosition: !0,
4960
- component: p.value[m],
4961
- componentKey: m,
4962
- componentName: m,
4946
+ component: p.value[_],
4947
+ componentKey: _,
4948
+ componentName: _,
4963
4949
  Props: {}
4964
4950
  };
4965
- a++, i.value.push(P), Xs(() => {
4951
+ a++, i.value.push(T), Wi(() => {
4966
4952
  l == null || l.makeWidget(`#${y}`);
4967
4953
  });
4968
4954
  }
4969
- function C(m) {
4970
- var y = i.value.findIndex((U) => U.id == m);
4955
+ function A(_) {
4956
+ var y = i.value.findIndex((k) => k.id == _);
4971
4957
  i.value.splice(y, 1);
4972
- const P = `#${m}`;
4973
- l.removeWidget(P, !1);
4958
+ const T = `#${_}`;
4959
+ l.removeWidget(T, !1);
4974
4960
  }
4975
- function D({ id: m, isLocked: y }) {
4976
- const P = d[m];
4977
- P && l && l.update(P, {
4961
+ function E({ id: _, isLocked: y }) {
4962
+ const T = c[_];
4963
+ T && l && l.update(T, {
4978
4964
  locked: !y,
4979
4965
  noMove: !y,
4980
4966
  noResize: !y
4981
- }), t.toggleWidgetLock(m);
4967
+ }), t.toggleWidgetLock(_);
4982
4968
  }
4983
- function S() {
4984
- u.value = !u.value, u.value && t.saveToLocalStorage();
4969
+ function U() {
4970
+ u.value = !u.value, u.value;
4985
4971
  }
4986
- return (m, y) => {
4987
- const P = ie("el-button"), U = ie("el-option"), pe = ie("el-select"), me = ie("el-col");
4988
- return R(), $("div", Vn, [
4989
- m.hideHeader ? (R(), $("div", Yn, [
4990
- y[2] || (y[2] = We("x ", -1)),
4991
- z("span", Xn, [
4992
- X(P, {
4972
+ return (_, y) => {
4973
+ const T = ie("el-button"), k = ie("el-option"), q = ie("el-select"), P = ie("el-col");
4974
+ return S(), B("div", qn, [
4975
+ _.hideHeader ? (S(), B("div", Xn, [
4976
+ y[3] || (y[3] = Ae("x ", -1)),
4977
+ N("span", Zn, [
4978
+ Y(T, {
4993
4979
  class: "edit-button",
4994
- onClick: y[1] || (y[1] = (N) => S())
4980
+ onClick: y[1] || (y[1] = (M) => U())
4995
4981
  }, {
4996
- default: q(() => [
4997
- We(Ae(ue(r)), 1)
4982
+ default: V(() => [
4983
+ Ae(Re(he(r)), 1)
4998
4984
  ]),
4999
4985
  _: 1
5000
4986
  })
5001
4987
  ])
5002
- ])) : (R(), $("div", qn, [
5003
- z("span", jn, [
5004
- X(P, {
4988
+ ])) : (S(), B("div", jn, [
4989
+ N("span", Yn, [
4990
+ Y(T, {
5005
4991
  class: "edit-button",
5006
- onClick: y[0] || (y[0] = (N) => S())
4992
+ onClick: y[0] || (y[0] = (M) => U())
5007
4993
  }, {
5008
- default: q(() => [
5009
- We(Ae(ue(r)), 1)
4994
+ default: V(() => [
4995
+ Ae(Re(he(r)), 1)
5010
4996
  ]),
5011
4997
  _: 1
5012
4998
  })
5013
4999
  ]),
5014
- X(Nn)
5000
+ Y(Mn)
5015
5001
  ])),
5016
- ue(u) ? kt("", !0) : (R(), ae(me, { key: 2 }, {
5017
- default: q(() => [
5018
- z("div", Kn, [
5019
- X(pe, { placeholder: "Add New Widget" }, {
5020
- default: q(() => [
5021
- (R(!0), $(ze, null, it(h.value, (N) => (R(), ae(U, {
5022
- key: N,
5023
- label: N,
5024
- value: N,
5025
- onClick: (x) => H(N)
5002
+ he(u) ? kt("", !0) : (S(), le(P, { key: 2 }, {
5003
+ default: V(() => [
5004
+ N("div", Kn, [
5005
+ Y(q, { placeholder: "Add New Widget" }, {
5006
+ default: V(() => [
5007
+ (S(!0), B(Le, null, tt(h.value, (M) => (S(), le(k, {
5008
+ key: M,
5009
+ label: M,
5010
+ value: M,
5011
+ onClick: (Se) => L(M)
5026
5012
  }, null, 8, ["label", "value", "onClick"]))), 128))
5027
5013
  ]),
5028
5014
  _: 1
5029
- })
5015
+ }),
5016
+ N("div", Qn, [
5017
+ Y(T, {
5018
+ onClick: y[2] || (y[2] = (M) => b())
5019
+ }, {
5020
+ default: V(() => [...y[4] || (y[4] = [
5021
+ Ae("Reset Grid Layout", -1)
5022
+ ])]),
5023
+ _: 1
5024
+ })
5025
+ ])
5030
5026
  ])
5031
5027
  ]),
5032
5028
  _: 1
5033
5029
  })),
5034
- z("div", {
5030
+ N("div", {
5035
5031
  ref_key: "root",
5036
5032
  ref: n,
5037
5033
  class: "grid-stack tw-h-screen"
5038
5034
  }, [
5039
- (R(!0), $(ze, null, it(ue(i), (N) => {
5040
- var x, E, K, W;
5041
- return R(), $("div", {
5035
+ (S(!0), B(Le, null, tt(he(i), (M) => {
5036
+ var Se, Ie, ot, lt;
5037
+ return S(), B("div", {
5042
5038
  class: "grid-stack-item",
5043
5039
  ref_for: !0,
5044
- ref: (oe) => d[N.id] = oe,
5045
- "gs-x": N.x,
5046
- "gs-y": N.y,
5047
- "gs-w": N.w,
5048
- "gs-h": N.h,
5049
- "gs-id": N.id,
5050
- id: N.id,
5051
- key: N.id,
5052
- props: N.Props,
5053
- "gs-locked": (x = N.Props) == null ? void 0 : x.locked,
5054
- "gs-no-move": (E = N.Props) == null ? void 0 : E.locked,
5055
- "gs-no-resize": (K = N.Props) == null ? void 0 : K.locked
5040
+ ref: (at) => c[M.id] = at,
5041
+ "gs-x": M.x,
5042
+ "gs-y": M.y,
5043
+ "gs-w": M.w,
5044
+ "gs-h": M.h,
5045
+ "gs-id": M.id,
5046
+ id: M.id,
5047
+ key: M.id,
5048
+ props: M.Props,
5049
+ "gs-locked": (Se = M.Props) == null ? void 0 : Se.locked,
5050
+ "gs-no-move": (Ie = M.Props) == null ? void 0 : Ie.locked,
5051
+ "gs-no-resize": (ot = M.Props) == null ? void 0 : ot.locked
5056
5052
  }, [
5057
- X(Gn, {
5058
- widgetID: N.id,
5059
- onRemoveWidget: (oe) => C(N.id),
5060
- onToggleLock: D,
5061
- "static-mode": ue(u),
5062
- componentTag: N.component,
5063
- componentProperties: N.Props,
5064
- componentName: N.componentName,
5065
- hideWidgetsHeader: N.hideHeader,
5066
- "is-locked": (W = N.Props) == null ? void 0 : W.locked
5053
+ Y(Vn, {
5054
+ widgetID: M.id,
5055
+ onRemoveWidget: (at) => A(M.id),
5056
+ onToggleLock: E,
5057
+ "static-mode": he(u),
5058
+ componentTag: M.component,
5059
+ componentProperties: M.Props,
5060
+ componentName: M.componentName,
5061
+ hideWidgetsHeader: M.hideHeader,
5062
+ "is-locked": (lt = M.Props) == null ? void 0 : lt.locked
5067
5063
  }, null, 8, ["widgetID", "onRemoveWidget", "static-mode", "componentTag", "componentProperties", "componentName", "hideWidgetsHeader", "is-locked"])
5068
- ], 8, Zn);
5064
+ ], 8, Jn);
5069
5065
  }), 128))
5070
5066
  ], 512)
5071
5067
  ]);
5072
5068
  };
5073
5069
  }
5074
- }), no = /* @__PURE__ */ Me(Qn, [["__scopeId", "data-v-8526759f"]]);
5070
+ }), lo = /* @__PURE__ */ Ne(eo, [["__scopeId", "data-v-4ac6b9b5"]]);
5075
5071
  export {
5076
- ro as MarkdownWidget,
5077
- no as PennsieveDashboard,
5078
- so as TextWidget
5072
+ oo as MarkdownWidget,
5073
+ lo as PennsieveDashboard,
5074
+ no as TextWidget
5079
5075
  };