@warp-ds/elements 1.2.0-next.4 → 1.2.0-next.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/index.js +610 -576
- package/dist/packages/affix/index.js +1 -1
- package/dist/packages/affix/index.js.map +4 -4
- package/dist/packages/alert/index.js +2 -2
- package/dist/packages/alert/index.js.map +4 -4
- package/dist/packages/attention/index.d.ts +9 -0
- package/dist/packages/attention/index.js +24 -17
- package/dist/packages/attention/index.js.map +4 -4
- package/dist/packages/badge/index.js +1 -1
- package/dist/packages/badge/index.js.map +4 -4
- package/dist/packages/box/index.d.ts +4 -0
- package/dist/packages/box/index.js +3 -3
- package/dist/packages/box/index.js.map +4 -4
- package/dist/packages/breadcrumbs/index.js +3 -3
- package/dist/packages/breadcrumbs/index.js.map +4 -4
- package/dist/packages/button/index.js +2 -2
- package/dist/packages/button/index.js.map +4 -4
- package/dist/packages/card/index.js +3 -3
- package/dist/packages/card/index.js.map +4 -4
- package/dist/packages/expandable/index.js +3 -3
- package/dist/packages/expandable/index.js.map +4 -4
- package/dist/packages/select/index.js +8 -8
- package/dist/packages/select/index.js.map +4 -4
- package/dist/packages/textfield/index.js +2 -2
- package/dist/packages/textfield/index.js.map +4 -4
- package/dist/packages/toast/index.js +7 -7
- package/dist/packages/toast/index.js.map +4 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,39 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var qr = (t, e, r) => e in t ?
|
|
3
|
-
var T = (t, e, r) => (qr(t, typeof e != "symbol" ? e + "" : e, r), r),
|
|
1
|
+
var Br = Object.defineProperty;
|
|
2
|
+
var qr = (t, e, r) => e in t ? Br(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var T = (t, e, r) => (qr(t, typeof e != "symbol" ? e + "" : e, r), r), Ar = (t, e, r) => {
|
|
4
4
|
if (!e.has(t))
|
|
5
5
|
throw TypeError("Cannot " + r);
|
|
6
6
|
};
|
|
7
|
-
var X = (t, e, r) => (
|
|
7
|
+
var X = (t, e, r) => (Ar(t, e, "read from private field"), r ? r.call(t) : e.get(t)), ge = (t, e, r) => {
|
|
8
8
|
if (e.has(t))
|
|
9
9
|
throw TypeError("Cannot add the same private member more than once");
|
|
10
10
|
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
11
11
|
};
|
|
12
|
-
import { html as m, css as se } from "lit";
|
|
13
|
-
import
|
|
12
|
+
import { html as m, css as se, nothing as dt } from "lit";
|
|
13
|
+
import B from "@warp-ds/elements-core";
|
|
14
14
|
import { ifDefined as I } from "lit/directives/if-defined.js";
|
|
15
|
-
import { classMap as
|
|
16
|
-
import { repeat as
|
|
15
|
+
import { classMap as Zt } from "lit/directives/class-map.js";
|
|
16
|
+
import { repeat as er } from "lit/directives/repeat.js";
|
|
17
17
|
import { when as He } from "lit/directives/when.js";
|
|
18
|
-
import { unsafeHTML as
|
|
19
|
-
const
|
|
20
|
-
base: "border-2 relative",
|
|
21
|
-
tooltip: "i-bg-$color-tooltip-background i-border-$color-tooltip-background i-shadow-$shadow-tooltip i-text-$color-tooltip-text rounded-4 py-6 px-8",
|
|
22
|
-
callout: "i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8",
|
|
23
|
-
highlight: "i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8 drop-shadow-m",
|
|
24
|
-
popover: "i-bg-$color-popover-background i-border-$color-popover-background i-text-$color-popover-paragraph-text rounded-8 p-16 drop-shadow-m",
|
|
25
|
-
arrowBase: "absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",
|
|
26
|
-
arrowDirectionLeft: "-left-[8px]",
|
|
27
|
-
arrowDirectionRight: "-right-[8px]",
|
|
28
|
-
arrowDirectionBottom: "-bottom-[8px]",
|
|
29
|
-
arrowDirectionTop: "-top-[8px]",
|
|
30
|
-
arrowTooltip: "i-bg-$color-tooltip-background i-border-$color-tooltip-background",
|
|
31
|
-
arrowCallout: "i-bg-$color-callout-background i-border-$color-callout-border",
|
|
32
|
-
arrowPopover: "i-bg-$color-popover-background i-border-$color-popover-background",
|
|
33
|
-
arrowHighlight: "i-bg-$color-callout-background i-border-$color-callout-border",
|
|
34
|
-
content: "last-child:mb-0",
|
|
35
|
-
notCallout: "absolute z-50"
|
|
36
|
-
}, be = {
|
|
18
|
+
import { unsafeHTML as tr } from "lit/directives/unsafe-html.js";
|
|
19
|
+
const be = {
|
|
37
20
|
base: "py-4 px-8 border-0 rounded-4 text-xs inline-flex",
|
|
38
21
|
neutral: "i-bg-$color-badge-neutral-background i-text-$color-badge-neutral-text",
|
|
39
22
|
info: "i-bg-$color-badge-info-background i-text-$color-badge-info-text",
|
|
@@ -105,7 +88,7 @@ const Te = {
|
|
|
105
88
|
paddingTop: "pt-0",
|
|
106
89
|
title: "flex justify-between items-center",
|
|
107
90
|
titleType: "h4"
|
|
108
|
-
}, ce = "font-bold focusable justify-center transition-colors ease-in-out",
|
|
91
|
+
}, ce = "font-bold focusable justify-center transition-colors ease-in-out", R = {
|
|
109
92
|
primary: "i-text-$color-button-primary-text hover: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",
|
|
110
93
|
secondary: "i-text-$color-button-secondary-text hover: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",
|
|
111
94
|
utility: "i-text-$color-button-utility-text hover: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",
|
|
@@ -117,14 +100,14 @@ const Te = {
|
|
|
117
100
|
negativeQuiet: "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",
|
|
118
101
|
loading: "i-text-$color-button-loading-text i-bg-$color-button-loading-background",
|
|
119
102
|
link: "i-text-$color-button-link-text"
|
|
120
|
-
},
|
|
103
|
+
}, D = {
|
|
121
104
|
primary: `border-0 rounded-8 ${ce}`,
|
|
122
105
|
secondary: `border-2 rounded-8 ${ce}`,
|
|
123
106
|
utility: `border rounded-4 ${ce}`,
|
|
124
107
|
negative: `border-0 rounded-8 ${ce}`,
|
|
125
108
|
pill: `p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${ce}`,
|
|
126
|
-
link: `bg-transparent focusable ease-in-out inline active:underline hover:underline ${
|
|
127
|
-
},
|
|
109
|
+
link: `bg-transparent focusable ease-in-out inline active:underline hover:underline ${R.link}`
|
|
110
|
+
}, b = {
|
|
128
111
|
xsmall: "py-6 px-16",
|
|
129
112
|
small: "py-8 px-16",
|
|
130
113
|
medium: "py-10 px-14",
|
|
@@ -134,81 +117,81 @@ const Te = {
|
|
|
134
117
|
pill: "min-h-[44px] min-w-[44px]",
|
|
135
118
|
pillSmall: "min-h-32 min-w-32",
|
|
136
119
|
link: "p-0"
|
|
137
|
-
},
|
|
120
|
+
}, f = {
|
|
138
121
|
medium: "text-m leading-[24]",
|
|
139
122
|
xsmall: "text-xs"
|
|
140
123
|
}, p = {
|
|
141
|
-
inProgress: `border-transparent animate-inprogress pointer-events-none ${
|
|
124
|
+
inProgress: `border-transparent animate-inprogress pointer-events-none ${R.loading}`,
|
|
142
125
|
// .button--in-progress, a.button--in-progress:visited
|
|
143
126
|
quiet: `border-0 rounded-8 ${ce}`,
|
|
144
127
|
utilityQuiet: `border-0 rounded-4 ${ce}`,
|
|
145
128
|
negativeQuiet: `border-0 rounded-8 ${ce}`,
|
|
146
|
-
isDisabled: `font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${
|
|
129
|
+
isDisabled: `font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${R.disabled}`
|
|
147
130
|
// .button:disabled, .button--is-disabled
|
|
148
131
|
}, S = {
|
|
149
132
|
// Buttontypes
|
|
150
|
-
secondary: `${
|
|
133
|
+
secondary: `${b.medium} ${f.medium} ${D.secondary} ${R.secondary}`,
|
|
151
134
|
// .button--secondary, .button--default, .button
|
|
152
|
-
secondaryHref: `${
|
|
153
|
-
secondaryDisabled: `${
|
|
154
|
-
secondarySmall: `${
|
|
155
|
-
secondarySmallDisabled: `${
|
|
156
|
-
secondaryQuiet: `${
|
|
157
|
-
secondaryQuietDisabled: `${
|
|
158
|
-
secondarySmallQuiet: `${
|
|
159
|
-
secondarySmallQuietDisabled: `${
|
|
160
|
-
secondaryLoading: `${
|
|
161
|
-
secondarySmallLoading: `${
|
|
162
|
-
secondarySmallQuietLoading: `${
|
|
163
|
-
secondaryQuietLoading: `${
|
|
164
|
-
primary: `${
|
|
135
|
+
secondaryHref: `${b.medium} ${f.medium} ${D.secondary} ${R.secondary}`,
|
|
136
|
+
secondaryDisabled: `${b.medium} ${f.medium} ${D.secondary} ${p.isDisabled}`,
|
|
137
|
+
secondarySmall: `${f.xsmall} ${b.xsmall} ${D.secondary} ${R.secondary}`,
|
|
138
|
+
secondarySmallDisabled: `${f.xsmall} ${b.xsmall} ${D.secondary} ${p.isDisabled}`,
|
|
139
|
+
secondaryQuiet: `${b.medium} ${f.medium} ${p.quiet} ${R.quiet}`,
|
|
140
|
+
secondaryQuietDisabled: `${b.medium} ${f.medium} ${p.quiet} ${p.isDisabled}`,
|
|
141
|
+
secondarySmallQuiet: `${f.xsmall} ${b.xsmall} ${p.quiet} ${R.quiet}`,
|
|
142
|
+
secondarySmallQuietDisabled: `${f.xsmall} ${b.xsmall} ${p.quiet} ${p.isDisabled}`,
|
|
143
|
+
secondaryLoading: `${b.medium} ${f.medium} ${D.secondary} ${p.inProgress}`,
|
|
144
|
+
secondarySmallLoading: `${f.xsmall} ${b.xsmall} ${D.secondary} ${p.inProgress}`,
|
|
145
|
+
secondarySmallQuietLoading: `${f.xsmall} ${b.xsmall} ${p.quiet} ${p.inProgress}`,
|
|
146
|
+
secondaryQuietLoading: `${b.medium} ${f.medium} ${p.quiet} ${p.inProgress}`,
|
|
147
|
+
primary: `${b.large} ${f.medium} ${D.primary} ${R.primary}`,
|
|
165
148
|
// .button--primary, .button--cta
|
|
166
|
-
primaryDisabled: `${
|
|
167
|
-
primarySmall: `${
|
|
168
|
-
primarySmallDisabled: `${
|
|
169
|
-
primaryQuiet: `${
|
|
170
|
-
primaryQuietDisabled: `${
|
|
171
|
-
primarySmallQuiet: `${
|
|
172
|
-
primarySmallQuietDisabled: `${
|
|
173
|
-
primaryLoading: `${
|
|
174
|
-
primarySmallLoading: `${
|
|
175
|
-
primarySmallQuietLoading: `${
|
|
176
|
-
primaryQuietLoading: `${
|
|
177
|
-
utility: `${
|
|
149
|
+
primaryDisabled: `${b.large} ${f.medium} ${p.isDisabled} ${D.primary}`,
|
|
150
|
+
primarySmall: `${b.small} ${f.xsmall} ${D.primary} ${R.primary}`,
|
|
151
|
+
primarySmallDisabled: `${b.small} ${f.xsmall} ${p.isDisabled} ${D.primary} `,
|
|
152
|
+
primaryQuiet: `${b.large} ${f.medium} ${p.quiet} ${R.quiet}`,
|
|
153
|
+
primaryQuietDisabled: `${b.large} ${f.medium} ${p.quiet} ${p.isDisabled}`,
|
|
154
|
+
primarySmallQuiet: `${b.small} ${f.xsmall} ${p.quiet} ${R.quiet}`,
|
|
155
|
+
primarySmallQuietDisabled: `${b.small} ${f.xsmall} ${p.quiet} ${p.isDisabled}`,
|
|
156
|
+
primaryLoading: `${b.large} ${f.medium} ${p.inProgress} ${D.primary}`,
|
|
157
|
+
primarySmallLoading: `${b.small} ${f.xsmall} ${p.inProgress} ${D.primary}`,
|
|
158
|
+
primarySmallQuietLoading: `${b.small} ${f.xsmall} ${p.quiet} ${p.inProgress} ${D.primary}`,
|
|
159
|
+
primaryQuietLoading: `${b.large} ${f.medium} ${p.quiet} ${p.inProgress}`,
|
|
160
|
+
utility: `${b.utility} ${f.medium} ${D.utility} ${R.utility}`,
|
|
178
161
|
// .button--utility
|
|
179
|
-
utilityDisabled: `${
|
|
180
|
-
utilityQuiet: `${
|
|
162
|
+
utilityDisabled: `${b.utility} ${f.medium} ${D.utility} ${p.isDisabled}`,
|
|
163
|
+
utilityQuiet: `${b.large} ${f.medium} ${p.utilityQuiet} ${R.utilityQuiet}`,
|
|
181
164
|
// .button--utility-flat
|
|
182
|
-
utilityQuietDisabled: `${
|
|
183
|
-
utilitySmall: `${
|
|
184
|
-
utilitySmallDisabled: `${
|
|
185
|
-
utilitySmallQuiet: `${
|
|
186
|
-
utilitySmallQuietDisabled: `${
|
|
187
|
-
utilityLoading: `${
|
|
188
|
-
utilitySmallLoading: `${
|
|
189
|
-
utilityQuietLoading: `${
|
|
190
|
-
utilitySmallQuietLoading: `${
|
|
191
|
-
negative: `${
|
|
165
|
+
utilityQuietDisabled: `${b.large} ${f.medium} ${p.utilityQuiet} ${p.isDisabled}`,
|
|
166
|
+
utilitySmall: `${b.smallUtility} ${f.xsmall} ${D.utility} ${R.utility}`,
|
|
167
|
+
utilitySmallDisabled: `${b.smallUtility} ${f.xsmall} ${D.utility} ${p.isDisabled}`,
|
|
168
|
+
utilitySmallQuiet: `${b.smallUtility} ${f.xsmall} ${p.utilityQuiet} ${R.utilityQuiet}`,
|
|
169
|
+
utilitySmallQuietDisabled: `${b.smallUtility} ${f.xsmall} ${p.utilityQuiet} ${p.isDisabled}`,
|
|
170
|
+
utilityLoading: `${b.large} ${f.medium} ${D.utility} ${p.inProgress}`,
|
|
171
|
+
utilitySmallLoading: `${b.smallUtility} ${f.xsmall} ${D.utility} ${p.inProgress}`,
|
|
172
|
+
utilityQuietLoading: `${b.large} ${f.medium} ${p.inProgress} ${p.utilityQuiet}`,
|
|
173
|
+
utilitySmallQuietLoading: `${b.smallUtility} ${f.xsmall} ${p.inProgress} ${p.utilityQuiet}`,
|
|
174
|
+
negative: `${b.large} ${f.medium} ${D.negative} ${R.destructive}`,
|
|
192
175
|
// .button--destructive
|
|
193
|
-
negativeDisabled: `${
|
|
194
|
-
negativeQuiet: `${
|
|
176
|
+
negativeDisabled: `${b.large} ${f.medium} ${D.negative} ${p.isDisabled}`,
|
|
177
|
+
negativeQuiet: `${b.large} ${f.medium} ${p.negativeQuiet} ${R.negativeQuiet}`,
|
|
195
178
|
// .button--destructive-flat
|
|
196
|
-
negativeQuietDisabled: `${
|
|
197
|
-
negativeSmall: `${
|
|
198
|
-
negativeSmallDisabled: `${
|
|
199
|
-
negativeSmallQuiet: `${
|
|
200
|
-
negativeSmallQuietDisabled: `${
|
|
201
|
-
negativeLoading: `${
|
|
202
|
-
negativeSmallLoading: `${
|
|
203
|
-
negativeQuietLoading: `${
|
|
204
|
-
negativeSmallQuietLoading: `${
|
|
205
|
-
pill: `${
|
|
179
|
+
negativeQuietDisabled: `${b.large} ${f.medium} ${p.negativeQuiet}${p.isDisabled}`,
|
|
180
|
+
negativeSmall: `${b.small} ${f.xsmall} ${D.negative} ${R.destructive}`,
|
|
181
|
+
negativeSmallDisabled: `${b.small} ${f.xsmall} ${D.negative} ${p.isDisabled}`,
|
|
182
|
+
negativeSmallQuiet: `${b.small} ${f.xsmall} ${p.negativeQuiet} ${R.negativeQuiet}`,
|
|
183
|
+
negativeSmallQuietDisabled: `${b.small} ${f.xsmall} ${p.negativeQuiet} ${p.isDisabled}`,
|
|
184
|
+
negativeLoading: `${b.large} ${f.medium} ${D.negative} ${p.inProgress}`,
|
|
185
|
+
negativeSmallLoading: `${b.small} ${f.xsmall} ${p.inProgress} ${D.negative}`,
|
|
186
|
+
negativeQuietLoading: `${b.large} ${f.medium} ${p.negativeQuiet} ${D.negative} ${p.inProgress}`,
|
|
187
|
+
negativeSmallQuietLoading: `${b.small} ${f.xsmall} ${p.negativeQuiet} ${p.inProgress}`,
|
|
188
|
+
pill: `${b.pill} ${f.medium} ${D.pill} ${R.pill}`,
|
|
206
189
|
// .button--pill
|
|
207
|
-
pillSmall: `${
|
|
208
|
-
pillLoading: `${
|
|
209
|
-
pillSmallLoading: `${
|
|
210
|
-
link: `${
|
|
211
|
-
linkSmall: `${
|
|
190
|
+
pillSmall: `${b.pillSmall} ${f.xsmall} ${D.pill} ${R.pill}`,
|
|
191
|
+
pillLoading: `${b.pill} ${f.medium} ${D.pill} ${p.inProgress}`,
|
|
192
|
+
pillSmallLoading: `${b.pillSmall} ${f.xsmall} ${D.pill} ${p.inProgress}`,
|
|
193
|
+
link: `${b.link} ${f.medium} ${D.link}`,
|
|
194
|
+
linkSmall: `${b.link} ${f.xsmall} ${D.link}`,
|
|
212
195
|
linkAsButton: "inline-block hover:no-underline text-center",
|
|
213
196
|
a11y: "sr-only",
|
|
214
197
|
fullWidth: "w-full max-w-full",
|
|
@@ -246,7 +229,7 @@ const Te = {
|
|
|
246
229
|
selectWrapper: "relative before:block before:absolute before:right-0 before:bottom-0 before:w-32 before:h-full before:pointer-events-none ",
|
|
247
230
|
chevron: "absolute top-[30%] block right-0 bottom-0 w-32 h-full i-text-$color-select-icon pointer-events-none cursor-pointer",
|
|
248
231
|
chevronDisabled: "opacity-25"
|
|
249
|
-
},
|
|
232
|
+
}, Be = {
|
|
250
233
|
label: "antialiased block relative text-s font-bold pb-4 cursor-pointer i-text-$color-label-text",
|
|
251
234
|
labelInvalid: "i-text-$color-label-text-negative",
|
|
252
235
|
optional: "pl-8 font-normal text-s i-text-$color-label-optional-text"
|
|
@@ -254,34 +237,52 @@ const Te = {
|
|
|
254
237
|
helpText: "text-xs mt-4 block i-text-$color-helptext-text",
|
|
255
238
|
helpTextValid: "i-text-$color-helptext-text-positive",
|
|
256
239
|
helpTextInvalid: "i-text-$color-helptext-text-negative"
|
|
257
|
-
},
|
|
258
|
-
wrapper:
|
|
240
|
+
}, rr = "absolute top-0 bottom-0 flex justify-center items-center focusable focus:[--w-outline-offset:-2px] bg-transparent ", Rr = {
|
|
241
|
+
wrapper: rr + "right-0",
|
|
259
242
|
wrapperWithLabel: "w-max pr-12",
|
|
260
243
|
wrapperWithIcon: "w-40",
|
|
261
244
|
label: "antialiased block relative cursor-default pb-0 font-bold text-xs i-text-$color-label-text"
|
|
262
|
-
},
|
|
263
|
-
wrapper:
|
|
245
|
+
}, Mr = {
|
|
246
|
+
wrapper: rr + "left-0",
|
|
264
247
|
wrapperWithLabel: "w-max pl-12",
|
|
265
248
|
wrapperWithIcon: "w-40",
|
|
266
249
|
label: "antialiased block relative cursor-default pb-0 font-bold text-xs i-text-$color-label-text"
|
|
267
|
-
},
|
|
250
|
+
}, ke = {
|
|
268
251
|
wrapper: "flex space-x-8",
|
|
269
252
|
text: "i-text-$color-breadcrumbs-text",
|
|
270
253
|
link: "i-text-$color-breadcrumbs-link-text",
|
|
271
254
|
separator: "select-none i-text-$color-breadcrumbs-icon",
|
|
272
255
|
a11y: "sr-only"
|
|
273
|
-
},
|
|
256
|
+
}, we = {
|
|
257
|
+
base: "border-2 relative flex items-start",
|
|
258
|
+
tooltip: "i-bg-$color-tooltip-background i-border-$color-tooltip-background i-shadow-$shadow-tooltip i-text-$color-tooltip-text rounded-4 py-6 px-8",
|
|
259
|
+
callout: "i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8",
|
|
260
|
+
highlight: "i-bg-$color-callout-background i-border-$color-callout-border i-text-$color-callout-text py-8 px-16 rounded-8 drop-shadow-m",
|
|
261
|
+
popover: "i-bg-$color-popover-background i-border-$color-popover-background i-text-$color-popover-paragraph-text rounded-8 p-16 drop-shadow-m",
|
|
262
|
+
arrowBase: "absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",
|
|
263
|
+
arrowDirectionLeft: "-left-[8px]",
|
|
264
|
+
arrowDirectionRight: "-right-[8px]",
|
|
265
|
+
arrowDirectionBottom: "-bottom-[8px]",
|
|
266
|
+
arrowDirectionTop: "-top-[8px]",
|
|
267
|
+
arrowTooltip: "i-bg-$color-tooltip-background i-border-$color-tooltip-background",
|
|
268
|
+
arrowCallout: "i-bg-$color-callout-background i-border-$color-callout-border",
|
|
269
|
+
arrowPopover: "i-bg-$color-popover-background i-border-$color-popover-background",
|
|
270
|
+
arrowHighlight: "i-bg-$color-callout-background i-border-$color-callout-border",
|
|
271
|
+
content: "last-child:mb-0",
|
|
272
|
+
notCallout: "absolute z-50",
|
|
273
|
+
closeBtn: `${f.medium} ${D.pill} ${R.pill} justify-self-end -mr-8 ml-8`
|
|
274
|
+
}, Nr = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
274
275
|
function Re(t) {
|
|
275
276
|
return class extends t {
|
|
276
277
|
static createProperty(e, r) {
|
|
277
278
|
let i = r;
|
|
278
279
|
(typeof (r == null ? void 0 : r.attribute) > "u" || (r == null ? void 0 : r.attribute) === !0) && (i = Object.assign({}, r, {
|
|
279
|
-
attribute:
|
|
280
|
+
attribute: Nr(e.toString())
|
|
280
281
|
})), super.createProperty(e, i);
|
|
281
282
|
}
|
|
282
283
|
};
|
|
283
284
|
}
|
|
284
|
-
function
|
|
285
|
+
function ht(t) {
|
|
285
286
|
const e = [];
|
|
286
287
|
for (const [r, i] of Object.entries(t))
|
|
287
288
|
i && e.push(r);
|
|
@@ -292,14 +293,14 @@ function G(t) {
|
|
|
292
293
|
for (const [r, i] of Object.entries(t))
|
|
293
294
|
for (const o of r.split(" "))
|
|
294
295
|
e[o] = i;
|
|
295
|
-
return
|
|
296
|
+
return Zt(e);
|
|
296
297
|
}
|
|
297
|
-
function
|
|
298
|
+
function Ir() {
|
|
298
299
|
return `m${Math.random().toString(36).slice(2)}`;
|
|
299
300
|
}
|
|
300
|
-
class
|
|
301
|
+
class pt extends B {
|
|
301
302
|
get _classBase() {
|
|
302
|
-
return this.slot === "suffix" ?
|
|
303
|
+
return this.slot === "suffix" ? Rr : Mr;
|
|
303
304
|
}
|
|
304
305
|
get _classes() {
|
|
305
306
|
return G({
|
|
@@ -341,13 +342,13 @@ class ht extends q {
|
|
|
341
342
|
return m`${this._markup}`;
|
|
342
343
|
}
|
|
343
344
|
}
|
|
344
|
-
T(
|
|
345
|
+
T(pt, "styles", [B.styles]), T(pt, "properties", {
|
|
345
346
|
ariaLabel: { type: String, attribute: "aria-label" },
|
|
346
347
|
clear: { type: Boolean },
|
|
347
348
|
search: { type: Boolean },
|
|
348
349
|
label: { type: String }
|
|
349
350
|
});
|
|
350
|
-
customElements.get("w-affix") || customElements.define("w-affix",
|
|
351
|
+
customElements.get("w-affix") || customElements.define("w-affix", pt);
|
|
351
352
|
var ue = function() {
|
|
352
353
|
for (var t = [], e = arguments.length; e--; )
|
|
353
354
|
t[e] = arguments[e];
|
|
@@ -363,7 +364,7 @@ const Oe = {
|
|
|
363
364
|
warning: "warning",
|
|
364
365
|
info: "info"
|
|
365
366
|
};
|
|
366
|
-
class
|
|
367
|
+
class ft extends B {
|
|
367
368
|
constructor() {
|
|
368
369
|
super(), this.show = !1, this.role = "alert";
|
|
369
370
|
}
|
|
@@ -403,7 +404,7 @@ negative, positive, warning, info.`
|
|
|
403
404
|
`;
|
|
404
405
|
}
|
|
405
406
|
}
|
|
406
|
-
T(
|
|
407
|
+
T(ft, "properties", {
|
|
407
408
|
variant: { type: String, reflect: !0 },
|
|
408
409
|
show: { type: Boolean, reflect: !0 },
|
|
409
410
|
role: { type: String, reflect: !0 }
|
|
@@ -411,8 +412,8 @@ T(pt, "properties", {
|
|
|
411
412
|
// ::slotted([Simple Selector]) confirms to Specificity rules, but (being simple) does not add weight to lightDOM skin selectors,
|
|
412
413
|
// so never gets higher Specificity. Thus in order to overwrite style linked within shadowDOM, we need to use !important.
|
|
413
414
|
// https://stackoverflow.com/a/61631668
|
|
414
|
-
T(
|
|
415
|
-
|
|
415
|
+
T(ft, "styles", [
|
|
416
|
+
B.styles,
|
|
416
417
|
se`
|
|
417
418
|
:host {
|
|
418
419
|
display: block;
|
|
@@ -425,7 +426,7 @@ T(pt, "styles", [
|
|
|
425
426
|
}
|
|
426
427
|
`
|
|
427
428
|
]);
|
|
428
|
-
customElements.get("w-alert") || customElements.define("w-alert",
|
|
429
|
+
customElements.get("w-alert") || customElements.define("w-alert", ft);
|
|
429
430
|
function Me(t) {
|
|
430
431
|
return t.split("-")[0];
|
|
431
432
|
}
|
|
@@ -435,48 +436,48 @@ function nt(t) {
|
|
|
435
436
|
function Ne(t) {
|
|
436
437
|
return ["top", "bottom"].includes(Me(t)) ? "x" : "y";
|
|
437
438
|
}
|
|
438
|
-
function
|
|
439
|
+
function At(t) {
|
|
439
440
|
return t === "y" ? "height" : "width";
|
|
440
441
|
}
|
|
441
|
-
function
|
|
442
|
+
function Nt(t, e, r) {
|
|
442
443
|
let { reference: i, floating: o } = t;
|
|
443
|
-
const n = i.x + i.width / 2 - o.width / 2, a = i.y + i.height / 2 - o.height / 2, l = Ne(e), d =
|
|
444
|
-
let
|
|
444
|
+
const n = i.x + i.width / 2 - o.width / 2, a = i.y + i.height / 2 - o.height / 2, l = Ne(e), d = At(l), x = i[d] / 2 - o[d] / 2, w = l === "x";
|
|
445
|
+
let g;
|
|
445
446
|
switch (Me(e)) {
|
|
446
447
|
case "top":
|
|
447
|
-
|
|
448
|
+
g = { x: n, y: i.y - o.height };
|
|
448
449
|
break;
|
|
449
450
|
case "bottom":
|
|
450
|
-
|
|
451
|
+
g = { x: n, y: i.y + i.height };
|
|
451
452
|
break;
|
|
452
453
|
case "right":
|
|
453
|
-
|
|
454
|
+
g = { x: i.x + i.width, y: a };
|
|
454
455
|
break;
|
|
455
456
|
case "left":
|
|
456
|
-
|
|
457
|
+
g = { x: i.x - o.width, y: a };
|
|
457
458
|
break;
|
|
458
459
|
default:
|
|
459
|
-
|
|
460
|
+
g = { x: i.x, y: i.y };
|
|
460
461
|
}
|
|
461
462
|
switch (nt(e)) {
|
|
462
463
|
case "start":
|
|
463
|
-
|
|
464
|
+
g[l] -= x * (r && w ? -1 : 1);
|
|
464
465
|
break;
|
|
465
466
|
case "end":
|
|
466
|
-
|
|
467
|
+
g[l] += x * (r && w ? -1 : 1);
|
|
467
468
|
}
|
|
468
|
-
return
|
|
469
|
+
return g;
|
|
469
470
|
}
|
|
470
|
-
const
|
|
471
|
+
const Qr = async (t, e, r) => {
|
|
471
472
|
const { placement: i = "bottom", strategy: o = "absolute", middleware: n = [], platform: a } = r, l = await (a.isRTL == null ? void 0 : a.isRTL(e));
|
|
472
|
-
let d = await a.getElementRects({ reference: t, floating: e, strategy: o }), { x, y: w } =
|
|
473
|
+
let d = await a.getElementRects({ reference: t, floating: e, strategy: o }), { x, y: w } = Nt(d, i, l), g = i, O = {}, h = 0;
|
|
473
474
|
for (let y = 0; y < n.length; y++) {
|
|
474
|
-
const { name: _, fn: C } = n[y], { x: N, y: Q, data: U, reset:
|
|
475
|
-
x = N ?? x, w = Q ?? w,
|
|
475
|
+
const { name: _, fn: C } = n[y], { x: N, y: Q, data: U, reset: M } = await C({ x, y: w, initialPlacement: i, placement: g, strategy: o, middlewareData: O, rects: d, platform: a, elements: { reference: t, floating: e } });
|
|
476
|
+
x = N ?? x, w = Q ?? w, O = { ...O, [_]: { ...O[_], ...U } }, M && h <= 50 && (h++, typeof M == "object" && (M.placement && (g = M.placement), M.rects && (d = M.rects === !0 ? await a.getElementRects({ reference: t, floating: e, strategy: o }) : M.rects), { x, y: w } = Nt(d, g, l)), y = -1);
|
|
476
477
|
}
|
|
477
|
-
return { x, y: w, placement:
|
|
478
|
+
return { x, y: w, placement: g, strategy: o, middlewareData: O };
|
|
478
479
|
};
|
|
479
|
-
function
|
|
480
|
+
function ir(t) {
|
|
480
481
|
return typeof t != "number" ? function(e) {
|
|
481
482
|
return { top: 0, right: 0, bottom: 0, left: 0, ...e };
|
|
482
483
|
}(t) : { top: t, right: t, bottom: t, left: t };
|
|
@@ -484,63 +485,63 @@ function rr(t) {
|
|
|
484
485
|
function Je(t) {
|
|
485
486
|
return { ...t, top: t.y, left: t.x, right: t.x + t.width, bottom: t.y + t.height };
|
|
486
487
|
}
|
|
487
|
-
async function
|
|
488
|
+
async function or(t, e) {
|
|
488
489
|
var r;
|
|
489
490
|
e === void 0 && (e = {});
|
|
490
|
-
const { x: i, y: o, platform: n, rects: a, elements: l, strategy: d } = t, { boundary: x = "clippingAncestors", rootBoundary: w = "viewport", elementContext:
|
|
491
|
+
const { x: i, y: o, platform: n, rects: a, elements: l, strategy: d } = t, { boundary: x = "clippingAncestors", rootBoundary: w = "viewport", elementContext: g = "floating", altBoundary: O = !1, padding: h = 0 } = e, y = ir(h), _ = l[O ? g === "floating" ? "reference" : "floating" : g], C = Je(await n.getClippingRect({ element: (r = await (n.isElement == null ? void 0 : n.isElement(_))) == null || r ? _ : _.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(l.floating)), boundary: x, rootBoundary: w, strategy: d })), N = Je(n.convertOffsetParentRelativeRectToViewportRelativeRect ? await n.convertOffsetParentRelativeRectToViewportRelativeRect({ rect: g === "floating" ? { ...a.floating, x: i, y: o } : a.reference, offsetParent: await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(l.floating)), strategy: d }) : a[g]);
|
|
491
492
|
return { top: C.top - N.top + y.top, bottom: N.bottom - C.bottom + y.bottom, left: C.left - N.left + y.left, right: N.right - C.right + y.right };
|
|
492
493
|
}
|
|
493
|
-
const
|
|
494
|
-
function
|
|
495
|
-
return
|
|
494
|
+
const Ur = Math.min, Fr = Math.max;
|
|
495
|
+
function gt(t, e, r) {
|
|
496
|
+
return Fr(t, Ur(e, r));
|
|
496
497
|
}
|
|
497
|
-
const
|
|
498
|
+
const Hr = (t) => ({ name: "arrow", options: t, async fn(e) {
|
|
498
499
|
const { element: r, padding: i = 0 } = t ?? {}, { x: o, y: n, placement: a, rects: l, platform: d } = e;
|
|
499
500
|
if (r == null)
|
|
500
501
|
return {};
|
|
501
|
-
const x =
|
|
502
|
-
let
|
|
503
|
-
|
|
504
|
-
const ie = N / 2 - Q / 2, J = x[_],
|
|
505
|
-
return { [
|
|
506
|
-
} }),
|
|
502
|
+
const x = ir(i), w = { x: o, y: n }, g = Ne(a), O = nt(a), h = At(g), y = await d.getDimensions(r), _ = g === "y" ? "top" : "left", C = g === "y" ? "bottom" : "right", N = l.reference[h] + l.reference[g] - w[g] - l.floating[h], Q = w[g] - l.reference[g], U = await (d.getOffsetParent == null ? void 0 : d.getOffsetParent(r));
|
|
503
|
+
let M = U ? g === "y" ? U.clientHeight || 0 : U.clientWidth || 0 : 0;
|
|
504
|
+
M === 0 && (M = l.floating[h]);
|
|
505
|
+
const ie = N / 2 - Q / 2, J = x[_], A = M - y[h] - x[C], F = M / 2 - y[h] / 2 + ie, z = gt(J, F, A), Z = (O === "start" ? x[_] : x[C]) > 0 && F !== z && l.reference[h] <= l.floating[h];
|
|
506
|
+
return { [g]: w[g] - (Z ? F < J ? J - F : A - F : 0), data: { [g]: z, centerOffset: F - z } };
|
|
507
|
+
} }), jr = { left: "right", right: "left", bottom: "top", top: "bottom" };
|
|
507
508
|
function Ge(t) {
|
|
508
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
509
|
+
return t.replace(/left|right|bottom|top/g, (e) => jr[e]);
|
|
509
510
|
}
|
|
510
|
-
function
|
|
511
|
+
function Wr(t, e, r) {
|
|
511
512
|
r === void 0 && (r = !1);
|
|
512
|
-
const i = nt(t), o = Ne(t), n =
|
|
513
|
+
const i = nt(t), o = Ne(t), n = At(o);
|
|
513
514
|
let a = o === "x" ? i === (r ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
514
515
|
return e.reference[n] > e.floating[n] && (a = Ge(a)), { main: a, cross: Ge(a) };
|
|
515
516
|
}
|
|
516
|
-
const
|
|
517
|
-
function
|
|
518
|
-
return t.replace(/start|end/g, (e) =>
|
|
517
|
+
const Vr = { start: "end", end: "start" };
|
|
518
|
+
function It(t) {
|
|
519
|
+
return t.replace(/start|end/g, (e) => Vr[e]);
|
|
519
520
|
}
|
|
520
|
-
const
|
|
521
|
-
|
|
522
|
-
const
|
|
521
|
+
const zr = ["top", "right", "bottom", "left"];
|
|
522
|
+
zr.reduce((t, e) => t.concat(e, e + "-start", e + "-end"), []);
|
|
523
|
+
const Jr = function(t) {
|
|
523
524
|
return t === void 0 && (t = {}), { name: "flip", options: t, async fn(e) {
|
|
524
525
|
var r;
|
|
525
|
-
const { placement: i, middlewareData: o, rects: n, initialPlacement: a, platform: l, elements: d } = e, { mainAxis: x = !0, crossAxis: w = !0, fallbackPlacements:
|
|
526
|
-
const
|
|
527
|
-
return [
|
|
528
|
-
}(a)), N = [a, ...C], Q = await
|
|
529
|
-
let
|
|
526
|
+
const { placement: i, middlewareData: o, rects: n, initialPlacement: a, platform: l, elements: d } = e, { mainAxis: x = !0, crossAxis: w = !0, fallbackPlacements: g, fallbackStrategy: O = "bestFit", flipAlignment: h = !0, ...y } = t, _ = Me(i), C = g || (_ === a || !h ? [Ge(a)] : function(F) {
|
|
527
|
+
const z = Ge(F);
|
|
528
|
+
return [It(F), z, It(z)];
|
|
529
|
+
}(a)), N = [a, ...C], Q = await or(e, y), U = [];
|
|
530
|
+
let M = ((r = o.flip) == null ? void 0 : r.overflows) || [];
|
|
530
531
|
if (x && U.push(Q[_]), w) {
|
|
531
|
-
const { main: F, cross:
|
|
532
|
-
U.push(Q[F], Q[
|
|
532
|
+
const { main: F, cross: z } = Wr(i, n, await (l.isRTL == null ? void 0 : l.isRTL(d.floating)));
|
|
533
|
+
U.push(Q[F], Q[z]);
|
|
533
534
|
}
|
|
534
|
-
if (
|
|
535
|
+
if (M = [...M, { placement: i, overflows: U }], !U.every((F) => F <= 0)) {
|
|
535
536
|
var ie, J;
|
|
536
|
-
const F = ((ie = (J = o.flip) == null ? void 0 : J.index) != null ? ie : 0) + 1,
|
|
537
|
-
if (
|
|
538
|
-
return { data: { index: F, overflows:
|
|
537
|
+
const F = ((ie = (J = o.flip) == null ? void 0 : J.index) != null ? ie : 0) + 1, z = N[F];
|
|
538
|
+
if (z)
|
|
539
|
+
return { data: { index: F, overflows: M }, reset: { placement: z } };
|
|
539
540
|
let Z = "bottom";
|
|
540
|
-
switch (
|
|
541
|
+
switch (O) {
|
|
541
542
|
case "bestFit": {
|
|
542
|
-
var
|
|
543
|
-
const s = (
|
|
543
|
+
var A;
|
|
544
|
+
const s = (A = M.map((c) => [c, c.overflows.filter((u) => u > 0).reduce((u, v) => u + v, 0)]).sort((c, u) => c[1] - u[1])[0]) == null ? void 0 : A[0].placement;
|
|
544
545
|
s && (Z = s);
|
|
545
546
|
break;
|
|
546
547
|
}
|
|
@@ -552,45 +553,45 @@ const zr = function(t) {
|
|
|
552
553
|
}
|
|
553
554
|
return {};
|
|
554
555
|
} };
|
|
555
|
-
},
|
|
556
|
+
}, Gr = function(t) {
|
|
556
557
|
return t === void 0 && (t = 0), { name: "offset", options: t, async fn(e) {
|
|
557
558
|
const { x: r, y: i } = e, o = await async function(n, a) {
|
|
558
|
-
const { placement: l, platform: d, elements: x } = n, w = await (d.isRTL == null ? void 0 : d.isRTL(x.floating)),
|
|
559
|
+
const { placement: l, platform: d, elements: x } = n, w = await (d.isRTL == null ? void 0 : d.isRTL(x.floating)), g = Me(l), O = nt(l), h = Ne(l) === "x", y = ["left", "top"].includes(g) ? -1 : 1, _ = w && h ? -1 : 1, C = typeof a == "function" ? a(n) : a;
|
|
559
560
|
let { mainAxis: N, crossAxis: Q, alignmentAxis: U } = typeof C == "number" ? { mainAxis: C, crossAxis: 0, alignmentAxis: null } : { mainAxis: 0, crossAxis: 0, alignmentAxis: null, ...C };
|
|
560
|
-
return
|
|
561
|
+
return O && typeof U == "number" && (Q = O === "end" ? -1 * U : U), h ? { x: Q * _, y: N * y } : { x: N * y, y: Q * _ };
|
|
561
562
|
}(e, t);
|
|
562
563
|
return { x: r + o.x, y: i + o.y, data: o };
|
|
563
564
|
} };
|
|
564
565
|
};
|
|
565
|
-
function
|
|
566
|
+
function Kr(t) {
|
|
566
567
|
return t === "x" ? "y" : "x";
|
|
567
568
|
}
|
|
568
|
-
const
|
|
569
|
+
const Xr = function(t) {
|
|
569
570
|
return t === void 0 && (t = {}), { name: "shift", options: t, async fn(e) {
|
|
570
571
|
const { x: r, y: i, placement: o } = e, { mainAxis: n = !0, crossAxis: a = !1, limiter: l = { fn: (C) => {
|
|
571
572
|
let { x: N, y: Q } = C;
|
|
572
573
|
return { x: N, y: Q };
|
|
573
|
-
} }, ...d } = t, x = { x: r, y: i }, w = await
|
|
574
|
-
let h = x[
|
|
574
|
+
} }, ...d } = t, x = { x: r, y: i }, w = await or(e, d), g = Ne(Me(o)), O = Kr(g);
|
|
575
|
+
let h = x[g], y = x[O];
|
|
575
576
|
if (n) {
|
|
576
|
-
const C =
|
|
577
|
-
h =
|
|
577
|
+
const C = g === "y" ? "bottom" : "right";
|
|
578
|
+
h = gt(h + w[g === "y" ? "top" : "left"], h, h - w[C]);
|
|
578
579
|
}
|
|
579
580
|
if (a) {
|
|
580
|
-
const C =
|
|
581
|
-
y =
|
|
581
|
+
const C = O === "y" ? "bottom" : "right";
|
|
582
|
+
y = gt(y + w[O === "y" ? "top" : "left"], y, y - w[C]);
|
|
582
583
|
}
|
|
583
|
-
const _ = l.fn({ ...e, [
|
|
584
|
+
const _ = l.fn({ ...e, [g]: h, [O]: y });
|
|
584
585
|
return { ..._, data: { x: _.x - r, y: _.y - i } };
|
|
585
586
|
} };
|
|
586
587
|
};
|
|
587
|
-
function
|
|
588
|
+
function nr(t) {
|
|
588
589
|
return t && t.document && t.location && t.alert && t.setInterval;
|
|
589
590
|
}
|
|
590
591
|
function ae(t) {
|
|
591
592
|
if (t == null)
|
|
592
593
|
return window;
|
|
593
|
-
if (!
|
|
594
|
+
if (!nr(t)) {
|
|
594
595
|
const e = t.ownerDocument;
|
|
595
596
|
return e && e.defaultView || window;
|
|
596
597
|
}
|
|
@@ -600,16 +601,16 @@ function Ie(t) {
|
|
|
600
601
|
return ae(t).getComputedStyle(t);
|
|
601
602
|
}
|
|
602
603
|
function ne(t) {
|
|
603
|
-
return
|
|
604
|
+
return nr(t) ? "" : t ? (t.nodeName || "").toLowerCase() : "";
|
|
604
605
|
}
|
|
605
|
-
function
|
|
606
|
+
function sr() {
|
|
606
607
|
const t = navigator.userAgentData;
|
|
607
608
|
return t != null && t.brands ? t.brands.map((e) => e.brand + "/" + e.version).join(" ") : navigator.userAgent;
|
|
608
609
|
}
|
|
609
610
|
function re(t) {
|
|
610
611
|
return t instanceof ae(t).HTMLElement;
|
|
611
612
|
}
|
|
612
|
-
function
|
|
613
|
+
function Ce(t) {
|
|
613
614
|
return t instanceof ae(t).Element;
|
|
614
615
|
}
|
|
615
616
|
function Pt(t) {
|
|
@@ -619,37 +620,37 @@ function st(t) {
|
|
|
619
620
|
const { overflow: e, overflowX: r, overflowY: i } = Ie(t);
|
|
620
621
|
return /auto|scroll|overlay|hidden/.test(e + i + r);
|
|
621
622
|
}
|
|
622
|
-
function
|
|
623
|
+
function Yr(t) {
|
|
623
624
|
return ["table", "td", "th"].includes(ne(t));
|
|
624
625
|
}
|
|
625
|
-
function
|
|
626
|
-
const e = /firefox/i.test(
|
|
626
|
+
function Qt(t) {
|
|
627
|
+
const e = /firefox/i.test(sr()), r = Ie(t);
|
|
627
628
|
return r.transform !== "none" || r.perspective !== "none" || r.contain === "paint" || ["transform", "perspective"].includes(r.willChange) || e && r.willChange === "filter" || e && !!r.filter && r.filter !== "none";
|
|
628
629
|
}
|
|
629
|
-
function
|
|
630
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
630
|
+
function ar() {
|
|
631
|
+
return !/^((?!chrome|android).)*safari/i.test(sr());
|
|
631
632
|
}
|
|
632
|
-
const
|
|
633
|
+
const Ut = Math.min, qe = Math.max, Ke = Math.round;
|
|
633
634
|
function ve(t, e, r) {
|
|
634
635
|
var i, o, n, a;
|
|
635
636
|
e === void 0 && (e = !1), r === void 0 && (r = !1);
|
|
636
637
|
const l = t.getBoundingClientRect();
|
|
637
638
|
let d = 1, x = 1;
|
|
638
639
|
e && re(t) && (d = t.offsetWidth > 0 && Ke(l.width) / t.offsetWidth || 1, x = t.offsetHeight > 0 && Ke(l.height) / t.offsetHeight || 1);
|
|
639
|
-
const w =
|
|
640
|
-
return { width: y, height: _, top: h, right:
|
|
640
|
+
const w = Ce(t) ? ae(t) : window, g = !ar() && r, O = (l.left + (g && (i = (o = w.visualViewport) == null ? void 0 : o.offsetLeft) != null ? i : 0)) / d, h = (l.top + (g && (n = (a = w.visualViewport) == null ? void 0 : a.offsetTop) != null ? n : 0)) / x, y = l.width / d, _ = l.height / x;
|
|
641
|
+
return { width: y, height: _, top: h, right: O + y, bottom: h + _, left: O, x: O, y: h };
|
|
641
642
|
}
|
|
642
643
|
function de(t) {
|
|
643
644
|
return (e = t, (e instanceof ae(e).Node ? t.ownerDocument : t.document) || window.document).documentElement;
|
|
644
645
|
var e;
|
|
645
646
|
}
|
|
646
647
|
function at(t) {
|
|
647
|
-
return
|
|
648
|
+
return Ce(t) ? { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop } : { scrollLeft: t.pageXOffset, scrollTop: t.pageYOffset };
|
|
648
649
|
}
|
|
649
|
-
function
|
|
650
|
+
function lr(t) {
|
|
650
651
|
return ve(de(t)).left + at(t).scrollLeft;
|
|
651
652
|
}
|
|
652
|
-
function
|
|
653
|
+
function Zr(t, e, r) {
|
|
653
654
|
const i = re(e), o = de(e), n = ve(t, i && function(d) {
|
|
654
655
|
const x = ve(d);
|
|
655
656
|
return Ke(x.width) !== d.offsetWidth || Ke(x.height) !== d.offsetHeight;
|
|
@@ -661,70 +662,70 @@ function Yr(t, e, r) {
|
|
|
661
662
|
const d = ve(e, !0);
|
|
662
663
|
l.x = d.x + e.clientLeft, l.y = d.y + e.clientTop;
|
|
663
664
|
} else
|
|
664
|
-
o && (l.x =
|
|
665
|
+
o && (l.x = lr(o));
|
|
665
666
|
return { x: n.left + a.scrollLeft - l.x, y: n.top + a.scrollTop - l.y, width: n.width, height: n.height };
|
|
666
667
|
}
|
|
667
|
-
function
|
|
668
|
+
function cr(t) {
|
|
668
669
|
return ne(t) === "html" ? t : t.assignedSlot || t.parentNode || (Pt(t) ? t.host : null) || de(t);
|
|
669
670
|
}
|
|
670
|
-
function
|
|
671
|
+
function Ft(t) {
|
|
671
672
|
return re(t) && getComputedStyle(t).position !== "fixed" ? t.offsetParent : null;
|
|
672
673
|
}
|
|
673
|
-
function
|
|
674
|
+
function bt(t) {
|
|
674
675
|
const e = ae(t);
|
|
675
|
-
let r =
|
|
676
|
-
for (; r &&
|
|
677
|
-
r =
|
|
678
|
-
return r && (ne(r) === "html" || ne(r) === "body" && getComputedStyle(r).position === "static" && !
|
|
679
|
-
let o =
|
|
676
|
+
let r = Ft(t);
|
|
677
|
+
for (; r && Yr(r) && getComputedStyle(r).position === "static"; )
|
|
678
|
+
r = Ft(r);
|
|
679
|
+
return r && (ne(r) === "html" || ne(r) === "body" && getComputedStyle(r).position === "static" && !Qt(r)) ? e : r || function(i) {
|
|
680
|
+
let o = cr(i);
|
|
680
681
|
for (Pt(o) && (o = o.host); re(o) && !["html", "body"].includes(ne(o)); ) {
|
|
681
|
-
if (
|
|
682
|
+
if (Qt(o))
|
|
682
683
|
return o;
|
|
683
684
|
o = o.parentNode;
|
|
684
685
|
}
|
|
685
686
|
return null;
|
|
686
687
|
}(t) || e;
|
|
687
688
|
}
|
|
688
|
-
function
|
|
689
|
+
function Ht(t) {
|
|
689
690
|
if (re(t))
|
|
690
691
|
return { width: t.offsetWidth, height: t.offsetHeight };
|
|
691
692
|
const e = ve(t);
|
|
692
693
|
return { width: e.width, height: e.height };
|
|
693
694
|
}
|
|
694
|
-
function
|
|
695
|
-
const e =
|
|
696
|
-
return ["html", "body", "#document"].includes(ne(e)) ? t.ownerDocument.body : re(e) && st(e) ? e :
|
|
695
|
+
function ur(t) {
|
|
696
|
+
const e = cr(t);
|
|
697
|
+
return ["html", "body", "#document"].includes(ne(e)) ? t.ownerDocument.body : re(e) && st(e) ? e : ur(e);
|
|
697
698
|
}
|
|
698
|
-
function
|
|
699
|
+
function dr(t, e) {
|
|
699
700
|
var r;
|
|
700
701
|
e === void 0 && (e = []);
|
|
701
|
-
const i =
|
|
702
|
-
return o ? l : l.concat(
|
|
702
|
+
const i = ur(t), o = i === ((r = t.ownerDocument) == null ? void 0 : r.body), n = ae(i), a = o ? [n].concat(n.visualViewport || [], st(i) ? i : []) : i, l = e.concat(a);
|
|
703
|
+
return o ? l : l.concat(dr(a));
|
|
703
704
|
}
|
|
704
|
-
function
|
|
705
|
+
function jt(t, e, r) {
|
|
705
706
|
return e === "viewport" ? Je(function(i, o) {
|
|
706
707
|
const n = ae(i), a = de(i), l = n.visualViewport;
|
|
707
|
-
let d = a.clientWidth, x = a.clientHeight, w = 0,
|
|
708
|
+
let d = a.clientWidth, x = a.clientHeight, w = 0, g = 0;
|
|
708
709
|
if (l) {
|
|
709
710
|
d = l.width, x = l.height;
|
|
710
|
-
const
|
|
711
|
-
(
|
|
711
|
+
const O = ar();
|
|
712
|
+
(O || !O && o === "fixed") && (w = l.offsetLeft, g = l.offsetTop);
|
|
712
713
|
}
|
|
713
|
-
return { width: d, height: x, x: w, y:
|
|
714
|
-
}(t, r)) :
|
|
714
|
+
return { width: d, height: x, x: w, y: g };
|
|
715
|
+
}(t, r)) : Ce(e) ? function(i, o) {
|
|
715
716
|
const n = ve(i, !1, o === "fixed"), a = n.top + i.clientTop, l = n.left + i.clientLeft;
|
|
716
717
|
return { top: a, left: l, x: l, y: a, right: l + i.clientWidth, bottom: a + i.clientHeight, width: i.clientWidth, height: i.clientHeight };
|
|
717
718
|
}(e, r) : Je(function(i) {
|
|
718
719
|
var o;
|
|
719
|
-
const n = de(i), a = at(i), l = (o = i.ownerDocument) == null ? void 0 : o.body, d =
|
|
720
|
-
let w = -a.scrollLeft +
|
|
721
|
-
const
|
|
722
|
-
return Ie(l || n).direction === "rtl" && (w +=
|
|
720
|
+
const n = de(i), a = at(i), l = (o = i.ownerDocument) == null ? void 0 : o.body, d = qe(n.scrollWidth, n.clientWidth, l ? l.scrollWidth : 0, l ? l.clientWidth : 0), x = qe(n.scrollHeight, n.clientHeight, l ? l.scrollHeight : 0, l ? l.clientHeight : 0);
|
|
721
|
+
let w = -a.scrollLeft + lr(i);
|
|
722
|
+
const g = -a.scrollTop;
|
|
723
|
+
return Ie(l || n).direction === "rtl" && (w += qe(n.clientWidth, l ? l.clientWidth : 0) - d), { width: d, height: x, x: w, y: g };
|
|
723
724
|
}(de(t)));
|
|
724
725
|
}
|
|
725
|
-
function
|
|
726
|
-
const e =
|
|
727
|
-
return
|
|
726
|
+
function ei(t) {
|
|
727
|
+
const e = dr(t), r = ["absolute", "fixed"].includes(Ie(t).position) && re(t) ? bt(t) : t;
|
|
728
|
+
return Ce(r) ? e.filter((i) => Ce(i) && function(o, n) {
|
|
728
729
|
const a = n.getRootNode == null ? void 0 : n.getRootNode();
|
|
729
730
|
if (o.contains(n))
|
|
730
731
|
return !0;
|
|
@@ -739,12 +740,12 @@ function Zr(t) {
|
|
|
739
740
|
return !1;
|
|
740
741
|
}(i, r) && ne(i) !== "body") : [];
|
|
741
742
|
}
|
|
742
|
-
const
|
|
743
|
+
const ti = { getClippingRect: function(t) {
|
|
743
744
|
let { element: e, boundary: r, rootBoundary: i, strategy: o } = t;
|
|
744
|
-
const n = [...r === "clippingAncestors" ?
|
|
745
|
-
const w =
|
|
746
|
-
return d.top =
|
|
747
|
-
},
|
|
745
|
+
const n = [...r === "clippingAncestors" ? ei(e) : [].concat(r), i], a = n[0], l = n.reduce((d, x) => {
|
|
746
|
+
const w = jt(e, x, o);
|
|
747
|
+
return d.top = qe(w.top, d.top), d.right = Ut(w.right, d.right), d.bottom = Ut(w.bottom, d.bottom), d.left = qe(w.left, d.left), d;
|
|
748
|
+
}, jt(e, a, o));
|
|
748
749
|
return { width: l.right - l.left, height: l.bottom - l.top, x: l.left, y: l.top };
|
|
749
750
|
}, convertOffsetParentRelativeRectToViewportRelativeRect: function(t) {
|
|
750
751
|
let { rect: e, offsetParent: r, strategy: i } = t;
|
|
@@ -758,42 +759,42 @@ const ei = { getClippingRect: function(t) {
|
|
|
758
759
|
l.x = d.x + r.clientLeft, l.y = d.y + r.clientTop;
|
|
759
760
|
}
|
|
760
761
|
return { ...e, x: e.x - a.scrollLeft + l.x, y: e.y - a.scrollTop + l.y };
|
|
761
|
-
}, isElement:
|
|
762
|
+
}, isElement: Ce, getDimensions: Ht, getOffsetParent: bt, getDocumentElement: de, getElementRects: (t) => {
|
|
762
763
|
let { reference: e, floating: r, strategy: i } = t;
|
|
763
|
-
return { reference:
|
|
764
|
-
}, getClientRects: (t) => Array.from(t.getClientRects()), isRTL: (t) => Ie(t).direction === "rtl" },
|
|
764
|
+
return { reference: Zr(e, bt(r), i), floating: { ...Ht(r), x: 0, y: 0 } };
|
|
765
|
+
}, getClientRects: (t) => Array.from(t.getClientRects()), isRTL: (t) => Ie(t).direction === "rtl" }, ri = (t, e, r) => Qr(t, e, { platform: ti, ...r }), Xe = "top", Ye = "bottom", mt = "left", vt = "right", Ue = {
|
|
765
766
|
[Xe]: Ye,
|
|
766
767
|
[Ye]: Xe,
|
|
767
|
-
[
|
|
768
|
-
[
|
|
769
|
-
},
|
|
770
|
-
[
|
|
768
|
+
[mt]: vt,
|
|
769
|
+
[vt]: mt
|
|
770
|
+
}, ii = {
|
|
771
|
+
[mt]: -45,
|
|
771
772
|
[Xe]: 45,
|
|
772
|
-
[
|
|
773
|
+
[vt]: 135,
|
|
773
774
|
[Ye]: -135
|
|
774
|
-
},
|
|
775
|
-
function
|
|
775
|
+
}, Wt = "calc(50% - 7px)", oi = (t) => [Xe, Ye].includes(t);
|
|
776
|
+
function ni({ actualDirection: t, directionName: e, arrowEl: r }) {
|
|
776
777
|
if (!r)
|
|
777
778
|
return;
|
|
778
779
|
t = e;
|
|
779
|
-
const i =
|
|
780
|
-
r.style.left = i ?
|
|
780
|
+
const i = oi(e);
|
|
781
|
+
r.style.left = i ? Wt : "", r.style.top = i ? "" : Wt;
|
|
781
782
|
}
|
|
782
|
-
async function
|
|
783
|
+
async function si(t) {
|
|
783
784
|
var o, n;
|
|
784
785
|
if (!t.isShowing)
|
|
785
786
|
return;
|
|
786
787
|
if (await ((o = t == null ? void 0 : t.waitForDOM) == null ? void 0 : o.call(t)), t.isCallout)
|
|
787
|
-
return
|
|
788
|
-
const e = await
|
|
788
|
+
return ni(t);
|
|
789
|
+
const e = await ri(t.targetEl, t.attentionEl, {
|
|
789
790
|
placement: t.directionName,
|
|
790
791
|
middleware: [
|
|
791
792
|
// Should we make this configurable, but have these as sane defaults?
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
793
|
+
Jr(),
|
|
794
|
+
Gr(8),
|
|
795
|
+
Xr({ padding: 16 }),
|
|
795
796
|
// @ts-ignore
|
|
796
|
-
|
|
797
|
+
Hr({ element: t.noArrow ? void 0 : t.arrowEl })
|
|
797
798
|
// FIXME
|
|
798
799
|
]
|
|
799
800
|
});
|
|
@@ -805,11 +806,11 @@ async function ni(t) {
|
|
|
805
806
|
let { x: r, y: i } = e.middlewareData.arrow;
|
|
806
807
|
t.arrowEl && (t.arrowEl.style.left = r ? r + "px" : "", t.arrowEl.style.top = i ? i + "px" : "");
|
|
807
808
|
}
|
|
808
|
-
var
|
|
809
|
-
function
|
|
809
|
+
var yt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
810
|
+
function ai(t) {
|
|
810
811
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
811
812
|
}
|
|
812
|
-
var
|
|
813
|
+
var hr = {}, pr = {};
|
|
813
814
|
(function(t) {
|
|
814
815
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.errorMessages = t.ErrorType = void 0;
|
|
815
816
|
var e;
|
|
@@ -831,10 +832,10 @@ var dr = {}, hr = {};
|
|
|
831
832
|
],
|
|
832
833
|
[e.EndOfString, "malformed escape sequence at end of string"]
|
|
833
834
|
]);
|
|
834
|
-
})(
|
|
835
|
+
})(pr);
|
|
835
836
|
(function(t) {
|
|
836
837
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.unraw = t.errorMessages = t.ErrorType = void 0;
|
|
837
|
-
const e =
|
|
838
|
+
const e = pr;
|
|
838
839
|
Object.defineProperty(t, "ErrorType", { enumerable: !0, get: function() {
|
|
839
840
|
return e.ErrorType;
|
|
840
841
|
} }), Object.defineProperty(t, "errorMessages", { enumerable: !0, get: function() {
|
|
@@ -893,9 +894,9 @@ var dr = {}, hr = {};
|
|
|
893
894
|
function w(h) {
|
|
894
895
|
return x.get(h) || h;
|
|
895
896
|
}
|
|
896
|
-
const
|
|
897
|
-
function
|
|
898
|
-
return h.replace(
|
|
897
|
+
const g = /\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;
|
|
898
|
+
function O(h, y = !1) {
|
|
899
|
+
return h.replace(g, function(_, C, N, Q, U, M, ie, J, A) {
|
|
899
900
|
if (C !== void 0)
|
|
900
901
|
return "\\";
|
|
901
902
|
if (N !== void 0)
|
|
@@ -903,26 +904,26 @@ var dr = {}, hr = {};
|
|
|
903
904
|
if (Q !== void 0)
|
|
904
905
|
return l(Q);
|
|
905
906
|
if (U !== void 0)
|
|
906
|
-
return n(U,
|
|
907
|
+
return n(U, M);
|
|
907
908
|
if (ie !== void 0)
|
|
908
909
|
return n(ie);
|
|
909
910
|
if (J === "0")
|
|
910
911
|
return "\0";
|
|
911
912
|
if (J !== void 0)
|
|
912
913
|
return d(J, !y);
|
|
913
|
-
if (
|
|
914
|
-
return w(
|
|
914
|
+
if (A !== void 0)
|
|
915
|
+
return w(A);
|
|
915
916
|
throw new SyntaxError(e.errorMessages.get(e.ErrorType.EndOfString));
|
|
916
917
|
});
|
|
917
918
|
}
|
|
918
|
-
t.unraw =
|
|
919
|
-
})(
|
|
920
|
-
const
|
|
921
|
-
var
|
|
919
|
+
t.unraw = O, t.default = O;
|
|
920
|
+
})(hr);
|
|
921
|
+
const li = /* @__PURE__ */ ai(hr);
|
|
922
|
+
var Ae = {}, fr = {}, gr = { exports: {} };
|
|
922
923
|
(function(t) {
|
|
923
924
|
(function(e, r) {
|
|
924
925
|
t.exports ? t.exports = r() : e.moo = r();
|
|
925
|
-
})(
|
|
926
|
+
})(yt, function() {
|
|
926
927
|
var e = Object.prototype.hasOwnProperty, r = Object.prototype.toString, i = typeof new RegExp().sticky == "boolean";
|
|
927
928
|
function o(s) {
|
|
928
929
|
return s && r.call(s) === "[object RegExp]";
|
|
@@ -964,10 +965,10 @@ var Pe = {}, pr = {}, fr = { exports: {} };
|
|
|
964
965
|
} else
|
|
965
966
|
throw new Error("Not a pattern: " + s);
|
|
966
967
|
}
|
|
967
|
-
function
|
|
968
|
+
function g(s, c) {
|
|
968
969
|
return s.length > c ? s : Array(c - s.length + 1).join(" ") + s;
|
|
969
970
|
}
|
|
970
|
-
function
|
|
971
|
+
function O(s, c) {
|
|
971
972
|
for (var u = s.length, v = 0; ; ) {
|
|
972
973
|
var E = s.lastIndexOf(`
|
|
973
974
|
`, u - 1);
|
|
@@ -982,14 +983,14 @@ var Pe = {}, pr = {}, fr = { exports: {} };
|
|
|
982
983
|
for (var c = Object.getOwnPropertyNames(s), u = [], v = 0; v < c.length; v++) {
|
|
983
984
|
var E = c[v], $ = s[E], L = [].concat($);
|
|
984
985
|
if (E === "include") {
|
|
985
|
-
for (var
|
|
986
|
-
u.push({ include: L[
|
|
986
|
+
for (var P = 0; P < L.length; P++)
|
|
987
|
+
u.push({ include: L[P] });
|
|
987
988
|
continue;
|
|
988
989
|
}
|
|
989
|
-
var
|
|
990
|
+
var q = [];
|
|
990
991
|
L.forEach(function(k) {
|
|
991
|
-
n(k) ? (
|
|
992
|
-
}),
|
|
992
|
+
n(k) ? (q.length && u.push(_(E, q)), u.push(_(E, k)), q = []) : q.push(k);
|
|
993
|
+
}), q.length && u.push(_(E, q));
|
|
993
994
|
}
|
|
994
995
|
return u;
|
|
995
996
|
}
|
|
@@ -1036,10 +1037,10 @@ var Pe = {}, pr = {}, fr = { exports: {} };
|
|
|
1036
1037
|
}
|
|
1037
1038
|
var N = _("error", { lineBreaks: !0, shouldThrow: !0 });
|
|
1038
1039
|
function Q(s, c) {
|
|
1039
|
-
for (var u = null, v = /* @__PURE__ */ Object.create(null), E = !0, $ = null, L = [],
|
|
1040
|
-
s[
|
|
1041
|
-
for (var
|
|
1042
|
-
var k = s[
|
|
1040
|
+
for (var u = null, v = /* @__PURE__ */ Object.create(null), E = !0, $ = null, L = [], P = [], q = 0; q < s.length; q++)
|
|
1041
|
+
s[q].fallback && (E = !1);
|
|
1042
|
+
for (var q = 0; q < s.length; q++) {
|
|
1043
|
+
var k = s[q];
|
|
1043
1044
|
if (k.include)
|
|
1044
1045
|
throw new Error("Inheritance is not allowed in stateless lexers");
|
|
1045
1046
|
if (k.error || k.fallback) {
|
|
@@ -1073,26 +1074,26 @@ var Pe = {}, pr = {}, fr = { exports: {} };
|
|
|
1073
1074
|
var ye = x(j.map(w)), K = new RegExp(ye);
|
|
1074
1075
|
if (K.test(""))
|
|
1075
1076
|
throw new Error("RegExp matches empty string: " + K);
|
|
1076
|
-
var
|
|
1077
|
-
if (
|
|
1077
|
+
var Le = l(ye);
|
|
1078
|
+
if (Le > 0)
|
|
1078
1079
|
throw new Error("RegExp has capture groups: " + K + `
|
|
1079
1080
|
Use (?: … ) instead`);
|
|
1080
1081
|
if (!k.lineBreaks && K.test(`
|
|
1081
1082
|
`))
|
|
1082
1083
|
throw new Error("Rule should declare lineBreaks: " + K);
|
|
1083
|
-
|
|
1084
|
+
P.push(d(ye));
|
|
1084
1085
|
}
|
|
1085
1086
|
}
|
|
1086
|
-
var $e = u && u.fallback,
|
|
1087
|
-
$ === !0 && (
|
|
1088
|
-
var
|
|
1089
|
-
return { regexp:
|
|
1087
|
+
var $e = u && u.fallback, Te = i && !$e ? "ym" : "gm", Qe = i || $e ? "" : "|";
|
|
1088
|
+
$ === !0 && (Te += "u");
|
|
1089
|
+
var Or = new RegExp(x(P) + Qe, Te);
|
|
1090
|
+
return { regexp: Or, groups: L, fast: v, error: u || N };
|
|
1090
1091
|
}
|
|
1091
1092
|
function U(s) {
|
|
1092
1093
|
var c = Q(C(s));
|
|
1093
|
-
return new
|
|
1094
|
+
return new A({ start: c }, "start");
|
|
1094
1095
|
}
|
|
1095
|
-
function
|
|
1096
|
+
function M(s, c, u) {
|
|
1096
1097
|
var v = s && (s.push || s.next);
|
|
1097
1098
|
if (v && !u[v])
|
|
1098
1099
|
throw new Error("Missing state '" + v + "' (in token '" + s.defaultType + "' of state '" + c + "')");
|
|
@@ -1109,21 +1110,21 @@ Use (?: … ) instead`);
|
|
|
1109
1110
|
E[L] = C(s[L]).concat(u);
|
|
1110
1111
|
}
|
|
1111
1112
|
for (var $ = 0; $ < v.length; $++)
|
|
1112
|
-
for (var L = v[$],
|
|
1113
|
-
var j =
|
|
1113
|
+
for (var L = v[$], P = E[L], q = /* @__PURE__ */ Object.create(null), k = 0; k < P.length; k++) {
|
|
1114
|
+
var j = P[k];
|
|
1114
1115
|
if (j.include) {
|
|
1115
1116
|
var he = [k, 1];
|
|
1116
|
-
if (j.include !== L && !
|
|
1117
|
-
|
|
1117
|
+
if (j.include !== L && !q[j.include]) {
|
|
1118
|
+
q[j.include] = !0;
|
|
1118
1119
|
var pe = E[j.include];
|
|
1119
1120
|
if (!pe)
|
|
1120
1121
|
throw new Error("Cannot include nonexistent state '" + j.include + "' (in state '" + L + "')");
|
|
1121
1122
|
for (var fe = 0; fe < pe.length; fe++) {
|
|
1122
1123
|
var ye = pe[fe];
|
|
1123
|
-
|
|
1124
|
+
P.indexOf(ye) === -1 && he.push(ye);
|
|
1124
1125
|
}
|
|
1125
1126
|
}
|
|
1126
|
-
|
|
1127
|
+
P.splice.apply(P, he), k--;
|
|
1127
1128
|
}
|
|
1128
1129
|
}
|
|
1129
1130
|
for (var K = /* @__PURE__ */ Object.create(null), $ = 0; $ < v.length; $++) {
|
|
@@ -1131,32 +1132,32 @@ Use (?: … ) instead`);
|
|
|
1131
1132
|
K[L] = Q(E[L], !0);
|
|
1132
1133
|
}
|
|
1133
1134
|
for (var $ = 0; $ < v.length; $++) {
|
|
1134
|
-
for (var
|
|
1135
|
-
|
|
1135
|
+
for (var Le = v[$], $e = K[Le], Te = $e.groups, k = 0; k < Te.length; k++)
|
|
1136
|
+
M(Te[k], Le, K);
|
|
1136
1137
|
for (var Qe = Object.getOwnPropertyNames($e.fast), k = 0; k < Qe.length; k++)
|
|
1137
|
-
|
|
1138
|
+
M($e.fast[Qe[k]], Le, K);
|
|
1138
1139
|
}
|
|
1139
|
-
return new
|
|
1140
|
+
return new A(K, c);
|
|
1140
1141
|
}
|
|
1141
1142
|
function J(s) {
|
|
1142
1143
|
for (var c = typeof Map < "u", u = c ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null), v = Object.getOwnPropertyNames(s), E = 0; E < v.length; E++) {
|
|
1143
|
-
var $ = v[E], L = s[$],
|
|
1144
|
-
|
|
1145
|
-
if (typeof
|
|
1144
|
+
var $ = v[E], L = s[$], P = Array.isArray(L) ? L : [L];
|
|
1145
|
+
P.forEach(function(q) {
|
|
1146
|
+
if (typeof q != "string")
|
|
1146
1147
|
throw new Error("keyword must be string (in keyword '" + $ + "')");
|
|
1147
|
-
c ? u.set(
|
|
1148
|
+
c ? u.set(q, $) : u[q] = $;
|
|
1148
1149
|
});
|
|
1149
1150
|
}
|
|
1150
|
-
return function(
|
|
1151
|
-
return c ? u.get(
|
|
1151
|
+
return function(q) {
|
|
1152
|
+
return c ? u.get(q) : u[q];
|
|
1152
1153
|
};
|
|
1153
1154
|
}
|
|
1154
|
-
var
|
|
1155
|
+
var A = function(s, c) {
|
|
1155
1156
|
this.startState = c, this.states = s, this.buffer = "", this.stack = [], this.reset();
|
|
1156
1157
|
};
|
|
1157
|
-
|
|
1158
|
+
A.prototype.reset = function(s, c) {
|
|
1158
1159
|
return this.buffer = s || "", this.index = 0, this.line = c ? c.line : 1, this.col = c ? c.col : 1, this.queuedToken = c ? c.queuedToken : null, this.queuedText = c ? c.queuedText : "", this.queuedThrow = c ? c.queuedThrow : null, this.setState(c ? c.state : this.startState), this.stack = c && c.stack ? c.stack.slice() : [], this;
|
|
1159
|
-
},
|
|
1160
|
+
}, A.prototype.save = function() {
|
|
1160
1161
|
return {
|
|
1161
1162
|
line: this.line,
|
|
1162
1163
|
col: this.col,
|
|
@@ -1166,15 +1167,15 @@ Use (?: … ) instead`);
|
|
|
1166
1167
|
queuedText: this.queuedText,
|
|
1167
1168
|
queuedThrow: this.queuedThrow
|
|
1168
1169
|
};
|
|
1169
|
-
},
|
|
1170
|
+
}, A.prototype.setState = function(s) {
|
|
1170
1171
|
if (!(!s || this.state === s)) {
|
|
1171
1172
|
this.state = s;
|
|
1172
1173
|
var c = this.states[s];
|
|
1173
1174
|
this.groups = c.groups, this.error = c.error, this.re = c.regexp, this.fast = c.fast;
|
|
1174
1175
|
}
|
|
1175
|
-
},
|
|
1176
|
+
}, A.prototype.popState = function() {
|
|
1176
1177
|
this.setState(this.stack.pop());
|
|
1177
|
-
},
|
|
1178
|
+
}, A.prototype.pushState = function(s) {
|
|
1178
1179
|
this.stack.push(this.state), this.setState(s);
|
|
1179
1180
|
};
|
|
1180
1181
|
var F = i ? function(s, c) {
|
|
@@ -1183,16 +1184,16 @@ Use (?: … ) instead`);
|
|
|
1183
1184
|
var u = s.exec(c);
|
|
1184
1185
|
return u[0].length === 0 ? null : u;
|
|
1185
1186
|
};
|
|
1186
|
-
|
|
1187
|
+
A.prototype._getGroup = function(s) {
|
|
1187
1188
|
for (var c = this.groups.length, u = 0; u < c; u++)
|
|
1188
1189
|
if (s[u + 1] !== void 0)
|
|
1189
1190
|
return this.groups[u];
|
|
1190
1191
|
throw new Error("Cannot find token type for matched text");
|
|
1191
1192
|
};
|
|
1192
|
-
function
|
|
1193
|
+
function z() {
|
|
1193
1194
|
return this.value;
|
|
1194
1195
|
}
|
|
1195
|
-
if (
|
|
1196
|
+
if (A.prototype.next = function() {
|
|
1196
1197
|
var s = this.index;
|
|
1197
1198
|
if (this.queuedGroup) {
|
|
1198
1199
|
var c = this._token(this.queuedGroup, this.queuedText, s);
|
|
@@ -1208,10 +1209,10 @@ Use (?: … ) instead`);
|
|
|
1208
1209
|
var E = F(v, u), $ = this.error;
|
|
1209
1210
|
if (E == null)
|
|
1210
1211
|
return this._token($, u.slice(s, u.length), s);
|
|
1211
|
-
var L = this._getGroup(E),
|
|
1212
|
-
return $.fallback && E.index !== s ? (this.queuedGroup = L, this.queuedText =
|
|
1212
|
+
var L = this._getGroup(E), P = E[0];
|
|
1213
|
+
return $.fallback && E.index !== s ? (this.queuedGroup = L, this.queuedText = P, this._token($, u.slice(s, E.index), s)) : this._token(L, P, s);
|
|
1213
1214
|
}
|
|
1214
|
-
},
|
|
1215
|
+
}, A.prototype._token = function(s, c, u) {
|
|
1215
1216
|
var v = 0;
|
|
1216
1217
|
if (s.lineBreaks) {
|
|
1217
1218
|
var E = /\n/g, $ = 1;
|
|
@@ -1226,15 +1227,15 @@ Use (?: … ) instead`);
|
|
|
1226
1227
|
type: typeof s.type == "function" && s.type(c) || s.defaultType,
|
|
1227
1228
|
value: typeof s.value == "function" ? s.value(c) : c,
|
|
1228
1229
|
text: c,
|
|
1229
|
-
toString:
|
|
1230
|
+
toString: z,
|
|
1230
1231
|
offset: u,
|
|
1231
1232
|
lineBreaks: v,
|
|
1232
1233
|
line: this.line,
|
|
1233
1234
|
col: this.col
|
|
1234
|
-
},
|
|
1235
|
-
if (this.index +=
|
|
1236
|
-
var
|
|
1237
|
-
throw
|
|
1235
|
+
}, P = c.length;
|
|
1236
|
+
if (this.index += P, this.line += v, v !== 0 ? this.col = P - $ + 1 : this.col += P, s.shouldThrow) {
|
|
1237
|
+
var q = new Error(this.formatError(L, "invalid syntax"));
|
|
1238
|
+
throw q;
|
|
1238
1239
|
}
|
|
1239
1240
|
return s.pop ? this.popState() : s.push ? this.pushState(s.push) : s.next && this.setState(s.next), L;
|
|
1240
1241
|
}, typeof Symbol < "u" && Symbol.iterator) {
|
|
@@ -1246,11 +1247,11 @@ Use (?: … ) instead`);
|
|
|
1246
1247
|
return { value: s, done: !s };
|
|
1247
1248
|
}, Z.prototype[Symbol.iterator] = function() {
|
|
1248
1249
|
return this;
|
|
1249
|
-
},
|
|
1250
|
+
}, A.prototype[Symbol.iterator] = function() {
|
|
1250
1251
|
return new Z(this);
|
|
1251
1252
|
};
|
|
1252
1253
|
}
|
|
1253
|
-
return
|
|
1254
|
+
return A.prototype.formatError = function(s, c) {
|
|
1254
1255
|
if (s == null)
|
|
1255
1256
|
var u = this.buffer.slice(this.index), s = {
|
|
1256
1257
|
text: u,
|
|
@@ -1260,20 +1261,20 @@ Use (?: … ) instead`);
|
|
|
1260
1261
|
line: this.line,
|
|
1261
1262
|
col: this.col
|
|
1262
1263
|
};
|
|
1263
|
-
var v = 2, E = Math.max(s.line - v, 1), $ = s.line + v, L = String($).length,
|
|
1264
|
+
var v = 2, E = Math.max(s.line - v, 1), $ = s.line + v, L = String($).length, P = O(
|
|
1264
1265
|
this.buffer,
|
|
1265
1266
|
this.line - s.line + v + 1
|
|
1266
|
-
).slice(0, 5),
|
|
1267
|
-
|
|
1268
|
-
for (var k = 0; k <
|
|
1269
|
-
var j =
|
|
1270
|
-
|
|
1267
|
+
).slice(0, 5), q = [];
|
|
1268
|
+
q.push(c + " at line " + s.line + " col " + s.col + ":"), q.push("");
|
|
1269
|
+
for (var k = 0; k < P.length; k++) {
|
|
1270
|
+
var j = P[k], he = E + k;
|
|
1271
|
+
q.push(g(String(he), L) + " " + j), he === s.line && q.push(g("", L + s.col + 1) + "^");
|
|
1271
1272
|
}
|
|
1272
|
-
return
|
|
1273
|
+
return q.join(`
|
|
1273
1274
|
`);
|
|
1274
|
-
},
|
|
1275
|
-
return new
|
|
1276
|
-
},
|
|
1275
|
+
}, A.prototype.clone = function() {
|
|
1276
|
+
return new A(this.states, this.state);
|
|
1277
|
+
}, A.prototype.has = function(s) {
|
|
1277
1278
|
return !0;
|
|
1278
1279
|
}, {
|
|
1279
1280
|
compile: U,
|
|
@@ -1283,14 +1284,14 @@ Use (?: … ) instead`);
|
|
|
1283
1284
|
keywords: J
|
|
1284
1285
|
};
|
|
1285
1286
|
});
|
|
1286
|
-
})(
|
|
1287
|
-
var
|
|
1287
|
+
})(gr);
|
|
1288
|
+
var ci = gr.exports;
|
|
1288
1289
|
(function(t) {
|
|
1289
|
-
var e =
|
|
1290
|
+
var e = yt && yt.__importDefault || function(i) {
|
|
1290
1291
|
return i && i.__esModule ? i : { default: i };
|
|
1291
1292
|
};
|
|
1292
1293
|
Object.defineProperty(t, "__esModule", { value: !0 }), t.lexer = t.states = void 0;
|
|
1293
|
-
const r = e(
|
|
1294
|
+
const r = e(ci);
|
|
1294
1295
|
t.states = {
|
|
1295
1296
|
body: {
|
|
1296
1297
|
doubleapos: { match: "''", value: () => "'" },
|
|
@@ -1344,17 +1345,17 @@ var li = fr.exports;
|
|
|
1344
1345
|
end: { match: /\s*\}/u, pop: 1 }
|
|
1345
1346
|
}
|
|
1346
1347
|
}, t.lexer = r.default.states(t.states);
|
|
1347
|
-
})(
|
|
1348
|
-
Object.defineProperty(
|
|
1349
|
-
var
|
|
1350
|
-
const
|
|
1348
|
+
})(fr);
|
|
1349
|
+
Object.defineProperty(Ae, "__esModule", { value: !0 });
|
|
1350
|
+
var br = Ae.parse = Ae.ParseError = void 0;
|
|
1351
|
+
const mr = fr, Fe = (t) => ({
|
|
1351
1352
|
offset: t.offset,
|
|
1352
1353
|
line: t.line,
|
|
1353
1354
|
col: t.col,
|
|
1354
1355
|
text: t.text,
|
|
1355
1356
|
lineBreaks: t.lineBreaks
|
|
1356
1357
|
}), ut = (t) => t === "plural" || t === "select" || t === "selectordinal";
|
|
1357
|
-
function
|
|
1358
|
+
function ui(t, e) {
|
|
1358
1359
|
let r = "", i = "";
|
|
1359
1360
|
for (const n of e) {
|
|
1360
1361
|
const a = n.ctx.text;
|
|
@@ -1377,25 +1378,25 @@ function ci(t, e) {
|
|
|
1377
1378
|
ctx: Object.assign({}, e[0].ctx, { text: i })
|
|
1378
1379
|
}];
|
|
1379
1380
|
}
|
|
1380
|
-
const
|
|
1381
|
+
const di = [
|
|
1381
1382
|
"number",
|
|
1382
1383
|
"date",
|
|
1383
1384
|
"time",
|
|
1384
1385
|
"spellout",
|
|
1385
1386
|
"ordinal",
|
|
1386
1387
|
"duration"
|
|
1387
|
-
],
|
|
1388
|
+
], Vt = ["zero", "one", "two", "few", "many", "other"];
|
|
1388
1389
|
class H extends Error {
|
|
1389
1390
|
/** @internal */
|
|
1390
1391
|
constructor(e, r) {
|
|
1391
|
-
super(
|
|
1392
|
+
super(mr.lexer.formatError(e, r));
|
|
1392
1393
|
}
|
|
1393
1394
|
}
|
|
1394
|
-
|
|
1395
|
-
class
|
|
1395
|
+
Ae.ParseError = H;
|
|
1396
|
+
class hi {
|
|
1396
1397
|
constructor(e, r) {
|
|
1397
1398
|
var i, o, n, a;
|
|
1398
|
-
this.lexer =
|
|
1399
|
+
this.lexer = mr.lexer.reset(e), this.cardinalKeys = (i = r == null ? void 0 : r.cardinal) !== null && i !== void 0 ? i : Vt, this.ordinalKeys = (o = r == null ? void 0 : r.ordinal) !== null && o !== void 0 ? o : Vt, this.strict = (n = r == null ? void 0 : r.strict) !== null && n !== void 0 ? n : !1, this.strictPluralKeys = (a = r == null ? void 0 : r.strictPluralKeys) !== null && a !== void 0 ? a : !0;
|
|
1399
1400
|
}
|
|
1400
1401
|
parse() {
|
|
1401
1402
|
return this.parseBody(!1, !0);
|
|
@@ -1443,7 +1444,7 @@ class di {
|
|
|
1443
1444
|
const i = Fe(e), o = this.lexer.next();
|
|
1444
1445
|
if (!o)
|
|
1445
1446
|
throw new H(null, "Unexpected message end");
|
|
1446
|
-
if (i.text += o.text, i.lineBreaks += o.lineBreaks, this.strict && (o.type === "func-simple" || o.type === "func-args") && !
|
|
1447
|
+
if (i.text += o.text, i.lineBreaks += o.lineBreaks, this.strict && (o.type === "func-simple" || o.type === "func-args") && !di.includes(o.value)) {
|
|
1447
1448
|
const n = `Invalid strict mode function arg type: ${o.value}`;
|
|
1448
1449
|
throw new H(e, n);
|
|
1449
1450
|
}
|
|
@@ -1471,7 +1472,7 @@ class di {
|
|
|
1471
1472
|
throw new H(o, a);
|
|
1472
1473
|
}
|
|
1473
1474
|
let n = this.parseBody(this.strict ? !1 : r);
|
|
1474
|
-
return this.strict && n.length > 0 && (n =
|
|
1475
|
+
return this.strict && n.length > 0 && (n = ui(e, n)), {
|
|
1475
1476
|
type: "function",
|
|
1476
1477
|
arg: e.value,
|
|
1477
1478
|
key: o.value,
|
|
@@ -1515,11 +1516,11 @@ class di {
|
|
|
1515
1516
|
throw new H(null, "Unexpected message end");
|
|
1516
1517
|
}
|
|
1517
1518
|
}
|
|
1518
|
-
function
|
|
1519
|
-
return new
|
|
1519
|
+
function pi(t, e = {}) {
|
|
1520
|
+
return new hi(t, e).parse();
|
|
1520
1521
|
}
|
|
1521
|
-
|
|
1522
|
-
function
|
|
1522
|
+
br = Ae.parse = pi;
|
|
1523
|
+
function vr(t, e) {
|
|
1523
1524
|
return t.filter((r) => r.type !== "content").length ? t.map((r) => {
|
|
1524
1525
|
var n;
|
|
1525
1526
|
if (r.type === "content")
|
|
@@ -1534,7 +1535,7 @@ function mr(t, e) {
|
|
|
1534
1535
|
}
|
|
1535
1536
|
const i = r.pluralOffset, o = {};
|
|
1536
1537
|
return r.cases.forEach((a) => {
|
|
1537
|
-
o[a.key.replace(/^=(.)+/, "$1")] =
|
|
1538
|
+
o[a.key.replace(/^=(.)+/, "$1")] = vr(
|
|
1538
1539
|
a.tokens,
|
|
1539
1540
|
e
|
|
1540
1541
|
);
|
|
@@ -1548,35 +1549,35 @@ function mr(t, e) {
|
|
|
1548
1549
|
];
|
|
1549
1550
|
}) : t.map((r) => e(r.value)).join("");
|
|
1550
1551
|
}
|
|
1551
|
-
function
|
|
1552
|
+
function fi(t, e = (r) => r) {
|
|
1552
1553
|
try {
|
|
1553
|
-
return
|
|
1554
|
+
return vr(br(t), e);
|
|
1554
1555
|
} catch (r) {
|
|
1555
1556
|
return console.error(`${r.message}
|
|
1556
1557
|
|
|
1557
1558
|
Message: ${t}`), t;
|
|
1558
1559
|
}
|
|
1559
1560
|
}
|
|
1560
|
-
const te = (t) => typeof t == "string",
|
|
1561
|
-
function
|
|
1561
|
+
const te = (t) => typeof t == "string", gi = (t) => typeof t == "function", zt = /* @__PURE__ */ new Map();
|
|
1562
|
+
function Rt(t) {
|
|
1562
1563
|
return [...Array.isArray(t) ? t : [t], "en"];
|
|
1563
1564
|
}
|
|
1564
|
-
function
|
|
1565
|
-
const i =
|
|
1565
|
+
function yr(t, e, r) {
|
|
1566
|
+
const i = Rt(t);
|
|
1566
1567
|
return Ze(
|
|
1567
1568
|
() => et("date", i, r),
|
|
1568
1569
|
() => new Intl.DateTimeFormat(i, r)
|
|
1569
1570
|
).format(te(e) ? new Date(e) : e);
|
|
1570
1571
|
}
|
|
1571
|
-
function
|
|
1572
|
-
const i =
|
|
1572
|
+
function $t(t, e, r) {
|
|
1573
|
+
const i = Rt(t);
|
|
1573
1574
|
return Ze(
|
|
1574
1575
|
() => et("number", i, r),
|
|
1575
1576
|
() => new Intl.NumberFormat(i, r)
|
|
1576
1577
|
).format(e);
|
|
1577
1578
|
}
|
|
1578
|
-
function
|
|
1579
|
-
const n =
|
|
1579
|
+
function Jt(t, e, r, { offset: i = 0, ...o }) {
|
|
1580
|
+
const n = Rt(t), a = e ? Ze(
|
|
1580
1581
|
() => et("plural-ordinal", n),
|
|
1581
1582
|
() => new Intl.PluralRules(n, { type: "ordinal" })
|
|
1582
1583
|
) : Ze(
|
|
@@ -1587,54 +1588,54 @@ function zt(t, e, r, { offset: i = 0, ...o }) {
|
|
|
1587
1588
|
}
|
|
1588
1589
|
function Ze(t, e) {
|
|
1589
1590
|
const r = t();
|
|
1590
|
-
let i =
|
|
1591
|
-
return i || (i = e(),
|
|
1591
|
+
let i = zt.get(r);
|
|
1592
|
+
return i || (i = e(), zt.set(r, i)), i;
|
|
1592
1593
|
}
|
|
1593
1594
|
function et(t, e, r) {
|
|
1594
1595
|
const i = e.join("-");
|
|
1595
1596
|
return `${t}-${i}-${JSON.stringify(r)}`;
|
|
1596
1597
|
}
|
|
1597
|
-
const
|
|
1598
|
+
const $r = /\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g, bi = (t, e, r = {}) => {
|
|
1598
1599
|
e = e || t;
|
|
1599
1600
|
const i = (n) => te(n) ? r[n] || { style: n } : n, o = (n, a) => {
|
|
1600
|
-
const l = Object.keys(r).length ? i("number") : {}, d =
|
|
1601
|
+
const l = Object.keys(r).length ? i("number") : {}, d = $t(e, n, l);
|
|
1601
1602
|
return a.replace("#", d);
|
|
1602
1603
|
};
|
|
1603
1604
|
return {
|
|
1604
1605
|
plural: (n, a) => {
|
|
1605
|
-
const { offset: l = 0 } = a, d =
|
|
1606
|
+
const { offset: l = 0 } = a, d = Jt(e, !1, n, a);
|
|
1606
1607
|
return o(n - l, d);
|
|
1607
1608
|
},
|
|
1608
1609
|
selectordinal: (n, a) => {
|
|
1609
|
-
const { offset: l = 0 } = a, d =
|
|
1610
|
+
const { offset: l = 0 } = a, d = Jt(e, !0, n, a);
|
|
1610
1611
|
return o(n - l, d);
|
|
1611
1612
|
},
|
|
1612
1613
|
select: (n, a) => a[n] ?? a.other,
|
|
1613
|
-
number: (n, a) =>
|
|
1614
|
-
date: (n, a) =>
|
|
1614
|
+
number: (n, a) => $t(e, n, i(a)),
|
|
1615
|
+
date: (n, a) => yr(e, n, i(a)),
|
|
1615
1616
|
undefined: (n) => n
|
|
1616
1617
|
};
|
|
1617
1618
|
};
|
|
1618
|
-
function
|
|
1619
|
+
function mi(t, e, r) {
|
|
1619
1620
|
return (i, o = {}) => {
|
|
1620
|
-
const n =
|
|
1621
|
+
const n = bi(e, r, o), a = (d) => Array.isArray(d) ? d.reduce((x, w) => {
|
|
1621
1622
|
if (te(w))
|
|
1622
1623
|
return x + w;
|
|
1623
|
-
const [
|
|
1624
|
+
const [g, O, h] = w;
|
|
1624
1625
|
let y = {};
|
|
1625
1626
|
h != null && !te(h) ? Object.keys(h).forEach((C) => {
|
|
1626
1627
|
y[C] = a(h[C]);
|
|
1627
1628
|
}) : y = h;
|
|
1628
|
-
const _ = n[
|
|
1629
|
+
const _ = n[O](i[g], y);
|
|
1629
1630
|
return _ == null ? x : x + _;
|
|
1630
1631
|
}, "") : d, l = a(t);
|
|
1631
|
-
return te(l) &&
|
|
1632
|
+
return te(l) && $r.test(l) ? li(l.trim()) : te(l) ? l.trim() : l;
|
|
1632
1633
|
};
|
|
1633
1634
|
}
|
|
1634
|
-
var
|
|
1635
|
-
class
|
|
1635
|
+
var vi = Object.defineProperty, yi = (t, e, r) => e in t ? vi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, $i = (t, e, r) => (yi(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
1636
|
+
class xi {
|
|
1636
1637
|
constructor() {
|
|
1637
|
-
|
|
1638
|
+
$i(this, "_events", {});
|
|
1638
1639
|
}
|
|
1639
1640
|
on(e, r) {
|
|
1640
1641
|
return this._hasEvent(e) || (this._events[e] = []), this._events[e].push(r), () => this.removeListener(e, r);
|
|
@@ -1652,10 +1653,10 @@ class $i {
|
|
|
1652
1653
|
return Array.isArray(this._events[e]);
|
|
1653
1654
|
}
|
|
1654
1655
|
}
|
|
1655
|
-
var
|
|
1656
|
-
class
|
|
1656
|
+
var wi = Object.defineProperty, _i = (t, e, r) => e in t ? wi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r, _e = (t, e, r) => (_i(t, typeof e != "symbol" ? e + "" : e, r), r);
|
|
1657
|
+
class ki extends xi {
|
|
1657
1658
|
constructor(e) {
|
|
1658
|
-
super(),
|
|
1659
|
+
super(), _e(this, "_locale"), _e(this, "_locales"), _e(this, "_localeData"), _e(this, "_messages"), _e(this, "_missing"), _e(this, "t", this._.bind(this)), this._messages = {}, this._localeData = {}, e.missing != null && (this._missing = e.missing), e.messages != null && this.load(e.messages), e.localeData != null && this.loadLocaleData(e.localeData), (e.locale != null || e.locales != null) && this.activate(e.locale, e.locales);
|
|
1659
1660
|
}
|
|
1660
1661
|
get locale() {
|
|
1661
1662
|
return this._locale;
|
|
@@ -1704,47 +1705,47 @@ class _i extends $i {
|
|
|
1704
1705
|
te(e) || (r = e.values || r, i = e.message, e = e.id);
|
|
1705
1706
|
const n = !this.messages[e], a = this._missing;
|
|
1706
1707
|
if (a && n)
|
|
1707
|
-
return
|
|
1708
|
+
return gi(a) ? a(this._locale, e) : a;
|
|
1708
1709
|
n && this.emit("missing", { id: e, locale: this._locale });
|
|
1709
1710
|
let l = this.messages[e] || i || e;
|
|
1710
|
-
return process.env.NODE_ENV !== "production" && (l = te(l) ?
|
|
1711
|
+
return process.env.NODE_ENV !== "production" && (l = te(l) ? fi(l) : l), te(l) && $r.test(l) ? JSON.parse(`"${l}"`) : te(l) ? l : mi(
|
|
1711
1712
|
l,
|
|
1712
1713
|
this._locale,
|
|
1713
1714
|
this._locales
|
|
1714
1715
|
)(r, o);
|
|
1715
1716
|
}
|
|
1716
1717
|
date(e, r) {
|
|
1717
|
-
return
|
|
1718
|
+
return yr(this._locales || this._locale, e, r);
|
|
1718
1719
|
}
|
|
1719
1720
|
number(e, r) {
|
|
1720
|
-
return
|
|
1721
|
+
return $t(this._locales || this._locale, e, r);
|
|
1721
1722
|
}
|
|
1722
1723
|
}
|
|
1723
|
-
function
|
|
1724
|
-
return new
|
|
1724
|
+
function Si(t = {}) {
|
|
1725
|
+
return new ki(t);
|
|
1725
1726
|
}
|
|
1726
|
-
const
|
|
1727
|
+
const V = Si(), Ei = JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.close":"Close","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}'), Ci = JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.close":"Lukk","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}'), Li = JSON.parse('{"attention.aria.callout":"callout speech bubble","attention.aria.close":"Sulje","attention.aria.highlight":"highlighted speech bubble","attention.aria.pointingDown":"pointing down","attention.aria.pointingLeft":"pointing left","attention.aria.pointingRight":"pointing right","attention.aria.pointingUp":"pointing up","attention.aria.popover":"popover speech bubble","attention.aria.tooltip":"tooltip"}'), Ti = ["en", "nb", "fi"], xr = "en", Gt = (t) => Ti.find(
|
|
1727
1728
|
(e) => t === e || t.toLowerCase().includes(e)
|
|
1728
|
-
) ||
|
|
1729
|
-
function
|
|
1729
|
+
) || xr;
|
|
1730
|
+
function Di() {
|
|
1730
1731
|
if (typeof window > "u") {
|
|
1731
1732
|
const t = process.env.NMP_LANGUAGE || Intl.DateTimeFormat().resolvedOptions().locale;
|
|
1732
|
-
return
|
|
1733
|
+
return Gt(t);
|
|
1733
1734
|
}
|
|
1734
1735
|
try {
|
|
1735
1736
|
const t = document.documentElement.lang;
|
|
1736
|
-
return
|
|
1737
|
+
return Gt(t);
|
|
1737
1738
|
} catch (t) {
|
|
1738
|
-
return console.warn("could not detect locale, falling back to source locale", t),
|
|
1739
|
+
return console.warn("could not detect locale, falling back to source locale", t), xr;
|
|
1739
1740
|
}
|
|
1740
1741
|
}
|
|
1741
|
-
const
|
|
1742
|
-
const i =
|
|
1743
|
-
|
|
1742
|
+
const Oi = (t, e, r, i) => t === "nb" ? r : t === "fi" ? i : e, lt = (t, e, r) => {
|
|
1743
|
+
const i = Di(), o = Oi(i, t, e, r);
|
|
1744
|
+
V.load(i, o), V.activate(i);
|
|
1744
1745
|
};
|
|
1745
|
-
class
|
|
1746
|
+
class xt extends Re(B) {
|
|
1746
1747
|
constructor() {
|
|
1747
|
-
super(), lt(
|
|
1748
|
+
super(), lt(Ei, Ci, Li), this.show = !1, this.tooltip = !1, this.callout = !1, this.popover = !1, this.highlight = !1, this.canClose = !1, this.noArrow = !1;
|
|
1748
1749
|
}
|
|
1749
1750
|
connectedCallback() {
|
|
1750
1751
|
if (super.connectedCallback(), !this.placement || !Object.keys(Ue).includes(this.placement))
|
|
@@ -1771,7 +1772,7 @@ ${JSON.stringify(
|
|
|
1771
1772
|
this.show ? "" : "hidden"
|
|
1772
1773
|
), this.tooltip || this._attentionEl.style.setProperty(
|
|
1773
1774
|
"--attention-display",
|
|
1774
|
-
this.show ? "
|
|
1775
|
+
this.show ? "flex" : "none"
|
|
1775
1776
|
), this.attentionState = {
|
|
1776
1777
|
isShowing: this.show,
|
|
1777
1778
|
isCallout: this.callout,
|
|
@@ -1781,30 +1782,30 @@ ${JSON.stringify(
|
|
|
1781
1782
|
attentionEl: this._attentionEl,
|
|
1782
1783
|
targetEl: this._targetEl,
|
|
1783
1784
|
noArrow: this.noArrow
|
|
1784
|
-
},
|
|
1785
|
+
}, si(this.attentionState);
|
|
1785
1786
|
}
|
|
1786
1787
|
pointingAtDirection() {
|
|
1787
1788
|
switch (Ue[this._actualDirection]) {
|
|
1788
1789
|
case "top":
|
|
1789
|
-
return
|
|
1790
|
+
return V._({
|
|
1790
1791
|
id: "attention.aria.pointingUp",
|
|
1791
1792
|
message: "pointing up",
|
|
1792
1793
|
comment: "Default screenreader message for top direction in the attention component"
|
|
1793
1794
|
});
|
|
1794
1795
|
case "right":
|
|
1795
|
-
return
|
|
1796
|
+
return V._({
|
|
1796
1797
|
id: "attention.aria.pointingRight",
|
|
1797
1798
|
message: "pointing right",
|
|
1798
1799
|
comment: "Default screenreader message for right direction in the attention component"
|
|
1799
1800
|
});
|
|
1800
1801
|
case "bottom":
|
|
1801
|
-
return
|
|
1802
|
+
return V._({
|
|
1802
1803
|
id: "attention.aria.pointingDown",
|
|
1803
1804
|
message: "pointing down",
|
|
1804
1805
|
comment: "Default screenreader message for bottom direction in the attention component"
|
|
1805
1806
|
});
|
|
1806
1807
|
case "left":
|
|
1807
|
-
return
|
|
1808
|
+
return V._({
|
|
1808
1809
|
id: "attention.aria.pointingLeft",
|
|
1809
1810
|
message: "pointing left",
|
|
1810
1811
|
comment: "Default screenreader message for left direction in the attention component"
|
|
@@ -1816,25 +1817,25 @@ ${JSON.stringify(
|
|
|
1816
1817
|
activeAttentionType() {
|
|
1817
1818
|
switch (!0) {
|
|
1818
1819
|
case this.tooltip:
|
|
1819
|
-
return
|
|
1820
|
+
return V._({
|
|
1820
1821
|
id: "attention.aria.tooltip",
|
|
1821
1822
|
message: "tooltip",
|
|
1822
1823
|
comment: "Default screenreader message for tooltip in the attention component"
|
|
1823
1824
|
});
|
|
1824
1825
|
case this.callout:
|
|
1825
|
-
return
|
|
1826
|
+
return V._({
|
|
1826
1827
|
id: "attention.aria.callout",
|
|
1827
1828
|
message: "callout speech bubble",
|
|
1828
1829
|
comment: "Default screenreader message for callout speech bubble in the attention component"
|
|
1829
1830
|
});
|
|
1830
1831
|
case this.popover:
|
|
1831
|
-
return
|
|
1832
|
+
return V._({
|
|
1832
1833
|
id: "attention.aria.popover",
|
|
1833
1834
|
message: "popover speech bubble",
|
|
1834
1835
|
comment: "Default screenreader message for popover speech bubble in the attention component"
|
|
1835
1836
|
});
|
|
1836
1837
|
case this.highlight:
|
|
1837
|
-
return
|
|
1838
|
+
return V._({
|
|
1838
1839
|
id: "attention.aria.highlight",
|
|
1839
1840
|
message: "highlighted speech bubble",
|
|
1840
1841
|
comment: "Default screenreader message for highlighted speech bubble in the attention component"
|
|
@@ -1848,7 +1849,7 @@ ${JSON.stringify(
|
|
|
1848
1849
|
}
|
|
1849
1850
|
setAriaLabels() {
|
|
1850
1851
|
if (this._targetEl && !this._targetEl.getAttribute("aria-details")) {
|
|
1851
|
-
const e = this._messageEl.id || (this._messageEl.id =
|
|
1852
|
+
const e = this._messageEl.id || (this._messageEl.id = Ir());
|
|
1852
1853
|
this._targetEl.setAttribute("aria-details", e);
|
|
1853
1854
|
}
|
|
1854
1855
|
}
|
|
@@ -1860,10 +1861,17 @@ ${JSON.stringify(
|
|
|
1860
1861
|
highlight: this.highlight
|
|
1861
1862
|
}, r = Object.keys(e).find((i) => !!e[i]) || "";
|
|
1862
1863
|
return {
|
|
1863
|
-
wrapper:
|
|
1864
|
-
arrow:
|
|
1864
|
+
wrapper: we[r],
|
|
1865
|
+
arrow: we[`arrow${r.charAt(0).toUpperCase() + r.slice(1)}`]
|
|
1865
1866
|
};
|
|
1866
1867
|
}
|
|
1868
|
+
get _ariaClose() {
|
|
1869
|
+
return V._({
|
|
1870
|
+
id: "attention.aria.close",
|
|
1871
|
+
message: "Close",
|
|
1872
|
+
comment: "Aria label for the close button in attention"
|
|
1873
|
+
});
|
|
1874
|
+
}
|
|
1867
1875
|
firstUpdated() {
|
|
1868
1876
|
this.setAriaLabels(), this.callout && (this._attentionEl.style.position = "relative");
|
|
1869
1877
|
}
|
|
@@ -1877,15 +1885,15 @@ ${JSON.stringify(
|
|
|
1877
1885
|
return this.renderRoot.querySelector("slot[name='message']").assignedNodes()[0];
|
|
1878
1886
|
}
|
|
1879
1887
|
get _wrapperClasses() {
|
|
1880
|
-
return
|
|
1881
|
-
[
|
|
1888
|
+
return ht({
|
|
1889
|
+
[we.base]: !0,
|
|
1882
1890
|
[this._activeVariantClasses.wrapper]: !0
|
|
1883
1891
|
});
|
|
1884
1892
|
}
|
|
1885
1893
|
get _arrowClasses() {
|
|
1886
|
-
return
|
|
1887
|
-
[
|
|
1888
|
-
[
|
|
1894
|
+
return ht({
|
|
1895
|
+
[we.arrowBase]: !0,
|
|
1896
|
+
[we[`arrowDirection${this._arrowDirection.charAt(0).toUpperCase() + this._arrowDirection.slice(1)}`]]: !0,
|
|
1889
1897
|
[this._activeVariantClasses.arrow]: !0
|
|
1890
1898
|
});
|
|
1891
1899
|
}
|
|
@@ -1894,11 +1902,33 @@ ${JSON.stringify(
|
|
|
1894
1902
|
id="arrow"
|
|
1895
1903
|
role="img"
|
|
1896
1904
|
class="${this._arrowClasses}"
|
|
1897
|
-
style="transform:rotate(${
|
|
1905
|
+
style="transform:rotate(${ii[this._arrowDirection]}deg);
|
|
1898
1906
|
margin-${// border alignment is off by a fraction of a pixel, this fixes it
|
|
1899
1907
|
this._arrowDirection.charAt(0).toLowerCase() + this._arrowDirection.slice(1)}:-0.5px;"
|
|
1900
1908
|
/>`;
|
|
1901
1909
|
}
|
|
1910
|
+
close() {
|
|
1911
|
+
const e = new CustomEvent("close", {
|
|
1912
|
+
bubbles: !0,
|
|
1913
|
+
composed: !0
|
|
1914
|
+
});
|
|
1915
|
+
this.updateComplete.then(() => this.dispatchEvent(e));
|
|
1916
|
+
}
|
|
1917
|
+
keypressed(e) {
|
|
1918
|
+
this.canClose && e.key === "Escape" && (e.preventDefault(), this.close());
|
|
1919
|
+
}
|
|
1920
|
+
get _closeBtnHtml() {
|
|
1921
|
+
return m`
|
|
1922
|
+
<button
|
|
1923
|
+
aria-label="${this._ariaClose}"
|
|
1924
|
+
@click="${this.close}"
|
|
1925
|
+
@keydown=${this.keypressed}
|
|
1926
|
+
class="${we.closeBtn}"
|
|
1927
|
+
>
|
|
1928
|
+
<w-icon-close-16 />
|
|
1929
|
+
</button>
|
|
1930
|
+
`;
|
|
1931
|
+
}
|
|
1902
1932
|
render() {
|
|
1903
1933
|
return m`
|
|
1904
1934
|
<div class=${I(this.className ? this.className : void 0)}>
|
|
@@ -1911,17 +1941,15 @@ ${JSON.stringify(
|
|
|
1911
1941
|
aria-label="${this.defaultAriaLabel()}"
|
|
1912
1942
|
class="${this._wrapperClasses}"
|
|
1913
1943
|
>
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
</div>
|
|
1944
|
+
${this._arrowHtml}
|
|
1945
|
+
<slot name="message"></slot>
|
|
1946
|
+
${this.canClose ? this._closeBtnHtml : dt}
|
|
1918
1947
|
</div>
|
|
1919
1948
|
` : m`
|
|
1920
1949
|
<div id="attention" class="${this._wrapperClasses}">
|
|
1921
|
-
<
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
</div>
|
|
1950
|
+
<slot name="message"></slot>
|
|
1951
|
+
${this._arrowHtml}
|
|
1952
|
+
${this.canClose ? this._closeBtnHtml : dt}
|
|
1925
1953
|
</div>
|
|
1926
1954
|
<slot name="target"></slot>
|
|
1927
1955
|
`}
|
|
@@ -1929,7 +1957,7 @@ ${JSON.stringify(
|
|
|
1929
1957
|
`;
|
|
1930
1958
|
}
|
|
1931
1959
|
}
|
|
1932
|
-
T(
|
|
1960
|
+
T(xt, "properties", {
|
|
1933
1961
|
// Whether Attention element should be visible.
|
|
1934
1962
|
show: { type: Boolean, reflect: !0 },
|
|
1935
1963
|
// Placement according to the target element
|
|
@@ -1943,10 +1971,12 @@ T($t, "properties", {
|
|
|
1943
1971
|
popover: { type: Boolean, reflect: !0 },
|
|
1944
1972
|
// Whether Attention element is rendered as a highlight
|
|
1945
1973
|
highlight: { type: Boolean, reflect: !0 },
|
|
1974
|
+
// Render Attention element with a close button
|
|
1975
|
+
canClose: { type: Boolean, reflect: !0 },
|
|
1946
1976
|
// Render Attention element without an arrow
|
|
1947
1977
|
noArrow: { type: Boolean, reflect: !0 }
|
|
1948
|
-
}), T(
|
|
1949
|
-
|
|
1978
|
+
}), T(xt, "styles", [
|
|
1979
|
+
B.styles,
|
|
1950
1980
|
se`
|
|
1951
1981
|
#attention {
|
|
1952
1982
|
position: absolute;
|
|
@@ -1965,13 +1995,13 @@ T($t, "properties", {
|
|
|
1965
1995
|
}
|
|
1966
1996
|
`
|
|
1967
1997
|
]);
|
|
1968
|
-
customElements.get("w-attention") || customElements.define("w-attention",
|
|
1969
|
-
class
|
|
1998
|
+
customElements.get("w-attention") || customElements.define("w-attention", xt);
|
|
1999
|
+
class wt extends B {
|
|
1970
2000
|
constructor() {
|
|
1971
2001
|
super(), this.variant = "neutral";
|
|
1972
2002
|
}
|
|
1973
2003
|
get _class() {
|
|
1974
|
-
return
|
|
2004
|
+
return ht({
|
|
1975
2005
|
[be.base]: !0,
|
|
1976
2006
|
[be[this.variant]]: !0,
|
|
1977
2007
|
[be.positionBase]: !!this.position,
|
|
@@ -1989,16 +2019,16 @@ class xt extends q {
|
|
|
1989
2019
|
`;
|
|
1990
2020
|
}
|
|
1991
2021
|
}
|
|
1992
|
-
T(
|
|
2022
|
+
T(wt, "properties", {
|
|
1993
2023
|
variant: {
|
|
1994
2024
|
type: "neutral" | "info" | "positive" | "warning" | "negative" | "disabled" | "notification" | "price"
|
|
1995
2025
|
},
|
|
1996
2026
|
position: {
|
|
1997
2027
|
type: "top-left" | "top-right" | "bottom-right" | "bottom-left"
|
|
1998
2028
|
}
|
|
1999
|
-
}), T(
|
|
2000
|
-
customElements.get("w-badge") || customElements.define("w-badge",
|
|
2001
|
-
class
|
|
2029
|
+
}), T(wt, "styles", [B.styles]);
|
|
2030
|
+
customElements.get("w-badge") || customElements.define("w-badge", wt);
|
|
2031
|
+
class _t extends B {
|
|
2002
2032
|
get _class() {
|
|
2003
2033
|
return G({
|
|
2004
2034
|
[oe.box]: !0,
|
|
@@ -2008,25 +2038,29 @@ class wt extends q {
|
|
|
2008
2038
|
[oe.bordered]: this.bordered
|
|
2009
2039
|
});
|
|
2010
2040
|
}
|
|
2041
|
+
get _optOutRoleWithDefault() {
|
|
2042
|
+
return this.role === "" ? dt : this.role ?? "region";
|
|
2043
|
+
}
|
|
2011
2044
|
render() {
|
|
2012
2045
|
return m`
|
|
2013
|
-
<div class="${this._class}">
|
|
2046
|
+
<div role="${this._optOutRoleWithDefault}" class="${this._class}">
|
|
2014
2047
|
<slot></slot>
|
|
2015
2048
|
</div>
|
|
2016
2049
|
`;
|
|
2017
2050
|
}
|
|
2018
2051
|
}
|
|
2019
|
-
T(
|
|
2052
|
+
T(_t, "properties", {
|
|
2020
2053
|
bleed: { type: Boolean },
|
|
2021
2054
|
bordered: { type: Boolean },
|
|
2022
2055
|
info: { type: Boolean },
|
|
2023
|
-
neutral: { type: Boolean }
|
|
2056
|
+
neutral: { type: Boolean },
|
|
2057
|
+
role: { type: String }
|
|
2024
2058
|
}), // Slotted elements remain in lightDOM which allows for control of their style outside of shadowDOM.
|
|
2025
2059
|
// ::slotted([Simple Selector]) confirms to Specificity rules, but (being simple) does not add weight to lightDOM skin selectors,
|
|
2026
2060
|
// so never gets higher Specificity. Thus in order to overwrite style linked within shadowDOM, we need to use !important.
|
|
2027
2061
|
// https://stackoverflow.com/a/61631668
|
|
2028
|
-
T(
|
|
2029
|
-
|
|
2062
|
+
T(_t, "styles", [
|
|
2063
|
+
B.styles,
|
|
2030
2064
|
se`
|
|
2031
2065
|
:host {
|
|
2032
2066
|
display: block;
|
|
@@ -2036,16 +2070,16 @@ T(wt, "styles", [
|
|
|
2036
2070
|
}
|
|
2037
2071
|
`
|
|
2038
2072
|
]);
|
|
2039
|
-
customElements.get("w-box") || customElements.define("w-box",
|
|
2040
|
-
function
|
|
2073
|
+
customElements.get("w-box") || customElements.define("w-box", _t);
|
|
2074
|
+
function Bi(t, e) {
|
|
2041
2075
|
return t.flatMap((r) => [r, e]).slice(0, -1);
|
|
2042
2076
|
}
|
|
2043
|
-
const qi = JSON.parse('{"breadcrumbs.ariaLabel":"You are here"}'),
|
|
2077
|
+
const qi = JSON.parse('{"breadcrumbs.ariaLabel":"You are here"}'), Ai = JSON.parse('{"breadcrumbs.ariaLabel":"Her er du"}'), Pi = JSON.parse('{"breadcrumbs.ariaLabel":"Olet tässä"}'), Ri = m`<span class=${ke.separator}
|
|
2044
2078
|
>/</span
|
|
2045
2079
|
>`;
|
|
2046
|
-
class
|
|
2080
|
+
class kt extends Re(B) {
|
|
2047
2081
|
constructor() {
|
|
2048
|
-
super(), lt(qi,
|
|
2082
|
+
super(), lt(qi, Ai, Pi), this.ariaLabel = V._({
|
|
2049
2083
|
id: "breadcrumbs.ariaLabel",
|
|
2050
2084
|
message: "You are here",
|
|
2051
2085
|
comment: "Default screenreader message for the breadcrumb component"
|
|
@@ -2057,43 +2091,43 @@ class _t extends Re(q) {
|
|
|
2057
2091
|
if (typeof i == "string") {
|
|
2058
2092
|
const n = o === children.length - 1;
|
|
2059
2093
|
return m`<span
|
|
2060
|
-
class=${
|
|
2094
|
+
class=${ke.text}
|
|
2061
2095
|
aria-current=${n ? "page" : void 0}
|
|
2062
2096
|
>${i}</span
|
|
2063
2097
|
>`;
|
|
2064
2098
|
}
|
|
2065
2099
|
return i.classList.add(
|
|
2066
|
-
i.tagName === "A" ?
|
|
2100
|
+
i.tagName === "A" ? ke.link : ke.text
|
|
2067
2101
|
), i;
|
|
2068
2102
|
});
|
|
2069
|
-
this._children =
|
|
2103
|
+
this._children = Bi(r, Ri);
|
|
2070
2104
|
}
|
|
2071
2105
|
render() {
|
|
2072
2106
|
return m`
|
|
2073
2107
|
<nav aria-labelledby="breadCrumbLabel">
|
|
2074
|
-
<h2 id="breadCrumbLabel" class=${
|
|
2108
|
+
<h2 id="breadCrumbLabel" class=${ke.a11y}>
|
|
2075
2109
|
${this.ariaLabel}
|
|
2076
2110
|
</h2>
|
|
2077
|
-
<div class=${
|
|
2111
|
+
<div class=${ke.wrapper}>${this._children}</div>
|
|
2078
2112
|
</nav>
|
|
2079
2113
|
`;
|
|
2080
2114
|
}
|
|
2081
2115
|
}
|
|
2082
|
-
T(
|
|
2116
|
+
T(kt, "styles", [B.styles]), T(kt, "properties", {
|
|
2083
2117
|
ariaLabel: { type: String }
|
|
2084
2118
|
});
|
|
2085
|
-
customElements.get("w-breadcrumbs") || customElements.define("w-breadcrumbs",
|
|
2086
|
-
const
|
|
2087
|
-
class
|
|
2119
|
+
customElements.get("w-breadcrumbs") || customElements.define("w-breadcrumbs", kt);
|
|
2120
|
+
const Pe = typeof window < "u";
|
|
2121
|
+
class St extends B {
|
|
2088
2122
|
constructor() {
|
|
2089
|
-
super(), this._messages = [], this.interval = 3e4, this._hiddenMessageIds = [], this.url =
|
|
2123
|
+
super(), this._messages = [], this.interval = 3e4, this._hiddenMessageIds = [], this.url = Pe ? window.location.href : "";
|
|
2090
2124
|
}
|
|
2091
2125
|
async connectedCallback() {
|
|
2092
2126
|
if (super.connectedCallback(), !this.api) {
|
|
2093
2127
|
console.error('Broadcast "api" attribute invalid or undefined');
|
|
2094
2128
|
return;
|
|
2095
2129
|
}
|
|
2096
|
-
|
|
2130
|
+
Pe && (await this._fetchMessage(), setInterval(() => this._fetchMessage(), this.interval));
|
|
2097
2131
|
}
|
|
2098
2132
|
async _fetchMessage() {
|
|
2099
2133
|
const e = `${this.api}?path=${this.url}`;
|
|
@@ -2111,7 +2145,7 @@ class kt extends q {
|
|
|
2111
2145
|
const e = this._messages.filter((r) => !this._hiddenMessageIds.includes(r.id));
|
|
2112
2146
|
return m`
|
|
2113
2147
|
<aside class=${`${e.length === 0 ? "hidden" : "mb-16"}`}>
|
|
2114
|
-
${
|
|
2148
|
+
${er(
|
|
2115
2149
|
e,
|
|
2116
2150
|
({ id: r }) => `broadcast-${r}`,
|
|
2117
2151
|
({ id: r, message: i }) => m`<w-toast
|
|
@@ -2127,7 +2161,7 @@ class kt extends q {
|
|
|
2127
2161
|
`;
|
|
2128
2162
|
}
|
|
2129
2163
|
}
|
|
2130
|
-
T(
|
|
2164
|
+
T(St, "properties", {
|
|
2131
2165
|
_messages: {
|
|
2132
2166
|
state: !0,
|
|
2133
2167
|
hasChanged(e, r) {
|
|
@@ -2144,9 +2178,9 @@ T(kt, "properties", {
|
|
|
2144
2178
|
interval: { type: Number, attribute: !0, reflect: !0 },
|
|
2145
2179
|
url: { type: String, attribute: !0, reflect: !0 },
|
|
2146
2180
|
api: { type: String, attribute: !0, reflect: !0 }
|
|
2147
|
-
}), T(
|
|
2148
|
-
customElements.get("w-broadcast") || customElements.define("w-broadcast",
|
|
2149
|
-
const
|
|
2181
|
+
}), T(St, "styles", [B.styles]);
|
|
2182
|
+
customElements.get("w-broadcast") || customElements.define("w-broadcast", St);
|
|
2183
|
+
const Mi = JSON.parse('{"button.aria.loading":"Loading..."}'), Ni = JSON.parse('{"button.aria.loading":"Laster..."}'), Ii = JSON.parse('{"button.aria.loading":"Ladataan..."}'), Kt = [
|
|
2150
2184
|
"primary",
|
|
2151
2185
|
"secondary",
|
|
2152
2186
|
"negative",
|
|
@@ -2154,19 +2188,19 @@ const Ri = JSON.parse('{"button.aria.loading":"Loading..."}'), Mi = JSON.parse('
|
|
|
2154
2188
|
"pill",
|
|
2155
2189
|
"link"
|
|
2156
2190
|
];
|
|
2157
|
-
class je extends Re(
|
|
2191
|
+
class je extends Re(B) {
|
|
2158
2192
|
constructor() {
|
|
2159
|
-
super(), lt(
|
|
2193
|
+
super(), lt(Mi, Ni, Ii), this.variant = "secondary", this.ariaValueTextLoading = V._({
|
|
2160
2194
|
id: "button.aria.loading",
|
|
2161
2195
|
message: "Loading...",
|
|
2162
2196
|
comment: "Screenreader message for buttons that are loading"
|
|
2163
2197
|
});
|
|
2164
2198
|
}
|
|
2165
2199
|
connectedCallback() {
|
|
2166
|
-
if (super.connectedCallback(), !
|
|
2200
|
+
if (super.connectedCallback(), !Kt.includes(this.variant))
|
|
2167
2201
|
throw new Error(
|
|
2168
2202
|
`Invalid "variant" attribute. Set its value to one of the following:
|
|
2169
|
-
${
|
|
2203
|
+
${Kt.join(
|
|
2170
2204
|
", "
|
|
2171
2205
|
)}.`
|
|
2172
2206
|
);
|
|
@@ -2246,7 +2280,7 @@ ${Gt.join(
|
|
|
2246
2280
|
}
|
|
2247
2281
|
}
|
|
2248
2282
|
T(je, "shadowRootOptions", {
|
|
2249
|
-
...
|
|
2283
|
+
...B.shadowRootOptions,
|
|
2250
2284
|
delegatesFocus: !0
|
|
2251
2285
|
}), T(je, "properties", {
|
|
2252
2286
|
type: { type: "button" | "submit" | "reset", reflect: !0 },
|
|
@@ -2260,13 +2294,13 @@ T(je, "shadowRootOptions", {
|
|
|
2260
2294
|
rel: { type: String, reflect: !0 },
|
|
2261
2295
|
fullWidth: { type: Boolean, reflect: !0 },
|
|
2262
2296
|
buttonClass: { type: String, reflect: !0 }
|
|
2263
|
-
}), T(je, "styles", [
|
|
2297
|
+
}), T(je, "styles", [B.styles]);
|
|
2264
2298
|
customElements.get("w-button") || customElements.define("w-button", je);
|
|
2265
|
-
const
|
|
2299
|
+
const Xt = {
|
|
2266
2300
|
ENTER: "Enter",
|
|
2267
2301
|
SPACE: " "
|
|
2268
2302
|
};
|
|
2269
|
-
class
|
|
2303
|
+
class Et extends B {
|
|
2270
2304
|
constructor() {
|
|
2271
2305
|
super(), this.selected = !1, this.flat = !1, this.clickable = !1;
|
|
2272
2306
|
}
|
|
@@ -2302,7 +2336,7 @@ class St extends q {
|
|
|
2302
2336
|
></span>`;
|
|
2303
2337
|
}
|
|
2304
2338
|
keypressed(e) {
|
|
2305
|
-
!this.clickable || e.altKey || e.ctrlKey || (e.key ===
|
|
2339
|
+
!this.clickable || e.altKey || e.ctrlKey || (e.key === Xt.ENTER || e.key === Xt.SPACE) && (e.preventDefault(), this.click());
|
|
2306
2340
|
}
|
|
2307
2341
|
render() {
|
|
2308
2342
|
return m`
|
|
@@ -2319,8 +2353,8 @@ class St extends q {
|
|
|
2319
2353
|
`;
|
|
2320
2354
|
}
|
|
2321
2355
|
}
|
|
2322
|
-
T(
|
|
2323
|
-
|
|
2356
|
+
T(Et, "styles", [
|
|
2357
|
+
B.styles,
|
|
2324
2358
|
se`
|
|
2325
2359
|
a::after {
|
|
2326
2360
|
content: "";
|
|
@@ -2334,13 +2368,13 @@ T(St, "styles", [
|
|
|
2334
2368
|
display: block;
|
|
2335
2369
|
}
|
|
2336
2370
|
`
|
|
2337
|
-
]), T(
|
|
2371
|
+
]), T(Et, "properties", {
|
|
2338
2372
|
selected: { type: Boolean, reflect: !0 },
|
|
2339
2373
|
flat: { type: Boolean },
|
|
2340
2374
|
clickable: { type: Boolean }
|
|
2341
2375
|
});
|
|
2342
|
-
customElements.get("w-card") || customElements.define("w-card",
|
|
2343
|
-
class
|
|
2376
|
+
customElements.get("w-card") || customElements.define("w-card", Et);
|
|
2377
|
+
class Ct extends Re(B) {
|
|
2344
2378
|
constructor() {
|
|
2345
2379
|
super(), this.expanded = !1, this.animated = !1, this.info = !1, this.box = !1, this.bleed = !1, this.noChevron = !1, this._hasTitle = !0;
|
|
2346
2380
|
}
|
|
@@ -2409,7 +2443,7 @@ class Et extends Re(q) {
|
|
|
2409
2443
|
</div>`;
|
|
2410
2444
|
}
|
|
2411
2445
|
}
|
|
2412
|
-
T(
|
|
2446
|
+
T(Ct, "properties", {
|
|
2413
2447
|
expanded: { type: Boolean, reflect: !0 },
|
|
2414
2448
|
title: { type: String },
|
|
2415
2449
|
info: { type: Boolean },
|
|
@@ -2425,8 +2459,8 @@ T(Et, "properties", {
|
|
|
2425
2459
|
// ::slotted([Simple Selector]) confirms to Specificity rules, but (being simple) does not add weight to lightDOM skin selectors,
|
|
2426
2460
|
// so never gets higher Specificity. Thus in order to overwrite style linked within shadowDOM, we need to use !important.
|
|
2427
2461
|
// https://stackoverflow.com/a/61631668
|
|
2428
|
-
T(
|
|
2429
|
-
|
|
2462
|
+
T(Ct, "styles", [
|
|
2463
|
+
B.styles,
|
|
2430
2464
|
se`
|
|
2431
2465
|
:host {
|
|
2432
2466
|
display: block;
|
|
@@ -2436,30 +2470,30 @@ T(Et, "styles", [
|
|
|
2436
2470
|
}
|
|
2437
2471
|
`
|
|
2438
2472
|
]);
|
|
2439
|
-
customElements.get("w-expandable") || customElements.define("w-expandable",
|
|
2440
|
-
const
|
|
2441
|
-
var tt,
|
|
2442
|
-
class
|
|
2473
|
+
customElements.get("w-expandable") || customElements.define("w-expandable", Ct);
|
|
2474
|
+
const Qi = JSON.parse('{"select.label.optional":"(optional)"}'), Ui = JSON.parse('{"select.label.optional":"(valgfritt)"}'), Fi = JSON.parse('{"select.label.optional":"(valinnainen)"}');
|
|
2475
|
+
var tt, wr, rt, _r, it, kr, ot, Sr, Se, We, Ee, Ve;
|
|
2476
|
+
class Lt extends Re(B) {
|
|
2443
2477
|
constructor() {
|
|
2444
2478
|
super();
|
|
2445
2479
|
ge(this, tt);
|
|
2446
2480
|
ge(this, rt);
|
|
2447
2481
|
ge(this, it);
|
|
2448
2482
|
ge(this, ot);
|
|
2449
|
-
ge(this, ke);
|
|
2450
2483
|
ge(this, Se);
|
|
2451
|
-
|
|
2484
|
+
ge(this, Ee);
|
|
2485
|
+
lt(Qi, Ui, Fi), this._options = this.innerHTML;
|
|
2452
2486
|
}
|
|
2453
2487
|
render() {
|
|
2454
2488
|
return m`<div class="${xe.wrapper}">
|
|
2455
2489
|
${He(
|
|
2456
2490
|
this.label,
|
|
2457
|
-
() => m`<label class="${X(this, rt,
|
|
2491
|
+
() => m`<label class="${X(this, rt, _r)}" for="${X(this, Se, We)}">
|
|
2458
2492
|
${this.label}
|
|
2459
2493
|
${He(
|
|
2460
2494
|
this.optional,
|
|
2461
|
-
() => m`<span class="${
|
|
2462
|
-
>${
|
|
2495
|
+
() => m`<span class="${Be.optional}"
|
|
2496
|
+
>${V._({
|
|
2463
2497
|
id: "select.label.optional",
|
|
2464
2498
|
message: "(optional)",
|
|
2465
2499
|
comment: "Shown behind label when marked as optional"
|
|
@@ -2470,53 +2504,53 @@ class Ct extends Re(q) {
|
|
|
2470
2504
|
)}
|
|
2471
2505
|
<div class="${xe.selectWrapper}">
|
|
2472
2506
|
<select
|
|
2473
|
-
class="${X(this, tt,
|
|
2474
|
-
id="${X(this,
|
|
2507
|
+
class="${X(this, tt, wr)}"
|
|
2508
|
+
id="${X(this, Se, We)}"
|
|
2475
2509
|
?autofocus=${this.autoFocus}
|
|
2476
|
-
aria-describedby="${I(X(this,
|
|
2510
|
+
aria-describedby="${I(X(this, Ee, Ve))}"
|
|
2477
2511
|
aria-invalid="${I(this.invalid)}"
|
|
2478
|
-
aria-errormessage="${I(this.invalid && X(this,
|
|
2512
|
+
aria-errormessage="${I(this.invalid && X(this, Ee, Ve))}"
|
|
2479
2513
|
>
|
|
2480
|
-
${
|
|
2514
|
+
${tr(this._options)}
|
|
2481
2515
|
</select>
|
|
2482
|
-
<div class="${X(this, ot,
|
|
2516
|
+
<div class="${X(this, ot, Sr)}">
|
|
2483
2517
|
<w-icon-chevron-down-16></w-icon-chevron-down-16>
|
|
2484
2518
|
</div>
|
|
2485
2519
|
</div>
|
|
2486
2520
|
${He(
|
|
2487
2521
|
this.always || this.invalid,
|
|
2488
|
-
() => m`<div id="${X(this,
|
|
2522
|
+
() => m`<div id="${X(this, Ee, Ve)}" class="${X(this, it, kr)}">
|
|
2489
2523
|
${this.hint}
|
|
2490
2524
|
</div>`
|
|
2491
2525
|
)}
|
|
2492
2526
|
</div>`;
|
|
2493
2527
|
}
|
|
2494
2528
|
}
|
|
2495
|
-
tt = new WeakSet(),
|
|
2529
|
+
tt = new WeakSet(), wr = function() {
|
|
2496
2530
|
return ue({
|
|
2497
2531
|
[xe.default]: !0,
|
|
2498
2532
|
[xe.invalid]: this.invalid
|
|
2499
2533
|
});
|
|
2500
|
-
}, rt = new WeakSet(),
|
|
2534
|
+
}, rt = new WeakSet(), _r = function() {
|
|
2501
2535
|
return ue({
|
|
2502
|
-
[
|
|
2503
|
-
[
|
|
2536
|
+
[Be.label]: !0,
|
|
2537
|
+
[Be.labelInvalid]: this.invalid
|
|
2504
2538
|
});
|
|
2505
|
-
}, it = new WeakSet(),
|
|
2539
|
+
}, it = new WeakSet(), kr = function() {
|
|
2506
2540
|
return ue({
|
|
2507
2541
|
[ze.helpText]: !0,
|
|
2508
2542
|
[ze.helpTextInvalid]: this.invalid
|
|
2509
2543
|
});
|
|
2510
|
-
}, ot = new WeakSet(),
|
|
2544
|
+
}, ot = new WeakSet(), Sr = function() {
|
|
2511
2545
|
return ue({
|
|
2512
2546
|
[xe.chevron]: !0,
|
|
2513
2547
|
[xe.chevronDisabled]: this.disabled
|
|
2514
2548
|
});
|
|
2515
|
-
},
|
|
2549
|
+
}, Se = new WeakSet(), We = function() {
|
|
2516
2550
|
return "select_id";
|
|
2517
|
-
},
|
|
2518
|
-
return this.hint ? `${X(this,
|
|
2519
|
-
}, T(
|
|
2551
|
+
}, Ee = new WeakSet(), Ve = function() {
|
|
2552
|
+
return this.hint ? `${X(this, Se, We)}__hint` : void 0;
|
|
2553
|
+
}, T(Lt, "properties", {
|
|
2520
2554
|
// Whether the element should receive focus on render
|
|
2521
2555
|
autoFocus: { type: Boolean, reflect: !0 },
|
|
2522
2556
|
// Renders the field in an invalid state. Often paired with `hint` to provide feedback about the error
|
|
@@ -2530,9 +2564,9 @@ tt = new WeakSet(), xr = function() {
|
|
|
2530
2564
|
// Whether to show optional text
|
|
2531
2565
|
optional: { type: Boolean, reflect: !0 },
|
|
2532
2566
|
_options: { state: !0 }
|
|
2533
|
-
}), T(
|
|
2534
|
-
customElements.get("w-select") || customElements.define("w-select",
|
|
2535
|
-
class
|
|
2567
|
+
}), T(Lt, "styles", [B.styles]);
|
|
2568
|
+
customElements.get("w-select") || customElements.define("w-select", Lt);
|
|
2569
|
+
class Tt extends B {
|
|
2536
2570
|
constructor() {
|
|
2537
2571
|
super(), this.type = "text";
|
|
2538
2572
|
}
|
|
@@ -2554,8 +2588,8 @@ class Lt extends q {
|
|
|
2554
2588
|
}
|
|
2555
2589
|
get _labelStyles() {
|
|
2556
2590
|
return G({
|
|
2557
|
-
[
|
|
2558
|
-
[
|
|
2591
|
+
[Be.label]: !0,
|
|
2592
|
+
[Be.labelInvalid]: this.invalid
|
|
2559
2593
|
});
|
|
2560
2594
|
}
|
|
2561
2595
|
get _label() {
|
|
@@ -2623,7 +2657,7 @@ class Lt extends q {
|
|
|
2623
2657
|
`;
|
|
2624
2658
|
}
|
|
2625
2659
|
}
|
|
2626
|
-
T(
|
|
2660
|
+
T(Tt, "properties", {
|
|
2627
2661
|
disabled: { type: Boolean },
|
|
2628
2662
|
invalid: { type: Boolean },
|
|
2629
2663
|
id: { type: String },
|
|
@@ -2647,8 +2681,8 @@ T(Lt, "properties", {
|
|
|
2647
2681
|
// ::slotted([Simple Selector]) confirms to Specificity rules, but (being simple) does not add weight to lightDOM skin selectors,
|
|
2648
2682
|
// so never gets higher Specificity. Thus in order to overwrite style linked within shadowDOM, we need to use !important.
|
|
2649
2683
|
// https://stackoverflow.com/a/61631668
|
|
2650
|
-
T(
|
|
2651
|
-
|
|
2684
|
+
T(Tt, "styles", [
|
|
2685
|
+
B.styles,
|
|
2652
2686
|
se`
|
|
2653
2687
|
:host {
|
|
2654
2688
|
display: block;
|
|
@@ -2658,9 +2692,9 @@ T(Lt, "styles", [
|
|
|
2658
2692
|
}
|
|
2659
2693
|
`
|
|
2660
2694
|
]);
|
|
2661
|
-
customElements.get("w-textfield") || customElements.define("w-textfield",
|
|
2662
|
-
function
|
|
2663
|
-
if (!
|
|
2695
|
+
customElements.get("w-textfield") || customElements.define("w-textfield", Tt);
|
|
2696
|
+
function Zi(t, e) {
|
|
2697
|
+
if (!Pe)
|
|
2664
2698
|
return;
|
|
2665
2699
|
const r = customElements.get("w-toast-container").init(), i = {
|
|
2666
2700
|
id: Date.now().toString(36) + Math.random().toString(36).slice(2, 5),
|
|
@@ -2671,68 +2705,68 @@ function Yi(t, e) {
|
|
|
2671
2705
|
};
|
|
2672
2706
|
return r.set(i), i;
|
|
2673
2707
|
}
|
|
2674
|
-
function
|
|
2675
|
-
return
|
|
2708
|
+
function eo(t) {
|
|
2709
|
+
return Pe ? customElements.get("w-toast-container").init().del(t) : void 0;
|
|
2676
2710
|
}
|
|
2677
|
-
function
|
|
2678
|
-
if (!
|
|
2711
|
+
function to(t, e) {
|
|
2712
|
+
if (!Pe)
|
|
2679
2713
|
return;
|
|
2680
2714
|
const r = customElements.get("w-toast-container").init();
|
|
2681
2715
|
return r.set({ ...r.get(t), ...e }), r.get(t);
|
|
2682
2716
|
}
|
|
2683
|
-
const
|
|
2684
|
-
let
|
|
2685
|
-
if (
|
|
2686
|
-
const t = window.matchMedia("(prefers-reduced-motion: reduce)"), e = ({ matches: r }) =>
|
|
2717
|
+
const Mt = typeof window < "u";
|
|
2718
|
+
let Er = !0;
|
|
2719
|
+
if (Mt) {
|
|
2720
|
+
const t = window.matchMedia("(prefers-reduced-motion: reduce)"), e = ({ matches: r }) => Er = !r;
|
|
2687
2721
|
t.addEventListener && t.addEventListener("change", e), e(t);
|
|
2688
2722
|
}
|
|
2689
|
-
const
|
|
2723
|
+
const Cr = (t) => {
|
|
2690
2724
|
t.style.transition = null, t.style.backfaceVisibility = null, t.style.overflow = null;
|
|
2691
|
-
},
|
|
2692
|
-
const e =
|
|
2725
|
+
}, Lr = (t) => {
|
|
2726
|
+
const e = Er ? "var(--f-expansion-duration, 0.3s)" : "0.01s";
|
|
2693
2727
|
t.style.transition = `height ${e}`, t.style.backfaceVisibility = "hidden", t.style.overflow = "hidden";
|
|
2694
|
-
},
|
|
2728
|
+
}, Hi = (t, e) => () => {
|
|
2695
2729
|
t.style.height = "auto", t.style.overflow = null, e && e();
|
|
2696
|
-
},
|
|
2730
|
+
}, ji = (t) => () => {
|
|
2697
2731
|
t && t();
|
|
2698
|
-
},
|
|
2732
|
+
}, Tr = (t, e) => {
|
|
2699
2733
|
const r = (() => {
|
|
2700
2734
|
if (!e)
|
|
2701
2735
|
return new Promise((n) => {
|
|
2702
2736
|
e = n;
|
|
2703
2737
|
});
|
|
2704
|
-
})(), i =
|
|
2705
|
-
|
|
2738
|
+
})(), i = Hi(t, e);
|
|
2739
|
+
Cr(t), t.style.height = "auto";
|
|
2706
2740
|
let o = t.scrollHeight;
|
|
2707
|
-
if (
|
|
2708
|
-
t.addEventListener("transitionend", i, { once: !0 }), t.style.height = "0px", t.style.transitionTimingFunction = "ease-out",
|
|
2741
|
+
if (Mt && requestAnimationFrame(() => {
|
|
2742
|
+
t.addEventListener("transitionend", i, { once: !0 }), t.style.height = "0px", t.style.transitionTimingFunction = "ease-out", Lr(t), requestAnimationFrame(() => t.style.height = o + "px");
|
|
2709
2743
|
}), r)
|
|
2710
2744
|
return r;
|
|
2711
|
-
},
|
|
2745
|
+
}, Dr = (t, e) => {
|
|
2712
2746
|
const r = (() => {
|
|
2713
2747
|
if (!e)
|
|
2714
2748
|
return new Promise((n) => {
|
|
2715
2749
|
e = n;
|
|
2716
2750
|
});
|
|
2717
|
-
})(), i =
|
|
2718
|
-
|
|
2751
|
+
})(), i = ji(e);
|
|
2752
|
+
Cr(t);
|
|
2719
2753
|
let o = t.scrollHeight;
|
|
2720
|
-
if (
|
|
2721
|
-
t.addEventListener("transitionend", i, { once: !0 }), t.style.height = o + "px", t.style.transitionTimingFunction = "ease-in",
|
|
2754
|
+
if (Mt && requestAnimationFrame(() => {
|
|
2755
|
+
t.addEventListener("transitionend", i, { once: !0 }), t.style.height = o + "px", t.style.transitionTimingFunction = "ease-in", Lr(t), requestAnimationFrame(() => t.style.height = "0px");
|
|
2722
2756
|
}), r)
|
|
2723
2757
|
return r;
|
|
2724
|
-
},
|
|
2758
|
+
}, Yt = (t) => {
|
|
2725
2759
|
const e = {};
|
|
2726
2760
|
for (const [r, i] of Object.entries(t))
|
|
2727
2761
|
for (const o of r.split(" "))
|
|
2728
2762
|
e[o] = i;
|
|
2729
|
-
return
|
|
2763
|
+
return Zt(e);
|
|
2730
2764
|
}, le = {
|
|
2731
2765
|
success: "success",
|
|
2732
2766
|
error: "error",
|
|
2733
2767
|
warning: "warning"
|
|
2734
2768
|
};
|
|
2735
|
-
class
|
|
2769
|
+
class Dt extends B {
|
|
2736
2770
|
constructor() {
|
|
2737
2771
|
super(), this.id = Date.now().toString(36) + Math.random().toString(36).slice(2, 5), this.type = "success", this.text = "", this.canclose = !1;
|
|
2738
2772
|
}
|
|
@@ -2743,10 +2777,10 @@ class Tt extends q {
|
|
|
2743
2777
|
super.disconnectedCallback();
|
|
2744
2778
|
}
|
|
2745
2779
|
updated() {
|
|
2746
|
-
!this._expanded && this._wrapper &&
|
|
2780
|
+
!this._expanded && this._wrapper && Tr(this._wrapper, () => this._expanded = !0);
|
|
2747
2781
|
}
|
|
2748
2782
|
get _primaryClasses() {
|
|
2749
|
-
return
|
|
2783
|
+
return Yt({
|
|
2750
2784
|
[Y.toast]: !0,
|
|
2751
2785
|
[Y.positive]: this.type === le.success,
|
|
2752
2786
|
[Y.warning]: this.type === le.warning,
|
|
@@ -2754,7 +2788,7 @@ class Tt extends q {
|
|
|
2754
2788
|
});
|
|
2755
2789
|
}
|
|
2756
2790
|
get _iconClasses() {
|
|
2757
|
-
return
|
|
2791
|
+
return Yt({
|
|
2758
2792
|
[Y.icon]: !0,
|
|
2759
2793
|
[Y.iconPositive]: this.type == le.success,
|
|
2760
2794
|
[Y.iconWarning]: this.type === le.warning,
|
|
@@ -2782,7 +2816,7 @@ class Tt extends q {
|
|
|
2782
2816
|
}
|
|
2783
2817
|
async collapse() {
|
|
2784
2818
|
return new Promise((e) => {
|
|
2785
|
-
this._expanded && this._wrapper ?
|
|
2819
|
+
this._expanded && this._wrapper ? Dr(this._wrapper, e) : e();
|
|
2786
2820
|
});
|
|
2787
2821
|
}
|
|
2788
2822
|
close() {
|
|
@@ -2812,21 +2846,21 @@ class Tt extends q {
|
|
|
2812
2846
|
</section>` : m``;
|
|
2813
2847
|
}
|
|
2814
2848
|
}
|
|
2815
|
-
T(
|
|
2816
|
-
|
|
2849
|
+
T(Dt, "styles", [
|
|
2850
|
+
B.styles,
|
|
2817
2851
|
se`
|
|
2818
2852
|
:host {
|
|
2819
2853
|
display: block;
|
|
2820
2854
|
}
|
|
2821
2855
|
`
|
|
2822
|
-
]), T(
|
|
2856
|
+
]), T(Dt, "properties", {
|
|
2823
2857
|
id: { type: String, attribute: !0, reflect: !0 },
|
|
2824
2858
|
type: { type: String, attribute: !0, reflect: !0 },
|
|
2825
2859
|
text: { type: String, attribute: !0, reflect: !0 },
|
|
2826
2860
|
canclose: { type: Boolean, attribute: !0, reflect: !0 }
|
|
2827
2861
|
});
|
|
2828
|
-
customElements.get("w-toast") || customElements.define("w-toast",
|
|
2829
|
-
class
|
|
2862
|
+
customElements.get("w-toast") || customElements.define("w-toast", Dt);
|
|
2863
|
+
class Ot extends B {
|
|
2830
2864
|
constructor() {
|
|
2831
2865
|
super(), this._toasts = /* @__PURE__ */ new Map();
|
|
2832
2866
|
}
|
|
@@ -2906,7 +2940,7 @@ class Dt extends q {
|
|
|
2906
2940
|
return m`
|
|
2907
2941
|
<aside class="${ct.container}">
|
|
2908
2942
|
<div class="${ct.toaster}" id="w-toast-container-list">
|
|
2909
|
-
${
|
|
2943
|
+
${er(
|
|
2910
2944
|
this._toastsArray,
|
|
2911
2945
|
(e) => e.id,
|
|
2912
2946
|
(e) => m` <w-toast
|
|
@@ -2924,18 +2958,18 @@ class Dt extends q {
|
|
|
2924
2958
|
`;
|
|
2925
2959
|
}
|
|
2926
2960
|
}
|
|
2927
|
-
T(
|
|
2928
|
-
|
|
2961
|
+
T(Ot, "styles", [
|
|
2962
|
+
B.styles,
|
|
2929
2963
|
se`
|
|
2930
2964
|
:host {
|
|
2931
2965
|
display: block;
|
|
2932
2966
|
}
|
|
2933
2967
|
`
|
|
2934
|
-
]), T(
|
|
2968
|
+
]), T(Ot, "properties", {
|
|
2935
2969
|
_toasts: { state: !0 }
|
|
2936
2970
|
});
|
|
2937
|
-
customElements.get("w-toast-container") || customElements.define("w-toast-container",
|
|
2938
|
-
class
|
|
2971
|
+
customElements.get("w-toast-container") || customElements.define("w-toast-container", Ot);
|
|
2972
|
+
class Bt extends B {
|
|
2939
2973
|
constructor() {
|
|
2940
2974
|
super(), this.show = !1, this._mounted = !1, this._removeElement = !1;
|
|
2941
2975
|
}
|
|
@@ -2948,7 +2982,7 @@ class Ot extends q {
|
|
|
2948
2982
|
this._mounted = !0;
|
|
2949
2983
|
return;
|
|
2950
2984
|
}
|
|
2951
|
-
this.show &&
|
|
2985
|
+
this.show && Tr(this._wrapper), !this.show && !this._removeElement && Dr(this._wrapper, () => this._removeElement = !0);
|
|
2952
2986
|
}
|
|
2953
2987
|
}
|
|
2954
2988
|
get _wrapper() {
|
|
@@ -2960,22 +2994,22 @@ class Ot extends q {
|
|
|
2960
2994
|
</div>`;
|
|
2961
2995
|
}
|
|
2962
2996
|
}
|
|
2963
|
-
T(
|
|
2997
|
+
T(Bt, "properties", {
|
|
2964
2998
|
show: {
|
|
2965
2999
|
type: Boolean,
|
|
2966
3000
|
reflect: !0
|
|
2967
3001
|
},
|
|
2968
3002
|
_removeElement: { type: Boolean, state: !0 }
|
|
2969
|
-
}), T(
|
|
2970
|
-
|
|
3003
|
+
}), T(Bt, "styles", [
|
|
3004
|
+
B.styles,
|
|
2971
3005
|
se`
|
|
2972
3006
|
:host {
|
|
2973
3007
|
display: block;
|
|
2974
3008
|
}
|
|
2975
3009
|
`
|
|
2976
3010
|
]);
|
|
2977
|
-
customElements.get("w-expand-transition") || customElements.define("w-expand-transition",
|
|
2978
|
-
class qt extends
|
|
3011
|
+
customElements.get("w-expand-transition") || customElements.define("w-expand-transition", Bt);
|
|
3012
|
+
class qt extends B {
|
|
2979
3013
|
get _markup() {
|
|
2980
3014
|
return `<h${this.level}
|
|
2981
3015
|
style="margin: 0; font-weight: unset; font-size: unset; line-height: unset;"
|
|
@@ -2985,31 +3019,31 @@ class qt extends q {
|
|
|
2985
3019
|
`;
|
|
2986
3020
|
}
|
|
2987
3021
|
render() {
|
|
2988
|
-
return this.level ?
|
|
3022
|
+
return this.level ? tr(this._markup) : m`<slot></slot>`;
|
|
2989
3023
|
}
|
|
2990
3024
|
}
|
|
2991
3025
|
T(qt, "properties", {
|
|
2992
3026
|
level: { type: Number }
|
|
2993
|
-
}), T(qt, "styles", [
|
|
3027
|
+
}), T(qt, "styles", [B.styles]);
|
|
2994
3028
|
customElements.get("w-unstyled-heading") || customElements.define("w-unstyled-heading", qt);
|
|
2995
3029
|
export {
|
|
2996
|
-
|
|
3030
|
+
Bt as ExpandTransition,
|
|
2997
3031
|
qt as UnstyledHeading,
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3032
|
+
pt as WarpAffix,
|
|
3033
|
+
ft as WarpAlert,
|
|
3034
|
+
xt as WarpAttention,
|
|
3035
|
+
wt as WarpBadge,
|
|
3036
|
+
_t as WarpBox,
|
|
3037
|
+
kt as WarpBreadcrumbs,
|
|
3038
|
+
St as WarpBroadcast,
|
|
3005
3039
|
je as WarpButton,
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3040
|
+
Et as WarpCard,
|
|
3041
|
+
Ct as WarpExpandable,
|
|
3042
|
+
Lt as WarpSelect,
|
|
3043
|
+
Tt as WarpTextField,
|
|
3044
|
+
Dt as WarpToast,
|
|
3045
|
+
Ot as WarpToastContainer,
|
|
3046
|
+
eo as removeToast,
|
|
3047
|
+
Zi as toast,
|
|
3048
|
+
to as updateToast
|
|
3015
3049
|
};
|