@nysds/nys-globalheader 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/nys-globalheader.js
CHANGED
|
@@ -4,7 +4,7 @@ import { css as D, LitElement as q, html as a } from "lit";
|
|
|
4
4
|
* ▒█▒█▒█ ▒█▄▄▄█ ░▀▀▀▄▄ ▒█░▒█ ░▀▀▀▄▄
|
|
5
5
|
* ▒█░░▀█ ░░▒█░░ ▒█▄▄▄█ ▒█▄▄▀ ▒█▄▄▄█
|
|
6
6
|
*
|
|
7
|
-
* Global Header Component v1.
|
|
7
|
+
* Global Header Component v1.1.0
|
|
8
8
|
* Part of the New York State Design System
|
|
9
9
|
* Repository: https://github.com/its-hcd/nysds
|
|
10
10
|
* License: MIT
|
|
@@ -14,43 +14,43 @@ import { css as D, LitElement as q, html as a } from "lit";
|
|
|
14
14
|
* Copyright 2019 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*/
|
|
17
|
-
const
|
|
17
|
+
const b = globalThis, $ = b.ShadowRoot && (b.ShadyCSS === void 0 || b.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, I = Symbol(), U = /* @__PURE__ */ new WeakMap();
|
|
18
18
|
let G = class {
|
|
19
|
-
constructor(
|
|
19
|
+
constructor(t, e, C) {
|
|
20
20
|
if (this._$cssResult$ = !0, C !== I) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
21
|
-
this.cssText =
|
|
21
|
+
this.cssText = t, this.t = e;
|
|
22
22
|
}
|
|
23
23
|
get styleSheet() {
|
|
24
|
-
let
|
|
25
|
-
const
|
|
26
|
-
if ($ &&
|
|
27
|
-
const C =
|
|
28
|
-
C && (
|
|
24
|
+
let t = this.o;
|
|
25
|
+
const e = this.t;
|
|
26
|
+
if ($ && t === void 0) {
|
|
27
|
+
const C = e !== void 0 && e.length === 1;
|
|
28
|
+
C && (t = U.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), C && U.set(e, t));
|
|
29
29
|
}
|
|
30
|
-
return
|
|
30
|
+
return t;
|
|
31
31
|
}
|
|
32
32
|
toString() {
|
|
33
33
|
return this.cssText;
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
const X = (n) => new G(typeof n == "string" ? n : n + "", void 0, I), Q = (n,
|
|
37
|
-
if ($) n.adoptedStyleSheets =
|
|
38
|
-
else for (const
|
|
39
|
-
const C = document.createElement("style"), o =
|
|
40
|
-
o !== void 0 && C.setAttribute("nonce", o), C.textContent =
|
|
41
|
-
}
|
|
42
|
-
}, O = $ ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((
|
|
43
|
-
let
|
|
44
|
-
for (const C of
|
|
45
|
-
return X(
|
|
36
|
+
const X = (n) => new G(typeof n == "string" ? n : n + "", void 0, I), Q = (n, t) => {
|
|
37
|
+
if ($) n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
38
|
+
else for (const e of t) {
|
|
39
|
+
const C = document.createElement("style"), o = b.litNonce;
|
|
40
|
+
o !== void 0 && C.setAttribute("nonce", o), C.textContent = e.cssText, n.appendChild(C);
|
|
41
|
+
}
|
|
42
|
+
}, O = $ ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
|
|
43
|
+
let e = "";
|
|
44
|
+
for (const C of t.cssRules) e += C.cssText;
|
|
45
|
+
return X(e);
|
|
46
46
|
})(n) : n;
|
|
47
47
|
/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2017 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
51
|
*/
|
|
52
|
-
const { is:
|
|
53
|
-
switch (
|
|
52
|
+
const { is: t1, defineProperty: e1, getOwnPropertyDescriptor: C1, getOwnPropertyNames: o1, getOwnPropertySymbols: n1, getPrototypeOf: s1 } = Object, h = globalThis, k = h.trustedTypes, i1 = k ? k.emptyScript : "", H = h.reactiveElementPolyfillSupport, f = (n, t) => n, M = { toAttribute(n, t) {
|
|
53
|
+
switch (t) {
|
|
54
54
|
case Boolean:
|
|
55
55
|
n = n ? i1 : null;
|
|
56
56
|
break;
|
|
@@ -59,168 +59,168 @@ const { is: e1, defineProperty: t1, getOwnPropertyDescriptor: C1, getOwnProperty
|
|
|
59
59
|
n = n == null ? n : JSON.stringify(n);
|
|
60
60
|
}
|
|
61
61
|
return n;
|
|
62
|
-
}, fromAttribute(n,
|
|
63
|
-
let
|
|
64
|
-
switch (
|
|
62
|
+
}, fromAttribute(n, t) {
|
|
63
|
+
let e = n;
|
|
64
|
+
switch (t) {
|
|
65
65
|
case Boolean:
|
|
66
|
-
|
|
66
|
+
e = n !== null;
|
|
67
67
|
break;
|
|
68
68
|
case Number:
|
|
69
|
-
|
|
69
|
+
e = n === null ? null : Number(n);
|
|
70
70
|
break;
|
|
71
71
|
case Object:
|
|
72
72
|
case Array:
|
|
73
73
|
try {
|
|
74
|
-
|
|
74
|
+
e = JSON.parse(n);
|
|
75
75
|
} catch {
|
|
76
|
-
|
|
76
|
+
e = null;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
-
return
|
|
80
|
-
} }, S = (n,
|
|
81
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
82
|
-
class
|
|
83
|
-
static addInitializer(
|
|
84
|
-
this._$Ei(), (this.l ?? (this.l = [])).push(
|
|
79
|
+
return e;
|
|
80
|
+
} }, S = (n, t) => !t1(n, t), A = { attribute: !0, type: String, converter: M, reflect: !1, hasChanged: S };
|
|
81
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), h.litPropertyMetadata ?? (h.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
82
|
+
class y extends HTMLElement {
|
|
83
|
+
static addInitializer(t) {
|
|
84
|
+
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
85
85
|
}
|
|
86
86
|
static get observedAttributes() {
|
|
87
87
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
88
88
|
}
|
|
89
|
-
static createProperty(
|
|
90
|
-
if (
|
|
91
|
-
const C = Symbol(), o = this.getPropertyDescriptor(
|
|
92
|
-
o !== void 0 &&
|
|
89
|
+
static createProperty(t, e = A) {
|
|
90
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
91
|
+
const C = Symbol(), o = this.getPropertyDescriptor(t, C, e);
|
|
92
|
+
o !== void 0 && e1(this.prototype, t, o);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
static getPropertyDescriptor(
|
|
96
|
-
const { get: o, set: s } = C1(this.prototype,
|
|
97
|
-
return this[
|
|
95
|
+
static getPropertyDescriptor(t, e, C) {
|
|
96
|
+
const { get: o, set: s } = C1(this.prototype, t) ?? { get() {
|
|
97
|
+
return this[e];
|
|
98
98
|
}, set(i) {
|
|
99
|
-
this[
|
|
99
|
+
this[e] = i;
|
|
100
100
|
} };
|
|
101
101
|
return { get() {
|
|
102
102
|
return o == null ? void 0 : o.call(this);
|
|
103
103
|
}, set(i) {
|
|
104
104
|
const r = o == null ? void 0 : o.call(this);
|
|
105
|
-
s.call(this, i), this.requestUpdate(
|
|
105
|
+
s.call(this, i), this.requestUpdate(t, r, C);
|
|
106
106
|
}, configurable: !0, enumerable: !0 };
|
|
107
107
|
}
|
|
108
|
-
static getPropertyOptions(
|
|
109
|
-
return this.elementProperties.get(
|
|
108
|
+
static getPropertyOptions(t) {
|
|
109
|
+
return this.elementProperties.get(t) ?? A;
|
|
110
110
|
}
|
|
111
111
|
static _$Ei() {
|
|
112
|
-
if (this.hasOwnProperty(
|
|
113
|
-
const
|
|
114
|
-
|
|
112
|
+
if (this.hasOwnProperty(f("elementProperties"))) return;
|
|
113
|
+
const t = s1(this);
|
|
114
|
+
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
115
115
|
}
|
|
116
116
|
static finalize() {
|
|
117
|
-
if (this.hasOwnProperty(
|
|
118
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
119
|
-
const
|
|
120
|
-
for (const o of C) this.createProperty(o,
|
|
117
|
+
if (this.hasOwnProperty(f("finalized"))) return;
|
|
118
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(f("properties"))) {
|
|
119
|
+
const e = this.properties, C = [...o1(e), ...n1(e)];
|
|
120
|
+
for (const o of C) this.createProperty(o, e[o]);
|
|
121
121
|
}
|
|
122
|
-
const
|
|
123
|
-
if (
|
|
124
|
-
const
|
|
125
|
-
if (
|
|
122
|
+
const t = this[Symbol.metadata];
|
|
123
|
+
if (t !== null) {
|
|
124
|
+
const e = litPropertyMetadata.get(t);
|
|
125
|
+
if (e !== void 0) for (const [C, o] of e) this.elementProperties.set(C, o);
|
|
126
126
|
}
|
|
127
127
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
128
|
-
for (const [
|
|
129
|
-
const o = this._$Eu(
|
|
130
|
-
o !== void 0 && this._$Eh.set(o,
|
|
128
|
+
for (const [e, C] of this.elementProperties) {
|
|
129
|
+
const o = this._$Eu(e, C);
|
|
130
|
+
o !== void 0 && this._$Eh.set(o, e);
|
|
131
131
|
}
|
|
132
132
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
133
133
|
}
|
|
134
|
-
static finalizeStyles(
|
|
135
|
-
const
|
|
136
|
-
if (Array.isArray(
|
|
137
|
-
const C = new Set(
|
|
138
|
-
for (const o of C)
|
|
139
|
-
} else
|
|
140
|
-
return
|
|
134
|
+
static finalizeStyles(t) {
|
|
135
|
+
const e = [];
|
|
136
|
+
if (Array.isArray(t)) {
|
|
137
|
+
const C = new Set(t.flat(1 / 0).reverse());
|
|
138
|
+
for (const o of C) e.unshift(O(o));
|
|
139
|
+
} else t !== void 0 && e.push(O(t));
|
|
140
|
+
return e;
|
|
141
141
|
}
|
|
142
|
-
static _$Eu(
|
|
143
|
-
const C =
|
|
144
|
-
return C === !1 ? void 0 : typeof C == "string" ? C : typeof
|
|
142
|
+
static _$Eu(t, e) {
|
|
143
|
+
const C = e.attribute;
|
|
144
|
+
return C === !1 ? void 0 : typeof C == "string" ? C : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
145
145
|
}
|
|
146
146
|
constructor() {
|
|
147
147
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
148
148
|
}
|
|
149
149
|
_$Ev() {
|
|
150
|
-
var e;
|
|
151
|
-
this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach((t) => t(this));
|
|
152
|
-
}
|
|
153
|
-
addController(e) {
|
|
154
150
|
var t;
|
|
155
|
-
|
|
151
|
+
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));
|
|
156
152
|
}
|
|
157
|
-
|
|
158
|
-
var
|
|
159
|
-
(
|
|
153
|
+
addController(t) {
|
|
154
|
+
var e;
|
|
155
|
+
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
|
156
|
+
}
|
|
157
|
+
removeController(t) {
|
|
158
|
+
var e;
|
|
159
|
+
(e = this._$EO) == null || e.delete(t);
|
|
160
160
|
}
|
|
161
161
|
_$E_() {
|
|
162
|
-
const
|
|
163
|
-
for (const C of
|
|
164
|
-
|
|
162
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
163
|
+
for (const C of e.keys()) this.hasOwnProperty(C) && (t.set(C, this[C]), delete this[C]);
|
|
164
|
+
t.size > 0 && (this._$Ep = t);
|
|
165
165
|
}
|
|
166
166
|
createRenderRoot() {
|
|
167
|
-
const
|
|
168
|
-
return Q(
|
|
167
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
168
|
+
return Q(t, this.constructor.elementStyles), t;
|
|
169
169
|
}
|
|
170
170
|
connectedCallback() {
|
|
171
|
-
var
|
|
172
|
-
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (
|
|
171
|
+
var t;
|
|
172
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
|
|
173
173
|
var C;
|
|
174
|
-
return (C =
|
|
174
|
+
return (C = e.hostConnected) == null ? void 0 : C.call(e);
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
|
-
enableUpdating(
|
|
177
|
+
enableUpdating(t) {
|
|
178
178
|
}
|
|
179
179
|
disconnectedCallback() {
|
|
180
|
-
var
|
|
181
|
-
(
|
|
180
|
+
var t;
|
|
181
|
+
(t = this._$EO) == null || t.forEach((e) => {
|
|
182
182
|
var C;
|
|
183
|
-
return (C =
|
|
183
|
+
return (C = e.hostDisconnected) == null ? void 0 : C.call(e);
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
|
-
attributeChangedCallback(
|
|
187
|
-
this._$AK(
|
|
186
|
+
attributeChangedCallback(t, e, C) {
|
|
187
|
+
this._$AK(t, C);
|
|
188
188
|
}
|
|
189
|
-
_$EC(
|
|
189
|
+
_$EC(t, e) {
|
|
190
190
|
var s;
|
|
191
|
-
const C = this.constructor.elementProperties.get(
|
|
191
|
+
const C = this.constructor.elementProperties.get(t), o = this.constructor._$Eu(t, C);
|
|
192
192
|
if (o !== void 0 && C.reflect === !0) {
|
|
193
|
-
const i = (((s = C.converter) == null ? void 0 : s.toAttribute) !== void 0 ? C.converter :
|
|
194
|
-
this._$Em =
|
|
193
|
+
const i = (((s = C.converter) == null ? void 0 : s.toAttribute) !== void 0 ? C.converter : M).toAttribute(e, C.type);
|
|
194
|
+
this._$Em = t, i == null ? this.removeAttribute(o) : this.setAttribute(o, i), this._$Em = null;
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
_$AK(
|
|
197
|
+
_$AK(t, e) {
|
|
198
198
|
var s;
|
|
199
|
-
const C = this.constructor, o = C._$Eh.get(
|
|
199
|
+
const C = this.constructor, o = C._$Eh.get(t);
|
|
200
200
|
if (o !== void 0 && this._$Em !== o) {
|
|
201
|
-
const i = C.getPropertyOptions(o), r = typeof i.converter == "function" ? { fromAttribute: i.converter } : ((s = i.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? i.converter :
|
|
202
|
-
this._$Em = o, this[o] = r.fromAttribute(
|
|
201
|
+
const i = C.getPropertyOptions(o), r = typeof i.converter == "function" ? { fromAttribute: i.converter } : ((s = i.converter) == null ? void 0 : s.fromAttribute) !== void 0 ? i.converter : M;
|
|
202
|
+
this._$Em = o, this[o] = r.fromAttribute(e, i.type), this._$Em = null;
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
|
-
requestUpdate(
|
|
206
|
-
if (
|
|
207
|
-
if (C ?? (C = this.constructor.getPropertyOptions(
|
|
208
|
-
this.P(
|
|
205
|
+
requestUpdate(t, e, C) {
|
|
206
|
+
if (t !== void 0) {
|
|
207
|
+
if (C ?? (C = this.constructor.getPropertyOptions(t)), !(C.hasChanged ?? S)(this[t], e)) return;
|
|
208
|
+
this.P(t, e, C);
|
|
209
209
|
}
|
|
210
210
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
211
211
|
}
|
|
212
|
-
P(
|
|
213
|
-
this._$AL.has(
|
|
212
|
+
P(t, e, C) {
|
|
213
|
+
this._$AL.has(t) || this._$AL.set(t, e), C.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
|
|
214
214
|
}
|
|
215
215
|
async _$ET() {
|
|
216
216
|
this.isUpdatePending = !0;
|
|
217
217
|
try {
|
|
218
218
|
await this._$ES;
|
|
219
|
-
} catch (
|
|
220
|
-
Promise.reject(
|
|
219
|
+
} catch (e) {
|
|
220
|
+
Promise.reject(e);
|
|
221
221
|
}
|
|
222
|
-
const
|
|
223
|
-
return
|
|
222
|
+
const t = this.scheduleUpdate();
|
|
223
|
+
return t != null && await t, !this.isUpdatePending;
|
|
224
224
|
}
|
|
225
225
|
scheduleUpdate() {
|
|
226
226
|
return this.performUpdate();
|
|
@@ -236,26 +236,26 @@ class u extends HTMLElement {
|
|
|
236
236
|
const o = this.constructor.elementProperties;
|
|
237
237
|
if (o.size > 0) for (const [s, i] of o) i.wrapped !== !0 || this._$AL.has(s) || this[s] === void 0 || this.P(s, this[s], i);
|
|
238
238
|
}
|
|
239
|
-
let
|
|
240
|
-
const
|
|
239
|
+
let t = !1;
|
|
240
|
+
const e = this._$AL;
|
|
241
241
|
try {
|
|
242
|
-
|
|
242
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (C = this._$EO) == null || C.forEach((o) => {
|
|
243
243
|
var s;
|
|
244
244
|
return (s = o.hostUpdate) == null ? void 0 : s.call(o);
|
|
245
|
-
}), this.update(
|
|
245
|
+
}), this.update(e)) : this._$EU();
|
|
246
246
|
} catch (o) {
|
|
247
|
-
throw
|
|
247
|
+
throw t = !1, this._$EU(), o;
|
|
248
248
|
}
|
|
249
|
-
|
|
249
|
+
t && this._$AE(e);
|
|
250
250
|
}
|
|
251
|
-
willUpdate(
|
|
251
|
+
willUpdate(t) {
|
|
252
252
|
}
|
|
253
|
-
_$AE(
|
|
254
|
-
var
|
|
255
|
-
(
|
|
253
|
+
_$AE(t) {
|
|
254
|
+
var e;
|
|
255
|
+
(e = this._$EO) == null || e.forEach((C) => {
|
|
256
256
|
var o;
|
|
257
257
|
return (o = C.hostUpdated) == null ? void 0 : o.call(C);
|
|
258
|
-
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(
|
|
258
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
259
259
|
}
|
|
260
260
|
_$EU() {
|
|
261
261
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
@@ -266,49 +266,49 @@ class u extends HTMLElement {
|
|
|
266
266
|
getUpdateComplete() {
|
|
267
267
|
return this._$ES;
|
|
268
268
|
}
|
|
269
|
-
shouldUpdate(
|
|
269
|
+
shouldUpdate(t) {
|
|
270
270
|
return !0;
|
|
271
271
|
}
|
|
272
|
-
update(
|
|
273
|
-
this._$Ej && (this._$Ej = this._$Ej.forEach((
|
|
272
|
+
update(t) {
|
|
273
|
+
this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EC(e, this[e]))), this._$EU();
|
|
274
274
|
}
|
|
275
|
-
updated(
|
|
275
|
+
updated(t) {
|
|
276
276
|
}
|
|
277
|
-
firstUpdated(
|
|
277
|
+
firstUpdated(t) {
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
|
-
|
|
280
|
+
y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[f("elementProperties")] = /* @__PURE__ */ new Map(), y[f("finalized")] = /* @__PURE__ */ new Map(), H == null || H({ ReactiveElement: y }), (h.reactiveElementVersions ?? (h.reactiveElementVersions = [])).push("2.0.4");
|
|
281
281
|
/**
|
|
282
282
|
* @license
|
|
283
283
|
* Copyright 2017 Google LLC
|
|
284
284
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
285
285
|
*/
|
|
286
|
-
const r1 = { attribute: !0, type: String, converter:
|
|
287
|
-
const { kind: C, metadata: o } =
|
|
286
|
+
const r1 = { attribute: !0, type: String, converter: M, reflect: !1, hasChanged: S }, l1 = (n = r1, t, e) => {
|
|
287
|
+
const { kind: C, metadata: o } = e;
|
|
288
288
|
let s = globalThis.litPropertyMetadata.get(o);
|
|
289
|
-
if (s === void 0 && globalThis.litPropertyMetadata.set(o, s = /* @__PURE__ */ new Map()), s.set(
|
|
290
|
-
const { name: i } =
|
|
289
|
+
if (s === void 0 && globalThis.litPropertyMetadata.set(o, s = /* @__PURE__ */ new Map()), s.set(e.name, n), C === "accessor") {
|
|
290
|
+
const { name: i } = e;
|
|
291
291
|
return { set(r) {
|
|
292
|
-
const l =
|
|
293
|
-
|
|
292
|
+
const l = t.get.call(this);
|
|
293
|
+
t.set.call(this, r), this.requestUpdate(i, l, n);
|
|
294
294
|
}, init(r) {
|
|
295
295
|
return r !== void 0 && this.P(i, void 0, n), r;
|
|
296
296
|
} };
|
|
297
297
|
}
|
|
298
298
|
if (C === "setter") {
|
|
299
|
-
const { name: i } =
|
|
299
|
+
const { name: i } = e;
|
|
300
300
|
return function(r) {
|
|
301
301
|
const l = this[i];
|
|
302
|
-
|
|
302
|
+
t.call(this, r), this.requestUpdate(i, l, n);
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
305
|
throw Error("Unsupported decorator location: " + C);
|
|
306
306
|
};
|
|
307
|
-
function
|
|
308
|
-
return (
|
|
307
|
+
function Z(n) {
|
|
308
|
+
return (t, e) => typeof e == "object" ? l1(n, t, e) : ((C, o, s) => {
|
|
309
309
|
const i = o.hasOwnProperty(s);
|
|
310
310
|
return o.constructor.createProperty(s, i ? { ...C, wrapped: !0 } : C), i ? Object.getOwnPropertyDescriptor(o, s) : void 0;
|
|
311
|
-
})(n,
|
|
311
|
+
})(n, t, e);
|
|
312
312
|
}
|
|
313
313
|
/**
|
|
314
314
|
* @license
|
|
@@ -316,7 +316,7 @@ function b(n) {
|
|
|
316
316
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
317
317
|
*/
|
|
318
318
|
function J(n) {
|
|
319
|
-
return
|
|
319
|
+
return Z({ ...n, state: !0, attribute: !1 });
|
|
320
320
|
}
|
|
321
321
|
const a1 = D`
|
|
322
322
|
:host {
|
|
@@ -372,25 +372,13 @@ const a1 = D`
|
|
|
372
372
|
/* Menu Content Styling */
|
|
373
373
|
--_nys-globalfooter-link-gap-spacing-row: var(--nys-space-300, 24px);
|
|
374
374
|
--_nys-globalfooter-link-gap-spacing-column: var(--nys-space-400, 32px);
|
|
375
|
-
--_nys-globalheader-lineheight
|
|
376
|
-
--nys-font-lineheight-ui-md,
|
|
377
|
-
24px
|
|
378
|
-
);
|
|
375
|
+
--_nys-globalheader-link-lineheight: var(--nys-font-lineheight-ui-md, 24px);
|
|
379
376
|
--_nys-globalheader-link-letterspacing: var(
|
|
380
377
|
--nys-font-letterspacing-ui-md,
|
|
381
378
|
var(--nys-font-letterspacing-400, 0.044px)
|
|
382
379
|
);
|
|
383
|
-
--_nys-globalheader-
|
|
384
|
-
|
|
385
|
-
var(
|
|
386
|
-
--nys-font-family-sans,
|
|
387
|
-
"Proxima Nova",
|
|
388
|
-
"Helvetica Neue",
|
|
389
|
-
"Helvetica",
|
|
390
|
-
"Arial",
|
|
391
|
-
sans-serif
|
|
392
|
-
)
|
|
393
|
-
);
|
|
380
|
+
--_nys-globalheader-link-weight-decoration: var(--nys-size-2px, 2px);
|
|
381
|
+
|
|
394
382
|
/* Mobile Menu */
|
|
395
383
|
--_nys-globalheader-mobile-btn-font-size: var(--nys-type-size-ui-xs, 12px);
|
|
396
384
|
--_nys-globalheader-mobile-btn-lineheight: var(
|
|
@@ -434,7 +422,7 @@ const a1 = D`
|
|
|
434
422
|
font-size: var(--_nys-globalheader-font-size-links);
|
|
435
423
|
font-style: normal;
|
|
436
424
|
font-weight: 400;
|
|
437
|
-
line-height: var(--_nys-globalheader-lineheight
|
|
425
|
+
line-height: var(--_nys-globalheader-link-lineheight);
|
|
438
426
|
letter-spacing: var(--_nys-globalheader-link-letterspacing);
|
|
439
427
|
}
|
|
440
428
|
|
|
@@ -507,6 +495,10 @@ const a1 = D`
|
|
|
507
495
|
text-underline-position: from-font;
|
|
508
496
|
}
|
|
509
497
|
|
|
498
|
+
.nys-globalheader__content ul a:active {
|
|
499
|
+
text-decoration-thickness: var(--_nys-globalheader-link-weight-decoration);
|
|
500
|
+
}
|
|
501
|
+
|
|
510
502
|
/* Mobile Menu */
|
|
511
503
|
.nys-globalheader__content-mobile {
|
|
512
504
|
position: absolute;
|
|
@@ -608,7 +600,7 @@ const a1 = D`
|
|
|
608
600
|
* ▒█▒█▒█ ▒█▄▄▄█ ░▀▀▀▄▄ ▒█░▒█ ░▀▀▀▄▄
|
|
609
601
|
* ▒█░░▀█ ░░▒█░░ ▒█▄▄▄█ ▒█▄▄▀ ▒█▄▄▄█
|
|
610
602
|
*
|
|
611
|
-
* Icon Component v1.
|
|
603
|
+
* Icon Component v1.1.0
|
|
612
604
|
* Part of the New York State Design System
|
|
613
605
|
* Repository: https://github.com/its-hcd/nysds
|
|
614
606
|
* License: MIT
|
|
@@ -618,18 +610,18 @@ const a1 = D`
|
|
|
618
610
|
* Copyright 2019 Google LLC
|
|
619
611
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
620
612
|
*/
|
|
621
|
-
const
|
|
613
|
+
const L = globalThis, E = L.ShadowRoot && (L.ShadyCSS === void 0 || L.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, K = Symbol(), B = /* @__PURE__ */ new WeakMap();
|
|
622
614
|
let h1 = class {
|
|
623
|
-
constructor(n,
|
|
624
|
-
if (this._$cssResult$ = !0,
|
|
625
|
-
this.cssText = n, this.t =
|
|
615
|
+
constructor(n, t, e) {
|
|
616
|
+
if (this._$cssResult$ = !0, e !== K) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
617
|
+
this.cssText = n, this.t = t;
|
|
626
618
|
}
|
|
627
619
|
get styleSheet() {
|
|
628
620
|
let n = this.o;
|
|
629
|
-
const
|
|
621
|
+
const t = this.t;
|
|
630
622
|
if (E && n === void 0) {
|
|
631
|
-
const
|
|
632
|
-
|
|
623
|
+
const e = t !== void 0 && t.length === 1;
|
|
624
|
+
e && (n = B.get(t)), n === void 0 && ((this.o = n = new CSSStyleSheet()).replaceSync(this.cssText), e && B.set(t, n));
|
|
633
625
|
}
|
|
634
626
|
return n;
|
|
635
627
|
}
|
|
@@ -637,200 +629,200 @@ let h1 = class {
|
|
|
637
629
|
return this.cssText;
|
|
638
630
|
}
|
|
639
631
|
};
|
|
640
|
-
const c1 = (n) => new h1(typeof n == "string" ? n : n + "", void 0, K), d1 = (n,
|
|
641
|
-
if (E) n.adoptedStyleSheets =
|
|
642
|
-
else for (const
|
|
643
|
-
const C = document.createElement("style"), o =
|
|
644
|
-
o !== void 0 && C.setAttribute("nonce", o), C.textContent =
|
|
645
|
-
}
|
|
646
|
-
}, N = E ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((
|
|
647
|
-
let
|
|
648
|
-
for (const C of
|
|
649
|
-
return c1(
|
|
632
|
+
const c1 = (n) => new h1(typeof n == "string" ? n : n + "", void 0, K), d1 = (n, t) => {
|
|
633
|
+
if (E) n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
634
|
+
else for (const e of t) {
|
|
635
|
+
const C = document.createElement("style"), o = L.litNonce;
|
|
636
|
+
o !== void 0 && C.setAttribute("nonce", o), C.textContent = e.cssText, n.appendChild(C);
|
|
637
|
+
}
|
|
638
|
+
}, N = E ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
|
|
639
|
+
let e = "";
|
|
640
|
+
for (const C of t.cssRules) e += C.cssText;
|
|
641
|
+
return c1(e);
|
|
650
642
|
})(n) : n;
|
|
651
643
|
/**
|
|
652
644
|
* @license
|
|
653
645
|
* Copyright 2017 Google LLC
|
|
654
646
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
655
647
|
*/
|
|
656
|
-
const { is: g1, defineProperty: p1, getOwnPropertyDescriptor: v1, getOwnPropertyNames: y1, getOwnPropertySymbols: u1, getPrototypeOf:
|
|
657
|
-
switch (
|
|
648
|
+
const { is: g1, defineProperty: p1, getOwnPropertyDescriptor: v1, getOwnPropertyNames: y1, getOwnPropertySymbols: u1, getPrototypeOf: w1 } = Object, g = globalThis, R = g.trustedTypes, f1 = R ? R.emptyScript : "", T = g.reactiveElementPolyfillSupport, m = (n, t) => n, x = { toAttribute(n, t) {
|
|
649
|
+
switch (t) {
|
|
658
650
|
case Boolean:
|
|
659
|
-
n = n ?
|
|
651
|
+
n = n ? f1 : null;
|
|
660
652
|
break;
|
|
661
653
|
case Object:
|
|
662
654
|
case Array:
|
|
663
655
|
n = n == null ? n : JSON.stringify(n);
|
|
664
656
|
}
|
|
665
657
|
return n;
|
|
666
|
-
}, fromAttribute(n,
|
|
667
|
-
let
|
|
668
|
-
switch (
|
|
658
|
+
}, fromAttribute(n, t) {
|
|
659
|
+
let e = n;
|
|
660
|
+
switch (t) {
|
|
669
661
|
case Boolean:
|
|
670
|
-
|
|
662
|
+
e = n !== null;
|
|
671
663
|
break;
|
|
672
664
|
case Number:
|
|
673
|
-
|
|
665
|
+
e = n === null ? null : Number(n);
|
|
674
666
|
break;
|
|
675
667
|
case Object:
|
|
676
668
|
case Array:
|
|
677
669
|
try {
|
|
678
|
-
|
|
670
|
+
e = JSON.parse(n);
|
|
679
671
|
} catch {
|
|
680
|
-
|
|
672
|
+
e = null;
|
|
681
673
|
}
|
|
682
674
|
}
|
|
683
|
-
return
|
|
684
|
-
} }, V = (n,
|
|
675
|
+
return e;
|
|
676
|
+
} }, V = (n, t) => !g1(n, t), j = { attribute: !0, type: String, converter: x, reflect: !1, hasChanged: V };
|
|
685
677
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), g.litPropertyMetadata ?? (g.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
686
|
-
class
|
|
687
|
-
static addInitializer(
|
|
688
|
-
this._$Ei(), (this.l ?? (this.l = [])).push(
|
|
678
|
+
class u extends HTMLElement {
|
|
679
|
+
static addInitializer(t) {
|
|
680
|
+
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
689
681
|
}
|
|
690
682
|
static get observedAttributes() {
|
|
691
683
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
692
684
|
}
|
|
693
|
-
static createProperty(
|
|
694
|
-
if (
|
|
695
|
-
const C = Symbol(), o = this.getPropertyDescriptor(
|
|
696
|
-
o !== void 0 && p1(this.prototype,
|
|
685
|
+
static createProperty(t, e = j) {
|
|
686
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
687
|
+
const C = Symbol(), o = this.getPropertyDescriptor(t, C, e);
|
|
688
|
+
o !== void 0 && p1(this.prototype, t, o);
|
|
697
689
|
}
|
|
698
690
|
}
|
|
699
|
-
static getPropertyDescriptor(
|
|
700
|
-
const { get: o, set: s } = v1(this.prototype,
|
|
701
|
-
return this[
|
|
691
|
+
static getPropertyDescriptor(t, e, C) {
|
|
692
|
+
const { get: o, set: s } = v1(this.prototype, t) ?? { get() {
|
|
693
|
+
return this[e];
|
|
702
694
|
}, set(i) {
|
|
703
|
-
this[
|
|
695
|
+
this[e] = i;
|
|
704
696
|
} };
|
|
705
697
|
return { get() {
|
|
706
698
|
return o == null ? void 0 : o.call(this);
|
|
707
699
|
}, set(i) {
|
|
708
700
|
const r = o == null ? void 0 : o.call(this);
|
|
709
|
-
s.call(this, i), this.requestUpdate(
|
|
701
|
+
s.call(this, i), this.requestUpdate(t, r, C);
|
|
710
702
|
}, configurable: !0, enumerable: !0 };
|
|
711
703
|
}
|
|
712
|
-
static getPropertyOptions(
|
|
713
|
-
return this.elementProperties.get(
|
|
704
|
+
static getPropertyOptions(t) {
|
|
705
|
+
return this.elementProperties.get(t) ?? j;
|
|
714
706
|
}
|
|
715
707
|
static _$Ei() {
|
|
716
|
-
if (this.hasOwnProperty(
|
|
717
|
-
const
|
|
718
|
-
|
|
708
|
+
if (this.hasOwnProperty(m("elementProperties"))) return;
|
|
709
|
+
const t = w1(this);
|
|
710
|
+
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
719
711
|
}
|
|
720
712
|
static finalize() {
|
|
721
|
-
if (this.hasOwnProperty(
|
|
722
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
723
|
-
const
|
|
724
|
-
for (const o of C) this.createProperty(o,
|
|
713
|
+
if (this.hasOwnProperty(m("finalized"))) return;
|
|
714
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(m("properties"))) {
|
|
715
|
+
const e = this.properties, C = [...y1(e), ...u1(e)];
|
|
716
|
+
for (const o of C) this.createProperty(o, e[o]);
|
|
725
717
|
}
|
|
726
|
-
const
|
|
727
|
-
if (
|
|
728
|
-
const
|
|
729
|
-
if (
|
|
718
|
+
const t = this[Symbol.metadata];
|
|
719
|
+
if (t !== null) {
|
|
720
|
+
const e = litPropertyMetadata.get(t);
|
|
721
|
+
if (e !== void 0) for (const [C, o] of e) this.elementProperties.set(C, o);
|
|
730
722
|
}
|
|
731
723
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
732
|
-
for (const [
|
|
733
|
-
const o = this._$Eu(
|
|
734
|
-
o !== void 0 && this._$Eh.set(o,
|
|
724
|
+
for (const [e, C] of this.elementProperties) {
|
|
725
|
+
const o = this._$Eu(e, C);
|
|
726
|
+
o !== void 0 && this._$Eh.set(o, e);
|
|
735
727
|
}
|
|
736
728
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
737
729
|
}
|
|
738
|
-
static finalizeStyles(
|
|
739
|
-
const
|
|
740
|
-
if (Array.isArray(
|
|
741
|
-
const C = new Set(
|
|
742
|
-
for (const o of C)
|
|
743
|
-
} else
|
|
744
|
-
return
|
|
730
|
+
static finalizeStyles(t) {
|
|
731
|
+
const e = [];
|
|
732
|
+
if (Array.isArray(t)) {
|
|
733
|
+
const C = new Set(t.flat(1 / 0).reverse());
|
|
734
|
+
for (const o of C) e.unshift(N(o));
|
|
735
|
+
} else t !== void 0 && e.push(N(t));
|
|
736
|
+
return e;
|
|
745
737
|
}
|
|
746
|
-
static _$Eu(
|
|
747
|
-
const C =
|
|
748
|
-
return C === !1 ? void 0 : typeof C == "string" ? C : typeof
|
|
738
|
+
static _$Eu(t, e) {
|
|
739
|
+
const C = e.attribute;
|
|
740
|
+
return C === !1 ? void 0 : typeof C == "string" ? C : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
749
741
|
}
|
|
750
742
|
constructor() {
|
|
751
743
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
752
744
|
}
|
|
753
745
|
_$Ev() {
|
|
754
|
-
var e;
|
|
755
|
-
this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (e = this.constructor.l) == null || e.forEach((t) => t(this));
|
|
756
|
-
}
|
|
757
|
-
addController(e) {
|
|
758
746
|
var t;
|
|
759
|
-
|
|
747
|
+
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));
|
|
760
748
|
}
|
|
761
|
-
|
|
762
|
-
var
|
|
763
|
-
(
|
|
749
|
+
addController(t) {
|
|
750
|
+
var e;
|
|
751
|
+
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
|
752
|
+
}
|
|
753
|
+
removeController(t) {
|
|
754
|
+
var e;
|
|
755
|
+
(e = this._$EO) == null || e.delete(t);
|
|
764
756
|
}
|
|
765
757
|
_$E_() {
|
|
766
|
-
const
|
|
767
|
-
for (const C of
|
|
768
|
-
|
|
758
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
759
|
+
for (const C of e.keys()) this.hasOwnProperty(C) && (t.set(C, this[C]), delete this[C]);
|
|
760
|
+
t.size > 0 && (this._$Ep = t);
|
|
769
761
|
}
|
|
770
762
|
createRenderRoot() {
|
|
771
|
-
const
|
|
772
|
-
return d1(
|
|
763
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
764
|
+
return d1(t, this.constructor.elementStyles), t;
|
|
773
765
|
}
|
|
774
766
|
connectedCallback() {
|
|
775
|
-
var
|
|
776
|
-
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (
|
|
767
|
+
var t;
|
|
768
|
+
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
|
|
777
769
|
var C;
|
|
778
|
-
return (C =
|
|
770
|
+
return (C = e.hostConnected) == null ? void 0 : C.call(e);
|
|
779
771
|
});
|
|
780
772
|
}
|
|
781
|
-
enableUpdating(
|
|
773
|
+
enableUpdating(t) {
|
|
782
774
|
}
|
|
783
775
|
disconnectedCallback() {
|
|
784
|
-
var
|
|
785
|
-
(
|
|
776
|
+
var t;
|
|
777
|
+
(t = this._$EO) == null || t.forEach((e) => {
|
|
786
778
|
var C;
|
|
787
|
-
return (C =
|
|
779
|
+
return (C = e.hostDisconnected) == null ? void 0 : C.call(e);
|
|
788
780
|
});
|
|
789
781
|
}
|
|
790
|
-
attributeChangedCallback(
|
|
791
|
-
this._$AK(
|
|
782
|
+
attributeChangedCallback(t, e, C) {
|
|
783
|
+
this._$AK(t, C);
|
|
792
784
|
}
|
|
793
|
-
_$EC(
|
|
785
|
+
_$EC(t, e) {
|
|
794
786
|
var C;
|
|
795
|
-
const o = this.constructor.elementProperties.get(
|
|
787
|
+
const o = this.constructor.elementProperties.get(t), s = this.constructor._$Eu(t, o);
|
|
796
788
|
if (s !== void 0 && o.reflect === !0) {
|
|
797
|
-
const i = (((C = o.converter) == null ? void 0 : C.toAttribute) !== void 0 ? o.converter :
|
|
798
|
-
this._$Em =
|
|
789
|
+
const i = (((C = o.converter) == null ? void 0 : C.toAttribute) !== void 0 ? o.converter : x).toAttribute(e, o.type);
|
|
790
|
+
this._$Em = t, i == null ? this.removeAttribute(s) : this.setAttribute(s, i), this._$Em = null;
|
|
799
791
|
}
|
|
800
792
|
}
|
|
801
|
-
_$AK(
|
|
793
|
+
_$AK(t, e) {
|
|
802
794
|
var C;
|
|
803
|
-
const o = this.constructor, s = o._$Eh.get(
|
|
795
|
+
const o = this.constructor, s = o._$Eh.get(t);
|
|
804
796
|
if (s !== void 0 && this._$Em !== s) {
|
|
805
|
-
const i = o.getPropertyOptions(s), r = typeof i.converter == "function" ? { fromAttribute: i.converter } : ((C = i.converter) == null ? void 0 : C.fromAttribute) !== void 0 ? i.converter :
|
|
806
|
-
this._$Em = s, this[s] = r.fromAttribute(
|
|
797
|
+
const i = o.getPropertyOptions(s), r = typeof i.converter == "function" ? { fromAttribute: i.converter } : ((C = i.converter) == null ? void 0 : C.fromAttribute) !== void 0 ? i.converter : x;
|
|
798
|
+
this._$Em = s, this[s] = r.fromAttribute(e, i.type), this._$Em = null;
|
|
807
799
|
}
|
|
808
800
|
}
|
|
809
|
-
requestUpdate(
|
|
810
|
-
if (
|
|
811
|
-
if (C ?? (C = this.constructor.getPropertyOptions(
|
|
812
|
-
this.P(
|
|
801
|
+
requestUpdate(t, e, C) {
|
|
802
|
+
if (t !== void 0) {
|
|
803
|
+
if (C ?? (C = this.constructor.getPropertyOptions(t)), !(C.hasChanged ?? V)(this[t], e)) return;
|
|
804
|
+
this.P(t, e, C);
|
|
813
805
|
}
|
|
814
806
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
815
807
|
}
|
|
816
|
-
P(
|
|
817
|
-
this._$AL.has(
|
|
808
|
+
P(t, e, C) {
|
|
809
|
+
this._$AL.has(t) || this._$AL.set(t, e), C.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
|
|
818
810
|
}
|
|
819
811
|
async _$ET() {
|
|
820
812
|
this.isUpdatePending = !0;
|
|
821
813
|
try {
|
|
822
814
|
await this._$ES;
|
|
823
|
-
} catch (
|
|
824
|
-
Promise.reject(
|
|
815
|
+
} catch (e) {
|
|
816
|
+
Promise.reject(e);
|
|
825
817
|
}
|
|
826
|
-
const
|
|
827
|
-
return
|
|
818
|
+
const t = this.scheduleUpdate();
|
|
819
|
+
return t != null && await t, !this.isUpdatePending;
|
|
828
820
|
}
|
|
829
821
|
scheduleUpdate() {
|
|
830
822
|
return this.performUpdate();
|
|
831
823
|
}
|
|
832
824
|
performUpdate() {
|
|
833
|
-
var
|
|
825
|
+
var t;
|
|
834
826
|
if (!this.isUpdatePending) return;
|
|
835
827
|
if (!this.hasUpdated) {
|
|
836
828
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
@@ -840,26 +832,26 @@ class f extends HTMLElement {
|
|
|
840
832
|
const o = this.constructor.elementProperties;
|
|
841
833
|
if (o.size > 0) for (const [s, i] of o) i.wrapped !== !0 || this._$AL.has(s) || this[s] === void 0 || this.P(s, this[s], i);
|
|
842
834
|
}
|
|
843
|
-
let
|
|
835
|
+
let e = !1;
|
|
844
836
|
const C = this._$AL;
|
|
845
837
|
try {
|
|
846
|
-
|
|
838
|
+
e = this.shouldUpdate(C), e ? (this.willUpdate(C), (t = this._$EO) == null || t.forEach((o) => {
|
|
847
839
|
var s;
|
|
848
840
|
return (s = o.hostUpdate) == null ? void 0 : s.call(o);
|
|
849
841
|
}), this.update(C)) : this._$EU();
|
|
850
842
|
} catch (o) {
|
|
851
|
-
throw
|
|
843
|
+
throw e = !1, this._$EU(), o;
|
|
852
844
|
}
|
|
853
|
-
|
|
845
|
+
e && this._$AE(C);
|
|
854
846
|
}
|
|
855
|
-
willUpdate(
|
|
847
|
+
willUpdate(t) {
|
|
856
848
|
}
|
|
857
|
-
_$AE(
|
|
858
|
-
var
|
|
859
|
-
(
|
|
849
|
+
_$AE(t) {
|
|
850
|
+
var e;
|
|
851
|
+
(e = this._$EO) == null || e.forEach((C) => {
|
|
860
852
|
var o;
|
|
861
853
|
return (o = C.hostUpdated) == null ? void 0 : o.call(C);
|
|
862
|
-
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(
|
|
854
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
863
855
|
}
|
|
864
856
|
_$EU() {
|
|
865
857
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
@@ -870,49 +862,49 @@ class f extends HTMLElement {
|
|
|
870
862
|
getUpdateComplete() {
|
|
871
863
|
return this._$ES;
|
|
872
864
|
}
|
|
873
|
-
shouldUpdate(
|
|
865
|
+
shouldUpdate(t) {
|
|
874
866
|
return !0;
|
|
875
867
|
}
|
|
876
|
-
update(
|
|
877
|
-
this._$Ej && (this._$Ej = this._$Ej.forEach((
|
|
868
|
+
update(t) {
|
|
869
|
+
this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EC(e, this[e]))), this._$EU();
|
|
878
870
|
}
|
|
879
|
-
updated(
|
|
871
|
+
updated(t) {
|
|
880
872
|
}
|
|
881
|
-
firstUpdated(
|
|
873
|
+
firstUpdated(t) {
|
|
882
874
|
}
|
|
883
875
|
}
|
|
884
|
-
|
|
876
|
+
u.elementStyles = [], u.shadowRootOptions = { mode: "open" }, u[m("elementProperties")] = /* @__PURE__ */ new Map(), u[m("finalized")] = /* @__PURE__ */ new Map(), T == null || T({ ReactiveElement: u }), (g.reactiveElementVersions ?? (g.reactiveElementVersions = [])).push("2.0.4");
|
|
885
877
|
/**
|
|
886
878
|
* @license
|
|
887
879
|
* Copyright 2017 Google LLC
|
|
888
880
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
889
881
|
*/
|
|
890
|
-
const m1 = { attribute: !0, type: String, converter:
|
|
891
|
-
const { kind: C, metadata: o } =
|
|
882
|
+
const m1 = { attribute: !0, type: String, converter: x, reflect: !1, hasChanged: V }, _1 = (n = m1, t, e) => {
|
|
883
|
+
const { kind: C, metadata: o } = e;
|
|
892
884
|
let s = globalThis.litPropertyMetadata.get(o);
|
|
893
|
-
if (s === void 0 && globalThis.litPropertyMetadata.set(o, s = /* @__PURE__ */ new Map()), s.set(
|
|
894
|
-
const { name: i } =
|
|
885
|
+
if (s === void 0 && globalThis.litPropertyMetadata.set(o, s = /* @__PURE__ */ new Map()), s.set(e.name, n), C === "accessor") {
|
|
886
|
+
const { name: i } = e;
|
|
895
887
|
return { set(r) {
|
|
896
|
-
const l =
|
|
897
|
-
|
|
888
|
+
const l = t.get.call(this);
|
|
889
|
+
t.set.call(this, r), this.requestUpdate(i, l, n);
|
|
898
890
|
}, init(r) {
|
|
899
891
|
return r !== void 0 && this.P(i, void 0, n), r;
|
|
900
892
|
} };
|
|
901
893
|
}
|
|
902
894
|
if (C === "setter") {
|
|
903
|
-
const { name: i } =
|
|
895
|
+
const { name: i } = e;
|
|
904
896
|
return function(r) {
|
|
905
897
|
const l = this[i];
|
|
906
|
-
|
|
898
|
+
t.call(this, r), this.requestUpdate(i, l, n);
|
|
907
899
|
};
|
|
908
900
|
}
|
|
909
901
|
throw Error("Unsupported decorator location: " + C);
|
|
910
902
|
};
|
|
911
903
|
function p(n) {
|
|
912
|
-
return (
|
|
904
|
+
return (t, e) => typeof e == "object" ? _1(n, t, e) : ((C, o, s) => {
|
|
913
905
|
const i = o.hasOwnProperty(s);
|
|
914
906
|
return o.constructor.createProperty(s, i ? { ...C, wrapped: !0 } : C), i ? Object.getOwnPropertyDescriptor(o, s) : void 0;
|
|
915
|
-
})(n,
|
|
907
|
+
})(n, t, e);
|
|
916
908
|
}
|
|
917
909
|
const b1 = {
|
|
918
910
|
// --------- UX Team Main Library (below) --------- //
|
|
@@ -1210,10 +1202,10 @@ const b1 = {
|
|
|
1210
1202
|
transform: scale(-1, -1);
|
|
1211
1203
|
}
|
|
1212
1204
|
`;
|
|
1213
|
-
var M1 = Object.defineProperty, x1 = Object.getOwnPropertyDescriptor, v = (n,
|
|
1214
|
-
for (var o = C > 1 ? void 0 : C ? x1(
|
|
1215
|
-
(i = n[s]) && (o = (C ? i(
|
|
1216
|
-
return C && o && M1(
|
|
1205
|
+
var M1 = Object.defineProperty, x1 = Object.getOwnPropertyDescriptor, v = (n, t, e, C) => {
|
|
1206
|
+
for (var o = C > 1 ? void 0 : C ? x1(t, e) : t, s = n.length - 1, i; s >= 0; s--)
|
|
1207
|
+
(i = n[s]) && (o = (C ? i(t, e, o) : i(o)) || o);
|
|
1208
|
+
return C && o && M1(t, e, o), o;
|
|
1217
1209
|
}, w;
|
|
1218
1210
|
const d = (w = class extends q {
|
|
1219
1211
|
constructor() {
|
|
@@ -1228,10 +1220,10 @@ const d = (w = class extends q {
|
|
|
1228
1220
|
) ? n : "sm";
|
|
1229
1221
|
}
|
|
1230
1222
|
getIcon() {
|
|
1231
|
-
const n = b1[this.name],
|
|
1223
|
+
const n = b1[this.name], t = !!this.label;
|
|
1232
1224
|
if (!n) return null;
|
|
1233
|
-
const
|
|
1234
|
-
return
|
|
1225
|
+
const e = new DOMParser().parseFromString(n, "image/svg+xml").documentElement;
|
|
1226
|
+
return e instanceof SVGElement ? (e.setAttribute("role", "img"), e.setAttribute("aria-label", t ? this.label : ""), e.setAttribute("aria-hidden", t ? "false" : "true"), e.style.rotate = `${this.rotate}deg`, e.style.color = this.color || "currentcolor", e.classList.add(`nys-icon--${this.size}`), e.classList.add("nys-icon--svg"), this.flip && e.classList.add(`nys-icon--flip-${this.flip}`), e) : null;
|
|
1235
1227
|
}
|
|
1236
1228
|
render() {
|
|
1237
1229
|
const n = this.getIcon();
|
|
@@ -1274,35 +1266,35 @@ v([
|
|
|
1274
1266
|
], d.prototype, "size", 1);
|
|
1275
1267
|
let Z1 = d;
|
|
1276
1268
|
customElements.get("nys-icon") || customElements.define("nys-icon", Z1);
|
|
1277
|
-
var H1 = Object.defineProperty,
|
|
1269
|
+
var H1 = Object.defineProperty, _ = (n, t, e, C) => {
|
|
1278
1270
|
for (var o = void 0, s = n.length - 1, i; s >= 0; s--)
|
|
1279
|
-
(i = n[s]) && (o = i(
|
|
1280
|
-
return o && H1(
|
|
1271
|
+
(i = n[s]) && (o = i(t, e, o) || o);
|
|
1272
|
+
return o && H1(t, e, o), o;
|
|
1281
1273
|
};
|
|
1282
1274
|
const P = class P extends q {
|
|
1283
1275
|
constructor() {
|
|
1284
|
-
super(...arguments), this.appName = "", this.agencyName = "", this.homepageLink =
|
|
1276
|
+
super(...arguments), this.appName = "", this.agencyName = "", this.homepageLink = "", this.slotHasContent = !0, this.isMobileMenuOpen = !1;
|
|
1285
1277
|
}
|
|
1286
1278
|
/**************** Lifecycle Methods ****************/
|
|
1287
1279
|
firstUpdated() {
|
|
1288
|
-
var
|
|
1289
|
-
const
|
|
1290
|
-
|
|
1280
|
+
var e;
|
|
1281
|
+
const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("slot");
|
|
1282
|
+
t == null || t.addEventListener("slotchange", () => this._handleSlotChange()), this._handleSlotChange();
|
|
1291
1283
|
}
|
|
1292
1284
|
/******************** Functions ********************/
|
|
1293
1285
|
// Gets called when the slot content changes and directly appends the slotted elements into the shadow DOM
|
|
1294
1286
|
_handleSlotChange() {
|
|
1295
1287
|
var s, i, r;
|
|
1296
|
-
const
|
|
1297
|
-
if (!
|
|
1298
|
-
const
|
|
1299
|
-
this.slotHasContent =
|
|
1288
|
+
const t = (s = this.shadowRoot) == null ? void 0 : s.querySelector("slot");
|
|
1289
|
+
if (!t) return;
|
|
1290
|
+
const e = t == null ? void 0 : t.assignedNodes({ flatten: !0 }).filter((l) => l.nodeType === Node.ELEMENT_NODE);
|
|
1291
|
+
this.slotHasContent = e.length > 0;
|
|
1300
1292
|
const C = (i = this.shadowRoot) == null ? void 0 : i.querySelector(
|
|
1301
1293
|
".nys-globalheader__content"
|
|
1302
1294
|
), o = (r = this.shadowRoot) == null ? void 0 : r.querySelector(
|
|
1303
1295
|
".nys-globalheader__content-mobile"
|
|
1304
1296
|
);
|
|
1305
|
-
C && o && (C.innerHTML = "", o.innerHTML = "",
|
|
1297
|
+
C && o && (C.innerHTML = "", o.innerHTML = "", e.forEach((l) => {
|
|
1306
1298
|
if (l.nodeType === Node.ELEMENT_NODE) {
|
|
1307
1299
|
const z = l.cloneNode(!0), W = l.cloneNode(!0);
|
|
1308
1300
|
["script", "iframe", "object", "embed"].forEach((Y) => {
|
|
@@ -1315,7 +1307,7 @@ const P = class P extends q {
|
|
|
1315
1307
|
this.isMobileMenuOpen = !this.isMobileMenuOpen;
|
|
1316
1308
|
}
|
|
1317
1309
|
render() {
|
|
1318
|
-
var
|
|
1310
|
+
var t, e, C, o, s, i, r, l;
|
|
1319
1311
|
return a`
|
|
1320
1312
|
<header class="nys-globalheader">
|
|
1321
1313
|
<div class="nys-globalheader__main-container">
|
|
@@ -1334,36 +1326,36 @@ const P = class P extends q {
|
|
|
1334
1326
|
>
|
|
1335
1327
|
</button>
|
|
1336
1328
|
</div>` : ""}
|
|
1337
|
-
${this.
|
|
1329
|
+
${(t = this.homepageLink) != null && t.trim() ? a`<a
|
|
1330
|
+
class="nys-globalheader__name-container-link"
|
|
1331
|
+
href=${(s = this.homepageLink) == null ? void 0 : s.trim()}
|
|
1332
|
+
>
|
|
1338
1333
|
<div class="nys-globalheader__name-container">
|
|
1339
|
-
${((
|
|
1334
|
+
${((i = this.appName) == null ? void 0 : i.trim().length) > 0 ? a`<div
|
|
1340
1335
|
class="nys-globalheader__appName nys-globalheader__name"
|
|
1341
1336
|
>
|
|
1342
1337
|
${this.appName}
|
|
1343
1338
|
</div> ` : ""}
|
|
1344
|
-
${((
|
|
1345
|
-
class="nys-globalheader__agencyName nys-globalheader__name ${((
|
|
1339
|
+
${((r = this.agencyName) == null ? void 0 : r.trim().length) > 0 ? a`<div
|
|
1340
|
+
class="nys-globalheader__agencyName nys-globalheader__name ${((l = this.appName) == null ? void 0 : l.trim().length) > 0 ? "" : "main"}"
|
|
1346
1341
|
>
|
|
1347
1342
|
${this.agencyName}
|
|
1348
1343
|
</div> ` : ""}
|
|
1349
1344
|
</div>
|
|
1350
|
-
|
|
1351
|
-
class="nys-globalheader__name-container-link"
|
|
1352
|
-
href=${((o = this.homepageLink) == null ? void 0 : o.trim()) || window.location.origin}
|
|
1353
|
-
>
|
|
1345
|
+
</a>` : a`
|
|
1354
1346
|
<div class="nys-globalheader__name-container">
|
|
1355
|
-
${((
|
|
1347
|
+
${((e = this.appName) == null ? void 0 : e.trim().length) > 0 ? a`<div
|
|
1356
1348
|
class="nys-globalheader__appName nys-globalheader__name"
|
|
1357
1349
|
>
|
|
1358
1350
|
${this.appName}
|
|
1359
1351
|
</div> ` : ""}
|
|
1360
|
-
${((
|
|
1361
|
-
class="nys-globalheader__agencyName nys-globalheader__name ${((
|
|
1352
|
+
${((C = this.agencyName) == null ? void 0 : C.trim().length) > 0 ? a`<div
|
|
1353
|
+
class="nys-globalheader__agencyName nys-globalheader__name ${((o = this.appName) == null ? void 0 : o.trim().length) > 0 ? "" : "main"}"
|
|
1362
1354
|
>
|
|
1363
1355
|
${this.agencyName}
|
|
1364
1356
|
</div> ` : ""}
|
|
1365
1357
|
</div>
|
|
1366
|
-
|
|
1358
|
+
`}
|
|
1367
1359
|
${this.slotHasContent ? a`<div class="nys-globalheader__content">
|
|
1368
1360
|
<slot
|
|
1369
1361
|
style="display: hidden"
|
|
@@ -1379,27 +1371,24 @@ const P = class P extends q {
|
|
|
1379
1371
|
}
|
|
1380
1372
|
};
|
|
1381
1373
|
P.styles = a1;
|
|
1382
|
-
let
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
],
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
],
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
],
|
|
1392
|
-
|
|
1393
|
-
b({ type: Boolean })
|
|
1394
|
-
], h.prototype, "disableHomepageLink");
|
|
1395
|
-
y([
|
|
1374
|
+
let c = P;
|
|
1375
|
+
_([
|
|
1376
|
+
Z({ type: String })
|
|
1377
|
+
], c.prototype, "appName");
|
|
1378
|
+
_([
|
|
1379
|
+
Z({ type: String })
|
|
1380
|
+
], c.prototype, "agencyName");
|
|
1381
|
+
_([
|
|
1382
|
+
Z({ type: String })
|
|
1383
|
+
], c.prototype, "homepageLink");
|
|
1384
|
+
_([
|
|
1396
1385
|
J()
|
|
1397
|
-
],
|
|
1398
|
-
|
|
1386
|
+
], c.prototype, "slotHasContent");
|
|
1387
|
+
_([
|
|
1399
1388
|
J()
|
|
1400
|
-
],
|
|
1401
|
-
customElements.get("nys-globalheader") || customElements.define("nys-globalheader",
|
|
1389
|
+
], c.prototype, "isMobileMenuOpen");
|
|
1390
|
+
customElements.get("nys-globalheader") || customElements.define("nys-globalheader", c);
|
|
1402
1391
|
export {
|
|
1403
|
-
|
|
1392
|
+
c as NysGlobalHeader
|
|
1404
1393
|
};
|
|
1405
1394
|
//# sourceMappingURL=nys-globalheader.js.map
|