@nextrap/nte-nav 1.1.8 → 1.1.13
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/CHANGELOG.md +32 -0
- package/index.js +113 -1217
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -1,988 +1,36 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
h(i.throw(c));
|
|
18
|
-
} catch (d) {
|
|
19
|
-
o(d);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
function h(c) {
|
|
23
|
-
c.done ? n(c.value) : r(c.value).then(l, a);
|
|
24
|
-
}
|
|
25
|
-
h((i = i.apply(s, t || [])).next());
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
function Yt() {
|
|
29
|
-
return It(this, void 0, void 0, function* () {
|
|
30
|
-
return new Promise((s) => {
|
|
31
|
-
if (document.readyState === "complete" || document.readyState === "interactive")
|
|
32
|
-
return s("loaded");
|
|
33
|
-
document.addEventListener("DOMContentLoaded", () => s("DOMContentLoaded"));
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
var qt = function(s, t, e, i) {
|
|
38
|
-
function r(n) {
|
|
39
|
-
return n instanceof e ? n : new e(function(o) {
|
|
40
|
-
o(n);
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
return new (e || (e = Promise))(function(n, o) {
|
|
44
|
-
function l(c) {
|
|
45
|
-
try {
|
|
46
|
-
h(i.next(c));
|
|
47
|
-
} catch (d) {
|
|
48
|
-
o(d);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
function a(c) {
|
|
52
|
-
try {
|
|
53
|
-
h(i.throw(c));
|
|
54
|
-
} catch (d) {
|
|
55
|
-
o(d);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
function h(c) {
|
|
59
|
-
c.done ? n(c.value) : r(c.value).then(l, a);
|
|
60
|
-
}
|
|
61
|
-
h((i = i.apply(s, t || [])).next());
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
function ct(s) {
|
|
65
|
-
return qt(this, void 0, void 0, function* () {
|
|
66
|
-
return new Promise((t) => {
|
|
67
|
-
window.setTimeout(() => t(), s);
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
class Pt {
|
|
72
|
-
/**
|
|
73
|
-
*
|
|
74
|
-
* @param delay Debounce delay in milliseconds
|
|
75
|
-
* @param max_delay Maximum delay in milliseconds, if false then no maximum delay is applied
|
|
76
|
-
*/
|
|
77
|
-
constructor(t, e = !1) {
|
|
78
|
-
this.delay = t, this.max_delay = e, this.timeout = null, this.startTimeWithMs = 0;
|
|
79
|
-
}
|
|
80
|
-
async wait() {
|
|
81
|
-
return this.startTimeWithMs === 0 && (this.startTimeWithMs = Date.now()), this.timeout && (this.max_delay === !1 || this.startTimeWithMs + this.max_delay > Date.now()) && clearTimeout(this.timeout), new Promise((t) => {
|
|
82
|
-
this.timeout = setTimeout(() => {
|
|
83
|
-
this.startTimeWithMs = 0, t(!0);
|
|
84
|
-
}, this.delay);
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
debounce(t) {
|
|
88
|
-
this.timeout && clearTimeout(this.timeout), this.timeout = setTimeout(() => {
|
|
89
|
-
t();
|
|
90
|
-
}, this.delay);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
const P = {
|
|
94
|
-
xs: { name: "xs", minWidth: 0 },
|
|
95
|
-
sm: { name: "sm", minWidth: 576 },
|
|
96
|
-
md: { name: "md", minWidth: 768 },
|
|
97
|
-
lg: { name: "lg", minWidth: 992 },
|
|
98
|
-
xl: { name: "xl", minWidth: 1200 },
|
|
99
|
-
xxl: { name: "xxl", minWidth: 1400 }
|
|
100
|
-
};
|
|
101
|
-
let M = P.xs;
|
|
102
|
-
function Q() {
|
|
103
|
-
const s = window.innerWidth;
|
|
104
|
-
let t = P.xs;
|
|
105
|
-
for (const e in P) {
|
|
106
|
-
const i = P[e];
|
|
107
|
-
s >= i.minWidth && (t = i);
|
|
108
|
-
}
|
|
109
|
-
return t;
|
|
110
|
-
}
|
|
111
|
-
function dt(s) {
|
|
112
|
-
if (typeof s == "string" && s.endsWith("px") && (s = parseInt(s.replace("px", ""))), typeof s == "string") {
|
|
113
|
-
if (s = P[s], !s)
|
|
114
|
-
throw new Error(
|
|
115
|
-
`Breakpoint ${s} not found. Defined breakpoints are: ${Object.keys(P).join(", ")}`
|
|
116
|
-
);
|
|
117
|
-
} else typeof s == "number" && (s = { name: "c", minWidth: s });
|
|
118
|
-
return window.innerWidth >= s.minWidth;
|
|
119
|
-
}
|
|
120
|
-
if (!window.__nextrap_current_breakpoint) {
|
|
121
|
-
window.__nextrap_current_breakpoint = Q();
|
|
122
|
-
const s = new Pt(200, 500);
|
|
123
|
-
window.addEventListener("resize", async () => {
|
|
124
|
-
if (await s.wait(), M !== Q()) {
|
|
125
|
-
M = Q(), window.__nextrap_current_breakpoint = M;
|
|
126
|
-
const t = new CustomEvent("breakpoint-changed", {
|
|
127
|
-
detail: { breakpoint: M }
|
|
128
|
-
});
|
|
129
|
-
console.log("Breakpoint changed", M), window.dispatchEvent(t);
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
class nt {
|
|
134
|
-
/**
|
|
135
|
-
* Checks recursively if the element is visible.
|
|
136
|
-
*
|
|
137
|
-
* @param el
|
|
138
|
-
*/
|
|
139
|
-
static isVisible(t) {
|
|
140
|
-
if (getComputedStyle(t).display === "none")
|
|
141
|
-
return !1;
|
|
142
|
-
if (t instanceof HTMLElement && (t.offsetWidth > 0 || t.offsetHeight > 0 || t.tagName === "IMG" || t.textContent !== ""))
|
|
143
|
-
return !0;
|
|
144
|
-
if (!t.children) return !1;
|
|
145
|
-
for (const i of t.children)
|
|
146
|
-
if (this.isVisible(i)) return !0;
|
|
147
|
-
return !1;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Usage:
|
|
151
|
-
*
|
|
152
|
-
* in firstupdated or connectedCallback of your element:
|
|
153
|
-
* ```ts
|
|
154
|
-
* override firstUpdated(_changedProperties: PropertyValues) {
|
|
155
|
-
* SlotTool.observeEmptySlots(this)
|
|
156
|
-
* }
|
|
157
|
-
* ```
|
|
158
|
-
*
|
|
159
|
-
* @param slot
|
|
160
|
-
*/
|
|
161
|
-
static isEmptySlot(t) {
|
|
162
|
-
const e = t.assignedElements({ flatten: !0 });
|
|
163
|
-
return e.length === 0 ? !0 : e.every((i) => !this.isVisible(i));
|
|
164
|
-
}
|
|
165
|
-
static observeEmptySlots(t) {
|
|
166
|
-
const e = t.shadowRoot;
|
|
167
|
-
if (!e) {
|
|
168
|
-
console.warn("Element has no shadow root", t);
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
e.querySelectorAll("slot").forEach((r) => {
|
|
172
|
-
this.isEmptySlot(r) ? r.setAttribute("empty", "") : r.removeAttribute("empty"), r.onslotchange = () => {
|
|
173
|
-
this.isEmptySlot(r) ? r.setAttribute("empty", "") : r.removeAttribute("empty");
|
|
174
|
-
};
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
function pt() {
|
|
179
|
-
return document.readyState === "loading" ? new Promise((s) => {
|
|
180
|
-
document.addEventListener("DOMContentLoaded", () => s());
|
|
181
|
-
}) : Promise.resolve();
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* @license
|
|
185
|
-
* Copyright 2019 Google LLC
|
|
186
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
187
|
-
*/
|
|
188
|
-
const q = globalThis, ot = q.ShadowRoot && (q.ShadyCSS === void 0 || q.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, kt = Symbol(), ut = /* @__PURE__ */ new WeakMap();
|
|
189
|
-
let Ot = class {
|
|
190
|
-
constructor(t, e, i) {
|
|
191
|
-
if (this._$cssResult$ = !0, i !== kt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
192
|
-
this.cssText = t, this.t = e;
|
|
193
|
-
}
|
|
194
|
-
get styleSheet() {
|
|
195
|
-
let t = this.o;
|
|
196
|
-
const e = this.t;
|
|
197
|
-
if (ot && t === void 0) {
|
|
198
|
-
const i = e !== void 0 && e.length === 1;
|
|
199
|
-
i && (t = ut.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && ut.set(e, t));
|
|
200
|
-
}
|
|
201
|
-
return t;
|
|
202
|
-
}
|
|
203
|
-
toString() {
|
|
204
|
-
return this.cssText;
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
const T = (s) => new Ot(typeof s == "string" ? s : s + "", void 0, kt), Vt = (s, t) => {
|
|
208
|
-
if (ot) s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
209
|
-
else for (const e of t) {
|
|
210
|
-
const i = document.createElement("style"), r = q.litNonce;
|
|
211
|
-
r !== void 0 && i.setAttribute("nonce", r), i.textContent = e.cssText, s.appendChild(i);
|
|
212
|
-
}
|
|
213
|
-
}, ft = ot ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
|
|
214
|
-
let e = "";
|
|
215
|
-
for (const i of t.cssRules) e += i.cssText;
|
|
216
|
-
return T(e);
|
|
217
|
-
})(s) : s;
|
|
218
|
-
/**
|
|
219
|
-
* @license
|
|
220
|
-
* Copyright 2017 Google LLC
|
|
221
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
222
|
-
*/
|
|
223
|
-
const { is: Ft, defineProperty: Jt, getOwnPropertyDescriptor: Kt, getOwnPropertyNames: Zt, getOwnPropertySymbols: Qt, getPrototypeOf: Xt } = Object, b = globalThis, vt = b.trustedTypes, te = vt ? vt.emptyScript : "", X = b.reactiveElementPolyfillSupport, L = (s, t) => s, V = { toAttribute(s, t) {
|
|
224
|
-
switch (t) {
|
|
225
|
-
case Boolean:
|
|
226
|
-
s = s ? te : null;
|
|
227
|
-
break;
|
|
228
|
-
case Object:
|
|
229
|
-
case Array:
|
|
230
|
-
s = s == null ? s : JSON.stringify(s);
|
|
231
|
-
}
|
|
232
|
-
return s;
|
|
233
|
-
}, fromAttribute(s, t) {
|
|
234
|
-
let e = s;
|
|
235
|
-
switch (t) {
|
|
236
|
-
case Boolean:
|
|
237
|
-
e = s !== null;
|
|
238
|
-
break;
|
|
239
|
-
case Number:
|
|
240
|
-
e = s === null ? null : Number(s);
|
|
241
|
-
break;
|
|
242
|
-
case Object:
|
|
243
|
-
case Array:
|
|
244
|
-
try {
|
|
245
|
-
e = JSON.parse(s);
|
|
246
|
-
} catch {
|
|
247
|
-
e = null;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
return e;
|
|
251
|
-
} }, at = (s, t) => !Ft(s, t), mt = { attribute: !0, type: String, converter: V, reflect: !1, useDefault: !1, hasChanged: at };
|
|
252
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), b.litPropertyMetadata ?? (b.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
253
|
-
let w = class extends HTMLElement {
|
|
254
|
-
static addInitializer(t) {
|
|
255
|
-
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
256
|
-
}
|
|
257
|
-
static get observedAttributes() {
|
|
258
|
-
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
259
|
-
}
|
|
260
|
-
static createProperty(t, e = mt) {
|
|
261
|
-
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) {
|
|
262
|
-
const i = Symbol(), r = this.getPropertyDescriptor(t, i, e);
|
|
263
|
-
r !== void 0 && Jt(this.prototype, t, r);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
static getPropertyDescriptor(t, e, i) {
|
|
267
|
-
const { get: r, set: n } = Kt(this.prototype, t) ?? { get() {
|
|
268
|
-
return this[e];
|
|
269
|
-
}, set(o) {
|
|
270
|
-
this[e] = o;
|
|
271
|
-
} };
|
|
272
|
-
return { get: r, set(o) {
|
|
273
|
-
const l = r == null ? void 0 : r.call(this);
|
|
274
|
-
n == null || n.call(this, o), this.requestUpdate(t, l, i);
|
|
275
|
-
}, configurable: !0, enumerable: !0 };
|
|
276
|
-
}
|
|
277
|
-
static getPropertyOptions(t) {
|
|
278
|
-
return this.elementProperties.get(t) ?? mt;
|
|
279
|
-
}
|
|
280
|
-
static _$Ei() {
|
|
281
|
-
if (this.hasOwnProperty(L("elementProperties"))) return;
|
|
282
|
-
const t = Xt(this);
|
|
283
|
-
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
284
|
-
}
|
|
285
|
-
static finalize() {
|
|
286
|
-
if (this.hasOwnProperty(L("finalized"))) return;
|
|
287
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(L("properties"))) {
|
|
288
|
-
const e = this.properties, i = [...Zt(e), ...Qt(e)];
|
|
289
|
-
for (const r of i) this.createProperty(r, e[r]);
|
|
290
|
-
}
|
|
291
|
-
const t = this[Symbol.metadata];
|
|
292
|
-
if (t !== null) {
|
|
293
|
-
const e = litPropertyMetadata.get(t);
|
|
294
|
-
if (e !== void 0) for (const [i, r] of e) this.elementProperties.set(i, r);
|
|
295
|
-
}
|
|
296
|
-
this._$Eh = /* @__PURE__ */ new Map();
|
|
297
|
-
for (const [e, i] of this.elementProperties) {
|
|
298
|
-
const r = this._$Eu(e, i);
|
|
299
|
-
r !== void 0 && this._$Eh.set(r, e);
|
|
300
|
-
}
|
|
301
|
-
this.elementStyles = this.finalizeStyles(this.styles);
|
|
302
|
-
}
|
|
303
|
-
static finalizeStyles(t) {
|
|
304
|
-
const e = [];
|
|
305
|
-
if (Array.isArray(t)) {
|
|
306
|
-
const i = new Set(t.flat(1 / 0).reverse());
|
|
307
|
-
for (const r of i) e.unshift(ft(r));
|
|
308
|
-
} else t !== void 0 && e.push(ft(t));
|
|
309
|
-
return e;
|
|
310
|
-
}
|
|
311
|
-
static _$Eu(t, e) {
|
|
312
|
-
const i = e.attribute;
|
|
313
|
-
return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
314
|
-
}
|
|
315
|
-
constructor() {
|
|
316
|
-
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
317
|
-
}
|
|
318
|
-
_$Ev() {
|
|
319
|
-
var t;
|
|
320
|
-
this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
|
|
321
|
-
}
|
|
322
|
-
addController(t) {
|
|
323
|
-
var e;
|
|
324
|
-
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
|
325
|
-
}
|
|
326
|
-
removeController(t) {
|
|
327
|
-
var e;
|
|
328
|
-
(e = this._$EO) == null || e.delete(t);
|
|
329
|
-
}
|
|
330
|
-
_$E_() {
|
|
331
|
-
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
332
|
-
for (const i of e.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
|
|
333
|
-
t.size > 0 && (this._$Ep = t);
|
|
334
|
-
}
|
|
335
|
-
createRenderRoot() {
|
|
336
|
-
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
337
|
-
return Vt(t, this.constructor.elementStyles), t;
|
|
338
|
-
}
|
|
339
|
-
connectedCallback() {
|
|
340
|
-
var t;
|
|
341
|
-
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
|
|
342
|
-
var i;
|
|
343
|
-
return (i = e.hostConnected) == null ? void 0 : i.call(e);
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
enableUpdating(t) {
|
|
347
|
-
}
|
|
348
|
-
disconnectedCallback() {
|
|
349
|
-
var t;
|
|
350
|
-
(t = this._$EO) == null || t.forEach((e) => {
|
|
351
|
-
var i;
|
|
352
|
-
return (i = e.hostDisconnected) == null ? void 0 : i.call(e);
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
attributeChangedCallback(t, e, i) {
|
|
356
|
-
this._$AK(t, i);
|
|
357
|
-
}
|
|
358
|
-
_$ET(t, e) {
|
|
359
|
-
var n;
|
|
360
|
-
const i = this.constructor.elementProperties.get(t), r = this.constructor._$Eu(t, i);
|
|
361
|
-
if (r !== void 0 && i.reflect === !0) {
|
|
362
|
-
const o = (((n = i.converter) == null ? void 0 : n.toAttribute) !== void 0 ? i.converter : V).toAttribute(e, i.type);
|
|
363
|
-
this._$Em = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$Em = null;
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
_$AK(t, e) {
|
|
367
|
-
var n, o;
|
|
368
|
-
const i = this.constructor, r = i._$Eh.get(t);
|
|
369
|
-
if (r !== void 0 && this._$Em !== r) {
|
|
370
|
-
const l = i.getPropertyOptions(r), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((n = l.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? l.converter : V;
|
|
371
|
-
this._$Em = r;
|
|
372
|
-
const h = a.fromAttribute(e, l.type);
|
|
373
|
-
this[r] = h ?? ((o = this._$Ej) == null ? void 0 : o.get(r)) ?? h, this._$Em = null;
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
requestUpdate(t, e, i) {
|
|
377
|
-
var r;
|
|
378
|
-
if (t !== void 0) {
|
|
379
|
-
const n = this.constructor, o = this[t];
|
|
380
|
-
if (i ?? (i = n.getPropertyOptions(t)), !((i.hasChanged ?? at)(o, e) || i.useDefault && i.reflect && o === ((r = this._$Ej) == null ? void 0 : r.get(t)) && !this.hasAttribute(n._$Eu(t, i)))) return;
|
|
381
|
-
this.C(t, e, i);
|
|
382
|
-
}
|
|
383
|
-
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
384
|
-
}
|
|
385
|
-
C(t, e, { useDefault: i, reflect: r, wrapped: n }, o) {
|
|
386
|
-
i && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, o ?? e ?? this[t]), n !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || i || (e = void 0), this._$AL.set(t, e)), r === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
|
|
387
|
-
}
|
|
388
|
-
async _$EP() {
|
|
389
|
-
this.isUpdatePending = !0;
|
|
390
|
-
try {
|
|
391
|
-
await this._$ES;
|
|
392
|
-
} catch (e) {
|
|
393
|
-
Promise.reject(e);
|
|
394
|
-
}
|
|
395
|
-
const t = this.scheduleUpdate();
|
|
396
|
-
return t != null && await t, !this.isUpdatePending;
|
|
397
|
-
}
|
|
398
|
-
scheduleUpdate() {
|
|
399
|
-
return this.performUpdate();
|
|
400
|
-
}
|
|
401
|
-
performUpdate() {
|
|
402
|
-
var i;
|
|
403
|
-
if (!this.isUpdatePending) return;
|
|
404
|
-
if (!this.hasUpdated) {
|
|
405
|
-
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
406
|
-
for (const [n, o] of this._$Ep) this[n] = o;
|
|
407
|
-
this._$Ep = void 0;
|
|
408
|
-
}
|
|
409
|
-
const r = this.constructor.elementProperties;
|
|
410
|
-
if (r.size > 0) for (const [n, o] of r) {
|
|
411
|
-
const { wrapped: l } = o, a = this[n];
|
|
412
|
-
l !== !0 || this._$AL.has(n) || a === void 0 || this.C(n, void 0, o, a);
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
let t = !1;
|
|
416
|
-
const e = this._$AL;
|
|
417
|
-
try {
|
|
418
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (i = this._$EO) == null || i.forEach((r) => {
|
|
419
|
-
var n;
|
|
420
|
-
return (n = r.hostUpdate) == null ? void 0 : n.call(r);
|
|
421
|
-
}), this.update(e)) : this._$EM();
|
|
422
|
-
} catch (r) {
|
|
423
|
-
throw t = !1, this._$EM(), r;
|
|
424
|
-
}
|
|
425
|
-
t && this._$AE(e);
|
|
426
|
-
}
|
|
427
|
-
willUpdate(t) {
|
|
428
|
-
}
|
|
429
|
-
_$AE(t) {
|
|
430
|
-
var e;
|
|
431
|
-
(e = this._$EO) == null || e.forEach((i) => {
|
|
432
|
-
var r;
|
|
433
|
-
return (r = i.hostUpdated) == null ? void 0 : r.call(i);
|
|
434
|
-
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
435
|
-
}
|
|
436
|
-
_$EM() {
|
|
437
|
-
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
438
|
-
}
|
|
439
|
-
get updateComplete() {
|
|
440
|
-
return this.getUpdateComplete();
|
|
441
|
-
}
|
|
442
|
-
getUpdateComplete() {
|
|
443
|
-
return this._$ES;
|
|
444
|
-
}
|
|
445
|
-
shouldUpdate(t) {
|
|
446
|
-
return !0;
|
|
447
|
-
}
|
|
448
|
-
update(t) {
|
|
449
|
-
this._$Eq && (this._$Eq = this._$Eq.forEach((e) => this._$ET(e, this[e]))), this._$EM();
|
|
450
|
-
}
|
|
451
|
-
updated(t) {
|
|
452
|
-
}
|
|
453
|
-
firstUpdated(t) {
|
|
454
|
-
}
|
|
455
|
-
};
|
|
456
|
-
w.elementStyles = [], w.shadowRootOptions = { mode: "open" }, w[L("elementProperties")] = /* @__PURE__ */ new Map(), w[L("finalized")] = /* @__PURE__ */ new Map(), X == null || X({ ReactiveElement: w }), (b.reactiveElementVersions ?? (b.reactiveElementVersions = [])).push("2.1.1");
|
|
457
|
-
/**
|
|
458
|
-
* @license
|
|
459
|
-
* Copyright 2017 Google LLC
|
|
460
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
461
|
-
*/
|
|
462
|
-
const H = globalThis, F = H.trustedTypes, gt = F ? F.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Nt = "$lit$", g = `lit$${Math.random().toFixed(9).slice(2)}$`, Mt = "?" + g, ee = `<${Mt}>`, E = document, j = () => E.createComment(""), D = (s) => s === null || typeof s != "object" && typeof s != "function", lt = Array.isArray, se = (s) => lt(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", tt = `[
|
|
463
|
-
\f\r]`, U = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, bt = /-->/g, _t = />/g, $ = RegExp(`>|${tt}(?:([^\\s"'>=/]+)(${tt}*=${tt}*(?:[^
|
|
464
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), yt = /'/g, $t = /"/g, Ut = /^(?:script|style|textarea|title)$/i, ie = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), k = ie(1), S = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), wt = /* @__PURE__ */ new WeakMap(), A = E.createTreeWalker(E, 129);
|
|
465
|
-
function Lt(s, t) {
|
|
466
|
-
if (!lt(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
467
|
-
return gt !== void 0 ? gt.createHTML(t) : t;
|
|
468
|
-
}
|
|
469
|
-
const re = (s, t) => {
|
|
470
|
-
const e = s.length - 1, i = [];
|
|
471
|
-
let r, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = U;
|
|
472
|
-
for (let l = 0; l < e; l++) {
|
|
473
|
-
const a = s[l];
|
|
474
|
-
let h, c, d = -1, f = 0;
|
|
475
|
-
for (; f < a.length && (o.lastIndex = f, c = o.exec(a), c !== null); ) f = o.lastIndex, o === U ? c[1] === "!--" ? o = bt : c[1] !== void 0 ? o = _t : c[2] !== void 0 ? (Ut.test(c[2]) && (r = RegExp("</" + c[2], "g")), o = $) : c[3] !== void 0 && (o = $) : o === $ ? c[0] === ">" ? (o = r ?? U, d = -1) : c[1] === void 0 ? d = -2 : (d = o.lastIndex - c[2].length, h = c[1], o = c[3] === void 0 ? $ : c[3] === '"' ? $t : yt) : o === $t || o === yt ? o = $ : o === bt || o === _t ? o = U : (o = $, r = void 0);
|
|
476
|
-
const m = o === $ && s[l + 1].startsWith("/>") ? " " : "";
|
|
477
|
-
n += o === U ? a + ee : d >= 0 ? (i.push(h), a.slice(0, d) + Nt + a.slice(d) + g + m) : a + g + (d === -2 ? l : m);
|
|
478
|
-
}
|
|
479
|
-
return [Lt(s, n + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
480
|
-
};
|
|
481
|
-
class z {
|
|
482
|
-
constructor({ strings: t, _$litType$: e }, i) {
|
|
483
|
-
let r;
|
|
484
|
-
this.parts = [];
|
|
485
|
-
let n = 0, o = 0;
|
|
486
|
-
const l = t.length - 1, a = this.parts, [h, c] = re(t, e);
|
|
487
|
-
if (this.el = z.createElement(h, i), A.currentNode = this.el.content, e === 2 || e === 3) {
|
|
488
|
-
const d = this.el.content.firstChild;
|
|
489
|
-
d.replaceWith(...d.childNodes);
|
|
490
|
-
}
|
|
491
|
-
for (; (r = A.nextNode()) !== null && a.length < l; ) {
|
|
492
|
-
if (r.nodeType === 1) {
|
|
493
|
-
if (r.hasAttributes()) for (const d of r.getAttributeNames()) if (d.endsWith(Nt)) {
|
|
494
|
-
const f = c[o++], m = r.getAttribute(d).split(g), Y = /([.?@])?(.*)/.exec(f);
|
|
495
|
-
a.push({ type: 1, index: n, name: Y[2], strings: m, ctor: Y[1] === "." ? oe : Y[1] === "?" ? ae : Y[1] === "@" ? le : Z }), r.removeAttribute(d);
|
|
496
|
-
} else d.startsWith(g) && (a.push({ type: 6, index: n }), r.removeAttribute(d));
|
|
497
|
-
if (Ut.test(r.tagName)) {
|
|
498
|
-
const d = r.textContent.split(g), f = d.length - 1;
|
|
499
|
-
if (f > 0) {
|
|
500
|
-
r.textContent = F ? F.emptyScript : "";
|
|
501
|
-
for (let m = 0; m < f; m++) r.append(d[m], j()), A.nextNode(), a.push({ type: 2, index: ++n });
|
|
502
|
-
r.append(d[f], j());
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
} else if (r.nodeType === 8) if (r.data === Mt) a.push({ type: 2, index: n });
|
|
506
|
-
else {
|
|
507
|
-
let d = -1;
|
|
508
|
-
for (; (d = r.data.indexOf(g, d + 1)) !== -1; ) a.push({ type: 7, index: n }), d += g.length - 1;
|
|
509
|
-
}
|
|
510
|
-
n++;
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
static createElement(t, e) {
|
|
514
|
-
const i = E.createElement("template");
|
|
515
|
-
return i.innerHTML = t, i;
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
function O(s, t, e = s, i) {
|
|
519
|
-
var o, l;
|
|
520
|
-
if (t === S) return t;
|
|
521
|
-
let r = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
|
|
522
|
-
const n = D(t) ? void 0 : t._$litDirective$;
|
|
523
|
-
return (r == null ? void 0 : r.constructor) !== n && ((l = r == null ? void 0 : r._$AO) == null || l.call(r, !1), n === void 0 ? r = void 0 : (r = new n(s), r._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = r : e._$Cl = r), r !== void 0 && (t = O(s, r._$AS(s, t.values), r, i)), t;
|
|
524
|
-
}
|
|
525
|
-
class ne {
|
|
526
|
-
constructor(t, e) {
|
|
527
|
-
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
528
|
-
}
|
|
529
|
-
get parentNode() {
|
|
530
|
-
return this._$AM.parentNode;
|
|
531
|
-
}
|
|
532
|
-
get _$AU() {
|
|
533
|
-
return this._$AM._$AU;
|
|
534
|
-
}
|
|
535
|
-
u(t) {
|
|
536
|
-
const { el: { content: e }, parts: i } = this._$AD, r = ((t == null ? void 0 : t.creationScope) ?? E).importNode(e, !0);
|
|
537
|
-
A.currentNode = r;
|
|
538
|
-
let n = A.nextNode(), o = 0, l = 0, a = i[0];
|
|
539
|
-
for (; a !== void 0; ) {
|
|
540
|
-
if (o === a.index) {
|
|
541
|
-
let h;
|
|
542
|
-
a.type === 2 ? h = new G(n, n.nextSibling, this, t) : a.type === 1 ? h = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (h = new he(n, this, t)), this._$AV.push(h), a = i[++l];
|
|
543
|
-
}
|
|
544
|
-
o !== (a == null ? void 0 : a.index) && (n = A.nextNode(), o++);
|
|
545
|
-
}
|
|
546
|
-
return A.currentNode = E, r;
|
|
547
|
-
}
|
|
548
|
-
p(t) {
|
|
549
|
-
let e = 0;
|
|
550
|
-
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
class G {
|
|
554
|
-
get _$AU() {
|
|
555
|
-
var t;
|
|
556
|
-
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
557
|
-
}
|
|
558
|
-
constructor(t, e, i, r) {
|
|
559
|
-
this.type = 2, this._$AH = p, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = r, this._$Cv = (r == null ? void 0 : r.isConnected) ?? !0;
|
|
560
|
-
}
|
|
561
|
-
get parentNode() {
|
|
562
|
-
let t = this._$AA.parentNode;
|
|
563
|
-
const e = this._$AM;
|
|
564
|
-
return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
|
|
565
|
-
}
|
|
566
|
-
get startNode() {
|
|
567
|
-
return this._$AA;
|
|
568
|
-
}
|
|
569
|
-
get endNode() {
|
|
570
|
-
return this._$AB;
|
|
571
|
-
}
|
|
572
|
-
_$AI(t, e = this) {
|
|
573
|
-
t = O(this, t, e), D(t) ? t === p || t == null || t === "" ? (this._$AH !== p && this._$AR(), this._$AH = p) : t !== this._$AH && t !== S && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : se(t) ? this.k(t) : this._(t);
|
|
574
|
-
}
|
|
575
|
-
O(t) {
|
|
576
|
-
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
577
|
-
}
|
|
578
|
-
T(t) {
|
|
579
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
580
|
-
}
|
|
581
|
-
_(t) {
|
|
582
|
-
this._$AH !== p && D(this._$AH) ? this._$AA.nextSibling.data = t : this.T(E.createTextNode(t)), this._$AH = t;
|
|
583
|
-
}
|
|
584
|
-
$(t) {
|
|
585
|
-
var n;
|
|
586
|
-
const { values: e, _$litType$: i } = t, r = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = z.createElement(Lt(i.h, i.h[0]), this.options)), i);
|
|
587
|
-
if (((n = this._$AH) == null ? void 0 : n._$AD) === r) this._$AH.p(e);
|
|
588
|
-
else {
|
|
589
|
-
const o = new ne(r, this), l = o.u(this.options);
|
|
590
|
-
o.p(e), this.T(l), this._$AH = o;
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
_$AC(t) {
|
|
594
|
-
let e = wt.get(t.strings);
|
|
595
|
-
return e === void 0 && wt.set(t.strings, e = new z(t)), e;
|
|
596
|
-
}
|
|
597
|
-
k(t) {
|
|
598
|
-
lt(this._$AH) || (this._$AH = [], this._$AR());
|
|
599
|
-
const e = this._$AH;
|
|
600
|
-
let i, r = 0;
|
|
601
|
-
for (const n of t) r === e.length ? e.push(i = new G(this.O(j()), this.O(j()), this, this.options)) : i = e[r], i._$AI(n), r++;
|
|
602
|
-
r < e.length && (this._$AR(i && i._$AB.nextSibling, r), e.length = r);
|
|
603
|
-
}
|
|
604
|
-
_$AR(t = this._$AA.nextSibling, e) {
|
|
605
|
-
var i;
|
|
606
|
-
for ((i = this._$AP) == null ? void 0 : i.call(this, !1, !0, e); t !== this._$AB; ) {
|
|
607
|
-
const r = t.nextSibling;
|
|
608
|
-
t.remove(), t = r;
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
setConnected(t) {
|
|
612
|
-
var e;
|
|
613
|
-
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
class Z {
|
|
617
|
-
get tagName() {
|
|
618
|
-
return this.element.tagName;
|
|
619
|
-
}
|
|
620
|
-
get _$AU() {
|
|
621
|
-
return this._$AM._$AU;
|
|
622
|
-
}
|
|
623
|
-
constructor(t, e, i, r, n) {
|
|
624
|
-
this.type = 1, this._$AH = p, this._$AN = void 0, this.element = t, this.name = e, this._$AM = r, this.options = n, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = p;
|
|
625
|
-
}
|
|
626
|
-
_$AI(t, e = this, i, r) {
|
|
627
|
-
const n = this.strings;
|
|
628
|
-
let o = !1;
|
|
629
|
-
if (n === void 0) t = O(this, t, e, 0), o = !D(t) || t !== this._$AH && t !== S, o && (this._$AH = t);
|
|
630
|
-
else {
|
|
631
|
-
const l = t;
|
|
632
|
-
let a, h;
|
|
633
|
-
for (t = n[0], a = 0; a < n.length - 1; a++) h = O(this, l[i + a], e, a), h === S && (h = this._$AH[a]), o || (o = !D(h) || h !== this._$AH[a]), h === p ? t = p : t !== p && (t += (h ?? "") + n[a + 1]), this._$AH[a] = h;
|
|
634
|
-
}
|
|
635
|
-
o && !r && this.j(t);
|
|
636
|
-
}
|
|
637
|
-
j(t) {
|
|
638
|
-
t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
class oe extends Z {
|
|
1
|
+
var P = Object.defineProperty;
|
|
2
|
+
var O = (r, e, t) => e in r ? P(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var n = (r, e, t) => O(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { waitForDomContentLoaded as u, isBiggerThanBreakpoint as m, Debouncer as $, SlotTool as x } from "@nextrap/nt-framework";
|
|
5
|
+
import "@nextrap/nte-offcanvas";
|
|
6
|
+
import { unsafeCSS as v, LitElement as b, html as h } from "lit";
|
|
7
|
+
import { property as c, state as L, customElement as g } from "lit/decorators.js";
|
|
8
|
+
import { createRef as w, ref as _ } from "lit/directives/ref.js";
|
|
9
|
+
import "@nextrap/nte-burger";
|
|
10
|
+
const N = ":host{--container-width: var(--nt-container-width);--text-color: var(--nt-text);--hover-color: var(--nt-primary);--hover-text-color: var(--nt-text-on-primary);--transition: .2s ease-in-out;--submenu-bg: var(--nt-light);--submenu-text-color: var(--nt-text);--justify-content: center;--sidemenu-bg: var(--nt-primary-subtle);--justify-sidebar-burger: flex-end;--height: auto;--default-alpha: .7;height:var(--height);display:block}nav{height:100%}#main{height:100%}#burger-wrapper{padding:15px}#text{padding-right:10px}#burger-default{cursor:pointer}#burger-default slot::slotted(span){color:rgb(from var(--text-color) r g b/var(--default-alpha));transition:color var(--transition)}#burger-default nte-burger{--color: rgb(from var(--text-color) r g b / var(--default-alpha))}#burger-default:hover slot::slotted(span){color:rgb(from var(--text-color) r g b/1)}#burger-default:hover nte-burger{--color: rgb(from var(--text-color) r g b / 1)}";
|
|
11
|
+
var y = Object.defineProperty, k = Object.getOwnPropertyDescriptor, E = (r, e, t) => e in r ? y(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, d = (r, e, t, i) => {
|
|
12
|
+
for (var a = i > 1 ? void 0 : i ? k(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
13
|
+
(o = r[s]) && (a = (i ? o(e, t, a) : o(a)) || a);
|
|
14
|
+
return i && a && y(e, t, a), a;
|
|
15
|
+
}, C = (r, e, t) => E(r, e + "", t);
|
|
16
|
+
let l = class extends b {
|
|
642
17
|
constructor() {
|
|
643
|
-
super(...arguments), this.type = 3;
|
|
644
|
-
}
|
|
645
|
-
j(t) {
|
|
646
|
-
this.element[this.name] = t === p ? void 0 : t;
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
class ae extends Z {
|
|
650
|
-
constructor() {
|
|
651
|
-
super(...arguments), this.type = 4;
|
|
652
|
-
}
|
|
653
|
-
j(t) {
|
|
654
|
-
this.element.toggleAttribute(this.name, !!t && t !== p);
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
class le extends Z {
|
|
658
|
-
constructor(t, e, i, r, n) {
|
|
659
|
-
super(t, e, i, r, n), this.type = 5;
|
|
660
|
-
}
|
|
661
|
-
_$AI(t, e = this) {
|
|
662
|
-
if ((t = O(this, t, e, 0) ?? p) === S) return;
|
|
663
|
-
const i = this._$AH, r = t === p && i !== p || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, n = t !== p && (i === p || r);
|
|
664
|
-
r && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
665
|
-
}
|
|
666
|
-
handleEvent(t) {
|
|
667
|
-
var e;
|
|
668
|
-
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
class he {
|
|
672
|
-
constructor(t, e, i) {
|
|
673
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
|
674
|
-
}
|
|
675
|
-
get _$AU() {
|
|
676
|
-
return this._$AM._$AU;
|
|
677
|
-
}
|
|
678
|
-
_$AI(t) {
|
|
679
|
-
O(this, t);
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
const et = H.litHtmlPolyfillSupport;
|
|
683
|
-
et == null || et(z, G), (H.litHtmlVersions ?? (H.litHtmlVersions = [])).push("3.3.1");
|
|
684
|
-
const ce = (s, t, e) => {
|
|
685
|
-
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
686
|
-
let r = i._$litPart$;
|
|
687
|
-
if (r === void 0) {
|
|
688
|
-
const n = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
689
|
-
i._$litPart$ = r = new G(t.insertBefore(j(), n), n, void 0, e ?? {});
|
|
690
|
-
}
|
|
691
|
-
return r._$AI(s), r;
|
|
692
|
-
};
|
|
693
|
-
/**
|
|
694
|
-
* @license
|
|
695
|
-
* Copyright 2017 Google LLC
|
|
696
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
697
|
-
*/
|
|
698
|
-
const x = globalThis;
|
|
699
|
-
let v = class extends w {
|
|
700
|
-
constructor() {
|
|
701
|
-
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
702
|
-
}
|
|
703
|
-
createRenderRoot() {
|
|
704
|
-
var e;
|
|
705
|
-
const t = super.createRenderRoot();
|
|
706
|
-
return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;
|
|
707
|
-
}
|
|
708
|
-
update(t) {
|
|
709
|
-
const e = this.render();
|
|
710
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = ce(e, this.renderRoot, this.renderOptions);
|
|
711
|
-
}
|
|
712
|
-
connectedCallback() {
|
|
713
|
-
var t;
|
|
714
|
-
super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
|
|
715
|
-
}
|
|
716
|
-
disconnectedCallback() {
|
|
717
|
-
var t;
|
|
718
|
-
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
719
|
-
}
|
|
720
|
-
render() {
|
|
721
|
-
return S;
|
|
722
|
-
}
|
|
723
|
-
};
|
|
724
|
-
var Tt;
|
|
725
|
-
v._$litElement$ = !0, v.finalized = !0, (Tt = x.litElementHydrateSupport) == null || Tt.call(x, { LitElement: v });
|
|
726
|
-
const st = x.litElementPolyfillSupport;
|
|
727
|
-
st == null || st({ LitElement: v });
|
|
728
|
-
(x.litElementVersions ?? (x.litElementVersions = [])).push("4.2.1");
|
|
729
|
-
/**
|
|
730
|
-
* @license
|
|
731
|
-
* Copyright 2017 Google LLC
|
|
732
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
733
|
-
*/
|
|
734
|
-
const W = (s) => (t, e) => {
|
|
735
|
-
e !== void 0 ? e.addInitializer(() => {
|
|
736
|
-
customElements.define(s, t);
|
|
737
|
-
}) : customElements.define(s, t);
|
|
738
|
-
};
|
|
739
|
-
/**
|
|
740
|
-
* @license
|
|
741
|
-
* Copyright 2017 Google LLC
|
|
742
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
743
|
-
*/
|
|
744
|
-
const de = { attribute: !0, type: String, converter: V, reflect: !1, hasChanged: at }, pe = (s = de, t, e) => {
|
|
745
|
-
const { kind: i, metadata: r } = e;
|
|
746
|
-
let n = globalThis.litPropertyMetadata.get(r);
|
|
747
|
-
if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), i === "setter" && ((s = Object.create(s)).wrapped = !0), n.set(e.name, s), i === "accessor") {
|
|
748
|
-
const { name: o } = e;
|
|
749
|
-
return { set(l) {
|
|
750
|
-
const a = t.get.call(this);
|
|
751
|
-
t.set.call(this, l), this.requestUpdate(o, a, s);
|
|
752
|
-
}, init(l) {
|
|
753
|
-
return l !== void 0 && this.C(o, void 0, s, l), l;
|
|
754
|
-
} };
|
|
755
|
-
}
|
|
756
|
-
if (i === "setter") {
|
|
757
|
-
const { name: o } = e;
|
|
758
|
-
return function(l) {
|
|
759
|
-
const a = this[o];
|
|
760
|
-
t.call(this, l), this.requestUpdate(o, a, s);
|
|
761
|
-
};
|
|
762
|
-
}
|
|
763
|
-
throw Error("Unsupported decorator location: " + i);
|
|
764
|
-
};
|
|
765
|
-
function u(s) {
|
|
766
|
-
return (t, e) => typeof e == "object" ? pe(s, t, e) : ((i, r, n) => {
|
|
767
|
-
const o = r.hasOwnProperty(n);
|
|
768
|
-
return r.constructor.createProperty(n, i), o ? Object.getOwnPropertyDescriptor(r, n) : void 0;
|
|
769
|
-
})(s, t, e);
|
|
770
|
-
}
|
|
771
|
-
/**
|
|
772
|
-
* @license
|
|
773
|
-
* Copyright 2017 Google LLC
|
|
774
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
775
|
-
*/
|
|
776
|
-
function Ht(s) {
|
|
777
|
-
return u({ ...s, state: !0, attribute: !1 });
|
|
778
|
-
}
|
|
779
|
-
function ue(s, t = "this", e) {
|
|
780
|
-
return function(i, r, n) {
|
|
781
|
-
const o = i.connectedCallback, l = i.disconnectedCallback;
|
|
782
|
-
i.connectedCallback = function() {
|
|
783
|
-
const a = t === "this" ? this : t, h = Array.isArray(s) ? s : [s];
|
|
784
|
-
this.__eventListenerRemovers ?? (this.__eventListenerRemovers = []);
|
|
785
|
-
for (const c of h) {
|
|
786
|
-
const d = this[r].bind(this);
|
|
787
|
-
a.addEventListener(c, d), this.__eventListenerRemovers.push(() => a.removeEventListener(c, d));
|
|
788
|
-
}
|
|
789
|
-
o == null || o.call(this);
|
|
790
|
-
}, i.disconnectedCallback = function() {
|
|
791
|
-
var a;
|
|
792
|
-
(a = this.__eventListenerRemovers) == null || a.forEach((h) => h()), this.__eventListenerRemovers = [], l == null || l.call(this);
|
|
793
|
-
};
|
|
794
|
-
};
|
|
795
|
-
}
|
|
796
|
-
const Rt = "nte-group-open-close";
|
|
797
|
-
function jt(s, t) {
|
|
798
|
-
document.dispatchEvent(
|
|
799
|
-
new CustomEvent(Rt, {
|
|
800
|
-
bubbles: !1,
|
|
801
|
-
composed: !0,
|
|
802
|
-
detail: { open: s, groupName: t }
|
|
803
|
-
})
|
|
804
|
-
);
|
|
805
|
-
}
|
|
806
|
-
function fe(s, t) {
|
|
807
|
-
const e = document.createElement("template");
|
|
808
|
-
return e.innerHTML = s.trim(), t.append(e.content.cloneNode(!0)), new Proxy({}, {
|
|
809
|
-
get(i, r) {
|
|
810
|
-
if (r === "fragment")
|
|
811
|
-
return t;
|
|
812
|
-
if (typeof r == "string") {
|
|
813
|
-
const n = t.getElementById(r);
|
|
814
|
-
if (!n)
|
|
815
|
-
throw new Error(`❌ Unknown id '${r}'.`);
|
|
816
|
-
return n;
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
});
|
|
820
|
-
}
|
|
821
|
-
const ht = class ht extends w {
|
|
822
|
-
constructor(t) {
|
|
823
18
|
super();
|
|
824
|
-
|
|
825
|
-
this
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
let t = this.css;
|
|
830
|
-
Array.isArray(t) || (t = [t]);
|
|
831
|
-
const e = t.map((i) => i instanceof Ot ? i.styleSheet : T(i).styleSheet);
|
|
832
|
-
this.shadowRoot.adoptedStyleSheets = e;
|
|
833
|
-
}
|
|
834
|
-
};
|
|
835
|
-
ht.DEFINITION = {
|
|
836
|
-
classes: [],
|
|
837
|
-
attributes: {}
|
|
838
|
-
};
|
|
839
|
-
let At = ht;
|
|
840
|
-
/**
|
|
841
|
-
* @license
|
|
842
|
-
* Copyright 2017 Google LLC
|
|
843
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
844
|
-
*/
|
|
845
|
-
const Dt = { ATTRIBUTE: 1, CHILD: 2 }, zt = (s) => (...t) => ({ _$litDirective$: s, values: t });
|
|
846
|
-
class Gt {
|
|
847
|
-
constructor(t) {
|
|
848
|
-
}
|
|
849
|
-
get _$AU() {
|
|
850
|
-
return this._$AM._$AU;
|
|
851
|
-
}
|
|
852
|
-
_$AT(t, e, i) {
|
|
853
|
-
this._$Ct = t, this._$AM = e, this._$Ci = i;
|
|
854
|
-
}
|
|
855
|
-
_$AS(t, e) {
|
|
856
|
-
return this.update(t, e);
|
|
857
|
-
}
|
|
858
|
-
update(t, e) {
|
|
859
|
-
return this.render(...e);
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
/**
|
|
863
|
-
* @license
|
|
864
|
-
* Copyright 2018 Google LLC
|
|
865
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
866
|
-
*/
|
|
867
|
-
const xt = zt(class extends Gt {
|
|
868
|
-
constructor(s) {
|
|
869
|
-
var t;
|
|
870
|
-
if (super(s), s.type !== Dt.ATTRIBUTE || s.name !== "class" || ((t = s.strings) == null ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
871
|
-
}
|
|
872
|
-
render(s) {
|
|
873
|
-
return " " + Object.keys(s).filter((t) => s[t]).join(" ") + " ";
|
|
874
|
-
}
|
|
875
|
-
update(s, [t]) {
|
|
876
|
-
var i, r;
|
|
877
|
-
if (this.st === void 0) {
|
|
878
|
-
this.st = /* @__PURE__ */ new Set(), s.strings !== void 0 && (this.nt = new Set(s.strings.join(" ").split(/\s/).filter((n) => n !== "")));
|
|
879
|
-
for (const n in t) t[n] && !((i = this.nt) != null && i.has(n)) && this.st.add(n);
|
|
880
|
-
return this.render(t);
|
|
881
|
-
}
|
|
882
|
-
const e = s.element.classList;
|
|
883
|
-
for (const n of this.st) n in t || (e.remove(n), this.st.delete(n));
|
|
884
|
-
for (const n in t) {
|
|
885
|
-
const o = !!t[n];
|
|
886
|
-
o === this.st.has(n) || (r = this.nt) != null && r.has(n) || (o ? (e.add(n), this.st.add(n)) : (e.remove(n), this.st.delete(n)));
|
|
887
|
-
}
|
|
888
|
-
return S;
|
|
889
|
-
}
|
|
890
|
-
}), ve = "*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a,i{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--backdrop: rgb(from var(--nt-dark) r g b / .5);--header-background: transparent;--background-color: var(--nt-soft-primary);--shadow-color: rgb(from var(--nt-dark) r g b / .5);--main-padding: 0;--header-padding: var(--nt-space);position:fixed;top:0;right:0;height:100vh;width:33%;min-width:250px;max-width:400px;z-index:2000;padding:0;isolation:isolate;display:block}:host[opened]{display:block}#offcanvas{display:flex;flex-direction:column;width:100%;height:100%;background-color:var(--background-color);box-shadow:0 0 10px var(--shadow-color);transition:transform .2s ease-in-out;transform:translate(0)}#offcanvas.closed{transform:translate(100%)}#header{display:flex;width:100%;flex-direction:row;justify-content:space-between;align-items:center;background-color:var(--header-background);flex-grow:0;padding:var(--header-padding)}#header:has(>slot[empty]){display:none}#main{display:flex;width:100%;flex-grow:1;padding:var(--main-padding);min-height:200px;overflow:auto;scroll-behavior:auto;scrollbar-gutter:auto;height:100%}#footer{display:flex;width:100%;flex-direction:row;justify-content:space-between;align-items:center;margin-top:auto;flex-grow:0;padding:var(--padding)}#footer:has(>slot[empty]){display:none}#backdrop{opacity:1;transition:opacity .2s ease-in-out;position:fixed;top:0;left:0;width:100%;height:100%;background-color:var(--backdrop);z-index:-1;display:block}#backdrop.closed{opacity:0}";
|
|
891
|
-
var me = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, B = (s, t, e, i) => {
|
|
892
|
-
for (var r = i > 1 ? void 0 : i ? ge(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
893
|
-
(o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
|
|
894
|
-
return i && r && me(t, e, r), r;
|
|
895
|
-
};
|
|
896
|
-
let _ = class extends v {
|
|
897
|
-
constructor() {
|
|
898
|
-
super(), this.backdrop = !0, this.opened = !1, this.dataGroupName = "", this.closedClass = !0, this.addEventListener("click", (s) => {
|
|
899
|
-
s === void 0 || !s.target || !(s.target instanceof HTMLElement) || s.target.closest("[data-nt-dismiss='offcanvas']") !== null && this.close();
|
|
900
|
-
});
|
|
901
|
-
}
|
|
902
|
-
static get is() {
|
|
903
|
-
return "nte-offcanvas";
|
|
904
|
-
}
|
|
905
|
-
connectedCallback() {
|
|
906
|
-
super.connectedCallback();
|
|
907
|
-
}
|
|
908
|
-
open() {
|
|
909
|
-
this.opened = !0;
|
|
910
|
-
}
|
|
911
|
-
close() {
|
|
912
|
-
this.opened = !1;
|
|
913
|
-
}
|
|
914
|
-
toggle() {
|
|
915
|
-
this.opened = !this.opened;
|
|
916
|
-
}
|
|
917
|
-
async updated(s) {
|
|
918
|
-
s.has("opened") && (this.dataGroupName !== "" && jt(this.opened, this.dataGroupName), this.opened ? (this.style.display = "block", await ct(1), nt.observeEmptySlots(this), this.closedClass = !1) : (this.closedClass = !0, await ct(400), this.style.display = "none"));
|
|
919
|
-
}
|
|
920
|
-
render() {
|
|
921
|
-
return k`
|
|
922
|
-
<div
|
|
923
|
-
id="backdrop"
|
|
924
|
-
part="backdrop"
|
|
925
|
-
@click=${() => this.opened = !1}
|
|
926
|
-
class=${xt({ closed: this.closedClass })}
|
|
927
|
-
></div>
|
|
928
|
-
<div
|
|
929
|
-
id="offcanvas"
|
|
930
|
-
part="offcanvas"
|
|
931
|
-
role="dialog"
|
|
932
|
-
aria-modal="true"
|
|
933
|
-
class=${xt({ closed: this.closedClass })}
|
|
934
|
-
?backdrop="${this.backdrop}"
|
|
935
|
-
>
|
|
936
|
-
<div id="header">
|
|
937
|
-
<slot name="header"></slot>
|
|
938
|
-
</div>
|
|
939
|
-
|
|
940
|
-
<div id="main" part="main">
|
|
941
|
-
<slot></slot>
|
|
942
|
-
</div>
|
|
943
|
-
|
|
944
|
-
<div id="footer" part="footer">
|
|
945
|
-
<slot name="footer"></slot>
|
|
946
|
-
</div>
|
|
947
|
-
</div>
|
|
948
|
-
`;
|
|
949
|
-
}
|
|
950
|
-
};
|
|
951
|
-
_.styles = [T(ve)];
|
|
952
|
-
B([
|
|
953
|
-
u({ type: Boolean, reflect: !0 })
|
|
954
|
-
], _.prototype, "backdrop", 2);
|
|
955
|
-
B([
|
|
956
|
-
u({ type: Boolean, reflect: !0 })
|
|
957
|
-
], _.prototype, "opened", 2);
|
|
958
|
-
B([
|
|
959
|
-
u({ type: String, attribute: "data-group-name" })
|
|
960
|
-
], _.prototype, "dataGroupName", 2);
|
|
961
|
-
B([
|
|
962
|
-
Ht()
|
|
963
|
-
], _.prototype, "closedClass", 2);
|
|
964
|
-
_ = B([
|
|
965
|
-
W(_.is)
|
|
966
|
-
], _);
|
|
967
|
-
const be = ":host{--container-width: var(--nt-container-width);--text-color: var(--nt-text);--hover-color: var(--nt-primary);--hover-text-color: var(--nt-text-on-primary);--transition: .2s ease-in-out;--submenu-bg: var(--nt-light);--submenu-text-color: var(--nt-text);--justify-content: center;--sidemenu-bg: var(--nt-soft-primary);--justify-sidebar-burger: flex-end;--height: auto;--default-alpha: .7;height:var(--height);display:block}nav{height:100%}#main{height:100%}#burger-wrapper{padding:15px}#text{padding-right:10px}#burger-default{cursor:pointer}#burger-default slot::slotted(span){color:rgb(from var(--text-color) r g b/var(--default-alpha));transition:color var(--transition)}#burger-default nte-burger{--color: rgb(from var(--text-color) r g b / var(--default-alpha))}#burger-default:hover slot::slotted(span){color:rgb(from var(--text-color) r g b/1)}#burger-default:hover nte-burger{--color: rgb(from var(--text-color) r g b / 1)}";
|
|
968
|
-
var _e = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, N = (s, t, e, i) => {
|
|
969
|
-
for (var r = i > 1 ? void 0 : i ? ye(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
970
|
-
(o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
|
|
971
|
-
return i && r && _e(t, e, r), r;
|
|
972
|
-
};
|
|
973
|
-
let y = class extends v {
|
|
974
|
-
constructor() {
|
|
975
|
-
super(), this.mode = "slave", this.breakpoint = "99999px", this.transferTo = "", this.dataGroupName = "", this._isTransferred = !1;
|
|
19
|
+
n(this, "mode", "slave");
|
|
20
|
+
n(this, "breakpoint", "99999px");
|
|
21
|
+
n(this, "transferTo", "");
|
|
22
|
+
n(this, "dataGroupName", "");
|
|
23
|
+
n(this, "_isTransferred", !1);
|
|
976
24
|
}
|
|
977
25
|
getOffcanvas() {
|
|
978
26
|
return this.transferTo ? document.querySelector(this.transferTo) : null;
|
|
979
27
|
}
|
|
980
28
|
getOffcanvasNav() {
|
|
981
|
-
const
|
|
982
|
-
return
|
|
29
|
+
const e = this.getOffcanvas();
|
|
30
|
+
return e ? e.querySelector("nte-nav") : null;
|
|
983
31
|
}
|
|
984
32
|
render() {
|
|
985
|
-
return
|
|
33
|
+
return h` <nav>
|
|
986
34
|
<div id="burger-wrapper" ?hidden=${!this._isTransferred}>
|
|
987
35
|
<slot
|
|
988
36
|
name="burger"
|
|
@@ -991,12 +39,12 @@ let y = class extends v {
|
|
|
991
39
|
id="burger"
|
|
992
40
|
class="burger"
|
|
993
41
|
@click=${() => {
|
|
994
|
-
var
|
|
995
|
-
return (
|
|
42
|
+
var e;
|
|
43
|
+
return (e = this.getOffcanvas()) == null ? void 0 : e.open();
|
|
996
44
|
}}
|
|
997
45
|
>
|
|
998
46
|
<!-- fallback icon -->
|
|
999
|
-
${this._isTransferred ?
|
|
47
|
+
${this._isTransferred ? h`<div id="burger-default" style="display:flex; align-items: center; justify-content: center;">
|
|
1000
48
|
<div id="text"><slot name="menu-text"></slot></div>
|
|
1001
49
|
<nte-burger
|
|
1002
50
|
data-group-name="${this.dataGroupName}"
|
|
@@ -1012,162 +60,71 @@ let y = class extends v {
|
|
|
1012
60
|
</div>
|
|
1013
61
|
</nav>`;
|
|
1014
62
|
}
|
|
1015
|
-
transferToElement(
|
|
1016
|
-
var
|
|
1017
|
-
const t = (
|
|
63
|
+
transferToElement(e) {
|
|
64
|
+
var a;
|
|
65
|
+
const t = (a = this.shadowRoot) == null ? void 0 : a.querySelector("#main-slot");
|
|
1018
66
|
if (t === null)
|
|
1019
67
|
return;
|
|
1020
|
-
Array.from(t.assignedElements({ flatten: !0 })).forEach((
|
|
1021
|
-
|
|
68
|
+
Array.from(t.assignedElements({ flatten: !0 })).forEach((s) => {
|
|
69
|
+
s instanceof HTMLElement && e.appendChild(s);
|
|
1022
70
|
});
|
|
1023
71
|
}
|
|
1024
|
-
updated(
|
|
1025
|
-
var t,
|
|
1026
|
-
super.updated(
|
|
72
|
+
updated(e) {
|
|
73
|
+
var t, i;
|
|
74
|
+
super.updated(e), this._isTransferred ? this.transferToElement(
|
|
1027
75
|
this.getOffcanvasNav() ?? (() => {
|
|
1028
76
|
throw new Error("No offcanvas nav found");
|
|
1029
77
|
})()
|
|
1030
|
-
) : ((t = this.getOffcanvasNav()) == null || t.transferToElement(this), (
|
|
78
|
+
) : ((t = this.getOffcanvasNav()) == null || t.transferToElement(this), (i = this.getOffcanvas()) == null || i.close());
|
|
1031
79
|
}
|
|
1032
|
-
firstUpdated(
|
|
1033
|
-
super.firstUpdated(
|
|
80
|
+
firstUpdated(e) {
|
|
81
|
+
super.firstUpdated(e);
|
|
1034
82
|
const t = this.classList;
|
|
1035
83
|
!t.contains("nav-vertical") && !t.contains("nav-horizontal") && t.add(this.closest("nte-offcanvas") === null ? "nav-horizontal" : "nav-vertical");
|
|
1036
84
|
}
|
|
1037
85
|
async connectedCallback() {
|
|
1038
|
-
await
|
|
1039
|
-
|
|
86
|
+
await u(), super.connectedCallback(), this.mode !== "slave" && this.transferTo !== "" && (this._isTransferred = !1, this.breakpoint !== "" && (m(this.breakpoint) || (this._isTransferred = !0), window.addEventListener("breakpoint-changed", (e) => {
|
|
87
|
+
m(this.breakpoint) ? this._isTransferred = !1 : this._isTransferred = !0;
|
|
1040
88
|
})));
|
|
1041
89
|
}
|
|
1042
90
|
};
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
],
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
],
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
],
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
],
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
],
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
],
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
* @license
|
|
1070
|
-
* Copyright 2017 Google LLC
|
|
1071
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1072
|
-
*/
|
|
1073
|
-
const R = (s, t) => {
|
|
1074
|
-
var i;
|
|
1075
|
-
const e = s._$AN;
|
|
1076
|
-
if (e === void 0) return !1;
|
|
1077
|
-
for (const r of e) (i = r._$AO) == null || i.call(r, t, !1), R(r, t);
|
|
1078
|
-
return !0;
|
|
1079
|
-
}, J = (s) => {
|
|
1080
|
-
let t, e;
|
|
1081
|
-
do {
|
|
1082
|
-
if ((t = s._$AM) === void 0) break;
|
|
1083
|
-
e = t._$AN, e.delete(s), s = t;
|
|
1084
|
-
} while ((e == null ? void 0 : e.size) === 0);
|
|
1085
|
-
}, Wt = (s) => {
|
|
1086
|
-
for (let t; t = s._$AM; s = t) {
|
|
1087
|
-
let e = t._$AN;
|
|
1088
|
-
if (e === void 0) t._$AN = e = /* @__PURE__ */ new Set();
|
|
1089
|
-
else if (e.has(s)) break;
|
|
1090
|
-
e.add(s), xe(t);
|
|
1091
|
-
}
|
|
1092
|
-
};
|
|
1093
|
-
function we(s) {
|
|
1094
|
-
this._$AN !== void 0 ? (J(this), this._$AM = s, Wt(this)) : this._$AM = s;
|
|
1095
|
-
}
|
|
1096
|
-
function Ae(s, t = !1, e = 0) {
|
|
1097
|
-
const i = this._$AH, r = this._$AN;
|
|
1098
|
-
if (r !== void 0 && r.size !== 0) if (t) if (Array.isArray(i)) for (let n = e; n < i.length; n++) R(i[n], !1), J(i[n]);
|
|
1099
|
-
else i != null && (R(i, !1), J(i));
|
|
1100
|
-
else R(this, s);
|
|
1101
|
-
}
|
|
1102
|
-
const xe = (s) => {
|
|
1103
|
-
s.type == Dt.CHILD && (s._$AP ?? (s._$AP = Ae), s._$AQ ?? (s._$AQ = we));
|
|
1104
|
-
};
|
|
1105
|
-
class Ee extends Gt {
|
|
1106
|
-
constructor() {
|
|
1107
|
-
super(...arguments), this._$AN = void 0;
|
|
1108
|
-
}
|
|
1109
|
-
_$AT(t, e, i) {
|
|
1110
|
-
super._$AT(t, e, i), Wt(this), this.isConnected = t._$AU;
|
|
1111
|
-
}
|
|
1112
|
-
_$AO(t, e = !0) {
|
|
1113
|
-
var i, r;
|
|
1114
|
-
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (r = this.disconnected) == null || r.call(this)), e && (R(this, t), J(this));
|
|
1115
|
-
}
|
|
1116
|
-
setValue(t) {
|
|
1117
|
-
if ($e(this._$Ct)) this._$Ct._$AI(t, this);
|
|
1118
|
-
else {
|
|
1119
|
-
const e = [...this._$Ct._$AH];
|
|
1120
|
-
e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1123
|
-
disconnected() {
|
|
1124
|
-
}
|
|
1125
|
-
reconnected() {
|
|
1126
|
-
}
|
|
1127
|
-
}
|
|
1128
|
-
/**
|
|
1129
|
-
* @license
|
|
1130
|
-
* Copyright 2020 Google LLC
|
|
1131
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1132
|
-
*/
|
|
1133
|
-
const Et = () => new Se();
|
|
1134
|
-
class Se {
|
|
1135
|
-
}
|
|
1136
|
-
const it = /* @__PURE__ */ new WeakMap(), St = zt(class extends Ee {
|
|
1137
|
-
render(s) {
|
|
1138
|
-
return p;
|
|
1139
|
-
}
|
|
1140
|
-
update(s, [t]) {
|
|
1141
|
-
var i;
|
|
1142
|
-
const e = t !== this.G;
|
|
1143
|
-
return e && this.G !== void 0 && this.rt(void 0), (e || this.lt !== this.ct) && (this.G = t, this.ht = (i = s.options) == null ? void 0 : i.host, this.rt(this.ct = s.element)), p;
|
|
1144
|
-
}
|
|
1145
|
-
rt(s) {
|
|
1146
|
-
if (this.isConnected || (s = void 0), typeof this.G == "function") {
|
|
1147
|
-
const t = this.ht ?? globalThis;
|
|
1148
|
-
let e = it.get(t);
|
|
1149
|
-
e === void 0 && (e = /* @__PURE__ */ new WeakMap(), it.set(t, e)), e.get(this.G) !== void 0 && this.G.call(this.ht, void 0), e.set(this.G, s), s !== void 0 && this.G.call(this.ht, s);
|
|
1150
|
-
} else this.G.value = s;
|
|
1151
|
-
}
|
|
1152
|
-
get lt() {
|
|
1153
|
-
var s, t;
|
|
1154
|
-
return typeof this.G == "function" ? (s = it.get(this.ht ?? globalThis)) == null ? void 0 : s.get(this.G) : (t = this.G) == null ? void 0 : t.value;
|
|
1155
|
-
}
|
|
1156
|
-
disconnected() {
|
|
1157
|
-
this.lt === this.ct && this.rt(void 0);
|
|
1158
|
-
}
|
|
1159
|
-
reconnected() {
|
|
1160
|
-
this.rt(this.ct);
|
|
1161
|
-
}
|
|
1162
|
-
}), Ce = "*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a,i{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--bg: transparent;--spacer-bg: transparent;--container-width: var(--nt-container-width, 100%);--brand-height: 80px;--spacer-height: 80px;width:100vw;margin:0}:host(a){height:85px;width:auto}#wrapper{position:relative;left:0;top:0;right:0;width:100%}#spacer{position:relative;top:0;left:0;width:100%;transition:height .3s ease-in-out;height:var(--spacer-height);background-color:var(--spacer-bg)}#navbar{position:absolute;top:0;width:100vw;height:auto;background-color:var(--bg);z-index:1000}#main{width:100vw;display:block}";
|
|
1163
|
-
var Te = Object.defineProperty, Pe = Object.getOwnPropertyDescriptor, Bt = (s, t, e, i) => {
|
|
1164
|
-
for (var r = i > 1 ? void 0 : i ? Pe(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
1165
|
-
(o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
|
|
1166
|
-
return i && r && Te(t, e, r), r;
|
|
1167
|
-
};
|
|
1168
|
-
let K = class extends v {
|
|
91
|
+
C(l, "styles", [v(N)]);
|
|
92
|
+
d([
|
|
93
|
+
c({ type: String, reflect: !0 })
|
|
94
|
+
], l.prototype, "mode", 2);
|
|
95
|
+
d([
|
|
96
|
+
c({ type: String, reflect: !0 })
|
|
97
|
+
], l.prototype, "breakpoint", 2);
|
|
98
|
+
d([
|
|
99
|
+
c({ type: String, reflect: !0, attribute: "transfer-to" })
|
|
100
|
+
], l.prototype, "transferTo", 2);
|
|
101
|
+
d([
|
|
102
|
+
c({ type: String, reflect: !1, attribute: "data-group-name" })
|
|
103
|
+
], l.prototype, "dataGroupName", 2);
|
|
104
|
+
d([
|
|
105
|
+
L()
|
|
106
|
+
], l.prototype, "_isTransferred", 2);
|
|
107
|
+
l = d([
|
|
108
|
+
g("nte-nav")
|
|
109
|
+
], l);
|
|
110
|
+
const Y = "*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a,i{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--bg: transparent;--spacer-bg: transparent;--container-width: var(--nt-container-width, 100%);--brand-height: 80px;--spacer-height: 80px;width:100vw;margin:0}:host(a){height:85px;width:auto}#wrapper{position:relative;left:0;top:0;right:0;width:100%}#spacer{position:relative;top:0;left:0;width:100%;transition:height .3s ease-in-out;height:var(--spacer-height);background-color:var(--spacer-bg)}#navbar{position:absolute;top:0;width:100vw;height:auto;background-color:var(--bg);z-index:1000}#main{width:100vw;display:block}";
|
|
111
|
+
var S = Object.defineProperty, D = Object.getOwnPropertyDescriptor, U = (r, e, t) => e in r ? S(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, T = (r, e, t, i) => {
|
|
112
|
+
for (var a = i > 1 ? void 0 : i ? D(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
113
|
+
(o = r[s]) && (a = (i ? o(e, t, a) : o(a)) || a);
|
|
114
|
+
return i && a && S(e, t, a), a;
|
|
115
|
+
}, z = (r, e, t) => U(r, e + "", t);
|
|
116
|
+
let p = class extends b {
|
|
1169
117
|
constructor() {
|
|
1170
|
-
super()
|
|
118
|
+
super();
|
|
119
|
+
// lit refs for navbar and spacer
|
|
120
|
+
n(this, "navbarRef", w());
|
|
121
|
+
n(this, "spacerRef", w());
|
|
122
|
+
n(this, "scrollThreshold", 0);
|
|
123
|
+
// Track last scroll position to detect scroll direction
|
|
124
|
+
n(this, "_lastScrollY", window.scrollY);
|
|
125
|
+
n(this, "_scrollUpPixels", 0);
|
|
126
|
+
n(this, "_debouncer");
|
|
127
|
+
this._debouncer = new $(100, 300), document.addEventListener(
|
|
1171
128
|
"scroll",
|
|
1172
129
|
async () => {
|
|
1173
130
|
this.updateScrollState();
|
|
@@ -1179,24 +136,24 @@ let K = class extends v {
|
|
|
1179
136
|
return "nte-navbar";
|
|
1180
137
|
}
|
|
1181
138
|
updateScrollState() {
|
|
1182
|
-
const
|
|
1183
|
-
|
|
139
|
+
const e = window.scrollY;
|
|
140
|
+
e > 1 ? this.classList.add("is-scrolled") : this.classList.remove("is-scrolled"), e < this._lastScrollY ? (this._scrollUpPixels += this._lastScrollY - e, this._scrollUpPixels > 10 && e < this.scrollThreshold && this.classList.add("is-scrolling-up")) : (this._scrollUpPixels = 0, this.classList.remove("is-scrolling-up")), e > this.scrollThreshold ? this.classList.add("is-below-threshold") : this.classList.remove("is-below-threshold"), this._lastScrollY = e;
|
|
1184
141
|
}
|
|
1185
142
|
async connectedCallback() {
|
|
1186
|
-
this.updateScrollState(), await
|
|
143
|
+
this.updateScrollState(), await u(), super.connectedCallback();
|
|
1187
144
|
}
|
|
1188
145
|
// Adjust the spacer height on every render
|
|
1189
|
-
async updated(
|
|
1190
|
-
await
|
|
146
|
+
async updated(e) {
|
|
147
|
+
await u(), super.updated(e);
|
|
1191
148
|
}
|
|
1192
|
-
firstUpdated(
|
|
1193
|
-
|
|
149
|
+
firstUpdated(e) {
|
|
150
|
+
x.observeEmptySlots(this);
|
|
1194
151
|
}
|
|
1195
152
|
render() {
|
|
1196
|
-
return
|
|
153
|
+
return h`
|
|
1197
154
|
<div id="wrapper" part="wrapper">
|
|
1198
|
-
<div id="spacer" part="spacer" ${
|
|
1199
|
-
<div id="navbar" part="navbar" ${
|
|
155
|
+
<div id="spacer" part="spacer" ${_(this.spacerRef)}></div>
|
|
156
|
+
<div id="navbar" part="navbar" ${_(this.navbarRef)}>
|
|
1200
157
|
<div id="brand" part="brand">
|
|
1201
158
|
<slot name="brand"></slot>
|
|
1202
159
|
</div>
|
|
@@ -1208,38 +165,39 @@ let K = class extends v {
|
|
|
1208
165
|
`;
|
|
1209
166
|
}
|
|
1210
167
|
};
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
],
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
],
|
|
1218
|
-
const
|
|
1219
|
-
var
|
|
1220
|
-
for (var
|
|
1221
|
-
(o = s
|
|
1222
|
-
return
|
|
1223
|
-
};
|
|
1224
|
-
let
|
|
168
|
+
z(p, "styles", [v(Y)]);
|
|
169
|
+
T([
|
|
170
|
+
c({ type: Number, attribute: "scroll-threshold", reflect: !0 })
|
|
171
|
+
], p.prototype, "scrollThreshold", 2);
|
|
172
|
+
p = T([
|
|
173
|
+
g("nte-navbar")
|
|
174
|
+
], p);
|
|
175
|
+
const R = "*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html,body{height:100%;width:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;color:inherit;background:none;border:none;outline:none}a,i{color:inherit;text-decoration:none}ul,ol{list-style:none}table{border-collapse:collapse;border-spacing:0}slot{display:contents}:host{--container-width: var(--nt-container-width, 100%);--background: transparent;--text-color: var(--nt-text);--height: auto;--brand-height: 80px;display:block;height:100%;width:100vw}:host(.hide-on-scroll){transition:max-height .3s ease-in-out;max-height:100px}:host(.hide-on-scroll.is-scrolled){max-height:0;overflow:hidden}#main{height:var(--height);transition:height .2s ease-in-out;overflow:visible;width:100%;display:flex;background:var(--background)}#container{width:var(--container-width);margin:0 auto;display:flex}#container #brand{min-width:0;flex-shrink:1;width:auto;align-items:start;display:flex;height:100%;justify-items:center}#container #brand:has(slot[empty]){display:none}#container #nav{display:flex;flex-grow:1;justify-content:end;align-items:center;gap:1rem}";
|
|
176
|
+
var j = Object.defineProperty, F = Object.getOwnPropertyDescriptor, q = (r, e, t) => e in r ? j(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, G = (r, e, t, i) => {
|
|
177
|
+
for (var a = i > 1 ? void 0 : i ? F(e, t) : e, s = r.length - 1, o; s >= 0; s--)
|
|
178
|
+
(o = r[s]) && (a = o(a) || a);
|
|
179
|
+
return a;
|
|
180
|
+
}, B = (r, e, t) => q(r, e + "", t);
|
|
181
|
+
let f = class extends b {
|
|
1225
182
|
constructor() {
|
|
1226
|
-
super(...arguments)
|
|
183
|
+
super(...arguments);
|
|
184
|
+
n(this, "_isScrolled", !1);
|
|
1227
185
|
}
|
|
1228
186
|
static get is() {
|
|
1229
187
|
return "nte-navbar-line";
|
|
1230
188
|
}
|
|
1231
189
|
updateScrollState() {
|
|
1232
|
-
const
|
|
1233
|
-
|
|
190
|
+
const e = window.scrollY;
|
|
191
|
+
e > 1 && !this._isScrolled ? (this.classList.add("is-scrolled"), this._isScrolled = !0) : e <= 1 && this._isScrolled && (this.classList.remove("is-scrolled"), this._isScrolled = !1);
|
|
1234
192
|
}
|
|
1235
193
|
connectedCallback() {
|
|
1236
194
|
super.connectedCallback(), window.addEventListener("scroll", () => this.updateScrollState(), { passive: !0 });
|
|
1237
195
|
}
|
|
1238
|
-
async firstUpdated(
|
|
1239
|
-
|
|
196
|
+
async firstUpdated(e) {
|
|
197
|
+
x.observeEmptySlots(this), this.updateScrollState();
|
|
1240
198
|
}
|
|
1241
199
|
render() {
|
|
1242
|
-
return
|
|
200
|
+
return h`
|
|
1243
201
|
<div id="main" part="main">
|
|
1244
202
|
<div id="container" part="container">
|
|
1245
203
|
<div id="brand" part="brand">
|
|
@@ -1253,74 +211,12 @@ let rt = class extends v {
|
|
|
1253
211
|
`;
|
|
1254
212
|
}
|
|
1255
213
|
};
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
],
|
|
1260
|
-
const Me = ":host{--size: 40px;--color: var(--nt-text, black);--color-hover: var(--color);--width: 4px;height:var(--size);width:var(--size);display:block}#button{padding:0;width:100%;height:100%;cursor:pointer}.hamburger{display:block;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0 none;background:none;position:relative;transition:transform .4s}.hamburger:hover{--color: var(--color-hover)}:host([open]) .hamburger .bar:nth-of-type(1){transform-origin:center center;transform:translateY(calc(.5em - var(--width) / 2)) rotate(45deg)}:host([open]) .hamburger .bar:nth-of-type(2){opacity:0}:host([open]) .hamburger .bar:nth-of-type(3){transform:translateY(calc(.5em - var(--width) / 2)) rotate(-45deg)}:host(:not([open])) #button:hover .bar:nth-of-type(1){transform:translateY(calc(.2em - var(--width) / 2))}:host(:not([open])) #button:hover .bar:nth-of-type(2){transform:translateY(calc(.5em - var(--width) / 2))}:host(:not([open])) #button:hover .bar:nth-of-type(3){transform:translateY(calc(.8em - var(--width) / 2))}.bar{font-size:var(--size);height:var(--width);width:var(--size);display:block;position:absolute;top:0;background-color:var(--color);transition:.4s}.bar:nth-of-type(1){transform:translateY(calc(.25em - var(--width) / 2))}.bar:nth-of-type(2){transform:translateY(calc(.5em - var(--width) / 2))}.bar:nth-of-type(3){transform:translateY(calc(.75em - var(--width) / 2))}";
|
|
1261
|
-
/**
|
|
1262
|
-
* @license
|
|
1263
|
-
* Copyright 2020 Google LLC
|
|
1264
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1265
|
-
*/
|
|
1266
|
-
const Ue = Symbol.for(""), Le = (s) => {
|
|
1267
|
-
if ((s == null ? void 0 : s.r) === Ue) return s == null ? void 0 : s._$litStatic$;
|
|
1268
|
-
}, Ct = /* @__PURE__ */ new Map(), He = (s) => (t, ...e) => {
|
|
1269
|
-
const i = e.length;
|
|
1270
|
-
let r, n;
|
|
1271
|
-
const o = [], l = [];
|
|
1272
|
-
let a, h = 0, c = !1;
|
|
1273
|
-
for (; h < i; ) {
|
|
1274
|
-
for (a = t[h]; h < i && (n = e[h], (r = Le(n)) !== void 0); ) a += r + t[++h], c = !0;
|
|
1275
|
-
h !== i && l.push(n), o.push(a), h++;
|
|
1276
|
-
}
|
|
1277
|
-
if (h === i && o.push(t[i]), c) {
|
|
1278
|
-
const d = o.join("$$lit$$");
|
|
1279
|
-
(t = Ct.get(d)) === void 0 && (o.raw = o, Ct.set(d, t = o)), e = l;
|
|
1280
|
-
}
|
|
1281
|
-
return s(t, ...e);
|
|
1282
|
-
}, Re = He(k);
|
|
1283
|
-
var je = Object.defineProperty, De = Object.getOwnPropertyDescriptor, I = (s, t, e, i) => {
|
|
1284
|
-
for (var r = i > 1 ? void 0 : i ? De(t, e) : t, n = s.length - 1, o; n >= 0; n--)
|
|
1285
|
-
(o = s[n]) && (r = (i ? o(t, e, r) : o(r)) || r);
|
|
1286
|
-
return i && r && je(t, e, r), r;
|
|
1287
|
-
};
|
|
1288
|
-
let C = class extends v {
|
|
1289
|
-
constructor() {
|
|
1290
|
-
super(), this.open = !1, this.text = "Menu", this.dataGroupName = "";
|
|
1291
|
-
}
|
|
1292
|
-
render() {
|
|
1293
|
-
return Re` <button id="button" class="hamburger">
|
|
1294
|
-
<div class="bar"></div>
|
|
1295
|
-
<div class="bar"></div>
|
|
1296
|
-
<div class="bar"></div>
|
|
1297
|
-
</button>`;
|
|
1298
|
-
}
|
|
1299
|
-
listenEvents(s) {
|
|
1300
|
-
s.detail.groupName === this.dataGroupName && (this.open = s.detail.open);
|
|
1301
|
-
}
|
|
1302
|
-
update(s) {
|
|
1303
|
-
super.update(s), s.has("open") && this.dataGroupName !== "" && jt(this.open, this.dataGroupName);
|
|
1304
|
-
}
|
|
1305
|
-
};
|
|
1306
|
-
C.styles = [T(Me)];
|
|
1307
|
-
I([
|
|
1308
|
-
u({ type: Boolean, attribute: "open", reflect: !0 })
|
|
1309
|
-
], C.prototype, "open", 2);
|
|
1310
|
-
I([
|
|
1311
|
-
u({ type: String, reflect: !0 })
|
|
1312
|
-
], C.prototype, "text", 2);
|
|
1313
|
-
I([
|
|
1314
|
-
u({ type: String, reflect: !1, attribute: "data-group-name" })
|
|
1315
|
-
], C.prototype, "dataGroupName", 2);
|
|
1316
|
-
I([
|
|
1317
|
-
ue(Rt, document)
|
|
1318
|
-
], C.prototype, "listenEvents", 1);
|
|
1319
|
-
C = I([
|
|
1320
|
-
W("nte-burger")
|
|
1321
|
-
], C);
|
|
214
|
+
B(f, "styles", [v(R)]);
|
|
215
|
+
f = G([
|
|
216
|
+
g("nte-navbar-line")
|
|
217
|
+
], f);
|
|
1322
218
|
console.log("Loading nte-nav...");
|
|
1323
219
|
export {
|
|
1324
|
-
|
|
1325
|
-
|
|
220
|
+
l as NteNav,
|
|
221
|
+
p as NteNavbar
|
|
1326
222
|
};
|