@pie-players/pie-players-shared 0.3.57 → 0.3.59

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.
Files changed (33) hide show
  1. package/dist/components/vendor/nds/README.md +120 -0
  2. package/dist/components/vendor/nds/nds-icon-button.d.ts +19 -0
  3. package/dist/components/vendor/nds/nds-icon-button.js +826 -0
  4. package/dist/loaders/ElementLoader.d.ts +6 -5
  5. package/dist/loaders/ElementLoader.js +11 -45
  6. package/dist/loaders/ElementLoader.js.map +1 -1
  7. package/dist/loaders/element-loader.d.ts +6 -0
  8. package/dist/loaders/element-loader.js +4 -0
  9. package/dist/loaders/element-loader.js.map +1 -1
  10. package/dist/loaders/element-package-policy.d.ts +19 -0
  11. package/dist/loaders/element-package-policy.js +68 -0
  12. package/dist/loaders/element-package-policy.js.map +1 -0
  13. package/dist/loaders/iife-adapter.js +35 -1
  14. package/dist/loaders/iife-adapter.js.map +1 -1
  15. package/dist/loaders/index.d.ts +2 -0
  16. package/dist/loaders/index.js +1 -0
  17. package/dist/loaders/index.js.map +1 -1
  18. package/dist/pie/authoring-tag.d.ts +6 -0
  19. package/dist/pie/authoring-tag.js +13 -0
  20. package/dist/pie/authoring-tag.js.map +1 -0
  21. package/dist/pie/config.d.ts +5 -6
  22. package/dist/pie/config.js +26 -45
  23. package/dist/pie/config.js.map +1 -1
  24. package/dist/pie/overrides.d.ts +2 -1
  25. package/dist/pie/overrides.js +49 -32
  26. package/dist/pie/overrides.js.map +1 -1
  27. package/dist/pie/versioned-tag.d.ts +15 -0
  28. package/dist/pie/versioned-tag.js +43 -0
  29. package/dist/pie/versioned-tag.js.map +1 -0
  30. package/dist/ui/zoom-compensation.d.ts +44 -0
  31. package/dist/ui/zoom-compensation.js +44 -0
  32. package/dist/ui/zoom-compensation.js.map +1 -0
  33. package/package.json +10 -2
