@oslokommune/punkt-elements 12.42.12 → 12.43.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/CHANGELOG.md +17 -0
- package/dist/{accordionitem-Be6vyX31.js → accordionitem-C9FI-NXW.js} +7 -8
- package/dist/{accordionitem-ogt0KNGP.cjs → accordionitem-DjAWPtsn.cjs} +5 -5
- package/dist/{alert-CZyqekhG.js → alert-B0OUR9oD.js} +21 -22
- package/dist/alert-BH0lJ2ny.cjs +32 -0
- package/dist/{backlink-C3dfam09.js → backlink-B13JTp9D.js} +11 -12
- package/dist/backlink-C5jQRMwJ.cjs +13 -0
- package/dist/button-CDocR7iN.cjs +19 -0
- package/dist/{button-OoC1RGJL.js → button-DrrEvUy9.js} +7 -8
- package/dist/calendar-BZe2D4Sr.cjs +108 -0
- package/dist/{calendar-qEV4u3xs.js → calendar-DevQhOup.js} +10 -11
- package/dist/{card-CJue0Esh.cjs → card-Bx36j0q4.cjs} +1 -1
- package/dist/{card-p-fcc7Wh.js → card-Djnd-pgo.js} +8 -9
- package/dist/{checkbox-iLywLQwL.cjs → checkbox-CJ4tK9RC.cjs} +1 -1
- package/dist/{checkbox-BLI7dfpW.js → checkbox-cD_5LDzV.js} +4 -4
- package/dist/{class-map-dph2jLEp.cjs → class-map-BBG2gMX4.cjs} +1 -1
- package/dist/{class-map-DO0E7GkW.js → class-map-BpTj9gtz.js} +1 -1
- package/dist/{combobox-BJOVpwAW.cjs → combobox-Cv6i7BEk.cjs} +1 -1
- package/dist/{combobox-C_Zj-ZxE.js → combobox-kWGI4RHI.js} +11 -11
- package/dist/{consent-C0pd0E2Q.js → consent-CftYu8Di.js} +5 -6
- package/dist/consent-DrS71kvz.cjs +11 -0
- package/dist/{datepicker--I3DF-Ci.cjs → datepicker-BJe92Vor.cjs} +1 -1
- package/dist/{datepicker-Y6-ORa5u.js → datepicker-LpbYHx8L.js} +11 -11
- package/dist/{directive-helpers-lOXMtxMR.cjs → directive-helpers-BBbxqP2W.cjs} +2 -2
- package/dist/{directive-helpers-D2BEk_ct.js → directive-helpers-r-kOS_Mf.js} +1 -1
- package/dist/element-6DBpyGQm.cjs +238 -0
- package/dist/{element-Cfyyg4nF.js → element-CgEWt74-.js} +9272 -9157
- package/dist/heading-BRE_iFtR.cjs +1 -0
- package/dist/{heading-BWV1JThP.js → heading-D6jXE_Mz.js} +4 -4
- package/dist/{helptext-C7oP6VRp.js → helptext-B7eI0iBQ.js} +18 -19
- package/dist/helptext-CzQX6YVE.cjs +24 -0
- package/dist/{icon-RJ9Op-BB.cjs → icon-B_ryAy4Q.cjs} +3 -3
- package/dist/{icon-DPnB79MP.js → icon-CC1js8eR.js} +11 -12
- package/dist/{if-defined-I-IZkUY2.js → if-defined-CmuO4Vz9.js} +1 -1
- package/dist/if-defined-Cni-RHLS.cjs +5 -0
- package/dist/index.d.ts +27 -27
- package/dist/input-element-CHjLWeKt.cjs +1 -0
- package/dist/input-element-Cco4PA2M.js +700 -0
- package/dist/{input-wrapper-DrJgi10C.cjs → input-wrapper-BxZf8wEP.cjs} +4 -4
- package/dist/{input-wrapper-BDm0DwAW.js → input-wrapper-gz7ppKrK.js} +13 -14
- package/dist/{link-BzKHhT3c.js → link-C76H6Qf1.js} +11 -12
- package/dist/link-DTkjNlmy.cjs +7 -0
- package/dist/{linkcard-CyepaY-g.js → linkcard-BVEsUPwG.js} +13 -14
- package/dist/{linkcard-Czsb01sQ.cjs → linkcard-BlMhPNry.cjs} +1 -1
- package/dist/{listbox-BIcmMiAK.cjs → listbox-C4supLfR.cjs} +7 -7
- package/dist/{listbox-Br7v_BsA.js → listbox-CLsSW32I.js} +10 -11
- package/dist/loader-CHPxY9c6.cjs +11 -0
- package/dist/{loader-Co35Rkbv.js → loader-Da4IOk_T.js} +15 -16
- package/dist/messagebox-CqUBJs_D.cjs +12 -0
- package/dist/{messagebox-CQXmoqzD.js → messagebox-DwGdcdm7.js} +17 -18
- package/dist/modal-BdA5aWGU.cjs +36 -0
- package/dist/{modal-DuubDFPT.js → modal-DcXPnFus.js} +26 -27
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +2 -2
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +1 -1
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +1 -1
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +1 -1
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.js +1 -1
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +1 -1
- package/dist/pkt-index.cjs +3 -3
- package/dist/pkt-index.js +62 -63
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +1 -1
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +1 -1
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +1 -1
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +1 -1
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +2 -2
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +1 -1
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/{progressbar-DF8IG5IY.cjs → progressbar-DhMBXkww.cjs} +7 -7
- package/dist/{progressbar-B75UwwRZ.js → progressbar-Dj_mI_A6.js} +13 -14
- package/dist/{radiobutton-DUpADoLc.cjs → radiobutton-0vVqu-GU.cjs} +1 -1
- package/dist/{radiobutton-CDO-HMP_.js → radiobutton-BcFRJFvI.js} +5 -5
- package/dist/{ref-DX488m2G.js → ref-BBYSqgeW.js} +2 -2
- package/dist/{ref-BMQZJJEo.cjs → ref-iJtiv3o2.cjs} +1 -1
- package/dist/{repeat-Dl4RVQIF.js → repeat-C8BeHwYx.js} +2 -2
- package/dist/{repeat-B93vZu9q.cjs → repeat-CDsZqct8.cjs} +1 -1
- package/dist/{select-q7qkLeW4.js → select-BaLHLuvH.js} +20 -20
- package/dist/select-CFpdOlDE.cjs +48 -0
- package/dist/{state-P2J1I2ny.js → state-Bo2bck5_.js} +1 -1
- package/dist/{state-y-GU-VH8.cjs → state-DPobt-Yz.cjs} +1 -1
- package/dist/{tag-OSIRLJc0.js → tag-BWm6s48d.js} +20 -21
- package/dist/tag-DPk3fpEg.cjs +18 -0
- package/dist/{textarea-BuhpS5Jj.cjs → textarea-CViiuZdR.cjs} +1 -1
- package/dist/{textarea-BIvwbRBK.js → textarea-EIFo7GZz.js} +22 -22
- package/dist/{textinput-BFbenR3I.js → textinput-BHS7b-Jt.js} +8 -8
- package/dist/{textinput-BUMlqXQC.cjs → textinput-_ZdyMA9O.cjs} +1 -1
- package/package.json +4 -4
- package/src/components/heading/heading.ts +3 -2
- package/dist/alert-DifeONO7.cjs +0 -32
- package/dist/backlink-C9qmM67k.cjs +0 -13
- package/dist/button-zO41ySZl.cjs +0 -19
- package/dist/calendar-BYYJH15O.cjs +0 -108
- package/dist/consent-BkgHuZ37.cjs +0 -11
- package/dist/element-DUJa1sRq.cjs +0 -212
- package/dist/heading-C6U6xiqH.cjs +0 -1
- package/dist/helptext-BxHMB-XH.cjs +0 -24
- package/dist/if-defined-BQOEcjlp.cjs +0 -5
- package/dist/input-element-B2JauW-Y.cjs +0 -1
- package/dist/input-element-CaCDNzdI.js +0 -230
- package/dist/link-Dhs4dS0S.cjs +0 -7
- package/dist/lit-element-DHqqtYbj.cjs +0 -27
- package/dist/lit-element-DcUrSbRH.js +0 -595
- package/dist/loader-5lt2W9RX.cjs +0 -11
- package/dist/messagebox-BSUbetVQ.cjs +0 -12
- package/dist/modal-5PZ-TDkV.cjs +0 -36
- package/dist/select-CE5L--Xw.cjs +0 -48
- package/dist/tag-sEPrma2U.cjs +0 -18
|
@@ -1,595 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2017 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/
|
|
6
|
-
const C = globalThis, N = C.trustedTypes, W = N ? N.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, et = "$lit$", _ = `lit$${Math.random().toFixed(9).slice(2)}$`, st = "?" + _, ot = `<${st}>`, g = document, U = () => g.createComment(""), x = (r) => r === null || typeof r != "object" && typeof r != "function", I = Array.isArray, ht = (r) => I(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", D = `[
|
|
7
|
-
\f\r]`, w = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, V = /-->/g, Z = />/g, A = RegExp(`>|${D}(?:([^\\s"'>=/]+)(${D}*=${D}*(?:[^
|
|
8
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), J = /'/g, K = /"/g, it = /^(?:script|style|textarea|title)$/i, at = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), Ut = at(1), E = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), F = /* @__PURE__ */ new WeakMap(), m = g.createTreeWalker(g, 129);
|
|
9
|
-
function rt(r, t) {
|
|
10
|
-
if (!I(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
11
|
-
return W !== void 0 ? W.createHTML(t) : t;
|
|
12
|
-
}
|
|
13
|
-
const lt = (r, t) => {
|
|
14
|
-
const e = r.length - 1, s = [];
|
|
15
|
-
let i, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = w;
|
|
16
|
-
for (let a = 0; a < e; a++) {
|
|
17
|
-
const h = r[a];
|
|
18
|
-
let c, p, l = -1, u = 0;
|
|
19
|
-
for (; u < h.length && (o.lastIndex = u, p = o.exec(h), p !== null); ) u = o.lastIndex, o === w ? p[1] === "!--" ? o = V : p[1] !== void 0 ? o = Z : p[2] !== void 0 ? (it.test(p[2]) && (i = RegExp("</" + p[2], "g")), o = A) : p[3] !== void 0 && (o = A) : o === A ? p[0] === ">" ? (o = i ?? w, l = -1) : p[1] === void 0 ? l = -2 : (l = o.lastIndex - p[2].length, c = p[1], o = p[3] === void 0 ? A : p[3] === '"' ? K : J) : o === K || o === J ? o = A : o === V || o === Z ? o = w : (o = A, i = void 0);
|
|
20
|
-
const $ = o === A && r[a + 1].startsWith("/>") ? " " : "";
|
|
21
|
-
n += o === w ? h + ot : l >= 0 ? (s.push(c), h.slice(0, l) + et + h.slice(l) + _ + $) : h + _ + (l === -2 ? a : $);
|
|
22
|
-
}
|
|
23
|
-
return [rt(r, n + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
24
|
-
};
|
|
25
|
-
class O {
|
|
26
|
-
constructor({ strings: t, _$litType$: e }, s) {
|
|
27
|
-
let i;
|
|
28
|
-
this.parts = [];
|
|
29
|
-
let n = 0, o = 0;
|
|
30
|
-
const a = t.length - 1, h = this.parts, [c, p] = lt(t, e);
|
|
31
|
-
if (this.el = O.createElement(c, s), m.currentNode = this.el.content, e === 2 || e === 3) {
|
|
32
|
-
const l = this.el.content.firstChild;
|
|
33
|
-
l.replaceWith(...l.childNodes);
|
|
34
|
-
}
|
|
35
|
-
for (; (i = m.nextNode()) !== null && h.length < a; ) {
|
|
36
|
-
if (i.nodeType === 1) {
|
|
37
|
-
if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(et)) {
|
|
38
|
-
const u = p[o++], $ = i.getAttribute(l).split(_), M = /([.?@])?(.*)/.exec(u);
|
|
39
|
-
h.push({ type: 1, index: n, name: M[2], strings: $, ctor: M[1] === "." ? dt : M[1] === "?" ? pt : M[1] === "@" ? ut : k }), i.removeAttribute(l);
|
|
40
|
-
} else l.startsWith(_) && (h.push({ type: 6, index: n }), i.removeAttribute(l));
|
|
41
|
-
if (it.test(i.tagName)) {
|
|
42
|
-
const l = i.textContent.split(_), u = l.length - 1;
|
|
43
|
-
if (u > 0) {
|
|
44
|
-
i.textContent = N ? N.emptyScript : "";
|
|
45
|
-
for (let $ = 0; $ < u; $++) i.append(l[$], U()), m.nextNode(), h.push({ type: 2, index: ++n });
|
|
46
|
-
i.append(l[u], U());
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
} else if (i.nodeType === 8) if (i.data === st) h.push({ type: 2, index: n });
|
|
50
|
-
else {
|
|
51
|
-
let l = -1;
|
|
52
|
-
for (; (l = i.data.indexOf(_, l + 1)) !== -1; ) h.push({ type: 7, index: n }), l += _.length - 1;
|
|
53
|
-
}
|
|
54
|
-
n++;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
static createElement(t, e) {
|
|
58
|
-
const s = g.createElement("template");
|
|
59
|
-
return s.innerHTML = t, s;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
function S(r, t, e = r, s) {
|
|
63
|
-
var o, a;
|
|
64
|
-
if (t === E) return t;
|
|
65
|
-
let i = s !== void 0 ? (o = e._$Co) == null ? void 0 : o[s] : e._$Cl;
|
|
66
|
-
const n = x(t) ? void 0 : t._$litDirective$;
|
|
67
|
-
return (i == null ? void 0 : i.constructor) !== n && ((a = i == null ? void 0 : i._$AO) == null || a.call(i, !1), n === void 0 ? i = void 0 : (i = new n(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = S(r, i._$AS(r, t.values), i, s)), t;
|
|
68
|
-
}
|
|
69
|
-
class ct {
|
|
70
|
-
constructor(t, e) {
|
|
71
|
-
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
72
|
-
}
|
|
73
|
-
get parentNode() {
|
|
74
|
-
return this._$AM.parentNode;
|
|
75
|
-
}
|
|
76
|
-
get _$AU() {
|
|
77
|
-
return this._$AM._$AU;
|
|
78
|
-
}
|
|
79
|
-
u(t) {
|
|
80
|
-
const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? g).importNode(e, !0);
|
|
81
|
-
m.currentNode = i;
|
|
82
|
-
let n = m.nextNode(), o = 0, a = 0, h = s[0];
|
|
83
|
-
for (; h !== void 0; ) {
|
|
84
|
-
if (o === h.index) {
|
|
85
|
-
let c;
|
|
86
|
-
h.type === 2 ? c = new b(n, n.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && (c = new $t(n, this, t)), this._$AV.push(c), h = s[++a];
|
|
87
|
-
}
|
|
88
|
-
o !== (h == null ? void 0 : h.index) && (n = m.nextNode(), o++);
|
|
89
|
-
}
|
|
90
|
-
return m.currentNode = g, i;
|
|
91
|
-
}
|
|
92
|
-
p(t) {
|
|
93
|
-
let e = 0;
|
|
94
|
-
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++;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
class b {
|
|
98
|
-
get _$AU() {
|
|
99
|
-
var t;
|
|
100
|
-
return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
|
|
101
|
-
}
|
|
102
|
-
constructor(t, e, s, i) {
|
|
103
|
-
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 == null ? void 0 : i.isConnected) ?? !0;
|
|
104
|
-
}
|
|
105
|
-
get parentNode() {
|
|
106
|
-
let t = this._$AA.parentNode;
|
|
107
|
-
const e = this._$AM;
|
|
108
|
-
return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
|
|
109
|
-
}
|
|
110
|
-
get startNode() {
|
|
111
|
-
return this._$AA;
|
|
112
|
-
}
|
|
113
|
-
get endNode() {
|
|
114
|
-
return this._$AB;
|
|
115
|
-
}
|
|
116
|
-
_$AI(t, e = this) {
|
|
117
|
-
t = S(this, t, e), x(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== E && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : ht(t) ? this.k(t) : this._(t);
|
|
118
|
-
}
|
|
119
|
-
O(t) {
|
|
120
|
-
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
121
|
-
}
|
|
122
|
-
T(t) {
|
|
123
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
124
|
-
}
|
|
125
|
-
_(t) {
|
|
126
|
-
this._$AH !== d && x(this._$AH) ? this._$AA.nextSibling.data = t : this.T(g.createTextNode(t)), this._$AH = t;
|
|
127
|
-
}
|
|
128
|
-
$(t) {
|
|
129
|
-
var n;
|
|
130
|
-
const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = O.createElement(rt(s.h, s.h[0]), this.options)), s);
|
|
131
|
-
if (((n = this._$AH) == null ? void 0 : n._$AD) === i) this._$AH.p(e);
|
|
132
|
-
else {
|
|
133
|
-
const o = new ct(i, this), a = o.u(this.options);
|
|
134
|
-
o.p(e), this.T(a), this._$AH = o;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
_$AC(t) {
|
|
138
|
-
let e = F.get(t.strings);
|
|
139
|
-
return e === void 0 && F.set(t.strings, e = new O(t)), e;
|
|
140
|
-
}
|
|
141
|
-
k(t) {
|
|
142
|
-
I(this._$AH) || (this._$AH = [], this._$AR());
|
|
143
|
-
const e = this._$AH;
|
|
144
|
-
let s, i = 0;
|
|
145
|
-
for (const n of t) i === e.length ? e.push(s = new b(this.O(U()), this.O(U()), this, this.options)) : s = e[i], s._$AI(n), i++;
|
|
146
|
-
i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
|
|
147
|
-
}
|
|
148
|
-
_$AR(t = this._$AA.nextSibling, e) {
|
|
149
|
-
var s;
|
|
150
|
-
for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
|
151
|
-
const i = t.nextSibling;
|
|
152
|
-
t.remove(), t = i;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
setConnected(t) {
|
|
156
|
-
var e;
|
|
157
|
-
this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
class k {
|
|
161
|
-
get tagName() {
|
|
162
|
-
return this.element.tagName;
|
|
163
|
-
}
|
|
164
|
-
get _$AU() {
|
|
165
|
-
return this._$AM._$AU;
|
|
166
|
-
}
|
|
167
|
-
constructor(t, e, s, i, n) {
|
|
168
|
-
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;
|
|
169
|
-
}
|
|
170
|
-
_$AI(t, e = this, s, i) {
|
|
171
|
-
const n = this.strings;
|
|
172
|
-
let o = !1;
|
|
173
|
-
if (n === void 0) t = S(this, t, e, 0), o = !x(t) || t !== this._$AH && t !== E, o && (this._$AH = t);
|
|
174
|
-
else {
|
|
175
|
-
const a = t;
|
|
176
|
-
let h, c;
|
|
177
|
-
for (t = n[0], h = 0; h < n.length - 1; h++) c = S(this, a[s + h], e, h), c === E && (c = this._$AH[h]), o || (o = !x(c) || c !== this._$AH[h]), c === d ? t = d : t !== d && (t += (c ?? "") + n[h + 1]), this._$AH[h] = c;
|
|
178
|
-
}
|
|
179
|
-
o && !i && this.j(t);
|
|
180
|
-
}
|
|
181
|
-
j(t) {
|
|
182
|
-
t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
class dt extends k {
|
|
186
|
-
constructor() {
|
|
187
|
-
super(...arguments), this.type = 3;
|
|
188
|
-
}
|
|
189
|
-
j(t) {
|
|
190
|
-
this.element[this.name] = t === d ? void 0 : t;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
class pt extends k {
|
|
194
|
-
constructor() {
|
|
195
|
-
super(...arguments), this.type = 4;
|
|
196
|
-
}
|
|
197
|
-
j(t) {
|
|
198
|
-
this.element.toggleAttribute(this.name, !!t && t !== d);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
class ut extends k {
|
|
202
|
-
constructor(t, e, s, i, n) {
|
|
203
|
-
super(t, e, s, i, n), this.type = 5;
|
|
204
|
-
}
|
|
205
|
-
_$AI(t, e = this) {
|
|
206
|
-
if ((t = S(this, t, e, 0) ?? d) === E) return;
|
|
207
|
-
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);
|
|
208
|
-
i && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
209
|
-
}
|
|
210
|
-
handleEvent(t) {
|
|
211
|
-
var e;
|
|
212
|
-
typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
class $t {
|
|
216
|
-
constructor(t, e, s) {
|
|
217
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
|
218
|
-
}
|
|
219
|
-
get _$AU() {
|
|
220
|
-
return this._$AM._$AU;
|
|
221
|
-
}
|
|
222
|
-
_$AI(t) {
|
|
223
|
-
S(this, t);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
const xt = { I: b }, j = C.litHtmlPolyfillSupport;
|
|
227
|
-
j == null || j(O, b), (C.litHtmlVersions ?? (C.litHtmlVersions = [])).push("3.3.0");
|
|
228
|
-
const _t = (r, t, e) => {
|
|
229
|
-
const s = (e == null ? void 0 : e.renderBefore) ?? t;
|
|
230
|
-
let i = s._$litPart$;
|
|
231
|
-
if (i === void 0) {
|
|
232
|
-
const n = (e == null ? void 0 : e.renderBefore) ?? null;
|
|
233
|
-
s._$litPart$ = i = new b(t.insertBefore(U(), n), n, void 0, e ?? {});
|
|
234
|
-
}
|
|
235
|
-
return i._$AI(r), i;
|
|
236
|
-
};
|
|
237
|
-
/**
|
|
238
|
-
* @license
|
|
239
|
-
* Copyright 2017 Google LLC
|
|
240
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
241
|
-
*/
|
|
242
|
-
const Ot = (r) => (t, e) => {
|
|
243
|
-
e !== void 0 ? e.addInitializer(() => {
|
|
244
|
-
customElements.define(r, t);
|
|
245
|
-
}) : customElements.define(r, t);
|
|
246
|
-
};
|
|
247
|
-
/**
|
|
248
|
-
* @license
|
|
249
|
-
* Copyright 2019 Google LLC
|
|
250
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
251
|
-
*/
|
|
252
|
-
const H = globalThis, B = H.ShadowRoot && (H.ShadyCSS === void 0 || H.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, nt = Symbol(), G = /* @__PURE__ */ new WeakMap();
|
|
253
|
-
let ft = class {
|
|
254
|
-
constructor(t, e, s) {
|
|
255
|
-
if (this._$cssResult$ = !0, s !== nt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
256
|
-
this.cssText = t, this.t = e;
|
|
257
|
-
}
|
|
258
|
-
get styleSheet() {
|
|
259
|
-
let t = this.o;
|
|
260
|
-
const e = this.t;
|
|
261
|
-
if (B && t === void 0) {
|
|
262
|
-
const s = e !== void 0 && e.length === 1;
|
|
263
|
-
s && (t = G.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && G.set(e, t));
|
|
264
|
-
}
|
|
265
|
-
return t;
|
|
266
|
-
}
|
|
267
|
-
toString() {
|
|
268
|
-
return this.cssText;
|
|
269
|
-
}
|
|
270
|
-
};
|
|
271
|
-
const At = (r) => new ft(typeof r == "string" ? r : r + "", void 0, nt), mt = (r, t) => {
|
|
272
|
-
if (B) r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
|
|
273
|
-
else for (const e of t) {
|
|
274
|
-
const s = document.createElement("style"), i = H.litNonce;
|
|
275
|
-
i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
|
|
276
|
-
}
|
|
277
|
-
}, Q = B ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
|
|
278
|
-
let e = "";
|
|
279
|
-
for (const s of t.cssRules) e += s.cssText;
|
|
280
|
-
return At(e);
|
|
281
|
-
})(r) : r;
|
|
282
|
-
/**
|
|
283
|
-
* @license
|
|
284
|
-
* Copyright 2017 Google LLC
|
|
285
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
286
|
-
*/
|
|
287
|
-
const { is: yt, defineProperty: gt, getOwnPropertyDescriptor: vt, getOwnPropertyNames: Et, getOwnPropertySymbols: St, getPrototypeOf: bt } = Object, f = globalThis, X = f.trustedTypes, wt = X ? X.emptyScript : "", z = f.reactiveElementPolyfillSupport, P = (r, t) => r, R = { toAttribute(r, t) {
|
|
288
|
-
switch (t) {
|
|
289
|
-
case Boolean:
|
|
290
|
-
r = r ? wt : null;
|
|
291
|
-
break;
|
|
292
|
-
case Object:
|
|
293
|
-
case Array:
|
|
294
|
-
r = r == null ? r : JSON.stringify(r);
|
|
295
|
-
}
|
|
296
|
-
return r;
|
|
297
|
-
}, fromAttribute(r, t) {
|
|
298
|
-
let e = r;
|
|
299
|
-
switch (t) {
|
|
300
|
-
case Boolean:
|
|
301
|
-
e = r !== null;
|
|
302
|
-
break;
|
|
303
|
-
case Number:
|
|
304
|
-
e = r === null ? null : Number(r);
|
|
305
|
-
break;
|
|
306
|
-
case Object:
|
|
307
|
-
case Array:
|
|
308
|
-
try {
|
|
309
|
-
e = JSON.parse(r);
|
|
310
|
-
} catch {
|
|
311
|
-
e = null;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
return e;
|
|
315
|
-
} }, q = (r, t) => !yt(r, t), Y = { attribute: !0, type: String, converter: R, reflect: !1, useDefault: !1, hasChanged: q };
|
|
316
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), f.litPropertyMetadata ?? (f.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
317
|
-
class v extends HTMLElement {
|
|
318
|
-
static addInitializer(t) {
|
|
319
|
-
this._$Ei(), (this.l ?? (this.l = [])).push(t);
|
|
320
|
-
}
|
|
321
|
-
static get observedAttributes() {
|
|
322
|
-
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
323
|
-
}
|
|
324
|
-
static createProperty(t, e = Y) {
|
|
325
|
-
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) {
|
|
326
|
-
const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
|
|
327
|
-
i !== void 0 && gt(this.prototype, t, i);
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
static getPropertyDescriptor(t, e, s) {
|
|
331
|
-
const { get: i, set: n } = vt(this.prototype, t) ?? { get() {
|
|
332
|
-
return this[e];
|
|
333
|
-
}, set(o) {
|
|
334
|
-
this[e] = o;
|
|
335
|
-
} };
|
|
336
|
-
return { get: i, set(o) {
|
|
337
|
-
const a = i == null ? void 0 : i.call(this);
|
|
338
|
-
n == null || n.call(this, o), this.requestUpdate(t, a, s);
|
|
339
|
-
}, configurable: !0, enumerable: !0 };
|
|
340
|
-
}
|
|
341
|
-
static getPropertyOptions(t) {
|
|
342
|
-
return this.elementProperties.get(t) ?? Y;
|
|
343
|
-
}
|
|
344
|
-
static _$Ei() {
|
|
345
|
-
if (this.hasOwnProperty(P("elementProperties"))) return;
|
|
346
|
-
const t = bt(this);
|
|
347
|
-
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
348
|
-
}
|
|
349
|
-
static finalize() {
|
|
350
|
-
if (this.hasOwnProperty(P("finalized"))) return;
|
|
351
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(P("properties"))) {
|
|
352
|
-
const e = this.properties, s = [...Et(e), ...St(e)];
|
|
353
|
-
for (const i of s) this.createProperty(i, e[i]);
|
|
354
|
-
}
|
|
355
|
-
const t = this[Symbol.metadata];
|
|
356
|
-
if (t !== null) {
|
|
357
|
-
const e = litPropertyMetadata.get(t);
|
|
358
|
-
if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
|
|
359
|
-
}
|
|
360
|
-
this._$Eh = /* @__PURE__ */ new Map();
|
|
361
|
-
for (const [e, s] of this.elementProperties) {
|
|
362
|
-
const i = this._$Eu(e, s);
|
|
363
|
-
i !== void 0 && this._$Eh.set(i, e);
|
|
364
|
-
}
|
|
365
|
-
this.elementStyles = this.finalizeStyles(this.styles);
|
|
366
|
-
}
|
|
367
|
-
static finalizeStyles(t) {
|
|
368
|
-
const e = [];
|
|
369
|
-
if (Array.isArray(t)) {
|
|
370
|
-
const s = new Set(t.flat(1 / 0).reverse());
|
|
371
|
-
for (const i of s) e.unshift(Q(i));
|
|
372
|
-
} else t !== void 0 && e.push(Q(t));
|
|
373
|
-
return e;
|
|
374
|
-
}
|
|
375
|
-
static _$Eu(t, e) {
|
|
376
|
-
const s = e.attribute;
|
|
377
|
-
return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
378
|
-
}
|
|
379
|
-
constructor() {
|
|
380
|
-
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
381
|
-
}
|
|
382
|
-
_$Ev() {
|
|
383
|
-
var t;
|
|
384
|
-
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));
|
|
385
|
-
}
|
|
386
|
-
addController(t) {
|
|
387
|
-
var e;
|
|
388
|
-
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
|
389
|
-
}
|
|
390
|
-
removeController(t) {
|
|
391
|
-
var e;
|
|
392
|
-
(e = this._$EO) == null || e.delete(t);
|
|
393
|
-
}
|
|
394
|
-
_$E_() {
|
|
395
|
-
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
396
|
-
for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
|
|
397
|
-
t.size > 0 && (this._$Ep = t);
|
|
398
|
-
}
|
|
399
|
-
createRenderRoot() {
|
|
400
|
-
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
401
|
-
return mt(t, this.constructor.elementStyles), t;
|
|
402
|
-
}
|
|
403
|
-
connectedCallback() {
|
|
404
|
-
var t;
|
|
405
|
-
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
|
|
406
|
-
var s;
|
|
407
|
-
return (s = e.hostConnected) == null ? void 0 : s.call(e);
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
enableUpdating(t) {
|
|
411
|
-
}
|
|
412
|
-
disconnectedCallback() {
|
|
413
|
-
var t;
|
|
414
|
-
(t = this._$EO) == null || t.forEach((e) => {
|
|
415
|
-
var s;
|
|
416
|
-
return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
|
|
417
|
-
});
|
|
418
|
-
}
|
|
419
|
-
attributeChangedCallback(t, e, s) {
|
|
420
|
-
this._$AK(t, s);
|
|
421
|
-
}
|
|
422
|
-
_$ET(t, e) {
|
|
423
|
-
var n;
|
|
424
|
-
const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
|
|
425
|
-
if (i !== void 0 && s.reflect === !0) {
|
|
426
|
-
const o = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : R).toAttribute(e, s.type);
|
|
427
|
-
this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
_$AK(t, e) {
|
|
431
|
-
var n, o;
|
|
432
|
-
const s = this.constructor, i = s._$Eh.get(t);
|
|
433
|
-
if (i !== void 0 && this._$Em !== i) {
|
|
434
|
-
const a = s.getPropertyOptions(i), h = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((n = a.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? a.converter : R;
|
|
435
|
-
this._$Em = i, this[i] = h.fromAttribute(e, a.type) ?? ((o = this._$Ej) == null ? void 0 : o.get(i)) ?? null, this._$Em = null;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
requestUpdate(t, e, s) {
|
|
439
|
-
var i;
|
|
440
|
-
if (t !== void 0) {
|
|
441
|
-
const n = this.constructor, o = this[t];
|
|
442
|
-
if (s ?? (s = n.getPropertyOptions(t)), !((s.hasChanged ?? q)(o, e) || s.useDefault && s.reflect && o === ((i = this._$Ej) == null ? void 0 : i.get(t)) && !this.hasAttribute(n._$Eu(t, s)))) return;
|
|
443
|
-
this.C(t, e, s);
|
|
444
|
-
}
|
|
445
|
-
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
446
|
-
}
|
|
447
|
-
C(t, e, { useDefault: s, reflect: i, wrapped: n }, o) {
|
|
448
|
-
s && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, o ?? e ?? this[t]), n !== !0 || o !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
|
|
449
|
-
}
|
|
450
|
-
async _$EP() {
|
|
451
|
-
this.isUpdatePending = !0;
|
|
452
|
-
try {
|
|
453
|
-
await this._$ES;
|
|
454
|
-
} catch (e) {
|
|
455
|
-
Promise.reject(e);
|
|
456
|
-
}
|
|
457
|
-
const t = this.scheduleUpdate();
|
|
458
|
-
return t != null && await t, !this.isUpdatePending;
|
|
459
|
-
}
|
|
460
|
-
scheduleUpdate() {
|
|
461
|
-
return this.performUpdate();
|
|
462
|
-
}
|
|
463
|
-
performUpdate() {
|
|
464
|
-
var s;
|
|
465
|
-
if (!this.isUpdatePending) return;
|
|
466
|
-
if (!this.hasUpdated) {
|
|
467
|
-
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
468
|
-
for (const [n, o] of this._$Ep) this[n] = o;
|
|
469
|
-
this._$Ep = void 0;
|
|
470
|
-
}
|
|
471
|
-
const i = this.constructor.elementProperties;
|
|
472
|
-
if (i.size > 0) for (const [n, o] of i) {
|
|
473
|
-
const { wrapped: a } = o, h = this[n];
|
|
474
|
-
a !== !0 || this._$AL.has(n) || h === void 0 || this.C(n, void 0, o, h);
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
let t = !1;
|
|
478
|
-
const e = this._$AL;
|
|
479
|
-
try {
|
|
480
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((i) => {
|
|
481
|
-
var n;
|
|
482
|
-
return (n = i.hostUpdate) == null ? void 0 : n.call(i);
|
|
483
|
-
}), this.update(e)) : this._$EM();
|
|
484
|
-
} catch (i) {
|
|
485
|
-
throw t = !1, this._$EM(), i;
|
|
486
|
-
}
|
|
487
|
-
t && this._$AE(e);
|
|
488
|
-
}
|
|
489
|
-
willUpdate(t) {
|
|
490
|
-
}
|
|
491
|
-
_$AE(t) {
|
|
492
|
-
var e;
|
|
493
|
-
(e = this._$EO) == null || e.forEach((s) => {
|
|
494
|
-
var i;
|
|
495
|
-
return (i = s.hostUpdated) == null ? void 0 : i.call(s);
|
|
496
|
-
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
497
|
-
}
|
|
498
|
-
_$EM() {
|
|
499
|
-
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
500
|
-
}
|
|
501
|
-
get updateComplete() {
|
|
502
|
-
return this.getUpdateComplete();
|
|
503
|
-
}
|
|
504
|
-
getUpdateComplete() {
|
|
505
|
-
return this._$ES;
|
|
506
|
-
}
|
|
507
|
-
shouldUpdate(t) {
|
|
508
|
-
return !0;
|
|
509
|
-
}
|
|
510
|
-
update(t) {
|
|
511
|
-
this._$Eq && (this._$Eq = this._$Eq.forEach((e) => this._$ET(e, this[e]))), this._$EM();
|
|
512
|
-
}
|
|
513
|
-
updated(t) {
|
|
514
|
-
}
|
|
515
|
-
firstUpdated(t) {
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
v.elementStyles = [], v.shadowRootOptions = { mode: "open" }, v[P("elementProperties")] = /* @__PURE__ */ new Map(), v[P("finalized")] = /* @__PURE__ */ new Map(), z == null || z({ ReactiveElement: v }), (f.reactiveElementVersions ?? (f.reactiveElementVersions = [])).push("2.1.0");
|
|
519
|
-
/**
|
|
520
|
-
* @license
|
|
521
|
-
* Copyright 2017 Google LLC
|
|
522
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
523
|
-
*/
|
|
524
|
-
const Ct = { attribute: !0, type: String, converter: R, reflect: !1, hasChanged: q }, Pt = (r = Ct, t, e) => {
|
|
525
|
-
const { kind: s, metadata: i } = e;
|
|
526
|
-
let n = globalThis.litPropertyMetadata.get(i);
|
|
527
|
-
if (n === void 0 && globalThis.litPropertyMetadata.set(i, n = /* @__PURE__ */ new Map()), s === "setter" && ((r = Object.create(r)).wrapped = !0), n.set(e.name, r), s === "accessor") {
|
|
528
|
-
const { name: o } = e;
|
|
529
|
-
return { set(a) {
|
|
530
|
-
const h = t.get.call(this);
|
|
531
|
-
t.set.call(this, a), this.requestUpdate(o, h, r);
|
|
532
|
-
}, init(a) {
|
|
533
|
-
return a !== void 0 && this.C(o, void 0, r, a), a;
|
|
534
|
-
} };
|
|
535
|
-
}
|
|
536
|
-
if (s === "setter") {
|
|
537
|
-
const { name: o } = e;
|
|
538
|
-
return function(a) {
|
|
539
|
-
const h = this[o];
|
|
540
|
-
t.call(this, a), this.requestUpdate(o, h, r);
|
|
541
|
-
};
|
|
542
|
-
}
|
|
543
|
-
throw Error("Unsupported decorator location: " + s);
|
|
544
|
-
};
|
|
545
|
-
function Ht(r) {
|
|
546
|
-
return (t, e) => typeof e == "object" ? Pt(r, t, e) : ((s, i, n) => {
|
|
547
|
-
const o = i.hasOwnProperty(n);
|
|
548
|
-
return i.constructor.createProperty(n, s), o ? Object.getOwnPropertyDescriptor(i, n) : void 0;
|
|
549
|
-
})(r, t, e);
|
|
550
|
-
}
|
|
551
|
-
/**
|
|
552
|
-
* @license
|
|
553
|
-
* Copyright 2017 Google LLC
|
|
554
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
555
|
-
*/
|
|
556
|
-
const y = globalThis;
|
|
557
|
-
class T extends v {
|
|
558
|
-
constructor() {
|
|
559
|
-
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
560
|
-
}
|
|
561
|
-
createRenderRoot() {
|
|
562
|
-
var e;
|
|
563
|
-
const t = super.createRenderRoot();
|
|
564
|
-
return (e = this.renderOptions).renderBefore ?? (e.renderBefore = t.firstChild), t;
|
|
565
|
-
}
|
|
566
|
-
update(t) {
|
|
567
|
-
const e = this.render();
|
|
568
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = _t(e, this.renderRoot, this.renderOptions);
|
|
569
|
-
}
|
|
570
|
-
connectedCallback() {
|
|
571
|
-
var t;
|
|
572
|
-
super.connectedCallback(), (t = this._$Do) == null || t.setConnected(!0);
|
|
573
|
-
}
|
|
574
|
-
disconnectedCallback() {
|
|
575
|
-
var t;
|
|
576
|
-
super.disconnectedCallback(), (t = this._$Do) == null || t.setConnected(!1);
|
|
577
|
-
}
|
|
578
|
-
render() {
|
|
579
|
-
return E;
|
|
580
|
-
}
|
|
581
|
-
}
|
|
582
|
-
var tt;
|
|
583
|
-
T._$litElement$ = !0, T.finalized = !0, (tt = y.litElementHydrateSupport) == null || tt.call(y, { LitElement: T });
|
|
584
|
-
const L = y.litElementPolyfillSupport;
|
|
585
|
-
L == null || L({ LitElement: T });
|
|
586
|
-
(y.litElementVersions ?? (y.litElementVersions = [])).push("4.2.0");
|
|
587
|
-
export {
|
|
588
|
-
d as E,
|
|
589
|
-
E as T,
|
|
590
|
-
xt as Z,
|
|
591
|
-
T as i,
|
|
592
|
-
Ht as n,
|
|
593
|
-
Ot as t,
|
|
594
|
-
Ut as x
|
|
595
|
-
};
|
package/dist/loader-5lt2W9RX.cjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";const h=require("./element-DUJa1sRq.cjs"),d=require("./class-map-dph2jLEp.cjs"),t=require("./lit-element-DHqqtYbj.cjs"),u=require("./state-y-GU-VH8.cjs"),p=require("./ref-BMQZJJEo.cjs"),c=require("./pkt-slot-controller-BzddBp7z.cjs");require("./icon-RJ9Op-BB.cjs");var y=Object.defineProperty,k=Object.getOwnPropertyDescriptor,s=(r,e,a,o)=>{for(var i=o>1?void 0:o?k(e,a):e,n=r.length-1,l;n>=0;n--)(l=r[n])&&(i=(o?l(e,a,i):l(i))||i);return o&&i&&y(e,a,i),i};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/latest/animations/";exports.PktLoader=class extends h.PktElement{constructor(){super(),this.defaultSlot=p.e(),this.delay=0,this.inline=!1,this.isLoading=!0,this.message=null,this.size="medium",this.variant="shapes",this.loadingAnimationPath=window.pktAnimationPath,this._shouldDisplayLoader=!1,this.slotController=new c.PktSlotController(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this._shouldDisplayLoader=this.delay===0,this.delay>0&&this.setupLoader()}updated(e){e.has("delay")&&this.setupLoader()}render(){const e=d.e({"pkt-loader":!0,[`pkt-loader--${this.inline?"inline":"box"}`]:!0,[`pkt-loader--${this.size}`]:!0}),a=d.e({"pkt-contents":!0,"pkt-hide":this.isLoading});return t.x`<div role="status" aria-live="polite" .aria-busy=${this.isLoading} class=${e}>
|
|
2
|
-
${this.isLoading&&this._shouldDisplayLoader?t.x`<div class="pkt-loader__spinner">
|
|
3
|
-
<pkt-icon
|
|
4
|
-
name=${this.getVariant(this.variant)}
|
|
5
|
-
path=${this.loadingAnimationPath}
|
|
6
|
-
class="pkt-loader__svg pkt-loader__${this.variant}"
|
|
7
|
-
></pkt-icon>
|
|
8
|
-
${this.message&&t.x`<p>${this.message}</p>`}
|
|
9
|
-
</div>`:t.E}
|
|
10
|
-
<div class=${a} ${p.n(this.defaultSlot)}></div>
|
|
11
|
-
</div>`}getVariant(e){switch(e){case"blue":return"spinner-blue";case"rainbow":return"spinner";default:return"loader"}}setupLoader(){this.delay>0&&(this._shouldDisplayLoader=!1,setTimeout(()=>{this._shouldDisplayLoader=!0,this.requestUpdate()},this.delay))}};s([t.n({type:Number})],exports.PktLoader.prototype,"delay",2);s([t.n({type:Boolean})],exports.PktLoader.prototype,"inline",2);s([t.n({type:Boolean})],exports.PktLoader.prototype,"isLoading",2);s([t.n({type:String})],exports.PktLoader.prototype,"message",2);s([t.n({type:String})],exports.PktLoader.prototype,"size",2);s([t.n({type:String})],exports.PktLoader.prototype,"variant",2);s([t.n({type:String})],exports.PktLoader.prototype,"loadingAnimationPath",2);s([u.r()],exports.PktLoader.prototype,"_shouldDisplayLoader",2);exports.PktLoader=s([t.t("pkt-loader")],exports.PktLoader);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";const u=require("./element-DUJa1sRq.cjs"),b=require("./pkt-slot-controller-BzddBp7z.cjs"),n=require("./ref-BMQZJJEo.cjs"),e=require("./lit-element-DHqqtYbj.cjs"),d=require("./class-map-dph2jLEp.cjs"),k=require("./state-y-GU-VH8.cjs");require("./icon-RJ9Op-BB.cjs");const h=require("./classutils-BwNK82ZQ.cjs"),f={skin:{default:"beige"},compact:{default:!1},closable:{default:!1}},p={props:f};var x=Object.defineProperty,g=Object.getOwnPropertyDescriptor,o=(i,t,a,l)=>{for(var s=l>1?void 0:l?g(t,a):t,r=i.length-1,c;r>=0;r--)(c=i[r])&&(s=(l?c(t,a,s):c(s))||s);return l&&s&&x(t,a,s),s};exports.PktMessagebox=class extends u.PktElement{constructor(){super(),this.defaultSlot=n.e(),this.closable=p.props.closable.default,this.compact=p.props.compact.default,this.title="",this.skin=p.props.skin.default,this._isClosed=!1,this.close=t=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:t},bubbles:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:t},bubbles:!0}))},this.slotController=new b.PktSlotController(this,this.defaultSlot),this._isClosed=!1}updated(t){super.updated(t),t.has("_isClosed")&&h.updateClassAttribute(this,"pkt-hide",this._isClosed)}render(){const t={"pkt-messagebox":!0,"pkt-messagebox--compact":this.compact,[`pkt-messagebox--${this.skin}`]:this.skin,"pkt-messagebox--closable":this.closable,"pkt-hide":this._isClosed};return e.x`<div class=${d.e(t)}>
|
|
2
|
-
${this.closable?e.x`<div class="pkt-messagebox__close">
|
|
3
|
-
<button
|
|
4
|
-
@click=${this.close}
|
|
5
|
-
class="pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only"
|
|
6
|
-
>
|
|
7
|
-
<pkt-icon name="close" class="pkt-link__icon"></pkt-icon>
|
|
8
|
-
</button>
|
|
9
|
-
</div>`:e.E}
|
|
10
|
-
${this.title?e.x`<div class="pkt-messagebox__title">${this.title}</div>`:e.E}
|
|
11
|
-
<div class="pkt-messagebox__text" ${n.n(this.defaultSlot)}></div>
|
|
12
|
-
</div>`}};o([e.n({type:Boolean,reflect:!0})],exports.PktMessagebox.prototype,"closable",2);o([e.n({type:Boolean,reflect:!0})],exports.PktMessagebox.prototype,"compact",2);o([e.n({type:String,reflect:!0})],exports.PktMessagebox.prototype,"title",2);o([e.n({type:String,reflect:!0})],exports.PktMessagebox.prototype,"skin",2);o([k.r()],exports.PktMessagebox.prototype,"_isClosed",2);exports.PktMessagebox=o([e.t("pkt-messagebox")],exports.PktMessagebox);
|
package/dist/modal-5PZ-TDkV.cjs
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";const d=require("./class-map-dph2jLEp.cjs"),o=require("./lit-element-DHqqtYbj.cjs"),u=require("./state-y-GU-VH8.cjs"),k=require("./element-DUJa1sRq.cjs"),m=require("./pkt-slot-controller-BzddBp7z.cjs"),r=require("./ref-BMQZJJEo.cjs");require("./icon-RJ9Op-BB.cjs");const v={hideCloseButton:{default:!1},closeOnBackdropClick:{default:!1},size:{default:"medium"}},h={props:v};var f=Object.defineProperty,g=Object.getOwnPropertyDescriptor,l=(c,t,e,i)=>{for(var s=i>1?void 0:i?g(t,e):t,n=c.length-1,a;n>=0;n--)(a=c[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&f(t,e,s),s};exports.PktModal=class extends k.PktElement{constructor(){super(),this.headingText="",this.removePadding=!1,this.hideCloseButton=h.props.hideCloseButton.default,this.closeOnBackdropClick=h.props.closeOnBackdropClick.default,this.closeButtonSkin="blue",this.size=h.props.size.default,this.variant="dialog",this.drawerPosition="right",this.transparentBackdrop=!1,this.defaultSlot=r.e(),this.dialogRef=r.e(),this._isOpen=!1,this.close=(t,e=!1)=>{var s;if(!this._isOpen)return;this._isOpen=!1,document.body.classList.remove("pkt-modal--open");const i=document.activeElement;i&&!this.isElementInViewport(i)&&i.scrollIntoView({behavior:"smooth",block:"nearest"}),this.dispatchEvent(new CustomEvent("close",{detail:{origin:t},bubbles:!0,composed:!0})),e||(s=this.dialogRef.value)==null||s.close(),this.requestUpdate()},this.showModal=(t=null)=>{var i;this._isOpen=!0,(i=this.dialogRef.value)==null||i.showModal();const e=document.querySelector(".pkt-modal");requestAnimationFrame(()=>{var s;this.dialogRef.value&&((s=this.dialogRef.value)==null||s.focus())}),e&&document.body.classList.add("pkt-modal--open"),this.dispatchEvent(new CustomEvent("showModal",{detail:{origin:t},bubbles:!0,composed:!0})),this.requestUpdate()},this.slotController=new m.PktSlotController(this,this.defaultSlot),this._isOpen=!1}async connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleKeyDown.bind(this)),document.addEventListener("click",this.handleBackdropClick.bind(this))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("click",this.handleBackdropClick)}async firstUpdated(t){super.firstUpdated(t),this.dialogRef.value&&!window.HTMLDialogElement&&!this.dialogRef.value.showModal&&("document"in window&&"createElement"in document&&(await Promise.resolve().then(()=>require("./dialog-polyfill.esm-CPKZe7AL.cjs")).then(i=>i.default)).registerDialog(this.dialogRef.value),this.dialogRef.value.addEventListener("close",()=>{this.close(new Event("close"),!0)}))}handleKeyDown(t){t.key==="Escape"&&this.close(t)}handleBackdropClick(t){var e;this.closeOnBackdropClick&&t.target===((e=this.dialogRef)==null?void 0:e.value)&&this.close(t)}isElementInViewport(t){const e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}render(){const t={"pkt-modal":!0,"pkt-modal--removePadding":this.removePadding??!1,"pkt-modal--noHeadingText":this.headingText===""||this.headingText===void 0,"pkt-modal--noShadow":this.closeButtonSkin==="yellow-filled","pkt-modal--transparentBackdrop":this.transparentBackdrop??!1,[`pkt-modal--${this.size}`]:this.size!==void 0,[`pkt-modal__${this.variant}`]:this.variant!==void 0,[`pkt-modal__drawer--${this.drawerPosition}`]:this.variant==="drawer"},e={"pkt-modal__headingText":!0,"pkt-txt-24":!0},i={"pkt-modal__content":!0,"pkt-txt-18-light":!0},s=this.closeButtonSkin==="blue",n={"pkt-modal__closeButton":!0,[`pkt-modal__closeButton--${this.closeButtonSkin}`]:!0},a={"pkt-btn":!0,[`pkt-btn--${s?"tertiary":"primary"}`]:!0,"pkt-btn--icon-only":!0,"pkt-btn--medium":!0};return o.x`
|
|
2
|
-
<dialog
|
|
3
|
-
class=${d.e(t)}
|
|
4
|
-
${r.n(this.dialogRef)}
|
|
5
|
-
aria-labelledby="pkt-modal__headingText"
|
|
6
|
-
aria-describedby="pkt-modal__content"
|
|
7
|
-
@close=${p=>this.close(p,!0)}
|
|
8
|
-
>
|
|
9
|
-
<div class="pkt-modal__wrapper">
|
|
10
|
-
${this.headingText||!this.hideCloseButton?o.x`<div class="pkt-modal__header">
|
|
11
|
-
<div class="pkt-modal__header-background"></div>
|
|
12
|
-
${this.headingText?o.x`<h1 id="pkt-modal__headingText" class=${d.e(e)}>
|
|
13
|
-
${this.headingText}
|
|
14
|
-
</h1>`:o.x`<div class="pkt-modal__headingText"></div>`}
|
|
15
|
-
${this.hideCloseButton?o.x`<div class="pkt-modal__noCloseButton"></div>`:o.x`<div class="${d.e(n)}">
|
|
16
|
-
<pkt-button
|
|
17
|
-
@click=${p=>this.close(p)}
|
|
18
|
-
class=${d.e(a)}
|
|
19
|
-
aria-label="close"
|
|
20
|
-
iconname="close"
|
|
21
|
-
variant="icon-only"
|
|
22
|
-
>
|
|
23
|
-
Lukk
|
|
24
|
-
</pkt-button>
|
|
25
|
-
</div>`}
|
|
26
|
-
</div>`:o.E}
|
|
27
|
-
<div class="pkt-modal__container">
|
|
28
|
-
<div
|
|
29
|
-
id="pkt-modal__content"
|
|
30
|
-
class=${d.e(i)}
|
|
31
|
-
${r.n(this.defaultSlot)}
|
|
32
|
-
></div>
|
|
33
|
-
</div>
|
|
34
|
-
</div>
|
|
35
|
-
</dialog>
|
|
36
|
-
`}};l([o.n({type:String})],exports.PktModal.prototype,"headingText",2);l([o.n({type:Boolean})],exports.PktModal.prototype,"removePadding",2);l([o.n({type:Boolean})],exports.PktModal.prototype,"hideCloseButton",2);l([o.n({type:Boolean})],exports.PktModal.prototype,"closeOnBackdropClick",2);l([o.n({type:String})],exports.PktModal.prototype,"closeButtonSkin",2);l([o.n({type:String})],exports.PktModal.prototype,"size",2);l([o.n({type:String})],exports.PktModal.prototype,"variant",2);l([o.n({type:String})],exports.PktModal.prototype,"drawerPosition",2);l([o.n({type:Boolean})],exports.PktModal.prototype,"transparentBackdrop",2);l([u.r()],exports.PktModal.prototype,"_isOpen",2);exports.PktModal=l([o.t("pkt-modal")],exports.PktModal);
|