@warp-ds/elements 1.0.0-alpha.5 → 1.0.0-alpha.6
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/dist/elements.min.d.ts +1 -0
- package/dist/elements.min.js +4 -0
- package/dist/expandable.html +1 -1
- package/dist/index.d.ts +16 -0
- package/dist/index.html +1 -1
- package/dist/packages/affix/icons.d.ts +2 -0
- package/dist/packages/affix/index.d.ts +26 -0
- package/dist/packages/alert/index.d.ts +21 -0
- package/dist/packages/alert/svgs.d.ts +4 -0
- package/dist/packages/attention/index.d.ts +66 -0
- package/dist/packages/box/index.d.ts +20 -0
- package/dist/packages/breadcrumbs/index.d.ts +6 -0
- package/dist/packages/broadcast/component.d.ts +37 -0
- package/dist/packages/broadcast/index.d.ts +2 -0
- package/dist/packages/button/index.d.ts +63 -0
- package/dist/packages/card/index.d.ts +25 -0
- package/dist/packages/expandable/index.d.ts +58 -0
- package/dist/packages/select/index.d.ts +43 -0
- package/dist/packages/textfield/index.d.ts +80 -0
- package/dist/packages/toast/api.d.ts +54 -0
- package/dist/packages/toast/svgs.d.ts +3 -0
- package/dist/packages/toast/toast-container.d.ts +66 -0
- package/dist/packages/toast/toast.d.ts +44 -0
- package/dist/packages/utils/expand-transition.d.ts +21 -0
- package/dist/packages/utils/index.d.ts +11 -0
- package/dist/packages/utils/unstyled-heading.d.ts +11 -0
- package/dist/{assets/scripts.501aea67.js → scripts.bd8d8c7c.js} +3209 -280
- package/dist/scripts.bd8d8c7c.js.map +1 -0
- package/package.json +2 -2
|
@@ -1,37 +1,1126 @@
|
|
|
1
|
-
|
|
1
|
+
var zr = Object.defineProperty;
|
|
2
|
+
var _r = (o, e, t) => e in o ? zr(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
|
+
var k = (o, e, t) => (_r(o, typeof e != "symbol" ? e + "" : e, t), t), Sr = (o, e, t) => {
|
|
4
|
+
if (!e.has(o))
|
|
5
|
+
throw TypeError("Cannot " + t);
|
|
6
|
+
};
|
|
7
|
+
var J = (o, e, t) => (Sr(o, e, "read from private field"), t ? t.call(o) : e.get(o)), Re = (o, e, t) => {
|
|
8
|
+
if (e.has(o))
|
|
9
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
10
|
+
e instanceof WeakSet ? e.add(o) : e.set(o, t);
|
|
11
|
+
};
|
|
12
|
+
import st from "https://assets.finn.no/pkg/@warp-ds/tokens/v1/finn-no.css?used&inline";
|
|
13
|
+
(function() {
|
|
14
|
+
const e = document.createElement("link").relList;
|
|
15
|
+
if (e && e.supports && e.supports("modulepreload"))
|
|
16
|
+
return;
|
|
17
|
+
for (const i of document.querySelectorAll('link[rel="modulepreload"]'))
|
|
18
|
+
r(i);
|
|
19
|
+
new MutationObserver((i) => {
|
|
20
|
+
for (const a of i)
|
|
21
|
+
if (a.type === "childList")
|
|
22
|
+
for (const n of a.addedNodes)
|
|
23
|
+
n.tagName === "LINK" && n.rel === "modulepreload" && r(n);
|
|
24
|
+
}).observe(document, { childList: !0, subtree: !0 });
|
|
25
|
+
function t(i) {
|
|
26
|
+
const a = {};
|
|
27
|
+
return i.integrity && (a.integrity = i.integrity), i.referrerpolicy && (a.referrerPolicy = i.referrerpolicy), i.crossorigin === "use-credentials" ? a.credentials = "include" : i.crossorigin === "anonymous" ? a.credentials = "omit" : a.credentials = "same-origin", a;
|
|
28
|
+
}
|
|
29
|
+
function r(i) {
|
|
30
|
+
if (i.ep)
|
|
31
|
+
return;
|
|
32
|
+
i.ep = !0;
|
|
33
|
+
const a = t(i);
|
|
34
|
+
fetch(i.href, a);
|
|
35
|
+
}
|
|
36
|
+
})();
|
|
37
|
+
/**
|
|
2
38
|
* @license
|
|
3
39
|
* Copyright 2019 Google LLC
|
|
4
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/
|
|
41
|
+
*/
|
|
42
|
+
const Cr = !1, Ae = window, Do = Ae.ShadowRoot && (Ae.ShadyCSS === void 0 || Ae.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ho = Symbol(), dt = /* @__PURE__ */ new WeakMap();
|
|
43
|
+
class Tt {
|
|
44
|
+
constructor(e, t, r) {
|
|
45
|
+
if (this._$cssResult$ = !0, r !== Ho)
|
|
46
|
+
throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
47
|
+
this.cssText = e, this._strings = t;
|
|
48
|
+
}
|
|
49
|
+
get styleSheet() {
|
|
50
|
+
let e = this._styleSheet;
|
|
51
|
+
const t = this._strings;
|
|
52
|
+
if (Do && e === void 0) {
|
|
53
|
+
const r = t !== void 0 && t.length === 1;
|
|
54
|
+
r && (e = dt.get(t)), e === void 0 && ((this._styleSheet = e = new CSSStyleSheet()).replaceSync(this.cssText), r && dt.set(t, e));
|
|
55
|
+
}
|
|
56
|
+
return e;
|
|
57
|
+
}
|
|
58
|
+
toString() {
|
|
59
|
+
return this.cssText;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const Er = (o) => {
|
|
63
|
+
if (o._$cssResult$ === !0)
|
|
64
|
+
return o.cssText;
|
|
65
|
+
if (typeof o == "number")
|
|
66
|
+
return o;
|
|
67
|
+
throw new Error(`Value passed to 'css' function must be a 'css' function result: ${o}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`);
|
|
68
|
+
}, Rr = (o) => new Tt(typeof o == "string" ? o : String(o), void 0, Ho), R = (o, ...e) => {
|
|
69
|
+
const t = o.length === 1 ? o[0] : e.reduce((r, i, a) => r + Er(i) + o[a + 1], o[0]);
|
|
70
|
+
return new Tt(t, o, Ho);
|
|
71
|
+
}, Ar = (o, e) => {
|
|
72
|
+
Do ? o.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet) : e.forEach((t) => {
|
|
73
|
+
const r = document.createElement("style"), i = Ae.litNonce;
|
|
74
|
+
i !== void 0 && r.setAttribute("nonce", i), r.textContent = t.cssText, o.appendChild(r);
|
|
75
|
+
});
|
|
76
|
+
}, qr = (o) => {
|
|
77
|
+
let e = "";
|
|
78
|
+
for (const t of o.cssRules)
|
|
79
|
+
e += t.cssText;
|
|
80
|
+
return Rr(e);
|
|
81
|
+
}, ut = Do || Cr ? (o) => o : (o) => o instanceof CSSStyleSheet ? qr(o) : o;
|
|
82
|
+
/**
|
|
6
83
|
* @license
|
|
7
84
|
* Copyright 2017 Google LLC
|
|
8
85
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/
|
|
86
|
+
*/
|
|
87
|
+
var to, ro, io, Ut;
|
|
88
|
+
const B = window;
|
|
89
|
+
let Ot, ee;
|
|
90
|
+
const bt = B.trustedTypes, Mr = bt ? bt.emptyScript : "", qe = B.reactiveElementPolyfillSupportDevMode;
|
|
91
|
+
{
|
|
92
|
+
const o = (to = B.litIssuedWarnings) !== null && to !== void 0 ? to : B.litIssuedWarnings = /* @__PURE__ */ new Set();
|
|
93
|
+
ee = (e, t) => {
|
|
94
|
+
t += ` See https://lit.dev/msg/${e} for more information.`, o.has(t) || (console.warn(t), o.add(t));
|
|
95
|
+
}, ee("dev-mode", "Lit is in dev mode. Not recommended for production!"), ((ro = B.ShadyDOM) === null || ro === void 0 ? void 0 : ro.inUse) && qe === void 0 && ee("polyfill-support-missing", "Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded."), Ot = (e) => ({
|
|
96
|
+
then: (t, r) => {
|
|
97
|
+
ee("request-update-promise", `The \`requestUpdate\` method should no longer return a Promise but does so on \`${e}\`. Use \`updateComplete\` instead.`), t !== void 0 && t(!1);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
const no = (o) => {
|
|
102
|
+
!B.emitLitDebugLogEvents || B.dispatchEvent(new CustomEvent("lit-debug", {
|
|
103
|
+
detail: o
|
|
104
|
+
}));
|
|
105
|
+
}, Ft = (o, e) => o, So = {
|
|
106
|
+
toAttribute(o, e) {
|
|
107
|
+
switch (e) {
|
|
108
|
+
case Boolean:
|
|
109
|
+
o = o ? Mr : null;
|
|
110
|
+
break;
|
|
111
|
+
case Object:
|
|
112
|
+
case Array:
|
|
113
|
+
o = o == null ? o : JSON.stringify(o);
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
return o;
|
|
117
|
+
},
|
|
118
|
+
fromAttribute(o, e) {
|
|
119
|
+
let t = o;
|
|
120
|
+
switch (e) {
|
|
121
|
+
case Boolean:
|
|
122
|
+
t = o !== null;
|
|
123
|
+
break;
|
|
124
|
+
case Number:
|
|
125
|
+
t = o === null ? null : Number(o);
|
|
126
|
+
break;
|
|
127
|
+
case Object:
|
|
128
|
+
case Array:
|
|
129
|
+
try {
|
|
130
|
+
t = JSON.parse(o);
|
|
131
|
+
} catch {
|
|
132
|
+
t = null;
|
|
133
|
+
}
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
return t;
|
|
137
|
+
}
|
|
138
|
+
}, Lt = (o, e) => e !== o && (e === e || o === o), ao = {
|
|
139
|
+
attribute: !0,
|
|
140
|
+
type: String,
|
|
141
|
+
converter: So,
|
|
142
|
+
reflect: !1,
|
|
143
|
+
hasChanged: Lt
|
|
144
|
+
}, Co = "finalized";
|
|
145
|
+
class V extends HTMLElement {
|
|
146
|
+
constructor() {
|
|
147
|
+
super(), this.__instanceProperties = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this.__reflectingProperty = null, this._initialize();
|
|
148
|
+
}
|
|
149
|
+
static addInitializer(e) {
|
|
150
|
+
var t;
|
|
151
|
+
this.finalize(), ((t = this._initializers) !== null && t !== void 0 ? t : this._initializers = []).push(e);
|
|
152
|
+
}
|
|
153
|
+
static get observedAttributes() {
|
|
154
|
+
this.finalize();
|
|
155
|
+
const e = [];
|
|
156
|
+
return this.elementProperties.forEach((t, r) => {
|
|
157
|
+
const i = this.__attributeNameForProperty(r, t);
|
|
158
|
+
i !== void 0 && (this.__attributeToPropertyMap.set(i, r), e.push(i));
|
|
159
|
+
}), e;
|
|
160
|
+
}
|
|
161
|
+
static createProperty(e, t = ao) {
|
|
162
|
+
var r;
|
|
163
|
+
if (t.state && (t.attribute = !1), this.finalize(), this.elementProperties.set(e, t), !t.noAccessor && !this.prototype.hasOwnProperty(e)) {
|
|
164
|
+
const i = typeof e == "symbol" ? Symbol() : `__${e}`, a = this.getPropertyDescriptor(e, i, t);
|
|
165
|
+
a !== void 0 && (Object.defineProperty(this.prototype, e, a), this.hasOwnProperty("__reactivePropertyKeys") || (this.__reactivePropertyKeys = new Set((r = this.__reactivePropertyKeys) !== null && r !== void 0 ? r : [])), this.__reactivePropertyKeys.add(e));
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
static getPropertyDescriptor(e, t, r) {
|
|
169
|
+
return {
|
|
170
|
+
get() {
|
|
171
|
+
return this[t];
|
|
172
|
+
},
|
|
173
|
+
set(i) {
|
|
174
|
+
const a = this[e];
|
|
175
|
+
this[t] = i, this.requestUpdate(e, a, r);
|
|
176
|
+
},
|
|
177
|
+
configurable: !0,
|
|
178
|
+
enumerable: !0
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
static getPropertyOptions(e) {
|
|
182
|
+
return this.elementProperties.get(e) || ao;
|
|
183
|
+
}
|
|
184
|
+
static finalize() {
|
|
185
|
+
if (this.hasOwnProperty(Co))
|
|
186
|
+
return !1;
|
|
187
|
+
this[Co] = !0;
|
|
188
|
+
const e = Object.getPrototypeOf(this);
|
|
189
|
+
if (e.finalize(), e._initializers !== void 0 && (this._initializers = [...e._initializers]), this.elementProperties = new Map(e.elementProperties), this.__attributeToPropertyMap = /* @__PURE__ */ new Map(), this.hasOwnProperty(Ft("properties"))) {
|
|
190
|
+
const t = this.properties, r = [
|
|
191
|
+
...Object.getOwnPropertyNames(t),
|
|
192
|
+
...Object.getOwnPropertySymbols(t)
|
|
193
|
+
];
|
|
194
|
+
for (const i of r)
|
|
195
|
+
this.createProperty(i, t[i]);
|
|
196
|
+
}
|
|
197
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
198
|
+
{
|
|
199
|
+
const t = (r, i = !1) => {
|
|
200
|
+
this.prototype.hasOwnProperty(r) && ee(i ? "renamed-api" : "removed-api", `\`${r}\` is implemented on class ${this.name}. It has been ${i ? "renamed" : "removed"} in this version of LitElement.`);
|
|
201
|
+
};
|
|
202
|
+
t("initialize"), t("requestUpdateInternal"), t("_getUpdateComplete", !0);
|
|
203
|
+
}
|
|
204
|
+
return !0;
|
|
205
|
+
}
|
|
206
|
+
static finalizeStyles(e) {
|
|
207
|
+
const t = [];
|
|
208
|
+
if (Array.isArray(e)) {
|
|
209
|
+
const r = new Set(e.flat(1 / 0).reverse());
|
|
210
|
+
for (const i of r)
|
|
211
|
+
t.unshift(ut(i));
|
|
212
|
+
} else
|
|
213
|
+
e !== void 0 && t.push(ut(e));
|
|
214
|
+
return t;
|
|
215
|
+
}
|
|
216
|
+
static __attributeNameForProperty(e, t) {
|
|
217
|
+
const r = t.attribute;
|
|
218
|
+
return r === !1 ? void 0 : typeof r == "string" ? r : typeof e == "string" ? e.toLowerCase() : void 0;
|
|
219
|
+
}
|
|
220
|
+
_initialize() {
|
|
221
|
+
var e;
|
|
222
|
+
this.__updatePromise = new Promise((t) => this.enableUpdating = t), this._$changedProperties = /* @__PURE__ */ new Map(), this.__saveInstanceProperties(), this.requestUpdate(), (e = this.constructor._initializers) === null || e === void 0 || e.forEach((t) => t(this));
|
|
223
|
+
}
|
|
224
|
+
addController(e) {
|
|
225
|
+
var t, r;
|
|
226
|
+
((t = this.__controllers) !== null && t !== void 0 ? t : this.__controllers = []).push(e), this.renderRoot !== void 0 && this.isConnected && ((r = e.hostConnected) === null || r === void 0 || r.call(e));
|
|
227
|
+
}
|
|
228
|
+
removeController(e) {
|
|
229
|
+
var t;
|
|
230
|
+
(t = this.__controllers) === null || t === void 0 || t.splice(this.__controllers.indexOf(e) >>> 0, 1);
|
|
231
|
+
}
|
|
232
|
+
__saveInstanceProperties() {
|
|
233
|
+
this.constructor.elementProperties.forEach((e, t) => {
|
|
234
|
+
this.hasOwnProperty(t) && (this.__instanceProperties.set(t, this[t]), delete this[t]);
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
createRenderRoot() {
|
|
238
|
+
var e;
|
|
239
|
+
const t = (e = this.shadowRoot) !== null && e !== void 0 ? e : this.attachShadow(this.constructor.shadowRootOptions);
|
|
240
|
+
return Ar(t, this.constructor.elementStyles), t;
|
|
241
|
+
}
|
|
242
|
+
connectedCallback() {
|
|
243
|
+
var e;
|
|
244
|
+
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (e = this.__controllers) === null || e === void 0 || e.forEach((t) => {
|
|
245
|
+
var r;
|
|
246
|
+
return (r = t.hostConnected) === null || r === void 0 ? void 0 : r.call(t);
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
enableUpdating(e) {
|
|
250
|
+
}
|
|
251
|
+
disconnectedCallback() {
|
|
252
|
+
var e;
|
|
253
|
+
(e = this.__controllers) === null || e === void 0 || e.forEach((t) => {
|
|
254
|
+
var r;
|
|
255
|
+
return (r = t.hostDisconnected) === null || r === void 0 ? void 0 : r.call(t);
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
attributeChangedCallback(e, t, r) {
|
|
259
|
+
this._$attributeToProperty(e, r);
|
|
260
|
+
}
|
|
261
|
+
__propertyToAttribute(e, t, r = ao) {
|
|
262
|
+
var i;
|
|
263
|
+
const a = this.constructor.__attributeNameForProperty(e, r);
|
|
264
|
+
if (a !== void 0 && r.reflect === !0) {
|
|
265
|
+
const l = (((i = r.converter) === null || i === void 0 ? void 0 : i.toAttribute) !== void 0 ? r.converter : So).toAttribute(t, r.type);
|
|
266
|
+
this.constructor.enabledWarnings.indexOf("migration") >= 0 && l === void 0 && ee("undefined-attribute-value", `The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`), this.__reflectingProperty = e, l == null ? this.removeAttribute(a) : this.setAttribute(a, l), this.__reflectingProperty = null;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
_$attributeToProperty(e, t) {
|
|
270
|
+
var r;
|
|
271
|
+
const i = this.constructor, a = i.__attributeToPropertyMap.get(e);
|
|
272
|
+
if (a !== void 0 && this.__reflectingProperty !== a) {
|
|
273
|
+
const n = i.getPropertyOptions(a), l = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((r = n.converter) === null || r === void 0 ? void 0 : r.fromAttribute) !== void 0 ? n.converter : So;
|
|
274
|
+
this.__reflectingProperty = a, this[a] = l.fromAttribute(
|
|
275
|
+
t,
|
|
276
|
+
n.type
|
|
277
|
+
), this.__reflectingProperty = null;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
requestUpdate(e, t, r) {
|
|
281
|
+
let i = !0;
|
|
282
|
+
return e !== void 0 && (r = r || this.constructor.getPropertyOptions(e), (r.hasChanged || Lt)(this[e], t) ? (this._$changedProperties.has(e) || this._$changedProperties.set(e, t), r.reflect === !0 && this.__reflectingProperty !== e && (this.__reflectingProperties === void 0 && (this.__reflectingProperties = /* @__PURE__ */ new Map()), this.__reflectingProperties.set(e, r))) : i = !1), !this.isUpdatePending && i && (this.__updatePromise = this.__enqueueUpdate()), Ot(this.localName);
|
|
283
|
+
}
|
|
284
|
+
async __enqueueUpdate() {
|
|
285
|
+
this.isUpdatePending = !0;
|
|
286
|
+
try {
|
|
287
|
+
await this.__updatePromise;
|
|
288
|
+
} catch (t) {
|
|
289
|
+
Promise.reject(t);
|
|
290
|
+
}
|
|
291
|
+
const e = this.scheduleUpdate();
|
|
292
|
+
return e != null && await e, !this.isUpdatePending;
|
|
293
|
+
}
|
|
294
|
+
scheduleUpdate() {
|
|
295
|
+
return this.performUpdate();
|
|
296
|
+
}
|
|
297
|
+
performUpdate() {
|
|
298
|
+
var e, t;
|
|
299
|
+
if (!this.isUpdatePending)
|
|
300
|
+
return;
|
|
301
|
+
if (no == null || no({ kind: "update" }), !this.hasUpdated) {
|
|
302
|
+
const a = [];
|
|
303
|
+
if ((e = this.constructor.__reactivePropertyKeys) === null || e === void 0 || e.forEach((n) => {
|
|
304
|
+
var l;
|
|
305
|
+
this.hasOwnProperty(n) && !(!((l = this.__instanceProperties) === null || l === void 0) && l.has(n)) && a.push(n);
|
|
306
|
+
}), a.length)
|
|
307
|
+
throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${a.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`);
|
|
308
|
+
}
|
|
309
|
+
this.__instanceProperties && (this.__instanceProperties.forEach((a, n) => this[n] = a), this.__instanceProperties = void 0);
|
|
310
|
+
let r = !1;
|
|
311
|
+
const i = this._$changedProperties;
|
|
312
|
+
try {
|
|
313
|
+
r = this.shouldUpdate(i), r ? (this.willUpdate(i), (t = this.__controllers) === null || t === void 0 || t.forEach((a) => {
|
|
314
|
+
var n;
|
|
315
|
+
return (n = a.hostUpdate) === null || n === void 0 ? void 0 : n.call(a);
|
|
316
|
+
}), this.update(i)) : this.__markUpdated();
|
|
317
|
+
} catch (a) {
|
|
318
|
+
throw r = !1, this.__markUpdated(), a;
|
|
319
|
+
}
|
|
320
|
+
r && this._$didUpdate(i);
|
|
321
|
+
}
|
|
322
|
+
willUpdate(e) {
|
|
323
|
+
}
|
|
324
|
+
_$didUpdate(e) {
|
|
325
|
+
var t;
|
|
326
|
+
(t = this.__controllers) === null || t === void 0 || t.forEach((r) => {
|
|
327
|
+
var i;
|
|
328
|
+
return (i = r.hostUpdated) === null || i === void 0 ? void 0 : i.call(r);
|
|
329
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e), this.isUpdatePending && this.constructor.enabledWarnings.indexOf("change-in-update") >= 0 && ee("change-in-update", `Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`);
|
|
330
|
+
}
|
|
331
|
+
__markUpdated() {
|
|
332
|
+
this._$changedProperties = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
333
|
+
}
|
|
334
|
+
get updateComplete() {
|
|
335
|
+
return this.getUpdateComplete();
|
|
336
|
+
}
|
|
337
|
+
getUpdateComplete() {
|
|
338
|
+
return this.__updatePromise;
|
|
339
|
+
}
|
|
340
|
+
shouldUpdate(e) {
|
|
341
|
+
return !0;
|
|
342
|
+
}
|
|
343
|
+
update(e) {
|
|
344
|
+
this.__reflectingProperties !== void 0 && (this.__reflectingProperties.forEach((t, r) => this.__propertyToAttribute(r, this[r], t)), this.__reflectingProperties = void 0), this.__markUpdated();
|
|
345
|
+
}
|
|
346
|
+
updated(e) {
|
|
347
|
+
}
|
|
348
|
+
firstUpdated(e) {
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
Ut = Co;
|
|
352
|
+
V[Ut] = !0;
|
|
353
|
+
V.elementProperties = /* @__PURE__ */ new Map();
|
|
354
|
+
V.elementStyles = [];
|
|
355
|
+
V.shadowRootOptions = { mode: "open" };
|
|
356
|
+
qe == null || qe({ ReactiveElement: V });
|
|
357
|
+
{
|
|
358
|
+
V.enabledWarnings = ["change-in-update"];
|
|
359
|
+
const o = function(e) {
|
|
360
|
+
e.hasOwnProperty(Ft("enabledWarnings")) || (e.enabledWarnings = e.enabledWarnings.slice());
|
|
361
|
+
};
|
|
362
|
+
V.enableWarning = function(e) {
|
|
363
|
+
o(this), this.enabledWarnings.indexOf(e) < 0 && this.enabledWarnings.push(e);
|
|
364
|
+
}, V.disableWarning = function(e) {
|
|
365
|
+
o(this);
|
|
366
|
+
const t = this.enabledWarnings.indexOf(e);
|
|
367
|
+
t >= 0 && this.enabledWarnings.splice(t, 1);
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
((io = B.reactiveElementVersions) !== null && io !== void 0 ? io : B.reactiveElementVersions = []).push("1.6.1");
|
|
371
|
+
B.reactiveElementVersions.length > 1 && ee("multiple-versions", "Multiple versions of Lit loaded. Loading multiple versions is not recommended.");
|
|
372
|
+
/**
|
|
10
373
|
* @license
|
|
11
374
|
* Copyright 2017 Google LLC
|
|
12
375
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
376
|
+
*/
|
|
377
|
+
var lo, co, so, uo;
|
|
378
|
+
const q = window, m = (o) => {
|
|
379
|
+
!q.emitLitDebugLogEvents || q.dispatchEvent(new CustomEvent("lit-debug", {
|
|
380
|
+
detail: o
|
|
381
|
+
}));
|
|
382
|
+
};
|
|
383
|
+
let Pr = 0, Ue;
|
|
384
|
+
(lo = q.litIssuedWarnings) !== null && lo !== void 0 || (q.litIssuedWarnings = /* @__PURE__ */ new Set()), Ue = (o, e) => {
|
|
385
|
+
e += o ? ` See https://lit.dev/msg/${o} for more information.` : "", q.litIssuedWarnings.has(e) || (console.warn(e), q.litIssuedWarnings.add(e));
|
|
386
|
+
}, Ue("dev-mode", "Lit is in dev mode. Not recommended for production!");
|
|
387
|
+
const O = ((co = q.ShadyDOM) === null || co === void 0 ? void 0 : co.inUse) && ((so = q.ShadyDOM) === null || so === void 0 ? void 0 : so.noPatch) === !0 ? q.ShadyDOM.wrap : (o) => o, ue = q.trustedTypes, gt = ue ? ue.createPolicy("lit-html", {
|
|
388
|
+
createHTML: (o) => o
|
|
389
|
+
}) : void 0, jr = (o) => o, Ye = (o, e, t) => jr, Nr = (o) => {
|
|
390
|
+
if (ie !== Ye)
|
|
391
|
+
throw new Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");
|
|
392
|
+
ie = o;
|
|
393
|
+
}, Tr = () => {
|
|
394
|
+
ie = Ye;
|
|
395
|
+
}, Eo = (o, e, t) => ie(o, e, t), Oe = "$lit$", I = `lit$${String(Math.random()).slice(9)}$`, Wo = "?" + I, Ur = `<${Wo}>`, xe = document, ke = (o = "") => xe.createComment(o), we = (o) => o === null || typeof o != "object" && typeof o != "function", It = Array.isArray, Bt = (o) => It(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", bo = `[
|
|
396
|
+
\f\r]`, Or = `[^
|
|
397
|
+
\f\r"'\`<>=]`, Fr = `[^\\s"'>=/]`, me = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ht = 1, go = 2, Lr = 3, pt = /-->/g, mt = />/g, te = new RegExp(`>|${bo}(?:(${Fr}+)(${bo}*=${bo}*(?:${Or}|("|')|))|$)`, "g"), Ir = 0, ft = 1, Br = 2, vt = 3, ho = /'/g, po = /"/g, Vt = /^(?:script|style|textarea|title)$/i, Dt = 1, Fe = 2, Ko = 1, Le = 2, Vr = 3, Dr = 4, Hr = 5, Yo = 6, Wr = 7, Ht = (o) => (e, ...t) => (e.some((r) => r === void 0) && console.warn(`Some template strings are undefined.
|
|
398
|
+
This is probably caused by illegal octal escape sequences.`), {
|
|
399
|
+
_$litType$: o,
|
|
400
|
+
strings: e,
|
|
401
|
+
values: t
|
|
402
|
+
}), p = Ht(Dt), Ze = Ht(Fe), K = Symbol.for("lit-noChange"), z = Symbol.for("lit-nothing"), xt = /* @__PURE__ */ new WeakMap(), ce = xe.createTreeWalker(xe, 129, null, !1);
|
|
403
|
+
let ie = Ye;
|
|
404
|
+
const Wt = (o, e) => {
|
|
405
|
+
const t = o.length - 1, r = [];
|
|
406
|
+
let i = e === Fe ? "<svg>" : "", a, n = me;
|
|
407
|
+
for (let s = 0; s < t; s++) {
|
|
408
|
+
const c = o[s];
|
|
409
|
+
let b = -1, d, g = 0, u;
|
|
410
|
+
for (; g < c.length && (n.lastIndex = g, u = n.exec(c), u !== null); )
|
|
411
|
+
if (g = n.lastIndex, n === me) {
|
|
412
|
+
if (u[ht] === "!--")
|
|
413
|
+
n = pt;
|
|
414
|
+
else if (u[ht] !== void 0)
|
|
415
|
+
n = mt;
|
|
416
|
+
else if (u[go] !== void 0)
|
|
417
|
+
Vt.test(u[go]) && (a = new RegExp(`</${u[go]}`, "g")), n = te;
|
|
418
|
+
else if (u[Lr] !== void 0)
|
|
419
|
+
throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions");
|
|
420
|
+
} else
|
|
421
|
+
n === te ? u[Ir] === ">" ? (n = a != null ? a : me, b = -1) : u[ft] === void 0 ? b = -2 : (b = n.lastIndex - u[Br].length, d = u[ft], n = u[vt] === void 0 ? te : u[vt] === '"' ? po : ho) : n === po || n === ho ? n = te : n === pt || n === mt ? n = me : (n = te, a = void 0);
|
|
422
|
+
console.assert(b === -1 || n === te || n === ho || n === po, "unexpected parse state B");
|
|
423
|
+
const h = n === te && o[s + 1].startsWith("/>") ? " " : "";
|
|
424
|
+
i += n === me ? c + Ur : b >= 0 ? (r.push(d), c.slice(0, b) + Oe + c.slice(b) + I + h) : c + I + (b === -2 ? (r.push(void 0), s) : h);
|
|
425
|
+
}
|
|
426
|
+
const l = i + (o[t] || "<?>") + (e === Fe ? "</svg>" : "");
|
|
427
|
+
if (!Array.isArray(o) || !o.hasOwnProperty("raw")) {
|
|
428
|
+
let s = "invalid template strings array";
|
|
429
|
+
throw s = `
|
|
430
|
+
Internal Error: expected template strings to be an array
|
|
431
|
+
with a 'raw' field. Faking a template strings array by
|
|
432
|
+
calling html or svg like an ordinary function is effectively
|
|
433
|
+
the same as calling unsafeHtml and can lead to major security
|
|
434
|
+
issues, e.g. opening your code up to XSS attacks.
|
|
435
|
+
|
|
436
|
+
If you're using the html or svg tagged template functions normally
|
|
437
|
+
and and still seeing this error, please file a bug at
|
|
438
|
+
https://github.com/lit/lit/issues/new?template=bug_report.md
|
|
439
|
+
and include information about your build tooling, if any.
|
|
440
|
+
`.trim().replace(/\n */g, `
|
|
441
|
+
`), new Error(s);
|
|
442
|
+
}
|
|
443
|
+
return [
|
|
444
|
+
gt !== void 0 ? gt.createHTML(l) : l,
|
|
445
|
+
r
|
|
446
|
+
];
|
|
447
|
+
};
|
|
448
|
+
class ye {
|
|
449
|
+
constructor({ strings: e, ["_$litType$"]: t }, r) {
|
|
450
|
+
this.parts = [];
|
|
451
|
+
let i, a = 0, n = 0;
|
|
452
|
+
const l = e.length - 1, s = this.parts, [c, b] = Wt(e, t);
|
|
453
|
+
if (this.el = ye.createElement(c, r), ce.currentNode = this.el.content, t === Fe) {
|
|
454
|
+
const d = this.el.content, g = d.firstChild;
|
|
455
|
+
g.remove(), d.append(...g.childNodes);
|
|
456
|
+
}
|
|
457
|
+
for (; (i = ce.nextNode()) !== null && s.length < l; ) {
|
|
458
|
+
if (i.nodeType === 1) {
|
|
459
|
+
{
|
|
460
|
+
const d = i.localName;
|
|
461
|
+
if (/^(?:textarea|template)$/i.test(d) && i.innerHTML.includes(I)) {
|
|
462
|
+
const g = `Expressions are not supported inside \`${d}\` elements. See https://lit.dev/msg/expression-in-${d} for more information.`;
|
|
463
|
+
if (d === "template")
|
|
464
|
+
throw new Error(g);
|
|
465
|
+
Ue("", g);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
if (i.hasAttributes()) {
|
|
469
|
+
const d = [];
|
|
470
|
+
for (const g of i.getAttributeNames())
|
|
471
|
+
if (g.endsWith(Oe) || g.startsWith(I)) {
|
|
472
|
+
const u = b[n++];
|
|
473
|
+
if (d.push(g), u !== void 0) {
|
|
474
|
+
const f = i.getAttribute(u.toLowerCase() + Oe).split(I), v = /([.?@])?(.*)/.exec(u);
|
|
475
|
+
s.push({
|
|
476
|
+
type: Ko,
|
|
477
|
+
index: a,
|
|
478
|
+
name: v[2],
|
|
479
|
+
strings: f,
|
|
480
|
+
ctor: v[1] === "." ? Yt : v[1] === "?" ? Zt : v[1] === "@" ? Xt : _e
|
|
481
|
+
});
|
|
482
|
+
} else
|
|
483
|
+
s.push({
|
|
484
|
+
type: Yo,
|
|
485
|
+
index: a
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
for (const g of d)
|
|
489
|
+
i.removeAttribute(g);
|
|
490
|
+
}
|
|
491
|
+
if (Vt.test(i.tagName)) {
|
|
492
|
+
const d = i.textContent.split(I), g = d.length - 1;
|
|
493
|
+
if (g > 0) {
|
|
494
|
+
i.textContent = ue ? ue.emptyScript : "";
|
|
495
|
+
for (let u = 0; u < g; u++)
|
|
496
|
+
i.append(d[u], ke()), ce.nextNode(), s.push({ type: Le, index: ++a });
|
|
497
|
+
i.append(d[g], ke());
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
} else if (i.nodeType === 8)
|
|
501
|
+
if (i.data === Wo)
|
|
502
|
+
s.push({ type: Le, index: a });
|
|
503
|
+
else {
|
|
504
|
+
let g = -1;
|
|
505
|
+
for (; (g = i.data.indexOf(I, g + 1)) !== -1; )
|
|
506
|
+
s.push({ type: Wr, index: a }), g += I.length - 1;
|
|
507
|
+
}
|
|
508
|
+
a++;
|
|
509
|
+
}
|
|
510
|
+
m == null || m({
|
|
511
|
+
kind: "template prep",
|
|
512
|
+
template: this,
|
|
513
|
+
clonableTemplate: this.el,
|
|
514
|
+
parts: this.parts,
|
|
515
|
+
strings: e
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
static createElement(e, t) {
|
|
519
|
+
const r = xe.createElement("template");
|
|
520
|
+
return r.innerHTML = e, r;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
function ne(o, e, t = o, r) {
|
|
524
|
+
var i, a, n, l;
|
|
525
|
+
if (e === K)
|
|
526
|
+
return e;
|
|
527
|
+
let s = r !== void 0 ? (i = t.__directives) === null || i === void 0 ? void 0 : i[r] : t.__directive;
|
|
528
|
+
const c = we(e) ? void 0 : e._$litDirective$;
|
|
529
|
+
return (s == null ? void 0 : s.constructor) !== c && ((a = s == null ? void 0 : s._$notifyDirectiveConnectionChanged) === null || a === void 0 || a.call(s, !1), c === void 0 ? s = void 0 : (s = new c(o), s._$initialize(o, t, r)), r !== void 0 ? ((n = (l = t).__directives) !== null && n !== void 0 ? n : l.__directives = [])[r] = s : t.__directive = s), s !== void 0 && (e = ne(o, s._$resolve(o, e.values), s, r)), e;
|
|
530
|
+
}
|
|
531
|
+
class Kt {
|
|
532
|
+
constructor(e, t) {
|
|
533
|
+
this._parts = [], this._$disconnectableChildren = void 0, this._$template = e, this._$parent = t;
|
|
534
|
+
}
|
|
535
|
+
get parentNode() {
|
|
536
|
+
return this._$parent.parentNode;
|
|
537
|
+
}
|
|
538
|
+
get _$isConnected() {
|
|
539
|
+
return this._$parent._$isConnected;
|
|
540
|
+
}
|
|
541
|
+
_clone(e) {
|
|
542
|
+
var t;
|
|
543
|
+
const { el: { content: r }, parts: i } = this._$template, a = ((t = e == null ? void 0 : e.creationScope) !== null && t !== void 0 ? t : xe).importNode(r, !0);
|
|
544
|
+
ce.currentNode = a;
|
|
545
|
+
let n = ce.nextNode(), l = 0, s = 0, c = i[0];
|
|
546
|
+
for (; c !== void 0; ) {
|
|
547
|
+
if (l === c.index) {
|
|
548
|
+
let b;
|
|
549
|
+
c.type === Le ? b = new he(n, n.nextSibling, this, e) : c.type === Ko ? b = new c.ctor(n, c.name, c.strings, this, e) : c.type === Yo && (b = new Gt(n, this, e)), this._parts.push(b), c = i[++s];
|
|
550
|
+
}
|
|
551
|
+
l !== (c == null ? void 0 : c.index) && (n = ce.nextNode(), l++);
|
|
552
|
+
}
|
|
553
|
+
return a;
|
|
554
|
+
}
|
|
555
|
+
_update(e) {
|
|
556
|
+
let t = 0;
|
|
557
|
+
for (const r of this._parts)
|
|
558
|
+
r !== void 0 && (m == null || m({
|
|
559
|
+
kind: "set part",
|
|
560
|
+
part: r,
|
|
561
|
+
value: e[t],
|
|
562
|
+
valueIndex: t,
|
|
563
|
+
values: e,
|
|
564
|
+
templateInstance: this
|
|
565
|
+
}), r.strings !== void 0 ? (r._$setValue(e, r, t), t += r.strings.length - 2) : r._$setValue(e[t])), t++;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
class he {
|
|
569
|
+
constructor(e, t, r, i) {
|
|
570
|
+
var a;
|
|
571
|
+
this.type = Le, this._$committedValue = z, this._$disconnectableChildren = void 0, this._$startNode = e, this._$endNode = t, this._$parent = r, this.options = i, this.__isConnected = (a = i == null ? void 0 : i.isConnected) !== null && a !== void 0 ? a : !0, this._textSanitizer = void 0;
|
|
572
|
+
}
|
|
573
|
+
get _$isConnected() {
|
|
574
|
+
var e, t;
|
|
575
|
+
return (t = (e = this._$parent) === null || e === void 0 ? void 0 : e._$isConnected) !== null && t !== void 0 ? t : this.__isConnected;
|
|
576
|
+
}
|
|
577
|
+
get parentNode() {
|
|
578
|
+
let e = O(this._$startNode).parentNode;
|
|
579
|
+
const t = this._$parent;
|
|
580
|
+
return t !== void 0 && e.nodeType === 11 && (e = t.parentNode), e;
|
|
581
|
+
}
|
|
582
|
+
get startNode() {
|
|
583
|
+
return this._$startNode;
|
|
584
|
+
}
|
|
585
|
+
get endNode() {
|
|
586
|
+
return this._$endNode;
|
|
587
|
+
}
|
|
588
|
+
_$setValue(e, t = this) {
|
|
589
|
+
var r;
|
|
590
|
+
if (this.parentNode === null)
|
|
591
|
+
throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");
|
|
592
|
+
if (e = ne(this, e, t), we(e))
|
|
593
|
+
e === z || e == null || e === "" ? (this._$committedValue !== z && (m == null || m({
|
|
594
|
+
kind: "commit nothing to child",
|
|
595
|
+
start: this._$startNode,
|
|
596
|
+
end: this._$endNode,
|
|
597
|
+
parent: this._$parent,
|
|
598
|
+
options: this.options
|
|
599
|
+
}), this._$clear()), this._$committedValue = z) : e !== this._$committedValue && e !== K && this._commitText(e);
|
|
600
|
+
else if (e._$litType$ !== void 0)
|
|
601
|
+
this._commitTemplateResult(e);
|
|
602
|
+
else if (e.nodeType !== void 0) {
|
|
603
|
+
if (((r = this.options) === null || r === void 0 ? void 0 : r.host) === e) {
|
|
604
|
+
this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"), console.warn("Attempted to render the template host", e, "inside itself. This is almost always a mistake, and in dev mode ", "we render some warning text. In production however, we'll ", "render it, which will usually result in an error, and sometimes ", "in the element disappearing from the DOM.");
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
this._commitNode(e);
|
|
608
|
+
} else
|
|
609
|
+
Bt(e) ? this._commitIterable(e) : this._commitText(e);
|
|
610
|
+
}
|
|
611
|
+
_insert(e, t = this._$endNode) {
|
|
612
|
+
return O(O(this._$startNode).parentNode).insertBefore(e, t);
|
|
613
|
+
}
|
|
614
|
+
_commitNode(e) {
|
|
615
|
+
var t;
|
|
616
|
+
if (this._$committedValue !== e) {
|
|
617
|
+
if (this._$clear(), ie !== Ye) {
|
|
618
|
+
const r = (t = this._$startNode.parentNode) === null || t === void 0 ? void 0 : t.nodeName;
|
|
619
|
+
if (r === "STYLE" || r === "SCRIPT") {
|
|
620
|
+
let i = "Forbidden";
|
|
621
|
+
throw r === "STYLE" ? i = "Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and make do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets." : i = "Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.", new Error(i);
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
m == null || m({
|
|
625
|
+
kind: "commit node",
|
|
626
|
+
start: this._$startNode,
|
|
627
|
+
parent: this._$parent,
|
|
628
|
+
value: e,
|
|
629
|
+
options: this.options
|
|
630
|
+
}), this._$committedValue = this._insert(e);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
_commitText(e) {
|
|
634
|
+
if (this._$committedValue !== z && we(this._$committedValue)) {
|
|
635
|
+
const t = O(this._$startNode).nextSibling;
|
|
636
|
+
this._textSanitizer === void 0 && (this._textSanitizer = Eo(t, "data", "property")), e = this._textSanitizer(e), m == null || m({
|
|
637
|
+
kind: "commit text",
|
|
638
|
+
node: t,
|
|
639
|
+
value: e,
|
|
640
|
+
options: this.options
|
|
641
|
+
}), t.data = e;
|
|
642
|
+
} else {
|
|
643
|
+
const t = document.createTextNode("");
|
|
644
|
+
this._commitNode(t), this._textSanitizer === void 0 && (this._textSanitizer = Eo(t, "data", "property")), e = this._textSanitizer(e), m == null || m({
|
|
645
|
+
kind: "commit text",
|
|
646
|
+
node: t,
|
|
647
|
+
value: e,
|
|
648
|
+
options: this.options
|
|
649
|
+
}), t.data = e;
|
|
650
|
+
}
|
|
651
|
+
this._$committedValue = e;
|
|
652
|
+
}
|
|
653
|
+
_commitTemplateResult(e) {
|
|
654
|
+
var t;
|
|
655
|
+
const { values: r, ["_$litType$"]: i } = e, a = typeof i == "number" ? this._$getTemplate(e) : (i.el === void 0 && (i.el = ye.createElement(i.h, this.options)), i);
|
|
656
|
+
if (((t = this._$committedValue) === null || t === void 0 ? void 0 : t._$template) === a)
|
|
657
|
+
m == null || m({
|
|
658
|
+
kind: "template updating",
|
|
659
|
+
template: a,
|
|
660
|
+
instance: this._$committedValue,
|
|
661
|
+
parts: this._$committedValue._parts,
|
|
662
|
+
options: this.options,
|
|
663
|
+
values: r
|
|
664
|
+
}), this._$committedValue._update(r);
|
|
665
|
+
else {
|
|
666
|
+
const n = new Kt(a, this), l = n._clone(this.options);
|
|
667
|
+
m == null || m({
|
|
668
|
+
kind: "template instantiated",
|
|
669
|
+
template: a,
|
|
670
|
+
instance: n,
|
|
671
|
+
parts: n._parts,
|
|
672
|
+
options: this.options,
|
|
673
|
+
fragment: l,
|
|
674
|
+
values: r
|
|
675
|
+
}), n._update(r), m == null || m({
|
|
676
|
+
kind: "template instantiated and updated",
|
|
677
|
+
template: a,
|
|
678
|
+
instance: n,
|
|
679
|
+
parts: n._parts,
|
|
680
|
+
options: this.options,
|
|
681
|
+
fragment: l,
|
|
682
|
+
values: r
|
|
683
|
+
}), this._commitNode(l), this._$committedValue = n;
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
_$getTemplate(e) {
|
|
687
|
+
let t = xt.get(e.strings);
|
|
688
|
+
return t === void 0 && xt.set(e.strings, t = new ye(e)), t;
|
|
689
|
+
}
|
|
690
|
+
_commitIterable(e) {
|
|
691
|
+
It(this._$committedValue) || (this._$committedValue = [], this._$clear());
|
|
692
|
+
const t = this._$committedValue;
|
|
693
|
+
let r = 0, i;
|
|
694
|
+
for (const a of e)
|
|
695
|
+
r === t.length ? t.push(i = new he(this._insert(ke()), this._insert(ke()), this, this.options)) : i = t[r], i._$setValue(a), r++;
|
|
696
|
+
r < t.length && (this._$clear(i && O(i._$endNode).nextSibling, r), t.length = r);
|
|
697
|
+
}
|
|
698
|
+
_$clear(e = O(this._$startNode).nextSibling, t) {
|
|
699
|
+
var r;
|
|
700
|
+
for ((r = this._$notifyConnectionChanged) === null || r === void 0 || r.call(this, !1, !0, t); e && e !== this._$endNode; ) {
|
|
701
|
+
const i = O(e).nextSibling;
|
|
702
|
+
O(e).remove(), e = i;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
setConnected(e) {
|
|
706
|
+
var t;
|
|
707
|
+
if (this._$parent === void 0)
|
|
708
|
+
this.__isConnected = e, (t = this._$notifyConnectionChanged) === null || t === void 0 || t.call(this, e);
|
|
709
|
+
else
|
|
710
|
+
throw new Error("part.setConnected() may only be called on a RootPart returned from render().");
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
class _e {
|
|
714
|
+
constructor(e, t, r, i, a) {
|
|
715
|
+
this.type = Ko, this._$committedValue = z, this._$disconnectableChildren = void 0, this.element = e, this.name = t, this._$parent = i, this.options = a, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$committedValue = new Array(r.length - 1).fill(new String()), this.strings = r) : this._$committedValue = z, this._sanitizer = void 0;
|
|
716
|
+
}
|
|
717
|
+
get tagName() {
|
|
718
|
+
return this.element.tagName;
|
|
719
|
+
}
|
|
720
|
+
get _$isConnected() {
|
|
721
|
+
return this._$parent._$isConnected;
|
|
722
|
+
}
|
|
723
|
+
_$setValue(e, t = this, r, i) {
|
|
724
|
+
const a = this.strings;
|
|
725
|
+
let n = !1;
|
|
726
|
+
if (a === void 0)
|
|
727
|
+
e = ne(this, e, t, 0), n = !we(e) || e !== this._$committedValue && e !== K, n && (this._$committedValue = e);
|
|
728
|
+
else {
|
|
729
|
+
const l = e;
|
|
730
|
+
e = a[0];
|
|
731
|
+
let s, c;
|
|
732
|
+
for (s = 0; s < a.length - 1; s++)
|
|
733
|
+
c = ne(this, l[r + s], t, s), c === K && (c = this._$committedValue[s]), n || (n = !we(c) || c !== this._$committedValue[s]), c === z ? e = z : e !== z && (e += (c != null ? c : "") + a[s + 1]), this._$committedValue[s] = c;
|
|
734
|
+
}
|
|
735
|
+
n && !i && this._commitValue(e);
|
|
736
|
+
}
|
|
737
|
+
_commitValue(e) {
|
|
738
|
+
e === z ? O(this.element).removeAttribute(this.name) : (this._sanitizer === void 0 && (this._sanitizer = ie(this.element, this.name, "attribute")), e = this._sanitizer(e != null ? e : ""), m == null || m({
|
|
739
|
+
kind: "commit attribute",
|
|
740
|
+
element: this.element,
|
|
741
|
+
name: this.name,
|
|
742
|
+
value: e,
|
|
743
|
+
options: this.options
|
|
744
|
+
}), O(this.element).setAttribute(this.name, e != null ? e : ""));
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
class Yt extends _e {
|
|
748
|
+
constructor() {
|
|
749
|
+
super(...arguments), this.type = Vr;
|
|
750
|
+
}
|
|
751
|
+
_commitValue(e) {
|
|
752
|
+
this._sanitizer === void 0 && (this._sanitizer = ie(this.element, this.name, "property")), e = this._sanitizer(e), m == null || m({
|
|
753
|
+
kind: "commit property",
|
|
754
|
+
element: this.element,
|
|
755
|
+
name: this.name,
|
|
756
|
+
value: e,
|
|
757
|
+
options: this.options
|
|
758
|
+
}), this.element[this.name] = e === z ? void 0 : e;
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
const Kr = ue ? ue.emptyScript : "";
|
|
762
|
+
class Zt extends _e {
|
|
763
|
+
constructor() {
|
|
764
|
+
super(...arguments), this.type = Dr;
|
|
765
|
+
}
|
|
766
|
+
_commitValue(e) {
|
|
767
|
+
m == null || m({
|
|
768
|
+
kind: "commit boolean attribute",
|
|
769
|
+
element: this.element,
|
|
770
|
+
name: this.name,
|
|
771
|
+
value: !!(e && e !== z),
|
|
772
|
+
options: this.options
|
|
773
|
+
}), e && e !== z ? O(this.element).setAttribute(this.name, Kr) : O(this.element).removeAttribute(this.name);
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
class Xt extends _e {
|
|
777
|
+
constructor(e, t, r, i, a) {
|
|
778
|
+
if (super(e, t, r, i, a), this.type = Hr, this.strings !== void 0)
|
|
779
|
+
throw new Error(`A \`<${e.localName}>\` has a \`@${t}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`);
|
|
780
|
+
}
|
|
781
|
+
_$setValue(e, t = this) {
|
|
782
|
+
var r;
|
|
783
|
+
if (e = (r = ne(this, e, t, 0)) !== null && r !== void 0 ? r : z, e === K)
|
|
784
|
+
return;
|
|
785
|
+
const i = this._$committedValue, a = e === z && i !== z || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, n = e !== z && (i === z || a);
|
|
786
|
+
m == null || m({
|
|
787
|
+
kind: "commit event listener",
|
|
788
|
+
element: this.element,
|
|
789
|
+
name: this.name,
|
|
790
|
+
value: e,
|
|
791
|
+
options: this.options,
|
|
792
|
+
removeListener: a,
|
|
793
|
+
addListener: n,
|
|
794
|
+
oldListener: i
|
|
795
|
+
}), a && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, e), this._$committedValue = e;
|
|
796
|
+
}
|
|
797
|
+
handleEvent(e) {
|
|
798
|
+
var t, r;
|
|
799
|
+
typeof this._$committedValue == "function" ? this._$committedValue.call((r = (t = this.options) === null || t === void 0 ? void 0 : t.host) !== null && r !== void 0 ? r : this.element, e) : this._$committedValue.handleEvent(e);
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
class Gt {
|
|
803
|
+
constructor(e, t, r) {
|
|
804
|
+
this.element = e, this.type = Yo, this._$disconnectableChildren = void 0, this._$parent = t, this.options = r;
|
|
805
|
+
}
|
|
806
|
+
get _$isConnected() {
|
|
807
|
+
return this._$parent._$isConnected;
|
|
808
|
+
}
|
|
809
|
+
_$setValue(e) {
|
|
810
|
+
m == null || m({
|
|
811
|
+
kind: "commit to element binding",
|
|
812
|
+
element: this.element,
|
|
813
|
+
value: e,
|
|
814
|
+
options: this.options
|
|
815
|
+
}), ne(this, e);
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
const Yr = {
|
|
819
|
+
_boundAttributeSuffix: Oe,
|
|
820
|
+
_marker: I,
|
|
821
|
+
_markerMatch: Wo,
|
|
822
|
+
_HTML_RESULT: Dt,
|
|
823
|
+
_getTemplateHtml: Wt,
|
|
824
|
+
_TemplateInstance: Kt,
|
|
825
|
+
_isIterable: Bt,
|
|
826
|
+
_resolveDirective: ne,
|
|
827
|
+
_ChildPart: he,
|
|
828
|
+
_AttributePart: _e,
|
|
829
|
+
_BooleanAttributePart: Zt,
|
|
830
|
+
_EventPart: Xt,
|
|
831
|
+
_PropertyPart: Yt,
|
|
832
|
+
_ElementPart: Gt
|
|
833
|
+
}, mo = q.litHtmlPolyfillSupportDevMode;
|
|
834
|
+
mo == null || mo(ye, he);
|
|
835
|
+
((uo = q.litHtmlVersions) !== null && uo !== void 0 ? uo : q.litHtmlVersions = []).push("2.6.1");
|
|
836
|
+
q.litHtmlVersions.length > 1 && Ue("multiple-versions", "Multiple versions of Lit loaded. Loading multiple versions is not recommended.");
|
|
837
|
+
const Me = (o, e, t) => {
|
|
838
|
+
var r, i;
|
|
839
|
+
if (e == null)
|
|
840
|
+
throw new TypeError(`The container to render into may not be ${e}`);
|
|
841
|
+
const a = Pr++, n = (r = t == null ? void 0 : t.renderBefore) !== null && r !== void 0 ? r : e;
|
|
842
|
+
let l = n._$litPart$;
|
|
843
|
+
if (m == null || m({
|
|
844
|
+
kind: "begin render",
|
|
845
|
+
id: a,
|
|
846
|
+
value: o,
|
|
847
|
+
container: e,
|
|
848
|
+
options: t,
|
|
849
|
+
part: l
|
|
850
|
+
}), l === void 0) {
|
|
851
|
+
const s = (i = t == null ? void 0 : t.renderBefore) !== null && i !== void 0 ? i : null;
|
|
852
|
+
n._$litPart$ = l = new he(e.insertBefore(ke(), s), s, void 0, t != null ? t : {});
|
|
853
|
+
}
|
|
854
|
+
return l._$setValue(o), m == null || m({
|
|
855
|
+
kind: "end render",
|
|
856
|
+
id: a,
|
|
857
|
+
value: o,
|
|
858
|
+
container: e,
|
|
859
|
+
options: t,
|
|
860
|
+
part: l
|
|
861
|
+
}), l;
|
|
862
|
+
};
|
|
863
|
+
Me.setSanitizer = Nr, Me.createSanitizer = Eo, Me._testOnlyClearSanitizerFactoryDoNotCallOrElse = Tr;
|
|
864
|
+
/**
|
|
18
865
|
* @license
|
|
19
866
|
* Copyright 2017 Google LLC
|
|
20
867
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/
|
|
868
|
+
*/
|
|
869
|
+
var fo, vo, xo;
|
|
870
|
+
let Zo;
|
|
871
|
+
{
|
|
872
|
+
const o = (fo = globalThis.litIssuedWarnings) !== null && fo !== void 0 ? fo : globalThis.litIssuedWarnings = /* @__PURE__ */ new Set();
|
|
873
|
+
Zo = (e, t) => {
|
|
874
|
+
t += ` See https://lit.dev/msg/${e} for more information.`, o.has(t) || (console.warn(t), o.add(t));
|
|
875
|
+
};
|
|
876
|
+
}
|
|
877
|
+
class $ extends V {
|
|
878
|
+
constructor() {
|
|
879
|
+
super(...arguments), this.renderOptions = { host: this }, this.__childPart = void 0;
|
|
880
|
+
}
|
|
881
|
+
createRenderRoot() {
|
|
882
|
+
var e, t;
|
|
883
|
+
const r = super.createRenderRoot();
|
|
884
|
+
return (e = (t = this.renderOptions).renderBefore) !== null && e !== void 0 || (t.renderBefore = r.firstChild), r;
|
|
885
|
+
}
|
|
886
|
+
update(e) {
|
|
887
|
+
const t = this.render();
|
|
888
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this.__childPart = Me(t, this.renderRoot, this.renderOptions);
|
|
889
|
+
}
|
|
890
|
+
connectedCallback() {
|
|
891
|
+
var e;
|
|
892
|
+
super.connectedCallback(), (e = this.__childPart) === null || e === void 0 || e.setConnected(!0);
|
|
893
|
+
}
|
|
894
|
+
disconnectedCallback() {
|
|
895
|
+
var e;
|
|
896
|
+
super.disconnectedCallback(), (e = this.__childPart) === null || e === void 0 || e.setConnected(!1);
|
|
897
|
+
}
|
|
898
|
+
render() {
|
|
899
|
+
return K;
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
$.finalized = !0;
|
|
903
|
+
$._$litElement$ = !0;
|
|
904
|
+
(vo = globalThis.litElementHydrateSupport) === null || vo === void 0 || vo.call(globalThis, { LitElement: $ });
|
|
905
|
+
const ko = globalThis.litElementPolyfillSupportDevMode;
|
|
906
|
+
ko == null || ko({ LitElement: $ });
|
|
907
|
+
$.finalize = function() {
|
|
908
|
+
if (!V.finalize.call(this))
|
|
909
|
+
return !1;
|
|
910
|
+
const e = (t, r, i = !1) => {
|
|
911
|
+
if (t.hasOwnProperty(r)) {
|
|
912
|
+
const a = (typeof t == "function" ? t : t.constructor).name;
|
|
913
|
+
Zo(i ? "renamed-api" : "removed-api", `\`${r}\` is implemented on class ${a}. It has been ${i ? "renamed" : "removed"} in this version of LitElement.`);
|
|
914
|
+
}
|
|
915
|
+
};
|
|
916
|
+
return e(this, "render"), e(this, "getStyles", !0), e(this.prototype, "adoptStyles"), !0;
|
|
917
|
+
};
|
|
918
|
+
((xo = globalThis.litElementVersions) !== null && xo !== void 0 ? xo : globalThis.litElementVersions = []).push("3.2.2");
|
|
919
|
+
globalThis.litElementVersions.length > 1 && Zo("multiple-versions", "Multiple versions of Lit loaded. Loading multiple versions is not recommended.");
|
|
920
|
+
/**
|
|
22
921
|
* @license
|
|
23
922
|
* Copyright 2017 Google LLC
|
|
24
923
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/
|
|
924
|
+
*/
|
|
925
|
+
const Xo = {
|
|
926
|
+
ATTRIBUTE: 1,
|
|
927
|
+
CHILD: 2,
|
|
928
|
+
PROPERTY: 3,
|
|
929
|
+
BOOLEAN_ATTRIBUTE: 4,
|
|
930
|
+
EVENT: 5,
|
|
931
|
+
ELEMENT: 6
|
|
932
|
+
}, Go = (o) => (...e) => ({
|
|
933
|
+
_$litDirective$: o,
|
|
934
|
+
values: e
|
|
935
|
+
});
|
|
936
|
+
class Jo {
|
|
937
|
+
constructor(e) {
|
|
938
|
+
}
|
|
939
|
+
get _$isConnected() {
|
|
940
|
+
return this._$parent._$isConnected;
|
|
941
|
+
}
|
|
942
|
+
_$initialize(e, t, r) {
|
|
943
|
+
this.__part = e, this._$parent = t, this.__attributeIndex = r;
|
|
944
|
+
}
|
|
945
|
+
_$resolve(e, t) {
|
|
946
|
+
return this.update(e, t);
|
|
947
|
+
}
|
|
948
|
+
update(e, t) {
|
|
949
|
+
return this.render(...t);
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
26
953
|
* @license
|
|
27
954
|
* Copyright 2017 Google LLC
|
|
28
955
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
956
|
+
*/
|
|
957
|
+
const Zr = 1;
|
|
958
|
+
class Qo extends Jo {
|
|
959
|
+
constructor(e) {
|
|
960
|
+
if (super(e), this._value = z, e.type !== Xo.CHILD)
|
|
961
|
+
throw new Error(`${this.constructor.directiveName}() can only be used in child bindings`);
|
|
962
|
+
}
|
|
963
|
+
render(e) {
|
|
964
|
+
if (e === z || e == null)
|
|
965
|
+
return this._templateResult = void 0, this._value = e;
|
|
966
|
+
if (e === K)
|
|
967
|
+
return e;
|
|
968
|
+
if (typeof e != "string")
|
|
969
|
+
throw new Error(`${this.constructor.directiveName}() called with a non-string value`);
|
|
970
|
+
if (e === this._value)
|
|
971
|
+
return this._templateResult;
|
|
972
|
+
this._value = e;
|
|
973
|
+
const t = [e];
|
|
974
|
+
return t.raw = t, this._templateResult = {
|
|
975
|
+
_$litType$: this.constructor.resultType,
|
|
976
|
+
strings: t,
|
|
977
|
+
values: []
|
|
978
|
+
};
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
Qo.directiveName = "unsafeHTML";
|
|
982
|
+
Qo.resultType = Zr;
|
|
983
|
+
const et = Go(Qo);
|
|
984
|
+
function Xr(o) {
|
|
985
|
+
return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
|
|
986
|
+
}
|
|
987
|
+
var Ro = { exports: {} };
|
|
988
|
+
(function(o, e) {
|
|
989
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
990
|
+
class t {
|
|
991
|
+
constructor(b, d) {
|
|
992
|
+
this.stream = b, this.pos = d;
|
|
993
|
+
}
|
|
994
|
+
get value() {
|
|
995
|
+
return this.stream[this.pos];
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
class r {
|
|
999
|
+
constructor(b, d, g) {
|
|
1000
|
+
this.stream = b, this.start = d, this.end = g;
|
|
1001
|
+
}
|
|
1002
|
+
get value() {
|
|
1003
|
+
return this.stream.slice(this.start, this.end);
|
|
1004
|
+
}
|
|
1005
|
+
get whitespace() {
|
|
1006
|
+
let b = this.start - 1;
|
|
1007
|
+
for (; b >= 0 && /\s/.test(this.stream[b]); b--)
|
|
1008
|
+
;
|
|
1009
|
+
return new r(this.stream, b + 1, this.start);
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
function i(c, b, d = /\S/g) {
|
|
1013
|
+
if (!d.global)
|
|
1014
|
+
throw new Error("Regexp must be global");
|
|
1015
|
+
d.lastIndex = b;
|
|
1016
|
+
const g = d.exec(c);
|
|
1017
|
+
if (!!g)
|
|
1018
|
+
return new t(c, g.index);
|
|
1019
|
+
}
|
|
1020
|
+
function a(c, b) {
|
|
1021
|
+
let d = i(c, b);
|
|
1022
|
+
if (!d)
|
|
1023
|
+
return;
|
|
1024
|
+
const g = d.pos;
|
|
1025
|
+
d = i(c, g + 1, /[\s<]|>/g);
|
|
1026
|
+
const u = d ? d.pos + Number(d.value == ">") : c.length;
|
|
1027
|
+
return new r(c, g, u);
|
|
1028
|
+
}
|
|
1029
|
+
const n = [
|
|
1030
|
+
"area",
|
|
1031
|
+
"base",
|
|
1032
|
+
"br",
|
|
1033
|
+
"col",
|
|
1034
|
+
"command",
|
|
1035
|
+
"embed",
|
|
1036
|
+
"hr",
|
|
1037
|
+
"img",
|
|
1038
|
+
"input",
|
|
1039
|
+
"keygen",
|
|
1040
|
+
"link",
|
|
1041
|
+
"menuitem",
|
|
1042
|
+
"meta",
|
|
1043
|
+
"param",
|
|
1044
|
+
"source",
|
|
1045
|
+
"track",
|
|
1046
|
+
"wbr",
|
|
1047
|
+
"!doctype",
|
|
1048
|
+
"--"
|
|
1049
|
+
];
|
|
1050
|
+
function l(c) {
|
|
1051
|
+
let b = c.replace(/^<\/?|>$/g, "").toLowerCase();
|
|
1052
|
+
(b.startsWith("!--") || b.endsWith("--")) && (b = "--");
|
|
1053
|
+
const d = /</.test(c), g = />/.test(c), u = /<([^/]|$)/.test(c), h = /<\//.test(c) || u && n.includes(b);
|
|
1054
|
+
return {
|
|
1055
|
+
isTagStart: d,
|
|
1056
|
+
isTagEnd: g,
|
|
1057
|
+
isStartTag: u,
|
|
1058
|
+
isEndTag: h,
|
|
1059
|
+
tagName: b
|
|
1060
|
+
};
|
|
1061
|
+
}
|
|
1062
|
+
function s(c, b = " ", d = 80) {
|
|
1063
|
+
const g = [];
|
|
1064
|
+
let u = !1, h = !1, f = !1, v = !1, x = "", y = 0, S = {}, w, F = 0;
|
|
1065
|
+
for (; w = a(c, F); ) {
|
|
1066
|
+
let C = w.value, X = w.whitespace.value, N = "", { isTagStart: E, isTagEnd: A, isStartTag: M, isEndTag: T, tagName: P } = l(C);
|
|
1067
|
+
if (!v) {
|
|
1068
|
+
if (E && !P) {
|
|
1069
|
+
if (F = w.end, w = a(c, F), !w)
|
|
1070
|
+
break;
|
|
1071
|
+
C += w.value, { isTagStart: E, isTagEnd: A, isStartTag: M, isEndTag: T, tagName: P } = l(C);
|
|
1072
|
+
}
|
|
1073
|
+
if (!E && (u || h)) {
|
|
1074
|
+
const pe = /[^=]"\w/g.exec(C);
|
|
1075
|
+
pe && w.end != w.start + pe.index + 2 && (w.end = w.start + pe.index + 2, C = w.value, { isTagStart: E, isTagEnd: A, isStartTag: M, isEndTag: T, tagName: P } = l(C), N = b);
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
!v && M && (x = P);
|
|
1079
|
+
const G = (T && P != "--" || A && P == "--") && P == x;
|
|
1080
|
+
v && !G && (E = A = M = T = !1), M && (u = !0), T && (h = !0), T && !M && --y;
|
|
1081
|
+
const eo = u && A && ["script", "style"].includes(x) || M && x == "--", at = u || h, lt = X || S.pendingWhitespace, xr = /^=([^!=]|$)/.test(C) || /^"/.test(C) && /(^|[^!=])=$/.test(S.tokenValue), kr = at && (xr || /^>/.test(C));
|
|
1082
|
+
if (v || f)
|
|
1083
|
+
g.push(X);
|
|
1084
|
+
else if (lt && !kr) {
|
|
1085
|
+
const oo = (lt.match(/\n/g) || []).length, pe = Math.max(0, g.lastIndexOf(`
|
|
1086
|
+
`)), wr = g.slice(pe).reduce((yr, $r) => yr + $r.length, 0), ct = b.repeat(y + Number(at && !E));
|
|
1087
|
+
wr + C.length > d ? g.push(`
|
|
1088
|
+
`, ct) : oo ? g.push(...Array(oo).fill(`
|
|
1089
|
+
`), ct) : g.push(" ");
|
|
1090
|
+
}
|
|
1091
|
+
g.push(C), S = { pendingWhitespace: N, tokenValue: C }, eo && (v = !0), G && (v = !1), u && A && x == "pre" && (f = !0), T && P == "pre" && (f = !1), u && A && !h && ++y, A && (u = h = !1), F = w.end;
|
|
1092
|
+
}
|
|
1093
|
+
return c[c.length - 1] == `
|
|
1094
|
+
` && g.push(`
|
|
1095
|
+
`), g.join("");
|
|
1096
|
+
}
|
|
1097
|
+
e.default = s, o.exports = Object.assign(e.default, e);
|
|
1098
|
+
})(Ro, Ro.exports);
|
|
1099
|
+
const Gr = /* @__PURE__ */ Xr(Ro.exports);
|
|
1100
|
+
class Jt extends $ {
|
|
1101
|
+
static get properties() {
|
|
1102
|
+
return {
|
|
1103
|
+
source: { attribute: !1 }
|
|
1104
|
+
};
|
|
1105
|
+
}
|
|
1106
|
+
firstUpdated() {
|
|
1107
|
+
let t = this.shadowRoot.querySelector("slot").assignedNodes().map((i) => i.nodeType === Node.TEXT_NODE ? i.textContent : i.outerHTML).join("").trim();
|
|
1108
|
+
t = Gr(t);
|
|
1109
|
+
const r = window == null ? void 0 : window.Prism.highlight(t, window.Prism.languages.markup, "html");
|
|
1110
|
+
this.source = r;
|
|
1111
|
+
}
|
|
1112
|
+
render() {
|
|
1113
|
+
return p` <link
|
|
1114
|
+
rel="stylesheet"
|
|
1115
|
+
href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/themes/prism.min.css"
|
|
1116
|
+
integrity="sha512-tN7Ec6zAFaVSG3TpNAKtk4DOHNpSwKHxxrsiw4GHKESGPs5njn/0sMCUMl2svV4wo4BK/rCP7juYz+zx+l6oeQ=="
|
|
1117
|
+
crossorigin="anonymous"
|
|
1118
|
+
/>
|
|
1119
|
+
<slot></slot>
|
|
1120
|
+
<pre><code>${et(this.source)}</code></pre>`;
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
k(Jt, "styles", R`
|
|
35
1124
|
:host {
|
|
36
1125
|
display: block;
|
|
37
1126
|
margin-top: 20px;
|
|
@@ -50,14 +1139,9 @@ import lo from"https://assets.finn.no/pkg/@warp-ds/tokens/v1/finn-no.css?used&in
|
|
|
50
1139
|
slot {
|
|
51
1140
|
display: none;
|
|
52
1141
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
integrity="sha512-tN7Ec6zAFaVSG3TpNAKtk4DOHNpSwKHxxrsiw4GHKESGPs5njn/0sMCUMl2svV4wo4BK/rCP7juYz+zx+l6oeQ=="
|
|
57
|
-
crossorigin="anonymous"
|
|
58
|
-
/>
|
|
59
|
-
<slot></slot>
|
|
60
|
-
<pre><code>${Qe(this.source)}</code></pre>`}}customElements.define("syntax-highlight",Et);const Rt=()=>p`<svg
|
|
1142
|
+
`);
|
|
1143
|
+
customElements.define("syntax-highlight", Jt);
|
|
1144
|
+
const Jr = () => p`<svg
|
|
61
1145
|
aria-label="Rødt utropstegn"
|
|
62
1146
|
role="img"
|
|
63
1147
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -65,8 +1149,8 @@ import lo from"https://assets.finn.no/pkg/@warp-ds/tokens/v1/finn-no.css?used&in
|
|
|
65
1149
|
height="16"
|
|
66
1150
|
fill="none"
|
|
67
1151
|
>
|
|
68
|
-
${
|
|
69
|
-
</svg>`,
|
|
1152
|
+
${ti}
|
|
1153
|
+
</svg>`, Qr = () => p`<svg
|
|
70
1154
|
aria-label="Grønt hake"
|
|
71
1155
|
role="img"
|
|
72
1156
|
width="16"
|
|
@@ -74,8 +1158,8 @@ import lo from"https://assets.finn.no/pkg/@warp-ds/tokens/v1/finn-no.css?used&in
|
|
|
74
1158
|
fill="none"
|
|
75
1159
|
xmlns="http://www.w3.org/2000/svg"
|
|
76
1160
|
>
|
|
77
|
-
${
|
|
78
|
-
</svg> `,
|
|
1161
|
+
${ri}
|
|
1162
|
+
</svg> `, ei = () => p`<svg
|
|
79
1163
|
aria-label="Gult utropstegn"
|
|
80
1164
|
role="img"
|
|
81
1165
|
width="16"
|
|
@@ -83,8 +1167,8 @@ import lo from"https://assets.finn.no/pkg/@warp-ds/tokens/v1/finn-no.css?used&in
|
|
|
83
1167
|
fill="none"
|
|
84
1168
|
xmlns="http://www.w3.org/2000/svg"
|
|
85
1169
|
>
|
|
86
|
-
${
|
|
87
|
-
</svg> `,
|
|
1170
|
+
${ii}
|
|
1171
|
+
</svg> `, oi = () => p`<svg
|
|
88
1172
|
aria-label="Info"
|
|
89
1173
|
role="img"
|
|
90
1174
|
width="16"
|
|
@@ -92,8 +1176,8 @@ import lo from"https://assets.finn.no/pkg/@warp-ds/tokens/v1/finn-no.css?used&in
|
|
|
92
1176
|
fill="none"
|
|
93
1177
|
xmlns="http://www.w3.org/2000/svg"
|
|
94
1178
|
>
|
|
95
|
-
${
|
|
96
|
-
</svg>`,
|
|
1179
|
+
${ni}
|
|
1180
|
+
</svg>`, ti = Ze`<path
|
|
97
1181
|
d="M4.1.586A2 2 0 0 1 5.516 0h4.97A2 2 0 0 1 11.9.586L15.413 4.1A2 2 0 0 1 16 5.514v4.97a2 2 0 0 1-.586 1.415L11.9 15.413a2 2 0 0 1-1.415.586h-4.97a2 2 0 0 1-1.414-.586L.586 11.9A2 2 0 0 1 0 10.485v-4.97A2 2 0 0 1 .586 4.1L4.1.586Z"
|
|
98
1182
|
fill="currentColor"
|
|
99
1183
|
/>
|
|
@@ -103,13 +1187,13 @@ clip-rule="evenodd"
|
|
|
103
1187
|
d="M8 3.25a.75.75 0 0 1 .75.75v5a.75.75 0 0 1-1.5 0V4A.75.75 0 0 1 8 3.25Z"
|
|
104
1188
|
fill="#fff"
|
|
105
1189
|
/>
|
|
106
|
-
<path d="M8.8 11.8a.8.8 0 1 1-1.6 0 .8.8 0 0 1 1.6 0Z" fill="#fff" />`,
|
|
1190
|
+
<path d="M8.8 11.8a.8.8 0 1 1-1.6 0 .8.8 0 0 1 1.6 0Z" fill="#fff" />`, ri = Ze`<circle cx="8" cy="8" r="8" transform="rotate(180 8 8)" fill="currentColor" />
|
|
107
1191
|
<path
|
|
108
1192
|
fill-rule="evenodd"
|
|
109
1193
|
clip-rule="evenodd"
|
|
110
1194
|
d="M11.5 4.94c.3.27.34.75.06 1.06l-4 4.5a.75.75 0 0 1-1.09.03l-2-2a.75.75 0 0 1 1.06-1.06l1.44 1.44L10.44 5a.75.75 0 0 1 1.06-.07Z"
|
|
111
1195
|
fill="#fff"
|
|
112
|
-
/>`,
|
|
1196
|
+
/>`, ii = Ze`<path
|
|
113
1197
|
d="M.24 12 6.16 1.09a2.1 2.1 0 0 1 3.68 0l5.92 10.93c.73 1.36-.28 2.99-1.85 2.99H2.1a2.04 2.04 0 0 1-1.85-3Z"
|
|
114
1198
|
fill="currentColor"
|
|
115
1199
|
/>
|
|
@@ -119,14 +1203,79 @@ clip-rule="evenodd"
|
|
|
119
1203
|
d="M8 3.25c.41 0 .75.34.75.75v5a.75.75 0 0 1-1.5 0V4c0-.41.34-.75.75-.75Z"
|
|
120
1204
|
fill="#fff"
|
|
121
1205
|
/>
|
|
122
|
-
<path d="M8.8 11.8a.8.8 0 1 1-1.6 0 .8.8 0 0 1 1.6 0Z" fill="#fff" />`,
|
|
1206
|
+
<path d="M8.8 11.8a.8.8 0 1 1-1.6 0 .8.8 0 0 1 1.6 0Z" fill="#fff" />`, ni = Ze`<circle cx="8" cy="8" r="8" fill="currentColor" />
|
|
123
1207
|
<path
|
|
124
1208
|
fill-rule="evenodd"
|
|
125
1209
|
clip-rule="evenodd"
|
|
126
1210
|
d="M7.25 12a.75.75 0 0 0 1.5 0V8a.75.75 0 0 0-1.5 0v4ZM8 4a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"
|
|
127
1211
|
fill="#fff"
|
|
128
|
-
/>`,
|
|
129
|
-
negative
|
|
1212
|
+
/>`, kt = {
|
|
1213
|
+
negative: {
|
|
1214
|
+
color: "red",
|
|
1215
|
+
icon: Jr(),
|
|
1216
|
+
bgColor: "bg-red-50",
|
|
1217
|
+
borderColor: "border-red-300",
|
|
1218
|
+
textColor: "text-red-600"
|
|
1219
|
+
},
|
|
1220
|
+
positive: {
|
|
1221
|
+
color: "green",
|
|
1222
|
+
icon: Qr(),
|
|
1223
|
+
bgColor: "bg-green-50",
|
|
1224
|
+
borderColor: "border-green-300",
|
|
1225
|
+
textColor: "text-green-600"
|
|
1226
|
+
},
|
|
1227
|
+
warning: {
|
|
1228
|
+
color: "yellow",
|
|
1229
|
+
icon: ei(),
|
|
1230
|
+
bgColor: "bg-yellow-50",
|
|
1231
|
+
borderColor: "border-yellow-300",
|
|
1232
|
+
textColor: "text-yellow-600"
|
|
1233
|
+
},
|
|
1234
|
+
info: {
|
|
1235
|
+
color: "aqua",
|
|
1236
|
+
icon: oi(),
|
|
1237
|
+
bgColor: "bg-aqua-50",
|
|
1238
|
+
borderColor: "border-aqua-300",
|
|
1239
|
+
textColor: "text-aqua-600"
|
|
1240
|
+
}
|
|
1241
|
+
};
|
|
1242
|
+
class Ao extends $ {
|
|
1243
|
+
constructor() {
|
|
1244
|
+
super(), this.show = !1, this.role = "alert";
|
|
1245
|
+
}
|
|
1246
|
+
connectedCallback() {
|
|
1247
|
+
if (super.connectedCallback(), !this.variant || !Object.keys(kt).includes(this.variant))
|
|
1248
|
+
throw new Error(
|
|
1249
|
+
`Invalid "variant" attribute. Set its value to one of the following:
|
|
1250
|
+
negative, positive, warning, info.`
|
|
1251
|
+
);
|
|
1252
|
+
}
|
|
1253
|
+
get _style() {
|
|
1254
|
+
return this.variant ? kt[this.variant] : {};
|
|
1255
|
+
}
|
|
1256
|
+
render() {
|
|
1257
|
+
const { color: e, icon: t, bgColor: r, borderColor: i, textColor: a } = this._style;
|
|
1258
|
+
return p`
|
|
1259
|
+
<w-expand-transition ?show=${this.show}>
|
|
1260
|
+
<div
|
|
1261
|
+
role=${this.role}
|
|
1262
|
+
class="${`flex p-16 border rounded-4 border-l-4 ${r} ${i}`}"
|
|
1263
|
+
style="border-left-color:var(--w-${e}-600)"
|
|
1264
|
+
>
|
|
1265
|
+
<div class="mr-8 ${a}">${t}</div>
|
|
1266
|
+
<div class="text-14">
|
|
1267
|
+
<slot></slot>
|
|
1268
|
+
</div>
|
|
1269
|
+
</div>
|
|
1270
|
+
</w-expand-transition>
|
|
1271
|
+
`;
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
k(Ao, "properties", {
|
|
1275
|
+
variant: { type: String, reflect: !0 },
|
|
1276
|
+
show: { type: Boolean, reflect: !0 },
|
|
1277
|
+
role: { type: String, reflect: !0 }
|
|
1278
|
+
}), k(Ao, "styles", R`
|
|
130
1279
|
/* /* layer: preflights */
|
|
131
1280
|
|
|
132
1281
|
/*
|
|
@@ -702,24 +1851,223 @@ video {
|
|
|
702
1851
|
::slotted(:last-child) {
|
|
703
1852
|
margin-bottom: 0px !important;
|
|
704
1853
|
}
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
1854
|
+
`);
|
|
1855
|
+
customElements.get("w-alert") || customElements.define("w-alert", Ao);
|
|
1856
|
+
const Q = {
|
|
1857
|
+
base: "border-2 relative",
|
|
1858
|
+
tooltip: "bg-gray-700 border-gray-700 text-white rounded-4 py-6 px-8",
|
|
1859
|
+
callout: "bg-green-100 border-green-400 py-8 px-16 rounded-8",
|
|
1860
|
+
popover: "bg-white border-white rounded-8 p-16 filter drop-shadow-20",
|
|
1861
|
+
arrowBase: "absolute h-14 w-14 border-2 border-b-0 border-r-0 transform",
|
|
1862
|
+
arrowTooltip: "bg-gray-700 border-gray-700",
|
|
1863
|
+
arrowCallout: "bg-green-100 border-green-400",
|
|
1864
|
+
arrowPopover: "bg-white border-white"
|
|
1865
|
+
}, le = {
|
|
1866
|
+
box: "group block relative break-words last-child:mb-0 p-16 rounded-8",
|
|
1867
|
+
bleed: "-mx-16 sm:mx-0 rounded-l-0 rounded-r-0 sm:rounded-8"
|
|
1868
|
+
}, H = {
|
|
1869
|
+
card: "cursor-pointer overflow-hidden relative transition-all outline-none",
|
|
1870
|
+
cardShadow: "f-card rounded-8",
|
|
1871
|
+
cardFlat: "border-2 rounded-4",
|
|
1872
|
+
cardFlatUnselected: "border-bluegray-300 hover:bg-gray-50 hover:border-bluegray-400 active:border-bluegray-300",
|
|
1873
|
+
cardFlatSelected: "border-blue-600 bg-blue-50 hover:bg-blue-100 hover:border-blue-700 active:border-blue-600",
|
|
1874
|
+
cardSelected: "border-blue-600 bg-blue-50 hover:bg-blue-100 hover:border-blue-700 active:border-blue-600",
|
|
1875
|
+
cardOutline: "f-card-outline absolute rounded-8 inset-0 transition-all border-2",
|
|
1876
|
+
cardOutlineUnselected: "border-transparent",
|
|
1877
|
+
cardOutlineSelected: "border-blue-600 hover:border-blue-700"
|
|
1878
|
+
}, wt = {
|
|
1879
|
+
toasterContainer: "fixed fixed-ios-fix bottom-16 left-0 right-0 mx-8 sm:mx-16 z-50 pointer-events-none",
|
|
1880
|
+
toaster: "f-toaster grid f-grid auto-rows-auto justify-items-center justify-center mx-auto pointer-events-none"
|
|
1881
|
+
}, j = {
|
|
1882
|
+
toastWrapper: "relative overflow-hidden w-full",
|
|
1883
|
+
toast: "toast flex group p-8 mt-16 rounded-8 border-2 w-full pointer-events-auto transition-all",
|
|
1884
|
+
toastPositive: "bg-green-50 border-green-300 text-green-800",
|
|
1885
|
+
toastWarning: "bg-yellow-50 border-yellow-300 text-yellow-800",
|
|
1886
|
+
toastNegative: "bg-red-50 border-red-300 text-red-800",
|
|
1887
|
+
toastNeutral: "bg-gray-50 border-gray-300 text-gray-800",
|
|
1888
|
+
toastIcon: "flex-shrink-0 rounded-full w-16 h-16 m-8",
|
|
1889
|
+
toastIconPositive: "bg-green-300",
|
|
1890
|
+
toastIconWarning: "bg-yellow-300",
|
|
1891
|
+
toastIconNegative: "bg-red-300",
|
|
1892
|
+
toastIconNeutral: "bg-gray-300",
|
|
1893
|
+
toastIconLoading: "animate-bounce",
|
|
1894
|
+
toastContent: "self-center mr-8 py-4 last-child:mb-0",
|
|
1895
|
+
toastClose: "ml-auto p-8"
|
|
1896
|
+
}, ai = "focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 p-0 inline-block", Qt = "absolute top-0 bottom-0 hover:text-aqua-400 flex justify-center items-center focus-ring ", li = {
|
|
1897
|
+
wrapper: Qt + "right-0",
|
|
1898
|
+
wrapperWithLabel: "w-max pr-12",
|
|
1899
|
+
wrapperWithIcon: "w-40",
|
|
1900
|
+
label: "field-label pb-0 text-12"
|
|
1901
|
+
}, ci = {
|
|
1902
|
+
wrapper: Qt + "left-0",
|
|
1903
|
+
wrapperWithLabel: "w-max pl-12",
|
|
1904
|
+
wrapperWithIcon: "w-40",
|
|
1905
|
+
label: "field-label pb-0 text-secondary text-12"
|
|
1906
|
+
}, U = {
|
|
1907
|
+
buttonSecondary: "py-10 px-14 border-2 font-bold rounded-8 leading-24 max-w-max focusable justify-center transition-colors ease-in-out i-text-$color-button-secondary-text i-border-$color-button-secondary-border i-bg-$color-button-secondary-background hover:i-bg-$color-button-secondary-background-hover hover:i-border-$color-button-secondary-border-hover active:i-bg-$color-button-secondary-background-active",
|
|
1908
|
+
buttonPrimary: "py-12 px-16 border-0 font-bold rounded-8 leading-24 max-w-max focusable justify-center transition-colors ease-in-out i-text-$color-button-primary-text i-bg-$color-button-primary-background hover:i-bg-$color-button-primary-background-hover! active:i-bg-$color-button-primary-background-active",
|
|
1909
|
+
buttonFlat: "py-12 px-16 border-0! font-bold rounded-8 leading-24 max-w-max focusable justify-center transition-colors ease-in-out i-bg-$color-button-quiet-background i-text-$color-button-quiet-text hover:i-bg-$color-button-quiet-background-hover active:i-bg-$color-button-quiet-background-active",
|
|
1910
|
+
buttonDestructive: "py-12 px-16 border-0 font-bold rounded-8 leading-24 max-w-max focusable justify-center transition-colors ease-in-out i-bg-$color-button-negative-background i-text-$color-button-negative-text hover:i-bg-$color-button-negative-background-hover! active:i-bg-$color-button-negative-background-active!",
|
|
1911
|
+
buttonDestructiveFlat: "py-12 px-16 border-0 font-bold rounded-8 leading-24 max-w-max focusable justify-center transition-colors ease-in-out i-bg-$color-button-negative-quiet-background! i-text-$color-button-negative-quiet-text! hover:i-bg-$color-button-negative-quiet-background-hover! active:i-bg-$color-button-negative-quiet-background-active!",
|
|
1912
|
+
buttonUtility: "px-[15px] py-[11px] font-bold leading-24 max-w-max focusable justify-center transition-colors ease-in-out border rounded-4 i-text-$color-button-utility-text i-bg-$color-button-utility-background i-border-$color-button-utility-border hover:i-bg-$color-button-utility-background hover:i-border-$color-button-utility-border-hover! active:i-border-$color-button-utility-border-active!",
|
|
1913
|
+
buttonUtilityFlat: "py-12 px-16 bg-transparent border-0 font-bold leading-24 max-w-max focusable justify-center transition-colors ease-in-out i-text-$color-button-utility-text i-bg-$color-button-utility-background hover:i-bg-$color-button-utility-background-hover rounded-4",
|
|
1914
|
+
buttonPill: "font-bold leading-24 max-w-max focusable justify-center transition-colors ease-in-out rounded-full! min-h-[44px] min-w-[44px] border-0! p-4 i-text-$color-button-favorite-text i-bg-$color-button-favorite-background hover:i-bg-$color-button-favorite-background-hover acive:i-bg-$color-button-favorite-background-active inline-flex items-center justify-center hover:bg-clip-padding",
|
|
1915
|
+
buttonLink: "leading-24 max-w-max focusable ease-in-out inline i-text-$color-text-link hover:i-text-$color-text-link-hover hover:underline active:underline",
|
|
1916
|
+
buttonSmall: "px-16 py-6 text-12 leading-16",
|
|
1917
|
+
buttonSmallOverride: "py-8",
|
|
1918
|
+
buttonSmallSecondary: "py-6",
|
|
1919
|
+
buttonSmallUtility: "py-7 px-15",
|
|
1920
|
+
buttonSmallButtonPill: "p-4 min-h-32 min-w-32",
|
|
1921
|
+
buttonSmallButtonLink: "p-0",
|
|
1922
|
+
buttonIsDisabled: "py-10 px-14 font-bold leading-24 max-w-max focusable justify-center transition-colors ease-in-out i-bg-$color-button-disabled-background! i-text-$color-button-disabled-text! cursor-default pointer-events-none",
|
|
1923
|
+
buttonInProgress: "py-10 px-14 border-0 font-bold rounded-8 leading-24 max-w-max focusable justify-center transition-colors ease-in-out animate-inprogress i-text-$color-button-loading-text! pointer-events-none i-bg-$color-button-loading-background!"
|
|
1924
|
+
};
|
|
1925
|
+
var ot = function() {
|
|
1926
|
+
for (var o = [], e = arguments.length; e--; )
|
|
1927
|
+
o[e] = arguments[e];
|
|
1928
|
+
return o.reduce(function(t, r) {
|
|
1929
|
+
return t.concat(typeof r == "string" ? r : Array.isArray(r) ? ot.apply(void 0, r) : typeof r == "object" && r ? Object.keys(r).map(function(i) {
|
|
1930
|
+
return r[i] ? i : "";
|
|
1931
|
+
}) : "");
|
|
1932
|
+
}, []).join(" ");
|
|
1933
|
+
};
|
|
1934
|
+
/**
|
|
719
1935
|
* @license
|
|
720
1936
|
* Copyright 2018 Google LLC
|
|
721
1937
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
722
|
-
*/
|
|
1938
|
+
*/
|
|
1939
|
+
class si extends Jo {
|
|
1940
|
+
constructor(e) {
|
|
1941
|
+
var t;
|
|
1942
|
+
if (super(e), e.type !== Xo.ATTRIBUTE || e.name !== "class" || ((t = e.strings) === null || t === void 0 ? void 0 : t.length) > 2)
|
|
1943
|
+
throw new Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
1944
|
+
}
|
|
1945
|
+
render(e) {
|
|
1946
|
+
return " " + Object.keys(e).filter((t) => e[t]).join(" ") + " ";
|
|
1947
|
+
}
|
|
1948
|
+
update(e, [t]) {
|
|
1949
|
+
var r, i;
|
|
1950
|
+
if (this._previousClasses === void 0) {
|
|
1951
|
+
this._previousClasses = /* @__PURE__ */ new Set(), e.strings !== void 0 && (this._staticClasses = new Set(e.strings.join(" ").split(/\s/).filter((n) => n !== "")));
|
|
1952
|
+
for (const n in t)
|
|
1953
|
+
t[n] && !(!((r = this._staticClasses) === null || r === void 0) && r.has(n)) && this._previousClasses.add(n);
|
|
1954
|
+
return this.render(t);
|
|
1955
|
+
}
|
|
1956
|
+
const a = e.element.classList;
|
|
1957
|
+
this._previousClasses.forEach((n) => {
|
|
1958
|
+
n in t || (a.remove(n), this._previousClasses.delete(n));
|
|
1959
|
+
});
|
|
1960
|
+
for (const n in t) {
|
|
1961
|
+
const l = !!t[n];
|
|
1962
|
+
l !== this._previousClasses.has(n) && !(!((i = this._staticClasses) === null || i === void 0) && i.has(n)) && (l ? (a.add(n), this._previousClasses.add(n)) : (a.remove(n), this._previousClasses.delete(n)));
|
|
1963
|
+
}
|
|
1964
|
+
return K;
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
const tt = Go(si), di = (o) => o.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1968
|
+
function Xe(o) {
|
|
1969
|
+
return class extends o {
|
|
1970
|
+
static createProperty(e, t) {
|
|
1971
|
+
let r = t;
|
|
1972
|
+
(typeof (t == null ? void 0 : t.attribute) > "u" || (t == null ? void 0 : t.attribute) === !0) && (r = Object.assign({}, t, {
|
|
1973
|
+
attribute: di(e.toString())
|
|
1974
|
+
})), super.createProperty(e, r);
|
|
1975
|
+
}
|
|
1976
|
+
};
|
|
1977
|
+
}
|
|
1978
|
+
function yt(o) {
|
|
1979
|
+
const e = [];
|
|
1980
|
+
for (const [t, r] of Object.entries(o))
|
|
1981
|
+
r && e.push(t);
|
|
1982
|
+
return e.join(" ");
|
|
1983
|
+
}
|
|
1984
|
+
const be = typeof window < "u";
|
|
1985
|
+
function L(o) {
|
|
1986
|
+
const e = {};
|
|
1987
|
+
for (const [t, r] of Object.entries(o))
|
|
1988
|
+
for (const i of t.split(" "))
|
|
1989
|
+
e[i] = r;
|
|
1990
|
+
return tt(e);
|
|
1991
|
+
}
|
|
1992
|
+
function ui() {
|
|
1993
|
+
return `m${Math.random().toString(36).slice(2)}`;
|
|
1994
|
+
}
|
|
1995
|
+
const wo = [
|
|
1996
|
+
"primary",
|
|
1997
|
+
"secondary",
|
|
1998
|
+
"negative",
|
|
1999
|
+
"utility",
|
|
2000
|
+
"pill",
|
|
2001
|
+
"link"
|
|
2002
|
+
];
|
|
2003
|
+
class Pe extends Xe($) {
|
|
2004
|
+
constructor() {
|
|
2005
|
+
super(), this.variant = "secondary";
|
|
2006
|
+
}
|
|
2007
|
+
connectedCallback() {
|
|
2008
|
+
if (super.connectedCallback(), !wo.includes(this.variant))
|
|
2009
|
+
throw new Error(
|
|
2010
|
+
`Invalid "variant" attribute. Set its value to one of the following:
|
|
2011
|
+
${wo.join(
|
|
2012
|
+
", "
|
|
2013
|
+
)}.`
|
|
2014
|
+
);
|
|
2015
|
+
}
|
|
2016
|
+
firstUpdated() {
|
|
2017
|
+
this.autofocus && setTimeout(() => this.focus(), 0);
|
|
2018
|
+
}
|
|
2019
|
+
get _classes() {
|
|
2020
|
+
const e = this.variant === "primary", t = this.variant === "secondary", r = this.variant === "negative", i = this.variant === "utility", a = this.variant === "pill", n = this.variant === "link";
|
|
2021
|
+
return console.log({ styles: st }), ot(
|
|
2022
|
+
{
|
|
2023
|
+
[U.buttonSecondary]: !wo.find((l) => this.variant === l) || t,
|
|
2024
|
+
[U.buttonPrimary]: e,
|
|
2025
|
+
[U.buttonDestructive]: r && !this.quiet,
|
|
2026
|
+
[U.buttonFlat]: t && this.quiet,
|
|
2027
|
+
[U.buttonDestructiveFlat]: r && this.quiet,
|
|
2028
|
+
[U.buttonUtilityFlat]: i && this.quiet,
|
|
2029
|
+
[U.buttonSmall]: this.small,
|
|
2030
|
+
[U.buttonUtility]: i && !this.quiet,
|
|
2031
|
+
[U.buttonLink]: n,
|
|
2032
|
+
[U.buttonPill]: a,
|
|
2033
|
+
[U.buttonInProgress]: this.loading,
|
|
2034
|
+
[U.buttonIsDisabled]: this.disabled,
|
|
2035
|
+
["inline-block"]: !!this.href
|
|
2036
|
+
}
|
|
2037
|
+
);
|
|
2038
|
+
}
|
|
2039
|
+
render() {
|
|
2040
|
+
return p`
|
|
2041
|
+
${this.href ? p`<a
|
|
2042
|
+
href=${this.href}
|
|
2043
|
+
target=${this.target}
|
|
2044
|
+
rel=${this.target === "_blank" ? this.rel || "noopener" : void 0}
|
|
2045
|
+
class=${this._classes}
|
|
2046
|
+
>
|
|
2047
|
+
<slot></slot>
|
|
2048
|
+
</a>` : p`<button type=${this.type || "button"} class=${this._classes}>
|
|
2049
|
+
<slot></slot>
|
|
2050
|
+
</button>`}
|
|
2051
|
+
${this.loading ? p`<span
|
|
2052
|
+
class="sr-only"
|
|
2053
|
+
role="progressbar"
|
|
2054
|
+
aria-valuenow="{0}"
|
|
2055
|
+
aria-valuetext="Laster..."
|
|
2056
|
+
/>` : null}`;
|
|
2057
|
+
}
|
|
2058
|
+
}
|
|
2059
|
+
k(Pe, "shadowRootOptions", { ...$.shadowRootOptions, delegatesFocus: !0 }), k(Pe, "properties", {
|
|
2060
|
+
type: { type: "button" | "submit" | "reset", reflect: !0 },
|
|
2061
|
+
autofocus: { type: Boolean, reflect: !0 },
|
|
2062
|
+
variant: { type: String, reflect: !0 },
|
|
2063
|
+
quiet: { type: Boolean, reflect: !0 },
|
|
2064
|
+
small: { type: Boolean, reflect: !0 },
|
|
2065
|
+
loading: { type: Boolean, reflect: !0 },
|
|
2066
|
+
href: { type: String, reflect: !0 },
|
|
2067
|
+
target: { type: String, reflect: !0 },
|
|
2068
|
+
rel: { type: String, reflect: !0 },
|
|
2069
|
+
buttonClass: { type: String, reflect: !0 }
|
|
2070
|
+
}), k(Pe, "styles", [unsafeCSS(st), R`
|
|
723
2071
|
/* /* layer: preflights */
|
|
724
2072
|
|
|
725
2073
|
/*
|
|
@@ -1286,28 +2634,64 @@ video {
|
|
|
1286
2634
|
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;}
|
|
1287
2635
|
.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
|
|
1288
2636
|
.ease-in-out{transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);} */
|
|
1289
|
-
`];
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
href=${this.href}
|
|
1293
|
-
target=${this.target}
|
|
1294
|
-
rel=${this.target==="_blank"?this.rel||"noopener":void 0}
|
|
1295
|
-
class=${this._classes}
|
|
1296
|
-
>
|
|
1297
|
-
<slot></slot>
|
|
1298
|
-
</a>`:p`<button type=${this.type||"button"} class=${this._classes}>
|
|
1299
|
-
<slot></slot>
|
|
1300
|
-
</button>`}
|
|
1301
|
-
${this.loading?p`<span
|
|
1302
|
-
class="sr-only"
|
|
1303
|
-
role="progressbar"
|
|
1304
|
-
aria-valuenow="{0}"
|
|
1305
|
-
aria-valuetext="Laster..."
|
|
1306
|
-
/>`:null}`}}customElements.get("w-button")||customElements.define("w-button",Dt);/**
|
|
2637
|
+
`]);
|
|
2638
|
+
customElements.get("w-button") || customElements.define("w-button", Pe);
|
|
2639
|
+
/**
|
|
1307
2640
|
* @license
|
|
1308
2641
|
* Copyright 2018 Google LLC
|
|
1309
2642
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1310
|
-
*/
|
|
2643
|
+
*/
|
|
2644
|
+
const _ = (o) => o != null ? o : z, $t = {
|
|
2645
|
+
ENTER: "Enter",
|
|
2646
|
+
SPACE: " "
|
|
2647
|
+
};
|
|
2648
|
+
class qo extends $ {
|
|
2649
|
+
constructor() {
|
|
2650
|
+
super(), this.selected = !1, this.flat = !1, this.clickable = !1;
|
|
2651
|
+
}
|
|
2652
|
+
get _outerClasses() {
|
|
2653
|
+
return L({
|
|
2654
|
+
[H.card]: !0,
|
|
2655
|
+
[H.cardShadow]: !this.flat,
|
|
2656
|
+
[H.cardSelected]: this.selected,
|
|
2657
|
+
[H.cardFlat]: this.flat,
|
|
2658
|
+
[this.selected ? H.cardFlatSelected : H.cardFlatUnselected]: this.flat
|
|
2659
|
+
});
|
|
2660
|
+
}
|
|
2661
|
+
get _innerClasses() {
|
|
2662
|
+
return L({
|
|
2663
|
+
[H.cardOutline]: !0,
|
|
2664
|
+
[this.selected ? H.cardOutlineSelected : H.cardOutlineUnselected]: !0
|
|
2665
|
+
});
|
|
2666
|
+
}
|
|
2667
|
+
get uuButton() {
|
|
2668
|
+
return p`<button class="sr-only" aria-pressed="${this.selected}" tabindex="-1">
|
|
2669
|
+
Velg
|
|
2670
|
+
</button>`;
|
|
2671
|
+
}
|
|
2672
|
+
get uuSpan() {
|
|
2673
|
+
return p`<span role="checkbox" aria-checked="true" aria-disabled="true"></span>`;
|
|
2674
|
+
}
|
|
2675
|
+
keypressed(e) {
|
|
2676
|
+
!this.clickable || e.altKey || e.ctrlKey || (e.key === $t.ENTER || e.key === $t.SPACE) && (e.preventDefault(), this.click());
|
|
2677
|
+
}
|
|
2678
|
+
render() {
|
|
2679
|
+
return p`
|
|
2680
|
+
<div
|
|
2681
|
+
tabindex=${_(this.clickable ? "0" : void 0)}
|
|
2682
|
+
class="${this._outerClasses}"
|
|
2683
|
+
@keydown=${this.keypressed}
|
|
2684
|
+
>
|
|
2685
|
+
${this.clickable ? this.uuButton : ""}
|
|
2686
|
+
${!this.clickable && this.selected ? this.uuSpan : ""}
|
|
2687
|
+
<div class="${this._innerClasses}"></div>
|
|
2688
|
+
<slot></slot>
|
|
2689
|
+
</div>
|
|
2690
|
+
`;
|
|
2691
|
+
}
|
|
2692
|
+
}
|
|
2693
|
+
k(qo, "styles", [
|
|
2694
|
+
R`
|
|
1311
2695
|
/* /* layer: preflights */
|
|
1312
2696
|
|
|
1313
2697
|
/*
|
|
@@ -1886,24 +3270,77 @@ video {
|
|
|
1886
3270
|
:host {
|
|
1887
3271
|
display: block;
|
|
1888
3272
|
}
|
|
1889
|
-
`
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
${this.clickable?this.uuButton:""}
|
|
1898
|
-
${!this.clickable&&this.selected?this.uuSpan:""}
|
|
1899
|
-
<div class="${this._innerClasses}"></div>
|
|
1900
|
-
<slot></slot>
|
|
1901
|
-
</div>
|
|
1902
|
-
`}}customElements.get("w-card")||customElements.define("w-card",Wt);/**
|
|
3273
|
+
`
|
|
3274
|
+
]), k(qo, "properties", {
|
|
3275
|
+
selected: { type: Boolean, reflect: !0 },
|
|
3276
|
+
flat: { type: Boolean },
|
|
3277
|
+
clickable: { type: Boolean }
|
|
3278
|
+
});
|
|
3279
|
+
customElements.get("w-card") || customElements.define("w-card", qo);
|
|
3280
|
+
/**
|
|
1903
3281
|
* @license
|
|
1904
3282
|
* Copyright 2021 Google LLC
|
|
1905
3283
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1906
|
-
*/
|
|
3284
|
+
*/
|
|
3285
|
+
function je(o, e, t) {
|
|
3286
|
+
return o ? e() : t == null ? void 0 : t();
|
|
3287
|
+
}
|
|
3288
|
+
var Ke, er, se, Ne, de, Te;
|
|
3289
|
+
class Mo extends Xe($) {
|
|
3290
|
+
constructor() {
|
|
3291
|
+
super();
|
|
3292
|
+
Re(this, Ke);
|
|
3293
|
+
Re(this, se);
|
|
3294
|
+
Re(this, de);
|
|
3295
|
+
this._options = this.innerHTML;
|
|
3296
|
+
}
|
|
3297
|
+
render() {
|
|
3298
|
+
return p`<div class="${J(this, Ke, er)}">
|
|
3299
|
+
${je(
|
|
3300
|
+
this.label,
|
|
3301
|
+
() => p`<label for="${J(this, se, Ne)}">
|
|
3302
|
+
${this.label}
|
|
3303
|
+
${je(
|
|
3304
|
+
this.optional,
|
|
3305
|
+
() => p`<span className="pl-8 font-normal text-14 text-gray-500">(valgfritt)</span>`
|
|
3306
|
+
)}</label
|
|
3307
|
+
>`
|
|
3308
|
+
)}
|
|
3309
|
+
<div class="input--select__wrap">
|
|
3310
|
+
<select
|
|
3311
|
+
id="${J(this, se, Ne)}"
|
|
3312
|
+
?autofocus=${this.autoFocus}
|
|
3313
|
+
aria-describedby="${_(J(this, de, Te))}"
|
|
3314
|
+
aria-invalid="${_(this.invalid)}"
|
|
3315
|
+
aria-errormessage="${_(this.invalid && J(this, de, Te))}"
|
|
3316
|
+
>
|
|
3317
|
+
${et(this._options)}
|
|
3318
|
+
</select>
|
|
3319
|
+
</div>
|
|
3320
|
+
${je(
|
|
3321
|
+
this.always || this.invalid,
|
|
3322
|
+
() => p`<div id="${J(this, de, Te)}" class="input__sub-text">${this.hint}</div>`
|
|
3323
|
+
)}
|
|
3324
|
+
</div>`;
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3327
|
+
Ke = new WeakSet(), er = function() {
|
|
3328
|
+
return ot("input mb-0", {
|
|
3329
|
+
"input--is-invalid": this.invalid
|
|
3330
|
+
});
|
|
3331
|
+
}, se = new WeakSet(), Ne = function() {
|
|
3332
|
+
return "select_id";
|
|
3333
|
+
}, de = new WeakSet(), Te = function() {
|
|
3334
|
+
return this.hint ? `${J(this, se, Ne)}__hint` : void 0;
|
|
3335
|
+
}, k(Mo, "properties", {
|
|
3336
|
+
autoFocus: { type: Boolean, reflect: !0 },
|
|
3337
|
+
invalid: { type: Boolean, reflect: !0 },
|
|
3338
|
+
always: { type: Boolean, reflect: !0 },
|
|
3339
|
+
hint: { type: String, reflect: !0 },
|
|
3340
|
+
label: { type: String, reflect: !0 },
|
|
3341
|
+
optional: { type: Boolean, reflect: !0 },
|
|
3342
|
+
_options: { state: !0 }
|
|
3343
|
+
}), k(Mo, "styles", R`
|
|
1907
3344
|
/* /* layer: preflights */
|
|
1908
3345
|
|
|
1909
3346
|
/*
|
|
@@ -2472,24 +3909,32 @@ video {
|
|
|
2472
3909
|
.pointer-events-none{pointer-events:none;}
|
|
2473
3910
|
.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
|
|
2474
3911
|
.ease-in-out{transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);} */
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
3912
|
+
`);
|
|
3913
|
+
customElements.get("w-select") || customElements.define("w-select", Mo);
|
|
3914
|
+
class Po extends $ {
|
|
3915
|
+
get _class() {
|
|
3916
|
+
return L({
|
|
3917
|
+
[le.box]: !0,
|
|
3918
|
+
[le.bleed]: this.bleed,
|
|
3919
|
+
"bg-aqua-50": this.info,
|
|
3920
|
+
"bg-bluegray-100": this.neutral,
|
|
3921
|
+
"border-2 border-bluegray-300": this.bordered
|
|
3922
|
+
});
|
|
3923
|
+
}
|
|
3924
|
+
render() {
|
|
3925
|
+
return p`
|
|
3926
|
+
<div class="${this._class}">
|
|
3927
|
+
<slot></slot>
|
|
2490
3928
|
</div>
|
|
2491
|
-
|
|
2492
|
-
|
|
3929
|
+
`;
|
|
3930
|
+
}
|
|
3931
|
+
}
|
|
3932
|
+
k(Po, "properties", {
|
|
3933
|
+
bleed: { type: Boolean },
|
|
3934
|
+
bordered: { type: Boolean },
|
|
3935
|
+
info: { type: Boolean },
|
|
3936
|
+
neutral: { type: Boolean }
|
|
3937
|
+
}), k(Po, "styles", R`
|
|
2493
3938
|
/* /* layer: preflights */
|
|
2494
3939
|
|
|
2495
3940
|
/*
|
|
@@ -3062,11 +4507,26 @@ video {
|
|
|
3062
4507
|
::slotted(:last-child) {
|
|
3063
4508
|
margin-bottom: 0px !important;
|
|
3064
4509
|
}
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
4510
|
+
`);
|
|
4511
|
+
customElements.get("w-box") || customElements.define("w-box", Po);
|
|
4512
|
+
function bi(o, e) {
|
|
4513
|
+
return o.flatMap((t) => [t, e]).slice(0, -1);
|
|
4514
|
+
}
|
|
4515
|
+
const gi = p`<span class="select-none" aria-hidden="true">/</span>`;
|
|
4516
|
+
class or extends $ {
|
|
4517
|
+
connectedCallback() {
|
|
4518
|
+
super.connectedCallback(), this._children = bi(Array.from(this.children), gi);
|
|
4519
|
+
}
|
|
4520
|
+
render() {
|
|
4521
|
+
return p`
|
|
4522
|
+
<nav aria-label="Her er du" class="flex space-x-8">
|
|
4523
|
+
<h2 class="sr-only">Her er du</h2>
|
|
4524
|
+
${this._children}
|
|
4525
|
+
</nav>
|
|
4526
|
+
`;
|
|
4527
|
+
}
|
|
4528
|
+
}
|
|
4529
|
+
k(or, "styles", R`
|
|
3070
4530
|
/* /* layer: preflights */
|
|
3071
4531
|
|
|
3072
4532
|
/*
|
|
@@ -3635,12 +5095,50 @@ video {
|
|
|
3635
5095
|
.select-none{user-select:none;}
|
|
3636
5096
|
.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
|
|
3637
5097
|
.ease-in-out{transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);} */
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
5098
|
+
`);
|
|
5099
|
+
customElements.get("w-breadcrumbs") || customElements.define("w-breadcrumbs", or);
|
|
5100
|
+
const rt = typeof window < "u";
|
|
5101
|
+
let tr = !0;
|
|
5102
|
+
if (rt) {
|
|
5103
|
+
const o = window.matchMedia("(prefers-reduced-motion: reduce)"), e = ({ matches: t }) => tr = !t;
|
|
5104
|
+
o.addEventListener && o.addEventListener("change", e), e(o);
|
|
5105
|
+
}
|
|
5106
|
+
const rr = (o) => {
|
|
5107
|
+
o.style.transition = null, o.style.backfaceVisibility = null, o.style.overflow = null;
|
|
5108
|
+
}, ir = (o) => {
|
|
5109
|
+
const e = tr ? "var(--f-expansion-duration, 0.3s)" : "0.01s";
|
|
5110
|
+
o.style.transition = `height ${e}`, o.style.backfaceVisibility = "hidden", o.style.overflow = "hidden";
|
|
5111
|
+
}, hi = (o, e) => () => {
|
|
5112
|
+
o.style.height = "auto", o.style.overflow = null, e && e();
|
|
5113
|
+
}, pi = (o) => () => {
|
|
5114
|
+
o && o();
|
|
5115
|
+
}, nr = (o, e) => {
|
|
5116
|
+
const t = (() => {
|
|
5117
|
+
if (!e)
|
|
5118
|
+
return new Promise((a) => {
|
|
5119
|
+
e = a;
|
|
5120
|
+
});
|
|
5121
|
+
})(), r = hi(o, e);
|
|
5122
|
+
rr(o), o.style.height = "auto";
|
|
5123
|
+
let i = o.scrollHeight;
|
|
5124
|
+
if (rt && requestAnimationFrame(() => {
|
|
5125
|
+
o.addEventListener("transitionend", r, { once: !0 }), o.style.height = "0px", o.style.transitionTimingFunction = "ease-out", ir(o), requestAnimationFrame(() => o.style.height = i + "px");
|
|
5126
|
+
}), t)
|
|
5127
|
+
return t;
|
|
5128
|
+
}, ar = (o, e) => {
|
|
5129
|
+
const t = (() => {
|
|
5130
|
+
if (!e)
|
|
5131
|
+
return new Promise((a) => {
|
|
5132
|
+
e = a;
|
|
5133
|
+
});
|
|
5134
|
+
})(), r = pi(e);
|
|
5135
|
+
rr(o);
|
|
5136
|
+
let i = o.scrollHeight;
|
|
5137
|
+
if (rt && requestAnimationFrame(() => {
|
|
5138
|
+
o.addEventListener("transitionend", r, { once: !0 }), o.style.height = i + "px", o.style.transitionTimingFunction = "ease-in", ir(o), requestAnimationFrame(() => o.style.height = "0px");
|
|
5139
|
+
}), t)
|
|
5140
|
+
return t;
|
|
5141
|
+
}, mi = (o) => p`<svg
|
|
3644
5142
|
role="img"
|
|
3645
5143
|
aria-label="${o.typeLabel}"
|
|
3646
5144
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -3656,7 +5154,7 @@ video {
|
|
|
3656
5154
|
stroke-width="1.5"
|
|
3657
5155
|
d="M5.5 9l2 1.5L11 6"
|
|
3658
5156
|
/>
|
|
3659
|
-
</svg>`,
|
|
5157
|
+
</svg>`, fi = (o) => p`
|
|
3660
5158
|
<svg
|
|
3661
5159
|
role="img"
|
|
3662
5160
|
aria-label="${o.typeLabel}"
|
|
@@ -3665,7 +5163,10 @@ video {
|
|
|
3665
5163
|
height="16"
|
|
3666
5164
|
fill="none"
|
|
3667
5165
|
viewBox="0 0 16 16"
|
|
3668
|
-
class="${
|
|
5166
|
+
class="${tt({
|
|
5167
|
+
"transition-transform duration-200": !0,
|
|
5168
|
+
"transform-rotate-180": o.isInfo
|
|
5169
|
+
})}"
|
|
3669
5170
|
>
|
|
3670
5171
|
<path
|
|
3671
5172
|
stroke="currentColor"
|
|
@@ -3676,7 +5177,7 @@ video {
|
|
|
3676
5177
|
/>
|
|
3677
5178
|
<circle cx="8" cy="11.8" r=".8" fill="currentColor" />
|
|
3678
5179
|
</svg>
|
|
3679
|
-
`,
|
|
5180
|
+
`, vi = () => p`
|
|
3680
5181
|
<svg
|
|
3681
5182
|
role="img"
|
|
3682
5183
|
aria-label="Lukk"
|
|
@@ -3693,7 +5194,99 @@ video {
|
|
|
3693
5194
|
clipRule="evenodd"
|
|
3694
5195
|
/>
|
|
3695
5196
|
</svg>
|
|
3696
|
-
`,
|
|
5197
|
+
`, zt = (o) => {
|
|
5198
|
+
const e = {};
|
|
5199
|
+
for (const [t, r] of Object.entries(o))
|
|
5200
|
+
for (const i of t.split(" "))
|
|
5201
|
+
e[i] = r;
|
|
5202
|
+
return tt(e);
|
|
5203
|
+
};
|
|
5204
|
+
class jo extends $ {
|
|
5205
|
+
constructor() {
|
|
5206
|
+
super(), this.id = Date.now().toString(36) + Math.random().toString(36).slice(2, 5), this.type = "success", this.text = "", this.canclose = !1;
|
|
5207
|
+
}
|
|
5208
|
+
connectedCallback() {
|
|
5209
|
+
super.connectedCallback();
|
|
5210
|
+
}
|
|
5211
|
+
disconnectedCallback() {
|
|
5212
|
+
super.disconnectedCallback();
|
|
5213
|
+
}
|
|
5214
|
+
updated() {
|
|
5215
|
+
!this._expanded && this._wrapper && nr(this._wrapper, () => this._expanded = !0);
|
|
5216
|
+
}
|
|
5217
|
+
get _primaryClasses() {
|
|
5218
|
+
return zt({
|
|
5219
|
+
[j.toast]: !0,
|
|
5220
|
+
[j.toastPositive]: this.type === "success",
|
|
5221
|
+
[j.toastWarning]: this.type === "warning",
|
|
5222
|
+
[j.toastNegative]: this.type === "error",
|
|
5223
|
+
[j.toastNeutral]: this.type === "info"
|
|
5224
|
+
});
|
|
5225
|
+
}
|
|
5226
|
+
get _iconClasses() {
|
|
5227
|
+
return zt({
|
|
5228
|
+
[j.toastIcon]: !0,
|
|
5229
|
+
[j.toastIconPositive]: this.type == "success",
|
|
5230
|
+
[j.toastIconWarning]: this.type === "warning",
|
|
5231
|
+
[j.toastIconNegative]: this.type === "error",
|
|
5232
|
+
[j.toastIconNeutral]: this.type === "info"
|
|
5233
|
+
});
|
|
5234
|
+
}
|
|
5235
|
+
get _wrapper() {
|
|
5236
|
+
var e, t;
|
|
5237
|
+
return (t = (e = this.renderRoot) == null ? void 0 : e.querySelector("section")) != null ? t : null;
|
|
5238
|
+
}
|
|
5239
|
+
get _success() {
|
|
5240
|
+
return this.type === "success";
|
|
5241
|
+
}
|
|
5242
|
+
get _warning() {
|
|
5243
|
+
return this.type === "warning";
|
|
5244
|
+
}
|
|
5245
|
+
get _error() {
|
|
5246
|
+
return this.type === "error";
|
|
5247
|
+
}
|
|
5248
|
+
get _info() {
|
|
5249
|
+
return this.type === "info";
|
|
5250
|
+
}
|
|
5251
|
+
get _role() {
|
|
5252
|
+
return this._error || this._warning ? "alert" : "status";
|
|
5253
|
+
}
|
|
5254
|
+
get _typeLabel() {
|
|
5255
|
+
return this._success ? "Vellykket" : this._error ? "Feil" : this._warning ? "Varsel" : "Info";
|
|
5256
|
+
}
|
|
5257
|
+
get _iconMarkup() {
|
|
5258
|
+
return this._success ? mi({ typeLabel: this._typeLabel }) : fi({ typeLabel: this._typeLabel, isInfo: this._info });
|
|
5259
|
+
}
|
|
5260
|
+
async collapse() {
|
|
5261
|
+
return new Promise((e) => {
|
|
5262
|
+
this._expanded && this._wrapper ? ar(this._wrapper, e) : e();
|
|
5263
|
+
});
|
|
5264
|
+
}
|
|
5265
|
+
close() {
|
|
5266
|
+
const e = new CustomEvent("close", {
|
|
5267
|
+
detail: { id: this.id },
|
|
5268
|
+
bubbles: !0,
|
|
5269
|
+
composed: !0
|
|
5270
|
+
});
|
|
5271
|
+
this.updateComplete.then(() => this.dispatchEvent(e));
|
|
5272
|
+
}
|
|
5273
|
+
render() {
|
|
5274
|
+
return this.text ? p` <section class="${j.toastWrapper}" aria-label="${this._typeLabel}">
|
|
5275
|
+
<div class="${this._primaryClasses}">
|
|
5276
|
+
<div class="${this._iconClasses}">${this._iconMarkup}</div>
|
|
5277
|
+
<div role="${this._role}" class="${j.toastContent}">
|
|
5278
|
+
<p>${this.text}</p>
|
|
5279
|
+
</div>
|
|
5280
|
+
${je(
|
|
5281
|
+
this.canclose === !0,
|
|
5282
|
+
() => p`<button class="${j.toastClose}" @click="${this.close}">${vi()}</button>`
|
|
5283
|
+
)}
|
|
5284
|
+
</div>
|
|
5285
|
+
</section>` : p``;
|
|
5286
|
+
}
|
|
5287
|
+
}
|
|
5288
|
+
k(jo, "styles", [
|
|
5289
|
+
R`
|
|
3697
5290
|
/* /* layer: preflights */
|
|
3698
5291
|
|
|
3699
5292
|
/*
|
|
@@ -4262,23 +5855,209 @@ video {
|
|
|
4262
5855
|
:host {
|
|
4263
5856
|
display: block;
|
|
4264
5857
|
}
|
|
4265
|
-
`
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
5858
|
+
`
|
|
5859
|
+
]), k(jo, "properties", {
|
|
5860
|
+
id: { type: String, attribute: !0, reflect: !0 },
|
|
5861
|
+
type: { type: String, attribute: !0, reflect: !0 },
|
|
5862
|
+
text: { type: String, attribute: !0, reflect: !0 },
|
|
5863
|
+
canclose: { type: Boolean, attribute: !0, reflect: !0 }
|
|
5864
|
+
});
|
|
5865
|
+
customElements.get("w-toast") || customElements.define("w-toast", jo);
|
|
5866
|
+
/**
|
|
5867
|
+
* @license
|
|
5868
|
+
* Copyright 2020 Google LLC
|
|
5869
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5870
|
+
*/
|
|
5871
|
+
var yo, $o;
|
|
5872
|
+
const { _ChildPart: xi } = Yr, W = ((yo = window.ShadyDOM) === null || yo === void 0 ? void 0 : yo.inUse) && (($o = window.ShadyDOM) === null || $o === void 0 ? void 0 : $o.noPatch) === !0 ? window.ShadyDOM.wrap : (o) => o, _t = () => document.createComment(""), fe = (o, e, t) => {
|
|
5873
|
+
var r;
|
|
5874
|
+
const i = W(o._$startNode).parentNode, a = e === void 0 ? o._$endNode : e._$startNode;
|
|
5875
|
+
if (t === void 0) {
|
|
5876
|
+
const n = W(i).insertBefore(_t(), a), l = W(i).insertBefore(_t(), a);
|
|
5877
|
+
t = new xi(n, l, o, o.options);
|
|
5878
|
+
} else {
|
|
5879
|
+
const n = W(t._$endNode).nextSibling, l = t._$parent, s = l !== o;
|
|
5880
|
+
if (s) {
|
|
5881
|
+
(r = t._$reparentDisconnectables) === null || r === void 0 || r.call(t, o), t._$parent = o;
|
|
5882
|
+
let c;
|
|
5883
|
+
t._$notifyConnectionChanged !== void 0 && (c = o._$isConnected) !== l._$isConnected && t._$notifyConnectionChanged(c);
|
|
5884
|
+
}
|
|
5885
|
+
if (n !== a || s) {
|
|
5886
|
+
let c = t._$startNode;
|
|
5887
|
+
for (; c !== n; ) {
|
|
5888
|
+
const b = W(c).nextSibling;
|
|
5889
|
+
W(i).insertBefore(c, a), c = b;
|
|
5890
|
+
}
|
|
5891
|
+
}
|
|
5892
|
+
}
|
|
5893
|
+
return t;
|
|
5894
|
+
}, re = (o, e, t = o) => (o._$setValue(e, t), o), ki = {}, wi = (o, e = ki) => o._$committedValue = e, yi = (o) => o._$committedValue, zo = (o) => {
|
|
5895
|
+
var e;
|
|
5896
|
+
(e = o._$notifyConnectionChanged) === null || e === void 0 || e.call(o, !1, !0);
|
|
5897
|
+
let t = o._$startNode;
|
|
5898
|
+
const r = W(o._$endNode).nextSibling;
|
|
5899
|
+
for (; t !== r; ) {
|
|
5900
|
+
const i = W(t).nextSibling;
|
|
5901
|
+
W(t).remove(), t = i;
|
|
5902
|
+
}
|
|
5903
|
+
};
|
|
5904
|
+
/**
|
|
5905
|
+
* @license
|
|
5906
|
+
* Copyright 2017 Google LLC
|
|
5907
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5908
|
+
*/
|
|
5909
|
+
const St = (o, e, t) => {
|
|
5910
|
+
const r = /* @__PURE__ */ new Map();
|
|
5911
|
+
for (let i = e; i <= t; i++)
|
|
5912
|
+
r.set(o[i], i);
|
|
5913
|
+
return r;
|
|
5914
|
+
};
|
|
5915
|
+
class $i extends Jo {
|
|
5916
|
+
constructor(e) {
|
|
5917
|
+
if (super(e), e.type !== Xo.CHILD)
|
|
5918
|
+
throw new Error("repeat() can only be used in text expressions");
|
|
5919
|
+
}
|
|
5920
|
+
_getValuesAndKeys(e, t, r) {
|
|
5921
|
+
let i;
|
|
5922
|
+
r === void 0 ? r = t : t !== void 0 && (i = t);
|
|
5923
|
+
const a = [], n = [];
|
|
5924
|
+
let l = 0;
|
|
5925
|
+
for (const s of e)
|
|
5926
|
+
a[l] = i ? i(s, l) : l, n[l] = r(s, l), l++;
|
|
5927
|
+
return {
|
|
5928
|
+
values: n,
|
|
5929
|
+
keys: a
|
|
5930
|
+
};
|
|
5931
|
+
}
|
|
5932
|
+
render(e, t, r) {
|
|
5933
|
+
return this._getValuesAndKeys(e, t, r).values;
|
|
5934
|
+
}
|
|
5935
|
+
update(e, [t, r, i]) {
|
|
5936
|
+
var a;
|
|
5937
|
+
const n = yi(e), { values: l, keys: s } = this._getValuesAndKeys(t, r, i);
|
|
5938
|
+
if (!Array.isArray(n))
|
|
5939
|
+
return this._itemKeys = s, l;
|
|
5940
|
+
const c = (a = this._itemKeys) !== null && a !== void 0 ? a : this._itemKeys = [], b = [];
|
|
5941
|
+
let d, g, u = 0, h = n.length - 1, f = 0, v = l.length - 1;
|
|
5942
|
+
for (; u <= h && f <= v; )
|
|
5943
|
+
if (n[u] === null)
|
|
5944
|
+
u++;
|
|
5945
|
+
else if (n[h] === null)
|
|
5946
|
+
h--;
|
|
5947
|
+
else if (c[u] === s[f])
|
|
5948
|
+
b[f] = re(n[u], l[f]), u++, f++;
|
|
5949
|
+
else if (c[h] === s[v])
|
|
5950
|
+
b[v] = re(n[h], l[v]), h--, v--;
|
|
5951
|
+
else if (c[u] === s[v])
|
|
5952
|
+
b[v] = re(n[u], l[v]), fe(e, b[v + 1], n[u]), u++, v--;
|
|
5953
|
+
else if (c[h] === s[f])
|
|
5954
|
+
b[f] = re(n[h], l[f]), fe(e, n[u], n[h]), h--, f++;
|
|
5955
|
+
else if (d === void 0 && (d = St(s, f, v), g = St(c, u, h)), !d.has(c[u]))
|
|
5956
|
+
zo(n[u]), u++;
|
|
5957
|
+
else if (!d.has(c[h]))
|
|
5958
|
+
zo(n[h]), h--;
|
|
5959
|
+
else {
|
|
5960
|
+
const x = g.get(s[f]), y = x !== void 0 ? n[x] : null;
|
|
5961
|
+
if (y === null) {
|
|
5962
|
+
const S = fe(e, n[u]);
|
|
5963
|
+
re(S, l[f]), b[f] = S;
|
|
5964
|
+
} else
|
|
5965
|
+
b[f] = re(y, l[f]), fe(e, n[u], y), n[x] = null;
|
|
5966
|
+
f++;
|
|
5967
|
+
}
|
|
5968
|
+
for (; f <= v; ) {
|
|
5969
|
+
const x = fe(e, b[v + 1]);
|
|
5970
|
+
re(x, l[f]), b[f++] = x;
|
|
5971
|
+
}
|
|
5972
|
+
for (; u <= h; ) {
|
|
5973
|
+
const x = n[u++];
|
|
5974
|
+
x !== null && zo(x);
|
|
5975
|
+
}
|
|
5976
|
+
return this._itemKeys = s, wi(e, b), K;
|
|
5977
|
+
}
|
|
5978
|
+
}
|
|
5979
|
+
const lr = Go($i);
|
|
5980
|
+
class Ie extends $ {
|
|
5981
|
+
constructor() {
|
|
5982
|
+
super(), this._toasts = /* @__PURE__ */ new Map();
|
|
5983
|
+
}
|
|
5984
|
+
connectedCallback() {
|
|
5985
|
+
super.connectedCallback(), this._interval = setInterval(() => {
|
|
5986
|
+
const e = [], t = [];
|
|
5987
|
+
for (const i of this._toasts)
|
|
5988
|
+
Date.now() <= i[1].duration ? e.push(i) : t.push(i);
|
|
5989
|
+
const r = [];
|
|
5990
|
+
for (const [i] of t) {
|
|
5991
|
+
const a = this.renderRoot.querySelector(`#${i}`);
|
|
5992
|
+
r.push(a.collapse());
|
|
5993
|
+
}
|
|
5994
|
+
Promise.all(r).then(() => {
|
|
5995
|
+
e.length != this._toasts.size && (this._toasts = new Map(e));
|
|
5996
|
+
});
|
|
5997
|
+
}, 500);
|
|
5998
|
+
}
|
|
5999
|
+
disconnectedCallback() {
|
|
6000
|
+
super.disconnectedCallback(), this._interval && clearTimeout(this._interval);
|
|
6001
|
+
}
|
|
6002
|
+
static init() {
|
|
6003
|
+
let e = document.querySelector("w-toast-container");
|
|
6004
|
+
return e || (e = document.createElement("w-toast-container"), document.body.appendChild(e)), e;
|
|
6005
|
+
}
|
|
6006
|
+
get _toastsArray() {
|
|
6007
|
+
return Array.from(this._toasts).map(([, e]) => e);
|
|
6008
|
+
}
|
|
6009
|
+
get(e) {
|
|
6010
|
+
if (!e)
|
|
6011
|
+
throw new Error('undefined "id" given when attempting to retrieve toast');
|
|
6012
|
+
if (typeof e != "string" && !Number.isInteger(e))
|
|
6013
|
+
throw new Error('"id" must be number or string when attempting to retrieve toast');
|
|
6014
|
+
return this._toasts.get(e);
|
|
6015
|
+
}
|
|
6016
|
+
set(e) {
|
|
6017
|
+
if (!e.id)
|
|
6018
|
+
throw new Error('invalid or undefined "id" on toast object');
|
|
6019
|
+
const t = this._toasts.set(e.id, {
|
|
6020
|
+
...e,
|
|
6021
|
+
duration: Date.now() + (e.duration || 5e3)
|
|
6022
|
+
});
|
|
6023
|
+
return this._toasts = new Map(Array.from(this._toasts)), t;
|
|
6024
|
+
}
|
|
6025
|
+
async del(e) {
|
|
6026
|
+
if (!e)
|
|
6027
|
+
throw new Error('undefined "id" given when attempting to retrieve toast');
|
|
6028
|
+
if (typeof e != "string" && !Number.isInteger(e))
|
|
6029
|
+
throw new Error('"id" must be number or string when attempting to retrieve toast');
|
|
6030
|
+
const t = this.renderRoot.querySelector(`#${e}`);
|
|
6031
|
+
if (!this._toasts.has(e))
|
|
6032
|
+
return !1;
|
|
6033
|
+
await t.collapse();
|
|
6034
|
+
const r = this._toasts.delete(e);
|
|
6035
|
+
return this._toasts = new Map(Array.from(this._toasts)), r;
|
|
6036
|
+
}
|
|
6037
|
+
render() {
|
|
6038
|
+
return p`
|
|
6039
|
+
<aside class="${wt.toasterContainer}">
|
|
6040
|
+
<div class="${wt.toaster}" id="w-toast-container-list">
|
|
6041
|
+
${lr(
|
|
6042
|
+
this._toastsArray,
|
|
6043
|
+
(e) => e.id,
|
|
6044
|
+
(e) => p` <w-toast
|
|
6045
|
+
class="w-full"
|
|
6046
|
+
id="${e.id}"
|
|
6047
|
+
type="${e.type}"
|
|
6048
|
+
text="${e.text}"
|
|
6049
|
+
?canclose=${e.canclose}
|
|
6050
|
+
@close=${() => this.del(e.id)}
|
|
6051
|
+
>
|
|
6052
|
+
</w-toast>`
|
|
6053
|
+
)}
|
|
4270
6054
|
</div>
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
*/const{I:rr}=St,_o=()=>document.createComment(""),ce=(o,e,t)=>{var r;const i=o._$AA.parentNode,n=e===void 0?o._$AB:e._$AA;if(t===void 0){const a=i.insertBefore(_o(),n),l=i.insertBefore(_o(),n);t=new rr(a,l,o,o.options)}else{const a=t._$AB.nextSibling,l=t._$AM,s=l!==o;if(s){let c;(r=t._$AQ)===null||r===void 0||r.call(t,o),t._$AM=o,t._$AP!==void 0&&(c=o._$AU)!==l._$AU&&t._$AP(c)}if(a!==n||s){let c=t._$AA;for(;c!==a;){const g=c.nextSibling;i.insertBefore(c,n),c=g}}}return t},X=(o,e,t=o)=>(o._$AI(e,t),o),ir={},nr=(o,e=ir)=>o._$AH=e,ar=o=>o._$AH,Ne=o=>{var e;(e=o._$AP)===null||e===void 0||e.call(o,!1,!0);let t=o._$AA;const r=o._$AB.nextSibling;for(;t!==r;){const i=t.nextSibling;t.remove(),t=i}};/**
|
|
4278
|
-
* @license
|
|
4279
|
-
* Copyright 2017 Google LLC
|
|
4280
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
4281
|
-
*/const Ao=(o,e,t)=>{const r=new Map;for(let i=e;i<=t;i++)r.set(o[i],i);return r},tt=Ge(class extends Je{constructor(o){if(super(o),o.type!==Ke.CHILD)throw Error("repeat() can only be used in text expressions")}ht(o,e,t){let r;t===void 0?t=e:e!==void 0&&(r=e);const i=[],n=[];let a=0;for(const l of o)i[a]=r?r(l,a):a,n[a]=t(l,a),a++;return{values:n,keys:i}}render(o,e,t){return this.ht(o,e,t).values}update(o,[e,t,r]){var i;const n=ar(o),{values:a,keys:l}=this.ht(e,t,r);if(!Array.isArray(n))return this.ut=l,a;const s=(i=this.ut)!==null&&i!==void 0?i:this.ut=[],c=[];let g,d,b=0,u=n.length-1,h=0,m=a.length-1;for(;b<=u&&h<=m;)if(n[b]===null)b++;else if(n[u]===null)u--;else if(s[b]===l[h])c[h]=X(n[b],a[h]),b++,h++;else if(s[u]===l[m])c[m]=X(n[u],a[m]),u--,m--;else if(s[b]===l[m])c[m]=X(n[b],a[m]),ce(o,c[m+1],n[b]),b++,m--;else if(s[u]===l[h])c[h]=X(n[u],a[h]),ce(o,n[b],n[u]),u--,h++;else if(g===void 0&&(g=Ao(l,h,m),d=Ao(s,b,u)),g.has(s[b]))if(g.has(s[u])){const f=d.get(l[h]),x=f!==void 0?n[f]:null;if(x===null){const k=ce(o,n[b]);X(k,a[h]),c[h]=k}else c[h]=X(x,a[h]),ce(o,n[b],x),n[f]=null;h++}else Ne(n[u]),u--;else Ne(n[b]),b++;for(;h<=m;){const f=ce(o,c[m+1]);X(f,a[h]),c[h++]=f}for(;b<=u;){const f=n[b++];f!==null&&Ne(f)}return this.ut=l,nr(o,c),N}});class rt extends w{static styles=[_`
|
|
6055
|
+
</aside>
|
|
6056
|
+
`;
|
|
6057
|
+
}
|
|
6058
|
+
}
|
|
6059
|
+
k(Ie, "styles", [
|
|
6060
|
+
R`
|
|
4282
6061
|
/* /* layer: preflights */
|
|
4283
6062
|
|
|
4284
6063
|
/*
|
|
@@ -4849,21 +6628,94 @@ video {
|
|
|
4849
6628
|
:host {
|
|
4850
6629
|
display: block;
|
|
4851
6630
|
}
|
|
4852
|
-
`
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
6631
|
+
`
|
|
6632
|
+
]), k(Ie, "properties", {
|
|
6633
|
+
_toasts: { state: !0 }
|
|
6634
|
+
});
|
|
6635
|
+
customElements.get("w-toast-container") || customElements.define("w-toast-container", Ie);
|
|
6636
|
+
function zi(o, e) {
|
|
6637
|
+
if (!be)
|
|
6638
|
+
return;
|
|
6639
|
+
const t = customElements.get("w-toast-container").init(), r = {
|
|
6640
|
+
id: Date.now().toString(36) + Math.random().toString(36).slice(2, 5),
|
|
6641
|
+
text: o,
|
|
6642
|
+
duration: 5e3,
|
|
6643
|
+
type: "success",
|
|
6644
|
+
...e
|
|
6645
|
+
};
|
|
6646
|
+
return t.set(r), r;
|
|
6647
|
+
}
|
|
6648
|
+
function _i(o) {
|
|
6649
|
+
return be ? customElements.get("w-toast-container").init().del(o) : void 0;
|
|
6650
|
+
}
|
|
6651
|
+
function Si(o, e) {
|
|
6652
|
+
if (!be)
|
|
6653
|
+
return;
|
|
6654
|
+
const t = customElements.get("w-toast-container").init();
|
|
6655
|
+
return t.set({ ...t.get(o), ...e }), t.get(o);
|
|
6656
|
+
}
|
|
6657
|
+
class No extends $ {
|
|
6658
|
+
constructor() {
|
|
6659
|
+
super(), this._messages = [], this.interval = 3e4, this._hiddenMessageIds = [], this.url = be ? window.location.href : "";
|
|
6660
|
+
}
|
|
6661
|
+
async connectedCallback() {
|
|
6662
|
+
if (super.connectedCallback(), !this.api) {
|
|
6663
|
+
console.error('Broadcast "api" attribute invalid or undefined');
|
|
6664
|
+
return;
|
|
6665
|
+
}
|
|
6666
|
+
be && (await this._fetchMessage(), setInterval(() => this._fetchMessage(), this.interval));
|
|
6667
|
+
}
|
|
6668
|
+
async _fetchMessage() {
|
|
6669
|
+
const e = `${this.api}?path=${this.url}`;
|
|
6670
|
+
try {
|
|
6671
|
+
const t = await (await fetch(e)).json();
|
|
6672
|
+
this._messages = t.length ? t : [];
|
|
6673
|
+
} catch (t) {
|
|
6674
|
+
console.error(`failed to fetch broadcasts from given url (${e})`, t);
|
|
6675
|
+
}
|
|
6676
|
+
}
|
|
6677
|
+
async _del(e) {
|
|
6678
|
+
await this.renderRoot.querySelector(`#broadcast-${e}`).collapse(), this._hiddenMessageIds = [.../* @__PURE__ */ new Set([...this._hiddenMessageIds, e])];
|
|
6679
|
+
}
|
|
6680
|
+
render() {
|
|
6681
|
+
const e = this._messages.filter((t) => !this._hiddenMessageIds.includes(t.id));
|
|
6682
|
+
return p`
|
|
6683
|
+
<aside class=${`${e.length === 0 ? "hidden" : "mb-16"}`}>
|
|
6684
|
+
${lr(
|
|
6685
|
+
e,
|
|
6686
|
+
({ id: t }) => `broadcast-${t}`,
|
|
6687
|
+
({ id: t, message: r }) => p`<w-toast
|
|
4856
6688
|
class="w-full"
|
|
4857
|
-
id="
|
|
4858
|
-
type="
|
|
4859
|
-
text="${
|
|
4860
|
-
|
|
4861
|
-
@close=${()=>this.
|
|
6689
|
+
id="broadcast-${t}"
|
|
6690
|
+
type="warning"
|
|
6691
|
+
text="${r}"
|
|
6692
|
+
canclose
|
|
6693
|
+
@close=${() => this._del(t)}
|
|
4862
6694
|
>
|
|
4863
|
-
</w-toast>`
|
|
4864
|
-
|
|
6695
|
+
</w-toast>`
|
|
6696
|
+
)}
|
|
4865
6697
|
</aside>
|
|
4866
|
-
|
|
6698
|
+
`;
|
|
6699
|
+
}
|
|
6700
|
+
}
|
|
6701
|
+
k(No, "properties", {
|
|
6702
|
+
_messages: {
|
|
6703
|
+
state: !0,
|
|
6704
|
+
hasChanged(e, t) {
|
|
6705
|
+
if (!t || t.length === 0)
|
|
6706
|
+
return !0;
|
|
6707
|
+
const r = e.map(({ id: a }) => a).sort(), i = t.map(({ id: a }) => a).sort();
|
|
6708
|
+
return JSON.stringify(r) !== JSON.stringify(i);
|
|
6709
|
+
}
|
|
6710
|
+
},
|
|
6711
|
+
_hiddenMessageIds: {
|
|
6712
|
+
state: !0,
|
|
6713
|
+
type: Array
|
|
6714
|
+
},
|
|
6715
|
+
interval: { type: Number, attribute: !0, reflect: !0 },
|
|
6716
|
+
url: { type: String, attribute: !0, reflect: !0 },
|
|
6717
|
+
api: { type: String, attribute: !0, reflect: !0 }
|
|
6718
|
+
}), k(No, "styles", R`
|
|
4867
6719
|
/* /* layer: preflights */
|
|
4868
6720
|
|
|
4869
6721
|
/*
|
|
@@ -5431,19 +7283,894 @@ video {
|
|
|
5431
7283
|
.pointer-events-none{pointer-events:none;}
|
|
5432
7284
|
.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
|
|
5433
7285
|
.ease-in-out{transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);} */
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
`}}customElements.get("w-broadcast")||customElements.define("w-broadcast",dr);function pe(o){return o.split("-")[0]}function Ee(o){return o.split("-")[1]}function me(o){return["top","bottom"].includes(pe(o))?"x":"y"}function ro(o){return o==="y"?"height":"width"}function Eo(o,e,t){let{reference:r,floating:i}=o;const n=r.x+r.width/2-i.width/2,a=r.y+r.height/2-i.height/2,l=me(e),s=ro(l),c=r[s]/2-i[s]/2,g=pe(e),d=l==="x";let b;switch(g){case"top":b={x:n,y:r.y-i.height};break;case"bottom":b={x:n,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:a};break;case"left":b={x:r.x-i.width,y:a};break;default:b={x:r.x,y:r.y}}switch(Ee(e)){case"start":b[l]-=c*(t&&d?-1:1);break;case"end":b[l]+=c*(t&&d?-1:1);break}return b}const br=async(o,e,t)=>{const{placement:r="bottom",strategy:i="absolute",middleware:n=[],platform:a}=t,l=await(a.isRTL==null?void 0:a.isRTL(e));let s=await a.getElementRects({reference:o,floating:e,strategy:i}),{x:c,y:g}=Eo(s,r,l),d=r,b={},u=0;for(let h=0;h<n.length;h++){const{name:m,fn:f}=n[h],{x,y:k,data:S,reset:v}=await f({x:c,y:g,initialPlacement:r,placement:d,strategy:i,middlewareData:b,rects:s,platform:a,elements:{reference:o,floating:e}});if(c=x??c,g=k??g,b={...b,[m]:{...b[m],...S}},v&&u<=50){u++,typeof v=="object"&&(v.placement&&(d=v.placement),v.rects&&(s=v.rects===!0?await a.getElementRects({reference:o,floating:e,strategy:i}):v.rects),{x:c,y:g}=Eo(s,d,l)),h=-1;continue}}return{x:c,y:g,placement:d,strategy:i,middlewareData:b}};function ur(o){return{top:0,right:0,bottom:0,left:0,...o}}function it(o){return typeof o!="number"?ur(o):{top:o,right:o,bottom:o,left:o}}function ye(o){return{...o,top:o.y,left:o.x,right:o.x+o.width,bottom:o.y+o.height}}async function nt(o,e){var t;e===void 0&&(e={});const{x:r,y:i,platform:n,rects:a,elements:l,strategy:s}=o,{boundary:c="clippingAncestors",rootBoundary:g="viewport",elementContext:d="floating",altBoundary:b=!1,padding:u=0}=e,h=it(u),f=l[b?d==="floating"?"reference":"floating":d],x=ye(await n.getClippingRect({element:(t=await(n.isElement==null?void 0:n.isElement(f)))==null||t?f:f.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(l.floating)),boundary:c,rootBoundary:g,strategy:s})),k=ye(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:d==="floating"?{...a.floating,x:r,y:i}:a.reference,offsetParent:await(n.getOffsetParent==null?void 0:n.getOffsetParent(l.floating)),strategy:s}):a[d]);return{top:x.top-k.top+h.top,bottom:k.bottom-x.bottom+h.bottom,left:x.left-k.left+h.left,right:k.right-x.right+h.right}}const gr=Math.min,hr=Math.max;function We(o,e,t){return hr(o,gr(e,t))}const pr=o=>({name:"arrow",options:o,async fn(e){const{element:t,padding:r=0}=o??{},{x:i,y:n,placement:a,rects:l,platform:s}=e;if(t==null)return{};const c=it(r),g={x:i,y:n},d=me(a),b=Ee(a),u=ro(d),h=await s.getDimensions(t),m=d==="y"?"top":"left",f=d==="y"?"bottom":"right",x=l.reference[u]+l.reference[d]-g[d]-l.floating[u],k=g[d]-l.reference[d],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(t));let v=S?d==="y"?S.clientHeight||0:S.clientWidth||0:0;v===0&&(v=l.floating[u]);const F=x/2-k/2,z=c[m],H=v-h[u]-c[f],j=v/2-h[u]/2+F,C=We(z,j,H),M=(b==="start"?c[m]:c[f])>0&&j!==C&&l.reference[u]<=l.floating[u]?j<z?z-j:H-j:0;return{[d]:g[d]-M,data:{[d]:C,centerOffset:j-C}}}}),mr={left:"right",right:"left",bottom:"top",top:"bottom"};function $e(o){return o.replace(/left|right|bottom|top/g,e=>mr[e])}function fr(o,e,t){t===void 0&&(t=!1);const r=Ee(o),i=me(o),n=ro(i);let a=i==="x"?r===(t?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[n]>e.floating[n]&&(a=$e(a)),{main:a,cross:$e(a)}}const vr={start:"end",end:"start"};function Ro(o){return o.replace(/start|end/g,e=>vr[e])}function xr(o){const e=$e(o);return[Ro(o),e,Ro(e)]}const kr=function(o){return o===void 0&&(o={}),{name:"flip",options:o,async fn(e){var t;const{placement:r,middlewareData:i,rects:n,initialPlacement:a,platform:l,elements:s}=e,{mainAxis:c=!0,crossAxis:g=!0,fallbackPlacements:d,fallbackStrategy:b="bestFit",flipAlignment:u=!0,...h}=o,m=pe(r),x=d||(m===a||!u?[$e(a)]:xr(a)),k=[a,...x],S=await nt(e,h),v=[];let F=((t=i.flip)==null?void 0:t.overflows)||[];if(c&&v.push(S[m]),g){const{main:C,cross:A}=fr(r,n,await(l.isRTL==null?void 0:l.isRTL(s.floating)));v.push(S[C],S[A])}if(F=[...F,{placement:r,overflows:v}],!v.every(C=>C<=0)){var z,H;const C=((z=(H=i.flip)==null?void 0:H.index)!=null?z:0)+1,A=k[C];if(A)return{data:{index:C,overflows:F},reset:{placement:A}};let E="bottom";switch(b){case"bestFit":{var j;const M=(j=F.map(R=>[R,R.overflows.filter(D=>D>0).reduce((D,je)=>D+je,0)]).sort((R,D)=>R[1]-D[1])[0])==null?void 0:j[0].placement;M&&(E=M);break}case"initialPlacement":E=a;break}if(r!==E)return{reset:{placement:E}}}return{}}}};async function wr(o,e){const{placement:t,platform:r,elements:i}=o,n=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=pe(t),l=Ee(t),s=me(t)==="x",c=["left","top"].includes(a)?-1:1,g=n&&s?-1:1,d=typeof e=="function"?e(o):e;let{mainAxis:b,crossAxis:u,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return l&&typeof h=="number"&&(u=l==="end"?h*-1:h),s?{x:u*g,y:b*c}:{x:b*c,y:u*g}}const yr=function(o){return o===void 0&&(o=0),{name:"offset",options:o,async fn(e){const{x:t,y:r}=e,i=await wr(e,o);return{x:t+i.x,y:r+i.y,data:i}}}};function $r(o){return o==="x"?"y":"x"}const zr=function(o){return o===void 0&&(o={}),{name:"shift",options:o,async fn(e){const{x:t,y:r,placement:i}=e,{mainAxis:n=!0,crossAxis:a=!1,limiter:l={fn:f=>{let{x,y:k}=f;return{x,y:k}}},...s}=o,c={x:t,y:r},g=await nt(e,s),d=me(pe(i)),b=$r(d);let u=c[d],h=c[b];if(n){const f=d==="y"?"top":"left",x=d==="y"?"bottom":"right",k=u+g[f],S=u-g[x];u=We(k,u,S)}if(a){const f=b==="y"?"top":"left",x=b==="y"?"bottom":"right",k=h+g[f],S=h-g[x];h=We(k,h,S)}const m=l.fn({...e,[d]:u,[b]:h});return{...m,data:{x:m.x-t,y:m.y-r}}}}};function at(o){return o&&o.document&&o.location&&o.alert&&o.setInterval}function I(o){if(o==null)return window;if(!at(o)){const e=o.ownerDocument;return e&&e.defaultView||window}return o}function fe(o){return I(o).getComputedStyle(o)}function T(o){return at(o)?"":o?(o.nodeName||"").toLowerCase():""}function ct(){const o=navigator.userAgentData;return o!=null&&o.brands?o.brands.map(e=>e.brand+"/"+e.version).join(" "):navigator.userAgent}function L(o){return o instanceof I(o).HTMLElement}function re(o){return o instanceof I(o).Element}function Sr(o){return o instanceof I(o).Node}function io(o){if(typeof ShadowRoot>"u")return!1;const e=I(o).ShadowRoot;return o instanceof e||o instanceof ShadowRoot}function Re(o){const{overflow:e,overflowX:t,overflowY:r}=fe(o);return/auto|scroll|overlay|hidden/.test(e+r+t)}function Cr(o){return["table","td","th"].includes(T(o))}function lt(o){const e=/firefox/i.test(ct()),t=fe(o);return t.transform!=="none"||t.perspective!=="none"||t.contain==="paint"||["transform","perspective"].includes(t.willChange)||e&&t.willChange==="filter"||e&&(t.filter?t.filter!=="none":!1)}function st(){return!/^((?!chrome|android).)*safari/i.test(ct())}const qo=Math.min,le=Math.max,ze=Math.round;function K(o,e,t){var r,i,n,a;e===void 0&&(e=!1),t===void 0&&(t=!1);const l=o.getBoundingClientRect();let s=1,c=1;e&&L(o)&&(s=o.offsetWidth>0&&ze(l.width)/o.offsetWidth||1,c=o.offsetHeight>0&&ze(l.height)/o.offsetHeight||1);const g=re(o)?I(o):window,d=!st()&&t,b=(l.left+(d&&(r=(i=g.visualViewport)==null?void 0:i.offsetLeft)!=null?r:0))/s,u=(l.top+(d&&(n=(a=g.visualViewport)==null?void 0:a.offsetTop)!=null?n:0))/c,h=l.width/s,m=l.height/c;return{width:h,height:m,top:u,right:b+h,bottom:u+m,left:b,x:b,y:u}}function V(o){return((Sr(o)?o.ownerDocument:o.document)||window.document).documentElement}function qe(o){return re(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:{scrollLeft:o.pageXOffset,scrollTop:o.pageYOffset}}function dt(o){return K(V(o)).left+qe(o).scrollLeft}function _r(o){const e=K(o);return ze(e.width)!==o.offsetWidth||ze(e.height)!==o.offsetHeight}function Ar(o,e,t){const r=L(e),i=V(e),n=K(o,r&&_r(e),t==="fixed");let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&t!=="fixed")if((T(e)!=="body"||Re(i))&&(a=qe(e)),L(e)){const s=K(e,!0);l.x=s.x+e.clientLeft,l.y=s.y+e.clientTop}else i&&(l.x=dt(i));return{x:n.left+a.scrollLeft-l.x,y:n.top+a.scrollTop-l.y,width:n.width,height:n.height}}function bt(o){return T(o)==="html"?o:o.assignedSlot||o.parentNode||(io(o)?o.host:null)||V(o)}function jo(o){return!L(o)||getComputedStyle(o).position==="fixed"?null:o.offsetParent}function Er(o){let e=bt(o);for(io(e)&&(e=e.host);L(e)&&!["html","body"].includes(T(e));){if(lt(e))return e;e=e.parentNode}return null}function Ve(o){const e=I(o);let t=jo(o);for(;t&&Cr(t)&&getComputedStyle(t).position==="static";)t=jo(t);return t&&(T(t)==="html"||T(t)==="body"&&getComputedStyle(t).position==="static"&&!lt(t))?e:t||Er(o)||e}function Mo(o){if(L(o))return{width:o.offsetWidth,height:o.offsetHeight};const e=K(o);return{width:e.width,height:e.height}}function Rr(o){let{rect:e,offsetParent:t,strategy:r}=o;const i=L(t),n=V(t);if(t===n)return e;let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((i||!i&&r!=="fixed")&&((T(t)!=="body"||Re(n))&&(a=qe(t)),L(t))){const s=K(t,!0);l.x=s.x+t.clientLeft,l.y=s.y+t.clientTop}return{...e,x:e.x-a.scrollLeft+l.x,y:e.y-a.scrollTop+l.y}}function qr(o,e){const t=I(o),r=V(o),i=t.visualViewport;let n=r.clientWidth,a=r.clientHeight,l=0,s=0;if(i){n=i.width,a=i.height;const c=st();(c||!c&&e==="fixed")&&(l=i.offsetLeft,s=i.offsetTop)}return{width:n,height:a,x:l,y:s}}function jr(o){var e;const t=V(o),r=qe(o),i=(e=o.ownerDocument)==null?void 0:e.body,n=le(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=le(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0);let l=-r.scrollLeft+dt(o);const s=-r.scrollTop;return fe(i||t).direction==="rtl"&&(l+=le(t.clientWidth,i?i.clientWidth:0)-n),{width:n,height:a,x:l,y:s}}function ut(o){const e=bt(o);return["html","body","#document"].includes(T(e))?o.ownerDocument.body:L(e)&&Re(e)?e:ut(e)}function gt(o,e){var t;e===void 0&&(e=[]);const r=ut(o),i=r===((t=o.ownerDocument)==null?void 0:t.body),n=I(r),a=i?[n].concat(n.visualViewport||[],Re(r)?r:[]):r,l=e.concat(a);return i?l:l.concat(gt(a))}function Mr(o,e){const t=e.getRootNode==null?void 0:e.getRootNode();if(o.contains(e))return!0;if(t&&io(t)){let r=e;do{if(r&&o===r)return!0;r=r.parentNode||r.host}while(r)}return!1}function Ur(o,e){const t=K(o,!1,e==="fixed"),r=t.top+o.clientTop,i=t.left+o.clientLeft;return{top:r,left:i,x:i,y:r,right:i+o.clientWidth,bottom:r+o.clientHeight,width:o.clientWidth,height:o.clientHeight}}function Uo(o,e,t){return e==="viewport"?ye(qr(o,t)):re(e)?Ur(e,t):ye(jr(V(o)))}function Fr(o){const e=gt(o),r=["absolute","fixed"].includes(fe(o).position)&&L(o)?Ve(o):o;return re(r)?e.filter(i=>re(i)&&Mr(i,r)&&T(i)!=="body"):[]}function Pr(o){let{element:e,boundary:t,rootBoundary:r,strategy:i}=o;const a=[...t==="clippingAncestors"?Fr(e):[].concat(t),r],l=a[0],s=a.reduce((c,g)=>{const d=Uo(e,g,i);return c.top=le(d.top,c.top),c.right=qo(d.right,c.right),c.bottom=qo(d.bottom,c.bottom),c.left=le(d.left,c.left),c},Uo(e,l,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}const Lr={getClippingRect:Pr,convertOffsetParentRelativeRectToViewportRelativeRect:Rr,isElement:re,getDimensions:Mo,getOffsetParent:Ve,getDocumentElement:V,getElementRects:o=>{let{reference:e,floating:t,strategy:r}=o;return{reference:Ar(e,Ve(t),r),floating:{...Mo(t),x:0,y:0}}},getClientRects:o=>Array.from(o.getClientRects()),isRTL:o=>fe(o).direction==="rtl"},Or=(o,e,t)=>br(o,e,{platform:Lr,...t}),ue="top",ge="bottom",Se="left",Ce="right",Te={[ue]:ge,[ge]:ue,[Se]:Ce,[Ce]:Se},Br={[ue]:"\u2191",[ge]:"\u2193",[Se]:"\u2190",[Ce]:"\u2192"},Nr={[Se]:-45,[ue]:45,[Ce]:135,[ge]:-135},Fo="calc(50% - 7px)",Tr=o=>[ue,ge].includes(o);function Ir({actualDirection:o,directionName:e,arrowEl:t}){if(!t)return;o=e;const r=Tr(e);t.style.left=r?Fo:"",t.style.top=r?"":Fo}async function Hr(o){if(!o.isShowing)return;if(await o?.waitForDOM?.(),o.isCallout)return Ir(o);const e=await Or(o.targetEl,o.attentionEl,{placement:o.directionName,middleware:[kr(),yr(8),zr({padding:16}),pr({element:o.noArrow?void 0:o.arrowEl})]});o.actualDirection=e.placement,Object.assign(o.attentionEl?.style||{},{left:"0",top:"0",transform:`translate3d(${Math.round(e.x)}px, ${Math.round(e.y)}px, 0)`});let{x:t,y:r}=e.middlewareData.arrow;o.arrowEl&&(o.arrowEl.style.left=t?t+"px":"",o.arrowEl.style.top=r?r+"px":"")}class Dr extends Ae(w){static properties={show:{type:Boolean,reflect:!0},placement:{type:String},tooltip:{type:Boolean,reflect:!0},callout:{type:Boolean,reflect:!0},popover:{type:Boolean,reflect:!0},noArrow:{type:Boolean,reflect:!0}};static styles=[_`
|
|
7286
|
+
`);
|
|
7287
|
+
customElements.get("w-broadcast") || customElements.define("w-broadcast", No);
|
|
7288
|
+
function Se(o) {
|
|
7289
|
+
return o.split("-")[0];
|
|
7290
|
+
}
|
|
7291
|
+
function Ge(o) {
|
|
7292
|
+
return o.split("-")[1];
|
|
7293
|
+
}
|
|
7294
|
+
function Ce(o) {
|
|
7295
|
+
return ["top", "bottom"].includes(Se(o)) ? "x" : "y";
|
|
7296
|
+
}
|
|
7297
|
+
function it(o) {
|
|
7298
|
+
return o === "y" ? "height" : "width";
|
|
7299
|
+
}
|
|
7300
|
+
function Ct(o, e, t) {
|
|
7301
|
+
let {
|
|
7302
|
+
reference: r,
|
|
7303
|
+
floating: i
|
|
7304
|
+
} = o;
|
|
7305
|
+
const a = r.x + r.width / 2 - i.width / 2, n = r.y + r.height / 2 - i.height / 2, l = Ce(e), s = it(l), c = r[s] / 2 - i[s] / 2, b = Se(e), d = l === "x";
|
|
7306
|
+
let g;
|
|
7307
|
+
switch (b) {
|
|
7308
|
+
case "top":
|
|
7309
|
+
g = {
|
|
7310
|
+
x: a,
|
|
7311
|
+
y: r.y - i.height
|
|
7312
|
+
};
|
|
7313
|
+
break;
|
|
7314
|
+
case "bottom":
|
|
7315
|
+
g = {
|
|
7316
|
+
x: a,
|
|
7317
|
+
y: r.y + r.height
|
|
7318
|
+
};
|
|
7319
|
+
break;
|
|
7320
|
+
case "right":
|
|
7321
|
+
g = {
|
|
7322
|
+
x: r.x + r.width,
|
|
7323
|
+
y: n
|
|
7324
|
+
};
|
|
7325
|
+
break;
|
|
7326
|
+
case "left":
|
|
7327
|
+
g = {
|
|
7328
|
+
x: r.x - i.width,
|
|
7329
|
+
y: n
|
|
7330
|
+
};
|
|
7331
|
+
break;
|
|
7332
|
+
default:
|
|
7333
|
+
g = {
|
|
7334
|
+
x: r.x,
|
|
7335
|
+
y: r.y
|
|
7336
|
+
};
|
|
7337
|
+
}
|
|
7338
|
+
switch (Ge(e)) {
|
|
7339
|
+
case "start":
|
|
7340
|
+
g[l] -= c * (t && d ? -1 : 1);
|
|
7341
|
+
break;
|
|
7342
|
+
case "end":
|
|
7343
|
+
g[l] += c * (t && d ? -1 : 1);
|
|
7344
|
+
break;
|
|
7345
|
+
}
|
|
7346
|
+
return g;
|
|
7347
|
+
}
|
|
7348
|
+
const Ci = async (o, e, t) => {
|
|
7349
|
+
const {
|
|
7350
|
+
placement: r = "bottom",
|
|
7351
|
+
strategy: i = "absolute",
|
|
7352
|
+
middleware: a = [],
|
|
7353
|
+
platform: n
|
|
7354
|
+
} = t, l = await (n.isRTL == null ? void 0 : n.isRTL(e));
|
|
7355
|
+
if (process.env.NODE_ENV !== "production" && (n == null && console.error(["Floating UI: `platform` property was not passed to config. If you", "want to use Floating UI on the web, install @floating-ui/dom", "instead of the /core package. Otherwise, you can create your own", "`platform`: https://floating-ui.com/docs/platform"].join(" ")), a.filter((h) => {
|
|
7356
|
+
let {
|
|
7357
|
+
name: f
|
|
7358
|
+
} = h;
|
|
7359
|
+
return f === "autoPlacement" || f === "flip";
|
|
7360
|
+
}).length > 1))
|
|
7361
|
+
throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement`", "middleware detected. This will lead to an infinite loop. Ensure only", "one of either has been passed to the `middleware` array."].join(" "));
|
|
7362
|
+
let s = await n.getElementRects({
|
|
7363
|
+
reference: o,
|
|
7364
|
+
floating: e,
|
|
7365
|
+
strategy: i
|
|
7366
|
+
}), {
|
|
7367
|
+
x: c,
|
|
7368
|
+
y: b
|
|
7369
|
+
} = Ct(s, r, l), d = r, g = {}, u = 0;
|
|
7370
|
+
for (let h = 0; h < a.length; h++) {
|
|
7371
|
+
const {
|
|
7372
|
+
name: f,
|
|
7373
|
+
fn: v
|
|
7374
|
+
} = a[h], {
|
|
7375
|
+
x,
|
|
7376
|
+
y,
|
|
7377
|
+
data: S,
|
|
7378
|
+
reset: w
|
|
7379
|
+
} = await v({
|
|
7380
|
+
x: c,
|
|
7381
|
+
y: b,
|
|
7382
|
+
initialPlacement: r,
|
|
7383
|
+
placement: d,
|
|
7384
|
+
strategy: i,
|
|
7385
|
+
middlewareData: g,
|
|
7386
|
+
rects: s,
|
|
7387
|
+
platform: n,
|
|
7388
|
+
elements: {
|
|
7389
|
+
reference: o,
|
|
7390
|
+
floating: e
|
|
7391
|
+
}
|
|
7392
|
+
});
|
|
7393
|
+
if (c = x != null ? x : c, b = y != null ? y : b, g = {
|
|
7394
|
+
...g,
|
|
7395
|
+
[f]: {
|
|
7396
|
+
...g[f],
|
|
7397
|
+
...S
|
|
7398
|
+
}
|
|
7399
|
+
}, process.env.NODE_ENV !== "production" && u > 50 && console.warn(["Floating UI: The middleware lifecycle appears to be running in an", "infinite loop. This is usually caused by a `reset` continually", "being returned without a break condition."].join(" ")), w && u <= 50) {
|
|
7400
|
+
u++, typeof w == "object" && (w.placement && (d = w.placement), w.rects && (s = w.rects === !0 ? await n.getElementRects({
|
|
7401
|
+
reference: o,
|
|
7402
|
+
floating: e,
|
|
7403
|
+
strategy: i
|
|
7404
|
+
}) : w.rects), {
|
|
7405
|
+
x: c,
|
|
7406
|
+
y: b
|
|
7407
|
+
} = Ct(s, d, l)), h = -1;
|
|
7408
|
+
continue;
|
|
7409
|
+
}
|
|
7410
|
+
}
|
|
7411
|
+
return {
|
|
7412
|
+
x: c,
|
|
7413
|
+
y: b,
|
|
7414
|
+
placement: d,
|
|
7415
|
+
strategy: i,
|
|
7416
|
+
middlewareData: g
|
|
7417
|
+
};
|
|
7418
|
+
};
|
|
7419
|
+
function Ei(o) {
|
|
7420
|
+
return {
|
|
7421
|
+
top: 0,
|
|
7422
|
+
right: 0,
|
|
7423
|
+
bottom: 0,
|
|
7424
|
+
left: 0,
|
|
7425
|
+
...o
|
|
7426
|
+
};
|
|
7427
|
+
}
|
|
7428
|
+
function cr(o) {
|
|
7429
|
+
return typeof o != "number" ? Ei(o) : {
|
|
7430
|
+
top: o,
|
|
7431
|
+
right: o,
|
|
7432
|
+
bottom: o,
|
|
7433
|
+
left: o
|
|
7434
|
+
};
|
|
7435
|
+
}
|
|
7436
|
+
function Be(o) {
|
|
7437
|
+
return {
|
|
7438
|
+
...o,
|
|
7439
|
+
top: o.y,
|
|
7440
|
+
left: o.x,
|
|
7441
|
+
right: o.x + o.width,
|
|
7442
|
+
bottom: o.y + o.height
|
|
7443
|
+
};
|
|
7444
|
+
}
|
|
7445
|
+
async function sr(o, e) {
|
|
7446
|
+
var t;
|
|
7447
|
+
e === void 0 && (e = {});
|
|
7448
|
+
const {
|
|
7449
|
+
x: r,
|
|
7450
|
+
y: i,
|
|
7451
|
+
platform: a,
|
|
7452
|
+
rects: n,
|
|
7453
|
+
elements: l,
|
|
7454
|
+
strategy: s
|
|
7455
|
+
} = o, {
|
|
7456
|
+
boundary: c = "clippingAncestors",
|
|
7457
|
+
rootBoundary: b = "viewport",
|
|
7458
|
+
elementContext: d = "floating",
|
|
7459
|
+
altBoundary: g = !1,
|
|
7460
|
+
padding: u = 0
|
|
7461
|
+
} = e, h = cr(u), v = l[g ? d === "floating" ? "reference" : "floating" : d], x = Be(await a.getClippingRect({
|
|
7462
|
+
element: (t = await (a.isElement == null ? void 0 : a.isElement(v))) == null || t ? v : v.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(l.floating)),
|
|
7463
|
+
boundary: c,
|
|
7464
|
+
rootBoundary: b,
|
|
7465
|
+
strategy: s
|
|
7466
|
+
})), y = Be(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
7467
|
+
rect: d === "floating" ? {
|
|
7468
|
+
...n.floating,
|
|
7469
|
+
x: r,
|
|
7470
|
+
y: i
|
|
7471
|
+
} : n.reference,
|
|
7472
|
+
offsetParent: await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(l.floating)),
|
|
7473
|
+
strategy: s
|
|
7474
|
+
}) : n[d]);
|
|
7475
|
+
return {
|
|
7476
|
+
top: x.top - y.top + h.top,
|
|
7477
|
+
bottom: y.bottom - x.bottom + h.bottom,
|
|
7478
|
+
left: x.left - y.left + h.left,
|
|
7479
|
+
right: y.right - x.right + h.right
|
|
7480
|
+
};
|
|
7481
|
+
}
|
|
7482
|
+
const Ri = Math.min, Ai = Math.max;
|
|
7483
|
+
function To(o, e, t) {
|
|
7484
|
+
return Ai(o, Ri(e, t));
|
|
7485
|
+
}
|
|
7486
|
+
const qi = (o) => ({
|
|
7487
|
+
name: "arrow",
|
|
7488
|
+
options: o,
|
|
7489
|
+
async fn(e) {
|
|
7490
|
+
const {
|
|
7491
|
+
element: t,
|
|
7492
|
+
padding: r = 0
|
|
7493
|
+
} = o != null ? o : {}, {
|
|
7494
|
+
x: i,
|
|
7495
|
+
y: a,
|
|
7496
|
+
placement: n,
|
|
7497
|
+
rects: l,
|
|
7498
|
+
platform: s
|
|
7499
|
+
} = e;
|
|
7500
|
+
if (t == null)
|
|
7501
|
+
return process.env.NODE_ENV !== "production" && console.warn("Floating UI: No `element` was passed to the `arrow` middleware."), {};
|
|
7502
|
+
const c = cr(r), b = {
|
|
7503
|
+
x: i,
|
|
7504
|
+
y: a
|
|
7505
|
+
}, d = Ce(n), g = Ge(n), u = it(d), h = await s.getDimensions(t), f = d === "y" ? "top" : "left", v = d === "y" ? "bottom" : "right", x = l.reference[u] + l.reference[d] - b[d] - l.floating[u], y = b[d] - l.reference[d], S = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(t));
|
|
7506
|
+
let w = S ? d === "y" ? S.clientHeight || 0 : S.clientWidth || 0 : 0;
|
|
7507
|
+
w === 0 && (w = l.floating[u]);
|
|
7508
|
+
const F = x / 2 - y / 2, C = c[f], X = w - h[u] - c[v], N = w / 2 - h[u] / 2 + F, E = To(C, N, X), T = (g === "start" ? c[f] : c[v]) > 0 && N !== E && l.reference[u] <= l.floating[u] ? N < C ? C - N : X - N : 0;
|
|
7509
|
+
return {
|
|
7510
|
+
[d]: b[d] - T,
|
|
7511
|
+
data: {
|
|
7512
|
+
[d]: E,
|
|
7513
|
+
centerOffset: N - E
|
|
7514
|
+
}
|
|
7515
|
+
};
|
|
7516
|
+
}
|
|
7517
|
+
}), Mi = {
|
|
7518
|
+
left: "right",
|
|
7519
|
+
right: "left",
|
|
7520
|
+
bottom: "top",
|
|
7521
|
+
top: "bottom"
|
|
7522
|
+
};
|
|
7523
|
+
function Ve(o) {
|
|
7524
|
+
return o.replace(/left|right|bottom|top/g, (e) => Mi[e]);
|
|
7525
|
+
}
|
|
7526
|
+
function Pi(o, e, t) {
|
|
7527
|
+
t === void 0 && (t = !1);
|
|
7528
|
+
const r = Ge(o), i = Ce(o), a = it(i);
|
|
7529
|
+
let n = i === "x" ? r === (t ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
7530
|
+
return e.reference[a] > e.floating[a] && (n = Ve(n)), {
|
|
7531
|
+
main: n,
|
|
7532
|
+
cross: Ve(n)
|
|
7533
|
+
};
|
|
7534
|
+
}
|
|
7535
|
+
const ji = {
|
|
7536
|
+
start: "end",
|
|
7537
|
+
end: "start"
|
|
7538
|
+
};
|
|
7539
|
+
function Et(o) {
|
|
7540
|
+
return o.replace(/start|end/g, (e) => ji[e]);
|
|
7541
|
+
}
|
|
7542
|
+
function Ni(o) {
|
|
7543
|
+
const e = Ve(o);
|
|
7544
|
+
return [Et(o), e, Et(e)];
|
|
7545
|
+
}
|
|
7546
|
+
const Ti = function(o) {
|
|
7547
|
+
return o === void 0 && (o = {}), {
|
|
7548
|
+
name: "flip",
|
|
7549
|
+
options: o,
|
|
7550
|
+
async fn(e) {
|
|
7551
|
+
var t;
|
|
7552
|
+
const {
|
|
7553
|
+
placement: r,
|
|
7554
|
+
middlewareData: i,
|
|
7555
|
+
rects: a,
|
|
7556
|
+
initialPlacement: n,
|
|
7557
|
+
platform: l,
|
|
7558
|
+
elements: s
|
|
7559
|
+
} = e, {
|
|
7560
|
+
mainAxis: c = !0,
|
|
7561
|
+
crossAxis: b = !0,
|
|
7562
|
+
fallbackPlacements: d,
|
|
7563
|
+
fallbackStrategy: g = "bestFit",
|
|
7564
|
+
flipAlignment: u = !0,
|
|
7565
|
+
...h
|
|
7566
|
+
} = o, f = Se(r), x = d || (f === n || !u ? [Ve(n)] : Ni(n)), y = [n, ...x], S = await sr(e, h), w = [];
|
|
7567
|
+
let F = ((t = i.flip) == null ? void 0 : t.overflows) || [];
|
|
7568
|
+
if (c && w.push(S[f]), b) {
|
|
7569
|
+
const {
|
|
7570
|
+
main: E,
|
|
7571
|
+
cross: A
|
|
7572
|
+
} = Pi(r, a, await (l.isRTL == null ? void 0 : l.isRTL(s.floating)));
|
|
7573
|
+
w.push(S[E], S[A]);
|
|
7574
|
+
}
|
|
7575
|
+
if (F = [...F, {
|
|
7576
|
+
placement: r,
|
|
7577
|
+
overflows: w
|
|
7578
|
+
}], !w.every((E) => E <= 0)) {
|
|
7579
|
+
var C, X;
|
|
7580
|
+
const E = ((C = (X = i.flip) == null ? void 0 : X.index) != null ? C : 0) + 1, A = y[E];
|
|
7581
|
+
if (A)
|
|
7582
|
+
return {
|
|
7583
|
+
data: {
|
|
7584
|
+
index: E,
|
|
7585
|
+
overflows: F
|
|
7586
|
+
},
|
|
7587
|
+
reset: {
|
|
7588
|
+
placement: A
|
|
7589
|
+
}
|
|
7590
|
+
};
|
|
7591
|
+
let M = "bottom";
|
|
7592
|
+
switch (g) {
|
|
7593
|
+
case "bestFit": {
|
|
7594
|
+
var N;
|
|
7595
|
+
const T = (N = F.map((P) => [P, P.overflows.filter((G) => G > 0).reduce((G, eo) => G + eo, 0)]).sort((P, G) => P[1] - G[1])[0]) == null ? void 0 : N[0].placement;
|
|
7596
|
+
T && (M = T);
|
|
7597
|
+
break;
|
|
7598
|
+
}
|
|
7599
|
+
case "initialPlacement":
|
|
7600
|
+
M = n;
|
|
7601
|
+
break;
|
|
7602
|
+
}
|
|
7603
|
+
if (r !== M)
|
|
7604
|
+
return {
|
|
7605
|
+
reset: {
|
|
7606
|
+
placement: M
|
|
7607
|
+
}
|
|
7608
|
+
};
|
|
7609
|
+
}
|
|
7610
|
+
return {};
|
|
7611
|
+
}
|
|
7612
|
+
};
|
|
7613
|
+
};
|
|
7614
|
+
async function Ui(o, e) {
|
|
7615
|
+
const {
|
|
7616
|
+
placement: t,
|
|
7617
|
+
platform: r,
|
|
7618
|
+
elements: i
|
|
7619
|
+
} = o, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), n = Se(t), l = Ge(t), s = Ce(t) === "x", c = ["left", "top"].includes(n) ? -1 : 1, b = a && s ? -1 : 1, d = typeof e == "function" ? e(o) : e;
|
|
7620
|
+
let {
|
|
7621
|
+
mainAxis: g,
|
|
7622
|
+
crossAxis: u,
|
|
7623
|
+
alignmentAxis: h
|
|
7624
|
+
} = typeof d == "number" ? {
|
|
7625
|
+
mainAxis: d,
|
|
7626
|
+
crossAxis: 0,
|
|
7627
|
+
alignmentAxis: null
|
|
7628
|
+
} : {
|
|
7629
|
+
mainAxis: 0,
|
|
7630
|
+
crossAxis: 0,
|
|
7631
|
+
alignmentAxis: null,
|
|
7632
|
+
...d
|
|
7633
|
+
};
|
|
7634
|
+
return l && typeof h == "number" && (u = l === "end" ? h * -1 : h), s ? {
|
|
7635
|
+
x: u * b,
|
|
7636
|
+
y: g * c
|
|
7637
|
+
} : {
|
|
7638
|
+
x: g * c,
|
|
7639
|
+
y: u * b
|
|
7640
|
+
};
|
|
7641
|
+
}
|
|
7642
|
+
const Oi = function(o) {
|
|
7643
|
+
return o === void 0 && (o = 0), {
|
|
7644
|
+
name: "offset",
|
|
7645
|
+
options: o,
|
|
7646
|
+
async fn(e) {
|
|
7647
|
+
const {
|
|
7648
|
+
x: t,
|
|
7649
|
+
y: r
|
|
7650
|
+
} = e, i = await Ui(e, o);
|
|
7651
|
+
return {
|
|
7652
|
+
x: t + i.x,
|
|
7653
|
+
y: r + i.y,
|
|
7654
|
+
data: i
|
|
7655
|
+
};
|
|
7656
|
+
}
|
|
7657
|
+
};
|
|
7658
|
+
};
|
|
7659
|
+
function Fi(o) {
|
|
7660
|
+
return o === "x" ? "y" : "x";
|
|
7661
|
+
}
|
|
7662
|
+
const Li = function(o) {
|
|
7663
|
+
return o === void 0 && (o = {}), {
|
|
7664
|
+
name: "shift",
|
|
7665
|
+
options: o,
|
|
7666
|
+
async fn(e) {
|
|
7667
|
+
const {
|
|
7668
|
+
x: t,
|
|
7669
|
+
y: r,
|
|
7670
|
+
placement: i
|
|
7671
|
+
} = e, {
|
|
7672
|
+
mainAxis: a = !0,
|
|
7673
|
+
crossAxis: n = !1,
|
|
7674
|
+
limiter: l = {
|
|
7675
|
+
fn: (v) => {
|
|
7676
|
+
let {
|
|
7677
|
+
x,
|
|
7678
|
+
y
|
|
7679
|
+
} = v;
|
|
7680
|
+
return {
|
|
7681
|
+
x,
|
|
7682
|
+
y
|
|
7683
|
+
};
|
|
7684
|
+
}
|
|
7685
|
+
},
|
|
7686
|
+
...s
|
|
7687
|
+
} = o, c = {
|
|
7688
|
+
x: t,
|
|
7689
|
+
y: r
|
|
7690
|
+
}, b = await sr(e, s), d = Ce(Se(i)), g = Fi(d);
|
|
7691
|
+
let u = c[d], h = c[g];
|
|
7692
|
+
if (a) {
|
|
7693
|
+
const v = d === "y" ? "top" : "left", x = d === "y" ? "bottom" : "right", y = u + b[v], S = u - b[x];
|
|
7694
|
+
u = To(y, u, S);
|
|
7695
|
+
}
|
|
7696
|
+
if (n) {
|
|
7697
|
+
const v = g === "y" ? "top" : "left", x = g === "y" ? "bottom" : "right", y = h + b[v], S = h - b[x];
|
|
7698
|
+
h = To(y, h, S);
|
|
7699
|
+
}
|
|
7700
|
+
const f = l.fn({
|
|
7701
|
+
...e,
|
|
7702
|
+
[d]: u,
|
|
7703
|
+
[g]: h
|
|
7704
|
+
});
|
|
7705
|
+
return {
|
|
7706
|
+
...f,
|
|
7707
|
+
data: {
|
|
7708
|
+
x: f.x - t,
|
|
7709
|
+
y: f.y - r
|
|
7710
|
+
}
|
|
7711
|
+
};
|
|
7712
|
+
}
|
|
7713
|
+
};
|
|
7714
|
+
};
|
|
7715
|
+
function dr(o) {
|
|
7716
|
+
return o && o.document && o.location && o.alert && o.setInterval;
|
|
7717
|
+
}
|
|
7718
|
+
function Z(o) {
|
|
7719
|
+
if (o == null)
|
|
7720
|
+
return window;
|
|
7721
|
+
if (!dr(o)) {
|
|
7722
|
+
const e = o.ownerDocument;
|
|
7723
|
+
return e && e.defaultView || window;
|
|
7724
|
+
}
|
|
7725
|
+
return o;
|
|
7726
|
+
}
|
|
7727
|
+
function Ee(o) {
|
|
7728
|
+
return Z(o).getComputedStyle(o);
|
|
7729
|
+
}
|
|
7730
|
+
function Y(o) {
|
|
7731
|
+
return dr(o) ? "" : o ? (o.nodeName || "").toLowerCase() : "";
|
|
7732
|
+
}
|
|
7733
|
+
function ur() {
|
|
7734
|
+
const o = navigator.userAgentData;
|
|
7735
|
+
return o != null && o.brands ? o.brands.map((e) => e.brand + "/" + e.version).join(" ") : navigator.userAgent;
|
|
7736
|
+
}
|
|
7737
|
+
function D(o) {
|
|
7738
|
+
return o instanceof Z(o).HTMLElement;
|
|
7739
|
+
}
|
|
7740
|
+
function ge(o) {
|
|
7741
|
+
return o instanceof Z(o).Element;
|
|
7742
|
+
}
|
|
7743
|
+
function Ii(o) {
|
|
7744
|
+
return o instanceof Z(o).Node;
|
|
7745
|
+
}
|
|
7746
|
+
function nt(o) {
|
|
7747
|
+
if (typeof ShadowRoot > "u")
|
|
7748
|
+
return !1;
|
|
7749
|
+
const e = Z(o).ShadowRoot;
|
|
7750
|
+
return o instanceof e || o instanceof ShadowRoot;
|
|
7751
|
+
}
|
|
7752
|
+
function Je(o) {
|
|
7753
|
+
const {
|
|
7754
|
+
overflow: e,
|
|
7755
|
+
overflowX: t,
|
|
7756
|
+
overflowY: r
|
|
7757
|
+
} = Ee(o);
|
|
7758
|
+
return /auto|scroll|overlay|hidden/.test(e + r + t);
|
|
7759
|
+
}
|
|
7760
|
+
function Bi(o) {
|
|
7761
|
+
return ["table", "td", "th"].includes(Y(o));
|
|
7762
|
+
}
|
|
7763
|
+
function br(o) {
|
|
7764
|
+
const e = /firefox/i.test(ur()), t = Ee(o);
|
|
7765
|
+
return t.transform !== "none" || t.perspective !== "none" || t.contain === "paint" || ["transform", "perspective"].includes(t.willChange) || e && t.willChange === "filter" || e && (t.filter ? t.filter !== "none" : !1);
|
|
7766
|
+
}
|
|
7767
|
+
function gr() {
|
|
7768
|
+
return !/^((?!chrome|android).)*safari/i.test(ur());
|
|
7769
|
+
}
|
|
7770
|
+
const Rt = Math.min, ve = Math.max, De = Math.round;
|
|
7771
|
+
function ae(o, e, t) {
|
|
7772
|
+
var r, i, a, n;
|
|
7773
|
+
e === void 0 && (e = !1), t === void 0 && (t = !1);
|
|
7774
|
+
const l = o.getBoundingClientRect();
|
|
7775
|
+
let s = 1, c = 1;
|
|
7776
|
+
e && D(o) && (s = o.offsetWidth > 0 && De(l.width) / o.offsetWidth || 1, c = o.offsetHeight > 0 && De(l.height) / o.offsetHeight || 1);
|
|
7777
|
+
const b = ge(o) ? Z(o) : window, d = !gr() && t, g = (l.left + (d && (r = (i = b.visualViewport) == null ? void 0 : i.offsetLeft) != null ? r : 0)) / s, u = (l.top + (d && (a = (n = b.visualViewport) == null ? void 0 : n.offsetTop) != null ? a : 0)) / c, h = l.width / s, f = l.height / c;
|
|
7778
|
+
return {
|
|
7779
|
+
width: h,
|
|
7780
|
+
height: f,
|
|
7781
|
+
top: u,
|
|
7782
|
+
right: g + h,
|
|
7783
|
+
bottom: u + f,
|
|
7784
|
+
left: g,
|
|
7785
|
+
x: g,
|
|
7786
|
+
y: u
|
|
7787
|
+
};
|
|
7788
|
+
}
|
|
7789
|
+
function oe(o) {
|
|
7790
|
+
return ((Ii(o) ? o.ownerDocument : o.document) || window.document).documentElement;
|
|
7791
|
+
}
|
|
7792
|
+
function Qe(o) {
|
|
7793
|
+
return ge(o) ? {
|
|
7794
|
+
scrollLeft: o.scrollLeft,
|
|
7795
|
+
scrollTop: o.scrollTop
|
|
7796
|
+
} : {
|
|
7797
|
+
scrollLeft: o.pageXOffset,
|
|
7798
|
+
scrollTop: o.pageYOffset
|
|
7799
|
+
};
|
|
7800
|
+
}
|
|
7801
|
+
function hr(o) {
|
|
7802
|
+
return ae(oe(o)).left + Qe(o).scrollLeft;
|
|
7803
|
+
}
|
|
7804
|
+
function Vi(o) {
|
|
7805
|
+
const e = ae(o);
|
|
7806
|
+
return De(e.width) !== o.offsetWidth || De(e.height) !== o.offsetHeight;
|
|
7807
|
+
}
|
|
7808
|
+
function Di(o, e, t) {
|
|
7809
|
+
const r = D(e), i = oe(e), a = ae(
|
|
7810
|
+
o,
|
|
7811
|
+
r && Vi(e),
|
|
7812
|
+
t === "fixed"
|
|
7813
|
+
);
|
|
7814
|
+
let n = {
|
|
7815
|
+
scrollLeft: 0,
|
|
7816
|
+
scrollTop: 0
|
|
7817
|
+
};
|
|
7818
|
+
const l = {
|
|
7819
|
+
x: 0,
|
|
7820
|
+
y: 0
|
|
7821
|
+
};
|
|
7822
|
+
if (r || !r && t !== "fixed")
|
|
7823
|
+
if ((Y(e) !== "body" || Je(i)) && (n = Qe(e)), D(e)) {
|
|
7824
|
+
const s = ae(e, !0);
|
|
7825
|
+
l.x = s.x + e.clientLeft, l.y = s.y + e.clientTop;
|
|
7826
|
+
} else
|
|
7827
|
+
i && (l.x = hr(i));
|
|
7828
|
+
return {
|
|
7829
|
+
x: a.left + n.scrollLeft - l.x,
|
|
7830
|
+
y: a.top + n.scrollTop - l.y,
|
|
7831
|
+
width: a.width,
|
|
7832
|
+
height: a.height
|
|
7833
|
+
};
|
|
7834
|
+
}
|
|
7835
|
+
function pr(o) {
|
|
7836
|
+
return Y(o) === "html" ? o : o.assignedSlot || o.parentNode || (nt(o) ? o.host : null) || oe(o);
|
|
7837
|
+
}
|
|
7838
|
+
function At(o) {
|
|
7839
|
+
return !D(o) || getComputedStyle(o).position === "fixed" ? null : o.offsetParent;
|
|
7840
|
+
}
|
|
7841
|
+
function Hi(o) {
|
|
7842
|
+
let e = pr(o);
|
|
7843
|
+
for (nt(e) && (e = e.host); D(e) && !["html", "body"].includes(Y(e)); ) {
|
|
7844
|
+
if (br(e))
|
|
7845
|
+
return e;
|
|
7846
|
+
e = e.parentNode;
|
|
7847
|
+
}
|
|
7848
|
+
return null;
|
|
7849
|
+
}
|
|
7850
|
+
function Uo(o) {
|
|
7851
|
+
const e = Z(o);
|
|
7852
|
+
let t = At(o);
|
|
7853
|
+
for (; t && Bi(t) && getComputedStyle(t).position === "static"; )
|
|
7854
|
+
t = At(t);
|
|
7855
|
+
return t && (Y(t) === "html" || Y(t) === "body" && getComputedStyle(t).position === "static" && !br(t)) ? e : t || Hi(o) || e;
|
|
7856
|
+
}
|
|
7857
|
+
function qt(o) {
|
|
7858
|
+
if (D(o))
|
|
7859
|
+
return {
|
|
7860
|
+
width: o.offsetWidth,
|
|
7861
|
+
height: o.offsetHeight
|
|
7862
|
+
};
|
|
7863
|
+
const e = ae(o);
|
|
7864
|
+
return {
|
|
7865
|
+
width: e.width,
|
|
7866
|
+
height: e.height
|
|
7867
|
+
};
|
|
7868
|
+
}
|
|
7869
|
+
function Wi(o) {
|
|
7870
|
+
let {
|
|
7871
|
+
rect: e,
|
|
7872
|
+
offsetParent: t,
|
|
7873
|
+
strategy: r
|
|
7874
|
+
} = o;
|
|
7875
|
+
const i = D(t), a = oe(t);
|
|
7876
|
+
if (t === a)
|
|
7877
|
+
return e;
|
|
7878
|
+
let n = {
|
|
7879
|
+
scrollLeft: 0,
|
|
7880
|
+
scrollTop: 0
|
|
7881
|
+
};
|
|
7882
|
+
const l = {
|
|
7883
|
+
x: 0,
|
|
7884
|
+
y: 0
|
|
7885
|
+
};
|
|
7886
|
+
if ((i || !i && r !== "fixed") && ((Y(t) !== "body" || Je(a)) && (n = Qe(t)), D(t))) {
|
|
7887
|
+
const s = ae(t, !0);
|
|
7888
|
+
l.x = s.x + t.clientLeft, l.y = s.y + t.clientTop;
|
|
7889
|
+
}
|
|
7890
|
+
return {
|
|
7891
|
+
...e,
|
|
7892
|
+
x: e.x - n.scrollLeft + l.x,
|
|
7893
|
+
y: e.y - n.scrollTop + l.y
|
|
7894
|
+
};
|
|
7895
|
+
}
|
|
7896
|
+
function Ki(o, e) {
|
|
7897
|
+
const t = Z(o), r = oe(o), i = t.visualViewport;
|
|
7898
|
+
let a = r.clientWidth, n = r.clientHeight, l = 0, s = 0;
|
|
7899
|
+
if (i) {
|
|
7900
|
+
a = i.width, n = i.height;
|
|
7901
|
+
const c = gr();
|
|
7902
|
+
(c || !c && e === "fixed") && (l = i.offsetLeft, s = i.offsetTop);
|
|
7903
|
+
}
|
|
7904
|
+
return {
|
|
7905
|
+
width: a,
|
|
7906
|
+
height: n,
|
|
7907
|
+
x: l,
|
|
7908
|
+
y: s
|
|
7909
|
+
};
|
|
7910
|
+
}
|
|
7911
|
+
function Yi(o) {
|
|
7912
|
+
var e;
|
|
7913
|
+
const t = oe(o), r = Qe(o), i = (e = o.ownerDocument) == null ? void 0 : e.body, a = ve(t.scrollWidth, t.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), n = ve(t.scrollHeight, t.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0);
|
|
7914
|
+
let l = -r.scrollLeft + hr(o);
|
|
7915
|
+
const s = -r.scrollTop;
|
|
7916
|
+
return Ee(i || t).direction === "rtl" && (l += ve(t.clientWidth, i ? i.clientWidth : 0) - a), {
|
|
7917
|
+
width: a,
|
|
7918
|
+
height: n,
|
|
7919
|
+
x: l,
|
|
7920
|
+
y: s
|
|
7921
|
+
};
|
|
7922
|
+
}
|
|
7923
|
+
function mr(o) {
|
|
7924
|
+
const e = pr(o);
|
|
7925
|
+
return ["html", "body", "#document"].includes(Y(e)) ? o.ownerDocument.body : D(e) && Je(e) ? e : mr(e);
|
|
7926
|
+
}
|
|
7927
|
+
function fr(o, e) {
|
|
7928
|
+
var t;
|
|
7929
|
+
e === void 0 && (e = []);
|
|
7930
|
+
const r = mr(o), i = r === ((t = o.ownerDocument) == null ? void 0 : t.body), a = Z(r), n = i ? [a].concat(a.visualViewport || [], Je(r) ? r : []) : r, l = e.concat(n);
|
|
7931
|
+
return i ? l : l.concat(fr(n));
|
|
7932
|
+
}
|
|
7933
|
+
function Zi(o, e) {
|
|
7934
|
+
const t = e.getRootNode == null ? void 0 : e.getRootNode();
|
|
7935
|
+
if (o.contains(e))
|
|
7936
|
+
return !0;
|
|
7937
|
+
if (t && nt(t)) {
|
|
7938
|
+
let r = e;
|
|
7939
|
+
do {
|
|
7940
|
+
if (r && o === r)
|
|
7941
|
+
return !0;
|
|
7942
|
+
r = r.parentNode || r.host;
|
|
7943
|
+
} while (r);
|
|
7944
|
+
}
|
|
7945
|
+
return !1;
|
|
7946
|
+
}
|
|
7947
|
+
function Xi(o, e) {
|
|
7948
|
+
const t = ae(o, !1, e === "fixed"), r = t.top + o.clientTop, i = t.left + o.clientLeft;
|
|
7949
|
+
return {
|
|
7950
|
+
top: r,
|
|
7951
|
+
left: i,
|
|
7952
|
+
x: i,
|
|
7953
|
+
y: r,
|
|
7954
|
+
right: i + o.clientWidth,
|
|
7955
|
+
bottom: r + o.clientHeight,
|
|
7956
|
+
width: o.clientWidth,
|
|
7957
|
+
height: o.clientHeight
|
|
7958
|
+
};
|
|
7959
|
+
}
|
|
7960
|
+
function Mt(o, e, t) {
|
|
7961
|
+
return e === "viewport" ? Be(Ki(o, t)) : ge(e) ? Xi(e, t) : Be(Yi(oe(o)));
|
|
7962
|
+
}
|
|
7963
|
+
function Gi(o) {
|
|
7964
|
+
const e = fr(o), r = ["absolute", "fixed"].includes(Ee(o).position) && D(o) ? Uo(o) : o;
|
|
7965
|
+
return ge(r) ? e.filter((i) => ge(i) && Zi(i, r) && Y(i) !== "body") : [];
|
|
7966
|
+
}
|
|
7967
|
+
function Ji(o) {
|
|
7968
|
+
let {
|
|
7969
|
+
element: e,
|
|
7970
|
+
boundary: t,
|
|
7971
|
+
rootBoundary: r,
|
|
7972
|
+
strategy: i
|
|
7973
|
+
} = o;
|
|
7974
|
+
const n = [...t === "clippingAncestors" ? Gi(e) : [].concat(t), r], l = n[0], s = n.reduce((c, b) => {
|
|
7975
|
+
const d = Mt(e, b, i);
|
|
7976
|
+
return c.top = ve(d.top, c.top), c.right = Rt(d.right, c.right), c.bottom = Rt(d.bottom, c.bottom), c.left = ve(d.left, c.left), c;
|
|
7977
|
+
}, Mt(e, l, i));
|
|
7978
|
+
return {
|
|
7979
|
+
width: s.right - s.left,
|
|
7980
|
+
height: s.bottom - s.top,
|
|
7981
|
+
x: s.left,
|
|
7982
|
+
y: s.top
|
|
7983
|
+
};
|
|
7984
|
+
}
|
|
7985
|
+
const Qi = {
|
|
7986
|
+
getClippingRect: Ji,
|
|
7987
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Wi,
|
|
7988
|
+
isElement: ge,
|
|
7989
|
+
getDimensions: qt,
|
|
7990
|
+
getOffsetParent: Uo,
|
|
7991
|
+
getDocumentElement: oe,
|
|
7992
|
+
getElementRects: (o) => {
|
|
7993
|
+
let {
|
|
7994
|
+
reference: e,
|
|
7995
|
+
floating: t,
|
|
7996
|
+
strategy: r
|
|
7997
|
+
} = o;
|
|
7998
|
+
return {
|
|
7999
|
+
reference: Di(e, Uo(t), r),
|
|
8000
|
+
floating: {
|
|
8001
|
+
...qt(t),
|
|
8002
|
+
x: 0,
|
|
8003
|
+
y: 0
|
|
8004
|
+
}
|
|
8005
|
+
};
|
|
8006
|
+
},
|
|
8007
|
+
getClientRects: (o) => Array.from(o.getClientRects()),
|
|
8008
|
+
isRTL: (o) => Ee(o).direction === "rtl"
|
|
8009
|
+
}, en = (o, e, t) => Ci(o, e, {
|
|
8010
|
+
platform: Qi,
|
|
8011
|
+
...t
|
|
8012
|
+
}), $e = "top", ze = "bottom", He = "left", We = "right", _o = {
|
|
8013
|
+
[$e]: ze,
|
|
8014
|
+
[ze]: $e,
|
|
8015
|
+
[He]: We,
|
|
8016
|
+
[We]: He
|
|
8017
|
+
}, on = {
|
|
8018
|
+
[$e]: "\u2191",
|
|
8019
|
+
[ze]: "\u2193",
|
|
8020
|
+
[He]: "\u2190",
|
|
8021
|
+
[We]: "\u2192"
|
|
8022
|
+
}, tn = {
|
|
8023
|
+
[He]: -45,
|
|
8024
|
+
[$e]: 45,
|
|
8025
|
+
[We]: 135,
|
|
8026
|
+
[ze]: -135
|
|
8027
|
+
}, Pt = "calc(50% - 7px)", rn = (o) => [$e, ze].includes(o);
|
|
8028
|
+
function nn({ actualDirection: o, directionName: e, arrowEl: t }) {
|
|
8029
|
+
if (!t)
|
|
8030
|
+
return;
|
|
8031
|
+
o = e;
|
|
8032
|
+
const r = rn(e);
|
|
8033
|
+
t.style.left = r ? Pt : "", t.style.top = r ? "" : Pt;
|
|
8034
|
+
}
|
|
8035
|
+
async function an(o) {
|
|
8036
|
+
var i, a;
|
|
8037
|
+
if (!o.isShowing)
|
|
8038
|
+
return;
|
|
8039
|
+
if (await ((i = o == null ? void 0 : o.waitForDOM) == null ? void 0 : i.call(o)), o.isCallout)
|
|
8040
|
+
return nn(o);
|
|
8041
|
+
const e = await en(o.targetEl, o.attentionEl, {
|
|
8042
|
+
placement: o.directionName,
|
|
8043
|
+
middleware: [
|
|
8044
|
+
Ti(),
|
|
8045
|
+
Oi(8),
|
|
8046
|
+
Li({ padding: 16 }),
|
|
8047
|
+
qi({ element: o.noArrow ? void 0 : o.arrowEl })
|
|
8048
|
+
]
|
|
8049
|
+
});
|
|
8050
|
+
o.actualDirection = e.placement, Object.assign(((a = o.attentionEl) == null ? void 0 : a.style) || {}, {
|
|
8051
|
+
left: "0",
|
|
8052
|
+
top: "0",
|
|
8053
|
+
transform: `translate3d(${Math.round(e.x)}px, ${Math.round(e.y)}px, 0)`
|
|
8054
|
+
});
|
|
8055
|
+
let { x: t, y: r } = e.middlewareData.arrow;
|
|
8056
|
+
o.arrowEl && (o.arrowEl.style.left = t ? t + "px" : "", o.arrowEl.style.top = r ? r + "px" : "");
|
|
8057
|
+
}
|
|
8058
|
+
class Oo extends Xe($) {
|
|
8059
|
+
constructor() {
|
|
8060
|
+
super(), this.show = !1, this.tooltip = !1, this.callout = !1, this.popover = !1, this.noArrow = !1;
|
|
8061
|
+
}
|
|
8062
|
+
connectedCallback() {
|
|
8063
|
+
if (super.connectedCallback(), !this.placement || !Object.keys(_o).includes(this.placement))
|
|
8064
|
+
throw new Error(
|
|
8065
|
+
`Invalid "placement" attribute. Set its value to one of the following:
|
|
8066
|
+
${JSON.stringify(
|
|
8067
|
+
Object.keys(_o)
|
|
8068
|
+
)}`
|
|
8069
|
+
);
|
|
8070
|
+
setTimeout(() => this.requestUpdate(), 0);
|
|
8071
|
+
}
|
|
8072
|
+
get _actualDirection() {
|
|
8073
|
+
return this.placement;
|
|
8074
|
+
}
|
|
8075
|
+
set _actualDirection(e) {
|
|
8076
|
+
this.placement = e;
|
|
8077
|
+
}
|
|
8078
|
+
get _arrowDirection() {
|
|
8079
|
+
return _o[this.placement];
|
|
8080
|
+
}
|
|
8081
|
+
updated() {
|
|
8082
|
+
this.callout || this._attentionEl.style.setProperty("--attention-visibility", this.show ? "" : "hidden"), this.tooltip || this._attentionEl.style.setProperty("--attention-display", this.show ? "block" : "none"), this.attentionState = {
|
|
8083
|
+
isShowing: this.show,
|
|
8084
|
+
isCallout: this.callout,
|
|
8085
|
+
actualDirection: this._actualDirection,
|
|
8086
|
+
directionName: this.placement,
|
|
8087
|
+
arrowEl: this.renderRoot.querySelector("#arrow"),
|
|
8088
|
+
attentionEl: this._attentionEl,
|
|
8089
|
+
targetEl: this._targetEl,
|
|
8090
|
+
noArrow: this.noArrow
|
|
8091
|
+
}, an(this.attentionState);
|
|
8092
|
+
}
|
|
8093
|
+
setAriaLabels() {
|
|
8094
|
+
if (this._targetEl && !this._targetEl.getAttribute("aria-describedby")) {
|
|
8095
|
+
const e = this._messageEl.id || (this._messageEl.id = ui());
|
|
8096
|
+
this._messageEl.setAttribute("role", "tooltip"), this._targetEl.setAttribute("aria-describedby", e);
|
|
8097
|
+
}
|
|
8098
|
+
}
|
|
8099
|
+
firstUpdated() {
|
|
8100
|
+
this.setAriaLabels(), this.callout && (this._attentionEl.style.position = "relative");
|
|
8101
|
+
}
|
|
8102
|
+
get _attentionEl() {
|
|
8103
|
+
return this.renderRoot.querySelector("#attention");
|
|
8104
|
+
}
|
|
8105
|
+
get _targetEl() {
|
|
8106
|
+
return this.renderRoot.querySelector("slot[name='target']").assignedNodes()[0];
|
|
8107
|
+
}
|
|
8108
|
+
get _messageEl() {
|
|
8109
|
+
return this.renderRoot.querySelector("slot[name='message']").assignedNodes()[0];
|
|
8110
|
+
}
|
|
8111
|
+
get _wrapperClasses() {
|
|
8112
|
+
return yt({
|
|
8113
|
+
[Q.base]: !0,
|
|
8114
|
+
[Q.tooltip]: this.tooltip,
|
|
8115
|
+
[Q.callout]: this.callout,
|
|
8116
|
+
[Q.popover]: this.popover
|
|
8117
|
+
});
|
|
8118
|
+
}
|
|
8119
|
+
get _arrowClasses() {
|
|
8120
|
+
return yt({
|
|
8121
|
+
[Q.arrowBase]: !0,
|
|
8122
|
+
["-top-8"]: this._arrowDirection === "top",
|
|
8123
|
+
["-right-8"]: this._arrowDirection === "right",
|
|
8124
|
+
["-bottom-8"]: this._arrowDirection === "bottom",
|
|
8125
|
+
["-left-8"]: this._arrowDirection === "left",
|
|
8126
|
+
[Q.arrowTooltip]: this.tooltip,
|
|
8127
|
+
[Q.arrowCallout]: this.callout,
|
|
8128
|
+
[Q.arrowPopover]: this.popover
|
|
8129
|
+
});
|
|
8130
|
+
}
|
|
8131
|
+
get _arrowHtml() {
|
|
8132
|
+
return this.noArrow ? "" : p`<div
|
|
8133
|
+
id="arrow"
|
|
8134
|
+
role="img"
|
|
8135
|
+
aria-label=${on[this._arrowDirection]}
|
|
8136
|
+
class="${this._arrowClasses}"
|
|
8137
|
+
style="transform:rotate(${tn[this._arrowDirection]}deg);
|
|
8138
|
+
margin-${this._arrowDirection.charAt(0).toLowerCase() + this._arrowDirection.slice(1)}:-0.5px;"
|
|
8139
|
+
/>`;
|
|
8140
|
+
}
|
|
8141
|
+
render() {
|
|
8142
|
+
return p`
|
|
8143
|
+
<div class=${_(this.className ? this.className : void 0)}>
|
|
8144
|
+
${this.placement === "right" || this.placement === "bottom" ? p`
|
|
8145
|
+
<slot name="target"></slot>
|
|
8146
|
+
<div id="attention" class="${this._wrapperClasses}">
|
|
8147
|
+
<div>
|
|
8148
|
+
${this._arrowHtml}
|
|
8149
|
+
<slot name="message"></slot>
|
|
8150
|
+
</div>
|
|
8151
|
+
</div>
|
|
8152
|
+
` : p`
|
|
8153
|
+
<div id="attention" class="${this._wrapperClasses}">
|
|
8154
|
+
<div>
|
|
8155
|
+
<slot name="message"></slot>
|
|
8156
|
+
${this._arrowHtml}
|
|
8157
|
+
</div>
|
|
8158
|
+
</div>
|
|
8159
|
+
<slot name="target"></slot>
|
|
8160
|
+
`}
|
|
8161
|
+
</div>
|
|
8162
|
+
`;
|
|
8163
|
+
}
|
|
8164
|
+
}
|
|
8165
|
+
k(Oo, "properties", {
|
|
8166
|
+
show: { type: Boolean, reflect: !0 },
|
|
8167
|
+
placement: { type: String },
|
|
8168
|
+
tooltip: { type: Boolean, reflect: !0 },
|
|
8169
|
+
callout: { type: Boolean, reflect: !0 },
|
|
8170
|
+
popover: { type: Boolean, reflect: !0 },
|
|
8171
|
+
noArrow: { type: Boolean, reflect: !0 }
|
|
8172
|
+
}), k(Oo, "styles", [
|
|
8173
|
+
R`
|
|
5447
8174
|
/* /* layer: preflights */
|
|
5448
8175
|
|
|
5449
8176
|
/*
|
|
@@ -6027,35 +8754,118 @@ video {
|
|
|
6027
8754
|
border-top-left-radius: 4px;
|
|
6028
8755
|
z-index: 1;
|
|
6029
8756
|
}
|
|
6030
|
-
`
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
8757
|
+
`
|
|
8758
|
+
]);
|
|
8759
|
+
customElements.get("w-attention") || customElements.define("w-attention", Oo);
|
|
8760
|
+
class Fo extends $ {
|
|
8761
|
+
constructor() {
|
|
8762
|
+
super(), this.type = "text";
|
|
8763
|
+
}
|
|
8764
|
+
get _outerWrapperStyles() {
|
|
8765
|
+
return L({
|
|
8766
|
+
"has-suffix": this._hasSuffix,
|
|
8767
|
+
"has-prefix": this._hasPrefix
|
|
8768
|
+
});
|
|
8769
|
+
}
|
|
8770
|
+
get _innerWrapperStyles() {
|
|
8771
|
+
return L({
|
|
8772
|
+
"input mb-0": !0,
|
|
8773
|
+
"input--is-invalid": this.invalid,
|
|
8774
|
+
"input--is-disabled": this.disabled,
|
|
8775
|
+
"input--is-read-only": this.readOnly
|
|
8776
|
+
});
|
|
8777
|
+
}
|
|
8778
|
+
get _label() {
|
|
8779
|
+
if (this.label)
|
|
8780
|
+
return p`<label for="${this._id}">${this.label}</label>`;
|
|
8781
|
+
}
|
|
8782
|
+
get _helpId() {
|
|
8783
|
+
if (this.helpText)
|
|
8784
|
+
return `${this._id}__hint`;
|
|
8785
|
+
}
|
|
8786
|
+
get _id() {
|
|
8787
|
+
return "textfield";
|
|
8788
|
+
}
|
|
8789
|
+
get _error() {
|
|
8790
|
+
if (this.invalid && this._helpId)
|
|
8791
|
+
return this._helpId;
|
|
8792
|
+
}
|
|
8793
|
+
handler(e) {
|
|
8794
|
+
const { name: t, value: r } = e.target, i = new CustomEvent(e.type, {
|
|
8795
|
+
detail: {
|
|
8796
|
+
name: t,
|
|
8797
|
+
value: r,
|
|
8798
|
+
target: e.target
|
|
8799
|
+
}
|
|
8800
|
+
});
|
|
8801
|
+
this.dispatchEvent(i);
|
|
8802
|
+
}
|
|
8803
|
+
prefixSlotChange(e) {
|
|
8804
|
+
this.renderRoot.querySelector("slot[name=prefix]").assignedElements().length && (this._hasPrefix = !0);
|
|
8805
|
+
}
|
|
8806
|
+
suffixSlotChange(e) {
|
|
8807
|
+
this.renderRoot.querySelector("slot[name=suffix]").assignedElements().length && (this._hasSuffix = !0);
|
|
8808
|
+
}
|
|
8809
|
+
render() {
|
|
8810
|
+
return p`
|
|
8811
|
+
${this._fabricStylesheet}
|
|
8812
|
+
<div class="${this._outerWrapperStyles}">
|
|
8813
|
+
<div class="${this._innerWrapperStyles}">
|
|
8814
|
+
${this._label}
|
|
8815
|
+
<div class="relative">
|
|
8816
|
+
<slot @slotchange="${this.prefixSlotChange}" name="prefix"></slot>
|
|
8817
|
+
<input
|
|
8818
|
+
type="${this.type}"
|
|
8819
|
+
min="${_(this.min)}"
|
|
8820
|
+
max="${_(this.max)}"
|
|
8821
|
+
size="${_(this.size)}"
|
|
8822
|
+
minlength="${_(this.minLength)}"
|
|
8823
|
+
maxlength="${_(this.maxLength)}"
|
|
8824
|
+
name="${_(this.name)}"
|
|
8825
|
+
pattern="${_(this.pattern)}"
|
|
8826
|
+
placeholder="${_(this.placeholder)}"
|
|
8827
|
+
value="${_(this.value)}"
|
|
8828
|
+
aria-describedby="${_(this._helpId)}"
|
|
8829
|
+
aria-errormessage="${_(this._error)}"
|
|
8830
|
+
aria-invalid="${_(this.invalid)}"
|
|
8831
|
+
id="${this._id}"
|
|
8832
|
+
?disabled="${this.disabled}"
|
|
8833
|
+
?readonly="${this.readOnly}"
|
|
8834
|
+
?required="${this.required}"
|
|
8835
|
+
@blur="${this.handler}"
|
|
8836
|
+
@change="${this.handler}"
|
|
8837
|
+
@focus="${this.handler}"
|
|
8838
|
+
/>
|
|
8839
|
+
<slot @slotchange="${this.suffixSlotChange}" name="suffix"></slot>
|
|
8840
|
+
</div>
|
|
8841
|
+
${this.helpText && p`<div class="input__sub-text" id="${this._helpId}">${this.helpText}</div>`}
|
|
8842
|
+
</div>
|
|
6057
8843
|
</div>
|
|
6058
|
-
|
|
8844
|
+
`;
|
|
8845
|
+
}
|
|
8846
|
+
}
|
|
8847
|
+
k(Fo, "properties", {
|
|
8848
|
+
disabled: { type: Boolean },
|
|
8849
|
+
invalid: { type: Boolean },
|
|
8850
|
+
id: { type: String },
|
|
8851
|
+
label: { type: String },
|
|
8852
|
+
helpText: { type: String, attribute: "help-text" },
|
|
8853
|
+
size: { type: String },
|
|
8854
|
+
max: { type: Number },
|
|
8855
|
+
min: { type: Number },
|
|
8856
|
+
minLength: { type: Number, attribute: "min-length" },
|
|
8857
|
+
maxLength: { type: Number, attribute: "max-length" },
|
|
8858
|
+
name: { type: String },
|
|
8859
|
+
pattern: { type: String },
|
|
8860
|
+
placeholder: { type: String },
|
|
8861
|
+
readOnly: { type: Boolean, attribute: "read-only" },
|
|
8862
|
+
required: { type: Boolean },
|
|
8863
|
+
type: { type: String },
|
|
8864
|
+
value: { type: String },
|
|
8865
|
+
_hasPrefix: { state: !0 },
|
|
8866
|
+
_hasSuffix: { state: !0 }
|
|
8867
|
+
}), k(Fo, "styles", [
|
|
8868
|
+
R`
|
|
6059
8869
|
/* /* layer: preflights */
|
|
6060
8870
|
|
|
6061
8871
|
/*
|
|
@@ -6630,41 +9440,95 @@ video {
|
|
|
6630
9440
|
::slotted(:last-child) {
|
|
6631
9441
|
margin-bottom: 0px !important;
|
|
6632
9442
|
}
|
|
6633
|
-
`
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
|
|
6639
|
-
|
|
6640
|
-
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
9443
|
+
`
|
|
9444
|
+
]);
|
|
9445
|
+
customElements.get("w-textfield") || customElements.define("w-textfield", Fo);
|
|
9446
|
+
class jt extends $ {
|
|
9447
|
+
render() {
|
|
9448
|
+
return p`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M2.5 5.5 8 11l5.5-5.5"></path></svg>`;
|
|
9449
|
+
}
|
|
9450
|
+
}
|
|
9451
|
+
customElements.get("f-icon-chevron-down16", jt) || customElements.define("f-icon-chevron-down16", jt);
|
|
9452
|
+
class Lo extends Xe($) {
|
|
9453
|
+
constructor() {
|
|
9454
|
+
super(), this.expanded = !1, this.animated = !1, this.info = !1, this.box = !1, this.bleed = !1, this.noChevron = !1, this._hasTitle = !0;
|
|
9455
|
+
}
|
|
9456
|
+
firstUpdated() {
|
|
9457
|
+
this._hasTitle = !!this.title || this.renderRoot.querySelector("slot[name='title']").assignedNodes().length > 0;
|
|
9458
|
+
}
|
|
9459
|
+
get _expandableSlot() {
|
|
9460
|
+
return p`<div
|
|
9461
|
+
class=${L({
|
|
9462
|
+
[this.contentClass || ""]: !0,
|
|
9463
|
+
[le.box + (this._hasTitle ? " pt-0" : "")]: this.box
|
|
9464
|
+
})}
|
|
9465
|
+
>
|
|
9466
|
+
<slot></slot>
|
|
9467
|
+
</div>`;
|
|
9468
|
+
}
|
|
9469
|
+
render() {
|
|
9470
|
+
return p` <div
|
|
9471
|
+
class=${L({
|
|
9472
|
+
"bg-aqua-50": this.info,
|
|
9473
|
+
["py-0 px-0 " + le.box]: this.box,
|
|
9474
|
+
[le.bleed]: this.bleed
|
|
9475
|
+
})}
|
|
9476
|
+
>
|
|
9477
|
+
${this._hasTitle ? p`<w-unstyled-heading level=${this.headingLevel}>
|
|
9478
|
+
<button
|
|
9479
|
+
type="button"
|
|
9480
|
+
aria-expanded="${this.expanded}"
|
|
9481
|
+
class=${L({
|
|
9482
|
+
[this.buttonClass || ""]: !0,
|
|
9483
|
+
[ai + " hover:underline focus:underline"]: !0,
|
|
9484
|
+
["w-full text-left relative " + le.box]: this.box,
|
|
9485
|
+
"hover:text-aqua-700 active:text-aqua-800": this.info
|
|
9486
|
+
})}
|
|
9487
|
+
@click=${() => this.expanded = !this.expanded}
|
|
9488
|
+
>
|
|
9489
|
+
<div class="flex justify-between align-center">
|
|
9490
|
+
${this.title ? p`<span class="h4">${this.title}</span>` : p`<slot name="title"></slot>`}
|
|
9491
|
+
${this.noChevron ? "" : p`<div
|
|
9492
|
+
class=${L({
|
|
9493
|
+
"self-center transform transition-transform": !0,
|
|
9494
|
+
"-rotate-180": this.expanded,
|
|
9495
|
+
"relative left-8": !this.box,
|
|
9496
|
+
"box-chevron": this.box
|
|
9497
|
+
})}
|
|
9498
|
+
>
|
|
9499
|
+
<w-icon-chevron-down16></w-icon-chevron-down16>
|
|
9500
|
+
</div>`}
|
|
9501
|
+
</div>
|
|
9502
|
+
</button>
|
|
9503
|
+
</w-unstyled-heading>` : ""}
|
|
9504
|
+
${this.animated ? p`<w-expand-transition ?show=${this.expanded}>
|
|
9505
|
+
${this._expandableSlot}
|
|
9506
|
+
</w-expand-transition>` : p`<div
|
|
9507
|
+
class=${L({
|
|
9508
|
+
"overflow-hidden": !0,
|
|
9509
|
+
"h-0 invisible": !this.expanded
|
|
9510
|
+
})}
|
|
9511
|
+
aria-hidden=${_(this.expanded ? void 0 : !0)}
|
|
9512
|
+
>
|
|
9513
|
+
${this._expandableSlot}
|
|
9514
|
+
</div>`}
|
|
9515
|
+
</div>`;
|
|
9516
|
+
}
|
|
9517
|
+
}
|
|
9518
|
+
k(Lo, "properties", {
|
|
9519
|
+
expanded: { type: Boolean, reflect: !0 },
|
|
9520
|
+
title: { type: String },
|
|
9521
|
+
info: { type: Boolean },
|
|
9522
|
+
box: { type: Boolean },
|
|
9523
|
+
bleed: { type: Boolean },
|
|
9524
|
+
buttonClass: { type: String },
|
|
9525
|
+
contentClass: { type: String },
|
|
9526
|
+
noChevron: { type: Boolean },
|
|
9527
|
+
animated: { type: Boolean },
|
|
9528
|
+
headingLevel: { type: Number },
|
|
9529
|
+
_hasTitle: { type: Boolean, state: !0 }
|
|
9530
|
+
}), k(Lo, "styles", [
|
|
9531
|
+
R`
|
|
6668
9532
|
/* /* layer: preflights */
|
|
6669
9533
|
|
|
6670
9534
|
/*
|
|
@@ -7254,39 +10118,10 @@ video {
|
|
|
7254
10118
|
::slotted(:last-child) {
|
|
7255
10119
|
margin-bottom: 0px !important;
|
|
7256
10120
|
}
|
|
7257
|
-
`
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
</div>`}render(){return p` <div
|
|
7262
|
-
class=${P({"bg-aqua-50":this.info,["py-0 px-0 "+J.box]:this.box,[J.bleed]:this.bleed})}
|
|
7263
|
-
>
|
|
7264
|
-
${this._hasTitle?p`<w-unstyled-heading level=${this.headingLevel}>
|
|
7265
|
-
<button
|
|
7266
|
-
type="button"
|
|
7267
|
-
aria-expanded="${this.expanded}"
|
|
7268
|
-
class=${P({[this.buttonClass||""]:!0,[Bt+" hover:underline focus:underline"]:!0,["w-full text-left relative "+J.box]:this.box,"hover:text-aqua-700 active:text-aqua-800":this.info})}
|
|
7269
|
-
@click=${()=>this.expanded=!this.expanded}
|
|
7270
|
-
>
|
|
7271
|
-
<div class="flex justify-between align-center">
|
|
7272
|
-
${this.title?p`<span class="h4">${this.title}</span>`:p`<slot name="title"></slot>`}
|
|
7273
|
-
${this.noChevron?"":p`<div
|
|
7274
|
-
class=${P({"self-center transform transition-transform":!0,"-rotate-180":this.expanded,"relative left-8":!this.box,"box-chevron":this.box})}
|
|
7275
|
-
>
|
|
7276
|
-
<w-icon-chevron-down16></w-icon-chevron-down16>
|
|
7277
|
-
</div>`}
|
|
7278
|
-
</div>
|
|
7279
|
-
</button>
|
|
7280
|
-
</w-unstyled-heading>`:""}
|
|
7281
|
-
${this.animated?p`<w-expand-transition ?show=${this.expanded}>
|
|
7282
|
-
${this._expandableSlot}
|
|
7283
|
-
</w-expand-transition>`:p`<div
|
|
7284
|
-
class=${P({"overflow-hidden":!0,"h-0 invisible":!this.expanded})}
|
|
7285
|
-
aria-hidden=${y(this.expanded?void 0:!0)}
|
|
7286
|
-
>
|
|
7287
|
-
${this._expandableSlot}
|
|
7288
|
-
</div>`}
|
|
7289
|
-
</div>`}}customElements.get("w-expandable")||customElements.define("w-expandable",Vr);const Zr=p`
|
|
10121
|
+
`
|
|
10122
|
+
]);
|
|
10123
|
+
customElements.get("w-expandable") || customElements.define("w-expandable", Lo);
|
|
10124
|
+
const ln = p`
|
|
7290
10125
|
<svg
|
|
7291
10126
|
role="img"
|
|
7292
10127
|
aria-label="X"
|
|
@@ -7303,7 +10138,7 @@ video {
|
|
|
7303
10138
|
clipRule="evenodd"
|
|
7304
10139
|
/>
|
|
7305
10140
|
</svg>
|
|
7306
|
-
`,
|
|
10141
|
+
`, cn = p`
|
|
7307
10142
|
<svg
|
|
7308
10143
|
role="img"
|
|
7309
10144
|
aria-label="Forstørrelsesglass"
|
|
@@ -7328,7 +10163,52 @@ video {
|
|
|
7328
10163
|
</clipPath>
|
|
7329
10164
|
</defs>
|
|
7330
10165
|
</svg>
|
|
7331
|
-
`;
|
|
10166
|
+
`;
|
|
10167
|
+
class Io extends $ {
|
|
10168
|
+
get _classBase() {
|
|
10169
|
+
return this.slot === "suffix" ? li : ci;
|
|
10170
|
+
}
|
|
10171
|
+
get _classes() {
|
|
10172
|
+
return L({
|
|
10173
|
+
[this._classBase.wrapper]: !0,
|
|
10174
|
+
[this._classBase.wrapperWithLabel]: this.label,
|
|
10175
|
+
[this._classBase.wrapperWithIcon]: !this.label
|
|
10176
|
+
});
|
|
10177
|
+
}
|
|
10178
|
+
get _searchButton() {
|
|
10179
|
+
return p`
|
|
10180
|
+
<button aria-label="${_(this.ariaLabel)}" class="${this._classes}" type="submit">
|
|
10181
|
+
${cn}
|
|
10182
|
+
</button>
|
|
10183
|
+
`;
|
|
10184
|
+
}
|
|
10185
|
+
get _clearButton() {
|
|
10186
|
+
return p`
|
|
10187
|
+
<button aria-label="${_(this.ariaLabel)}" class="${this._classes}" type="reset">
|
|
10188
|
+
${ln}
|
|
10189
|
+
</button>
|
|
10190
|
+
`;
|
|
10191
|
+
}
|
|
10192
|
+
get _text() {
|
|
10193
|
+
return p`
|
|
10194
|
+
<div class="${this._classes}">
|
|
10195
|
+
<span class="${this._classBase.label}">${this.label}</span>
|
|
10196
|
+
</div>
|
|
10197
|
+
`;
|
|
10198
|
+
}
|
|
10199
|
+
get _markup() {
|
|
10200
|
+
if (this.label)
|
|
10201
|
+
return this._text;
|
|
10202
|
+
if (this.search)
|
|
10203
|
+
return this._searchButton;
|
|
10204
|
+
if (this.clear)
|
|
10205
|
+
return this._clearButton;
|
|
10206
|
+
}
|
|
10207
|
+
render() {
|
|
10208
|
+
return p`${this._markup}`;
|
|
10209
|
+
}
|
|
10210
|
+
}
|
|
10211
|
+
k(Io, "styles", R`
|
|
7332
10212
|
/* /* layer: preflights */
|
|
7333
10213
|
|
|
7334
10214
|
/*
|
|
@@ -7893,21 +10773,50 @@ video {
|
|
|
7893
10773
|
.pointer-events-none{pointer-events:none;}
|
|
7894
10774
|
.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
|
|
7895
10775
|
.ease-in-out{transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);} */
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
`}get _text(){return p`
|
|
7905
|
-
<div class="${this._classes}">
|
|
7906
|
-
<span class="${this._classBase.label}">${this.label}</span>
|
|
7907
|
-
</div>
|
|
7908
|
-
`}get _markup(){if(this.label)return this._text;if(this.search)return this._searchButton;if(this.clear)return this._clearButton}render(){return p`${this._markup}`}}customElements.get("w-affix")||customElements.define("w-affix",Yr);const ht=_`
|
|
10776
|
+
`), k(Io, "properties", {
|
|
10777
|
+
ariaLabel: { type: String, attribute: "aria-label" },
|
|
10778
|
+
clear: { type: Boolean },
|
|
10779
|
+
search: { type: Boolean },
|
|
10780
|
+
label: { type: String }
|
|
10781
|
+
});
|
|
10782
|
+
customElements.get("w-affix") || customElements.define("w-affix", Io);
|
|
10783
|
+
const vr = R`
|
|
7909
10784
|
@import "https://assets.finn.no/pkg/@warp-ds/tokens/v1/finn-no.css";
|
|
7910
|
-
`;
|
|
10785
|
+
`;
|
|
10786
|
+
class Bo extends $ {
|
|
10787
|
+
constructor() {
|
|
10788
|
+
super(), this.show = !1, this._mounted = !1, this._removeElement = !1;
|
|
10789
|
+
}
|
|
10790
|
+
willUpdate() {
|
|
10791
|
+
this._mounted || (this._removeElement = !this.show), this.show && this._removeElement && (this._removeElement = !1);
|
|
10792
|
+
}
|
|
10793
|
+
updated() {
|
|
10794
|
+
if (!!this._wrapper) {
|
|
10795
|
+
if (!this._mounted) {
|
|
10796
|
+
this._mounted = !0;
|
|
10797
|
+
return;
|
|
10798
|
+
}
|
|
10799
|
+
this.show && nr(this._wrapper), !this.show && !this._removeElement && ar(this._wrapper, () => this._removeElement = !0);
|
|
10800
|
+
}
|
|
10801
|
+
}
|
|
10802
|
+
get _wrapper() {
|
|
10803
|
+
return this != null ? this : null;
|
|
10804
|
+
}
|
|
10805
|
+
render() {
|
|
10806
|
+
return p`<div aria-hidden=${_(this.show ? void 0 : "true")}>
|
|
10807
|
+
${this._removeElement ? p`` : p`<slot></slot>`}
|
|
10808
|
+
</div>`;
|
|
10809
|
+
}
|
|
10810
|
+
}
|
|
10811
|
+
k(Bo, "properties", {
|
|
10812
|
+
show: {
|
|
10813
|
+
type: Boolean,
|
|
10814
|
+
reflect: !0
|
|
10815
|
+
},
|
|
10816
|
+
_removeElement: { type: Boolean, state: !0 }
|
|
10817
|
+
}), k(Bo, "styles", [
|
|
10818
|
+
vr,
|
|
10819
|
+
R`
|
|
7911
10820
|
/* /* layer: preflights */
|
|
7912
10821
|
|
|
7913
10822
|
/*
|
|
@@ -8476,9 +11385,25 @@ video {
|
|
|
8476
11385
|
:host {
|
|
8477
11386
|
display: block;
|
|
8478
11387
|
}
|
|
8479
|
-
`
|
|
8480
|
-
|
|
8481
|
-
|
|
11388
|
+
`
|
|
11389
|
+
]);
|
|
11390
|
+
customElements.get("w-expand-transition") || customElements.define("w-expand-transition", Bo);
|
|
11391
|
+
class Vo extends $ {
|
|
11392
|
+
get _markup() {
|
|
11393
|
+
return `<h${this.level}
|
|
11394
|
+
style="margin: 0; font-weight: unset; font-size: unset; line-height: unset;"
|
|
11395
|
+
>
|
|
11396
|
+
<slot></slot>
|
|
11397
|
+
</h${this.level}>
|
|
11398
|
+
`;
|
|
11399
|
+
}
|
|
11400
|
+
render() {
|
|
11401
|
+
return this.level ? et(this._markup) : p`<slot></slot>`;
|
|
11402
|
+
}
|
|
11403
|
+
}
|
|
11404
|
+
k(Vo, "properties", {
|
|
11405
|
+
level: { type: Number }
|
|
11406
|
+
}), k(Vo, "styles", [vr, R`
|
|
8482
11407
|
/* /* layer: preflights */
|
|
8483
11408
|
|
|
8484
11409
|
/*
|
|
@@ -9043,9 +11968,13 @@ video {
|
|
|
9043
11968
|
.pointer-events-none{pointer-events:none;}
|
|
9044
11969
|
.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}
|
|
9045
11970
|
.ease-in-out{transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);} */
|
|
9046
|
-
`];
|
|
9047
|
-
|
|
9048
|
-
|
|
9049
|
-
|
|
9050
|
-
|
|
9051
|
-
|
|
11971
|
+
`]);
|
|
11972
|
+
customElements.get("w-unstyled-heading") || customElements.define("w-unstyled-heading", Vo);
|
|
11973
|
+
class Nt extends $ {
|
|
11974
|
+
render() {
|
|
11975
|
+
return p`<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><title>Håndveske</title><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M5 14.5V3a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v11.5"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12.222 6H3.777a2 2 0 0 0-1.986 1.766l-.53 4.5A2 2 0 0 0 3.25 14.5h9.502a2 2 0 0 0 1.986-2.234l-.53-4.5A2 2 0 0 0 12.222 6Z"></path></svg>`;
|
|
11976
|
+
}
|
|
11977
|
+
}
|
|
11978
|
+
customElements.get("f-icon-bag16", Nt) || customElements.define("f-icon-bag16", Nt);
|
|
11979
|
+
be && (window.WarpToastContainer = Ie, window.toast = zi, window.updateToast = Si, window.removeToast = _i);
|
|
11980
|
+
//# sourceMappingURL=scripts.bd8d8c7c.js.map
|