@eox/layercontrol 0.2.0 → 0.3.1

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.
@@ -0,0 +1,2158 @@
1
+ var wn = Object.defineProperty;
2
+ var Cn = (i, t, e) => t in i ? wn(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
+ var S = (i, t, e) => (Cn(i, typeof t != "symbol" ? t + "" : t, e), e);
4
+ /**
5
+ * @license
6
+ * Copyright 2019 Google LLC
7
+ * SPDX-License-Identifier: BSD-3-Clause
8
+ */
9
+ const Ut = window, we = Ut.ShadowRoot && (Ut.ShadyCSS === void 0 || Ut.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ke = Symbol(), Oe = /* @__PURE__ */ new WeakMap();
10
+ let Sn = class {
11
+ constructor(t, e, n) {
12
+ if (this._$cssResult$ = !0, n !== Ke)
13
+ throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
14
+ this.cssText = t, this.t = e;
15
+ }
16
+ get styleSheet() {
17
+ let t = this.o;
18
+ const e = this.t;
19
+ if (we && t === void 0) {
20
+ const n = e !== void 0 && e.length === 1;
21
+ n && (t = Oe.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && Oe.set(e, t));
22
+ }
23
+ return t;
24
+ }
25
+ toString() {
26
+ return this.cssText;
27
+ }
28
+ };
29
+ const An = (i) => new Sn(typeof i == "string" ? i : i + "", void 0, Ke), Dn = (i, t) => {
30
+ we ? i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
31
+ const n = document.createElement("style"), r = Ut.litNonce;
32
+ r !== void 0 && n.setAttribute("nonce", r), n.textContent = e.cssText, i.appendChild(n);
33
+ });
34
+ }, Pe = we ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
35
+ let e = "";
36
+ for (const n of t.cssRules)
37
+ e += n.cssText;
38
+ return An(e);
39
+ })(i) : i;
40
+ /**
41
+ * @license
42
+ * Copyright 2017 Google LLC
43
+ * SPDX-License-Identifier: BSD-3-Clause
44
+ */
45
+ var ie;
46
+ const Wt = window, Ie = Wt.trustedTypes, Tn = Ie ? Ie.emptyScript : "", Ne = Wt.reactiveElementPolyfillSupport, ve = { toAttribute(i, t) {
47
+ switch (t) {
48
+ case Boolean:
49
+ i = i ? Tn : null;
50
+ break;
51
+ case Object:
52
+ case Array:
53
+ i = i == null ? i : JSON.stringify(i);
54
+ }
55
+ return i;
56
+ }, fromAttribute(i, t) {
57
+ let e = i;
58
+ switch (t) {
59
+ case Boolean:
60
+ e = i !== null;
61
+ break;
62
+ case Number:
63
+ e = i === null ? null : Number(i);
64
+ break;
65
+ case Object:
66
+ case Array:
67
+ try {
68
+ e = JSON.parse(i);
69
+ } catch {
70
+ e = null;
71
+ }
72
+ }
73
+ return e;
74
+ } }, Je = (i, t) => t !== i && (t == t || i == i), re = { attribute: !0, type: String, converter: ve, reflect: !1, hasChanged: Je }, ye = "finalized";
75
+ let ut = class extends HTMLElement {
76
+ constructor() {
77
+ super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
78
+ }
79
+ static addInitializer(t) {
80
+ var e;
81
+ this.finalize(), ((e = this.h) !== null && e !== void 0 ? e : this.h = []).push(t);
82
+ }
83
+ static get observedAttributes() {
84
+ this.finalize();
85
+ const t = [];
86
+ return this.elementProperties.forEach((e, n) => {
87
+ const r = this._$Ep(n, e);
88
+ r !== void 0 && (this._$Ev.set(r, n), t.push(r));
89
+ }), t;
90
+ }
91
+ static createProperty(t, e = re) {
92
+ if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
93
+ const n = typeof t == "symbol" ? Symbol() : "__" + t, r = this.getPropertyDescriptor(t, n, e);
94
+ r !== void 0 && Object.defineProperty(this.prototype, t, r);
95
+ }
96
+ }
97
+ static getPropertyDescriptor(t, e, n) {
98
+ return { get() {
99
+ return this[e];
100
+ }, set(r) {
101
+ const o = this[t];
102
+ this[e] = r, this.requestUpdate(t, o, n);
103
+ }, configurable: !0, enumerable: !0 };
104
+ }
105
+ static getPropertyOptions(t) {
106
+ return this.elementProperties.get(t) || re;
107
+ }
108
+ static finalize() {
109
+ if (this.hasOwnProperty(ye))
110
+ return !1;
111
+ this[ye] = !0;
112
+ const t = Object.getPrototypeOf(this);
113
+ if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
114
+ const e = this.properties, n = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
115
+ for (const r of n)
116
+ this.createProperty(r, e[r]);
117
+ }
118
+ return this.elementStyles = this.finalizeStyles(this.styles), !0;
119
+ }
120
+ static finalizeStyles(t) {
121
+ const e = [];
122
+ if (Array.isArray(t)) {
123
+ const n = new Set(t.flat(1 / 0).reverse());
124
+ for (const r of n)
125
+ e.unshift(Pe(r));
126
+ } else
127
+ t !== void 0 && e.push(Pe(t));
128
+ return e;
129
+ }
130
+ static _$Ep(t, e) {
131
+ const n = e.attribute;
132
+ return n === !1 ? void 0 : typeof n == "string" ? n : typeof t == "string" ? t.toLowerCase() : void 0;
133
+ }
134
+ u() {
135
+ var t;
136
+ this._$E_ = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach((e) => e(this));
137
+ }
138
+ addController(t) {
139
+ var e, n;
140
+ ((e = this._$ES) !== null && e !== void 0 ? e : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((n = t.hostConnected) === null || n === void 0 || n.call(t));
141
+ }
142
+ removeController(t) {
143
+ var e;
144
+ (e = this._$ES) === null || e === void 0 || e.splice(this._$ES.indexOf(t) >>> 0, 1);
145
+ }
146
+ _$Eg() {
147
+ this.constructor.elementProperties.forEach((t, e) => {
148
+ this.hasOwnProperty(e) && (this._$Ei.set(e, this[e]), delete this[e]);
149
+ });
150
+ }
151
+ createRenderRoot() {
152
+ var t;
153
+ const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
154
+ return Dn(e, this.constructor.elementStyles), e;
155
+ }
156
+ connectedCallback() {
157
+ var t;
158
+ this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach((e) => {
159
+ var n;
160
+ return (n = e.hostConnected) === null || n === void 0 ? void 0 : n.call(e);
161
+ });
162
+ }
163
+ enableUpdating(t) {
164
+ }
165
+ disconnectedCallback() {
166
+ var t;
167
+ (t = this._$ES) === null || t === void 0 || t.forEach((e) => {
168
+ var n;
169
+ return (n = e.hostDisconnected) === null || n === void 0 ? void 0 : n.call(e);
170
+ });
171
+ }
172
+ attributeChangedCallback(t, e, n) {
173
+ this._$AK(t, n);
174
+ }
175
+ _$EO(t, e, n = re) {
176
+ var r;
177
+ const o = this.constructor._$Ep(t, n);
178
+ if (o !== void 0 && n.reflect === !0) {
179
+ const a = (((r = n.converter) === null || r === void 0 ? void 0 : r.toAttribute) !== void 0 ? n.converter : ve).toAttribute(e, n.type);
180
+ this._$El = t, a == null ? this.removeAttribute(o) : this.setAttribute(o, a), this._$El = null;
181
+ }
182
+ }
183
+ _$AK(t, e) {
184
+ var n;
185
+ const r = this.constructor, o = r._$Ev.get(t);
186
+ if (o !== void 0 && this._$El !== o) {
187
+ const a = r.getPropertyOptions(o), l = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((n = a.converter) === null || n === void 0 ? void 0 : n.fromAttribute) !== void 0 ? a.converter : ve;
188
+ this._$El = o, this[o] = l.fromAttribute(e, a.type), this._$El = null;
189
+ }
190
+ }
191
+ requestUpdate(t, e, n) {
192
+ let r = !0;
193
+ t !== void 0 && (((n = n || this.constructor.getPropertyOptions(t)).hasChanged || Je)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), n.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, n))) : r = !1), !this.isUpdatePending && r && (this._$E_ = this._$Ej());
194
+ }
195
+ async _$Ej() {
196
+ this.isUpdatePending = !0;
197
+ try {
198
+ await this._$E_;
199
+ } catch (e) {
200
+ Promise.reject(e);
201
+ }
202
+ const t = this.scheduleUpdate();
203
+ return t != null && await t, !this.isUpdatePending;
204
+ }
205
+ scheduleUpdate() {
206
+ return this.performUpdate();
207
+ }
208
+ performUpdate() {
209
+ var t;
210
+ if (!this.isUpdatePending)
211
+ return;
212
+ this.hasUpdated, this._$Ei && (this._$Ei.forEach((r, o) => this[o] = r), this._$Ei = void 0);
213
+ let e = !1;
214
+ const n = this._$AL;
215
+ try {
216
+ e = this.shouldUpdate(n), e ? (this.willUpdate(n), (t = this._$ES) === null || t === void 0 || t.forEach((r) => {
217
+ var o;
218
+ return (o = r.hostUpdate) === null || o === void 0 ? void 0 : o.call(r);
219
+ }), this.update(n)) : this._$Ek();
220
+ } catch (r) {
221
+ throw e = !1, this._$Ek(), r;
222
+ }
223
+ e && this._$AE(n);
224
+ }
225
+ willUpdate(t) {
226
+ }
227
+ _$AE(t) {
228
+ var e;
229
+ (e = this._$ES) === null || e === void 0 || e.forEach((n) => {
230
+ var r;
231
+ return (r = n.hostUpdated) === null || r === void 0 ? void 0 : r.call(n);
232
+ }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
233
+ }
234
+ _$Ek() {
235
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
236
+ }
237
+ get updateComplete() {
238
+ return this.getUpdateComplete();
239
+ }
240
+ getUpdateComplete() {
241
+ return this._$E_;
242
+ }
243
+ shouldUpdate(t) {
244
+ return !0;
245
+ }
246
+ update(t) {
247
+ this._$EC !== void 0 && (this._$EC.forEach((e, n) => this._$EO(n, this[n], e)), this._$EC = void 0), this._$Ek();
248
+ }
249
+ updated(t) {
250
+ }
251
+ firstUpdated(t) {
252
+ }
253
+ };
254
+ ut[ye] = !0, ut.elementProperties = /* @__PURE__ */ new Map(), ut.elementStyles = [], ut.shadowRootOptions = { mode: "open" }, Ne == null || Ne({ ReactiveElement: ut }), ((ie = Wt.reactiveElementVersions) !== null && ie !== void 0 ? ie : Wt.reactiveElementVersions = []).push("1.6.2");
255
+ /**
256
+ * @license
257
+ * Copyright 2017 Google LLC
258
+ * SPDX-License-Identifier: BSD-3-Clause
259
+ */
260
+ var oe;
261
+ const Yt = window, mt = Yt.trustedTypes, Me = mt ? mt.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, _e = "$lit$", q = `lit$${(Math.random() + "").slice(9)}$`, Qe = "?" + q, xn = `<${Qe}>`, st = document, Ot = () => st.createComment(""), Pt = (i) => i === null || typeof i != "object" && typeof i != "function", tn = Array.isArray, On = (i) => tn(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", ae = `[
262
+ \f\r]`, St = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, He = /-->/g, Le = />/g, nt = RegExp(`>|${ae}(?:([^\\s"'>=/]+)(${ae}*=${ae}*(?:[^
263
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), ke = /'/g, Re = /"/g, en = /^(?:script|style|textarea|title)$/i, Pn = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), L = Pn(1), vt = Symbol.for("lit-noChange"), $ = Symbol.for("lit-nothing"), Be = /* @__PURE__ */ new WeakMap(), at = st.createTreeWalker(st, 129, null, !1), In = (i, t) => {
264
+ const e = i.length - 1, n = [];
265
+ let r, o = t === 2 ? "<svg>" : "", a = St;
266
+ for (let s = 0; s < e; s++) {
267
+ const d = i[s];
268
+ let c, u, f = -1, _ = 0;
269
+ for (; _ < d.length && (a.lastIndex = _, u = a.exec(d), u !== null); )
270
+ _ = a.lastIndex, a === St ? u[1] === "!--" ? a = He : u[1] !== void 0 ? a = Le : u[2] !== void 0 ? (en.test(u[2]) && (r = RegExp("</" + u[2], "g")), a = nt) : u[3] !== void 0 && (a = nt) : a === nt ? u[0] === ">" ? (a = r ?? St, f = -1) : u[1] === void 0 ? f = -2 : (f = a.lastIndex - u[2].length, c = u[1], a = u[3] === void 0 ? nt : u[3] === '"' ? Re : ke) : a === Re || a === ke ? a = nt : a === He || a === Le ? a = St : (a = nt, r = void 0);
271
+ const y = a === nt && i[s + 1].startsWith("/>") ? " " : "";
272
+ o += a === St ? d + xn : f >= 0 ? (n.push(c), d.slice(0, f) + _e + d.slice(f) + q + y) : d + q + (f === -2 ? (n.push(void 0), s) : y);
273
+ }
274
+ const l = o + (i[e] || "<?>") + (t === 2 ? "</svg>" : "");
275
+ if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
276
+ throw Error("invalid template strings array");
277
+ return [Me !== void 0 ? Me.createHTML(l) : l, n];
278
+ };
279
+ class It {
280
+ constructor({ strings: t, _$litType$: e }, n) {
281
+ let r;
282
+ this.parts = [];
283
+ let o = 0, a = 0;
284
+ const l = t.length - 1, s = this.parts, [d, c] = In(t, e);
285
+ if (this.el = It.createElement(d, n), at.currentNode = this.el.content, e === 2) {
286
+ const u = this.el.content, f = u.firstChild;
287
+ f.remove(), u.append(...f.childNodes);
288
+ }
289
+ for (; (r = at.nextNode()) !== null && s.length < l; ) {
290
+ if (r.nodeType === 1) {
291
+ if (r.hasAttributes()) {
292
+ const u = [];
293
+ for (const f of r.getAttributeNames())
294
+ if (f.endsWith(_e) || f.startsWith(q)) {
295
+ const _ = c[a++];
296
+ if (u.push(f), _ !== void 0) {
297
+ const y = r.getAttribute(_.toLowerCase() + _e).split(q), v = /([.?@])?(.*)/.exec(_);
298
+ s.push({ type: 1, index: o, name: v[2], strings: y, ctor: v[1] === "." ? Mn : v[1] === "?" ? Ln : v[1] === "@" ? kn : Jt });
299
+ } else
300
+ s.push({ type: 6, index: o });
301
+ }
302
+ for (const f of u)
303
+ r.removeAttribute(f);
304
+ }
305
+ if (en.test(r.tagName)) {
306
+ const u = r.textContent.split(q), f = u.length - 1;
307
+ if (f > 0) {
308
+ r.textContent = mt ? mt.emptyScript : "";
309
+ for (let _ = 0; _ < f; _++)
310
+ r.append(u[_], Ot()), at.nextNode(), s.push({ type: 2, index: ++o });
311
+ r.append(u[f], Ot());
312
+ }
313
+ }
314
+ } else if (r.nodeType === 8)
315
+ if (r.data === Qe)
316
+ s.push({ type: 2, index: o });
317
+ else {
318
+ let u = -1;
319
+ for (; (u = r.data.indexOf(q, u + 1)) !== -1; )
320
+ s.push({ type: 7, index: o }), u += q.length - 1;
321
+ }
322
+ o++;
323
+ }
324
+ }
325
+ static createElement(t, e) {
326
+ const n = st.createElement("template");
327
+ return n.innerHTML = t, n;
328
+ }
329
+ }
330
+ function yt(i, t, e = i, n) {
331
+ var r, o, a, l;
332
+ if (t === vt)
333
+ return t;
334
+ let s = n !== void 0 ? (r = e._$Co) === null || r === void 0 ? void 0 : r[n] : e._$Cl;
335
+ const d = Pt(t) ? void 0 : t._$litDirective$;
336
+ return (s == null ? void 0 : s.constructor) !== d && ((o = s == null ? void 0 : s._$AO) === null || o === void 0 || o.call(s, !1), d === void 0 ? s = void 0 : (s = new d(i), s._$AT(i, e, n)), n !== void 0 ? ((a = (l = e)._$Co) !== null && a !== void 0 ? a : l._$Co = [])[n] = s : e._$Cl = s), s !== void 0 && (t = yt(i, s._$AS(i, t.values), s, n)), t;
337
+ }
338
+ class Nn {
339
+ constructor(t, e) {
340
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
341
+ }
342
+ get parentNode() {
343
+ return this._$AM.parentNode;
344
+ }
345
+ get _$AU() {
346
+ return this._$AM._$AU;
347
+ }
348
+ u(t) {
349
+ var e;
350
+ const { el: { content: n }, parts: r } = this._$AD, o = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : st).importNode(n, !0);
351
+ at.currentNode = o;
352
+ let a = at.nextNode(), l = 0, s = 0, d = r[0];
353
+ for (; d !== void 0; ) {
354
+ if (l === d.index) {
355
+ let c;
356
+ d.type === 2 ? c = new Nt(a, a.nextSibling, this, t) : d.type === 1 ? c = new d.ctor(a, d.name, d.strings, this, t) : d.type === 6 && (c = new Rn(a, this, t)), this._$AV.push(c), d = r[++s];
357
+ }
358
+ l !== (d == null ? void 0 : d.index) && (a = at.nextNode(), l++);
359
+ }
360
+ return at.currentNode = st, o;
361
+ }
362
+ v(t) {
363
+ let e = 0;
364
+ for (const n of this._$AV)
365
+ n !== void 0 && (n.strings !== void 0 ? (n._$AI(t, n, e), e += n.strings.length - 2) : n._$AI(t[e])), e++;
366
+ }
367
+ }
368
+ class Nt {
369
+ constructor(t, e, n, r) {
370
+ var o;
371
+ this.type = 2, this._$AH = $, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = n, this.options = r, this._$Cp = (o = r == null ? void 0 : r.isConnected) === null || o === void 0 || o;
372
+ }
373
+ get _$AU() {
374
+ var t, e;
375
+ return (e = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && e !== void 0 ? e : this._$Cp;
376
+ }
377
+ get parentNode() {
378
+ let t = this._$AA.parentNode;
379
+ const e = this._$AM;
380
+ return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
381
+ }
382
+ get startNode() {
383
+ return this._$AA;
384
+ }
385
+ get endNode() {
386
+ return this._$AB;
387
+ }
388
+ _$AI(t, e = this) {
389
+ t = yt(this, t, e), Pt(t) ? t === $ || t == null || t === "" ? (this._$AH !== $ && this._$AR(), this._$AH = $) : t !== this._$AH && t !== vt && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : On(t) ? this.T(t) : this._(t);
390
+ }
391
+ k(t) {
392
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
393
+ }
394
+ $(t) {
395
+ this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
396
+ }
397
+ _(t) {
398
+ this._$AH !== $ && Pt(this._$AH) ? this._$AA.nextSibling.data = t : this.$(st.createTextNode(t)), this._$AH = t;
399
+ }
400
+ g(t) {
401
+ var e;
402
+ const { values: n, _$litType$: r } = t, o = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = It.createElement(r.h, this.options)), r);
403
+ if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === o)
404
+ this._$AH.v(n);
405
+ else {
406
+ const a = new Nn(o, this), l = a.u(this.options);
407
+ a.v(n), this.$(l), this._$AH = a;
408
+ }
409
+ }
410
+ _$AC(t) {
411
+ let e = Be.get(t.strings);
412
+ return e === void 0 && Be.set(t.strings, e = new It(t)), e;
413
+ }
414
+ T(t) {
415
+ tn(this._$AH) || (this._$AH = [], this._$AR());
416
+ const e = this._$AH;
417
+ let n, r = 0;
418
+ for (const o of t)
419
+ r === e.length ? e.push(n = new Nt(this.k(Ot()), this.k(Ot()), this, this.options)) : n = e[r], n._$AI(o), r++;
420
+ r < e.length && (this._$AR(n && n._$AB.nextSibling, r), e.length = r);
421
+ }
422
+ _$AR(t = this._$AA.nextSibling, e) {
423
+ var n;
424
+ for ((n = this._$AP) === null || n === void 0 || n.call(this, !1, !0, e); t && t !== this._$AB; ) {
425
+ const r = t.nextSibling;
426
+ t.remove(), t = r;
427
+ }
428
+ }
429
+ setConnected(t) {
430
+ var e;
431
+ this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
432
+ }
433
+ }
434
+ class Jt {
435
+ constructor(t, e, n, r, o) {
436
+ this.type = 1, this._$AH = $, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = o, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(new String()), this.strings = n) : this._$AH = $;
437
+ }
438
+ get tagName() {
439
+ return this.element.tagName;
440
+ }
441
+ get _$AU() {
442
+ return this._$AM._$AU;
443
+ }
444
+ _$AI(t, e = this, n, r) {
445
+ const o = this.strings;
446
+ let a = !1;
447
+ if (o === void 0)
448
+ t = yt(this, t, e, 0), a = !Pt(t) || t !== this._$AH && t !== vt, a && (this._$AH = t);
449
+ else {
450
+ const l = t;
451
+ let s, d;
452
+ for (t = o[0], s = 0; s < o.length - 1; s++)
453
+ d = yt(this, l[n + s], e, s), d === vt && (d = this._$AH[s]), a || (a = !Pt(d) || d !== this._$AH[s]), d === $ ? t = $ : t !== $ && (t += (d ?? "") + o[s + 1]), this._$AH[s] = d;
454
+ }
455
+ a && !r && this.j(t);
456
+ }
457
+ j(t) {
458
+ t === $ ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
459
+ }
460
+ }
461
+ class Mn extends Jt {
462
+ constructor() {
463
+ super(...arguments), this.type = 3;
464
+ }
465
+ j(t) {
466
+ this.element[this.name] = t === $ ? void 0 : t;
467
+ }
468
+ }
469
+ const Hn = mt ? mt.emptyScript : "";
470
+ class Ln extends Jt {
471
+ constructor() {
472
+ super(...arguments), this.type = 4;
473
+ }
474
+ j(t) {
475
+ t && t !== $ ? this.element.setAttribute(this.name, Hn) : this.element.removeAttribute(this.name);
476
+ }
477
+ }
478
+ class kn extends Jt {
479
+ constructor(t, e, n, r, o) {
480
+ super(t, e, n, r, o), this.type = 5;
481
+ }
482
+ _$AI(t, e = this) {
483
+ var n;
484
+ if ((t = (n = yt(this, t, e, 0)) !== null && n !== void 0 ? n : $) === vt)
485
+ return;
486
+ const r = this._$AH, o = t === $ && r !== $ || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, a = t !== $ && (r === $ || o);
487
+ o && this.element.removeEventListener(this.name, this, r), a && this.element.addEventListener(this.name, this, t), this._$AH = t;
488
+ }
489
+ handleEvent(t) {
490
+ var e, n;
491
+ typeof this._$AH == "function" ? this._$AH.call((n = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && n !== void 0 ? n : this.element, t) : this._$AH.handleEvent(t);
492
+ }
493
+ }
494
+ class Rn {
495
+ constructor(t, e, n) {
496
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = n;
497
+ }
498
+ get _$AU() {
499
+ return this._$AM._$AU;
500
+ }
501
+ _$AI(t) {
502
+ yt(this, t);
503
+ }
504
+ }
505
+ const Ue = Yt.litHtmlPolyfillSupport;
506
+ Ue == null || Ue(It, Nt), ((oe = Yt.litHtmlVersions) !== null && oe !== void 0 ? oe : Yt.litHtmlVersions = []).push("2.7.4");
507
+ const Bn = (i, t, e) => {
508
+ var n, r;
509
+ const o = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : t;
510
+ let a = o._$litPart$;
511
+ if (a === void 0) {
512
+ const l = (r = e == null ? void 0 : e.renderBefore) !== null && r !== void 0 ? r : null;
513
+ o._$litPart$ = a = new Nt(t.insertBefore(Ot(), l), l, void 0, e ?? {});
514
+ }
515
+ return a._$AI(i), a;
516
+ };
517
+ /**
518
+ * @license
519
+ * Copyright 2017 Google LLC
520
+ * SPDX-License-Identifier: BSD-3-Clause
521
+ */
522
+ var se, le;
523
+ class pt extends ut {
524
+ constructor() {
525
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
526
+ }
527
+ createRenderRoot() {
528
+ var t, e;
529
+ const n = super.createRenderRoot();
530
+ return (t = (e = this.renderOptions).renderBefore) !== null && t !== void 0 || (e.renderBefore = n.firstChild), n;
531
+ }
532
+ update(t) {
533
+ const e = this.render();
534
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Bn(e, this.renderRoot, this.renderOptions);
535
+ }
536
+ connectedCallback() {
537
+ var t;
538
+ super.connectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!0);
539
+ }
540
+ disconnectedCallback() {
541
+ var t;
542
+ super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
543
+ }
544
+ render() {
545
+ return vt;
546
+ }
547
+ }
548
+ pt.finalized = !0, pt._$litElement$ = !0, (se = globalThis.litElementHydrateSupport) === null || se === void 0 || se.call(globalThis, { LitElement: pt });
549
+ const Ve = globalThis.litElementPolyfillSupport;
550
+ Ve == null || Ve({ LitElement: pt });
551
+ ((le = globalThis.litElementVersions) !== null && le !== void 0 ? le : globalThis.litElementVersions = []).push("3.3.2");
552
+ /**
553
+ * @license
554
+ * Copyright 2017 Google LLC
555
+ * SPDX-License-Identifier: BSD-3-Clause
556
+ */
557
+ const nn = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.define(e, n), n))(i, t) : ((e, n) => {
558
+ const { kind: r, elements: o } = n;
559
+ return { kind: r, elements: o, finisher(a) {
560
+ customElements.define(e, a);
561
+ } };
562
+ })(i, t);
563
+ /**
564
+ * @license
565
+ * Copyright 2017 Google LLC
566
+ * SPDX-License-Identifier: BSD-3-Clause
567
+ */
568
+ const Un = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
569
+ e.createProperty(t.key, i);
570
+ } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
571
+ typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
572
+ }, finisher(e) {
573
+ e.createProperty(t.key, i);
574
+ } }, Vn = (i, t, e) => {
575
+ t.constructor.createProperty(e, i);
576
+ };
577
+ function R(i) {
578
+ return (t, e) => e !== void 0 ? Vn(i, t, e) : Un(i, t);
579
+ }
580
+ /**
581
+ * @license
582
+ * Copyright 2017 Google LLC
583
+ * SPDX-License-Identifier: BSD-3-Clause
584
+ */
585
+ function bt(i) {
586
+ return R({ ...i, state: !0 });
587
+ }
588
+ /**
589
+ * @license
590
+ * Copyright 2021 Google LLC
591
+ * SPDX-License-Identifier: BSD-3-Clause
592
+ */
593
+ var de;
594
+ ((de = window.HTMLSlotElement) === null || de === void 0 ? void 0 : de.prototype.assignedElements) != null;
595
+ /**
596
+ * @license
597
+ * Copyright 2021 Google LLC
598
+ * SPDX-License-Identifier: BSD-3-Clause
599
+ */
600
+ function* be(i, t) {
601
+ if (i !== void 0) {
602
+ let e = 0;
603
+ for (const n of i)
604
+ yield t(n, e++);
605
+ }
606
+ }
607
+ /**
608
+ * @license
609
+ * Copyright 2021 Google LLC
610
+ * SPDX-License-Identifier: BSD-3-Clause
611
+ */
612
+ function rn(i, t, e) {
613
+ return i ? t() : e == null ? void 0 : e();
614
+ }
615
+ /**!
616
+ * Sortable 1.15.0
617
+ * @author RubaXa <trash@rubaxa.org>
618
+ * @author owenm <owen23355@gmail.com>
619
+ * @license MIT
620
+ */
621
+ function ze(i, t) {
622
+ var e = Object.keys(i);
623
+ if (Object.getOwnPropertySymbols) {
624
+ var n = Object.getOwnPropertySymbols(i);
625
+ t && (n = n.filter(function(r) {
626
+ return Object.getOwnPropertyDescriptor(i, r).enumerable;
627
+ })), e.push.apply(e, n);
628
+ }
629
+ return e;
630
+ }
631
+ function j(i) {
632
+ for (var t = 1; t < arguments.length; t++) {
633
+ var e = arguments[t] != null ? arguments[t] : {};
634
+ t % 2 ? ze(Object(e), !0).forEach(function(n) {
635
+ zn(i, n, e[n]);
636
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(e)) : ze(Object(e)).forEach(function(n) {
637
+ Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(e, n));
638
+ });
639
+ }
640
+ return i;
641
+ }
642
+ function Vt(i) {
643
+ "@babel/helpers - typeof";
644
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Vt = function(t) {
645
+ return typeof t;
646
+ } : Vt = function(t) {
647
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
648
+ }, Vt(i);
649
+ }
650
+ function zn(i, t, e) {
651
+ return t in i ? Object.defineProperty(i, t, {
652
+ value: e,
653
+ enumerable: !0,
654
+ configurable: !0,
655
+ writable: !0
656
+ }) : i[t] = e, i;
657
+ }
658
+ function J() {
659
+ return J = Object.assign || function(i) {
660
+ for (var t = 1; t < arguments.length; t++) {
661
+ var e = arguments[t];
662
+ for (var n in e)
663
+ Object.prototype.hasOwnProperty.call(e, n) && (i[n] = e[n]);
664
+ }
665
+ return i;
666
+ }, J.apply(this, arguments);
667
+ }
668
+ function jn(i, t) {
669
+ if (i == null)
670
+ return {};
671
+ var e = {}, n = Object.keys(i), r, o;
672
+ for (o = 0; o < n.length; o++)
673
+ r = n[o], !(t.indexOf(r) >= 0) && (e[r] = i[r]);
674
+ return e;
675
+ }
676
+ function Fn(i, t) {
677
+ if (i == null)
678
+ return {};
679
+ var e = jn(i, t), n, r;
680
+ if (Object.getOwnPropertySymbols) {
681
+ var o = Object.getOwnPropertySymbols(i);
682
+ for (r = 0; r < o.length; r++)
683
+ n = o[r], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(i, n) && (e[n] = i[n]);
684
+ }
685
+ return e;
686
+ }
687
+ var Xn = "1.15.0";
688
+ function W(i) {
689
+ if (typeof window < "u" && window.navigator)
690
+ return !!/* @__PURE__ */ navigator.userAgent.match(i);
691
+ }
692
+ var Q = W(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Qt = W(/Edge/i), je = W(/firefox/i), zt = W(/safari/i) && !W(/chrome/i) && !W(/android/i), on = W(/iP(ad|od|hone)/i), an = W(/chrome/i) && W(/android/i), sn = {
693
+ capture: !1,
694
+ passive: !1
695
+ };
696
+ function E(i, t, e) {
697
+ i.addEventListener(t, e, !Q && sn);
698
+ }
699
+ function b(i, t, e) {
700
+ i.removeEventListener(t, e, !Q && sn);
701
+ }
702
+ function Gt(i, t) {
703
+ if (t) {
704
+ if (t[0] === ">" && (t = t.substring(1)), i)
705
+ try {
706
+ if (i.matches)
707
+ return i.matches(t);
708
+ if (i.msMatchesSelector)
709
+ return i.msMatchesSelector(t);
710
+ if (i.webkitMatchesSelector)
711
+ return i.webkitMatchesSelector(t);
712
+ } catch {
713
+ return !1;
714
+ }
715
+ return !1;
716
+ }
717
+ }
718
+ function Wn(i) {
719
+ return i.host && i !== document && i.host.nodeType ? i.host : i.parentNode;
720
+ }
721
+ function z(i, t, e, n) {
722
+ if (i) {
723
+ e = e || document;
724
+ do {
725
+ if (t != null && (t[0] === ">" ? i.parentNode === e && Gt(i, t) : Gt(i, t)) || n && i === e)
726
+ return i;
727
+ if (i === e)
728
+ break;
729
+ } while (i = Wn(i));
730
+ }
731
+ return null;
732
+ }
733
+ var Fe = /\s+/g;
734
+ function M(i, t, e) {
735
+ if (i && t)
736
+ if (i.classList)
737
+ i.classList[e ? "add" : "remove"](t);
738
+ else {
739
+ var n = (" " + i.className + " ").replace(Fe, " ").replace(" " + t + " ", " ");
740
+ i.className = (n + (e ? " " + t : "")).replace(Fe, " ");
741
+ }
742
+ }
743
+ function p(i, t, e) {
744
+ var n = i && i.style;
745
+ if (n) {
746
+ if (e === void 0)
747
+ return document.defaultView && document.defaultView.getComputedStyle ? e = document.defaultView.getComputedStyle(i, "") : i.currentStyle && (e = i.currentStyle), t === void 0 ? e : e[t];
748
+ !(t in n) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), n[t] = e + (typeof e == "string" ? "" : "px");
749
+ }
750
+ }
751
+ function gt(i, t) {
752
+ var e = "";
753
+ if (typeof i == "string")
754
+ e = i;
755
+ else
756
+ do {
757
+ var n = p(i, "transform");
758
+ n && n !== "none" && (e = n + " " + e);
759
+ } while (!t && (i = i.parentNode));
760
+ var r = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
761
+ return r && new r(e);
762
+ }
763
+ function ln(i, t, e) {
764
+ if (i) {
765
+ var n = i.getElementsByTagName(t), r = 0, o = n.length;
766
+ if (e)
767
+ for (; r < o; r++)
768
+ e(n[r], r);
769
+ return n;
770
+ }
771
+ return [];
772
+ }
773
+ function K() {
774
+ var i = document.scrollingElement;
775
+ return i || document.documentElement;
776
+ }
777
+ function T(i, t, e, n, r) {
778
+ if (!(!i.getBoundingClientRect && i !== window)) {
779
+ var o, a, l, s, d, c, u;
780
+ if (i !== window && i.parentNode && i !== K() ? (o = i.getBoundingClientRect(), a = o.top, l = o.left, s = o.bottom, d = o.right, c = o.height, u = o.width) : (a = 0, l = 0, s = window.innerHeight, d = window.innerWidth, c = window.innerHeight, u = window.innerWidth), (t || e) && i !== window && (r = r || i.parentNode, !Q))
781
+ do
782
+ if (r && r.getBoundingClientRect && (p(r, "transform") !== "none" || e && p(r, "position") !== "static")) {
783
+ var f = r.getBoundingClientRect();
784
+ a -= f.top + parseInt(p(r, "border-top-width")), l -= f.left + parseInt(p(r, "border-left-width")), s = a + o.height, d = l + o.width;
785
+ break;
786
+ }
787
+ while (r = r.parentNode);
788
+ if (n && i !== window) {
789
+ var _ = gt(r || i), y = _ && _.a, v = _ && _.d;
790
+ _ && (a /= v, l /= y, u /= y, c /= v, s = a + c, d = l + u);
791
+ }
792
+ return {
793
+ top: a,
794
+ left: l,
795
+ bottom: s,
796
+ right: d,
797
+ width: u,
798
+ height: c
799
+ };
800
+ }
801
+ }
802
+ function Xe(i, t, e) {
803
+ for (var n = Ye(i, !0), r = T(i)[t]; n; ) {
804
+ var o = T(n)[e], a = void 0;
805
+ if (e === "top" || e === "left" ? a = r >= o : a = r <= o, !a)
806
+ return n;
807
+ if (n === K())
808
+ break;
809
+ n = Ye(n, !1);
810
+ }
811
+ return !1;
812
+ }
813
+ function _t(i, t, e, n) {
814
+ for (var r = 0, o = 0, a = i.children; o < a.length; ) {
815
+ if (a[o].style.display !== "none" && a[o] !== g.ghost && (n || a[o] !== g.dragged) && z(a[o], e.draggable, i, !1)) {
816
+ if (r === t)
817
+ return a[o];
818
+ r++;
819
+ }
820
+ o++;
821
+ }
822
+ return null;
823
+ }
824
+ function Ce(i, t) {
825
+ for (var e = i.lastElementChild; e && (e === g.ghost || p(e, "display") === "none" || t && !Gt(e, t)); )
826
+ e = e.previousElementSibling;
827
+ return e || null;
828
+ }
829
+ function B(i, t) {
830
+ var e = 0;
831
+ if (!i || !i.parentNode)
832
+ return -1;
833
+ for (; i = i.previousElementSibling; )
834
+ i.nodeName.toUpperCase() !== "TEMPLATE" && i !== g.clone && (!t || Gt(i, t)) && e++;
835
+ return e;
836
+ }
837
+ function We(i) {
838
+ var t = 0, e = 0, n = K();
839
+ if (i)
840
+ do {
841
+ var r = gt(i), o = r.a, a = r.d;
842
+ t += i.scrollLeft * o, e += i.scrollTop * a;
843
+ } while (i !== n && (i = i.parentNode));
844
+ return [t, e];
845
+ }
846
+ function Yn(i, t) {
847
+ for (var e in i)
848
+ if (i.hasOwnProperty(e)) {
849
+ for (var n in t)
850
+ if (t.hasOwnProperty(n) && t[n] === i[e][n])
851
+ return Number(e);
852
+ }
853
+ return -1;
854
+ }
855
+ function Ye(i, t) {
856
+ if (!i || !i.getBoundingClientRect)
857
+ return K();
858
+ var e = i, n = !1;
859
+ do
860
+ if (e.clientWidth < e.scrollWidth || e.clientHeight < e.scrollHeight) {
861
+ var r = p(e);
862
+ if (e.clientWidth < e.scrollWidth && (r.overflowX == "auto" || r.overflowX == "scroll") || e.clientHeight < e.scrollHeight && (r.overflowY == "auto" || r.overflowY == "scroll")) {
863
+ if (!e.getBoundingClientRect || e === document.body)
864
+ return K();
865
+ if (n || t)
866
+ return e;
867
+ n = !0;
868
+ }
869
+ }
870
+ while (e = e.parentNode);
871
+ return K();
872
+ }
873
+ function Gn(i, t) {
874
+ if (i && t)
875
+ for (var e in t)
876
+ t.hasOwnProperty(e) && (i[e] = t[e]);
877
+ return i;
878
+ }
879
+ function he(i, t) {
880
+ return Math.round(i.top) === Math.round(t.top) && Math.round(i.left) === Math.round(t.left) && Math.round(i.height) === Math.round(t.height) && Math.round(i.width) === Math.round(t.width);
881
+ }
882
+ var ue;
883
+ function qn(i, t) {
884
+ return function() {
885
+ if (!ue) {
886
+ var e = arguments, n = this;
887
+ e.length === 1 ? i.call(n, e[0]) : i.apply(n, e), ue = setTimeout(function() {
888
+ ue = void 0;
889
+ }, t);
890
+ }
891
+ };
892
+ }
893
+ function Zn(i, t, e) {
894
+ i.scrollLeft += t, i.scrollTop += e;
895
+ }
896
+ function dn(i) {
897
+ var t = window.Polymer, e = window.jQuery || window.Zepto;
898
+ return t && t.dom ? t.dom(i).cloneNode(!0) : e ? e(i).clone(!0)[0] : i.cloneNode(!0);
899
+ }
900
+ var U = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
901
+ function Kn() {
902
+ var i = [], t;
903
+ return {
904
+ captureAnimationState: function() {
905
+ if (i = [], !!this.options.animation) {
906
+ var n = [].slice.call(this.el.children);
907
+ n.forEach(function(r) {
908
+ if (!(p(r, "display") === "none" || r === g.ghost)) {
909
+ i.push({
910
+ target: r,
911
+ rect: T(r)
912
+ });
913
+ var o = j({}, i[i.length - 1].rect);
914
+ if (r.thisAnimationDuration) {
915
+ var a = gt(r, !0);
916
+ a && (o.top -= a.f, o.left -= a.e);
917
+ }
918
+ r.fromRect = o;
919
+ }
920
+ });
921
+ }
922
+ },
923
+ addAnimationState: function(n) {
924
+ i.push(n);
925
+ },
926
+ removeAnimationState: function(n) {
927
+ i.splice(Yn(i, {
928
+ target: n
929
+ }), 1);
930
+ },
931
+ animateAll: function(n) {
932
+ var r = this;
933
+ if (!this.options.animation) {
934
+ clearTimeout(t), typeof n == "function" && n();
935
+ return;
936
+ }
937
+ var o = !1, a = 0;
938
+ i.forEach(function(l) {
939
+ var s = 0, d = l.target, c = d.fromRect, u = T(d), f = d.prevFromRect, _ = d.prevToRect, y = l.rect, v = gt(d, !0);
940
+ v && (u.top -= v.f, u.left -= v.e), d.toRect = u, d.thisAnimationDuration && he(f, u) && !he(c, u) && // Make sure animatingRect is on line between toRect & fromRect
941
+ (y.top - u.top) / (y.left - u.left) === (c.top - u.top) / (c.left - u.left) && (s = Qn(y, f, _, r.options)), he(u, c) || (d.prevFromRect = c, d.prevToRect = u, s || (s = r.options.animation), r.animate(d, y, u, s)), s && (o = !0, a = Math.max(a, s), clearTimeout(d.animationResetTimer), d.animationResetTimer = setTimeout(function() {
942
+ d.animationTime = 0, d.prevFromRect = null, d.fromRect = null, d.prevToRect = null, d.thisAnimationDuration = null;
943
+ }, s), d.thisAnimationDuration = s);
944
+ }), clearTimeout(t), o ? t = setTimeout(function() {
945
+ typeof n == "function" && n();
946
+ }, a) : typeof n == "function" && n(), i = [];
947
+ },
948
+ animate: function(n, r, o, a) {
949
+ if (a) {
950
+ p(n, "transition", ""), p(n, "transform", "");
951
+ var l = gt(this.el), s = l && l.a, d = l && l.d, c = (r.left - o.left) / (s || 1), u = (r.top - o.top) / (d || 1);
952
+ n.animatingX = !!c, n.animatingY = !!u, p(n, "transform", "translate3d(" + c + "px," + u + "px,0)"), this.forRepaintDummy = Jn(n), p(n, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), p(n, "transform", "translate3d(0,0,0)"), typeof n.animated == "number" && clearTimeout(n.animated), n.animated = setTimeout(function() {
953
+ p(n, "transition", ""), p(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
954
+ }, a);
955
+ }
956
+ }
957
+ };
958
+ }
959
+ function Jn(i) {
960
+ return i.offsetWidth;
961
+ }
962
+ function Qn(i, t, e, n) {
963
+ return Math.sqrt(Math.pow(t.top - i.top, 2) + Math.pow(t.left - i.left, 2)) / Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.left, 2)) * n.animation;
964
+ }
965
+ var dt = [], ce = {
966
+ initializeByDefault: !0
967
+ }, Mt = {
968
+ mount: function(t) {
969
+ for (var e in ce)
970
+ ce.hasOwnProperty(e) && !(e in t) && (t[e] = ce[e]);
971
+ dt.forEach(function(n) {
972
+ if (n.pluginName === t.pluginName)
973
+ throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
974
+ }), dt.push(t);
975
+ },
976
+ pluginEvent: function(t, e, n) {
977
+ var r = this;
978
+ this.eventCanceled = !1, n.cancel = function() {
979
+ r.eventCanceled = !0;
980
+ };
981
+ var o = t + "Global";
982
+ dt.forEach(function(a) {
983
+ e[a.pluginName] && (e[a.pluginName][o] && e[a.pluginName][o](j({
984
+ sortable: e
985
+ }, n)), e.options[a.pluginName] && e[a.pluginName][t] && e[a.pluginName][t](j({
986
+ sortable: e
987
+ }, n)));
988
+ });
989
+ },
990
+ initializePlugins: function(t, e, n, r) {
991
+ dt.forEach(function(l) {
992
+ var s = l.pluginName;
993
+ if (!(!t.options[s] && !l.initializeByDefault)) {
994
+ var d = new l(t, e, t.options);
995
+ d.sortable = t, d.options = t.options, t[s] = d, J(n, d.defaults);
996
+ }
997
+ });
998
+ for (var o in t.options)
999
+ if (t.options.hasOwnProperty(o)) {
1000
+ var a = this.modifyOption(t, o, t.options[o]);
1001
+ typeof a < "u" && (t.options[o] = a);
1002
+ }
1003
+ },
1004
+ getEventProperties: function(t, e) {
1005
+ var n = {};
1006
+ return dt.forEach(function(r) {
1007
+ typeof r.eventProperties == "function" && J(n, r.eventProperties.call(e[r.pluginName], t));
1008
+ }), n;
1009
+ },
1010
+ modifyOption: function(t, e, n) {
1011
+ var r;
1012
+ return dt.forEach(function(o) {
1013
+ t[o.pluginName] && o.optionListeners && typeof o.optionListeners[e] == "function" && (r = o.optionListeners[e].call(t[o.pluginName], n));
1014
+ }), r;
1015
+ }
1016
+ };
1017
+ function ti(i) {
1018
+ var t = i.sortable, e = i.rootEl, n = i.name, r = i.targetEl, o = i.cloneEl, a = i.toEl, l = i.fromEl, s = i.oldIndex, d = i.newIndex, c = i.oldDraggableIndex, u = i.newDraggableIndex, f = i.originalEvent, _ = i.putSortable, y = i.extraEventProperties;
1019
+ if (t = t || e && e[U], !!t) {
1020
+ var v, F = t.options, tt = "on" + n.charAt(0).toUpperCase() + n.substr(1);
1021
+ window.CustomEvent && !Q && !Qt ? v = new CustomEvent(n, {
1022
+ bubbles: !0,
1023
+ cancelable: !0
1024
+ }) : (v = document.createEvent("Event"), v.initEvent(n, !0, !0)), v.to = a || e, v.from = l || e, v.item = r || e, v.clone = o, v.oldIndex = s, v.newIndex = d, v.oldDraggableIndex = c, v.newDraggableIndex = u, v.originalEvent = f, v.pullMode = _ ? _.lastPutMode : void 0;
1025
+ var N = j(j({}, y), Mt.getEventProperties(n, t));
1026
+ for (var et in N)
1027
+ v[et] = N[et];
1028
+ e && e.dispatchEvent(v), F[tt] && F[tt].call(t, v);
1029
+ }
1030
+ }
1031
+ var ei = ["evt"], I = function(t, e) {
1032
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, o = Fn(n, ei);
1033
+ Mt.pluginEvent.bind(g)(t, e, j({
1034
+ dragEl: h,
1035
+ parentEl: A,
1036
+ ghostEl: m,
1037
+ rootEl: w,
1038
+ nextEl: ot,
1039
+ lastDownEl: jt,
1040
+ cloneEl: C,
1041
+ cloneHidden: Z,
1042
+ dragStarted: At,
1043
+ putSortable: x,
1044
+ activeSortable: g.active,
1045
+ originalEvent: r,
1046
+ oldIndex: ft,
1047
+ oldDraggableIndex: Dt,
1048
+ newIndex: H,
1049
+ newDraggableIndex: G,
1050
+ hideGhostForTarget: fn,
1051
+ unhideGhostForTarget: pn,
1052
+ cloneNowHidden: function() {
1053
+ Z = !0;
1054
+ },
1055
+ cloneNowShown: function() {
1056
+ Z = !1;
1057
+ },
1058
+ dispatchSortableEvent: function(l) {
1059
+ P({
1060
+ sortable: e,
1061
+ name: l,
1062
+ originalEvent: r
1063
+ });
1064
+ }
1065
+ }, o));
1066
+ };
1067
+ function P(i) {
1068
+ ti(j({
1069
+ putSortable: x,
1070
+ cloneEl: C,
1071
+ targetEl: h,
1072
+ rootEl: w,
1073
+ oldIndex: ft,
1074
+ oldDraggableIndex: Dt,
1075
+ newIndex: H,
1076
+ newDraggableIndex: G
1077
+ }, i));
1078
+ }
1079
+ var h, A, m, w, ot, jt, C, Z, ft, H, Dt, G, Lt, x, ct = !1, qt = !1, Zt = [], it, V, fe, pe, Ge, qe, At, ht, Tt, xt = !1, kt = !1, Ft, O, ge = [], Ee = !1, Kt = [], te = typeof document < "u", Rt = on, Ze = Qt || Q ? "cssFloat" : "float", ni = te && !an && !on && "draggable" in document.createElement("div"), hn = function() {
1080
+ if (te) {
1081
+ if (Q)
1082
+ return !1;
1083
+ var i = document.createElement("x");
1084
+ return i.style.cssText = "pointer-events:auto", i.style.pointerEvents === "auto";
1085
+ }
1086
+ }(), un = function(t, e) {
1087
+ var n = p(t), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), o = _t(t, 0, e), a = _t(t, 1, e), l = o && p(o), s = a && p(a), d = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + T(o).width, c = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + T(a).width;
1088
+ if (n.display === "flex")
1089
+ return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
1090
+ if (n.display === "grid")
1091
+ return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
1092
+ if (o && l.float && l.float !== "none") {
1093
+ var u = l.float === "left" ? "left" : "right";
1094
+ return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
1095
+ }
1096
+ return o && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || d >= r && n[Ze] === "none" || a && n[Ze] === "none" && d + c > r) ? "vertical" : "horizontal";
1097
+ }, ii = function(t, e, n) {
1098
+ var r = n ? t.left : t.top, o = n ? t.right : t.bottom, a = n ? t.width : t.height, l = n ? e.left : e.top, s = n ? e.right : e.bottom, d = n ? e.width : e.height;
1099
+ return r === l || o === s || r + a / 2 === l + d / 2;
1100
+ }, ri = function(t, e) {
1101
+ var n;
1102
+ return Zt.some(function(r) {
1103
+ var o = r[U].options.emptyInsertThreshold;
1104
+ if (!(!o || Ce(r))) {
1105
+ var a = T(r), l = t >= a.left - o && t <= a.right + o, s = e >= a.top - o && e <= a.bottom + o;
1106
+ if (l && s)
1107
+ return n = r;
1108
+ }
1109
+ }), n;
1110
+ }, cn = function(t) {
1111
+ function e(o, a) {
1112
+ return function(l, s, d, c) {
1113
+ var u = l.options.group.name && s.options.group.name && l.options.group.name === s.options.group.name;
1114
+ if (o == null && (a || u))
1115
+ return !0;
1116
+ if (o == null || o === !1)
1117
+ return !1;
1118
+ if (a && o === "clone")
1119
+ return o;
1120
+ if (typeof o == "function")
1121
+ return e(o(l, s, d, c), a)(l, s, d, c);
1122
+ var f = (a ? l : s).options.group.name;
1123
+ return o === !0 || typeof o == "string" && o === f || o.join && o.indexOf(f) > -1;
1124
+ };
1125
+ }
1126
+ var n = {}, r = t.group;
1127
+ (!r || Vt(r) != "object") && (r = {
1128
+ name: r
1129
+ }), n.name = r.name, n.checkPull = e(r.pull, !0), n.checkPut = e(r.put), n.revertClone = r.revertClone, t.group = n;
1130
+ }, fn = function() {
1131
+ !hn && m && p(m, "display", "none");
1132
+ }, pn = function() {
1133
+ !hn && m && p(m, "display", "");
1134
+ };
1135
+ te && !an && document.addEventListener("click", function(i) {
1136
+ if (qt)
1137
+ return i.preventDefault(), i.stopPropagation && i.stopPropagation(), i.stopImmediatePropagation && i.stopImmediatePropagation(), qt = !1, !1;
1138
+ }, !0);
1139
+ var rt = function(t) {
1140
+ if (h) {
1141
+ t = t.touches ? t.touches[0] : t;
1142
+ var e = ri(t.clientX, t.clientY);
1143
+ if (e) {
1144
+ var n = {};
1145
+ for (var r in t)
1146
+ t.hasOwnProperty(r) && (n[r] = t[r]);
1147
+ n.target = n.rootEl = e, n.preventDefault = void 0, n.stopPropagation = void 0, e[U]._onDragOver(n);
1148
+ }
1149
+ }
1150
+ }, oi = function(t) {
1151
+ h && h.parentNode[U]._isOutsideThisEl(t.target);
1152
+ };
1153
+ function g(i, t) {
1154
+ if (!(i && i.nodeType && i.nodeType === 1))
1155
+ throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));
1156
+ this.el = i, this.options = t = J({}, t), i[U] = this;
1157
+ var e = {
1158
+ group: null,
1159
+ sort: !0,
1160
+ disabled: !1,
1161
+ store: null,
1162
+ handle: null,
1163
+ draggable: /^[uo]l$/i.test(i.nodeName) ? ">li" : ">*",
1164
+ swapThreshold: 1,
1165
+ // percentage; 0 <= x <= 1
1166
+ invertSwap: !1,
1167
+ // invert always
1168
+ invertedSwapThreshold: null,
1169
+ // will be set to same as swapThreshold if default
1170
+ removeCloneOnHide: !0,
1171
+ direction: function() {
1172
+ return un(i, this.options);
1173
+ },
1174
+ ghostClass: "sortable-ghost",
1175
+ chosenClass: "sortable-chosen",
1176
+ dragClass: "sortable-drag",
1177
+ ignore: "a, img",
1178
+ filter: null,
1179
+ preventOnFilter: !0,
1180
+ animation: 0,
1181
+ easing: null,
1182
+ setData: function(a, l) {
1183
+ a.setData("Text", l.textContent);
1184
+ },
1185
+ dropBubble: !1,
1186
+ dragoverBubble: !1,
1187
+ dataIdAttr: "data-id",
1188
+ delay: 0,
1189
+ delayOnTouchOnly: !1,
1190
+ touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
1191
+ forceFallback: !1,
1192
+ fallbackClass: "sortable-fallback",
1193
+ fallbackOnBody: !1,
1194
+ fallbackTolerance: 0,
1195
+ fallbackOffset: {
1196
+ x: 0,
1197
+ y: 0
1198
+ },
1199
+ supportPointer: g.supportPointer !== !1 && "PointerEvent" in window && !zt,
1200
+ emptyInsertThreshold: 5
1201
+ };
1202
+ Mt.initializePlugins(this, i, e);
1203
+ for (var n in e)
1204
+ !(n in t) && (t[n] = e[n]);
1205
+ cn(t);
1206
+ for (var r in this)
1207
+ r.charAt(0) === "_" && typeof this[r] == "function" && (this[r] = this[r].bind(this));
1208
+ this.nativeDraggable = t.forceFallback ? !1 : ni, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? E(i, "pointerdown", this._onTapStart) : (E(i, "mousedown", this._onTapStart), E(i, "touchstart", this._onTapStart)), this.nativeDraggable && (E(i, "dragover", this), E(i, "dragenter", this)), Zt.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), J(this, Kn());
1209
+ }
1210
+ g.prototype = /** @lends Sortable.prototype */
1211
+ {
1212
+ constructor: g,
1213
+ _isOutsideThisEl: function(t) {
1214
+ !this.el.contains(t) && t !== this.el && (ht = null);
1215
+ },
1216
+ _getDirection: function(t, e) {
1217
+ return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e, h) : this.options.direction;
1218
+ },
1219
+ _onTapStart: function(t) {
1220
+ if (t.cancelable) {
1221
+ var e = this, n = this.el, r = this.options, o = r.preventOnFilter, a = t.type, l = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, s = (l || t).target, d = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || s, c = r.filter;
1222
+ if (fi(n), !h && !(/mousedown|pointerdown/.test(a) && t.button !== 0 || r.disabled) && !d.isContentEditable && !(!this.nativeDraggable && zt && s && s.tagName.toUpperCase() === "SELECT") && (s = z(s, r.draggable, n, !1), !(s && s.animated) && jt !== s)) {
1223
+ if (ft = B(s), Dt = B(s, r.draggable), typeof c == "function") {
1224
+ if (c.call(this, t, s, this)) {
1225
+ P({
1226
+ sortable: e,
1227
+ rootEl: d,
1228
+ name: "filter",
1229
+ targetEl: s,
1230
+ toEl: n,
1231
+ fromEl: n
1232
+ }), I("filter", e, {
1233
+ evt: t
1234
+ }), o && t.cancelable && t.preventDefault();
1235
+ return;
1236
+ }
1237
+ } else if (c && (c = c.split(",").some(function(u) {
1238
+ if (u = z(d, u.trim(), n, !1), u)
1239
+ return P({
1240
+ sortable: e,
1241
+ rootEl: u,
1242
+ name: "filter",
1243
+ targetEl: s,
1244
+ fromEl: n,
1245
+ toEl: n
1246
+ }), I("filter", e, {
1247
+ evt: t
1248
+ }), !0;
1249
+ }), c)) {
1250
+ o && t.cancelable && t.preventDefault();
1251
+ return;
1252
+ }
1253
+ r.handle && !z(d, r.handle, n, !1) || this._prepareDragStart(t, l, s);
1254
+ }
1255
+ }
1256
+ },
1257
+ _prepareDragStart: function(t, e, n) {
1258
+ var r = this, o = r.el, a = r.options, l = o.ownerDocument, s;
1259
+ if (n && !h && n.parentNode === o) {
1260
+ var d = T(n);
1261
+ if (w = o, h = n, A = h.parentNode, ot = h.nextSibling, jt = n, Lt = a.group, g.dragged = h, it = {
1262
+ target: h,
1263
+ clientX: (e || t).clientX,
1264
+ clientY: (e || t).clientY
1265
+ }, Ge = it.clientX - d.left, qe = it.clientY - d.top, this._lastX = (e || t).clientX, this._lastY = (e || t).clientY, h.style["will-change"] = "all", s = function() {
1266
+ if (I("delayEnded", r, {
1267
+ evt: t
1268
+ }), g.eventCanceled) {
1269
+ r._onDrop();
1270
+ return;
1271
+ }
1272
+ r._disableDelayedDragEvents(), !je && r.nativeDraggable && (h.draggable = !0), r._triggerDragStart(t, e), P({
1273
+ sortable: r,
1274
+ name: "choose",
1275
+ originalEvent: t
1276
+ }), M(h, a.chosenClass, !0);
1277
+ }, a.ignore.split(",").forEach(function(c) {
1278
+ ln(h, c.trim(), me);
1279
+ }), E(l, "dragover", rt), E(l, "mousemove", rt), E(l, "touchmove", rt), E(l, "mouseup", r._onDrop), E(l, "touchend", r._onDrop), E(l, "touchcancel", r._onDrop), je && this.nativeDraggable && (this.options.touchStartThreshold = 4, h.draggable = !0), I("delayStart", this, {
1280
+ evt: t
1281
+ }), a.delay && (!a.delayOnTouchOnly || e) && (!this.nativeDraggable || !(Qt || Q))) {
1282
+ if (g.eventCanceled) {
1283
+ this._onDrop();
1284
+ return;
1285
+ }
1286
+ E(l, "mouseup", r._disableDelayedDrag), E(l, "touchend", r._disableDelayedDrag), E(l, "touchcancel", r._disableDelayedDrag), E(l, "mousemove", r._delayedDragTouchMoveHandler), E(l, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && E(l, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
1287
+ } else
1288
+ s();
1289
+ }
1290
+ },
1291
+ _delayedDragTouchMoveHandler: function(t) {
1292
+ var e = t.touches ? t.touches[0] : t;
1293
+ Math.max(Math.abs(e.clientX - this._lastX), Math.abs(e.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
1294
+ },
1295
+ _disableDelayedDrag: function() {
1296
+ h && me(h), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
1297
+ },
1298
+ _disableDelayedDragEvents: function() {
1299
+ var t = this.el.ownerDocument;
1300
+ b(t, "mouseup", this._disableDelayedDrag), b(t, "touchend", this._disableDelayedDrag), b(t, "touchcancel", this._disableDelayedDrag), b(t, "mousemove", this._delayedDragTouchMoveHandler), b(t, "touchmove", this._delayedDragTouchMoveHandler), b(t, "pointermove", this._delayedDragTouchMoveHandler);
1301
+ },
1302
+ _triggerDragStart: function(t, e) {
1303
+ e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? E(document, "pointermove", this._onTouchMove) : e ? E(document, "touchmove", this._onTouchMove) : E(document, "mousemove", this._onTouchMove) : (E(h, "dragend", this), E(w, "dragstart", this._onDragStart));
1304
+ try {
1305
+ document.selection ? Xt(function() {
1306
+ document.selection.empty();
1307
+ }) : window.getSelection().removeAllRanges();
1308
+ } catch {
1309
+ }
1310
+ },
1311
+ _dragStarted: function(t, e) {
1312
+ if (ct = !1, w && h) {
1313
+ I("dragStarted", this, {
1314
+ evt: e
1315
+ }), this.nativeDraggable && E(document, "dragover", oi);
1316
+ var n = this.options;
1317
+ !t && M(h, n.dragClass, !1), M(h, n.ghostClass, !0), g.active = this, t && this._appendGhost(), P({
1318
+ sortable: this,
1319
+ name: "start",
1320
+ originalEvent: e
1321
+ });
1322
+ } else
1323
+ this._nulling();
1324
+ },
1325
+ _emulateDragOver: function() {
1326
+ if (V) {
1327
+ this._lastX = V.clientX, this._lastY = V.clientY, fn();
1328
+ for (var t = document.elementFromPoint(V.clientX, V.clientY), e = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(V.clientX, V.clientY), t !== e); )
1329
+ e = t;
1330
+ if (h.parentNode[U]._isOutsideThisEl(t), e)
1331
+ do {
1332
+ if (e[U]) {
1333
+ var n = void 0;
1334
+ if (n = e[U]._onDragOver({
1335
+ clientX: V.clientX,
1336
+ clientY: V.clientY,
1337
+ target: t,
1338
+ rootEl: e
1339
+ }), n && !this.options.dragoverBubble)
1340
+ break;
1341
+ }
1342
+ t = e;
1343
+ } while (e = e.parentNode);
1344
+ pn();
1345
+ }
1346
+ },
1347
+ _onTouchMove: function(t) {
1348
+ if (it) {
1349
+ var e = this.options, n = e.fallbackTolerance, r = e.fallbackOffset, o = t.touches ? t.touches[0] : t, a = m && gt(m, !0), l = m && a && a.a, s = m && a && a.d, d = Rt && O && We(O), c = (o.clientX - it.clientX + r.x) / (l || 1) + (d ? d[0] - ge[0] : 0) / (l || 1), u = (o.clientY - it.clientY + r.y) / (s || 1) + (d ? d[1] - ge[1] : 0) / (s || 1);
1350
+ if (!g.active && !ct) {
1351
+ if (n && Math.max(Math.abs(o.clientX - this._lastX), Math.abs(o.clientY - this._lastY)) < n)
1352
+ return;
1353
+ this._onDragStart(t, !0);
1354
+ }
1355
+ if (m) {
1356
+ a ? (a.e += c - (fe || 0), a.f += u - (pe || 0)) : a = {
1357
+ a: 1,
1358
+ b: 0,
1359
+ c: 0,
1360
+ d: 1,
1361
+ e: c,
1362
+ f: u
1363
+ };
1364
+ var f = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
1365
+ p(m, "webkitTransform", f), p(m, "mozTransform", f), p(m, "msTransform", f), p(m, "transform", f), fe = c, pe = u, V = o;
1366
+ }
1367
+ t.cancelable && t.preventDefault();
1368
+ }
1369
+ },
1370
+ _appendGhost: function() {
1371
+ if (!m) {
1372
+ var t = this.options.fallbackOnBody ? document.body : w, e = T(h, !0, Rt, !0, t), n = this.options;
1373
+ if (Rt) {
1374
+ for (O = t; p(O, "position") === "static" && p(O, "transform") === "none" && O !== document; )
1375
+ O = O.parentNode;
1376
+ O !== document.body && O !== document.documentElement ? (O === document && (O = K()), e.top += O.scrollTop, e.left += O.scrollLeft) : O = K(), ge = We(O);
1377
+ }
1378
+ m = h.cloneNode(!0), M(m, n.ghostClass, !1), M(m, n.fallbackClass, !0), M(m, n.dragClass, !0), p(m, "transition", ""), p(m, "transform", ""), p(m, "box-sizing", "border-box"), p(m, "margin", 0), p(m, "top", e.top), p(m, "left", e.left), p(m, "width", e.width), p(m, "height", e.height), p(m, "opacity", "0.8"), p(m, "position", Rt ? "absolute" : "fixed"), p(m, "zIndex", "100000"), p(m, "pointerEvents", "none"), g.ghost = m, t.appendChild(m), p(m, "transform-origin", Ge / parseInt(m.style.width) * 100 + "% " + qe / parseInt(m.style.height) * 100 + "%");
1379
+ }
1380
+ },
1381
+ _onDragStart: function(t, e) {
1382
+ var n = this, r = t.dataTransfer, o = n.options;
1383
+ if (I("dragStart", this, {
1384
+ evt: t
1385
+ }), g.eventCanceled) {
1386
+ this._onDrop();
1387
+ return;
1388
+ }
1389
+ I("setupClone", this), g.eventCanceled || (C = dn(h), C.removeAttribute("id"), C.draggable = !1, C.style["will-change"] = "", this._hideClone(), M(C, this.options.chosenClass, !1), g.clone = C), n.cloneId = Xt(function() {
1390
+ I("clone", n), !g.eventCanceled && (n.options.removeCloneOnHide || w.insertBefore(C, h), n._hideClone(), P({
1391
+ sortable: n,
1392
+ name: "clone"
1393
+ }));
1394
+ }), !e && M(h, o.dragClass, !0), e ? (qt = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (b(document, "mouseup", n._onDrop), b(document, "touchend", n._onDrop), b(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", o.setData && o.setData.call(n, r, h)), E(document, "drop", n), p(h, "transform", "translateZ(0)")), ct = !0, n._dragStartId = Xt(n._dragStarted.bind(n, e, t)), E(document, "selectstart", n), At = !0, zt && p(document.body, "user-select", "none");
1395
+ },
1396
+ // Returns true - if no further action is needed (either inserted or another condition)
1397
+ _onDragOver: function(t) {
1398
+ var e = this.el, n = t.target, r, o, a, l = this.options, s = l.group, d = g.active, c = Lt === s, u = l.sort, f = x || d, _, y = this, v = !1;
1399
+ if (Ee)
1400
+ return;
1401
+ function F(Ct, En) {
1402
+ I(Ct, y, j({
1403
+ evt: t,
1404
+ isOwner: c,
1405
+ axis: _ ? "vertical" : "horizontal",
1406
+ revert: a,
1407
+ dragRect: r,
1408
+ targetRect: o,
1409
+ canSort: u,
1410
+ fromSortable: f,
1411
+ target: n,
1412
+ completed: N,
1413
+ onMove: function(xe, $n) {
1414
+ return Bt(w, e, h, r, xe, T(xe), t, $n);
1415
+ },
1416
+ changed: et
1417
+ }, En));
1418
+ }
1419
+ function tt() {
1420
+ F("dragOverAnimationCapture"), y.captureAnimationState(), y !== f && f.captureAnimationState();
1421
+ }
1422
+ function N(Ct) {
1423
+ return F("dragOverCompleted", {
1424
+ insertion: Ct
1425
+ }), Ct && (c ? d._hideClone() : d._showClone(y), y !== f && (M(h, x ? x.options.ghostClass : d.options.ghostClass, !1), M(h, l.ghostClass, !0)), x !== y && y !== g.active ? x = y : y === g.active && x && (x = null), f === y && (y._ignoreWhileAnimating = n), y.animateAll(function() {
1426
+ F("dragOverAnimationComplete"), y._ignoreWhileAnimating = null;
1427
+ }), y !== f && (f.animateAll(), f._ignoreWhileAnimating = null)), (n === h && !h.animated || n === e && !n.animated) && (ht = null), !l.dragoverBubble && !t.rootEl && n !== document && (h.parentNode[U]._isOutsideThisEl(t.target), !Ct && rt(t)), !l.dragoverBubble && t.stopPropagation && t.stopPropagation(), v = !0;
1428
+ }
1429
+ function et() {
1430
+ H = B(h), G = B(h, l.draggable), P({
1431
+ sortable: y,
1432
+ name: "change",
1433
+ toEl: e,
1434
+ newIndex: H,
1435
+ newDraggableIndex: G,
1436
+ originalEvent: t
1437
+ });
1438
+ }
1439
+ if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), n = z(n, l.draggable, e, !0), F("dragOver"), g.eventCanceled)
1440
+ return v;
1441
+ if (h.contains(t.target) || n.animated && n.animatingX && n.animatingY || y._ignoreWhileAnimating === n)
1442
+ return N(!1);
1443
+ if (qt = !1, d && !l.disabled && (c ? u || (a = A !== w) : x === this || (this.lastPutMode = Lt.checkPull(this, d, h, t)) && s.checkPut(this, d, h, t))) {
1444
+ if (_ = this._getDirection(t, n) === "vertical", r = T(h), F("dragOverValid"), g.eventCanceled)
1445
+ return v;
1446
+ if (a)
1447
+ return A = w, tt(), this._hideClone(), F("revert"), g.eventCanceled || (ot ? w.insertBefore(h, ot) : w.appendChild(h)), N(!0);
1448
+ var X = Ce(e, l.draggable);
1449
+ if (!X || di(t, _, this) && !X.animated) {
1450
+ if (X === h)
1451
+ return N(!1);
1452
+ if (X && e === t.target && (n = X), n && (o = T(n)), Bt(w, e, h, r, n, o, t, !!n) !== !1)
1453
+ return tt(), X && X.nextSibling ? e.insertBefore(h, X.nextSibling) : e.appendChild(h), A = e, et(), N(!0);
1454
+ } else if (X && li(t, _, this)) {
1455
+ var ee = _t(e, 0, l, !0);
1456
+ if (ee === h)
1457
+ return N(!1);
1458
+ if (n = ee, o = T(n), Bt(w, e, h, r, n, o, t, !1) !== !1)
1459
+ return tt(), e.insertBefore(h, ee), A = e, et(), N(!0);
1460
+ } else if (n.parentNode === e) {
1461
+ o = T(n);
1462
+ var lt = 0, ne, _n = h.parentNode !== e, Se = !ii(h.animated && h.toRect || r, n.animated && n.toRect || o, _), Ae = _ ? "top" : "left", Et = Xe(n, "top", "top") || Xe(h, "top", "top"), bn = Et ? Et.scrollTop : void 0;
1463
+ ht !== n && (ne = o[Ae], xt = !1, kt = !Se && l.invertSwap || _n), lt = hi(t, n, o, _, Se ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, kt, ht === n);
1464
+ var $t;
1465
+ if (lt !== 0) {
1466
+ var De = B(h);
1467
+ do
1468
+ De -= lt, $t = A.children[De];
1469
+ while ($t && (p($t, "display") === "none" || $t === m));
1470
+ }
1471
+ if (lt === 0 || $t === n)
1472
+ return N(!1);
1473
+ ht = n, Tt = lt;
1474
+ var Te = n.nextElementSibling, wt = !1;
1475
+ wt = lt === 1;
1476
+ var Ht = Bt(w, e, h, r, n, o, t, wt);
1477
+ if (Ht !== !1)
1478
+ return (Ht === 1 || Ht === -1) && (wt = Ht === 1), Ee = !0, setTimeout(si, 30), tt(), wt && !Te ? e.appendChild(h) : n.parentNode.insertBefore(h, wt ? Te : n), Et && Zn(Et, 0, bn - Et.scrollTop), A = h.parentNode, ne !== void 0 && !kt && (Ft = Math.abs(ne - T(n)[Ae])), et(), N(!0);
1479
+ }
1480
+ if (e.contains(h))
1481
+ return N(!1);
1482
+ }
1483
+ return !1;
1484
+ },
1485
+ _ignoreWhileAnimating: null,
1486
+ _offMoveEvents: function() {
1487
+ b(document, "mousemove", this._onTouchMove), b(document, "touchmove", this._onTouchMove), b(document, "pointermove", this._onTouchMove), b(document, "dragover", rt), b(document, "mousemove", rt), b(document, "touchmove", rt);
1488
+ },
1489
+ _offUpEvents: function() {
1490
+ var t = this.el.ownerDocument;
1491
+ b(t, "mouseup", this._onDrop), b(t, "touchend", this._onDrop), b(t, "pointerup", this._onDrop), b(t, "touchcancel", this._onDrop), b(document, "selectstart", this);
1492
+ },
1493
+ _onDrop: function(t) {
1494
+ var e = this.el, n = this.options;
1495
+ if (H = B(h), G = B(h, n.draggable), I("drop", this, {
1496
+ evt: t
1497
+ }), A = h && h.parentNode, H = B(h), G = B(h, n.draggable), g.eventCanceled) {
1498
+ this._nulling();
1499
+ return;
1500
+ }
1501
+ ct = !1, kt = !1, xt = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), $e(this.cloneId), $e(this._dragStartId), this.nativeDraggable && (b(document, "drop", this), b(e, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), zt && p(document.body, "user-select", ""), p(h, "transform", ""), t && (At && (t.cancelable && t.preventDefault(), !n.dropBubble && t.stopPropagation()), m && m.parentNode && m.parentNode.removeChild(m), (w === A || x && x.lastPutMode !== "clone") && C && C.parentNode && C.parentNode.removeChild(C), h && (this.nativeDraggable && b(h, "dragend", this), me(h), h.style["will-change"] = "", At && !ct && M(h, x ? x.options.ghostClass : this.options.ghostClass, !1), M(h, this.options.chosenClass, !1), P({
1502
+ sortable: this,
1503
+ name: "unchoose",
1504
+ toEl: A,
1505
+ newIndex: null,
1506
+ newDraggableIndex: null,
1507
+ originalEvent: t
1508
+ }), w !== A ? (H >= 0 && (P({
1509
+ rootEl: A,
1510
+ name: "add",
1511
+ toEl: A,
1512
+ fromEl: w,
1513
+ originalEvent: t
1514
+ }), P({
1515
+ sortable: this,
1516
+ name: "remove",
1517
+ toEl: A,
1518
+ originalEvent: t
1519
+ }), P({
1520
+ rootEl: A,
1521
+ name: "sort",
1522
+ toEl: A,
1523
+ fromEl: w,
1524
+ originalEvent: t
1525
+ }), P({
1526
+ sortable: this,
1527
+ name: "sort",
1528
+ toEl: A,
1529
+ originalEvent: t
1530
+ })), x && x.save()) : H !== ft && H >= 0 && (P({
1531
+ sortable: this,
1532
+ name: "update",
1533
+ toEl: A,
1534
+ originalEvent: t
1535
+ }), P({
1536
+ sortable: this,
1537
+ name: "sort",
1538
+ toEl: A,
1539
+ originalEvent: t
1540
+ })), g.active && ((H == null || H === -1) && (H = ft, G = Dt), P({
1541
+ sortable: this,
1542
+ name: "end",
1543
+ toEl: A,
1544
+ originalEvent: t
1545
+ }), this.save()))), this._nulling();
1546
+ },
1547
+ _nulling: function() {
1548
+ I("nulling", this), w = h = A = m = ot = C = jt = Z = it = V = At = H = G = ft = Dt = ht = Tt = x = Lt = g.dragged = g.ghost = g.clone = g.active = null, Kt.forEach(function(t) {
1549
+ t.checked = !0;
1550
+ }), Kt.length = fe = pe = 0;
1551
+ },
1552
+ handleEvent: function(t) {
1553
+ switch (t.type) {
1554
+ case "drop":
1555
+ case "dragend":
1556
+ this._onDrop(t);
1557
+ break;
1558
+ case "dragenter":
1559
+ case "dragover":
1560
+ h && (this._onDragOver(t), ai(t));
1561
+ break;
1562
+ case "selectstart":
1563
+ t.preventDefault();
1564
+ break;
1565
+ }
1566
+ },
1567
+ /**
1568
+ * Serializes the item into an array of string.
1569
+ * @returns {String[]}
1570
+ */
1571
+ toArray: function() {
1572
+ for (var t = [], e, n = this.el.children, r = 0, o = n.length, a = this.options; r < o; r++)
1573
+ e = n[r], z(e, a.draggable, this.el, !1) && t.push(e.getAttribute(a.dataIdAttr) || ci(e));
1574
+ return t;
1575
+ },
1576
+ /**
1577
+ * Sorts the elements according to the array.
1578
+ * @param {String[]} order order of the items
1579
+ */
1580
+ sort: function(t, e) {
1581
+ var n = {}, r = this.el;
1582
+ this.toArray().forEach(function(o, a) {
1583
+ var l = r.children[a];
1584
+ z(l, this.options.draggable, r, !1) && (n[o] = l);
1585
+ }, this), e && this.captureAnimationState(), t.forEach(function(o) {
1586
+ n[o] && (r.removeChild(n[o]), r.appendChild(n[o]));
1587
+ }), e && this.animateAll();
1588
+ },
1589
+ /**
1590
+ * Save the current sorting
1591
+ */
1592
+ save: function() {
1593
+ var t = this.options.store;
1594
+ t && t.set && t.set(this);
1595
+ },
1596
+ /**
1597
+ * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
1598
+ * @param {HTMLElement} el
1599
+ * @param {String} [selector] default: `options.draggable`
1600
+ * @returns {HTMLElement|null}
1601
+ */
1602
+ closest: function(t, e) {
1603
+ return z(t, e || this.options.draggable, this.el, !1);
1604
+ },
1605
+ /**
1606
+ * Set/get option
1607
+ * @param {string} name
1608
+ * @param {*} [value]
1609
+ * @returns {*}
1610
+ */
1611
+ option: function(t, e) {
1612
+ var n = this.options;
1613
+ if (e === void 0)
1614
+ return n[t];
1615
+ var r = Mt.modifyOption(this, t, e);
1616
+ typeof r < "u" ? n[t] = r : n[t] = e, t === "group" && cn(n);
1617
+ },
1618
+ /**
1619
+ * Destroy
1620
+ */
1621
+ destroy: function() {
1622
+ I("destroy", this);
1623
+ var t = this.el;
1624
+ t[U] = null, b(t, "mousedown", this._onTapStart), b(t, "touchstart", this._onTapStart), b(t, "pointerdown", this._onTapStart), this.nativeDraggable && (b(t, "dragover", this), b(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(e) {
1625
+ e.removeAttribute("draggable");
1626
+ }), this._onDrop(), this._disableDelayedDragEvents(), Zt.splice(Zt.indexOf(this.el), 1), this.el = t = null;
1627
+ },
1628
+ _hideClone: function() {
1629
+ if (!Z) {
1630
+ if (I("hideClone", this), g.eventCanceled)
1631
+ return;
1632
+ p(C, "display", "none"), this.options.removeCloneOnHide && C.parentNode && C.parentNode.removeChild(C), Z = !0;
1633
+ }
1634
+ },
1635
+ _showClone: function(t) {
1636
+ if (t.lastPutMode !== "clone") {
1637
+ this._hideClone();
1638
+ return;
1639
+ }
1640
+ if (Z) {
1641
+ if (I("showClone", this), g.eventCanceled)
1642
+ return;
1643
+ h.parentNode == w && !this.options.group.revertClone ? w.insertBefore(C, h) : ot ? w.insertBefore(C, ot) : w.appendChild(C), this.options.group.revertClone && this.animate(h, C), p(C, "display", ""), Z = !1;
1644
+ }
1645
+ }
1646
+ };
1647
+ function ai(i) {
1648
+ i.dataTransfer && (i.dataTransfer.dropEffect = "move"), i.cancelable && i.preventDefault();
1649
+ }
1650
+ function Bt(i, t, e, n, r, o, a, l) {
1651
+ var s, d = i[U], c = d.options.onMove, u;
1652
+ return window.CustomEvent && !Q && !Qt ? s = new CustomEvent("move", {
1653
+ bubbles: !0,
1654
+ cancelable: !0
1655
+ }) : (s = document.createEvent("Event"), s.initEvent("move", !0, !0)), s.to = t, s.from = i, s.dragged = e, s.draggedRect = n, s.related = r || t, s.relatedRect = o || T(t), s.willInsertAfter = l, s.originalEvent = a, i.dispatchEvent(s), c && (u = c.call(d, s, a)), u;
1656
+ }
1657
+ function me(i) {
1658
+ i.draggable = !1;
1659
+ }
1660
+ function si() {
1661
+ Ee = !1;
1662
+ }
1663
+ function li(i, t, e) {
1664
+ var n = T(_t(e.el, 0, e.options, !0)), r = 10;
1665
+ return t ? i.clientX < n.left - r || i.clientY < n.top && i.clientX < n.right : i.clientY < n.top - r || i.clientY < n.bottom && i.clientX < n.left;
1666
+ }
1667
+ function di(i, t, e) {
1668
+ var n = T(Ce(e.el, e.options.draggable)), r = 10;
1669
+ return t ? i.clientX > n.right + r || i.clientX <= n.right && i.clientY > n.bottom && i.clientX >= n.left : i.clientX > n.right && i.clientY > n.top || i.clientX <= n.right && i.clientY > n.bottom + r;
1670
+ }
1671
+ function hi(i, t, e, n, r, o, a, l) {
1672
+ var s = n ? i.clientY : i.clientX, d = n ? e.height : e.width, c = n ? e.top : e.left, u = n ? e.bottom : e.right, f = !1;
1673
+ if (!a) {
1674
+ if (l && Ft < d * r) {
1675
+ if (!xt && (Tt === 1 ? s > c + d * o / 2 : s < u - d * o / 2) && (xt = !0), xt)
1676
+ f = !0;
1677
+ else if (Tt === 1 ? s < c + Ft : s > u - Ft)
1678
+ return -Tt;
1679
+ } else if (s > c + d * (1 - r) / 2 && s < u - d * (1 - r) / 2)
1680
+ return ui(t);
1681
+ }
1682
+ return f = f || a, f && (s < c + d * o / 2 || s > u - d * o / 2) ? s > c + d / 2 ? 1 : -1 : 0;
1683
+ }
1684
+ function ui(i) {
1685
+ return B(h) < B(i) ? 1 : -1;
1686
+ }
1687
+ function ci(i) {
1688
+ for (var t = i.tagName + i.className + i.src + i.href + i.textContent, e = t.length, n = 0; e--; )
1689
+ n += t.charCodeAt(e);
1690
+ return n.toString(36);
1691
+ }
1692
+ function fi(i) {
1693
+ Kt.length = 0;
1694
+ for (var t = i.getElementsByTagName("input"), e = t.length; e--; ) {
1695
+ var n = t[e];
1696
+ n.checked && Kt.push(n);
1697
+ }
1698
+ }
1699
+ function Xt(i) {
1700
+ return setTimeout(i, 0);
1701
+ }
1702
+ function $e(i) {
1703
+ return clearTimeout(i);
1704
+ }
1705
+ te && E(document, "touchmove", function(i) {
1706
+ (g.active || ct) && i.cancelable && i.preventDefault();
1707
+ });
1708
+ g.utils = {
1709
+ on: E,
1710
+ off: b,
1711
+ css: p,
1712
+ find: ln,
1713
+ is: function(t, e) {
1714
+ return !!z(t, e, t, !1);
1715
+ },
1716
+ extend: Gn,
1717
+ throttle: qn,
1718
+ closest: z,
1719
+ toggleClass: M,
1720
+ clone: dn,
1721
+ index: B,
1722
+ nextTick: Xt,
1723
+ cancelNextTick: $e,
1724
+ detectDirection: un,
1725
+ getChild: _t
1726
+ };
1727
+ g.get = function(i) {
1728
+ return i[U];
1729
+ };
1730
+ g.mount = function() {
1731
+ for (var i = arguments.length, t = new Array(i), e = 0; e < i; e++)
1732
+ t[e] = arguments[e];
1733
+ t[0].constructor === Array && (t = t[0]), t.forEach(function(n) {
1734
+ if (!n.prototype || !n.prototype.constructor)
1735
+ throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));
1736
+ n.utils && (g.utils = j(j({}, g.utils), n.utils)), Mt.mount(n);
1737
+ });
1738
+ };
1739
+ g.create = function(i, t) {
1740
+ return new g(i, t);
1741
+ };
1742
+ g.version = Xn;
1743
+ var gn = function(t) {
1744
+ var e = t.originalEvent, n = t.putSortable, r = t.dragEl, o = t.activeSortable, a = t.dispatchSortableEvent, l = t.hideGhostForTarget, s = t.unhideGhostForTarget;
1745
+ if (e) {
1746
+ var d = n || o;
1747
+ l();
1748
+ var c = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e, u = document.elementFromPoint(c.clientX, c.clientY);
1749
+ s(), d && !d.el.contains(u) && (a("spill"), this.onSpill({
1750
+ dragEl: r,
1751
+ putSortable: n
1752
+ }));
1753
+ }
1754
+ };
1755
+ function mn() {
1756
+ }
1757
+ mn.prototype = {
1758
+ startIndex: null,
1759
+ dragStart: function(t) {
1760
+ var e = t.oldDraggableIndex;
1761
+ this.startIndex = e;
1762
+ },
1763
+ onSpill: function(t) {
1764
+ var e = t.dragEl, n = t.putSortable;
1765
+ this.sortable.captureAnimationState(), n && n.captureAnimationState();
1766
+ var r = _t(this.sortable.el, this.startIndex, this.options);
1767
+ r ? this.sortable.el.insertBefore(e, r) : this.sortable.el.appendChild(e), this.sortable.animateAll(), n && n.animateAll();
1768
+ },
1769
+ drop: gn
1770
+ };
1771
+ J(mn, {
1772
+ pluginName: "revertOnSpill"
1773
+ });
1774
+ function vn() {
1775
+ }
1776
+ vn.prototype = {
1777
+ onSpill: function(t) {
1778
+ var e = t.dragEl, n = t.putSortable, r = n || this.sortable;
1779
+ r.captureAnimationState(), e.parentNode && e.parentNode.removeChild(e), r.animateAll();
1780
+ },
1781
+ drop: gn
1782
+ };
1783
+ J(vn, {
1784
+ pluginName: "removeOnSpill"
1785
+ });
1786
+ const yn = `
1787
+ :host {
1788
+ display: block;
1789
+ }
1790
+ .layer {
1791
+ display: flex;
1792
+ justify-content: space-between;
1793
+ }
1794
+ .dragHandle {
1795
+ cursor: ns-resize;
1796
+ }
1797
+ `, pi = `
1798
+ ul {
1799
+ padding: 0;
1800
+ }
1801
+ li {
1802
+ list-style: none;
1803
+ }
1804
+ li > .layer > label {
1805
+ cursor: pointer;
1806
+ display: flex;
1807
+ align-items: center;
1808
+ }
1809
+ li label > input[type=checkbox] {
1810
+ appearance: none;
1811
+ margin: 0;
1812
+ }
1813
+ li label > input[type=checkbox]:after {
1814
+ display: block;
1815
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Eeye-off-outline%3C/title%3E%3Cpath fill='%23004170' d='M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z' /%3E%3C/svg%3E");
1816
+ width: 24px;
1817
+ height: 24px;
1818
+ margin-right: 4px;
1819
+ }
1820
+ li label > input[type=checkbox]:checked:after {
1821
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath fill='%23004170' d='M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z' /%3E%3C/svg%3E");
1822
+ }
1823
+ .dragHandle span {
1824
+ display: none;
1825
+ }
1826
+ .dragHandle {
1827
+ background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Edrag%3C/title%3E%3Cpath fill='%23004170' d='M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z' /%3E%3C/svg%3E");
1828
+ width: 24px;
1829
+ height: 24px;
1830
+ }
1831
+ `;
1832
+ var gi = Object.defineProperty, mi = Object.getOwnPropertyDescriptor, D = (i, t, e, n) => {
1833
+ for (var r = n > 1 ? void 0 : n ? mi(t, e) : t, o = i.length - 1, a; o >= 0; o--)
1834
+ (a = i[o]) && (r = (n ? a(t, e, r) : a(r)) || r);
1835
+ return n && r && gi(t, e, r), r;
1836
+ };
1837
+ let k = class extends pt {
1838
+ constructor() {
1839
+ super(...arguments);
1840
+ S(this, "_currentlySorting");
1841
+ S(this, "olMap");
1842
+ S(this, "layerCollection");
1843
+ S(this, "layerArray");
1844
+ S(this, "optionalLayerArray");
1845
+ S(this, "for");
1846
+ S(this, "layerIdentifier", "ol_uid");
1847
+ S(this, "layerTitle", "title");
1848
+ S(this, "sortBy", "layerOrder");
1849
+ S(this, "layerConfig", ["opacity"]);
1850
+ S(this, "externalLayerConfig");
1851
+ S(this, "unstyled");
1852
+ S(this, "hideConfigs", !1);
1853
+ }
1854
+ _updateControl(t) {
1855
+ this.layerCollection = t;
1856
+ const e = [...t.getArray()].filter(
1857
+ (o) => o.get("layerControlHide") !== !0 && o.get("layerControlOptional") !== !0
1858
+ ), n = [...t.getArray()].filter(
1859
+ (o) => o.get("layerControlOptional") === !0
1860
+ );
1861
+ this.getAttribute("sortBy") === "zIndex" ? e.sort((o, a) => o.get("zIndex") ? o.get("zIndex") < a.get("zIndex") ? 1 : -1 : 1) : e.reverse(), this.layerArray = e, this.optionalLayerArray = n, this.requestUpdate();
1862
+ }
1863
+ _emitLayerconfig(t) {
1864
+ const e = {
1865
+ detail: {
1866
+ layer: t
1867
+ },
1868
+ bubbles: !0,
1869
+ composed: !0
1870
+ };
1871
+ this.dispatchEvent(new CustomEvent("layerconfig", e));
1872
+ }
1873
+ changeOpacity(t, e) {
1874
+ t.setOpacity(e);
1875
+ }
1876
+ changeStyleProperty(t, e, n) {
1877
+ t.updateStyleVariables({
1878
+ // @ts-ignore
1879
+ ...t.style_,
1880
+ [e]: n
1881
+ });
1882
+ }
1883
+ resetLayerConfig() {
1884
+ this.hideConfigs = !0, setTimeout(() => {
1885
+ this.hideConfigs = !1, this.requestUpdate();
1886
+ }, 0);
1887
+ }
1888
+ render() {
1889
+ var r;
1890
+ const t = document.querySelector(this.for), n = (t.map || t).getLayers();
1891
+ return this._updateControl(n), n.on("change:length", () => {
1892
+ this._currentlySorting || this._updateControl(n);
1893
+ }), L`
1894
+ <style>
1895
+ ${yn}
1896
+ ${!this.unstyled && pi}
1897
+ </style>
1898
+ <div>
1899
+ <slot></slot>
1900
+ <ul>
1901
+ ${be(
1902
+ this.layerArray,
1903
+ (o) => L`
1904
+ <li
1905
+ layerid="${//@ts-ignore
1906
+ o.get(this.layerIdentifier)}"
1907
+ >
1908
+ <div class="layer">
1909
+ <label>
1910
+ <input
1911
+ type="checkbox"
1912
+ checked="${o.getVisible() || $}"
1913
+ @click=${() => {
1914
+ o.setVisible(!o.getVisible()), this.requestUpdate();
1915
+ }}
1916
+ />
1917
+ <span class="title"
1918
+ >${o.get(this.layerTitle) || `layer ${// @ts-ignore
1919
+ o.get(this.layerIdentifier)}`}</span
1920
+ >
1921
+ </label>
1922
+ ${this.sortBy === "layerOrder" ? L`<div class="dragHandle">
1923
+ <span>=</span>
1924
+ </div>` : $}
1925
+ </div>
1926
+ ${this.layerConfig && !this.hideConfigs ? L`
1927
+ <eox-layerconfig
1928
+ .layerConfig="${this.layerConfig}"
1929
+ .layerControl="${this}"
1930
+ .layer=${o}
1931
+ .external=${this.externalLayerConfig}
1932
+ ></eox-layerconfig>
1933
+ ` : $}
1934
+ ${// @ts-ignore
1935
+ this.externalLayerConfig && o.style_ ? L`
1936
+ <button @click=${() => this._emitLayerconfig(o)}>
1937
+ configure
1938
+ </button>
1939
+ ` : $}
1940
+ </li>
1941
+ `
1942
+ )}
1943
+ </ul>
1944
+ ${rn(
1945
+ ((r = this.optionalLayerArray) == null ? void 0 : r.length) > 0,
1946
+ () => L`
1947
+ <label for="optional">Optional layers</label>
1948
+
1949
+ <select name="optional">
1950
+ <option disabled selected value>
1951
+ -- select an optional layer to add --
1952
+ </option>
1953
+ ${this.optionalLayerArray.map(
1954
+ (o) => L`
1955
+ <option
1956
+ value="${// @ts-ignore
1957
+ o.get(this.layerIdentifier)}"
1958
+ >
1959
+ ${o.get(this.layerTitle) || `layer ${// @ts-ignore
1960
+ o.get(this.layerIdentifier)}`}
1961
+ </option>
1962
+ `
1963
+ )}
1964
+ </select>
1965
+ <button
1966
+ @click="${() => {
1967
+ const o = this.optionalLayerArray.find(
1968
+ // @ts-ignore
1969
+ (a) => a.get(this.layerIdentifier) === // @ts-ignore
1970
+ this.shadowRoot.querySelector("select[name=optional]").value
1971
+ );
1972
+ this.layerCollection.remove(o), this.layerCollection.insertAt(
1973
+ this.layerCollection.getLength(),
1974
+ o
1975
+ ), o.set("layerControlOptional", !1), o.setVisible(!0), this.resetLayerConfig();
1976
+ }}"
1977
+ >
1978
+ add
1979
+ </button>
1980
+ `
1981
+ )}
1982
+ </div>
1983
+ `;
1984
+ }
1985
+ updated() {
1986
+ this.sortBy == "layerOrder" && g.create(this.renderRoot.querySelector("ul"), {
1987
+ handle: ".dragHandle",
1988
+ dataIdAttr: "layerId",
1989
+ store: {
1990
+ get: () => this.layerCollection.getArray().map((t) => t.get(this.layerIdentifier)).reverse(),
1991
+ set: (t) => {
1992
+ var e = t.toArray().reverse();
1993
+ e.forEach((n, r) => {
1994
+ const o = this.layerCollection.getArray().find(
1995
+ // @ts-ignore
1996
+ (a) => a.get(this.layerIdentifier) === n
1997
+ );
1998
+ this.layerCollection.remove(o), this.layerCollection.insertAt(r, o);
1999
+ });
2000
+ }
2001
+ },
2002
+ onSort: () => {
2003
+ this.resetLayerConfig();
2004
+ }
2005
+ });
2006
+ }
2007
+ };
2008
+ D([
2009
+ bt()
2010
+ ], k.prototype, "olMap", 2);
2011
+ D([
2012
+ bt()
2013
+ ], k.prototype, "layerCollection", 2);
2014
+ D([
2015
+ bt()
2016
+ ], k.prototype, "layerArray", 2);
2017
+ D([
2018
+ bt()
2019
+ ], k.prototype, "optionalLayerArray", 2);
2020
+ D([
2021
+ R()
2022
+ ], k.prototype, "for", 2);
2023
+ D([
2024
+ R()
2025
+ ], k.prototype, "layerIdentifier", 2);
2026
+ D([
2027
+ R()
2028
+ ], k.prototype, "layerTitle", 2);
2029
+ D([
2030
+ R()
2031
+ ], k.prototype, "sortBy", 2);
2032
+ D([
2033
+ R({ type: Array })
2034
+ ], k.prototype, "layerConfig", 2);
2035
+ D([
2036
+ R({ type: Boolean })
2037
+ ], k.prototype, "externalLayerConfig", 2);
2038
+ D([
2039
+ R({ type: Boolean })
2040
+ ], k.prototype, "unstyled", 2);
2041
+ k = D([
2042
+ nn("eox-layercontrol")
2043
+ ], k);
2044
+ let Y = class extends pt {
2045
+ constructor() {
2046
+ super(...arguments);
2047
+ S(this, "for");
2048
+ S(this, "layerConfig");
2049
+ S(this, "layerControl");
2050
+ S(this, "layer");
2051
+ S(this, "external");
2052
+ S(this, "_layerControlElement");
2053
+ S(this, "_currentLayer");
2054
+ S(this, "_configList", {});
2055
+ }
2056
+ _handleInput(t, e) {
2057
+ e === "opacity" ? this._layerControlElement.changeOpacity(
2058
+ this._currentLayer,
2059
+ parseFloat(t.target.value)
2060
+ ) : this._layerControlElement.changeStyleProperty(
2061
+ this._currentLayer,
2062
+ e,
2063
+ parseFloat(t.target.value)
2064
+ );
2065
+ }
2066
+ _parseConfigs(t) {
2067
+ if (!t)
2068
+ return;
2069
+ const e = t.style_;
2070
+ e && e.color && e.color[0] === "array" && (this._configList = e.variables);
2071
+ }
2072
+ connectedCallback() {
2073
+ super.connectedCallback(), !this.layerConfig && !this.layerControl ? (this._layerControlElement = document.querySelector(this.for), this.layerConfig = this._layerControlElement.layerConfig, this._layerControlElement && this._layerControlElement.addEventListener("layerconfig", (t) => {
2074
+ this._currentLayer = t.detail.layer, this._parseConfigs(this._currentLayer), this.requestUpdate();
2075
+ })) : (this._layerControlElement = this.layerControl, this._currentLayer = this.layer, this._parseConfigs(this._currentLayer));
2076
+ }
2077
+ render() {
2078
+ return L`
2079
+ <style>
2080
+ ${yn}
2081
+ </style>
2082
+ ${rn(
2083
+ this._currentLayer,
2084
+ () => L`
2085
+ <div>
2086
+ <slot></slot>
2087
+ ${this.for ? L`layer: ${this._currentLayer.get("name")}` : $}
2088
+ ${be(
2089
+ this.layerConfig.filter(
2090
+ (t) => this.for ? t !== "opacity" : !0
2091
+ ),
2092
+ (t) => L`
2093
+ <div>${t}</div>
2094
+ <input
2095
+ type="range"
2096
+ min="0"
2097
+ max="1"
2098
+ step="0.01"
2099
+ value="${this._currentLayer.getOpacity()}"
2100
+ @input=${(e) => this._handleInput(e, t)}
2101
+ />
2102
+ `
2103
+ )}
2104
+ ${Object.keys(this._configList).length > 0 && !this.external ? L`
2105
+ <details open="${this.for ? !0 : $}">
2106
+ <summary>Layer config</summary>
2107
+ <ul>
2108
+ ${be(
2109
+ Object.keys(this._configList),
2110
+ (t) => L` <li>
2111
+ <div>${t}</div>
2112
+ <input
2113
+ type="range"
2114
+ min="${["red", "green", "blue"].includes(t) ? 1 : 2e3}"
2115
+ max="${["red", "green", "blue"].includes(t) ? 4 : 5e3}"
2116
+ value="${// @ts-ignore
2117
+ this._configList[t]}"
2118
+ @input=${(e) => this._handleInput(e, t)}
2119
+ />
2120
+ </li>`
2121
+ )}
2122
+ </ul>
2123
+ </details>
2124
+ ` : $}
2125
+ </div>
2126
+ `
2127
+ )}
2128
+ `;
2129
+ }
2130
+ };
2131
+ D([
2132
+ R()
2133
+ ], Y.prototype, "for", 2);
2134
+ D([
2135
+ R({ type: Array })
2136
+ ], Y.prototype, "layerConfig", 2);
2137
+ D([
2138
+ R({ type: Object, attribute: !1 })
2139
+ ], Y.prototype, "layerControl", 2);
2140
+ D([
2141
+ R({ type: Object, attribute: !1 })
2142
+ ], Y.prototype, "layer", 2);
2143
+ D([
2144
+ R({ type: Boolean })
2145
+ ], Y.prototype, "external", 2);
2146
+ D([
2147
+ bt()
2148
+ ], Y.prototype, "_currentLayer", 2);
2149
+ D([
2150
+ bt()
2151
+ ], Y.prototype, "_configList", 2);
2152
+ Y = D([
2153
+ nn("eox-layerconfig")
2154
+ ], Y);
2155
+ export {
2156
+ Y as EOxLayerConfig,
2157
+ k as EOxLayerControl
2158
+ };