@nextrap/nte-nav 0.2.9 → 0.2.12
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 +12 -0
- package/index.css +1 -1
- package/index.js +268 -224
- package/lib/nte-navbar.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 0.2.12 (2025-07-21)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for nte-nav to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 0.2.11 (2025-07-21)
|
|
6
|
+
|
|
7
|
+
This was a version bump only for nte-nav to align it with other projects, there were no code changes.
|
|
8
|
+
|
|
9
|
+
## 0.2.10 (2025-07-21)
|
|
10
|
+
|
|
11
|
+
This was a version bump only for nte-nav to align it with other projects, there were no code changes.
|
|
12
|
+
|
|
1
13
|
## 0.2.9 (2025-07-21)
|
|
2
14
|
|
|
3
15
|
This was a version bump only for nte-nav to align it with other projects, there were no code changes.
|
package/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.nav-vertical{width:100%}.nav-vertical ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;width:100%;gap:.15rem;position:relative}.nav-vertical ul>li,.nav-vertical ul li{position:relative;display:block}.nav-vertical ul>li>a,.nav-vertical ul li>a{display:block;padding:.65em 1.1em;color:var(--text-color);text-decoration:none;transition:background var(--transition),color var(--transition);font-weight:500}.nav-vertical ul>li>a.active,.nav-vertical ul>li>a:active,.nav-vertical ul li>a.active,.nav-vertical ul li>a:active{background:var(--hover-color);color:var(--hover-text-color)}.nav-vertical ul>li>a:hover,li:hover>.nav-vertical ul>li>a,.nav-vertical ul li>a:hover,li:hover>.nav-vertical ul li>a{background:var(--hover-color);color:var(--hover-text-color)}.nav-vertical ul>li>a:after,.nav-vertical ul li>a:after{content:"";display:inline-block;margin-left:.47em;margin-bottom:.08em;border:solid currentColor;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg) scale(.8);opacity:0;transition:opacity var(--transition),transform var(--transition)}.nav-vertical ul>li:has(ul)>a:after,.nav-vertical ul li:has(ul)>a:after{opacity:.55}.nav-vertical ul>li:hover>a:after,.nav-vertical ul>li:focus-within>a:after,.nav-vertical ul li:hover>a:after,.nav-vertical ul li:focus-within>a:after{transform:rotate(135deg) scale(.85)}.nav-vertical ul>li:focus-within>ul,.nav-vertical ul li:focus-within>ul{display:flex}.nav-vertical ul>li>ul,.nav-vertical ul li>ul{list-style:none;margin:0;padding:0 0 0 .7em;display:none;flex-direction:column}li>.nav-vertical ul>li>ul,.nav-vertical ul>li>ul:focus-within,li>.nav-vertical ul li>ul,.nav-vertical ul li>ul:focus-within{display:flex}.nav-vertical ul>li>ul>li>a,.nav-vertical ul li>ul>li>a{padding:.55em 1.1em;font-size:.95em;font-weight:400;color:var(--text-color);transition:background var(--transition),color var(--transition)}.nav-vertical ul>li>ul>li>a:hover,.nav-vertical ul li>ul>li>a:hover{background:var(--hover-color);color:var(--hover-text-color)}.nav-horizontal{--item-padding: .65em 1.1em;--padding: 0}.nav-horizontal.pos-start{--justify-content: flex-start}.nav-horizontal.pos-end{--justify-content: flex-end}.nav-horizontal.pos-center{--justify-content: center}.nav-horizontal.pos-stretch{--justify-content: space-between}.nav-horizontal.size-sm{--item-padding: 2px 15px;--item-margin: 2px .2em;--font-size: .6rem}.nav-horizontal.style-pills{--pill-background: rgba(var(--nt-primary-rgb), .8);--pill-radius: .5em;--pill-text-color: var(--nt-text-on-primary);--pill-hover-background: rgba(var(--nt-primary-rgb), 1)}.nav-horizontal.style-pills>ul>li>a{background:var(--pill-background);border-radius:var(--pill-radius);--text-color: var(--pill-text-color);transition:background var(--transition),color var(--transition)}.nav-horizontal.style-pills>ul>li>a:hover,.nav-horizontal.style-pills>ul>li>a:focus{background:var(--pill-hover-background);--font-color: var(--pill-text-color)}.nav-horizontal.style-pills>ul>li>a.active,.nav-horizontal.style-pills>ul>li>a:active{background:var(--pill-hover-background);--font-color: var(--pill-text-color)}.nav-horizontal.style-undecorated{--item-padding: .65em 1.1em;--item-margin: 0;--text-color: var(--nt-text);--hover-color: transparent;--hover-text-color: var(--nt-text);--submenu-bg: var(--nt-light);--submenu-text-color: var(--nt-text)}.nav-horizontal ul{list-style:none;padding:var(--padding);margin:0;display:flex;flex-direction:row;align-items:center;position:relative;height:100%;justify-content:var(--justify-content)}.nav-horizontal ul>li,.nav-horizontal ul li{position:relative;display:flex;align-items:center;height:inherit}.nav-horizontal ul>li>a,.nav-horizontal ul li>a{display:flex;align-items:center;margin:var(--item-margin, 0);height:100%;padding:var(--item-padding);gap:.5em;text-decoration:none;color:var(--text-color);transition:background var(--transition),color var(--transition);font-weight:500}.nav-horizontal ul>li>a.active,.nav-horizontal ul>li>a:active,.nav-horizontal ul li>a.active,.nav-horizontal ul li>a:active{background:var(--hover-color);color:var(--hover-text-color)}.nav-horizontal ul>li>a:hover,li:hover>.nav-horizontal ul>li>a,.nav-horizontal ul li>a:hover,li:hover>.nav-horizontal ul li>a{background:var(--hover-color);color:var(--hover-text-color)}.nav-horizontal ul>li>a:after,.nav-horizontal ul li>a:after{content:"";display:none;margin-left:.47em;margin-bottom:.08em;border:solid currentColor;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg) scale(.8);opacity:0;transition:opacity var(--transition),transform var(--transition)}.nav-horizontal ul>li:has(ul)>a:after,.nav-horizontal ul li:has(ul)>a:after{opacity:.55;display:inline-block}.nav-horizontal ul>li:hover>a:after,.nav-horizontal ul>li:focus-within>a:after,.nav-horizontal ul li:hover>a:after,.nav-horizontal ul li:focus-within>a:after{transform:rotate(-135deg) scale(.85)}.nav-horizontal ul>li>ul,.nav-horizontal ul li>ul{display:block;visibility:hidden;opacity:0;pointer-events:none;min-width:11rem;background:var(--submenu-bg);position:absolute;top:100%;left:0;margin-top:.3em;flex-direction:column;z-index:3;transition:opacity var(--transition),transform var(--transition),visibility var(--transition);transform:translateY(-.7em)}.nav-horizontal ul>li>ul:last-child,.nav-horizontal ul li>ul:last-child{right:0;left:auto}.nav-horizontal ul>li>ul:hover,.nav-horizontal ul>li>ul:focus-within,.nav-horizontal ul li>ul:hover,.nav-horizontal ul li>ul:focus-within{visibility:visible;opacity:1;pointer-events:all;transform:translateY(0)}.nav-horizontal ul>li>ul>li,.nav-horizontal ul li>ul>li{display:flex;height:auto}.nav-horizontal ul>li>ul>li>a,.nav-horizontal ul li>ul>li>a{display:block;width:100%;color:var(--text-color);padding:.63em 1.3em;font-size:.99em;font-weight:400;height:auto;transition:background var(--transition),color var(--transition)}.nav-horizontal ul>li>ul>li>a:hover,.nav-horizontal ul li>ul>li>a:hover{background:var(--hover-color);color:var(--hover-text-color)}.nav-horizontal ul>li:focus-within>ul,.nav-horizontal ul li:focus-within>ul{visibility:visible;opacity:1;pointer-events:all;transform:translateY(0)}nte-navbar.is-scrolled{--bg: rgba(var(--nt-white-rgb), 1)}nte-navbar.autoborder.is-scrolled::part(navbar){border-bottom:1px solid rgba(var(--nt-text-rgb),.1)}nte-navbar.autoshadow::part(navbar){transition:box-shadow .3s ease-in-out}nte-navbar.autoshadow.is-scrolled::part(navbar){box-shadow:0 2px 10px rgba(var(--nt-text-rgb),.1)}nte-navbar.fixed::part(navbar){position:fixed;top:0;left:0;opacity:1;width:100
|
|
1
|
+
@charset "UTF-8";.nav-vertical{width:100%}.nav-vertical ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;width:100%;gap:.15rem;position:relative}.nav-vertical ul>li,.nav-vertical ul li{position:relative;display:block}.nav-vertical ul>li>a,.nav-vertical ul li>a{display:block;padding:.65em 1.1em;color:var(--text-color);text-decoration:none;transition:background var(--transition),color var(--transition);font-weight:500}.nav-vertical ul>li>a.active,.nav-vertical ul>li>a:active,.nav-vertical ul li>a.active,.nav-vertical ul li>a:active{background:var(--hover-color);color:var(--hover-text-color)}.nav-vertical ul>li>a:hover,li:hover>.nav-vertical ul>li>a,.nav-vertical ul li>a:hover,li:hover>.nav-vertical ul li>a{background:var(--hover-color);color:var(--hover-text-color)}.nav-vertical ul>li>a:after,.nav-vertical ul li>a:after{content:"";display:inline-block;margin-left:.47em;margin-bottom:.08em;border:solid currentColor;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg) scale(.8);opacity:0;transition:opacity var(--transition),transform var(--transition)}.nav-vertical ul>li:has(ul)>a:after,.nav-vertical ul li:has(ul)>a:after{opacity:.55}.nav-vertical ul>li:hover>a:after,.nav-vertical ul>li:focus-within>a:after,.nav-vertical ul li:hover>a:after,.nav-vertical ul li:focus-within>a:after{transform:rotate(135deg) scale(.85)}.nav-vertical ul>li:focus-within>ul,.nav-vertical ul li:focus-within>ul{display:flex}.nav-vertical ul>li>ul,.nav-vertical ul li>ul{list-style:none;margin:0;padding:0 0 0 .7em;display:none;flex-direction:column}li>.nav-vertical ul>li>ul,.nav-vertical ul>li>ul:focus-within,li>.nav-vertical ul li>ul,.nav-vertical ul li>ul:focus-within{display:flex}.nav-vertical ul>li>ul>li>a,.nav-vertical ul li>ul>li>a{padding:.55em 1.1em;font-size:.95em;font-weight:400;color:var(--text-color);transition:background var(--transition),color var(--transition)}.nav-vertical ul>li>ul>li>a:hover,.nav-vertical ul li>ul>li>a:hover{background:var(--hover-color);color:var(--hover-text-color)}.nav-horizontal{--item-padding: .65em 1.1em;--padding: 0}.nav-horizontal.pos-start{--justify-content: flex-start}.nav-horizontal.pos-end{--justify-content: flex-end}.nav-horizontal.pos-center{--justify-content: center}.nav-horizontal.pos-stretch{--justify-content: space-between}.nav-horizontal.size-sm{--item-padding: 2px 15px;--item-margin: 2px .2em;--font-size: .6rem}.nav-horizontal.style-pills{--pill-background: rgba(var(--nt-primary-rgb), .8);--pill-radius: .5em;--pill-text-color: var(--nt-text-on-primary);--pill-hover-background: rgba(var(--nt-primary-rgb), 1)}.nav-horizontal.style-pills>ul>li>a{background:var(--pill-background);border-radius:var(--pill-radius);--text-color: var(--pill-text-color);transition:background var(--transition),color var(--transition)}.nav-horizontal.style-pills>ul>li>a:hover,.nav-horizontal.style-pills>ul>li>a:focus{background:var(--pill-hover-background);--font-color: var(--pill-text-color)}.nav-horizontal.style-pills>ul>li>a.active,.nav-horizontal.style-pills>ul>li>a:active{background:var(--pill-hover-background);--font-color: var(--pill-text-color)}.nav-horizontal.style-undecorated{--item-padding: .65em 1.1em;--item-margin: 0;--text-color: var(--nt-text);--hover-color: transparent;--hover-text-color: var(--nt-text);--submenu-bg: var(--nt-light);--submenu-text-color: var(--nt-text)}.nav-horizontal ul{list-style:none;padding:var(--padding);margin:0;display:flex;flex-direction:row;align-items:center;position:relative;height:100%;justify-content:var(--justify-content)}.nav-horizontal ul>li,.nav-horizontal ul li{position:relative;display:flex;align-items:center;height:inherit}.nav-horizontal ul>li>a,.nav-horizontal ul li>a{display:flex;align-items:center;margin:var(--item-margin, 0);height:100%;padding:var(--item-padding);gap:.5em;text-decoration:none;color:var(--text-color);transition:background var(--transition),color var(--transition);font-weight:500}.nav-horizontal ul>li>a.active,.nav-horizontal ul>li>a:active,.nav-horizontal ul li>a.active,.nav-horizontal ul li>a:active{background:var(--hover-color);color:var(--hover-text-color)}.nav-horizontal ul>li>a:hover,li:hover>.nav-horizontal ul>li>a,.nav-horizontal ul li>a:hover,li:hover>.nav-horizontal ul li>a{background:var(--hover-color);color:var(--hover-text-color)}.nav-horizontal ul>li>a:after,.nav-horizontal ul li>a:after{content:"";display:none;margin-left:.47em;margin-bottom:.08em;border:solid currentColor;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg) scale(.8);opacity:0;transition:opacity var(--transition),transform var(--transition)}.nav-horizontal ul>li:has(ul)>a:after,.nav-horizontal ul li:has(ul)>a:after{opacity:.55;display:inline-block}.nav-horizontal ul>li:hover>a:after,.nav-horizontal ul>li:focus-within>a:after,.nav-horizontal ul li:hover>a:after,.nav-horizontal ul li:focus-within>a:after{transform:rotate(-135deg) scale(.85)}.nav-horizontal ul>li>ul,.nav-horizontal ul li>ul{display:block;visibility:hidden;opacity:0;pointer-events:none;min-width:11rem;background:var(--submenu-bg);position:absolute;top:100%;left:0;margin-top:.3em;flex-direction:column;z-index:3;transition:opacity var(--transition),transform var(--transition),visibility var(--transition);transform:translateY(-.7em)}.nav-horizontal ul>li>ul:last-child,.nav-horizontal ul li>ul:last-child{right:0;left:auto}.nav-horizontal ul>li>ul:hover,.nav-horizontal ul>li>ul:focus-within,.nav-horizontal ul li>ul:hover,.nav-horizontal ul li>ul:focus-within{visibility:visible;opacity:1;pointer-events:all;transform:translateY(0)}.nav-horizontal ul>li>ul>li,.nav-horizontal ul li>ul>li{display:flex;height:auto}.nav-horizontal ul>li>ul>li>a,.nav-horizontal ul li>ul>li>a{display:block;width:100%;color:var(--text-color);padding:.63em 1.3em;font-size:.99em;font-weight:400;height:auto;transition:background var(--transition),color var(--transition)}.nav-horizontal ul>li>ul>li>a:hover,.nav-horizontal ul li>ul>li>a:hover{background:var(--hover-color);color:var(--hover-text-color)}.nav-horizontal ul>li:focus-within>ul,.nav-horizontal ul li:focus-within>ul{visibility:visible;opacity:1;pointer-events:all;transform:translateY(0)}nte-navbar.is-scrolled{--bg: rgba(var(--nt-white-rgb), 1)}nte-navbar.autoborder.is-scrolled::part(navbar){border-bottom:1px solid rgba(var(--nt-text-rgb),.1)}nte-navbar.autoshadow::part(navbar){transition:box-shadow .3s ease-in-out}nte-navbar.autoshadow.is-scrolled::part(navbar){box-shadow:0 2px 10px rgba(var(--nt-text-rgb),.1)}nte-navbar.fixed::part(navbar){position:fixed;top:0;left:0;opacity:1;width:100%}nte-navbar.autohide::part(navbar){transition:transform .3s ease-in-out}nte-navbar.autohide.state-pre-scrolled.state-scrolling-down::part(navbar){transform:translateY(-100%)}nte-navbar.autohide.state-pre-scrolled.state-scrolling-up::part(navbar){transform:translateY(0);position:fixed;top:0;left:0;opacity:1;width:100%}nte-navbar.autohide.state-scrolled::part(navbar){position:fixed;top:0;left:0;opacity:1;width:100%;transform:translateY(-100%)}nte-navbar.autohide.state-scrolled.state-scrolling-up::part(navbar){transform:translateY(0);position:fixed;top:0;left:0;opacity:1;width:100%}nte-navbar-line [slot=brand] img{height:var(--brand-height);width:auto}
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var zt = function(s, t, e, i) {
|
|
2
2
|
function n(r) {
|
|
3
3
|
return r instanceof e ? r : new e(function(o) {
|
|
4
4
|
o(r);
|
|
@@ -25,8 +25,8 @@ var Dt = function(s, t, e, i) {
|
|
|
25
25
|
d((i = i.apply(s, t || [])).next());
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
|
-
function
|
|
29
|
-
return
|
|
28
|
+
function It() {
|
|
29
|
+
return zt(this, void 0, void 0, function* () {
|
|
30
30
|
return new Promise((s) => {
|
|
31
31
|
if (document.readyState === "complete" || document.readyState === "interactive")
|
|
32
32
|
return s("loaded");
|
|
@@ -34,7 +34,7 @@ function Et() {
|
|
|
34
34
|
});
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
var
|
|
37
|
+
var Wt = function(s, t, e, i) {
|
|
38
38
|
function n(r) {
|
|
39
39
|
return r instanceof e ? r : new e(function(o) {
|
|
40
40
|
o(r);
|
|
@@ -61,14 +61,14 @@ var zt = function(s, t, e, i) {
|
|
|
61
61
|
d((i = i.apply(s, t || [])).next());
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
|
-
function
|
|
65
|
-
return
|
|
64
|
+
function dt(s) {
|
|
65
|
+
return Wt(this, void 0, void 0, function* () {
|
|
66
66
|
return new Promise((t) => {
|
|
67
67
|
window.setTimeout(() => t(), s);
|
|
68
68
|
});
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
class
|
|
71
|
+
class Ct {
|
|
72
72
|
/**
|
|
73
73
|
*
|
|
74
74
|
* @param delay Debounce delay in milliseconds
|
|
@@ -90,7 +90,7 @@ class St {
|
|
|
90
90
|
}, this.delay);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
const
|
|
93
|
+
const T = {
|
|
94
94
|
xs: { name: "xs", minWidth: 0 },
|
|
95
95
|
sm: { name: "sm", minWidth: 576 },
|
|
96
96
|
md: { name: "md", minWidth: 768 },
|
|
@@ -98,39 +98,39 @@ const C = {
|
|
|
98
98
|
xl: { name: "xl", minWidth: 1200 },
|
|
99
99
|
xxl: { name: "xxl", minWidth: 1400 }
|
|
100
100
|
};
|
|
101
|
-
let
|
|
102
|
-
function
|
|
101
|
+
let O = T.xs;
|
|
102
|
+
function Z() {
|
|
103
103
|
const s = window.innerWidth;
|
|
104
|
-
let t =
|
|
105
|
-
for (const e in
|
|
106
|
-
const i =
|
|
104
|
+
let t = T.xs;
|
|
105
|
+
for (const e in T) {
|
|
106
|
+
const i = T[e];
|
|
107
107
|
s >= i.minWidth && (t = i);
|
|
108
108
|
}
|
|
109
109
|
return t;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function pt(s) {
|
|
112
112
|
if (typeof s == "string" && s.endsWith("px") && (s = parseInt(s.replace("px", ""))), typeof s == "string") {
|
|
113
|
-
if (s =
|
|
113
|
+
if (s = T[s], !s)
|
|
114
114
|
throw new Error(
|
|
115
|
-
`Breakpoint ${s} not found. Defined breakpoints are: ${Object.keys(
|
|
115
|
+
`Breakpoint ${s} not found. Defined breakpoints are: ${Object.keys(T).join(", ")}`
|
|
116
116
|
);
|
|
117
117
|
} else typeof s == "number" && (s = { name: "c", minWidth: s });
|
|
118
118
|
return window.innerWidth >= s.minWidth;
|
|
119
119
|
}
|
|
120
120
|
if (!window.__nextrap_current_breakpoint) {
|
|
121
|
-
window.__nextrap_current_breakpoint =
|
|
122
|
-
const s = new
|
|
121
|
+
window.__nextrap_current_breakpoint = Z();
|
|
122
|
+
const s = new Ct(200, 500);
|
|
123
123
|
window.addEventListener("resize", async () => {
|
|
124
|
-
if (await s.wait(),
|
|
125
|
-
|
|
124
|
+
if (await s.wait(), O !== Z()) {
|
|
125
|
+
O = Z(), window.__nextrap_current_breakpoint = O;
|
|
126
126
|
const t = new CustomEvent("breakpoint-changed", {
|
|
127
|
-
detail: { breakpoint:
|
|
127
|
+
detail: { breakpoint: O }
|
|
128
128
|
});
|
|
129
|
-
console.log("Breakpoint changed",
|
|
129
|
+
console.log("Breakpoint changed", O), window.dispatchEvent(t);
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
|
-
class
|
|
133
|
+
class rt {
|
|
134
134
|
/**
|
|
135
135
|
* Checks recursively if the element is visible.
|
|
136
136
|
*
|
|
@@ -175,23 +175,33 @@ class it {
|
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
+
function Bt() {
|
|
179
|
+
return document.readyState === "loading" ? new Promise((s) => {
|
|
180
|
+
document.addEventListener("DOMContentLoaded", () => s());
|
|
181
|
+
}) : Promise.resolve();
|
|
182
|
+
}
|
|
183
|
+
function Gt() {
|
|
184
|
+
return document.readyState === "complete" ? Promise.resolve() : new Promise((s) => {
|
|
185
|
+
window.addEventListener("load", () => s());
|
|
186
|
+
});
|
|
187
|
+
}
|
|
178
188
|
/**
|
|
179
189
|
* @license
|
|
180
190
|
* Copyright 2019 Google LLC
|
|
181
191
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
182
192
|
*/
|
|
183
|
-
const
|
|
184
|
-
let
|
|
193
|
+
const B = globalThis, ot = B.ShadowRoot && (B.ShadyCSS === void 0 || B.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Tt = Symbol(), ut = /* @__PURE__ */ new WeakMap();
|
|
194
|
+
let Pt = class {
|
|
185
195
|
constructor(t, e, i) {
|
|
186
|
-
if (this._$cssResult$ = !0, i !==
|
|
196
|
+
if (this._$cssResult$ = !0, i !== Tt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
187
197
|
this.cssText = t, this.t = e;
|
|
188
198
|
}
|
|
189
199
|
get styleSheet() {
|
|
190
200
|
let t = this.o;
|
|
191
201
|
const e = this.t;
|
|
192
|
-
if (
|
|
202
|
+
if (ot && t === void 0) {
|
|
193
203
|
const i = e !== void 0 && e.length === 1;
|
|
194
|
-
i && (t =
|
|
204
|
+
i && (t = ut.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && ut.set(e, t));
|
|
195
205
|
}
|
|
196
206
|
return t;
|
|
197
207
|
}
|
|
@@ -199,26 +209,26 @@ let Tt = class {
|
|
|
199
209
|
return this.cssText;
|
|
200
210
|
}
|
|
201
211
|
};
|
|
202
|
-
const
|
|
203
|
-
if (
|
|
212
|
+
const C = (s) => new Pt(typeof s == "string" ? s : s + "", void 0, Tt), qt = (s, t) => {
|
|
213
|
+
if (ot) s.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
204
214
|
else for (const e of t) {
|
|
205
|
-
const i = document.createElement("style"), n =
|
|
215
|
+
const i = document.createElement("style"), n = B.litNonce;
|
|
206
216
|
n !== void 0 && i.setAttribute("nonce", n), i.textContent = e.cssText, s.appendChild(i);
|
|
207
217
|
}
|
|
208
|
-
},
|
|
218
|
+
}, ft = ot ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
|
|
209
219
|
let e = "";
|
|
210
220
|
for (const i of t.cssRules) e += i.cssText;
|
|
211
|
-
return
|
|
221
|
+
return C(e);
|
|
212
222
|
})(s) : s;
|
|
213
223
|
/**
|
|
214
224
|
* @license
|
|
215
225
|
* Copyright 2017 Google LLC
|
|
216
226
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
217
227
|
*/
|
|
218
|
-
const { is:
|
|
228
|
+
const { is: Vt, defineProperty: Yt, getOwnPropertyDescriptor: Ft, getOwnPropertyNames: Jt, getOwnPropertySymbols: Kt, getPrototypeOf: Zt } = Object, g = globalThis, vt = g.trustedTypes, Qt = vt ? vt.emptyScript : "", Q = g.reactiveElementPolyfillSupport, M = (s, t) => s, G = { toAttribute(s, t) {
|
|
219
229
|
switch (t) {
|
|
220
230
|
case Boolean:
|
|
221
|
-
s = s ?
|
|
231
|
+
s = s ? Qt : null;
|
|
222
232
|
break;
|
|
223
233
|
case Object:
|
|
224
234
|
case Array:
|
|
@@ -243,23 +253,23 @@ const { is: Wt, defineProperty: Bt, getOwnPropertyDescriptor: Gt, getOwnProperty
|
|
|
243
253
|
}
|
|
244
254
|
}
|
|
245
255
|
return e;
|
|
246
|
-
} },
|
|
247
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
248
|
-
let
|
|
256
|
+
} }, at = (s, t) => !Vt(s, t), mt = { attribute: !0, type: String, converter: G, reflect: !1, useDefault: !1, hasChanged: at };
|
|
257
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), g.litPropertyMetadata ?? (g.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
258
|
+
let b = class extends HTMLElement {
|
|
249
259
|
static addInitializer(t) {
|
|
250
260
|
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
251
261
|
}
|
|
252
262
|
static get observedAttributes() {
|
|
253
263
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
254
264
|
}
|
|
255
|
-
static createProperty(t, e =
|
|
265
|
+
static createProperty(t, e = mt) {
|
|
256
266
|
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) {
|
|
257
267
|
const i = Symbol(), n = this.getPropertyDescriptor(t, i, e);
|
|
258
|
-
n !== void 0 &&
|
|
268
|
+
n !== void 0 && Yt(this.prototype, t, n);
|
|
259
269
|
}
|
|
260
270
|
}
|
|
261
271
|
static getPropertyDescriptor(t, e, i) {
|
|
262
|
-
const { get: n, set: r } =
|
|
272
|
+
const { get: n, set: r } = Ft(this.prototype, t) ?? { get() {
|
|
263
273
|
return this[e];
|
|
264
274
|
}, set(o) {
|
|
265
275
|
this[e] = o;
|
|
@@ -270,17 +280,17 @@ let y = class extends HTMLElement {
|
|
|
270
280
|
}, configurable: !0, enumerable: !0 };
|
|
271
281
|
}
|
|
272
282
|
static getPropertyOptions(t) {
|
|
273
|
-
return this.elementProperties.get(t) ??
|
|
283
|
+
return this.elementProperties.get(t) ?? mt;
|
|
274
284
|
}
|
|
275
285
|
static _$Ei() {
|
|
276
286
|
if (this.hasOwnProperty(M("elementProperties"))) return;
|
|
277
|
-
const t =
|
|
287
|
+
const t = Zt(this);
|
|
278
288
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
279
289
|
}
|
|
280
290
|
static finalize() {
|
|
281
291
|
if (this.hasOwnProperty(M("finalized"))) return;
|
|
282
292
|
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
|
|
283
|
-
const e = this.properties, i = [...
|
|
293
|
+
const e = this.properties, i = [...Jt(e), ...Kt(e)];
|
|
284
294
|
for (const n of i) this.createProperty(n, e[n]);
|
|
285
295
|
}
|
|
286
296
|
const t = this[Symbol.metadata];
|
|
@@ -299,8 +309,8 @@ let y = class extends HTMLElement {
|
|
|
299
309
|
const e = [];
|
|
300
310
|
if (Array.isArray(t)) {
|
|
301
311
|
const i = new Set(t.flat(1 / 0).reverse());
|
|
302
|
-
for (const n of i) e.unshift(
|
|
303
|
-
} else t !== void 0 && e.push(
|
|
312
|
+
for (const n of i) e.unshift(ft(n));
|
|
313
|
+
} else t !== void 0 && e.push(ft(t));
|
|
304
314
|
return e;
|
|
305
315
|
}
|
|
306
316
|
static _$Eu(t, e) {
|
|
@@ -329,7 +339,7 @@ let y = class extends HTMLElement {
|
|
|
329
339
|
}
|
|
330
340
|
createRenderRoot() {
|
|
331
341
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
332
|
-
return
|
|
342
|
+
return qt(t, this.constructor.elementStyles), t;
|
|
333
343
|
}
|
|
334
344
|
connectedCallback() {
|
|
335
345
|
var t;
|
|
@@ -354,7 +364,7 @@ let y = class extends HTMLElement {
|
|
|
354
364
|
var r;
|
|
355
365
|
const i = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, i);
|
|
356
366
|
if (n !== void 0 && i.reflect === !0) {
|
|
357
|
-
const o = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter :
|
|
367
|
+
const o = (((r = i.converter) == null ? void 0 : r.toAttribute) !== void 0 ? i.converter : G).toAttribute(e, i.type);
|
|
358
368
|
this._$Em = t, o == null ? this.removeAttribute(n) : this.setAttribute(n, o), this._$Em = null;
|
|
359
369
|
}
|
|
360
370
|
}
|
|
@@ -362,7 +372,7 @@ let y = class extends HTMLElement {
|
|
|
362
372
|
var r, o;
|
|
363
373
|
const i = this.constructor, n = i._$Eh.get(t);
|
|
364
374
|
if (n !== void 0 && this._$Em !== n) {
|
|
365
|
-
const l = i.getPropertyOptions(n), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((r = l.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? l.converter :
|
|
375
|
+
const l = i.getPropertyOptions(n), a = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((r = l.converter) == null ? void 0 : r.fromAttribute) !== void 0 ? l.converter : G;
|
|
366
376
|
this._$Em = n;
|
|
367
377
|
const d = a.fromAttribute(e, l.type);
|
|
368
378
|
this[n] = d ?? ((o = this._$Ej) == null ? void 0 : o.get(n)) ?? d, this._$Em = null;
|
|
@@ -372,7 +382,7 @@ let y = class extends HTMLElement {
|
|
|
372
382
|
var n;
|
|
373
383
|
if (t !== void 0) {
|
|
374
384
|
const r = this.constructor, o = this[t];
|
|
375
|
-
if (i ?? (i = r.getPropertyOptions(t)), !((i.hasChanged ??
|
|
385
|
+
if (i ?? (i = r.getPropertyOptions(t)), !((i.hasChanged ?? at)(o, e) || i.useDefault && i.reflect && o === ((n = this._$Ej) == null ? void 0 : n.get(t)) && !this.hasAttribute(r._$Eu(t, i)))) return;
|
|
376
386
|
this.C(t, e, i);
|
|
377
387
|
}
|
|
378
388
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
@@ -448,76 +458,76 @@ let y = class extends HTMLElement {
|
|
|
448
458
|
firstUpdated(t) {
|
|
449
459
|
}
|
|
450
460
|
};
|
|
451
|
-
|
|
461
|
+
b.elementStyles = [], b.shadowRootOptions = { mode: "open" }, b[M("elementProperties")] = /* @__PURE__ */ new Map(), b[M("finalized")] = /* @__PURE__ */ new Map(), Q == null || Q({ ReactiveElement: b }), (g.reactiveElementVersions ?? (g.reactiveElementVersions = [])).push("2.1.1");
|
|
452
462
|
/**
|
|
453
463
|
* @license
|
|
454
464
|
* Copyright 2017 Google LLC
|
|
455
465
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
456
466
|
*/
|
|
457
|
-
const U = globalThis,
|
|
458
|
-
\f\r]`,
|
|
459
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
460
|
-
function
|
|
461
|
-
if (!
|
|
462
|
-
return
|
|
467
|
+
const U = globalThis, q = U.trustedTypes, gt = q ? q.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Ot = "$lit$", m = `lit$${Math.random().toFixed(9).slice(2)}$`, kt = "?" + m, Xt = `<${kt}>`, E = document, H = () => E.createComment(""), L = (s) => s === null || typeof s != "object" && typeof s != "function", lt = Array.isArray, te = (s) => lt(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", X = `[
|
|
468
|
+
\f\r]`, k = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _t = /-->/g, $t = />/g, y = RegExp(`>|${X}(?:([^\\s"'>=/]+)(${X}*=${X}*(?:[^
|
|
469
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), yt = /'/g, bt = /"/g, Mt = /^(?:script|style|textarea|title)$/i, ee = (s) => (t, ...e) => ({ _$litType$: s, strings: t, values: e }), R = ee(1), S = Symbol.for("lit-noChange"), p = Symbol.for("lit-nothing"), wt = /* @__PURE__ */ new WeakMap(), w = E.createTreeWalker(E, 129);
|
|
470
|
+
function Ut(s, t) {
|
|
471
|
+
if (!lt(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
472
|
+
return gt !== void 0 ? gt.createHTML(t) : t;
|
|
463
473
|
}
|
|
464
|
-
const
|
|
474
|
+
const se = (s, t) => {
|
|
465
475
|
const e = s.length - 1, i = [];
|
|
466
|
-
let n, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o =
|
|
476
|
+
let n, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = k;
|
|
467
477
|
for (let l = 0; l < e; l++) {
|
|
468
478
|
const a = s[l];
|
|
469
479
|
let d, h, c = -1, u = 0;
|
|
470
|
-
for (; u < a.length && (o.lastIndex = u, h = o.exec(a), h !== null); ) u = o.lastIndex, o ===
|
|
471
|
-
const
|
|
472
|
-
r += o ===
|
|
480
|
+
for (; u < a.length && (o.lastIndex = u, h = o.exec(a), h !== null); ) u = o.lastIndex, o === k ? h[1] === "!--" ? o = _t : h[1] !== void 0 ? o = $t : h[2] !== void 0 ? (Mt.test(h[2]) && (n = RegExp("</" + h[2], "g")), o = y) : h[3] !== void 0 && (o = y) : o === y ? h[0] === ">" ? (o = n ?? k, c = -1) : h[1] === void 0 ? c = -2 : (c = o.lastIndex - h[2].length, d = h[1], o = h[3] === void 0 ? y : h[3] === '"' ? bt : yt) : o === bt || o === yt ? o = y : o === _t || o === $t ? o = k : (o = y, n = void 0);
|
|
481
|
+
const v = o === y && s[l + 1].startsWith("/>") ? " " : "";
|
|
482
|
+
r += o === k ? a + Xt : c >= 0 ? (i.push(d), a.slice(0, c) + Ot + a.slice(c) + m + v) : a + m + (c === -2 ? l : v);
|
|
473
483
|
}
|
|
474
|
-
return [
|
|
484
|
+
return [Ut(s, r + (s[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
|
|
475
485
|
};
|
|
476
|
-
class
|
|
486
|
+
class D {
|
|
477
487
|
constructor({ strings: t, _$litType$: e }, i) {
|
|
478
488
|
let n;
|
|
479
489
|
this.parts = [];
|
|
480
490
|
let r = 0, o = 0;
|
|
481
|
-
const l = t.length - 1, a = this.parts, [d, h] =
|
|
482
|
-
if (this.el =
|
|
491
|
+
const l = t.length - 1, a = this.parts, [d, h] = se(t, e);
|
|
492
|
+
if (this.el = D.createElement(d, i), w.currentNode = this.el.content, e === 2 || e === 3) {
|
|
483
493
|
const c = this.el.content.firstChild;
|
|
484
494
|
c.replaceWith(...c.childNodes);
|
|
485
495
|
}
|
|
486
|
-
for (; (n =
|
|
496
|
+
for (; (n = w.nextNode()) !== null && a.length < l; ) {
|
|
487
497
|
if (n.nodeType === 1) {
|
|
488
|
-
if (n.hasAttributes()) for (const c of n.getAttributeNames()) if (c.endsWith(
|
|
489
|
-
const u = h[o++],
|
|
490
|
-
a.push({ type: 1, index: r, name:
|
|
491
|
-
} else c.startsWith(
|
|
492
|
-
if (
|
|
493
|
-
const c = n.textContent.split(
|
|
498
|
+
if (n.hasAttributes()) for (const c of n.getAttributeNames()) if (c.endsWith(Ot)) {
|
|
499
|
+
const u = h[o++], v = n.getAttribute(c).split(m), W = /([.?@])?(.*)/.exec(u);
|
|
500
|
+
a.push({ type: 1, index: r, name: W[2], strings: v, ctor: W[1] === "." ? ne : W[1] === "?" ? re : W[1] === "@" ? oe : J }), n.removeAttribute(c);
|
|
501
|
+
} else c.startsWith(m) && (a.push({ type: 6, index: r }), n.removeAttribute(c));
|
|
502
|
+
if (Mt.test(n.tagName)) {
|
|
503
|
+
const c = n.textContent.split(m), u = c.length - 1;
|
|
494
504
|
if (u > 0) {
|
|
495
|
-
n.textContent =
|
|
496
|
-
for (let
|
|
505
|
+
n.textContent = q ? q.emptyScript : "";
|
|
506
|
+
for (let v = 0; v < u; v++) n.append(c[v], H()), w.nextNode(), a.push({ type: 2, index: ++r });
|
|
497
507
|
n.append(c[u], H());
|
|
498
508
|
}
|
|
499
509
|
}
|
|
500
510
|
} else if (n.nodeType === 8) if (n.data === kt) a.push({ type: 2, index: r });
|
|
501
511
|
else {
|
|
502
512
|
let c = -1;
|
|
503
|
-
for (; (c = n.data.indexOf(
|
|
513
|
+
for (; (c = n.data.indexOf(m, c + 1)) !== -1; ) a.push({ type: 7, index: r }), c += m.length - 1;
|
|
504
514
|
}
|
|
505
515
|
r++;
|
|
506
516
|
}
|
|
507
517
|
}
|
|
508
518
|
static createElement(t, e) {
|
|
509
|
-
const i =
|
|
519
|
+
const i = E.createElement("template");
|
|
510
520
|
return i.innerHTML = t, i;
|
|
511
521
|
}
|
|
512
522
|
}
|
|
513
|
-
function
|
|
523
|
+
function P(s, t, e = s, i) {
|
|
514
524
|
var o, l;
|
|
515
|
-
if (t ===
|
|
525
|
+
if (t === S) return t;
|
|
516
526
|
let n = i !== void 0 ? (o = e._$Co) == null ? void 0 : o[i] : e._$Cl;
|
|
517
527
|
const r = L(t) ? void 0 : t._$litDirective$;
|
|
518
|
-
return (n == null ? void 0 : n.constructor) !== r && ((l = n == null ? void 0 : n._$AO) == null || l.call(n, !1), r === void 0 ? n = void 0 : (n = new r(s), n._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = n : e._$Cl = n), n !== void 0 && (t =
|
|
528
|
+
return (n == null ? void 0 : n.constructor) !== r && ((l = n == null ? void 0 : n._$AO) == null || l.call(n, !1), r === void 0 ? n = void 0 : (n = new r(s), n._$AT(s, e, i)), i !== void 0 ? (e._$Co ?? (e._$Co = []))[i] = n : e._$Cl = n), n !== void 0 && (t = P(s, n._$AS(s, t.values), n, i)), t;
|
|
519
529
|
}
|
|
520
|
-
class
|
|
530
|
+
class ie {
|
|
521
531
|
constructor(t, e) {
|
|
522
532
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
523
533
|
}
|
|
@@ -528,24 +538,24 @@ class Xt {
|
|
|
528
538
|
return this._$AM._$AU;
|
|
529
539
|
}
|
|
530
540
|
u(t) {
|
|
531
|
-
const { el: { content: e }, parts: i } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ??
|
|
532
|
-
|
|
533
|
-
let r =
|
|
541
|
+
const { el: { content: e }, parts: i } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? E).importNode(e, !0);
|
|
542
|
+
w.currentNode = n;
|
|
543
|
+
let r = w.nextNode(), o = 0, l = 0, a = i[0];
|
|
534
544
|
for (; a !== void 0; ) {
|
|
535
545
|
if (o === a.index) {
|
|
536
546
|
let d;
|
|
537
|
-
a.type === 2 ? d = new
|
|
547
|
+
a.type === 2 ? d = new j(r, r.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(r, a.name, a.strings, this, t) : a.type === 6 && (d = new ae(r, this, t)), this._$AV.push(d), a = i[++l];
|
|
538
548
|
}
|
|
539
|
-
o !== (a == null ? void 0 : a.index) && (r =
|
|
549
|
+
o !== (a == null ? void 0 : a.index) && (r = w.nextNode(), o++);
|
|
540
550
|
}
|
|
541
|
-
return
|
|
551
|
+
return w.currentNode = E, n;
|
|
542
552
|
}
|
|
543
553
|
p(t) {
|
|
544
554
|
let e = 0;
|
|
545
555
|
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++;
|
|
546
556
|
}
|
|
547
557
|
}
|
|
548
|
-
class
|
|
558
|
+
class j {
|
|
549
559
|
get _$AU() {
|
|
550
560
|
var t;
|
|
551
561
|
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
@@ -565,7 +575,7 @@ class D {
|
|
|
565
575
|
return this._$AB;
|
|
566
576
|
}
|
|
567
577
|
_$AI(t, e = this) {
|
|
568
|
-
t =
|
|
578
|
+
t = P(this, t, e), L(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) : te(t) ? this.k(t) : this._(t);
|
|
569
579
|
}
|
|
570
580
|
O(t) {
|
|
571
581
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -574,26 +584,26 @@ class D {
|
|
|
574
584
|
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
575
585
|
}
|
|
576
586
|
_(t) {
|
|
577
|
-
this._$AH !== p && L(this._$AH) ? this._$AA.nextSibling.data = t : this.T(
|
|
587
|
+
this._$AH !== p && L(this._$AH) ? this._$AA.nextSibling.data = t : this.T(E.createTextNode(t)), this._$AH = t;
|
|
578
588
|
}
|
|
579
589
|
$(t) {
|
|
580
590
|
var r;
|
|
581
|
-
const { values: e, _$litType$: i } = t, n = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el =
|
|
591
|
+
const { values: e, _$litType$: i } = t, n = typeof i == "number" ? this._$AC(t) : (i.el === void 0 && (i.el = D.createElement(Ut(i.h, i.h[0]), this.options)), i);
|
|
582
592
|
if (((r = this._$AH) == null ? void 0 : r._$AD) === n) this._$AH.p(e);
|
|
583
593
|
else {
|
|
584
|
-
const o = new
|
|
594
|
+
const o = new ie(n, this), l = o.u(this.options);
|
|
585
595
|
o.p(e), this.T(l), this._$AH = o;
|
|
586
596
|
}
|
|
587
597
|
}
|
|
588
598
|
_$AC(t) {
|
|
589
|
-
let e =
|
|
590
|
-
return e === void 0 &&
|
|
599
|
+
let e = wt.get(t.strings);
|
|
600
|
+
return e === void 0 && wt.set(t.strings, e = new D(t)), e;
|
|
591
601
|
}
|
|
592
602
|
k(t) {
|
|
593
|
-
|
|
603
|
+
lt(this._$AH) || (this._$AH = [], this._$AR());
|
|
594
604
|
const e = this._$AH;
|
|
595
605
|
let i, n = 0;
|
|
596
|
-
for (const r of t) n === e.length ? e.push(i = new
|
|
606
|
+
for (const r of t) n === e.length ? e.push(i = new j(this.O(H()), this.O(H()), this, this.options)) : i = e[n], i._$AI(r), n++;
|
|
597
607
|
n < e.length && (this._$AR(i && i._$AB.nextSibling, n), e.length = n);
|
|
598
608
|
}
|
|
599
609
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -608,7 +618,7 @@ class D {
|
|
|
608
618
|
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
609
619
|
}
|
|
610
620
|
}
|
|
611
|
-
class
|
|
621
|
+
class J {
|
|
612
622
|
get tagName() {
|
|
613
623
|
return this.element.tagName;
|
|
614
624
|
}
|
|
@@ -621,11 +631,11 @@ class Y {
|
|
|
621
631
|
_$AI(t, e = this, i, n) {
|
|
622
632
|
const r = this.strings;
|
|
623
633
|
let o = !1;
|
|
624
|
-
if (r === void 0) t =
|
|
634
|
+
if (r === void 0) t = P(this, t, e, 0), o = !L(t) || t !== this._$AH && t !== S, o && (this._$AH = t);
|
|
625
635
|
else {
|
|
626
636
|
const l = t;
|
|
627
637
|
let a, d;
|
|
628
|
-
for (t = r[0], a = 0; a < r.length - 1; a++) d =
|
|
638
|
+
for (t = r[0], a = 0; a < r.length - 1; a++) d = P(this, l[i + a], e, a), d === S && (d = this._$AH[a]), o || (o = !L(d) || d !== this._$AH[a]), d === p ? t = p : t !== p && (t += (d ?? "") + r[a + 1]), this._$AH[a] = d;
|
|
629
639
|
}
|
|
630
640
|
o && !n && this.j(t);
|
|
631
641
|
}
|
|
@@ -633,7 +643,7 @@ class Y {
|
|
|
633
643
|
t === p ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
634
644
|
}
|
|
635
645
|
}
|
|
636
|
-
class
|
|
646
|
+
class ne extends J {
|
|
637
647
|
constructor() {
|
|
638
648
|
super(...arguments), this.type = 3;
|
|
639
649
|
}
|
|
@@ -641,7 +651,7 @@ class te extends Y {
|
|
|
641
651
|
this.element[this.name] = t === p ? void 0 : t;
|
|
642
652
|
}
|
|
643
653
|
}
|
|
644
|
-
class
|
|
654
|
+
class re extends J {
|
|
645
655
|
constructor() {
|
|
646
656
|
super(...arguments), this.type = 4;
|
|
647
657
|
}
|
|
@@ -649,12 +659,12 @@ class ee extends Y {
|
|
|
649
659
|
this.element.toggleAttribute(this.name, !!t && t !== p);
|
|
650
660
|
}
|
|
651
661
|
}
|
|
652
|
-
class
|
|
662
|
+
class oe extends J {
|
|
653
663
|
constructor(t, e, i, n, r) {
|
|
654
664
|
super(t, e, i, n, r), this.type = 5;
|
|
655
665
|
}
|
|
656
666
|
_$AI(t, e = this) {
|
|
657
|
-
if ((t =
|
|
667
|
+
if ((t = P(this, t, e, 0) ?? p) === S) return;
|
|
658
668
|
const i = this._$AH, n = t === p && i !== p || t.capture !== i.capture || t.once !== i.once || t.passive !== i.passive, r = t !== p && (i === p || n);
|
|
659
669
|
n && this.element.removeEventListener(this.name, this, i), r && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
660
670
|
}
|
|
@@ -663,7 +673,7 @@ class se extends Y {
|
|
|
663
673
|
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
664
674
|
}
|
|
665
675
|
}
|
|
666
|
-
class
|
|
676
|
+
class ae {
|
|
667
677
|
constructor(t, e, i) {
|
|
668
678
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
|
|
669
679
|
}
|
|
@@ -671,17 +681,17 @@ class ie {
|
|
|
671
681
|
return this._$AM._$AU;
|
|
672
682
|
}
|
|
673
683
|
_$AI(t) {
|
|
674
|
-
|
|
684
|
+
P(this, t);
|
|
675
685
|
}
|
|
676
686
|
}
|
|
677
|
-
const
|
|
678
|
-
|
|
679
|
-
const
|
|
687
|
+
const tt = U.litHtmlPolyfillSupport;
|
|
688
|
+
tt == null || tt(D, j), (U.litHtmlVersions ?? (U.litHtmlVersions = [])).push("3.3.1");
|
|
689
|
+
const le = (s, t, e) => {
|
|
680
690
|
const i = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
681
691
|
let n = i._$litPart$;
|
|
682
692
|
if (n === void 0) {
|
|
683
693
|
const r = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
684
|
-
i._$litPart$ = n = new
|
|
694
|
+
i._$litPart$ = n = new j(t.insertBefore(H(), r), r, void 0, e ?? {});
|
|
685
695
|
}
|
|
686
696
|
return n._$AI(s), n;
|
|
687
697
|
};
|
|
@@ -690,8 +700,8 @@ const ne = (s, t, e) => {
|
|
|
690
700
|
* Copyright 2017 Google LLC
|
|
691
701
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
692
702
|
*/
|
|
693
|
-
const
|
|
694
|
-
let
|
|
703
|
+
const A = globalThis;
|
|
704
|
+
let _ = class extends b {
|
|
695
705
|
constructor() {
|
|
696
706
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
697
707
|
}
|
|
@@ -702,7 +712,7 @@ let g = class extends y {
|
|
|
702
712
|
}
|
|
703
713
|
update(t) {
|
|
704
714
|
const e = this.render();
|
|
705
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
715
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = le(e, this.renderRoot, this.renderOptions);
|
|
706
716
|
}
|
|
707
717
|
connectedCallback() {
|
|
708
718
|
var t;
|
|
@@ -713,20 +723,20 @@ let g = class extends y {
|
|
|
713
723
|
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
714
724
|
}
|
|
715
725
|
render() {
|
|
716
|
-
return
|
|
726
|
+
return S;
|
|
717
727
|
}
|
|
718
728
|
};
|
|
719
|
-
var
|
|
720
|
-
|
|
721
|
-
const
|
|
722
|
-
|
|
723
|
-
(
|
|
729
|
+
var St;
|
|
730
|
+
_._$litElement$ = !0, _.finalized = !0, (St = A.litElementHydrateSupport) == null || St.call(A, { LitElement: _ });
|
|
731
|
+
const et = A.litElementPolyfillSupport;
|
|
732
|
+
et == null || et({ LitElement: _ });
|
|
733
|
+
(A.litElementVersions ?? (A.litElementVersions = [])).push("4.2.1");
|
|
724
734
|
/**
|
|
725
735
|
* @license
|
|
726
736
|
* Copyright 2017 Google LLC
|
|
727
737
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
728
738
|
*/
|
|
729
|
-
const
|
|
739
|
+
const z = (s) => (t, e) => {
|
|
730
740
|
e !== void 0 ? e.addInitializer(() => {
|
|
731
741
|
customElements.define(s, t);
|
|
732
742
|
}) : customElements.define(s, t);
|
|
@@ -736,7 +746,7 @@ const F = (s) => (t, e) => {
|
|
|
736
746
|
* Copyright 2017 Google LLC
|
|
737
747
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
738
748
|
*/
|
|
739
|
-
const
|
|
749
|
+
const he = { attribute: !0, type: String, converter: G, reflect: !1, hasChanged: at }, ce = (s = he, t, e) => {
|
|
740
750
|
const { kind: i, metadata: n } = e;
|
|
741
751
|
let r = globalThis.litPropertyMetadata.get(n);
|
|
742
752
|
if (r === void 0 && globalThis.litPropertyMetadata.set(n, r = /* @__PURE__ */ new Map()), i === "setter" && ((s = Object.create(s)).wrapped = !0), r.set(e.name, s), i === "accessor") {
|
|
@@ -757,8 +767,8 @@ const re = { attribute: !0, type: String, converter: B, reflect: !1, hasChanged:
|
|
|
757
767
|
}
|
|
758
768
|
throw Error("Unsupported decorator location: " + i);
|
|
759
769
|
};
|
|
760
|
-
function
|
|
761
|
-
return (t, e) => typeof e == "object" ?
|
|
770
|
+
function f(s) {
|
|
771
|
+
return (t, e) => typeof e == "object" ? ce(s, t, e) : ((i, n, r) => {
|
|
762
772
|
const o = n.hasOwnProperty(r);
|
|
763
773
|
return n.constructor.createProperty(r, i), o ? Object.getOwnPropertyDescriptor(n, r) : void 0;
|
|
764
774
|
})(s, t, e);
|
|
@@ -768,10 +778,10 @@ function S(s) {
|
|
|
768
778
|
* Copyright 2017 Google LLC
|
|
769
779
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
770
780
|
*/
|
|
771
|
-
function
|
|
772
|
-
return
|
|
781
|
+
function Nt(s) {
|
|
782
|
+
return f({ ...s, state: !0, attribute: !1 });
|
|
773
783
|
}
|
|
774
|
-
function
|
|
784
|
+
function de(s, t) {
|
|
775
785
|
const e = document.createElement("template");
|
|
776
786
|
return e.innerHTML = s.trim(), t.append(e.content.cloneNode(!0)), new Proxy({}, {
|
|
777
787
|
get(i, n) {
|
|
@@ -786,32 +796,32 @@ function ae(s, t) {
|
|
|
786
796
|
}
|
|
787
797
|
});
|
|
788
798
|
}
|
|
789
|
-
const
|
|
799
|
+
const ct = class ct extends b {
|
|
790
800
|
constructor(t) {
|
|
791
801
|
super();
|
|
792
802
|
const e = this.createRenderRoot();
|
|
793
|
-
this.$ =
|
|
803
|
+
this.$ = de(t, e);
|
|
794
804
|
}
|
|
795
805
|
connectedCallback() {
|
|
796
806
|
super.connectedCallback();
|
|
797
807
|
let t = this.css;
|
|
798
808
|
Array.isArray(t) || (t = [t]);
|
|
799
|
-
const e = t.map((i) => i instanceof
|
|
809
|
+
const e = t.map((i) => i instanceof Pt ? i.styleSheet : C(i).styleSheet);
|
|
800
810
|
this.shadowRoot.adoptedStyleSheets = e;
|
|
801
811
|
}
|
|
802
812
|
};
|
|
803
|
-
|
|
813
|
+
ct.DEFINITION = {
|
|
804
814
|
classes: [],
|
|
805
815
|
attributes: {}
|
|
806
816
|
};
|
|
807
|
-
let
|
|
817
|
+
let it = ct;
|
|
808
818
|
/**
|
|
809
819
|
* @license
|
|
810
820
|
* Copyright 2017 Google LLC
|
|
811
821
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
812
822
|
*/
|
|
813
|
-
const
|
|
814
|
-
class
|
|
823
|
+
const Ht = { ATTRIBUTE: 1, CHILD: 2 }, Lt = (s) => (...t) => ({ _$litDirective$: s, values: t });
|
|
824
|
+
class Rt {
|
|
815
825
|
constructor(t) {
|
|
816
826
|
}
|
|
817
827
|
get _$AU() {
|
|
@@ -832,10 +842,10 @@ class Lt {
|
|
|
832
842
|
* Copyright 2018 Google LLC
|
|
833
843
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
834
844
|
*/
|
|
835
|
-
const
|
|
845
|
+
const At = Lt(class extends Rt {
|
|
836
846
|
constructor(s) {
|
|
837
847
|
var t;
|
|
838
|
-
if (super(s), s.type !==
|
|
848
|
+
if (super(s), s.type !== Ht.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.");
|
|
839
849
|
}
|
|
840
850
|
render(s) {
|
|
841
851
|
return " " + Object.keys(s).filter((t) => s[t]).join(" ") + " ";
|
|
@@ -853,15 +863,15 @@ const bt = Ht(class extends Lt {
|
|
|
853
863
|
const o = !!t[r];
|
|
854
864
|
o === this.st.has(r) || (n = this.nt) != null && n.has(r) || (o ? (e.add(r), this.st.add(r)) : (e.remove(r), this.st.delete(r)));
|
|
855
865
|
}
|
|
856
|
-
return
|
|
866
|
+
return S;
|
|
857
867
|
}
|
|
858
|
-
}),
|
|
859
|
-
var
|
|
860
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
868
|
+
}), pe = "*,*: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: rgba(var(--nt-dark-rgb), .5);--header-background: var(--nt-soft-primary);--background-color: var(--nt-white);--shadow-color: rgba(var(--nt-dark-rgb), .5);--padding: var(--nt-space);position:fixed;top:0;right:0;bottom:0;width:50%;min-width:300px;max-width:500px;z-index:2000;padding:0;isolation:isolate;display:block}:host[opened]{display:block}#offcanvas{display:flex;flex-direction:column;width:100%;height:100%;overflow:scroll;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(--padding)}#header:has(>slot[empty]){display:none}#main{display:flex;width:100%;flex-grow:1;padding:var(--padding);min-height:200px;overflow: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}";
|
|
869
|
+
var ue = Object.defineProperty, fe = Object.getOwnPropertyDescriptor, K = (s, t, e, i) => {
|
|
870
|
+
for (var n = i > 1 ? void 0 : i ? fe(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
861
871
|
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
862
|
-
return i && n &&
|
|
872
|
+
return i && n && ue(t, e, n), n;
|
|
863
873
|
};
|
|
864
|
-
let
|
|
874
|
+
let x = class extends _ {
|
|
865
875
|
constructor() {
|
|
866
876
|
super(), this.backdrop = !0, this.opened = !1, this.closedClass = !0, this.addEventListener("click", (s) => {
|
|
867
877
|
s === void 0 || !s.target || !(s.target instanceof HTMLElement) || s.target.closest("[data-nt-dismiss='offcanvas']") !== null && this.close();
|
|
@@ -883,7 +893,7 @@ let A = class extends g {
|
|
|
883
893
|
this.opened = !this.opened;
|
|
884
894
|
}
|
|
885
895
|
async updated(s) {
|
|
886
|
-
s.has("opened") && (this.opened ? (this.style.display = "block", await
|
|
896
|
+
s.has("opened") && (this.opened ? (this.style.display = "block", await dt(1), rt.observeEmptySlots(this), this.closedClass = !1) : (this.closedClass = !0, await dt(400), this.style.display = "none"));
|
|
887
897
|
}
|
|
888
898
|
render() {
|
|
889
899
|
return R`
|
|
@@ -891,14 +901,14 @@ let A = class extends g {
|
|
|
891
901
|
id="backdrop"
|
|
892
902
|
part="backdrop"
|
|
893
903
|
@click=${() => this.opened = !1}
|
|
894
|
-
class=${
|
|
904
|
+
class=${At({ closed: this.closedClass })}
|
|
895
905
|
></div>
|
|
896
906
|
<div
|
|
897
907
|
id="offcanvas"
|
|
898
908
|
part="offcanvas"
|
|
899
909
|
role="dialog"
|
|
900
910
|
aria-modal="true"
|
|
901
|
-
class=${
|
|
911
|
+
class=${At({ closed: this.closedClass })}
|
|
902
912
|
?backdrop="${this.backdrop}"
|
|
903
913
|
>
|
|
904
914
|
<div id="header">
|
|
@@ -916,26 +926,26 @@ let A = class extends g {
|
|
|
916
926
|
`;
|
|
917
927
|
}
|
|
918
928
|
};
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
],
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
],
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
],
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
],
|
|
932
|
-
const
|
|
933
|
-
var
|
|
934
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
929
|
+
x.styles = [C(pe)];
|
|
930
|
+
K([
|
|
931
|
+
f({ type: Boolean, reflect: !0 })
|
|
932
|
+
], x.prototype, "backdrop", 2);
|
|
933
|
+
K([
|
|
934
|
+
f({ type: Boolean, reflect: !0 })
|
|
935
|
+
], x.prototype, "opened", 2);
|
|
936
|
+
K([
|
|
937
|
+
Nt()
|
|
938
|
+
], x.prototype, "closedClass", 2);
|
|
939
|
+
x = K([
|
|
940
|
+
z(x.is)
|
|
941
|
+
], x);
|
|
942
|
+
const ve = ":host{--container-width: var(--nt-container-width);--text-color: var(--nt-text-color);--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;height:var(--height);display:block}nav{height:100%}#main{height:100%}";
|
|
943
|
+
var me = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, I = (s, t, e, i) => {
|
|
944
|
+
for (var n = i > 1 ? void 0 : i ? ge(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
935
945
|
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
936
|
-
return i && n &&
|
|
946
|
+
return i && n && me(t, e, n), n;
|
|
937
947
|
};
|
|
938
|
-
let $ = class extends
|
|
948
|
+
let $ = class extends _ {
|
|
939
949
|
constructor() {
|
|
940
950
|
super(), this.mode = "slave", this.breakpoint = "99999px", this.transferTo = "", this._isTransferred = !1;
|
|
941
951
|
}
|
|
@@ -974,6 +984,8 @@ let $ = class extends g {
|
|
|
974
984
|
transferToElement(s) {
|
|
975
985
|
var i;
|
|
976
986
|
const t = (i = this.shadowRoot) == null ? void 0 : i.querySelector("#main-slot");
|
|
987
|
+
if (t === null)
|
|
988
|
+
return;
|
|
977
989
|
Array.from(t.assignedElements({ flatten: !0 })).forEach((n) => {
|
|
978
990
|
n instanceof HTMLElement && s.appendChild(n);
|
|
979
991
|
});
|
|
@@ -992,8 +1004,8 @@ let $ = class extends g {
|
|
|
992
1004
|
!t.contains("nav-vertical") && !t.contains("nav-horizontal") && t.add(this.closest("nte-offcanvas") === null ? "nav-horizontal" : "nav-vertical");
|
|
993
1005
|
}
|
|
994
1006
|
async connectedCallback() {
|
|
995
|
-
await
|
|
996
|
-
|
|
1007
|
+
await It(), super.connectedCallback(), this.mode !== "slave" && this.transferTo !== "" && (this._isTransferred = !1, this.breakpoint !== "" && (pt(this.breakpoint) || (this._isTransferred = !0), window.addEventListener("breakpoint-changed", (s) => {
|
|
1008
|
+
pt(this.breakpoint) ? this._isTransferred = !1 : this._isTransferred = !0;
|
|
997
1009
|
})));
|
|
998
1010
|
}
|
|
999
1011
|
};
|
|
@@ -1001,28 +1013,28 @@ $.DEFINITION = {
|
|
|
1001
1013
|
classes: ["align-left", "align-right", "align-center"],
|
|
1002
1014
|
attributes: {}
|
|
1003
1015
|
};
|
|
1004
|
-
$.styles = [
|
|
1005
|
-
|
|
1006
|
-
|
|
1016
|
+
$.styles = [C(ve)];
|
|
1017
|
+
I([
|
|
1018
|
+
f({ type: String, reflect: !0 })
|
|
1007
1019
|
], $.prototype, "mode", 2);
|
|
1008
|
-
|
|
1009
|
-
|
|
1020
|
+
I([
|
|
1021
|
+
f({ type: String, reflect: !0 })
|
|
1010
1022
|
], $.prototype, "breakpoint", 2);
|
|
1011
|
-
|
|
1012
|
-
|
|
1023
|
+
I([
|
|
1024
|
+
f({ type: String, reflect: !0, attribute: "transfer-to" })
|
|
1013
1025
|
], $.prototype, "transferTo", 2);
|
|
1014
|
-
|
|
1015
|
-
|
|
1026
|
+
I([
|
|
1027
|
+
Nt()
|
|
1016
1028
|
], $.prototype, "_isTransferred", 2);
|
|
1017
|
-
$ =
|
|
1018
|
-
|
|
1029
|
+
$ = I([
|
|
1030
|
+
z("nte-nav")
|
|
1019
1031
|
], $);
|
|
1020
1032
|
/**
|
|
1021
1033
|
* @license
|
|
1022
1034
|
* Copyright 2020 Google LLC
|
|
1023
1035
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1024
1036
|
*/
|
|
1025
|
-
const
|
|
1037
|
+
const _e = (s) => s.strings === void 0;
|
|
1026
1038
|
/**
|
|
1027
1039
|
* @license
|
|
1028
1040
|
* Copyright 2017 Google LLC
|
|
@@ -1034,45 +1046,45 @@ const N = (s, t) => {
|
|
|
1034
1046
|
if (e === void 0) return !1;
|
|
1035
1047
|
for (const n of e) (i = n._$AO) == null || i.call(n, t, !1), N(n, t);
|
|
1036
1048
|
return !0;
|
|
1037
|
-
},
|
|
1049
|
+
}, V = (s) => {
|
|
1038
1050
|
let t, e;
|
|
1039
1051
|
do {
|
|
1040
1052
|
if ((t = s._$AM) === void 0) break;
|
|
1041
1053
|
e = t._$AN, e.delete(s), s = t;
|
|
1042
1054
|
} while ((e == null ? void 0 : e.size) === 0);
|
|
1043
|
-
},
|
|
1055
|
+
}, Dt = (s) => {
|
|
1044
1056
|
for (let t; t = s._$AM; s = t) {
|
|
1045
1057
|
let e = t._$AN;
|
|
1046
1058
|
if (e === void 0) t._$AN = e = /* @__PURE__ */ new Set();
|
|
1047
1059
|
else if (e.has(s)) break;
|
|
1048
|
-
e.add(s),
|
|
1060
|
+
e.add(s), be(t);
|
|
1049
1061
|
}
|
|
1050
1062
|
};
|
|
1051
|
-
function
|
|
1052
|
-
this._$AN !== void 0 ? (
|
|
1063
|
+
function $e(s) {
|
|
1064
|
+
this._$AN !== void 0 ? (V(this), this._$AM = s, Dt(this)) : this._$AM = s;
|
|
1053
1065
|
}
|
|
1054
|
-
function
|
|
1066
|
+
function ye(s, t = !1, e = 0) {
|
|
1055
1067
|
const i = this._$AH, n = this._$AN;
|
|
1056
|
-
if (n !== void 0 && n.size !== 0) if (t) if (Array.isArray(i)) for (let r = e; r < i.length; r++) N(i[r], !1),
|
|
1057
|
-
else i != null && (N(i, !1),
|
|
1068
|
+
if (n !== void 0 && n.size !== 0) if (t) if (Array.isArray(i)) for (let r = e; r < i.length; r++) N(i[r], !1), V(i[r]);
|
|
1069
|
+
else i != null && (N(i, !1), V(i));
|
|
1058
1070
|
else N(this, s);
|
|
1059
1071
|
}
|
|
1060
|
-
const
|
|
1061
|
-
s.type ==
|
|
1072
|
+
const be = (s) => {
|
|
1073
|
+
s.type == Ht.CHILD && (s._$AP ?? (s._$AP = ye), s._$AQ ?? (s._$AQ = $e));
|
|
1062
1074
|
};
|
|
1063
|
-
class
|
|
1075
|
+
class we extends Rt {
|
|
1064
1076
|
constructor() {
|
|
1065
1077
|
super(...arguments), this._$AN = void 0;
|
|
1066
1078
|
}
|
|
1067
1079
|
_$AT(t, e, i) {
|
|
1068
|
-
super._$AT(t, e, i),
|
|
1080
|
+
super._$AT(t, e, i), Dt(this), this.isConnected = t._$AU;
|
|
1069
1081
|
}
|
|
1070
1082
|
_$AO(t, e = !0) {
|
|
1071
1083
|
var i, n;
|
|
1072
|
-
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (n = this.disconnected) == null || n.call(this)), e && (N(this, t),
|
|
1084
|
+
t !== this.isConnected && (this.isConnected = t, t ? (i = this.reconnected) == null || i.call(this) : (n = this.disconnected) == null || n.call(this)), e && (N(this, t), V(this));
|
|
1073
1085
|
}
|
|
1074
1086
|
setValue(t) {
|
|
1075
|
-
if (
|
|
1087
|
+
if (_e(this._$Ct)) this._$Ct._$AI(t, this);
|
|
1076
1088
|
else {
|
|
1077
1089
|
const e = [...this._$Ct._$AH];
|
|
1078
1090
|
e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
|
|
@@ -1088,10 +1100,10 @@ class $e extends Lt {
|
|
|
1088
1100
|
* Copyright 2020 Google LLC
|
|
1089
1101
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1090
1102
|
*/
|
|
1091
|
-
const
|
|
1092
|
-
class
|
|
1103
|
+
const xt = () => new Ae();
|
|
1104
|
+
class Ae {
|
|
1093
1105
|
}
|
|
1094
|
-
const
|
|
1106
|
+
const st = /* @__PURE__ */ new WeakMap(), Et = Lt(class extends we {
|
|
1095
1107
|
render(s) {
|
|
1096
1108
|
return p;
|
|
1097
1109
|
}
|
|
@@ -1103,13 +1115,13 @@ const et = /* @__PURE__ */ new WeakMap(), At = Ht(class extends $e {
|
|
|
1103
1115
|
rt(s) {
|
|
1104
1116
|
if (this.isConnected || (s = void 0), typeof this.G == "function") {
|
|
1105
1117
|
const t = this.ht ?? globalThis;
|
|
1106
|
-
let e =
|
|
1107
|
-
e === void 0 && (e = /* @__PURE__ */ new WeakMap(),
|
|
1118
|
+
let e = st.get(t);
|
|
1119
|
+
e === void 0 && (e = /* @__PURE__ */ new WeakMap(), st.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);
|
|
1108
1120
|
} else this.G.value = s;
|
|
1109
1121
|
}
|
|
1110
1122
|
get lt() {
|
|
1111
1123
|
var s, t;
|
|
1112
|
-
return typeof this.G == "function" ? (s =
|
|
1124
|
+
return typeof this.G == "function" ? (s = st.get(this.ht ?? globalThis)) == null ? void 0 : s.get(this.G) : (t = this.G) == null ? void 0 : t.value;
|
|
1113
1125
|
}
|
|
1114
1126
|
disconnected() {
|
|
1115
1127
|
this.lt === this.ct && this.rt(void 0);
|
|
@@ -1117,15 +1129,15 @@ const et = /* @__PURE__ */ new WeakMap(), At = Ht(class extends $e {
|
|
|
1117
1129
|
reconnected() {
|
|
1118
1130
|
this.rt(this.ct);
|
|
1119
1131
|
}
|
|
1120
|
-
}),
|
|
1121
|
-
var
|
|
1122
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
1132
|
+
}), xe = "*,*: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;isolation:isolate;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%;height:var(--brand-height);background-color:var(--spacer-bg)}#navbar{position:absolute;top:0;width:100%;height:auto;background-color:var(--bg);z-index:1000}#main{width:100%;display:block}";
|
|
1133
|
+
var Ee = Object.defineProperty, Se = Object.getOwnPropertyDescriptor, jt = (s, t, e, i) => {
|
|
1134
|
+
for (var n = i > 1 ? void 0 : i ? Se(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
1123
1135
|
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
1124
|
-
return i && n &&
|
|
1136
|
+
return i && n && Ee(t, e, n), n;
|
|
1125
1137
|
};
|
|
1126
|
-
let
|
|
1138
|
+
let Y = class extends _ {
|
|
1127
1139
|
constructor() {
|
|
1128
|
-
super(), this.navbarRef =
|
|
1140
|
+
super(), this.navbarRef = xt(), this.spacerRef = xt(), this.scrollThreshold = 0, this._lastScrollY = window.scrollY, this._scrollUpPixels = 0, this._debouncer = new Ct(100, 300), document.addEventListener(
|
|
1129
1141
|
"scroll",
|
|
1130
1142
|
async () => {
|
|
1131
1143
|
this.updateScrollState();
|
|
@@ -1141,22 +1153,22 @@ let V = class extends g {
|
|
|
1141
1153
|
s > 1 ? this.classList.add("is-scrolled") : this.classList.remove("is-scrolled"), s < this._lastScrollY ? (this._scrollUpPixels += this._lastScrollY - s, this._scrollUpPixels > 10 && s < this.scrollThreshold && this.classList.add("is-scrolling-up")) : (this._scrollUpPixels = 0, this.classList.remove("is-scrolling-up")), s > this.scrollThreshold ? this.classList.add("is-below-threshold") : this.classList.remove("is-below-threshold"), this._lastScrollY = s;
|
|
1142
1154
|
}
|
|
1143
1155
|
async connectedCallback() {
|
|
1144
|
-
this.updateScrollState(), await
|
|
1156
|
+
this.updateScrollState(), await Bt(), super.connectedCallback();
|
|
1145
1157
|
}
|
|
1146
1158
|
// Adjust the spacer height on every render
|
|
1147
|
-
updated(s) {
|
|
1148
|
-
super.updated(s);
|
|
1159
|
+
async updated(s) {
|
|
1160
|
+
await Gt(), super.updated(s);
|
|
1149
1161
|
const t = this.navbarRef.value, e = this.spacerRef.value;
|
|
1150
|
-
t && e && (e.style.height = `${t.offsetHeight}px`);
|
|
1162
|
+
console.log("Updating spacer height", t == null ? void 0 : t.offsetHeight, e), t && e && (e.style.height = `${t.offsetHeight}px`);
|
|
1151
1163
|
}
|
|
1152
1164
|
firstUpdated(s) {
|
|
1153
|
-
|
|
1165
|
+
rt.observeEmptySlots(this);
|
|
1154
1166
|
}
|
|
1155
1167
|
render() {
|
|
1156
1168
|
return R`
|
|
1157
1169
|
<div id="wrapper" part="wrapper">
|
|
1158
|
-
<div id="spacer" part="spacer" ${
|
|
1159
|
-
<div id="navbar" part="navbar" ${
|
|
1170
|
+
<div id="spacer" part="spacer" ${Et(this.spacerRef)}></div>
|
|
1171
|
+
<div id="navbar" part="navbar" ${Et(this.navbarRef)}>
|
|
1160
1172
|
<div id="brand" part="brand">
|
|
1161
1173
|
<slot name="brand"></slot>
|
|
1162
1174
|
</div>
|
|
@@ -1168,20 +1180,20 @@ let V = class extends g {
|
|
|
1168
1180
|
`;
|
|
1169
1181
|
}
|
|
1170
1182
|
};
|
|
1171
|
-
|
|
1183
|
+
Y.styles = [C(xe)];
|
|
1172
1184
|
jt([
|
|
1173
|
-
|
|
1174
|
-
],
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
],
|
|
1178
|
-
const
|
|
1179
|
-
var
|
|
1180
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
1185
|
+
f({ type: Number, attribute: "scroll-threshold", reflect: !0 })
|
|
1186
|
+
], Y.prototype, "scrollThreshold", 2);
|
|
1187
|
+
Y = jt([
|
|
1188
|
+
z("nte-navbar")
|
|
1189
|
+
], Y);
|
|
1190
|
+
const 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{--container-width: var(--nt-container-width, 100%);--background: transparent;--text-color: var(--nt-text);--height: auto;--brand-height: 80px;display:block;height:100%}: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{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}";
|
|
1191
|
+
var Te = Object.getOwnPropertyDescriptor, Pe = (s, t, e, i) => {
|
|
1192
|
+
for (var n = i > 1 ? void 0 : i ? Te(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
1181
1193
|
(o = s[r]) && (n = o(n) || n);
|
|
1182
1194
|
return n;
|
|
1183
1195
|
};
|
|
1184
|
-
let
|
|
1196
|
+
let nt = class extends _ {
|
|
1185
1197
|
static get is() {
|
|
1186
1198
|
return "nte-navbar-line";
|
|
1187
1199
|
}
|
|
@@ -1195,7 +1207,7 @@ let st = class extends g {
|
|
|
1195
1207
|
);
|
|
1196
1208
|
}
|
|
1197
1209
|
firstUpdated(s) {
|
|
1198
|
-
|
|
1210
|
+
rt.observeEmptySlots(this);
|
|
1199
1211
|
}
|
|
1200
1212
|
render() {
|
|
1201
1213
|
return R`
|
|
@@ -1212,12 +1224,44 @@ let st = class extends g {
|
|
|
1212
1224
|
`;
|
|
1213
1225
|
}
|
|
1214
1226
|
};
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
],
|
|
1227
|
+
nt.styles = [C(Ce)];
|
|
1228
|
+
nt = Pe([
|
|
1229
|
+
z("nte-navbar-line")
|
|
1230
|
+
], nt);
|
|
1231
|
+
const Oe = ":host{--size: 40px;--color: #666;--color-hover: #000;height:var(--size);width:var(--size)}.hamburger{display:block;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0 none;background:none;transition:transform .4s}.hamburger:hover{--color: var(--color-hover)}:host([open]) .hamburger .bar:nth-of-type(1){--translate: calc(var(--size) / 4);transform:translateY(var(--translate)) rotate(45deg)}:host([open]) .hamburger .bar:nth-of-type(2){opacity:0}:host([open]) .hamburger .bar:nth-of-type(3){--translate: calc(var(--size) / -4);transform:translateY(var(--translate)) rotate(-45deg)}.bar{height:3px;width:var(--size);display:block;margin:calc(var(--size) / 5.2) auto;position:relative;background-color:var(--color);transition:.4s}";
|
|
1232
|
+
var ke = Object.defineProperty, Me = Object.getOwnPropertyDescriptor, ht = (s, t, e, i) => {
|
|
1233
|
+
for (var n = i > 1 ? void 0 : i ? Me(t, e) : t, r = s.length - 1, o; r >= 0; r--)
|
|
1234
|
+
(o = s[r]) && (n = (i ? o(t, e, n) : o(n)) || n);
|
|
1235
|
+
return i && n && ke(t, e, n), n;
|
|
1236
|
+
};
|
|
1237
|
+
const Ue = `
|
|
1238
|
+
<div id="wrapper">
|
|
1239
|
+
<button id="button" class="hamburger">
|
|
1240
|
+
<div class="bar"></div>
|
|
1241
|
+
<div class="bar"></div>
|
|
1242
|
+
<div class="bar"></div>
|
|
1243
|
+
</button>
|
|
1244
|
+
</div>
|
|
1245
|
+
`;
|
|
1246
|
+
let F = class extends it {
|
|
1247
|
+
constructor() {
|
|
1248
|
+
super(Ue), this.open = !1, this.text = "Menu";
|
|
1249
|
+
}
|
|
1250
|
+
get css() {
|
|
1251
|
+
return C(Oe);
|
|
1252
|
+
}
|
|
1253
|
+
};
|
|
1254
|
+
ht([
|
|
1255
|
+
f({ type: Boolean, attribute: "open", reflect: !0 })
|
|
1256
|
+
], F.prototype, "open", 2);
|
|
1257
|
+
ht([
|
|
1258
|
+
f({ type: String, reflect: !0 })
|
|
1259
|
+
], F.prototype, "text", 2);
|
|
1260
|
+
F = ht([
|
|
1261
|
+
z("nte-burger")
|
|
1262
|
+
], F);
|
|
1219
1263
|
console.log("Loading nte-nav...");
|
|
1220
1264
|
export {
|
|
1221
1265
|
$ as NteNav,
|
|
1222
|
-
|
|
1266
|
+
Y as NteNavbar
|
|
1223
1267
|
};
|
package/lib/nte-navbar.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export declare class NteNavbar extends LitElement {
|
|
|
11
11
|
constructor();
|
|
12
12
|
private updateScrollState;
|
|
13
13
|
connectedCallback(): Promise<void>;
|
|
14
|
-
updated(_changedProperties: PropertyValues): void
|
|
14
|
+
updated(_changedProperties: PropertyValues): Promise<void>;
|
|
15
15
|
firstUpdated(_changedProperties: PropertyValues): void;
|
|
16
16
|
render(): import('lit-html').TemplateResult<1>;
|
|
17
17
|
}
|