@@ -0,0 +1,826 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ const H = globalThis, D = H.ShadowRoot && (H.ShadyCSS === void 0 || H.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, tt = Symbol(), W = /* @__PURE__ */ new WeakMap();
7
+ let nt = class {
8
+ constructor(t, e, s) {
9
+ if (this._$cssResult$ = !0, s !== tt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
+ this.cssText = t, this.t = e;
11
+ }
12
+ get styleSheet() {
13
+ let t = this.o;
14
+ const e = this.t;
15
+ if (D && t === void 0) {
16
+ const s = e !== void 0 && e.length === 1;
17
+ s && (t = W.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && W.set(e, t));
18
+ }
19
+ return t;
20
+ }
21
+ toString() {
22
+ return this.cssText;
23
+ }
24
+ };
25
+ const rt = (o) => new nt(typeof o == "string" ? o : o + "", void 0, tt), at = (o, t) => {
26
+ if (D) o.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
27
+ else for (const e of t) {
28
+ const s = document.createElement("style"), i = H.litNonce;
29
+ i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, o.appendChild(s);
30
+ }
31
+ }, V = D ? (o) => o : (o) => o instanceof CSSStyleSheet ? ((t) => {
32
+ let e = "";
33
+ for (const s of t.cssRules) e += s.cssText;
34
+ return rt(e);
35
+ })(o) : o;
36
+ /**
37
+ * @license
38
+ * Copyright 2017 Google LLC
39
+ * SPDX-License-Identifier: BSD-3-Clause
40
+ */
41
+ const { is: ht, defineProperty: ct, getOwnPropertyDescriptor: lt, getOwnPropertyNames: dt, getOwnPropertySymbols: ut, getPrototypeOf: pt } = Object, R = globalThis, F = R.trustedTypes, ft = F ? F.emptyScript : "", bt = R.reactiveElementPolyfillSupport, S = (o, t) => o, N = { toAttribute(o, t) {
42
+ switch (t) {
43
+ case Boolean:
44
+ o = o ? ft : null;
45
+ break;
46
+ case Object:
47
+ case Array:
48
+ o = o == null ? o : JSON.stringify(o);
49
+ }
50
+ return o;
51
+ }, fromAttribute(o, t) {
52
+ let e = o;
53
+ switch (t) {
54
+ case Boolean:
55
+ e = o !== null;
56
+ break;
57
+ case Number:
58
+ e = o === null ? null : Number(o);
59
+ break;
60
+ case Object:
61
+ case Array:
62
+ try {
63
+ e = JSON.parse(o);
64
+ } catch {
65
+ e = null;
66
+ }
67
+ }
68
+ return e;
69
+ } }, L = (o, t) => !ht(o, t), J = { attribute: !0, type: String, converter: N, reflect: !1, useDefault: !1, hasChanged: L };
70
+ Symbol.metadata ??= Symbol("metadata"), R.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
71
+ let A = class extends HTMLElement {
72
+ static addInitializer(t) {
73
+ this._$Ei(), (this.l ??= []).push(t);
74
+ }
75
+ static get observedAttributes() {
76
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
77
+ }
78
+ static createProperty(t, e = J) {
79
+ 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) {
80
+ const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
81
+ i !== void 0 && ct(this.prototype, t, i);
82
+ }
83
+ }
84
+ static getPropertyDescriptor(t, e, s) {
85
+ const { get: i, set: n } = lt(this.prototype, t) ?? { get() {
86
+ return this[e];
87
+ }, set(r) {
88
+ this[e] = r;
89
+ } };
90
+ return { get: i, set(r) {
91
+ const h = i?.call(this);
92
+ n?.call(this, r), this.requestUpdate(t, h, s);
93
+ }, configurable: !0, enumerable: !0 };
94
+ }
95
+ static getPropertyOptions(t) {
96
+ return this.elementProperties.get(t) ?? J;
97
+ }
98
+ static _$Ei() {
99
+ if (this.hasOwnProperty(S("elementProperties"))) return;
100
+ const t = pt(this);
101
+ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
102
+ }
103
+ static finalize() {
104
+ if (this.hasOwnProperty(S("finalized"))) return;
105
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(S("properties"))) {
106
+ const e = this.properties, s = [...dt(e), ...ut(e)];
107
+ for (const i of s) this.createProperty(i, e[i]);
108
+ }
109
+ const t = this[Symbol.metadata];
110
+ if (t !== null) {
111
+ const e = litPropertyMetadata.get(t);
112
+ if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
113
+ }
114
+ this._$Eh = /* @__PURE__ */ new Map();
115
+ for (const [e, s] of this.elementProperties) {
116
+ const i = this._$Eu(e, s);
117
+ i !== void 0 && this._$Eh.set(i, e);
118
+ }
119
+ this.elementStyles = this.finalizeStyles(this.styles);
120
+ }
121
+ static finalizeStyles(t) {
122
+ const e = [];
123
+ if (Array.isArray(t)) {
124
+ const s = new Set(t.flat(1 / 0).reverse());
125
+ for (const i of s) e.unshift(V(i));
126
+ } else t !== void 0 && e.push(V(t));
127
+ return e;
128
+ }
129
+ static _$Eu(t, e) {
130
+ const s = e.attribute;
131
+ return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
132
+ }
133
+ constructor() {
134
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
135
+ }
136
+ _$Ev() {
137
+ this._$ES = new Promise(((t) => this.enableUpdating = t)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((t) => t(this)));
138
+ }
139
+ addController(t) {
140
+ (this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
141
+ }
142
+ removeController(t) {
143
+ this._$EO?.delete(t);
144
+ }
145
+ _$E_() {
146
+ const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
147
+ for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
148
+ t.size > 0 && (this._$Ep = t);
149
+ }
150
+ createRenderRoot() {
151
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
152
+ return at(t, this.constructor.elementStyles), t;
153
+ }
154
+ connectedCallback() {
155
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t) => t.hostConnected?.()));
156
+ }
157
+ enableUpdating(t) {
158
+ }
159
+ disconnectedCallback() {
160
+ this._$EO?.forEach(((t) => t.hostDisconnected?.()));
161
+ }
162
+ attributeChangedCallback(t, e, s) {
163
+ this._$AK(t, s);
164
+ }
165
+ _$ET(t, e) {
166
+ const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
167
+ if (i !== void 0 && s.reflect === !0) {
168
+ const n = (s.converter?.toAttribute !== void 0 ? s.converter : N).toAttribute(e, s.type);
169
+ this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
170
+ }
171
+ }
172
+ _$AK(t, e) {
173
+ const s = this.constructor, i = s._$Eh.get(t);
174
+ if (i !== void 0 && this._$Em !== i) {
175
+ const n = s.getPropertyOptions(i), r = typeof n.converter == "function" ? { fromAttribute: n.converter } : n.converter?.fromAttribute !== void 0 ? n.converter : N;
176
+ this._$Em = i;
177
+ const h = r.fromAttribute(e, n.type);
178
+ this[i] = h ?? this._$Ej?.get(i) ?? h, this._$Em = null;
179
+ }
180
+ }
181
+ requestUpdate(t, e, s) {
182
+ if (t !== void 0) {
183
+ const i = this.constructor, n = this[t];
184
+ if (s ??= i.getPropertyOptions(t), !((s.hasChanged ?? L)(n, e) || s.useDefault && s.reflect && n === this._$Ej?.get(t) && !this.hasAttribute(i._$Eu(t, s)))) return;
185
+ this.C(t, e, s);
186
+ }
187
+ this.isUpdatePending === !1 && (this._$ES = this._$EP());
188
+ }
189
+ C(t, e, { useDefault: s, reflect: i, wrapped: n }, r) {
190
+ s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, r ?? e ?? this[t]), n !== !0 || r !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
191
+ }
192
+ async _$EP() {
193
+ this.isUpdatePending = !0;
194
+ try {
195
+ await this._$ES;
196
+ } catch (e) {
197
+ Promise.reject(e);
198
+ }
199
+ const t = this.scheduleUpdate();
200
+ return t != null && await t, !this.isUpdatePending;
201
+ }
202
+ scheduleUpdate() {
203
+ return this.performUpdate();
204
+ }
205
+ performUpdate() {
206
+ if (!this.isUpdatePending) return;
207
+ if (!this.hasUpdated) {
208
+ if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
209
+ for (const [i, n] of this._$Ep) this[i] = n;
210
+ this._$Ep = void 0;
211
+ }
212
+ const s = this.constructor.elementProperties;
213
+ if (s.size > 0) for (const [i, n] of s) {
214
+ const { wrapped: r } = n, h = this[i];
215
+ r !== !0 || this._$AL.has(i) || h === void 0 || this.C(i, void 0, n, h);
216
+ }
217
+ }
218
+ let t = !1;
219
+ const e = this._$AL;
220
+ try {
221
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach(((s) => s.hostUpdate?.())), this.update(e)) : this._$EM();
222
+ } catch (s) {
223
+ throw t = !1, this._$EM(), s;
224
+ }
225
+ t && this._$AE(e);
226
+ }
227
+ willUpdate(t) {
228
+ }
229
+ _$AE(t) {
230
+ this._$EO?.forEach(((e) => e.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
231
+ }
232
+ _$EM() {
233
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
234
+ }
235
+ get updateComplete() {
236
+ return this.getUpdateComplete();
237
+ }
238
+ getUpdateComplete() {
239
+ return this._$ES;
240
+ }
241
+ shouldUpdate(t) {
242
+ return !0;
243
+ }
244
+ update(t) {
245
+ this._$Eq &&= this._$Eq.forEach(((e) => this._$ET(e, this[e]))), this._$EM();
246
+ }
247
+ updated(t) {
248
+ }
249
+ firstUpdated(t) {
250
+ }
251
+ };
252
+ A.elementStyles = [], A.shadowRootOptions = { mode: "open" }, A[S("elementProperties")] = /* @__PURE__ */ new Map(), A[S("finalized")] = /* @__PURE__ */ new Map(), bt?.({ ReactiveElement: A }), (R.reactiveElementVersions ??= []).push("2.1.1");
253
+ /**
254
+ * @license
255
+ * Copyright 2017 Google LLC
256
+ * SPDX-License-Identifier: BSD-3-Clause
257
+ */
258
+ const I = globalThis, T = I.trustedTypes, K = T ? T.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, et = "$lit$", v = `lit$${Math.random().toFixed(9).slice(2)}$`, st = "?" + v, $t = `<${st}>`, g = document, k = () => g.createComment(""), P = (o) => o === null || typeof o != "object" && typeof o != "function", B = Array.isArray, vt = (o) => B(o) || typeof o?.[Symbol.iterator] == "function", j = `[
259
+ \f\r]`, x = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Z = /-->/g, G = />/g, y = RegExp(`>|${j}(?:([^\\s"'>=/]+)(${j}*=${j}*(?:[^
260
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Q = /'/g, X = /"/g, it = /^(?:script|style|textarea|title)$/i, _t = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }), yt = _t(1), w = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), Y = /* @__PURE__ */ new WeakMap(), m = g.createTreeWalker(g, 129);
261
+ function ot(o, t) {
262
+ if (!B(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array");
263
+ return K !== void 0 ? K.createHTML(t) : t;
264
+ }
265
+ const mt = (o, t) => {
266
+ const e = o.length - 1, s = [];
267
+ let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r = x;
268
+ for (let h = 0; h < e; h++) {
269
+ const a = o[h];
270
+ let l, u, c = -1, f = 0;
271
+ for (; f < a.length && (r.lastIndex = f, u = r.exec(a), u !== null); ) f = r.lastIndex, r === x ? u[1] === "!--" ? r = Z : u[1] !== void 0 ? r = G : u[2] !== void 0 ? (it.test(u[2]) && (i = RegExp("</" + u[2], "g")), r = y) : u[3] !== void 0 && (r = y) : r === y ? u[0] === ">" ? (r = i ?? x, c = -1) : u[1] === void 0 ? c = -2 : (c = r.lastIndex - u[2].length, l = u[1], r = u[3] === void 0 ? y : u[3] === '"' ? X : Q) : r === X || r === Q ? r = y : r === Z || r === G ? r = x : (r = y, i = void 0);
272
+ const $ = r === y && o[h + 1].startsWith("/>") ? " " : "";
273
+ n += r === x ? a + $t : c >= 0 ? (s.push(l), a.slice(0, c) + et + a.slice(c) + v + $) : a + v + (c === -2 ? h : $);
274
+ }
275
+ return [ot(o, n + (o[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
276
+ };
277
+ class O {
278
+ constructor({ strings: t, _$litType$: e }, s) {
279
+ let i;
280
+ this.parts = [];
281
+ let n = 0, r = 0;
282
+ const h = t.length - 1, a = this.parts, [l, u] = mt(t, e);
283
+ if (this.el = O.createElement(l, s), m.currentNode = this.el.content, e === 2 || e === 3) {
284
+ const c = this.el.content.firstChild;
285
+ c.replaceWith(...c.childNodes);
286
+ }
287
+ for (; (i = m.nextNode()) !== null && a.length < h; ) {
288
+ if (i.nodeType === 1) {
289
+ if (i.hasAttributes()) for (const c of i.getAttributeNames()) if (c.endsWith(et)) {
290
+ const f = u[r++], $ = i.getAttribute(c).split(v), M = /([.?@])?(.*)/.exec(f);
291
+ a.push({ type: 1, index: n, name: M[2], strings: $, ctor: M[1] === "." ? At : M[1] === "?" ? wt : M[1] === "@" ? Et : z }), i.removeAttribute(c);
292
+ } else c.startsWith(v) && (a.push({ type: 6, index: n }), i.removeAttribute(c));
293
+ if (it.test(i.tagName)) {
294
+ const c = i.textContent.split(v), f = c.length - 1;
295
+ if (f > 0) {
296
+ i.textContent = T ? T.emptyScript : "";
297
+ for (let $ = 0; $ < f; $++) i.append(c[$], k()), m.nextNode(), a.push({ type: 2, index: ++n });
298
+ i.append(c[f], k());
299
+ }
300
+ }
301
+ } else if (i.nodeType === 8) if (i.data === st) a.push({ type: 2, index: n });
302
+ else {
303
+ let c = -1;
304
+ for (; (c = i.data.indexOf(v, c + 1)) !== -1; ) a.push({ type: 7, index: n }), c += v.length - 1;
305
+ }
306
+ n++;
307
+ }
308
+ }
309
+ static createElement(t, e) {
310
+ const s = g.createElement("template");
311
+ return s.innerHTML = t, s;
312
+ }
313
+ }
314
+ function E(o, t, e = o, s) {
315
+ if (t === w) return t;
316
+ let i = s !== void 0 ? e._$Co?.[s] : e._$Cl;
317
+ const n = P(t) ? void 0 : t._$litDirective$;
318
+ return i?.constructor !== n && (i?._$AO?.(!1), n === void 0 ? i = void 0 : (i = new n(o), i._$AT(o, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = i : e._$Cl = i), i !== void 0 && (t = E(o, i._$AS(o, t.values), i, s)), t;
319
+ }
320
+ class gt {
321
+ constructor(t, e) {
322
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
323
+ }
324
+ get parentNode() {
325
+ return this._$AM.parentNode;
326
+ }
327
+ get _$AU() {
328
+ return this._$AM._$AU;
329
+ }
330
+ u(t) {
331
+ const { el: { content: e }, parts: s } = this._$AD, i = (t?.creationScope ?? g).importNode(e, !0);
332
+ m.currentNode = i;
333
+ let n = m.nextNode(), r = 0, h = 0, a = s[0];
334
+ for (; a !== void 0; ) {
335
+ if (r === a.index) {
336
+ let l;
337
+ a.type === 2 ? l = new U(n, n.nextSibling, this, t) : a.type === 1 ? l = new a.ctor(n, a.name, a.strings, this, t) : a.type === 6 && (l = new xt(n, this, t)), this._$AV.push(l), a = s[++h];
338
+ }
339
+ r !== a?.index && (n = m.nextNode(), r++);
340
+ }
341
+ return m.currentNode = g, i;
342
+ }
343
+ p(t) {
344
+ let e = 0;
345
+ for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
346
+ }
347
+ }
348
+ class U {
349
+ get _$AU() {
350
+ return this._$AM?._$AU ?? this._$Cv;
351
+ }
352
+ constructor(t, e, s, i) {
353
+ this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = i?.isConnected ?? !0;
354
+ }
355
+ get parentNode() {
356
+ let t = this._$AA.parentNode;
357
+ const e = this._$AM;
358
+ return e !== void 0 && t?.nodeType === 11 && (t = e.parentNode), t;
359
+ }
360
+ get startNode() {
361
+ return this._$AA;
362
+ }
363
+ get endNode() {
364
+ return this._$AB;
365
+ }
366
+ _$AI(t, e = this) {
367
+ t = E(this, t, e), P(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== w && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : vt(t) ? this.k(t) : this._(t);
368
+ }
369
+ O(t) {
370
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
371
+ }
372
+ T(t) {
373
+ this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
374
+ }
375
+ _(t) {
376
+ this._$AH !== d && P(this._$AH) ? this._$AA.nextSibling.data = t : this.T(g.createTextNode(t)), this._$AH = t;
377
+ }
378
+ $(t) {
379
+ const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = O.createElement(ot(s.h, s.h[0]), this.options)), s);
380
+ if (this._$AH?._$AD === i) this._$AH.p(e);
381
+ else {
382
+ const n = new gt(i, this), r = n.u(this.options);
383
+ n.p(e), this.T(r), this._$AH = n;
384
+ }
385
+ }
386
+ _$AC(t) {
387
+ let e = Y.get(t.strings);
388
+ return e === void 0 && Y.set(t.strings, e = new O(t)), e;
389
+ }
390
+ k(t) {
391
+ B(this._$AH) || (this._$AH = [], this._$AR());
392
+ const e = this._$AH;
393
+ let s, i = 0;
394
+ for (const n of t) i === e.length ? e.push(s = new U(this.O(k()), this.O(k()), this, this.options)) : s = e[i], s._$AI(n), i++;
395
+ i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
396
+ }
397
+ _$AR(t = this._$AA.nextSibling, e) {
398
+ for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
399
+ const s = t.nextSibling;
400
+ t.remove(), t = s;
401
+ }
402
+ }
403
+ setConnected(t) {
404
+ this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
405
+ }
406
+ }
407
+ class z {
408
+ get tagName() {
409
+ return this.element.tagName;
410
+ }
411
+ get _$AU() {
412
+ return this._$AM._$AU;
413
+ }
414
+ constructor(t, e, s, i, n) {
415
+ this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = d;
416
+ }
417
+ _$AI(t, e = this, s, i) {
418
+ const n = this.strings;
419
+ let r = !1;
420
+ if (n === void 0) t = E(this, t, e, 0), r = !P(t) || t !== this._$AH && t !== w, r && (this._$AH = t);
421
+ else {
422
+ const h = t;
423
+ let a, l;
424
+ for (t = n[0], a = 0; a < n.length - 1; a++) l = E(this, h[s + a], e, a), l === w && (l = this._$AH[a]), r ||= !P(l) || l !== this._$AH[a], l === d ? t = d : t !== d && (t += (l ?? "") + n[a + 1]), this._$AH[a] = l;
425
+ }
426
+ r && !i && this.j(t);
427
+ }
428
+ j(t) {
429
+ t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
430
+ }
431
+ }
432
+ class At extends z {
433
+ constructor() {
434
+ super(...arguments), this.type = 3;
435
+ }
436
+ j(t) {
437
+ this.element[this.name] = t === d ? void 0 : t;
438
+ }
439
+ }
440
+ class wt extends z {
441
+ constructor() {
442
+ super(...arguments), this.type = 4;
443
+ }
444
+ j(t) {
445
+ this.element.toggleAttribute(this.name, !!t && t !== d);
446
+ }
447
+ }
448
+ class Et extends z {
449
+ constructor(t, e, s, i, n) {
450
+ super(t, e, s, i, n), this.type = 5;
451
+ }
452
+ _$AI(t, e = this) {
453
+ if ((t = E(this, t, e, 0) ?? d) === w) return;
454
+ const s = this._$AH, i = t === d && s !== d || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== d && (s === d || i);
455
+ i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
456
+ }
457
+ handleEvent(t) {
458
+ typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
459
+ }
460
+ }
461
+ class xt {
462
+ constructor(t, e, s) {
463
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
464
+ }
465
+ get _$AU() {
466
+ return this._$AM._$AU;
467
+ }
468
+ _$AI(t) {
469
+ E(this, t);
470
+ }
471
+ }
472
+ const St = I.litHtmlPolyfillSupport;
473
+ St?.(O, U), (I.litHtmlVersions ??= []).push("3.3.1");
474
+ const Ct = (o, t, e) => {
475
+ const s = e?.renderBefore ?? t;
476
+ let i = s._$litPart$;
477
+ if (i === void 0) {
478
+ const n = e?.renderBefore ?? null;
479
+ s._$litPart$ = i = new U(t.insertBefore(k(), n), n, void 0, e ?? {});
480
+ }
481
+ return i._$AI(o), i;
482
+ };
483
+ /**
484
+ * @license
485
+ * Copyright 2017 Google LLC
486
+ * SPDX-License-Identifier: BSD-3-Clause
487
+ */
488
+ const q = globalThis;
489
+ class C extends A {
490
+ constructor() {
491
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
492
+ }
493
+ createRenderRoot() {
494
+ const t = super.createRenderRoot();
495
+ return this.renderOptions.renderBefore ??= t.firstChild, t;
496
+ }
497
+ update(t) {
498
+ const e = this.render();
499
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ct(e, this.renderRoot, this.renderOptions);
500
+ }
501
+ connectedCallback() {
502
+ super.connectedCallback(), this._$Do?.setConnected(!0);
503
+ }
504
+ disconnectedCallback() {
505
+ super.disconnectedCallback(), this._$Do?.setConnected(!1);
506
+ }
507
+ render() {
508
+ return w;
509
+ }
510
+ }
511
+ C._$litElement$ = !0, C.finalized = !0, q.litElementHydrateSupport?.({ LitElement: C });
512
+ const kt = q.litElementPolyfillSupport;
513
+ kt?.({ LitElement: C });
514
+ (q.litElementVersions ??= []).push("4.2.1");
515
+ /**
516
+ * @license
517
+ * Copyright 2017 Google LLC
518
+ * SPDX-License-Identifier: BSD-3-Clause
519
+ */
520
+ const Pt = (o) => (t, e) => {
521
+ e !== void 0 ? e.addInitializer((() => {
522
+ customElements.get(o) || customElements.define(o, t);
523
+ })) : (customElements.get(o) || customElements.define(o, t));
524
+ };
525
+ /**
526
+ * @license
527
+ * Copyright 2017 Google LLC
528
+ * SPDX-License-Identifier: BSD-3-Clause
529
+ */
530
+ const Ot = { attribute: !0, type: String, converter: N, reflect: !1, hasChanged: L }, Ut = (o = Ot, t, e) => {
531
+ const { kind: s, metadata: i } = e;
532
+ let n = globalThis.litPropertyMetadata.get(i);
533
+ if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), s === "setter" && ((o = Object.create(o)).wrapped = !0), n.set(e.name, o), s === "accessor") {
534
+ const { name: r } = e;
535
+ return { set(h) {
536
+ const a = t.get.call(this);
537
+ t.set.call(this, h), this.requestUpdate(r, a, o);
538
+ }, init(h) {
539
+ return h !== void 0 && this.C(r, void 0, o, h), h;
540
+ } };
541
+ }
542
+ if (s === "setter") {
543
+ const { name: r } = e;
544
+ return function(h) {
545
+ const a = this[r];
546
+ t.call(this, h), this.requestUpdate(r, a, o);
547
+ };
548
+ }
549
+ throw Error("Unsupported decorator location: " + s);
550
+ };
551
+ function _(o) {
552
+ return (t, e) => typeof e == "object" ? Ut(o, t, e) : ((s, i, n) => {
553
+ const r = i.hasOwnProperty(n);
554
+ return i.constructor.createProperty(n, s), r ? Object.getOwnPropertyDescriptor(i, n) : void 0;
555
+ })(o, t, e);
556
+ }
557
+ var Mt = Object.defineProperty, Ht = Object.getOwnPropertyDescriptor, b = (o, t, e, s) => {
558
+ for (var i = s > 1 ? void 0 : s ? Ht(t, e) : t, n = o.length - 1, r; n >= 0; n--)
559
+ (r = o[n]) && (i = (s ? r(t, e, i) : r(i)) || i);
560
+ return s && i && Mt(t, e, i), i;
561
+ };
562
+ let p = class extends C {
563
+ constructor() {
564
+ super(...arguments), this.variant = "primary", this.size = "default", this.type = "circle", this.state = "default", this.iconName = "home", this.disabled = !1, this.buttonAriaLabel = "Icon button";
565
+ }
566
+ createRenderRoot() {
567
+ return this;
568
+ }
569
+ connectedCallback() {
570
+ if (super.connectedCallback(), !document.querySelector('link[href*="Roboto"]')) {
571
+ const o = document.createElement("link");
572
+ o.rel = "stylesheet", o.href = "https://ui.renaissance.com/fonts/Roboto/style.css", document.head.appendChild(o);
573
+ }
574
+ }
575
+ set shape(o) {
576
+ this.type = o;
577
+ }
578
+ get shape() {
579
+ return this.type;
580
+ }
581
+ get buttonClasses() {
582
+ return [
583
+ "nds-icon-button",
584
+ `nds-icon-button--${this.variant}`,
585
+ `nds-icon-button--${this.size}`,
586
+ `nds-icon-button--${this.type}`,
587
+ this.state !== "default" ? `nds-icon-button--${this.state}` : "",
588
+ this.disabled ? "nds-icon-button--disabled" : ""
589
+ ].filter(Boolean).join(" ");
590
+ }
591
+ handleClick(o) {
592
+ if (this.disabled) {
593
+ o.preventDefault(), o.stopPropagation();
594
+ return;
595
+ }
596
+ this.dispatchEvent(new CustomEvent("icon-button-click", {
597
+ bubbles: !0,
598
+ composed: !0,
599
+ detail: { originalEvent: o }
600
+ }));
601
+ }
602
+ render() {
603
+ return yt`
604
+ <style>
605
+ nds-icon-button {
606
+ display: inline-block;
607
+ }
608
+
609
+ .nds-icon-button {
610
+ display: inline-flex;
611
+ align-items: center;
612
+ justify-content: center;
613
+ cursor: pointer;
614
+ font-family: var(--font-family-roboto, "Roboto", sans-serif);
615
+ font-weight: var(--font-weight-regular, 400);
616
+ line-height: 1;
617
+ text-decoration: none;
618
+ background: none;
619
+ position: relative;
620
+ box-sizing: border-box;
621
+ margin: 0;
622
+ padding: 0;
623
+ border: none;
624
+ transition: background-color 0.2s ease-in-out,
625
+ color 0.2s ease-in-out,
626
+ box-shadow 0.2s ease-in-out;
627
+ }
628
+
629
+ /* ── Sizes ── */
630
+ .nds-icon-button--small {
631
+ width: var(--height-32, 32px);
632
+ height: var(--height-32, 32px);
633
+ }
634
+
635
+ .nds-icon-button--medium {
636
+ width: var(--height-36, 36px);
637
+ height: var(--height-36, 36px);
638
+ }
639
+
640
+ .nds-icon-button--default {
641
+ width: var(--height-40, 40px);
642
+ height: var(--height-40, 40px);
643
+ }
644
+
645
+ .nds-icon-button--large {
646
+ width: var(--height-48, 48px);
647
+ height: var(--height-48, 48px);
648
+ }
649
+
650
+ /* ── Shapes ── */
651
+ .nds-icon-button--circle {
652
+ border-radius: var(--radius-circle, 50%);
653
+ }
654
+
655
+ .nds-icon-button--rounded {
656
+ border-radius: var(--radius-8, 8px);
657
+ }
658
+
659
+ /* ── Primary ── */
660
+ .nds-icon-button--primary {
661
+ background-color: var(--color-interactive-blue, #146eb3);
662
+ color: var(--color-primary-white, #ffffff);
663
+ }
664
+
665
+ .nds-icon-button--primary:hover:not(:disabled):not(.nds-icon-button--disabled) {
666
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
667
+ }
668
+
669
+ .nds-icon-button--primary:active:not(:disabled):not(.nds-icon-button--disabled) {
670
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
671
+ }
672
+
673
+ /* ── Secondary ── */
674
+ .nds-icon-button--secondary {
675
+ background-color: var(--color-primary-white, #ffffff);
676
+ color: var(--color-interactive-blue, #146eb3);
677
+ box-shadow: inset 0 0 0 var(--stroke-1, 1px) var(--color-interactive-blue, #146eb3);
678
+ }
679
+
680
+ .nds-icon-button--secondary:hover:not(:disabled):not(.nds-icon-button--disabled) {
681
+ background-color: var(--color-interactive-blue, #146eb3);
682
+ color: var(--color-primary-white, #ffffff);
683
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
684
+ }
685
+
686
+ .nds-icon-button--secondary:active:not(:disabled):not(.nds-icon-button--disabled) {
687
+ background-color: var(--color-interactive-blue, #146eb3);
688
+ color: var(--color-primary-white, #ffffff);
689
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
690
+ }
691
+
692
+ /* ── Tertiary ── */
693
+ .nds-icon-button--tertiary {
694
+ background-color: var(--color-new-gray, #f3f5f7);
695
+ color: var(--color-interactive-blue, #146eb3);
696
+ }
697
+
698
+ .nds-icon-button--tertiary:hover:not(:disabled):not(.nds-icon-button--disabled) {
699
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-interactive-blue, #146eb3);
700
+ }
701
+
702
+ .nds-icon-button--tertiary:active:not(:disabled):not(.nds-icon-button--disabled) {
703
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
704
+ }
705
+
706
+ /* ── Ghost ── */
707
+ .nds-icon-button--ghost {
708
+ background-color: transparent;
709
+ color: var(--color-interactive-blue, #146eb3);
710
+ }
711
+
712
+ .nds-icon-button--ghost:hover:not(:disabled):not(.nds-icon-button--disabled) {
713
+ background-color: var(--color-new-gray, #f3f5f7);
714
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-interactive-blue, #146eb3);
715
+ }
716
+
717
+ .nds-icon-button--ghost:active:not(:disabled):not(.nds-icon-button--disabled) {
718
+ background-color: var(--color-new-gray, #f3f5f7);
719
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-black, #000000);
720
+ }
721
+
722
+ /* ── Dark (for dark backgrounds) ── */
723
+ .nds-icon-button--dark {
724
+ background-color: transparent;
725
+ color: var(--color-primary-white, #ffffff);
726
+ box-shadow: inset 0 0 0 var(--stroke-1, 1px) var(--color-primary-white, #ffffff);
727
+ }
728
+
729
+ .nds-icon-button--dark:hover:not(:disabled):not(.nds-icon-button--disabled) {
730
+ background-color: var(--color-interactive-blue, #146eb3);
731
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-white, #ffffff);
732
+ }
733
+
734
+ .nds-icon-button--dark:active:not(:disabled):not(.nds-icon-button--disabled) {
735
+ background-color: var(--color-interactive-blue, #146eb3);
736
+ box-shadow: inset 0 0 0 var(--stroke-2, 2px) var(--color-primary-white, #ffffff);
737
+ }
738
+
739
+ /* ── Disabled ── */
740
+ .nds-icon-button--disabled,
741
+ .nds-icon-button:disabled {
742
+ opacity: 0.5;
743
+ cursor: not-allowed;
744
+ }
745
+
746
+ /* ── Icon sizing ── */
747
+ .nds-icon-button__icon {
748
+ line-height: 1;
749
+ display: inline-flex;
750
+ align-items: center;
751
+ justify-content: center;
752
+ color: inherit;
753
+ }
754
+
755
+ .nds-icon-button--small .nds-icon-button__icon {
756
+ font-size: var(--nds-icon-small, 12px);
757
+ }
758
+
759
+ .nds-icon-button--medium .nds-icon-button__icon {
760
+ font-size: var(--nds-icon-medium, 14px);
761
+ }
762
+
763
+ .nds-icon-button--default .nds-icon-button__icon {
764
+ font-size: var(--nds-icon-default, 16px);
765
+ }
766
+
767
+ .nds-icon-button--large .nds-icon-button__icon {
768
+ font-size: var(--nds-icon-large, 20px);
769
+ }
770
+
771
+ /* ── Focus ── */
772
+ .nds-icon-button:focus-visible {
773
+ outline: 2px solid var(--color-focus-blue, #2b87ff);
774
+ outline-offset: 2px;
775
+ }
776
+
777
+ /* ── Reduced motion ── */
778
+ @media (prefers-reduced-motion: reduce) {
779
+ .nds-icon-button {
780
+ transition: none;
781
+ }
782
+ }
783
+ </style>
784
+ <button
785
+ type="button"
786
+ class="${this.buttonClasses}"
787
+ ?disabled="${this.disabled}"
788
+ aria-disabled="${this.disabled ? "true" : "false"}"
789
+ aria-label="${this.buttonAriaLabel}"
790
+ @click="${this.handleClick}"
791
+ >
792
+ <i class="fa-light fa-${this.iconName} nds-icon-button__icon" aria-hidden="true"></i>
793
+ </button>
794
+ `;
795
+ }
796
+ };
797
+ b([
798
+ _()
799
+ ], p.prototype, "variant", 2);
800
+ b([
801
+ _()
802
+ ], p.prototype, "size", 2);
803
+ b([
804
+ _()
805
+ ], p.prototype, "type", 2);
806
+ b([
807
+ _()
808
+ ], p.prototype, "state", 2);
809
+ b([
810
+ _({ attribute: "icon-name" })
811
+ ], p.prototype, "iconName", 2);
812
+ b([
813
+ _({ type: Boolean })
814
+ ], p.prototype, "disabled", 2);
815
+ b([
816
+ _({ attribute: "button-aria-label" })
817
+ ], p.prototype, "buttonAriaLabel", 2);
818
+ b([
819
+ _()
820
+ ], p.prototype, "shape", 1);
821
+ p = b([
822
+ Pt("nds-icon-button")
823
+ ], p);
824
+ export {
825
+ p as NdsIconButton
826
+ };