@record-evolution/widget-navbar 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/definition-schema.d.ts +20 -0
- package/dist/src/definition-schema.json +28 -0
- package/dist/src/widget-navbar.ts +13 -3
- package/dist/widget-navbar.js +241 -238
- package/dist/widget-navbar.js.map +1 -1
- package/package.json +1 -1
- package/src/definition-schema.d.ts +20 -0
- package/src/definition-schema.json +28 -0
- package/src/widget-navbar.ts +13 -3
package/dist/widget-navbar.js
CHANGED
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
*/
|
|
7
7
|
const Y = globalThis, ut = Y.ShadowRoot && (Y.ShadyCSS === void 0 || Y.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, vt = Symbol(), wt = /* @__PURE__ */ new WeakMap();
|
|
8
8
|
let Ut = class {
|
|
9
|
-
constructor(t, e,
|
|
10
|
-
if (this._$cssResult$ = !0,
|
|
9
|
+
constructor(t, e, r) {
|
|
10
|
+
if (this._$cssResult$ = !0, r !== vt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
11
11
|
this.cssText = t, this.t = e;
|
|
12
12
|
}
|
|
13
13
|
get styleSheet() {
|
|
14
14
|
let t = this.o;
|
|
15
15
|
const e = this.t;
|
|
16
16
|
if (ut && t === void 0) {
|
|
17
|
-
const
|
|
18
|
-
|
|
17
|
+
const r = e !== void 0 && e.length === 1;
|
|
18
|
+
r && (t = wt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && wt.set(e, t));
|
|
19
19
|
}
|
|
20
20
|
return t;
|
|
21
21
|
}
|
|
@@ -24,21 +24,21 @@ let Ut = class {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
const ee = (s) => new Ut(typeof s == "string" ? s : s + "", void 0, vt), $ = (s, ...t) => {
|
|
27
|
-
const e = s.length === 1 ? s[0] : t.reduce(((
|
|
27
|
+
const e = s.length === 1 ? s[0] : t.reduce(((r, i, o) => r + ((a) => {
|
|
28
28
|
if (a._$cssResult$ === !0) return a.cssText;
|
|
29
29
|
if (typeof a == "number") return a;
|
|
30
30
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
31
|
-
})(
|
|
31
|
+
})(i) + s[o + 1]), s[0]);
|
|
32
32
|
return new Ut(e, s, vt);
|
|
33
|
-
},
|
|
33
|
+
}, re = (s, t) => {
|
|
34
34
|
if (ut) s.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
|
|
35
35
|
else for (const e of t) {
|
|
36
|
-
const
|
|
37
|
-
|
|
36
|
+
const r = document.createElement("style"), i = Y.litNonce;
|
|
37
|
+
i !== void 0 && r.setAttribute("nonce", i), r.textContent = e.cssText, s.appendChild(r);
|
|
38
38
|
}
|
|
39
39
|
}, Ct = ut ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
|
|
40
40
|
let e = "";
|
|
41
|
-
for (const
|
|
41
|
+
for (const r of t.cssRules) e += r.cssText;
|
|
42
42
|
return ee(e);
|
|
43
43
|
})(s) : s;
|
|
44
44
|
/**
|
|
@@ -46,7 +46,7 @@ const ee = (s) => new Ut(typeof s == "string" ? s : s + "", void 0, vt), $ = (s,
|
|
|
46
46
|
* Copyright 2017 Google LLC
|
|
47
47
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
48
48
|
*/
|
|
49
|
-
const { is:
|
|
49
|
+
const { is: ie, defineProperty: se, getOwnPropertyDescriptor: oe, getOwnPropertyNames: ae, getOwnPropertySymbols: ne, getPrototypeOf: ce } = Object, J = globalThis, Et = J.trustedTypes, le = Et ? Et.emptyScript : "", de = J.reactiveElementPolyfillSupport, U = (s, t) => s, Z = { toAttribute(s, t) {
|
|
50
50
|
switch (t) {
|
|
51
51
|
case Boolean:
|
|
52
52
|
s = s ? le : null;
|
|
@@ -74,7 +74,7 @@ const { is: re, defineProperty: se, getOwnPropertyDescriptor: oe, getOwnProperty
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
return e;
|
|
77
|
-
} }, mt = (s, t) => !
|
|
77
|
+
} }, mt = (s, t) => !ie(s, t), St = { attribute: !0, type: String, converter: Z, reflect: !1, useDefault: !1, hasChanged: mt };
|
|
78
78
|
Symbol.metadata ??= Symbol("metadata"), J.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
79
79
|
let k = class extends HTMLElement {
|
|
80
80
|
static addInitializer(t) {
|
|
@@ -85,19 +85,19 @@ let k = class extends HTMLElement {
|
|
|
85
85
|
}
|
|
86
86
|
static createProperty(t, e = St) {
|
|
87
87
|
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
88
|
-
const
|
|
89
|
-
|
|
88
|
+
const r = Symbol(), i = this.getPropertyDescriptor(t, r, e);
|
|
89
|
+
i !== void 0 && se(this.prototype, t, i);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
static getPropertyDescriptor(t, e,
|
|
93
|
-
const { get:
|
|
92
|
+
static getPropertyDescriptor(t, e, r) {
|
|
93
|
+
const { get: i, set: o } = oe(this.prototype, t) ?? { get() {
|
|
94
94
|
return this[e];
|
|
95
95
|
}, set(a) {
|
|
96
96
|
this[e] = a;
|
|
97
97
|
} };
|
|
98
|
-
return { get:
|
|
99
|
-
const c =
|
|
100
|
-
o?.call(this, a), this.requestUpdate(t, c,
|
|
98
|
+
return { get: i, set(a) {
|
|
99
|
+
const c = i?.call(this);
|
|
100
|
+
o?.call(this, a), this.requestUpdate(t, c, r);
|
|
101
101
|
}, configurable: !0, enumerable: !0 };
|
|
102
102
|
}
|
|
103
103
|
static getPropertyOptions(t) {
|
|
@@ -111,32 +111,32 @@ let k = class extends HTMLElement {
|
|
|
111
111
|
static finalize() {
|
|
112
112
|
if (this.hasOwnProperty(U("finalized"))) return;
|
|
113
113
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(U("properties"))) {
|
|
114
|
-
const e = this.properties,
|
|
115
|
-
for (const
|
|
114
|
+
const e = this.properties, r = [...ae(e), ...ne(e)];
|
|
115
|
+
for (const i of r) this.createProperty(i, e[i]);
|
|
116
116
|
}
|
|
117
117
|
const t = this[Symbol.metadata];
|
|
118
118
|
if (t !== null) {
|
|
119
119
|
const e = litPropertyMetadata.get(t);
|
|
120
|
-
if (e !== void 0) for (const [
|
|
120
|
+
if (e !== void 0) for (const [r, i] of e) this.elementProperties.set(r, i);
|
|
121
121
|
}
|
|
122
122
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
123
|
-
for (const [e,
|
|
124
|
-
const
|
|
125
|
-
|
|
123
|
+
for (const [e, r] of this.elementProperties) {
|
|
124
|
+
const i = this._$Eu(e, r);
|
|
125
|
+
i !== void 0 && this._$Eh.set(i, e);
|
|
126
126
|
}
|
|
127
127
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
128
128
|
}
|
|
129
129
|
static finalizeStyles(t) {
|
|
130
130
|
const e = [];
|
|
131
131
|
if (Array.isArray(t)) {
|
|
132
|
-
const
|
|
133
|
-
for (const
|
|
132
|
+
const r = new Set(t.flat(1 / 0).reverse());
|
|
133
|
+
for (const i of r) e.unshift(Ct(i));
|
|
134
134
|
} else t !== void 0 && e.push(Ct(t));
|
|
135
135
|
return e;
|
|
136
136
|
}
|
|
137
137
|
static _$Eu(t, e) {
|
|
138
|
-
const
|
|
139
|
-
return
|
|
138
|
+
const r = e.attribute;
|
|
139
|
+
return r === !1 ? void 0 : typeof r == "string" ? r : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
140
140
|
}
|
|
141
141
|
constructor() {
|
|
142
142
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
@@ -152,12 +152,12 @@ let k = class extends HTMLElement {
|
|
|
152
152
|
}
|
|
153
153
|
_$E_() {
|
|
154
154
|
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
155
|
-
for (const
|
|
155
|
+
for (const r of e.keys()) this.hasOwnProperty(r) && (t.set(r, this[r]), delete this[r]);
|
|
156
156
|
t.size > 0 && (this._$Ep = t);
|
|
157
157
|
}
|
|
158
158
|
createRenderRoot() {
|
|
159
159
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
160
|
-
return
|
|
160
|
+
return re(t, this.constructor.elementStyles), t;
|
|
161
161
|
}
|
|
162
162
|
connectedCallback() {
|
|
163
163
|
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t) => t.hostConnected?.()));
|
|
@@ -167,35 +167,35 @@ let k = class extends HTMLElement {
|
|
|
167
167
|
disconnectedCallback() {
|
|
168
168
|
this._$EO?.forEach(((t) => t.hostDisconnected?.()));
|
|
169
169
|
}
|
|
170
|
-
attributeChangedCallback(t, e,
|
|
171
|
-
this._$AK(t,
|
|
170
|
+
attributeChangedCallback(t, e, r) {
|
|
171
|
+
this._$AK(t, r);
|
|
172
172
|
}
|
|
173
173
|
_$ET(t, e) {
|
|
174
|
-
const
|
|
175
|
-
if (
|
|
176
|
-
const o = (
|
|
177
|
-
this._$Em = t, o == null ? this.removeAttribute(
|
|
174
|
+
const r = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, r);
|
|
175
|
+
if (i !== void 0 && r.reflect === !0) {
|
|
176
|
+
const o = (r.converter?.toAttribute !== void 0 ? r.converter : Z).toAttribute(e, r.type);
|
|
177
|
+
this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
_$AK(t, e) {
|
|
181
|
-
const
|
|
182
|
-
if (
|
|
183
|
-
const o =
|
|
184
|
-
this._$Em =
|
|
181
|
+
const r = this.constructor, i = r._$Eh.get(t);
|
|
182
|
+
if (i !== void 0 && this._$Em !== i) {
|
|
183
|
+
const o = r.getPropertyOptions(i), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : Z;
|
|
184
|
+
this._$Em = i;
|
|
185
185
|
const c = a.fromAttribute(e, o.type);
|
|
186
|
-
this[
|
|
186
|
+
this[i] = c ?? this._$Ej?.get(i) ?? c, this._$Em = null;
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
requestUpdate(t, e,
|
|
189
|
+
requestUpdate(t, e, r) {
|
|
190
190
|
if (t !== void 0) {
|
|
191
|
-
const
|
|
192
|
-
if (
|
|
193
|
-
this.C(t, e,
|
|
191
|
+
const i = this.constructor, o = this[t];
|
|
192
|
+
if (r ??= i.getPropertyOptions(t), !((r.hasChanged ?? mt)(o, e) || r.useDefault && r.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(i._$Eu(t, r)))) return;
|
|
193
|
+
this.C(t, e, r);
|
|
194
194
|
}
|
|
195
195
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
196
196
|
}
|
|
197
|
-
C(t, e, { useDefault:
|
|
198
|
-
|
|
197
|
+
C(t, e, { useDefault: r, reflect: i, wrapped: o }, a) {
|
|
198
|
+
r && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, a ?? e ?? this[t]), o !== !0 || a !== void 0) || (this._$AL.has(t) || (this.hasUpdated || r || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
|
|
199
199
|
}
|
|
200
200
|
async _$EP() {
|
|
201
201
|
this.isUpdatePending = !0;
|
|
@@ -214,21 +214,21 @@ let k = class extends HTMLElement {
|
|
|
214
214
|
if (!this.isUpdatePending) return;
|
|
215
215
|
if (!this.hasUpdated) {
|
|
216
216
|
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
217
|
-
for (const [
|
|
217
|
+
for (const [i, o] of this._$Ep) this[i] = o;
|
|
218
218
|
this._$Ep = void 0;
|
|
219
219
|
}
|
|
220
|
-
const
|
|
221
|
-
if (
|
|
222
|
-
const { wrapped: a } = o, c = this[
|
|
223
|
-
a !== !0 || this._$AL.has(
|
|
220
|
+
const r = this.constructor.elementProperties;
|
|
221
|
+
if (r.size > 0) for (const [i, o] of r) {
|
|
222
|
+
const { wrapped: a } = o, c = this[i];
|
|
223
|
+
a !== !0 || this._$AL.has(i) || c === void 0 || this.C(i, void 0, o, c);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
let t = !1;
|
|
227
227
|
const e = this._$AL;
|
|
228
228
|
try {
|
|
229
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach(((
|
|
230
|
-
} catch (
|
|
231
|
-
throw t = !1, this._$EM(),
|
|
229
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach(((r) => r.hostUpdate?.())), this.update(e)) : this._$EM();
|
|
230
|
+
} catch (r) {
|
|
231
|
+
throw t = !1, this._$EM(), r;
|
|
232
232
|
}
|
|
233
233
|
t && this._$AE(e);
|
|
234
234
|
}
|
|
@@ -263,67 +263,67 @@ k.elementStyles = [], k.shadowRootOptions = { mode: "open" }, k[U("elementProper
|
|
|
263
263
|
* Copyright 2017 Google LLC
|
|
264
264
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
265
265
|
*/
|
|
266
|
-
const bt = globalThis, X = bt.trustedTypes, Tt = X ? X.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Ht = "$lit$", w = `lit$${Math.random().toFixed(9).slice(2)}$`, Lt = "?" + w, he = `<${Lt}>`, R = document, H = () => R.createComment(""), L = (s) => s === null || typeof s != "object" && typeof s != "function", yt = Array.isArray, pe = (s) => yt(s) || typeof s?.[Symbol.iterator] == "function",
|
|
267
|
-
\f\r]`, z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, It = /-->/g, Pt = />/g, T = RegExp(`>|${
|
|
266
|
+
const bt = globalThis, X = bt.trustedTypes, Tt = X ? X.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Ht = "$lit$", w = `lit$${Math.random().toFixed(9).slice(2)}$`, Lt = "?" + w, he = `<${Lt}>`, R = document, H = () => R.createComment(""), L = (s) => s === null || typeof s != "object" && typeof s != "function", yt = Array.isArray, pe = (s) => yt(s) || typeof s?.[Symbol.iterator] == "function", it = `[
|
|
267
|
+
\f\r]`, z = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, It = /-->/g, Pt = />/g, T = RegExp(`>|${it}(?:([^\\s"'>=/]+)(${it}*=${it}*(?:[^
|
|
268
268
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), Rt = /'/g, kt = /"/g, Bt = /^(?:script|style|textarea|title)$/i, fe = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), A = fe(1), C = Symbol.for("lit-noChange"), v = Symbol.for("lit-nothing"), Ot = /* @__PURE__ */ new WeakMap(), P = R.createTreeWalker(R, 129);
|
|
269
269
|
function Ft(s, t) {
|
|
270
270
|
if (!yt(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
271
271
|
return Tt !== void 0 ? Tt.createHTML(t) : t;
|
|
272
272
|
}
|
|
273
273
|
const ue = (s, t) => {
|
|
274
|
-
const e = s.length - 1,
|
|
275
|
-
let
|
|
274
|
+
const e = s.length - 1, r = [];
|
|
275
|
+
let i, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", a = z;
|
|
276
276
|
for (let c = 0; c < e; c++) {
|
|
277
277
|
const n = s[c];
|
|
278
278
|
let d, p, l = -1, f = 0;
|
|
279
|
-
for (; f < n.length && (a.lastIndex = f, p = a.exec(n), p !== null); ) f = a.lastIndex, a === z ? p[1] === "!--" ? a = It : p[1] !== void 0 ? a = Pt : p[2] !== void 0 ? (Bt.test(p[2]) && (
|
|
279
|
+
for (; f < n.length && (a.lastIndex = f, p = a.exec(n), p !== null); ) f = a.lastIndex, a === z ? p[1] === "!--" ? a = It : p[1] !== void 0 ? a = Pt : p[2] !== void 0 ? (Bt.test(p[2]) && (i = RegExp("</" + p[2], "g")), a = T) : p[3] !== void 0 && (a = T) : a === T ? p[0] === ">" ? (a = i ?? z, l = -1) : p[1] === void 0 ? l = -2 : (l = a.lastIndex - p[2].length, d = p[1], a = p[3] === void 0 ? T : p[3] === '"' ? kt : Rt) : a === kt || a === Rt ? a = T : a === It || a === Pt ? a = z : (a = T, i = void 0);
|
|
280
280
|
const u = a === T && s[c + 1].startsWith("/>") ? " " : "";
|
|
281
|
-
o += a === z ? n + he : l >= 0 ? (
|
|
281
|
+
o += a === z ? n + he : l >= 0 ? (r.push(d), n.slice(0, l) + Ht + n.slice(l) + w + u) : n + w + (l === -2 ? c : u);
|
|
282
282
|
}
|
|
283
|
-
return [Ft(s, o + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")),
|
|
283
|
+
return [Ft(s, o + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
|
|
284
284
|
};
|
|
285
285
|
class B {
|
|
286
|
-
constructor({ strings: t, _$litType$: e },
|
|
287
|
-
let
|
|
286
|
+
constructor({ strings: t, _$litType$: e }, r) {
|
|
287
|
+
let i;
|
|
288
288
|
this.parts = [];
|
|
289
289
|
let o = 0, a = 0;
|
|
290
290
|
const c = t.length - 1, n = this.parts, [d, p] = ue(t, e);
|
|
291
|
-
if (this.el = B.createElement(d,
|
|
291
|
+
if (this.el = B.createElement(d, r), P.currentNode = this.el.content, e === 2 || e === 3) {
|
|
292
292
|
const l = this.el.content.firstChild;
|
|
293
293
|
l.replaceWith(...l.childNodes);
|
|
294
294
|
}
|
|
295
|
-
for (; (
|
|
296
|
-
if (
|
|
297
|
-
if (
|
|
298
|
-
const f = p[a++], u =
|
|
299
|
-
n.push({ type: 1, index: o, name: b[2], strings: u, ctor: b[1] === "." ? me : b[1] === "?" ? be : b[1] === "@" ? ye : Q }),
|
|
300
|
-
} else l.startsWith(w) && (n.push({ type: 6, index: o }),
|
|
301
|
-
if (Bt.test(
|
|
302
|
-
const l =
|
|
295
|
+
for (; (i = P.nextNode()) !== null && n.length < c; ) {
|
|
296
|
+
if (i.nodeType === 1) {
|
|
297
|
+
if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(Ht)) {
|
|
298
|
+
const f = p[a++], u = i.getAttribute(l).split(w), b = /([.?@])?(.*)/.exec(f);
|
|
299
|
+
n.push({ type: 1, index: o, name: b[2], strings: u, ctor: b[1] === "." ? me : b[1] === "?" ? be : b[1] === "@" ? ye : Q }), i.removeAttribute(l);
|
|
300
|
+
} else l.startsWith(w) && (n.push({ type: 6, index: o }), i.removeAttribute(l));
|
|
301
|
+
if (Bt.test(i.tagName)) {
|
|
302
|
+
const l = i.textContent.split(w), f = l.length - 1;
|
|
303
303
|
if (f > 0) {
|
|
304
|
-
|
|
305
|
-
for (let u = 0; u < f; u++)
|
|
306
|
-
|
|
304
|
+
i.textContent = X ? X.emptyScript : "";
|
|
305
|
+
for (let u = 0; u < f; u++) i.append(l[u], H()), P.nextNode(), n.push({ type: 2, index: ++o });
|
|
306
|
+
i.append(l[f], H());
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
} else if (
|
|
309
|
+
} else if (i.nodeType === 8) if (i.data === Lt) n.push({ type: 2, index: o });
|
|
310
310
|
else {
|
|
311
311
|
let l = -1;
|
|
312
|
-
for (; (l =
|
|
312
|
+
for (; (l = i.data.indexOf(w, l + 1)) !== -1; ) n.push({ type: 7, index: o }), l += w.length - 1;
|
|
313
313
|
}
|
|
314
314
|
o++;
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
static createElement(t, e) {
|
|
318
|
-
const
|
|
319
|
-
return
|
|
318
|
+
const r = R.createElement("template");
|
|
319
|
+
return r.innerHTML = t, r;
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
-
function O(s, t, e = s,
|
|
322
|
+
function O(s, t, e = s, r) {
|
|
323
323
|
if (t === C) return t;
|
|
324
|
-
let
|
|
324
|
+
let i = r !== void 0 ? e._$Co?.[r] : e._$Cl;
|
|
325
325
|
const o = L(t) ? void 0 : t._$litDirective$;
|
|
326
|
-
return
|
|
326
|
+
return i?.constructor !== o && (i?._$AO?.(!1), o === void 0 ? i = void 0 : (i = new o(s), i._$AT(s, e, r)), r !== void 0 ? (e._$Co ??= [])[r] = i : e._$Cl = i), i !== void 0 && (t = O(s, i._$AS(s, t.values), i, r)), t;
|
|
327
327
|
}
|
|
328
328
|
let ve = class {
|
|
329
329
|
constructor(t, e) {
|
|
@@ -336,29 +336,29 @@ let ve = class {
|
|
|
336
336
|
return this._$AM._$AU;
|
|
337
337
|
}
|
|
338
338
|
u(t) {
|
|
339
|
-
const { el: { content: e }, parts:
|
|
340
|
-
P.currentNode =
|
|
341
|
-
let o = P.nextNode(), a = 0, c = 0, n =
|
|
339
|
+
const { el: { content: e }, parts: r } = this._$AD, i = (t?.creationScope ?? R).importNode(e, !0);
|
|
340
|
+
P.currentNode = i;
|
|
341
|
+
let o = P.nextNode(), a = 0, c = 0, n = r[0];
|
|
342
342
|
for (; n !== void 0; ) {
|
|
343
343
|
if (a === n.index) {
|
|
344
344
|
let d;
|
|
345
|
-
n.type === 2 ? d = new M(o, o.nextSibling, this, t) : n.type === 1 ? d = new n.ctor(o, n.name, n.strings, this, t) : n.type === 6 && (d = new ge(o, this, t)), this._$AV.push(d), n =
|
|
345
|
+
n.type === 2 ? d = new M(o, o.nextSibling, this, t) : n.type === 1 ? d = new n.ctor(o, n.name, n.strings, this, t) : n.type === 6 && (d = new ge(o, this, t)), this._$AV.push(d), n = r[++c];
|
|
346
346
|
}
|
|
347
347
|
a !== n?.index && (o = P.nextNode(), a++);
|
|
348
348
|
}
|
|
349
|
-
return P.currentNode = R,
|
|
349
|
+
return P.currentNode = R, i;
|
|
350
350
|
}
|
|
351
351
|
p(t) {
|
|
352
352
|
let e = 0;
|
|
353
|
-
for (const
|
|
353
|
+
for (const r of this._$AV) r !== void 0 && (r.strings !== void 0 ? (r._$AI(t, r, e), e += r.strings.length - 2) : r._$AI(t[e])), e++;
|
|
354
354
|
}
|
|
355
355
|
};
|
|
356
356
|
class M {
|
|
357
357
|
get _$AU() {
|
|
358
358
|
return this._$AM?._$AU ?? this._$Cv;
|
|
359
359
|
}
|
|
360
|
-
constructor(t, e,
|
|
361
|
-
this.type = 2, this._$AH = v, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM =
|
|
360
|
+
constructor(t, e, r, i) {
|
|
361
|
+
this.type = 2, this._$AH = v, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = r, this.options = i, this._$Cv = i?.isConnected ?? !0;
|
|
362
362
|
}
|
|
363
363
|
get parentNode() {
|
|
364
364
|
let t = this._$AA.parentNode;
|
|
@@ -384,10 +384,10 @@ class M {
|
|
|
384
384
|
this._$AH !== v && L(this._$AH) ? this._$AA.nextSibling.data = t : this.T(R.createTextNode(t)), this._$AH = t;
|
|
385
385
|
}
|
|
386
386
|
$(t) {
|
|
387
|
-
const { values: e, _$litType$:
|
|
388
|
-
if (this._$AH?._$AD ===
|
|
387
|
+
const { values: e, _$litType$: r } = t, i = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = B.createElement(Ft(r.h, r.h[0]), this.options)), r);
|
|
388
|
+
if (this._$AH?._$AD === i) this._$AH.p(e);
|
|
389
389
|
else {
|
|
390
|
-
const o = new ve(
|
|
390
|
+
const o = new ve(i, this), a = o.u(this.options);
|
|
391
391
|
o.p(e), this.T(a), this._$AH = o;
|
|
392
392
|
}
|
|
393
393
|
}
|
|
@@ -398,14 +398,14 @@ class M {
|
|
|
398
398
|
k(t) {
|
|
399
399
|
yt(this._$AH) || (this._$AH = [], this._$AR());
|
|
400
400
|
const e = this._$AH;
|
|
401
|
-
let
|
|
402
|
-
for (const o of t)
|
|
403
|
-
|
|
401
|
+
let r, i = 0;
|
|
402
|
+
for (const o of t) i === e.length ? e.push(r = new M(this.O(H()), this.O(H()), this, this.options)) : r = e[i], r._$AI(o), i++;
|
|
403
|
+
i < e.length && (this._$AR(r && r._$AB.nextSibling, i), e.length = i);
|
|
404
404
|
}
|
|
405
405
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
406
406
|
for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
|
|
407
|
-
const
|
|
408
|
-
t.remove(), t =
|
|
407
|
+
const r = t.nextSibling;
|
|
408
|
+
t.remove(), t = r;
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
411
|
setConnected(t) {
|
|
@@ -419,19 +419,19 @@ class Q {
|
|
|
419
419
|
get _$AU() {
|
|
420
420
|
return this._$AM._$AU;
|
|
421
421
|
}
|
|
422
|
-
constructor(t, e,
|
|
423
|
-
this.type = 1, this._$AH = v, this._$AN = void 0, this.element = t, this.name = e, this._$AM =
|
|
422
|
+
constructor(t, e, r, i, o) {
|
|
423
|
+
this.type = 1, this._$AH = v, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = o, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = v;
|
|
424
424
|
}
|
|
425
|
-
_$AI(t, e = this,
|
|
425
|
+
_$AI(t, e = this, r, i) {
|
|
426
426
|
const o = this.strings;
|
|
427
427
|
let a = !1;
|
|
428
428
|
if (o === void 0) t = O(this, t, e, 0), a = !L(t) || t !== this._$AH && t !== C, a && (this._$AH = t);
|
|
429
429
|
else {
|
|
430
430
|
const c = t;
|
|
431
431
|
let n, d;
|
|
432
|
-
for (t = o[0], n = 0; n < o.length - 1; n++) d = O(this, c[
|
|
432
|
+
for (t = o[0], n = 0; n < o.length - 1; n++) d = O(this, c[r + n], e, n), d === C && (d = this._$AH[n]), a ||= !L(d) || d !== this._$AH[n], d === v ? t = v : t !== v && (t += (d ?? "") + o[n + 1]), this._$AH[n] = d;
|
|
433
433
|
}
|
|
434
|
-
a && !
|
|
434
|
+
a && !i && this.j(t);
|
|
435
435
|
}
|
|
436
436
|
j(t) {
|
|
437
437
|
t === v ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
@@ -454,21 +454,21 @@ class be extends Q {
|
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
456
|
class ye extends Q {
|
|
457
|
-
constructor(t, e,
|
|
458
|
-
super(t, e,
|
|
457
|
+
constructor(t, e, r, i, o) {
|
|
458
|
+
super(t, e, r, i, o), this.type = 5;
|
|
459
459
|
}
|
|
460
460
|
_$AI(t, e = this) {
|
|
461
461
|
if ((t = O(this, t, e, 0) ?? v) === C) return;
|
|
462
|
-
const
|
|
463
|
-
|
|
462
|
+
const r = this._$AH, i = t === v && r !== v || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, o = t !== v && (r === v || i);
|
|
463
|
+
i && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
464
464
|
}
|
|
465
465
|
handleEvent(t) {
|
|
466
466
|
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
class ge {
|
|
470
|
-
constructor(t, e,
|
|
471
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options =
|
|
470
|
+
constructor(t, e, r) {
|
|
471
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = r;
|
|
472
472
|
}
|
|
473
473
|
get _$AU() {
|
|
474
474
|
return this._$AM._$AU;
|
|
@@ -480,13 +480,13 @@ class ge {
|
|
|
480
480
|
const _e = { I: M }, $e = bt.litHtmlPolyfillSupport;
|
|
481
481
|
$e?.(B, M), (bt.litHtmlVersions ??= []).push("3.3.1");
|
|
482
482
|
const xe = (s, t, e) => {
|
|
483
|
-
const
|
|
484
|
-
let
|
|
485
|
-
if (
|
|
483
|
+
const r = e?.renderBefore ?? t;
|
|
484
|
+
let i = r._$litPart$;
|
|
485
|
+
if (i === void 0) {
|
|
486
486
|
const o = e?.renderBefore ?? null;
|
|
487
|
-
|
|
487
|
+
r._$litPart$ = i = new M(t.insertBefore(H(), o), o, void 0, e ?? {});
|
|
488
488
|
}
|
|
489
|
-
return
|
|
489
|
+
return i._$AI(s), i;
|
|
490
490
|
};
|
|
491
491
|
/**
|
|
492
492
|
* @license
|
|
@@ -536,9 +536,9 @@ const S = (s) => (t, e) => {
|
|
|
536
536
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
537
537
|
*/
|
|
538
538
|
const we = { attribute: !0, type: String, converter: Z, reflect: !1, hasChanged: mt }, Ce = (s = we, t, e) => {
|
|
539
|
-
const { kind:
|
|
540
|
-
let o = globalThis.litPropertyMetadata.get(
|
|
541
|
-
if (o === void 0 && globalThis.litPropertyMetadata.set(
|
|
539
|
+
const { kind: r, metadata: i } = e;
|
|
540
|
+
let o = globalThis.litPropertyMetadata.get(i);
|
|
541
|
+
if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), r === "setter" && ((s = Object.create(s)).wrapped = !0), o.set(e.name, s), r === "accessor") {
|
|
542
542
|
const { name: a } = e;
|
|
543
543
|
return { set(c) {
|
|
544
544
|
const n = t.get.call(this);
|
|
@@ -547,19 +547,19 @@ const we = { attribute: !0, type: String, converter: Z, reflect: !1, hasChanged:
|
|
|
547
547
|
return c !== void 0 && this.C(a, void 0, s, c), c;
|
|
548
548
|
} };
|
|
549
549
|
}
|
|
550
|
-
if (
|
|
550
|
+
if (r === "setter") {
|
|
551
551
|
const { name: a } = e;
|
|
552
552
|
return function(c) {
|
|
553
553
|
const n = this[a];
|
|
554
554
|
t.call(this, c), this.requestUpdate(a, n, s);
|
|
555
555
|
};
|
|
556
556
|
}
|
|
557
|
-
throw Error("Unsupported decorator location: " +
|
|
557
|
+
throw Error("Unsupported decorator location: " + r);
|
|
558
558
|
};
|
|
559
559
|
function m(s) {
|
|
560
|
-
return (t, e) => typeof e == "object" ? Ce(s, t, e) : ((
|
|
561
|
-
const a =
|
|
562
|
-
return
|
|
560
|
+
return (t, e) => typeof e == "object" ? Ce(s, t, e) : ((r, i, o) => {
|
|
561
|
+
const a = i.hasOwnProperty(o);
|
|
562
|
+
return i.constructor.createProperty(o, r), a ? Object.getOwnPropertyDescriptor(i, o) : void 0;
|
|
563
563
|
})(s, t, e);
|
|
564
564
|
}
|
|
565
565
|
/**
|
|
@@ -582,9 +582,9 @@ const _t = (s, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorat
|
|
|
582
582
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
583
583
|
*/
|
|
584
584
|
function tt(s, t) {
|
|
585
|
-
return (e,
|
|
585
|
+
return (e, r, i) => {
|
|
586
586
|
const o = (a) => a.renderRoot?.querySelector(s) ?? null;
|
|
587
|
-
return _t(e,
|
|
587
|
+
return _t(e, r, { get() {
|
|
588
588
|
return o(this);
|
|
589
589
|
} });
|
|
590
590
|
};
|
|
@@ -596,10 +596,10 @@ function tt(s, t) {
|
|
|
596
596
|
*/
|
|
597
597
|
function jt(s) {
|
|
598
598
|
return (t, e) => {
|
|
599
|
-
const { slot:
|
|
599
|
+
const { slot: r, selector: i } = s ?? {}, o = "slot" + (r ? `[name=${r}]` : ":not([name])");
|
|
600
600
|
return _t(t, e, { get() {
|
|
601
601
|
const a = this.renderRoot?.querySelector(o), c = a?.assignedElements(s) ?? [];
|
|
602
|
-
return
|
|
602
|
+
return i === void 0 ? c : c.filter(((n) => n.matches(i)));
|
|
603
603
|
} });
|
|
604
604
|
};
|
|
605
605
|
}
|
|
@@ -610,9 +610,9 @@ function jt(s) {
|
|
|
610
610
|
*/
|
|
611
611
|
function Ee(s) {
|
|
612
612
|
return (t, e) => {
|
|
613
|
-
const { slot:
|
|
613
|
+
const { slot: r } = s ?? {}, i = "slot" + (r ? `[name=${r}]` : ":not([name])");
|
|
614
614
|
return _t(t, e, { get() {
|
|
615
|
-
return this.renderRoot?.querySelector(
|
|
615
|
+
return this.renderRoot?.querySelector(i)?.assignedNodes(s) ?? [];
|
|
616
616
|
} });
|
|
617
617
|
};
|
|
618
618
|
}
|
|
@@ -628,8 +628,8 @@ class Gt {
|
|
|
628
628
|
get _$AU() {
|
|
629
629
|
return this._$AM._$AU;
|
|
630
630
|
}
|
|
631
|
-
_$AT(t, e,
|
|
632
|
-
this._$Ct = t, this._$AM = e, this._$Ci =
|
|
631
|
+
_$AT(t, e, r) {
|
|
632
|
+
this._$Ct = t, this._$AM = e, this._$Ci = r;
|
|
633
633
|
}
|
|
634
634
|
_$AS(t, e) {
|
|
635
635
|
return this.update(t, e);
|
|
@@ -644,9 +644,9 @@ class Gt {
|
|
|
644
644
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
645
645
|
*/
|
|
646
646
|
const { I: Se } = _e, Mt = () => document.createComment(""), D = (s, t, e) => {
|
|
647
|
-
const
|
|
647
|
+
const r = s._$AA.parentNode, i = t === void 0 ? s._$AB : t._$AA;
|
|
648
648
|
if (e === void 0) {
|
|
649
|
-
const o =
|
|
649
|
+
const o = r.insertBefore(Mt(), i), a = r.insertBefore(Mt(), i);
|
|
650
650
|
e = new Se(o, a, s, s.options);
|
|
651
651
|
} else {
|
|
652
652
|
const o = e._$AB.nextSibling, a = e._$AM, c = a !== s;
|
|
@@ -654,11 +654,11 @@ const { I: Se } = _e, Mt = () => document.createComment(""), D = (s, t, e) => {
|
|
|
654
654
|
let n;
|
|
655
655
|
e._$AQ?.(s), e._$AM = s, e._$AP !== void 0 && (n = s._$AU) !== a._$AU && e._$AP(n);
|
|
656
656
|
}
|
|
657
|
-
if (o !==
|
|
657
|
+
if (o !== i || c) {
|
|
658
658
|
let n = e._$AA;
|
|
659
659
|
for (; n !== o; ) {
|
|
660
660
|
const d = n.nextSibling;
|
|
661
|
-
|
|
661
|
+
r.insertBefore(n, i), n = d;
|
|
662
662
|
}
|
|
663
663
|
}
|
|
664
664
|
}
|
|
@@ -672,60 +672,60 @@ const { I: Se } = _e, Mt = () => document.createComment(""), D = (s, t, e) => {
|
|
|
672
672
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
673
673
|
*/
|
|
674
674
|
const Nt = (s, t, e) => {
|
|
675
|
-
const
|
|
676
|
-
for (let
|
|
677
|
-
return
|
|
675
|
+
const r = /* @__PURE__ */ new Map();
|
|
676
|
+
for (let i = t; i <= e; i++) r.set(s[i], i);
|
|
677
|
+
return r;
|
|
678
678
|
}, Re = Vt(class extends Gt {
|
|
679
679
|
constructor(s) {
|
|
680
680
|
if (super(s), s.type !== Wt.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
681
681
|
}
|
|
682
682
|
dt(s, t, e) {
|
|
683
|
-
let
|
|
684
|
-
e === void 0 ? e = t : t !== void 0 && (
|
|
685
|
-
const
|
|
683
|
+
let r;
|
|
684
|
+
e === void 0 ? e = t : t !== void 0 && (r = t);
|
|
685
|
+
const i = [], o = [];
|
|
686
686
|
let a = 0;
|
|
687
|
-
for (const c of s)
|
|
688
|
-
return { values: o, keys:
|
|
687
|
+
for (const c of s) i[a] = r ? r(c, a) : a, o[a] = e(c, a), a++;
|
|
688
|
+
return { values: o, keys: i };
|
|
689
689
|
}
|
|
690
690
|
render(s, t, e) {
|
|
691
691
|
return this.dt(s, t, e).values;
|
|
692
692
|
}
|
|
693
|
-
update(s, [t, e,
|
|
694
|
-
const
|
|
695
|
-
if (!Array.isArray(
|
|
693
|
+
update(s, [t, e, r]) {
|
|
694
|
+
const i = Pe(s), { values: o, keys: a } = this.dt(t, e, r);
|
|
695
|
+
if (!Array.isArray(i)) return this.ut = a, o;
|
|
696
696
|
const c = this.ut ??= [], n = [];
|
|
697
|
-
let d, p, l = 0, f =
|
|
698
|
-
for (; l <= f && u <= b; ) if (
|
|
699
|
-
else if (
|
|
700
|
-
else if (c[l] === a[u]) n[u] = I(
|
|
701
|
-
else if (c[f] === a[b]) n[b] = I(
|
|
702
|
-
else if (c[l] === a[b]) n[b] = I(
|
|
703
|
-
else if (c[f] === a[u]) n[u] = I(
|
|
697
|
+
let d, p, l = 0, f = i.length - 1, u = 0, b = o.length - 1;
|
|
698
|
+
for (; l <= f && u <= b; ) if (i[l] === null) l++;
|
|
699
|
+
else if (i[f] === null) f--;
|
|
700
|
+
else if (c[l] === a[u]) n[u] = I(i[l], o[u]), l++, u++;
|
|
701
|
+
else if (c[f] === a[b]) n[b] = I(i[f], o[b]), f--, b--;
|
|
702
|
+
else if (c[l] === a[b]) n[b] = I(i[l], o[b]), D(s, n[b + 1], i[l]), l++, b--;
|
|
703
|
+
else if (c[f] === a[u]) n[u] = I(i[f], o[u]), D(s, i[l], i[f]), f--, u++;
|
|
704
704
|
else if (d === void 0 && (d = Nt(a, u, b), p = Nt(c, l, f)), d.has(c[l])) if (d.has(c[f])) {
|
|
705
|
-
const x = p.get(a[u]),
|
|
706
|
-
if (
|
|
707
|
-
const At = D(s,
|
|
705
|
+
const x = p.get(a[u]), rt = x !== void 0 ? i[x] : null;
|
|
706
|
+
if (rt === null) {
|
|
707
|
+
const At = D(s, i[l]);
|
|
708
708
|
I(At, o[u]), n[u] = At;
|
|
709
|
-
} else n[u] = I(
|
|
709
|
+
} else n[u] = I(rt, o[u]), D(s, i[l], rt), i[x] = null;
|
|
710
710
|
u++;
|
|
711
|
-
} else st(
|
|
712
|
-
else st(
|
|
711
|
+
} else st(i[f]), f--;
|
|
712
|
+
else st(i[l]), l++;
|
|
713
713
|
for (; u <= b; ) {
|
|
714
714
|
const x = D(s, n[b + 1]);
|
|
715
715
|
I(x, o[u]), n[u++] = x;
|
|
716
716
|
}
|
|
717
717
|
for (; l <= f; ) {
|
|
718
|
-
const x =
|
|
718
|
+
const x = i[l++];
|
|
719
719
|
x !== null && st(x);
|
|
720
720
|
}
|
|
721
721
|
return this.ut = a, Ie(s, n), C;
|
|
722
722
|
}
|
|
723
723
|
});
|
|
724
|
-
function h(s, t, e,
|
|
725
|
-
var
|
|
726
|
-
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(s, t, e,
|
|
727
|
-
else for (var c = s.length - 1; c >= 0; c--) (a = s[c]) && (o = (
|
|
728
|
-
return
|
|
724
|
+
function h(s, t, e, r) {
|
|
725
|
+
var i = arguments.length, o = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, e) : r, a;
|
|
726
|
+
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") o = Reflect.decorate(s, t, e, r);
|
|
727
|
+
else for (var c = s.length - 1; c >= 0; c--) (a = s[c]) && (o = (i < 3 ? a(o) : i > 3 ? a(t, e, o) : a(t, e)) || o);
|
|
728
|
+
return i > 3 && o && Object.defineProperty(t, e, o), o;
|
|
729
729
|
}
|
|
730
730
|
/**
|
|
731
731
|
* @license
|
|
@@ -932,8 +932,8 @@ class $t extends g {
|
|
|
932
932
|
}
|
|
933
933
|
}
|
|
934
934
|
onControlChange(t, e) {
|
|
935
|
-
for (const
|
|
936
|
-
t?.removeEventListener(
|
|
935
|
+
for (const r of De)
|
|
936
|
+
t?.removeEventListener(r, this), e?.addEventListener(r, this);
|
|
937
937
|
}
|
|
938
938
|
update(t) {
|
|
939
939
|
t.has("visible") && this.dispatchEvent(new Event("visibility-changed")), super.update(t);
|
|
@@ -978,15 +978,15 @@ const Zt = Vt(class extends Gt {
|
|
|
978
978
|
}
|
|
979
979
|
update(s, [t]) {
|
|
980
980
|
if (this.st === void 0) {
|
|
981
|
-
this.st = /* @__PURE__ */ new Set(), s.strings !== void 0 && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter(((
|
|
982
|
-
for (const
|
|
981
|
+
this.st = /* @__PURE__ */ new Set(), s.strings !== void 0 && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter(((r) => r !== ""))));
|
|
982
|
+
for (const r in t) t[r] && !this.nt?.has(r) && this.st.add(r);
|
|
983
983
|
return this.render(t);
|
|
984
984
|
}
|
|
985
985
|
const e = s.element.classList;
|
|
986
|
-
for (const
|
|
987
|
-
for (const
|
|
988
|
-
const
|
|
989
|
-
|
|
986
|
+
for (const r of this.st) r in t || (e.remove(r), this.st.delete(r));
|
|
987
|
+
for (const r in t) {
|
|
988
|
+
const i = !!t[r];
|
|
989
|
+
i === this.st.has(r) || this.nt?.has(r) || (i ? (e.add(r), this.st.add(r)) : (e.remove(r), this.st.delete(r)));
|
|
990
990
|
}
|
|
991
991
|
return C;
|
|
992
992
|
}
|
|
@@ -1107,27 +1107,27 @@ class j extends g {
|
|
|
1107
1107
|
this.disabled || this.endPressAnimation();
|
|
1108
1108
|
}
|
|
1109
1109
|
determineRippleSize() {
|
|
1110
|
-
const { height: t, width: e } = this.getBoundingClientRect(),
|
|
1110
|
+
const { height: t, width: e } = this.getBoundingClientRect(), r = Math.max(t, e), i = Math.max(je * r, Fe), o = this.currentCSSZoom ?? 1, a = Math.floor(r * Le / o), n = Math.sqrt(e ** 2 + t ** 2) + Be;
|
|
1111
1111
|
this.initialSize = a;
|
|
1112
|
-
const d = (n +
|
|
1112
|
+
const d = (n + i) / a;
|
|
1113
1113
|
this.rippleScale = `${d / o}`, this.rippleSize = `${a}px`;
|
|
1114
1114
|
}
|
|
1115
1115
|
getNormalizedPointerEventCoords(t) {
|
|
1116
|
-
const { scrollX: e, scrollY:
|
|
1116
|
+
const { scrollX: e, scrollY: r } = window, { left: i, top: o } = this.getBoundingClientRect(), a = e + i, c = r + o, { pageX: n, pageY: d } = t, p = this.currentCSSZoom ?? 1;
|
|
1117
1117
|
return {
|
|
1118
1118
|
x: (n - a) / p,
|
|
1119
1119
|
y: (d - c) / p
|
|
1120
1120
|
};
|
|
1121
1121
|
}
|
|
1122
1122
|
getTranslationCoordinates(t) {
|
|
1123
|
-
const { height: e, width:
|
|
1124
|
-
x: (
|
|
1125
|
-
y: (e /
|
|
1123
|
+
const { height: e, width: r } = this.getBoundingClientRect(), i = this.currentCSSZoom ?? 1, o = {
|
|
1124
|
+
x: (r / i - this.initialSize) / 2,
|
|
1125
|
+
y: (e / i - this.initialSize) / 2
|
|
1126
1126
|
};
|
|
1127
1127
|
let a;
|
|
1128
1128
|
return t instanceof PointerEvent ? a = this.getNormalizedPointerEventCoords(t) : a = {
|
|
1129
|
-
x:
|
|
1130
|
-
y: e /
|
|
1129
|
+
x: r / i / 2,
|
|
1130
|
+
y: e / i / 2
|
|
1131
1131
|
}, a = {
|
|
1132
1132
|
x: a.x - this.initialSize / 2,
|
|
1133
1133
|
y: a.y - this.initialSize / 2
|
|
@@ -1137,14 +1137,14 @@ class j extends g {
|
|
|
1137
1137
|
if (!this.mdRoot)
|
|
1138
1138
|
return;
|
|
1139
1139
|
this.pressed = !0, this.growAnimation?.cancel(), this.determineRippleSize();
|
|
1140
|
-
const { startPoint: e, endPoint:
|
|
1140
|
+
const { startPoint: e, endPoint: r } = this.getTranslationCoordinates(t), i = `${e.x}px, ${e.y}px`, o = `${r.x}px, ${r.y}px`;
|
|
1141
1141
|
this.growAnimation = this.mdRoot.animate({
|
|
1142
1142
|
top: [0, 0],
|
|
1143
1143
|
left: [0, 0],
|
|
1144
1144
|
height: [this.rippleSize, this.rippleSize],
|
|
1145
1145
|
width: [this.rippleSize, this.rippleSize],
|
|
1146
1146
|
transform: [
|
|
1147
|
-
`translate(${
|
|
1147
|
+
`translate(${i}) scale(1)`,
|
|
1148
1148
|
`translate(${o}) scale(${this.rippleScale})`
|
|
1149
1149
|
]
|
|
1150
1150
|
}, {
|
|
@@ -1162,8 +1162,8 @@ class j extends g {
|
|
|
1162
1162
|
this.pressed = !1;
|
|
1163
1163
|
return;
|
|
1164
1164
|
}
|
|
1165
|
-
await new Promise((
|
|
1166
|
-
setTimeout(
|
|
1165
|
+
await new Promise((r) => {
|
|
1166
|
+
setTimeout(r, Dt - e);
|
|
1167
1167
|
}), this.growAnimation === t && (this.pressed = !1);
|
|
1168
1168
|
}
|
|
1169
1169
|
/**
|
|
@@ -1214,8 +1214,8 @@ class j extends g {
|
|
|
1214
1214
|
}
|
|
1215
1215
|
}
|
|
1216
1216
|
onControlChange(t, e) {
|
|
1217
|
-
for (const
|
|
1218
|
-
t?.removeEventListener(
|
|
1217
|
+
for (const r of Ge)
|
|
1218
|
+
t?.removeEventListener(r, this), e?.addEventListener(r, this);
|
|
1219
1219
|
}
|
|
1220
1220
|
}
|
|
1221
1221
|
h([
|
|
@@ -1255,10 +1255,10 @@ dt = h([
|
|
|
1255
1255
|
*/
|
|
1256
1256
|
const V = Symbol("isFocusable"), ot = Symbol("privateIsFocusable"), G = Symbol("externalTabIndex"), K = Symbol("isUpdatingTabIndex"), q = Symbol("updateTabIndex");
|
|
1257
1257
|
function Ze(s) {
|
|
1258
|
-
var t, e,
|
|
1259
|
-
class
|
|
1258
|
+
var t, e, r;
|
|
1259
|
+
class i extends s {
|
|
1260
1260
|
constructor() {
|
|
1261
|
-
super(...arguments), this[t] = !0, this[e] = null, this[
|
|
1261
|
+
super(...arguments), this[t] = !0, this[e] = null, this[r] = !1;
|
|
1262
1262
|
}
|
|
1263
1263
|
get [V]() {
|
|
1264
1264
|
return this[ot];
|
|
@@ -1282,14 +1282,14 @@ function Ze(s) {
|
|
|
1282
1282
|
this[G] = this.tabIndex;
|
|
1283
1283
|
}
|
|
1284
1284
|
}
|
|
1285
|
-
[(t = ot, e = G,
|
|
1285
|
+
[(t = ot, e = G, r = K, q)]() {
|
|
1286
1286
|
const a = this[V] ? 0 : -1, c = this[G] ?? a;
|
|
1287
1287
|
this[K] = !0, this.tabIndex = c, this[K] = !1;
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
1290
|
return h([
|
|
1291
1291
|
m({ noAccessor: !0 })
|
|
1292
|
-
],
|
|
1292
|
+
], i.prototype, "tabIndex", void 0), i;
|
|
1293
1293
|
}
|
|
1294
1294
|
/**
|
|
1295
1295
|
* @license
|
|
@@ -1348,8 +1348,8 @@ class _ extends Xe {
|
|
|
1348
1348
|
[Jt](t) {
|
|
1349
1349
|
if (!this.indicator)
|
|
1350
1350
|
return;
|
|
1351
|
-
this.indicator.getAnimations().forEach((
|
|
1352
|
-
|
|
1351
|
+
this.indicator.getAnimations().forEach((r) => {
|
|
1352
|
+
r.cancel();
|
|
1353
1353
|
});
|
|
1354
1354
|
const e = this.getKeyframes(t);
|
|
1355
1355
|
e !== null && this.indicator.animate(e, {
|
|
@@ -1361,8 +1361,8 @@ class _ extends Xe {
|
|
|
1361
1361
|
const e = Je();
|
|
1362
1362
|
if (!this.active)
|
|
1363
1363
|
return e ? [{ opacity: 1 }, { transform: "none" }] : null;
|
|
1364
|
-
const
|
|
1365
|
-
return !e && o !== void 0 && n !== void 0 && !isNaN(p) ?
|
|
1364
|
+
const r = {}, i = t.indicator?.getBoundingClientRect() ?? {}, o = i.left, a = i.width, c = this.indicator.getBoundingClientRect(), n = c.left, d = c.width, p = a / d;
|
|
1365
|
+
return !e && o !== void 0 && n !== void 0 && !isNaN(p) ? r.transform = `translateX(${(o - n).toFixed(4)}px) scaleX(${p.toFixed(4)})` : r.opacity = 0, [r, { transform: "none" }];
|
|
1366
1366
|
}
|
|
1367
1367
|
handleSlotChange() {
|
|
1368
1368
|
this.iconOnly = !1;
|
|
@@ -1434,8 +1434,8 @@ class N extends g {
|
|
|
1434
1434
|
}
|
|
1435
1435
|
set activeTabIndex(t) {
|
|
1436
1436
|
const e = () => {
|
|
1437
|
-
const
|
|
1438
|
-
|
|
1437
|
+
const r = this.tabs[t];
|
|
1438
|
+
r && this.activateTab(r);
|
|
1439
1439
|
};
|
|
1440
1440
|
if (!this.slotElement) {
|
|
1441
1441
|
this.updateComplete.then(e);
|
|
@@ -1465,7 +1465,7 @@ class N extends g {
|
|
|
1465
1465
|
return;
|
|
1466
1466
|
for (const f of this.tabs)
|
|
1467
1467
|
await f.updateComplete;
|
|
1468
|
-
const
|
|
1468
|
+
const r = t.offsetLeft, i = t.offsetWidth, o = this.scrollLeft, a = this.offsetWidth, c = 48, n = r - c, d = r + i - a + c, p = Math.min(n, Math.max(d, o)), l = this.focusedTab ? "auto" : "instant";
|
|
1469
1469
|
this.tabsScrollerElement.scrollTo({ behavior: l, top: 0, left: p });
|
|
1470
1470
|
}
|
|
1471
1471
|
render() {
|
|
@@ -1483,17 +1483,17 @@ class N extends g {
|
|
|
1483
1483
|
await 0, !(t.defaultPrevented || !Qe(e) || e.active) && this.activateTab(e);
|
|
1484
1484
|
}
|
|
1485
1485
|
activateTab(t) {
|
|
1486
|
-
const { tabs: e } = this,
|
|
1487
|
-
if (!(!e.includes(t) ||
|
|
1488
|
-
for (const
|
|
1489
|
-
|
|
1490
|
-
if (
|
|
1486
|
+
const { tabs: e } = this, r = this.activeTab;
|
|
1487
|
+
if (!(!e.includes(t) || r === t)) {
|
|
1488
|
+
for (const i of e)
|
|
1489
|
+
i.active = i === t;
|
|
1490
|
+
if (r) {
|
|
1491
1491
|
if (!this.dispatchEvent(new Event("change", { bubbles: !0, cancelable: !0 }))) {
|
|
1492
1492
|
for (const o of e)
|
|
1493
|
-
o.active = o ===
|
|
1493
|
+
o.active = o === r;
|
|
1494
1494
|
return;
|
|
1495
1495
|
}
|
|
1496
|
-
t[Jt](
|
|
1496
|
+
t[Jt](r);
|
|
1497
1497
|
}
|
|
1498
1498
|
this.updateFocusableTab(t), this.scrollToTab(t);
|
|
1499
1499
|
}
|
|
@@ -1505,18 +1505,18 @@ class N extends g {
|
|
|
1505
1505
|
// focus item on keydown and optionally select it
|
|
1506
1506
|
async handleKeydown(t) {
|
|
1507
1507
|
await 0;
|
|
1508
|
-
const e = t.key === "ArrowLeft",
|
|
1509
|
-
if (t.defaultPrevented || !e && !
|
|
1508
|
+
const e = t.key === "ArrowLeft", r = t.key === "ArrowRight", i = t.key === "Home", o = t.key === "End";
|
|
1509
|
+
if (t.defaultPrevented || !e && !r && !i && !o)
|
|
1510
1510
|
return;
|
|
1511
1511
|
const { tabs: a } = this;
|
|
1512
1512
|
if (a.length < 2)
|
|
1513
1513
|
return;
|
|
1514
1514
|
t.preventDefault();
|
|
1515
1515
|
let c;
|
|
1516
|
-
if (
|
|
1517
|
-
c =
|
|
1516
|
+
if (i || o)
|
|
1517
|
+
c = i ? 0 : a.length - 1;
|
|
1518
1518
|
else {
|
|
1519
|
-
const p = getComputedStyle(this).direction === "rtl" ? e :
|
|
1519
|
+
const p = getComputedStyle(this).direction === "rtl" ? e : r, { focusedTab: l } = this;
|
|
1520
1520
|
if (!l)
|
|
1521
1521
|
c = p ? 0 : a.length - 1;
|
|
1522
1522
|
else {
|
|
@@ -1565,7 +1565,7 @@ function Qe(s) {
|
|
|
1565
1565
|
* Copyright 2024 Google LLC
|
|
1566
1566
|
* SPDX-License-Identifier: Apache-2.0
|
|
1567
1567
|
*/
|
|
1568
|
-
const
|
|
1568
|
+
const tr = $`:host{box-sizing:border-box;display:flex;flex-direction:column;overflow:auto;scroll-behavior:smooth;scrollbar-width:none;position:relative}:host([hidden]){display:none}:host::-webkit-scrollbar{display:none}.tabs{align-items:end;display:flex;height:100%;overflow:inherit;scroll-behavior:inherit;scrollbar-width:inherit;justify-content:space-between;width:100%}::slotted(*){flex:1}::slotted([active]){z-index:1}
|
|
1569
1569
|
`;
|
|
1570
1570
|
/**
|
|
1571
1571
|
* @license
|
|
@@ -1574,7 +1574,7 @@ const ti = $`:host{box-sizing:border-box;display:flex;flex-direction:column;over
|
|
|
1574
1574
|
*/
|
|
1575
1575
|
let ht = class extends N {
|
|
1576
1576
|
};
|
|
1577
|
-
ht.styles = [
|
|
1577
|
+
ht.styles = [tr];
|
|
1578
1578
|
ht = h([
|
|
1579
1579
|
S("mdif4-tabs")
|
|
1580
1580
|
], ht);
|
|
@@ -1602,7 +1602,7 @@ h([
|
|
|
1602
1602
|
* Copyright 2024 Google LLC
|
|
1603
1603
|
* SPDX-License-Identifier: Apache-2.0
|
|
1604
1604
|
*/
|
|
1605
|
-
const
|
|
1605
|
+
const er = $`:host{--_active-indicator-color: var(--mdif4-primary-tab-active-indicator-color, var(--mdif4-sys-color-primary, #6750a4));--_active-indicator-height: var(--mdif4-primary-tab-active-indicator-height, 3px);--_active-indicator-shape: var(--mdif4-primary-tab-active-indicator-shape, 3px 3px 0px 0px);--_active-hover-state-layer-color: var(--mdif4-primary-tab-active-hover-state-layer-color, var(--mdif4-sys-color-primary, #6750a4));--_active-hover-state-layer-opacity: var(--mdif4-primary-tab-active-hover-state-layer-opacity, 0.08);--_active-pressed-state-layer-color: var(--mdif4-primary-tab-active-pressed-state-layer-color, var(--mdif4-sys-color-primary, #6750a4));--_active-pressed-state-layer-opacity: var(--mdif4-primary-tab-active-pressed-state-layer-opacity, 0.12);--_container-color: var(--mdif4-primary-tab-container-color, var(--mdif4-sys-color-surface, #fef7ff));--_container-elevation: var(--mdif4-primary-tab-container-elevation, 0);--_container-height: var(--mdif4-primary-tab-container-height, 48px);--_with-icon-and-label-text-container-height: var(--mdif4-primary-tab-with-icon-and-label-text-container-height, 64px);--_hover-state-layer-color: var(--mdif4-primary-tab-hover-state-layer-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--mdif4-primary-tab-hover-state-layer-opacity, 0.08);--_pressed-state-layer-color: var(--mdif4-primary-tab-pressed-state-layer-color, var(--mdif4-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--mdif4-primary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--mdif4-primary-tab-active-focus-icon-color, var(--mdif4-sys-color-primary, #6750a4));--_active-hover-icon-color: var(--mdif4-primary-tab-active-hover-icon-color, var(--mdif4-sys-color-primary, #6750a4));--_active-icon-color: var(--mdif4-primary-tab-active-icon-color, var(--mdif4-sys-color-primary, #6750a4));--_active-pressed-icon-color: var(--mdif4-primary-tab-active-pressed-icon-color, var(--mdif4-sys-color-primary, #6750a4));--_icon-size: var(--mdif4-primary-tab-icon-size, 24px);--_focus-icon-color: var(--mdif4-primary-tab-focus-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--mdif4-primary-tab-hover-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_icon-color: var(--mdif4-primary-tab-icon-color, var(--mdif4-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--mdif4-primary-tab-pressed-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_label-text-font: var(--mdif4-primary-tab-label-text-font, var(--mdif4-sys-typescale-title-small-font, var(--mdif4-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--mdif4-primary-tab-label-text-line-height, var(--mdif4-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--mdif4-primary-tab-label-text-size, var(--mdif4-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--mdif4-primary-tab-label-text-weight, var(--mdif4-sys-typescale-title-small-weight, var(--mdif4-ref-typeface-weight-medium, 500)));--_active-focus-label-text-color: var(--mdif4-primary-tab-active-focus-label-text-color, var(--mdif4-sys-color-primary, #6750a4));--_active-hover-label-text-color: var(--mdif4-primary-tab-active-hover-label-text-color, var(--mdif4-sys-color-primary, #6750a4));--_active-label-text-color: var(--mdif4-primary-tab-active-label-text-color, var(--mdif4-sys-color-primary, #6750a4));--_active-pressed-label-text-color: var(--mdif4-primary-tab-active-pressed-label-text-color, var(--mdif4-sys-color-primary, #6750a4));--_focus-label-text-color: var(--mdif4-primary-tab-focus-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--mdif4-primary-tab-hover-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_label-text-color: var(--mdif4-primary-tab-label-text-color, var(--mdif4-sys-color-on-surface-variant, #49454f));--_pressed-label-text-color: var(--mdif4-primary-tab-pressed-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--mdif4-primary-tab-container-shape-start-start, var(--mdif4-primary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--mdif4-primary-tab-container-shape-start-end, var(--mdif4-primary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--mdif4-primary-tab-container-shape-end-end, var(--mdif4-primary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--mdif4-primary-tab-container-shape-end-start, var(--mdif4-primary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)))}.content.stacked{flex-direction:column;gap:2px}.content.stacked.has-icon.has-label{height:var(--_with-icon-and-label-text-container-height)}
|
|
1606
1606
|
`;
|
|
1607
1607
|
/**
|
|
1608
1608
|
* @license
|
|
@@ -1618,7 +1618,7 @@ const te = $`:host{display:inline-flex;align-items:center;justify-content:center
|
|
|
1618
1618
|
*/
|
|
1619
1619
|
let pt = class extends Qt {
|
|
1620
1620
|
};
|
|
1621
|
-
pt.styles = [te,
|
|
1621
|
+
pt.styles = [te, er];
|
|
1622
1622
|
pt = h([
|
|
1623
1623
|
S("mdif4-primary-tab")
|
|
1624
1624
|
], pt);
|
|
@@ -1627,7 +1627,7 @@ pt = h([
|
|
|
1627
1627
|
* Copyright 2023 Google LLC
|
|
1628
1628
|
* SPDX-License-Identifier: Apache-2.0
|
|
1629
1629
|
*/
|
|
1630
|
-
class
|
|
1630
|
+
class rr extends _ {
|
|
1631
1631
|
constructor() {
|
|
1632
1632
|
super(...arguments), this.fullWidthIndicator = !0;
|
|
1633
1633
|
}
|
|
@@ -1637,27 +1637,27 @@ class ii extends _ {
|
|
|
1637
1637
|
* Copyright 2024 Google LLC
|
|
1638
1638
|
* SPDX-License-Identifier: Apache-2.0
|
|
1639
1639
|
*/
|
|
1640
|
-
const
|
|
1640
|
+
const ir = $`:host{--_active-indicator-color: var(--mdif4-secondary-tab-active-indicator-color, var(--mdif4-sys-color-primary, #6750a4));--_active-indicator-height: var(--mdif4-secondary-tab-active-indicator-height, 2px);--_active-label-text-color: var(--mdif4-secondary-tab-active-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_container-color: var(--mdif4-secondary-tab-container-color, var(--mdif4-sys-color-surface, #fef7ff));--_container-elevation: var(--mdif4-secondary-tab-container-elevation, 0);--_container-height: var(--mdif4-secondary-tab-container-height, 48px);--_focus-label-text-color: var(--mdif4-secondary-tab-focus-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--mdif4-secondary-tab-hover-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-state-layer-color: var(--mdif4-secondary-tab-hover-state-layer-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--mdif4-secondary-tab-hover-state-layer-opacity, 0.08);--_label-text-font: var(--mdif4-secondary-tab-label-text-font, var(--mdif4-sys-typescale-title-small-font, var(--mdif4-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--mdif4-secondary-tab-label-text-line-height, var(--mdif4-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--mdif4-secondary-tab-label-text-size, var(--mdif4-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--mdif4-secondary-tab-label-text-weight, var(--mdif4-sys-typescale-title-small-weight, var(--mdif4-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--mdif4-secondary-tab-pressed-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--mdif4-secondary-tab-pressed-state-layer-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity: var(--mdif4-secondary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--mdif4-secondary-tab-active-focus-icon-color, );--_active-focus-label-text-color: var(--mdif4-secondary-tab-active-focus-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-hover-icon-color: var(--mdif4-secondary-tab-active-hover-icon-color, );--_active-hover-label-text-color: var(--mdif4-secondary-tab-active-hover-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-color: var(--mdif4-secondary-tab-active-hover-state-layer-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-opacity: var(--mdif4-secondary-tab-active-hover-state-layer-opacity, 0.08);--_active-icon-color: var(--mdif4-secondary-tab-active-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-indicator-shape: var(--mdif4-secondary-tab-active-indicator-shape, 0);--_active-pressed-icon-color: var(--mdif4-secondary-tab-active-pressed-icon-color, );--_active-pressed-label-text-color: var(--mdif4-secondary-tab-active-pressed-label-text-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-color: var(--mdif4-secondary-tab-active-pressed-state-layer-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-opacity: var(--mdif4-secondary-tab-active-pressed-state-layer-opacity, 0.12);--_label-text-color: var(--mdif4-secondary-tab-label-text-color, var(--mdif4-sys-color-on-surface-variant, #49454f));--_focus-icon-color: var(--mdif4-secondary-tab-focus-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--mdif4-secondary-tab-hover-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_icon-size: var(--mdif4-secondary-tab-icon-size, 24px);--_icon-color: var(--mdif4-secondary-tab-icon-color, var(--mdif4-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--mdif4-secondary-tab-pressed-icon-color, var(--mdif4-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--mdif4-secondary-tab-container-shape-start-start, var(--mdif4-secondary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--mdif4-secondary-tab-container-shape-start-end, var(--mdif4-secondary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--mdif4-secondary-tab-container-shape-end-end, var(--mdif4-secondary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--mdif4-secondary-tab-container-shape-end-start, var(--mdif4-secondary-tab-container-shape, var(--mdif4-sys-shape-corner-none, 0px)))}
|
|
1641
1641
|
`;
|
|
1642
1642
|
/**
|
|
1643
1643
|
* @license
|
|
1644
1644
|
* Copyright 2023 Google LLC
|
|
1645
1645
|
* SPDX-License-Identifier: Apache-2.0
|
|
1646
1646
|
*/
|
|
1647
|
-
let ft = class extends
|
|
1647
|
+
let ft = class extends rr {
|
|
1648
1648
|
};
|
|
1649
|
-
ft.styles = [te,
|
|
1649
|
+
ft.styles = [te, ir];
|
|
1650
1650
|
ft = h([
|
|
1651
1651
|
S("mdif4-secondary-tab")
|
|
1652
1652
|
], ft);
|
|
1653
|
-
var
|
|
1654
|
-
for (var
|
|
1655
|
-
(a = s[o]) && (
|
|
1656
|
-
return
|
|
1653
|
+
var sr = Object.defineProperty, W = (s, t, e, r) => {
|
|
1654
|
+
for (var i = void 0, o = s.length - 1, a; o >= 0; o--)
|
|
1655
|
+
(a = s[o]) && (i = a(t, e, i) || i);
|
|
1656
|
+
return i && sr(t, e, i), i;
|
|
1657
1657
|
};
|
|
1658
1658
|
const xt = class xt extends g {
|
|
1659
1659
|
constructor() {
|
|
1660
|
-
super(...arguments), this.version = "1.0.
|
|
1660
|
+
super(...arguments), this.version = "1.0.7";
|
|
1661
1661
|
}
|
|
1662
1662
|
update(t) {
|
|
1663
1663
|
t.has("theme") && this.registerTheme(this.theme), super.update(t);
|
|
@@ -1666,8 +1666,8 @@ const xt = class xt extends g {
|
|
|
1666
1666
|
this.registerTheme(this.theme);
|
|
1667
1667
|
}
|
|
1668
1668
|
registerTheme(t) {
|
|
1669
|
-
const e = getComputedStyle(this).getPropertyValue("--re-text-color").trim(),
|
|
1670
|
-
this.themeBgColor =
|
|
1669
|
+
const e = getComputedStyle(this).getPropertyValue("--re-text-color").trim(), r = getComputedStyle(this).getPropertyValue("--re-tile-background-color").trim();
|
|
1670
|
+
this.themeBgColor = r || this.theme?.theme_object?.backgroundColor, this.themeTitleColor = e || this.theme?.theme_object?.title?.textStyle?.color;
|
|
1671
1671
|
}
|
|
1672
1672
|
handleNavItemClick(t) {
|
|
1673
1673
|
const e = new CustomEvent("nav-submit", {
|
|
@@ -1683,17 +1683,20 @@ const xt = class xt extends g {
|
|
|
1683
1683
|
trimRoute(t) {
|
|
1684
1684
|
return t ? "/" + t.split("/").filter(Boolean).join("/") : "";
|
|
1685
1685
|
}
|
|
1686
|
+
addSlashes(t) {
|
|
1687
|
+
return !t.route?.endsWith("/") && t.trailingSlash && (t.route += "/"), !t.route?.startsWith("/") && t.leadingSlash && (t.route = "/" + t.route), t.route;
|
|
1688
|
+
}
|
|
1686
1689
|
matchesRoute(t) {
|
|
1687
1690
|
if (t === void 0) return !1;
|
|
1688
|
-
const e = this.trimRoute(decodeURIComponent(this.route || "/")),
|
|
1689
|
-
return t.startsWith("/") ? e.startsWith(
|
|
1691
|
+
const e = this.trimRoute(decodeURIComponent(this.route || "/")), r = this.trimRoute(t);
|
|
1692
|
+
return t.startsWith("/") ? e.startsWith(r) : e.endsWith(r) || e === r;
|
|
1690
1693
|
}
|
|
1691
1694
|
render() {
|
|
1692
|
-
const t = this.inputData?.style?.fontSize ?? 16, e = (this.inputData?.style?.fontSize ?? 16) * 1.5,
|
|
1695
|
+
const t = this.inputData?.style?.fontSize ?? 16, e = (this.inputData?.style?.fontSize ?? 16) * 1.5, r = this.inputData?.style?.color || this.themeTitleColor || "black", i = this.inputData?.style?.backgroundColor || this.themeBgColor || "white";
|
|
1693
1696
|
return A`
|
|
1694
1697
|
<div
|
|
1695
1698
|
class="wrapper"
|
|
1696
|
-
style="background-color: ${
|
|
1699
|
+
style="background-color: ${i}; color: ${r};
|
|
1697
1700
|
font-weight: ${this.inputData?.style?.fontWeight};
|
|
1698
1701
|
font-size: ${t}px;"
|
|
1699
1702
|
>
|
|
@@ -1701,7 +1704,7 @@ const xt = class xt extends g {
|
|
|
1701
1704
|
class="paging"
|
|
1702
1705
|
style=${this.inputData?.route ? "cursor: pointer" : ""}
|
|
1703
1706
|
?active=${this.inputData?.title}
|
|
1704
|
-
@click=${() => this.handleNavItemClick(this.inputData?.route)}
|
|
1707
|
+
@click=${() => this.handleNavItemClick(this.addSlashes(this.inputData?.route))}
|
|
1705
1708
|
>
|
|
1706
1709
|
${this.inputData?.title}
|
|
1707
1710
|
</h2>
|
|
@@ -1711,16 +1714,16 @@ const xt = class xt extends g {
|
|
|
1711
1714
|
(o) => o.label,
|
|
1712
1715
|
(o) => A`
|
|
1713
1716
|
<mdif4-secondary-tab
|
|
1714
|
-
?active=${this.matchesRoute(o
|
|
1717
|
+
?active=${this.matchesRoute(this.addSlashes(o))}
|
|
1715
1718
|
style="font-size: ${t}px;
|
|
1716
|
-
--mdif4-secondary-tab-container-color: ${
|
|
1717
|
-
color: ${
|
|
1718
|
-
@click=${() => this.handleNavItemClick(o
|
|
1719
|
+
--mdif4-secondary-tab-container-color: ${i};
|
|
1720
|
+
color: ${r};"
|
|
1721
|
+
@click=${() => this.handleNavItemClick(this.addSlashes(o))}
|
|
1719
1722
|
>
|
|
1720
1723
|
${o.iconName ? A`
|
|
1721
1724
|
<mdif4-icon
|
|
1722
1725
|
slot="icon"
|
|
1723
|
-
style="font-size: ${e}px;width: ${e}px;color: ${
|
|
1726
|
+
style="font-size: ${e}px;width: ${e}px;color: ${r}"
|
|
1724
1727
|
>
|
|
1725
1728
|
${o.iconName}
|
|
1726
1729
|
</mdif4-icon>
|
|
@@ -1785,7 +1788,7 @@ W([
|
|
|
1785
1788
|
W([
|
|
1786
1789
|
F()
|
|
1787
1790
|
], E.prototype, "themeTitleColor");
|
|
1788
|
-
window.customElements.define("widget-navbar-1.0.
|
|
1791
|
+
window.customElements.define("widget-navbar-1.0.7", E);
|
|
1789
1792
|
export {
|
|
1790
1793
|
E as WidgetNavbar
|
|
1791
1794
|
};
|