@authhero/widget 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -1
- package/dist/authhero-widget/authhero-widget.esm.js +1 -1
- package/dist/authhero-widget/index.esm.js +1 -1
- package/dist/authhero-widget/p-7989dabd.entry.js +1 -0
- package/dist/authhero-widget/{p-Doiemx6o.js → p-bMtPc5Dm.js} +1 -1
- package/dist/authhero-widget/p-fa60ab6e.entry.js +1 -0
- package/dist/cjs/authhero-node.cjs.entry.js +97 -9
- package/dist/cjs/authhero-widget.cjs.entry.js +82 -18
- package/dist/cjs/authhero-widget.cjs.js +2 -2
- package/dist/cjs/{index-D0xitTOL.js → index-Db4bZu99.js} +28 -3
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/authhero-node/authhero-node.css +237 -94
- package/dist/collection/components/authhero-node/authhero-node.js +101 -8
- package/dist/collection/components/authhero-widget/authhero-widget.css +128 -70
- package/dist/collection/components/authhero-widget/authhero-widget.js +30 -5
- package/dist/collection/utils/branding.js +52 -13
- package/dist/components/authhero-node.js +1 -1
- package/dist/components/authhero-widget.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-pupmqprs.js +1 -0
- package/dist/components/p-uIy4ySa4.js +1 -0
- package/dist/esm/authhero-node.entry.js +97 -9
- package/dist/esm/authhero-widget.entry.js +82 -18
- package/dist/esm/authhero-widget.js +3 -3
- package/dist/esm/{index-Doiemx6o.js → index-bMtPc5Dm.js} +28 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/authhero-node/authhero-node.d.ts +14 -1
- package/dist/types/components/authhero-widget/authhero-widget.d.ts +8 -0
- package/hydrate/index.js +207 -29
- package/hydrate/index.mjs +207 -29
- package/package.json +10 -4
- package/dist/authhero-widget/p-2e93c814.entry.js +0 -1
- package/dist/authhero-widget/p-539fc666.entry.js +0 -1
- package/dist/collection/server/index.js +0 -453
- package/dist/components/p-086EZrPM.js +0 -1
- package/dist/components/p-DS6y_iDJ.js +0 -1
- package/dist/types/server/index.d.ts +0 -85
|
@@ -1,453 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hono SSR Helper for AuthHero Widget
|
|
3
|
-
*
|
|
4
|
-
* This module provides utilities for server-side rendering
|
|
5
|
-
* the AuthHero widget in Hono applications.
|
|
6
|
-
*/
|
|
7
|
-
/**
|
|
8
|
-
* Creates a basic login screen configuration using the new UiScreen format.
|
|
9
|
-
*/
|
|
10
|
-
export function createLoginScreen(options) {
|
|
11
|
-
const components = [];
|
|
12
|
-
let order = 0;
|
|
13
|
-
// Email field
|
|
14
|
-
components.push({
|
|
15
|
-
id: "email",
|
|
16
|
-
category: "FIELD",
|
|
17
|
-
type: "EMAIL",
|
|
18
|
-
order: order++,
|
|
19
|
-
label: "Email address",
|
|
20
|
-
required: true,
|
|
21
|
-
visible: true,
|
|
22
|
-
config: {
|
|
23
|
-
placeholder: "you@example.com",
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
// Password field
|
|
27
|
-
components.push({
|
|
28
|
-
id: "password",
|
|
29
|
-
category: "FIELD",
|
|
30
|
-
type: "PASSWORD",
|
|
31
|
-
order: order++,
|
|
32
|
-
label: "Password",
|
|
33
|
-
required: true,
|
|
34
|
-
visible: true,
|
|
35
|
-
config: {
|
|
36
|
-
placeholder: "Enter your password",
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
// Submit button
|
|
40
|
-
components.push({
|
|
41
|
-
id: "submit",
|
|
42
|
-
category: "BLOCK",
|
|
43
|
-
type: "NEXT_BUTTON",
|
|
44
|
-
order: order++,
|
|
45
|
-
visible: true,
|
|
46
|
-
config: {
|
|
47
|
-
text: "Sign in",
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
// Add social providers if specified
|
|
51
|
-
if (options.showSocialProviders?.length) {
|
|
52
|
-
components.push({
|
|
53
|
-
id: "divider",
|
|
54
|
-
category: "BLOCK",
|
|
55
|
-
type: "DIVIDER",
|
|
56
|
-
order: order++,
|
|
57
|
-
visible: true,
|
|
58
|
-
});
|
|
59
|
-
components.push({
|
|
60
|
-
id: "social",
|
|
61
|
-
category: "FIELD",
|
|
62
|
-
type: "SOCIAL",
|
|
63
|
-
order: order++,
|
|
64
|
-
visible: true,
|
|
65
|
-
config: {
|
|
66
|
-
providers: options.showSocialProviders,
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
const links = [];
|
|
71
|
-
if (options.showForgotPassword !== false) {
|
|
72
|
-
links.push({
|
|
73
|
-
text: "Forgot your password?",
|
|
74
|
-
href: "/forgot-password",
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
if (options.showSignUp !== false) {
|
|
78
|
-
links.push({
|
|
79
|
-
text: "Don't have an account?",
|
|
80
|
-
href: "/signup",
|
|
81
|
-
linkText: "Sign up",
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
return {
|
|
85
|
-
title: options.title || "Sign in to your account",
|
|
86
|
-
action: options.action,
|
|
87
|
-
method: "POST",
|
|
88
|
-
components,
|
|
89
|
-
links,
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Creates an identifier-first screen (email first, then password or social)
|
|
94
|
-
*/
|
|
95
|
-
export function createIdentifierScreen(options) {
|
|
96
|
-
const components = [];
|
|
97
|
-
let order = 0;
|
|
98
|
-
// Add logo if provided
|
|
99
|
-
if (options.logoUrl) {
|
|
100
|
-
components.push({
|
|
101
|
-
id: "logo",
|
|
102
|
-
category: "BLOCK",
|
|
103
|
-
type: "IMAGE",
|
|
104
|
-
order: order++,
|
|
105
|
-
visible: true,
|
|
106
|
-
config: {
|
|
107
|
-
src: options.logoUrl,
|
|
108
|
-
alt: `${options.tenantName || "Company"} Logo`,
|
|
109
|
-
},
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
// Email input
|
|
113
|
-
components.push({
|
|
114
|
-
id: "email",
|
|
115
|
-
category: "FIELD",
|
|
116
|
-
type: "EMAIL",
|
|
117
|
-
order: order++,
|
|
118
|
-
label: "Email",
|
|
119
|
-
required: true,
|
|
120
|
-
visible: true,
|
|
121
|
-
config: {
|
|
122
|
-
placeholder: "Your email address",
|
|
123
|
-
},
|
|
124
|
-
});
|
|
125
|
-
// Continue button
|
|
126
|
-
components.push({
|
|
127
|
-
id: "submit",
|
|
128
|
-
category: "BLOCK",
|
|
129
|
-
type: "NEXT_BUTTON",
|
|
130
|
-
order: order++,
|
|
131
|
-
visible: true,
|
|
132
|
-
config: {
|
|
133
|
-
text: "Continue",
|
|
134
|
-
},
|
|
135
|
-
});
|
|
136
|
-
// Add social providers if specified
|
|
137
|
-
if (options.showSocialProviders?.length) {
|
|
138
|
-
components.push({
|
|
139
|
-
id: "divider",
|
|
140
|
-
category: "BLOCK",
|
|
141
|
-
type: "DIVIDER",
|
|
142
|
-
order: order++,
|
|
143
|
-
visible: true,
|
|
144
|
-
});
|
|
145
|
-
components.push({
|
|
146
|
-
id: "social",
|
|
147
|
-
category: "FIELD",
|
|
148
|
-
type: "SOCIAL",
|
|
149
|
-
order: order++,
|
|
150
|
-
visible: true,
|
|
151
|
-
config: {
|
|
152
|
-
providers: options.showSocialProviders,
|
|
153
|
-
},
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
const links = [];
|
|
157
|
-
if (options.showSignUp !== false) {
|
|
158
|
-
links.push({
|
|
159
|
-
text: "Don't have an account?",
|
|
160
|
-
href: options.signUpUrl || "/signup",
|
|
161
|
-
linkText: "Get started",
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
return {
|
|
165
|
-
title: options.title || `Sign in to ${options.tenantName || "your account"}`,
|
|
166
|
-
action: options.action,
|
|
167
|
-
method: "POST",
|
|
168
|
-
components,
|
|
169
|
-
links,
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Creates a registration screen configuration
|
|
174
|
-
*/
|
|
175
|
-
export function createSignupScreen(options) {
|
|
176
|
-
const defaultFields = [
|
|
177
|
-
{ name: "email", type: "email", label: "Email address", required: true },
|
|
178
|
-
{ name: "password", type: "password", label: "Password", required: true },
|
|
179
|
-
{
|
|
180
|
-
name: "password_confirm",
|
|
181
|
-
type: "password",
|
|
182
|
-
label: "Confirm password",
|
|
183
|
-
required: true,
|
|
184
|
-
},
|
|
185
|
-
];
|
|
186
|
-
const fields = options.fields || defaultFields;
|
|
187
|
-
const components = [];
|
|
188
|
-
let order = 0;
|
|
189
|
-
// Map fields to components
|
|
190
|
-
fields.forEach((field) => {
|
|
191
|
-
const fieldType = field.type || "text";
|
|
192
|
-
if (fieldType === "email") {
|
|
193
|
-
components.push({
|
|
194
|
-
id: field.name,
|
|
195
|
-
category: "FIELD",
|
|
196
|
-
type: "EMAIL",
|
|
197
|
-
order: order++,
|
|
198
|
-
label: field.label,
|
|
199
|
-
required: field.required ?? true,
|
|
200
|
-
visible: true,
|
|
201
|
-
config: {
|
|
202
|
-
placeholder: field.placeholder,
|
|
203
|
-
},
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
else if (fieldType === "password") {
|
|
207
|
-
components.push({
|
|
208
|
-
id: field.name,
|
|
209
|
-
category: "FIELD",
|
|
210
|
-
type: "PASSWORD",
|
|
211
|
-
order: order++,
|
|
212
|
-
label: field.label,
|
|
213
|
-
required: field.required ?? true,
|
|
214
|
-
visible: true,
|
|
215
|
-
config: {
|
|
216
|
-
placeholder: field.placeholder,
|
|
217
|
-
},
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
else {
|
|
221
|
-
components.push({
|
|
222
|
-
id: field.name,
|
|
223
|
-
category: "FIELD",
|
|
224
|
-
type: "TEXT",
|
|
225
|
-
order: order++,
|
|
226
|
-
label: field.label,
|
|
227
|
-
required: field.required ?? true,
|
|
228
|
-
visible: true,
|
|
229
|
-
config: {
|
|
230
|
-
placeholder: field.placeholder,
|
|
231
|
-
},
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
// Submit button
|
|
236
|
-
components.push({
|
|
237
|
-
id: "submit",
|
|
238
|
-
category: "BLOCK",
|
|
239
|
-
type: "NEXT_BUTTON",
|
|
240
|
-
order: order++,
|
|
241
|
-
visible: true,
|
|
242
|
-
config: {
|
|
243
|
-
text: "Create account",
|
|
244
|
-
},
|
|
245
|
-
});
|
|
246
|
-
// Add social providers if specified
|
|
247
|
-
if (options.showSocialProviders?.length) {
|
|
248
|
-
components.push({
|
|
249
|
-
id: "divider",
|
|
250
|
-
category: "BLOCK",
|
|
251
|
-
type: "DIVIDER",
|
|
252
|
-
order: order++,
|
|
253
|
-
visible: true,
|
|
254
|
-
});
|
|
255
|
-
components.push({
|
|
256
|
-
id: "social",
|
|
257
|
-
category: "FIELD",
|
|
258
|
-
type: "SOCIAL",
|
|
259
|
-
order: order++,
|
|
260
|
-
visible: true,
|
|
261
|
-
config: {
|
|
262
|
-
providers: options.showSocialProviders,
|
|
263
|
-
},
|
|
264
|
-
});
|
|
265
|
-
}
|
|
266
|
-
const links = [];
|
|
267
|
-
if (options.showLogin !== false) {
|
|
268
|
-
links.push({
|
|
269
|
-
text: "Already have an account?",
|
|
270
|
-
href: "/login",
|
|
271
|
-
linkText: "Sign in",
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
return {
|
|
275
|
-
title: options.title || "Create your account",
|
|
276
|
-
action: options.action,
|
|
277
|
-
method: "POST",
|
|
278
|
-
components,
|
|
279
|
-
links,
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* Creates an MFA verification screen
|
|
284
|
-
*/
|
|
285
|
-
export function createMfaScreen(options) {
|
|
286
|
-
const components = [];
|
|
287
|
-
let order = 0;
|
|
288
|
-
const description = options.method === "sms"
|
|
289
|
-
? "Enter the code sent to your phone"
|
|
290
|
-
: options.method === "email"
|
|
291
|
-
? "Enter the code sent to your email"
|
|
292
|
-
: "Enter the code from your authenticator app";
|
|
293
|
-
// Description text
|
|
294
|
-
components.push({
|
|
295
|
-
id: "description",
|
|
296
|
-
category: "BLOCK",
|
|
297
|
-
type: "RICH_TEXT",
|
|
298
|
-
order: order++,
|
|
299
|
-
visible: true,
|
|
300
|
-
config: {
|
|
301
|
-
content: `<p>${description}</p>`,
|
|
302
|
-
},
|
|
303
|
-
});
|
|
304
|
-
// Code input
|
|
305
|
-
components.push({
|
|
306
|
-
id: "code",
|
|
307
|
-
category: "FIELD",
|
|
308
|
-
type: "TEXT",
|
|
309
|
-
order: order++,
|
|
310
|
-
label: "Verification code",
|
|
311
|
-
required: true,
|
|
312
|
-
visible: true,
|
|
313
|
-
config: {
|
|
314
|
-
placeholder: "000000",
|
|
315
|
-
max_length: options.codeLength || 6,
|
|
316
|
-
},
|
|
317
|
-
});
|
|
318
|
-
// Submit button
|
|
319
|
-
components.push({
|
|
320
|
-
id: "submit",
|
|
321
|
-
category: "BLOCK",
|
|
322
|
-
type: "NEXT_BUTTON",
|
|
323
|
-
order: order++,
|
|
324
|
-
visible: true,
|
|
325
|
-
config: {
|
|
326
|
-
text: "Verify",
|
|
327
|
-
},
|
|
328
|
-
});
|
|
329
|
-
return {
|
|
330
|
-
title: options.title || "Two-factor authentication",
|
|
331
|
-
action: options.action,
|
|
332
|
-
method: "POST",
|
|
333
|
-
components,
|
|
334
|
-
links: [
|
|
335
|
-
{
|
|
336
|
-
text: "Back to login",
|
|
337
|
-
href: "/login",
|
|
338
|
-
},
|
|
339
|
-
],
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Creates a password reset request screen
|
|
344
|
-
*/
|
|
345
|
-
export function createForgotPasswordScreen(options) {
|
|
346
|
-
const components = [];
|
|
347
|
-
let order = 0;
|
|
348
|
-
// Description text
|
|
349
|
-
components.push({
|
|
350
|
-
id: "description",
|
|
351
|
-
category: "BLOCK",
|
|
352
|
-
type: "RICH_TEXT",
|
|
353
|
-
order: order++,
|
|
354
|
-
visible: true,
|
|
355
|
-
config: {
|
|
356
|
-
content: "<p>Enter your email address and we'll send you a link to reset your password.</p>",
|
|
357
|
-
},
|
|
358
|
-
});
|
|
359
|
-
// Email input
|
|
360
|
-
components.push({
|
|
361
|
-
id: "email",
|
|
362
|
-
category: "FIELD",
|
|
363
|
-
type: "EMAIL",
|
|
364
|
-
order: order++,
|
|
365
|
-
label: "Email address",
|
|
366
|
-
required: true,
|
|
367
|
-
visible: true,
|
|
368
|
-
});
|
|
369
|
-
// Submit button
|
|
370
|
-
components.push({
|
|
371
|
-
id: "submit",
|
|
372
|
-
category: "BLOCK",
|
|
373
|
-
type: "NEXT_BUTTON",
|
|
374
|
-
order: order++,
|
|
375
|
-
visible: true,
|
|
376
|
-
config: {
|
|
377
|
-
text: "Send reset link",
|
|
378
|
-
},
|
|
379
|
-
});
|
|
380
|
-
return {
|
|
381
|
-
title: options.title || "Reset your password",
|
|
382
|
-
action: options.action,
|
|
383
|
-
method: "POST",
|
|
384
|
-
components,
|
|
385
|
-
links: [
|
|
386
|
-
{
|
|
387
|
-
text: "Back to login",
|
|
388
|
-
href: "/login",
|
|
389
|
-
},
|
|
390
|
-
],
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
/**
|
|
394
|
-
* Adds an error message to a screen
|
|
395
|
-
*/
|
|
396
|
-
export function withError(screen, error) {
|
|
397
|
-
return {
|
|
398
|
-
...screen,
|
|
399
|
-
messages: [...(screen.messages || []), { text: error, type: "error" }],
|
|
400
|
-
};
|
|
401
|
-
}
|
|
402
|
-
/**
|
|
403
|
-
* Adds a success message to a screen
|
|
404
|
-
*/
|
|
405
|
-
export function withSuccess(screen, success) {
|
|
406
|
-
return {
|
|
407
|
-
...screen,
|
|
408
|
-
messages: [...(screen.messages || []), { text: success, type: "success" }],
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
/**
|
|
412
|
-
* Recursively add an error message to a component by ID.
|
|
413
|
-
* Handles nested components if they have a 'components' or 'children' property.
|
|
414
|
-
*/
|
|
415
|
-
function addErrorToComponent(component, componentId, error) {
|
|
416
|
-
// Check if this is the target component
|
|
417
|
-
if (component.id === componentId) {
|
|
418
|
-
return {
|
|
419
|
-
...component,
|
|
420
|
-
messages: [
|
|
421
|
-
...(component.messages ||
|
|
422
|
-
[]),
|
|
423
|
-
{ text: error, type: "error" },
|
|
424
|
-
],
|
|
425
|
-
};
|
|
426
|
-
}
|
|
427
|
-
// Check for nested components (new format might use 'components')
|
|
428
|
-
const componentWithChildren = component;
|
|
429
|
-
if (componentWithChildren.components?.length) {
|
|
430
|
-
return {
|
|
431
|
-
...component,
|
|
432
|
-
components: componentWithChildren.components.map((child) => addErrorToComponent(child, componentId, error)),
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
// Check for nested children (deprecated UINode format)
|
|
436
|
-
if (componentWithChildren.children?.length) {
|
|
437
|
-
return {
|
|
438
|
-
...component,
|
|
439
|
-
children: componentWithChildren.children.map((child) => addErrorToComponent(child, componentId, error)),
|
|
440
|
-
};
|
|
441
|
-
}
|
|
442
|
-
return component;
|
|
443
|
-
}
|
|
444
|
-
/**
|
|
445
|
-
* Adds a field-level error to a specific component.
|
|
446
|
-
* Recursively searches nested components/children.
|
|
447
|
-
*/
|
|
448
|
-
export function withFieldError(screen, componentId, error) {
|
|
449
|
-
return {
|
|
450
|
-
...screen,
|
|
451
|
-
components: screen.components.map((component) => addErrorToComponent(component, componentId, error)),
|
|
452
|
-
};
|
|
453
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t,e,n,s,i,r,o,l,c,f,u,a,h,p,d,$,v,w,b,g=Object.create,m=Object.defineProperty,y=Object.getOwnPropertyDescriptor,S=Object.getOwnPropertyNames,O=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,M=t=>{throw TypeError(t)},E=(t,e)=>function(){return e||(0,t[S(t)[0]])((e={exports:{}}).exports,e),e.exports},k=(t,e,n)=>e.has(t)||M("Cannot "+n),x=(t,e,n)=>(k(t,e,"read from private field"),n?n.call(t):e.get(t)),N=(t,e,n)=>e.has(t)?M("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),P=(t,e,n)=>(k(t,e,"write to private field"),e.set(t,n),n),W=(t,e,n)=>(k(t,e,"access private method"),n),R=E({"node_modules/balanced-match/index.js"(t,e){function n(t,e,n){t instanceof RegExp&&(t=s(t,n)),e instanceof RegExp&&(e=s(e,n));var r=i(t,e,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+t.length,r[1]),post:n.slice(r[1]+e.length)}}function s(t,e){var n=e.match(t);return n?n[0]:null}function i(t,e,n){var s,i,r,o,l,c=n.indexOf(t),f=n.indexOf(e,c+1),u=c;if(c>=0&&f>0){if(t===e)return[c,f];for(s=[],r=n.length;u>=0&&!l;)u==c?(s.push(u),c=n.indexOf(t,u+1)):1==s.length?l=[s.pop(),f]:((i=s.pop())<r&&(r=i,o=f),f=n.indexOf(e,u+1)),u=c<f&&c>=0?c:f;s.length&&(l=[r,o])}return l}e.exports=n,n.range=i}}),A=E({"node_modules/brace-expansion/index.js"(t,e){var n=R();e.exports=function(t){return t?("{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2)),$(function(t){return t.split("\\\\").join(s).split("\\{").join(i).split("\\}").join(r).split("\\,").join(o).split("\\.").join(l)}(t),!0).map(f)):[]};var s="\0SLASH"+Math.random()+"\0",i="\0OPEN"+Math.random()+"\0",r="\0CLOSE"+Math.random()+"\0",o="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function f(t){return t.split(s).join("\\").split(i).join("{").split(r).join("}").split(o).join(",").split(l).join(".")}function u(t){if(!t)return[""];var e=[],s=n("{","}",t);if(!s)return t.split(",");var i=s.body,r=s.post,o=s.pre.split(",");o[o.length-1]+="{"+i+"}";var l=u(r);return r.length&&(o[o.length-1]+=l.shift(),o.push.apply(o,l)),e.push.apply(e,o),e}function a(t){return"{"+t+"}"}function h(t){return/^-?0\d/.test(t)}function p(t,e){return t<=e}function d(t,e){return t>=e}function $(t,e){var s=[],i=n("{","}",t);if(!i)return[t];var o=i.pre,l=i.post.length?$(i.post,!1):[""];if(/\$$/.test(i.pre))for(var f=0;f<l.length;f++)s.push(A=o+"{"+i.body+"}"+l[f]);else{var v,w,b=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),g=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),m=b||g,y=i.body.indexOf(",")>=0;if(!m&&!y)return i.post.match(/,(?!,).*\}/)?$(t=i.pre+"{"+i.body+r+i.post):[t];if(m)v=i.body.split(/\.\./);else if(1===(v=u(i.body)).length&&1===(v=$(v[0],!1).map(a)).length)return l.map((function(t){return i.pre+v[0]+t}));if(m){var S=c(v[0]),O=c(v[1]),j=Math.max(v[0].length,v[1].length),M=3==v.length?Math.abs(c(v[2])):1,E=p;O<S&&(M*=-1,E=d);var k=v.some(h);w=[];for(var x=S;E(x,O);x+=M){var N;if(g)"\\"===(N=String.fromCharCode(x))&&(N="");else if(N=String(x),k){var P=j-N.length;if(P>0){var W=new Array(P+1).join("0");N=x<0?"-"+W+N.slice(1):W+N}}w.push(N)}}else{w=[];for(var R=0;R<v.length;R++)w.push.apply(w,$(v[R],!1))}for(R=0;R<w.length;R++)for(f=0;f<l.length;f++){var A=o+w[R]+l[f];(!e||m||A)&&s.push(A)}}return s}}}),L=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(L||{}),C=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(C||{}),I="type",z="value",_="serialized:",T=(t,e)=>{var n;Object.entries(null!=(n=e.i.t)?n:{}).map((([n,[s]])=>{if(31&s||32&s){const s=t[n],i=function(t,e){for(;t;){const n=Object.getOwnPropertyDescriptor(t,e);if(null==n?void 0:n.get)return n;t=Object.getPrototypeOf(t)}}(Object.getPrototypeOf(t),n)||Object.getOwnPropertyDescriptor(t,n);i&&Object.defineProperty(t,n,{get(){return i.get.call(this)},set(t){i.set.call(this,t)},configurable:!0,enumerable:!0}),t[n]=e.o.has(n)?e.o.get(n):s}}))},D=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},U=(t,e)=>e in t,V=(t,e)=>(0,console.error)(t,e),B=new Map,F="s-id",G="sty-id",Z="c-id",H="undefined"!=typeof window?window:{},q=H.HTMLElement||class{},J={l:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)},Y=(()=>{try{return!!H.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),K=!!Y&&(()=>!!H.document&&Object.getOwnPropertyDescriptor(H.document.adoptedStyleSheets,"length").writable)(),Q=!1,X=[],tt=[],et=(t,e)=>n=>{t.push(n),Q||(Q=!0,e&&4&J.l?it(st):J.raf(st))},nt=t=>{for(let e=0;e<t.length;e++)try{t[e](performance.now())}catch(t){V(t)}t.length=0},st=()=>{nt(X),nt(tt),(Q=X.length>0)&&J.raf(st)},it=t=>Promise.resolve(undefined).then(t),rt=et(tt,!0),ot=t=>{const e=new URL(t,J.u);return e.origin!==H.location.origin?e.href:e.pathname},lt=t=>J.u=t,ct=t=>"object"==(t=typeof t)||"function"===t,ft=(e=null!=(t=A())?g(O(t)):{},((t,e,n,s)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let n of S(e))j.call(t,n)||undefined===n||m(t,n,{get:()=>e[n],enumerable:!(s=y(e,n))||s.enumerable});return t})(m(e,"default",{value:t,enumerable:!0}),t)),ut=t=>{if("string"!=typeof t)throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},at={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ht=t=>t.replace(/[[\]\\-]/g,"\\$&"),pt=t=>t.join(""),dt=(t,e)=>{const n=e;if("["!==t.charAt(n))throw new Error("not in a brace expression");const s=[],i=[];let r=n+1,o=!1,l=!1,c=!1,f=!1,u=n,a="";t:for(;r<t.length;){const e=t.charAt(r);if("!"!==e&&"^"!==e||r!==n+1){if("]"===e&&o&&!c){u=r+1;break}if(o=!0,"\\"!==e||c){if("["===e&&!c)for(const[e,[o,c,f]]of Object.entries(at))if(t.startsWith(e,r)){if(a)return["$.",!1,t.length-n,!0];r+=e.length,f?i.push(o):s.push(o),l=l||c;continue t}c=!1,a?(e>a?s.push(ht(a)+"-"+ht(e)):e===a&&s.push(ht(e)),a="",r++):t.startsWith("-]",r+1)?(s.push(ht(e+"-")),r+=2):t.startsWith("-",r+1)?(a=e,r+=2):(s.push(ht(e)),r++)}else c=!0,r++}else f=!0,r++}if(u<r)return["",!1,0,!1];if(!s.length&&!i.length)return["$.",!1,t.length-n,!0];if(0===i.length&&1===s.length&&/^\\?.$/.test(s[0])&&!f){return[(h=2===s[0].length?s[0].slice(-1):s[0],h.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,u-n,!1]}var h;const p="["+(f?"^":"")+pt(s)+"]",d="["+(f?"":"^")+pt(i)+"]";return[s.length&&i.length?"("+p+"|"+d+")":s.length?p:d,l,u-n,!0]},$t=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),vt=new Set(["!","?","+","*","@"]),wt=t=>vt.has(t),bt="(?!\\.)",gt=new Set(["[","."]),mt=new Set(["..","."]),yt=new Set("().*{}+?[]^$\\!"),St="[^/]",Ot=St+"*?",jt=St+"+?",Mt=class t{constructor(t,e,d={}){var $;N(this,p),((t,e,n)=>{e in t?m(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n})(this,"type"+"",$),N(this,n),N(this,s),N(this,i,!1),N(this,r,[]),N(this,o),N(this,l),N(this,c),N(this,f,!1),N(this,u),N(this,a),N(this,h,!1),this.type=t,t&&P(this,s,!0),P(this,o,e),P(this,n,x(this,o)?x(x(this,o),n):this),P(this,u,x(this,n)===this?d:x(x(this,n),u)),P(this,c,x(this,n)===this?[]:x(x(this,n),c)),"!"!==t||x(x(this,n),f)||x(this,c).push(this),P(this,l,x(this,o)?x(x(this,o),r).length:0)}get hasMagic(){if(void 0!==x(this,s))return x(this,s);for(const t of x(this,r))if("string"!=typeof t&&(t.type||t.hasMagic))return P(this,s,!0);return x(this,s)}toString(){return void 0!==x(this,a)?x(this,a):P(this,a,this.type?this.type+"("+x(this,r).map((t=>String(t))).join("|")+")":x(this,r).map((t=>String(t))).join(""))}push(...e){for(const n of e)if(""!==n){if("string"!=typeof n&&!(n instanceof t&&x(n,o)===this))throw new Error("invalid part: "+n);x(this,r).push(n)}}toJSON(){var t;const e=null===this.type?x(this,r).slice().map((t=>"string"==typeof t?t:t.toJSON())):[this.type,...x(this,r).map((t=>t.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===x(this,n)||x(x(this,n),f)&&"!"===(null==(t=x(this,o))?void 0:t.type))&&e.push({}),e}isStart(){var e;if(x(this,n)===this)return!0;if(!(null==(e=x(this,o))?void 0:e.isStart()))return!1;if(0===x(this,l))return!0;const s=x(this,o);for(let e=0;e<x(this,l);e++){const n=x(s,r)[e];if(!(n instanceof t&&"!"===n.type))return!1}return!0}isEnd(){var t,e,s;if(x(this,n)===this)return!0;if("!"===(null==(t=x(this,o))?void 0:t.type))return!0;if(!(null==(e=x(this,o))?void 0:e.isEnd()))return!1;if(!this.type)return null==(s=x(this,o))?void 0:s.isEnd();const i=x(this,o)?x(x(this,o),r).length:0;return x(this,l)===i-1}copyIn(t){this.push("string"==typeof t?t:t.clone(this))}clone(e){const n=new t(this.type,e);for(const t of x(this,r))n.copyIn(t);return n}static fromGlob(e,n={}){var s;const i=new t(null,void 0,n);return W(s=t,$,v).call(s,e,i,0,n),i}toMMPattern(){if(this!==x(this,n))return x(this,n).toMMPattern();const t=this.toString(),[e,i,r,o]=this.toRegExpSource();if(!(r||x(this,s)||x(this,u).nocase&&!x(this,u).nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return i;const l=(x(this,u).nocase?"i":"")+(o?"u":"");return Object.assign(new RegExp(`^${e}$`,l),{_src:e,_glob:t})}get options(){return x(this,u)}toRegExpSource(e){var l;const c=null!=e?e:!!x(this,u).dot;if(x(this,n)===this&&W(this,p,d).call(this),!this.type){const u=this.isStart()&&this.isEnd(),a=x(this,r).map((n=>{var r;const[o,l,c,f]="string"==typeof n?W(r=t,$,b).call(r,n,x(this,s),u):n.toRegExpSource(e);return P(this,s,x(this,s)||c),P(this,i,x(this,i)||f),o})).join("");let h="";if(this.isStart()&&"string"==typeof x(this,r)[0]&&(1!==x(this,r).length||!mt.has(x(this,r)[0]))){const t=gt,n=c&&t.has(a.charAt(0))||a.startsWith("\\.")&&t.has(a.charAt(2))||a.startsWith("\\.\\.")&&t.has(a.charAt(4)),s=!c&&!e&&t.has(a.charAt(0));h=n?"(?!(?:^|/)\\.\\.?(?:$|/))":s?bt:""}let p="";return this.isEnd()&&x(x(this,n),f)&&"!"===(null==(l=x(this,o))?void 0:l.type)&&(p="(?:$|\\/)"),[h+a+p,$t(a),P(this,s,!!x(this,s)),x(this,i)]}const a="*"===this.type||"+"===this.type,v="!"===this.type?"(?:(?!(?:":"(?:";let g=W(this,p,w).call(this,c);if(this.isStart()&&this.isEnd()&&!g&&"!"!==this.type){const t=this.toString();return P(this,r,[t]),this.type=null,P(this,s,void 0),[t,$t(this.toString()),!1,!1]}let m=!a||e||c?"":W(this,p,w).call(this,!0);m===g&&(m=""),m&&(g=`(?:${g})(?:${m})*?`);let y="";return y="!"===this.type&&x(this,h)?(this.isStart()&&!c?bt:"")+jt:v+g+("!"===this.type?"))"+(!this.isStart()||c||e?"":bt)+Ot+")":"@"===this.type?")":"?"===this.type?")?":"+"===this.type&&m?")":"*"===this.type&&m?")?":`)${this.type}`),[y,$t(g),P(this,s,!!x(this,s)),x(this,i)]}};n=new WeakMap,s=new WeakMap,i=new WeakMap,r=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,f=new WeakMap,u=new WeakMap,a=new WeakMap,h=new WeakMap,p=new WeakSet,d=function(){if(this!==x(this,n))throw new Error("should only call on root");if(x(this,f))return this;let t;for(this.toString(),P(this,f,!0);t=x(this,c).pop();){if("!"!==t.type)continue;let e=t,n=x(e,o);for(;n;){for(let s=x(e,l)+1;!n.type&&s<x(n,r).length;s++)for(const e of x(t,r)){if("string"==typeof e)throw new Error("string part in extglob AST??");e.copyIn(x(n,r)[s])}e=n,n=x(e,o)}}return this},$=new WeakSet,v=function(t,e,n,i){var o,l;let c=!1,f=!1,u=-1,a=!1;if(null===e.type){let s=n,r="";for(;s<t.length;){const n=t.charAt(s++);if(c||"\\"===n)c=!c,r+=n;else if(f)s===u+1?"^"!==n&&"!"!==n||(a=!0):"]"!==n||s===u+2&&a||(f=!1),r+=n;else if("["!==n)if(i.noext||!wt(n)||"("!==t.charAt(s))r+=n;else{e.push(r),r="";const l=new Mt(n,e);s=W(o=Mt,$,v).call(o,t,l,s,i),e.push(l)}else f=!0,u=s,a=!1,r+=n}return e.push(r),s}let p=n+1,d=new Mt(null,e);const w=[];let b="";for(;p<t.length;){const n=t.charAt(p++);if(c||"\\"===n)c=!c,b+=n;else if(f)p===u+1?"^"!==n&&"!"!==n||(a=!0):"]"!==n||p===u+2&&a||(f=!1),b+=n;else if("["!==n)if(wt(n)&&"("===t.charAt(p)){d.push(b),b="";const e=new Mt(n,d);d.push(e),p=W(l=Mt,$,v).call(l,t,e,p,i)}else if("|"!==n){if(")"===n)return""===b&&0===x(e,r).length&&P(e,h,!0),d.push(b),b="",e.push(...w,d),p;b+=n}else d.push(b),b="",w.push(d),d=new Mt(null,e);else f=!0,u=p,a=!1,b+=n}return e.type=null,P(e,s,void 0),P(e,r,[t.substring(n-1)]),p},w=function(t){return x(this,r).map((e=>{if("string"==typeof e)throw new Error("string type in extglob ast??");const[n,s,r,o]=e.toRegExpSource(t);return P(this,i,x(this,i)||o),n})).filter((t=>!(this.isStart()&&this.isEnd()&&!t))).join("|")},b=function(t,e,n=!1){let s=!1,i="",r=!1;for(let o=0;o<t.length;o++){const l=t.charAt(o);if(s)s=!1,i+=(yt.has(l)?"\\":"")+l;else if("\\"!==l){if("["===l){const[n,s,l,c]=dt(t,o);if(l){i+=n,r=r||s,o+=l-1,e=e||c;continue}}"*"!==l?"?"!==l?i+=l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(i+=St,e=!0):(i+=n&&"*"===t?jt:Ot,e=!0)}else o===t.length-1?i+="\\\\":s=!0}return[i,$t(t),!!e,r]},N(Mt,$);var Et=Mt,kt=(t,e,n={})=>(ut(e),!(!n.nocomment&&"#"===e.charAt(0))&&new Xt(e,n).match(t)),xt=/^\*+([^+@!?\*\[\(]*)$/,Nt=t=>e=>!e.startsWith(".")&&e.endsWith(t),Pt=t=>e=>e.endsWith(t),Wt=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Rt=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),At=/^\*+\.\*+$/,Lt=t=>!t.startsWith(".")&&t.includes("."),Ct=t=>"."!==t&&".."!==t&&t.includes("."),It=/^\.\*+$/,zt=t=>"."!==t&&".."!==t&&t.startsWith("."),_t=/^\*+$/,Tt=t=>0!==t.length&&!t.startsWith("."),Dt=t=>0!==t.length&&"."!==t&&".."!==t,Ut=/^\?+([^+@!?\*\[\(]*)?$/,Vt=([t,e=""])=>{const n=Zt([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Bt=([t,e=""])=>{const n=Ht([t]);return e?(e=e.toLowerCase(),t=>n(t)&&t.toLowerCase().endsWith(e)):n},Ft=([t,e=""])=>{const n=Ht([t]);return e?t=>n(t)&&t.endsWith(e):n},Gt=([t,e=""])=>{const n=Zt([t]);return e?t=>n(t)&&t.endsWith(e):n},Zt=([t])=>{const e=t.length;return t=>t.length===e&&!t.startsWith(".")},Ht=([t])=>{const e=t.length;return t=>t.length===e&&"."!==t&&".."!==t},qt="object"==typeof process&&process?"object"==typeof process.env&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix";kt.sep="win32"===qt?"\\":"/";var Jt=Symbol("globstar **");kt.GLOBSTAR=Jt,kt.filter=(t,e={})=>n=>kt(n,t,e);var Yt=(t,e={})=>Object.assign({},t,e);kt.defaults=t=>{if(!t||"object"!=typeof t||!Object.keys(t).length)return kt;const e=kt;return Object.assign(((n,s,i={})=>e(n,s,Yt(t,i))),{Minimatch:class extends e.Minimatch{constructor(e,n={}){super(e,Yt(t,n))}static defaults(n){return e.defaults(Yt(t,n)).Minimatch}},AST:class extends e.AST{constructor(e,n,s={}){super(e,n,Yt(t,s))}static fromGlob(n,s={}){return e.AST.fromGlob(n,Yt(t,s))}},unescape:(n,s={})=>e.unescape(n,Yt(t,s)),escape:(n,s={})=>e.escape(n,Yt(t,s)),filter:(n,s={})=>e.filter(n,Yt(t,s)),defaults:n=>e.defaults(Yt(t,n)),makeRe:(n,s={})=>e.makeRe(n,Yt(t,s)),braceExpand:(n,s={})=>e.braceExpand(n,Yt(t,s)),match:(n,s,i={})=>e.match(n,s,Yt(t,i)),sep:e.sep,GLOBSTAR:Jt})};var Kt=(t,e={})=>(ut(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,ft.default)(t));kt.braceExpand=Kt,kt.makeRe=(t,e={})=>new Xt(t,e).makeRe(),kt.match=(t,e,n={})=>{const s=new Xt(e,n);return t=t.filter((t=>s.match(t))),s.options.nonull&&!t.length&&t.push(e),t};var Qt=/[?*]|[+@!]\(.*?\)|\[|\]/,Xt=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(t,e={}){ut(t),this.options=e=e||{},this.pattern=t,this.platform=e.platform||qt,this.isWindows="win32"===this.platform,this.windowsPathsNoEscape=!!e.windowsPathsNoEscape||!1===e.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!e.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!e.nonegate,this.comment=!1,this.empty=!1,this.partial=!!e.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=void 0!==e.windowsNoMagicRoot?e.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const t of this.set)for(const e of t)if("string"!=typeof e)return!0;return!1}debug(...t){}make(){const t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],e.debug&&(this.debug=(...t)=>console.error(...t)),this.debug(this.pattern,this.globSet);const n=this.globSet.map((t=>this.slashSplit(t)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let s=this.globParts.map((t=>{if(this.isWindows&&this.windowsNoMagicRoot){const e=!(""!==t[0]||""!==t[1]||"?"!==t[2]&&Qt.test(t[2])||Qt.test(t[3])),n=/^[a-z]:/i.test(t[0]);if(e)return[...t.slice(0,4),...t.slice(4).map((t=>this.parse(t)))];if(n)return[t[0],...t.slice(1).map((t=>this.parse(t)))]}return t.map((t=>this.parse(t)))}));if(this.debug(this.pattern,s),this.set=s.filter((t=>-1===t.indexOf(!1))),this.isWindows)for(let t=0;t<this.set.length;t++){const e=this.set[t];""===e[0]&&""===e[1]&&"?"===this.globParts[t][2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])&&(e[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let e=0;e<t.length;e++)for(let n=0;n<t[e].length;n++)"**"===t[e][n]&&(t[e][n]="*");const{optimizationLevel:e=1}=this.options;return e>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):t=e>=1?this.levelOneOptimize(t):this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map((t=>{let e=-1;for(;-1!==(e=t.indexOf("**",e+1));){let n=e;for(;"**"===t[n+1];)n++;n!==e&&t.splice(e,n-e)}return t}))}levelOneOptimize(t){return t.map((t=>0===(t=t.reduce(((t,e)=>{const n=t[t.length-1];return"**"===e&&"**"===n?t:".."===e&&n&&".."!==n&&"."!==n&&"**"!==n?(t.pop(),t):(t.push(e),t)}),[])).length?[""]:t))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let e=!1;do{if(e=!1,!this.preserveMultipleSlashes){for(let n=1;n<t.length-1;n++){const s=t[n];1===n&&""===s&&""===t[0]||"."!==s&&""!==s||(e=!0,t.splice(n,1),n--)}"."!==t[0]||2!==t.length||"."!==t[1]&&""!==t[1]||(e=!0,t.pop())}let n=0;for(;-1!==(n=t.indexOf("..",n+1));){const s=t[n-1];s&&"."!==s&&".."!==s&&"**"!==s&&(e=!0,t.splice(n-1,2),n-=2)}}while(e);return 0===t.length?[""]:t}firstPhasePreProcess(t){let e=!1;do{e=!1;for(let n of t){let s=-1;for(;-1!==(s=n.indexOf("**",s+1));){let i=s;for(;"**"===n[i+1];)i++;i>s&&n.splice(s+1,i-s);const r=n[s+2],o=n[s+3];if(".."!==n[s+1])continue;if(!r||"."===r||".."===r||!o||"."===o||".."===o)continue;e=!0,n.splice(s,1);const l=n.slice(0);l[s]="**",t.push(l),s--}if(!this.preserveMultipleSlashes){for(let t=1;t<n.length-1;t++){const s=n[t];1===t&&""===s&&""===n[0]||"."!==s&&""!==s||(e=!0,n.splice(t,1),t--)}"."!==n[0]||2!==n.length||"."!==n[1]&&""!==n[1]||(e=!0,n.pop())}let i=0;for(;-1!==(i=n.indexOf("..",i+1));){const t=n[i-1];t&&"."!==t&&".."!==t&&"**"!==t&&(e=!0,n.splice(i-1,2,...1===i&&"**"===n[i+1]?["."]:[]),0===n.length&&n.push(""),i-=2)}}}while(e);return t}secondPhasePreProcess(t){for(let e=0;e<t.length-1;e++)for(let n=e+1;n<t.length;n++){const s=this.partsMatch(t[e],t[n],!this.preserveMultipleSlashes);s&&(t[e]=s,t[n]=[])}return t.filter((t=>t.length))}partsMatch(t,e,n=!1){let s=0,i=0,r=[],o="";for(;s<t.length&&i<e.length;)if(t[s]===e[i])r.push("b"===o?e[i]:t[s]),s++,i++;else if(n&&"**"===t[s]&&e[i]===t[s+1])r.push(t[s]),s++;else if(n&&"**"===e[i]&&t[s]===e[i+1])r.push(e[i]),i++;else if("*"!==t[s]||!e[i]||!this.options.dot&&e[i].startsWith(".")||"**"===e[i]){if("*"!==e[i]||!t[s]||!this.options.dot&&t[s].startsWith(".")||"**"===t[s])return!1;if("a"===o)return!1;o="b",r.push(e[i]),s++,i++}else{if("b"===o)return!1;o="a",r.push(t[s]),s++,i++}return t.length===e.length&&r}parseNegate(){if(this.nonegate)return;const t=this.pattern;let e=!1,n=0;for(let s=0;s<t.length&&"!"===t.charAt(s);s++)e=!e,n++;n&&(this.pattern=t.slice(n)),this.negate=e}matchOne(t,e,n=!1){const s=this.options;if(this.isWindows){const n="string"==typeof t[0]&&/^[a-z]:$/i.test(t[0]),s=!n&&""===t[0]&&""===t[1]&&"?"===t[2]&&/^[a-z]:$/i.test(t[3]),i="string"==typeof e[0]&&/^[a-z]:$/i.test(e[0]),r=s?3:n?0:void 0,o=!i&&""===e[0]&&""===e[1]&&"?"===e[2]&&"string"==typeof e[3]&&/^[a-z]:$/i.test(e[3])?3:i?0:void 0;if("number"==typeof r&&"number"==typeof o){const[n,s]=[t[r],e[o]];n.toLowerCase()===s.toLowerCase()&&(e[o]=n,o>r?e=e.slice(o):r>o&&(t=t.slice(r)))}}const{optimizationLevel:i=1}=this.options;i>=2&&(t=this.levelTwoFileOptimize(t)),this.debug("matchOne",this,{file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var r=0,o=0,l=t.length,c=e.length;r<l&&o<c;r++,o++){this.debug("matchOne loop");var f=e[o],u=t[r];if(this.debug(e,f,u),!1===f)return!1;if(f===Jt){this.debug("GLOBSTAR",[e,f,u]);var a=r,h=o+1;if(h===c){for(this.debug("** at the end");r<l;r++)if("."===t[r]||".."===t[r]||!s.dot&&"."===t[r].charAt(0))return!1;return!0}for(;a<l;){var p=t[a];if(this.debug("\nglobstar while",t,a,e,h,p),this.matchOne(t.slice(a),e.slice(h),n))return this.debug("globstar found match!",a,l,p),!0;if("."===p||".."===p||!s.dot&&"."===p.charAt(0)){this.debug("dot detected!",t,a,e,h);break}this.debug("globstar swallow a segment, and continue"),a++}return!(!n||(this.debug("\n>>> no match, partial?",t,a,e,h),a!==l))}let i;if("string"==typeof f?(i=u===f,this.debug("string match",f,u,i)):(i=f.test(u),this.debug("pattern match",f,u,i)),!i)return!1}if(r===l&&o===c)return!0;if(r===l)return n;if(o===c)return r===l-1&&""===t[r];throw new Error("wtf?")}braceExpand(){return Kt(this.pattern,this.options)}parse(t){ut(t);const e=this.options;if("**"===t)return Jt;if(""===t)return"";let n,s=null;(n=t.match(_t))?s=e.dot?Dt:Tt:(n=t.match(xt))?s=(e.nocase?e.dot?Rt:Wt:e.dot?Pt:Nt)(n[1]):(n=t.match(Ut))?s=(e.nocase?e.dot?Bt:Vt:e.dot?Ft:Gt)(n):(n=t.match(At))?s=e.dot?Ct:Lt:(n=t.match(It))&&(s=zt);const i=Et.fromGlob(t,this.options).toMMPattern();return s&&"object"==typeof i&&Reflect.defineProperty(i,"test",{value:s}),i}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;const t=this.set;if(!t.length)return this.regexp=!1,this.regexp;const e=this.options,n=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",s=new Set(e.nocase?["i"]:[]);let i=t.map((t=>{const e=t.map((t=>{if(t instanceof RegExp)for(const e of t.flags.split(""))s.add(e);return"string"==typeof t?t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):t===Jt?Jt:t._src}));return e.forEach(((t,s)=>{const i=e[s+1],r=e[s-1];t===Jt&&r!==Jt&&(void 0===r?void 0!==i&&i!==Jt?e[s+1]="(?:\\/|"+n+"\\/)?"+i:e[s]=n:void 0===i?e[s-1]=r+"(?:\\/|"+n+")?":i!==Jt&&(e[s-1]=r+"(?:\\/|\\/"+n+"\\/)"+i,e[s+1]=Jt))})),e.filter((t=>t!==Jt)).join("/")})).join("|");const[r,o]=t.length>1?["(?:",")"]:["",""];i="^"+r+i+o+"$",this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...s].join(""))}catch(t){this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,e=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;const n=this.options;this.isWindows&&(t=t.split("\\").join("/"));const s=this.slashSplit(t);this.debug(this.pattern,"split",s);const i=this.set;this.debug(this.pattern,"set",i);let r=s[s.length-1];if(!r)for(let t=s.length-2;!r&&t>=0;t--)r=s[t];for(let t=0;t<i.length;t++){const o=i[t];let l=s;if(n.matchBase&&1===o.length&&(l=[r]),this.matchOne(l,o,e))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(t){return kt.defaults(t).Minimatch}};kt.AST=Et,kt.Minimatch=Xt,kt.escape=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&"),kt.unescape=$t;var te=class t{static fromLocalValue(e){const n=e[I],s=z in e?e[z]:void 0;switch(n){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((e=>t.fromLocalValue(e)));case"date":return new Date(s);case"map":const e=new Map;for(const[n,i]of s){const s="object"==typeof n&&null!==n?t.fromLocalValue(n):n,r=t.fromLocalValue(i);e.set(s,r)}return e;case"object":const i={};for(const[e,n]of s)i[e]=t.fromLocalValue(n);return i;case"regexp":const{pattern:r,flags:o}=s;return new RegExp(r,o);case"set":const l=new Set;for(const e of s)l.add(t.fromLocalValue(e));return l;case"symbol":return Symbol(s);default:throw new Error(`Unsupported type: ${n}`)}}static fromLocalValueArray(e){return e.map((e=>t.fromLocalValue(e)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(I))return!1;const e=t[I];return!!Object.values({...L,...C}).includes(e)&&("null"===e||"undefined"===e||t.hasOwnProperty(z))}};((t,e)=>{for(var n in e)m(t,n,{get:e[n],enumerable:!0})})({},{err:()=>ne,map:()=>se,ok:()=>ee,unwrap:()=>re,unwrapErr:()=>oe});var ee=t=>({isOk:!0,isErr:!1,value:t}),ne=t=>({isOk:!1,isErr:!0,value:t});function se(t,e){if(t.isOk){const n=e(t.value);return n instanceof Promise?n.then((t=>ee(t))):ee(n)}if(t.isErr)return ne(t.value);throw"should never get here"}var ie,re=t=>{if(t.isOk)return t.value;throw t.value},oe=t=>{if(t.isErr)return t.value;throw t.value};function le(){const t=this.attachShadow({mode:"open"});void 0===ie&&(ie=null),ie&&(K?t.adoptedStyleSheets.push(ie):t.adoptedStyleSheets=[...t.adoptedStyleSheets,ie])}function ce(t,e,n){let s,i=0,r=[];for(;i<t.length;i++){if(s=t[i],s["s-sr"]&&(!e||s["s-hn"]===e)&&(void 0===n||ue(s)===n)&&(r.push(s),void 0!==n))return r;r=[...r,...ce(s.childNodes,e,n)]}return r}var fe=(t,e,n,s)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const i=document.createTextNode("");if(i["s-nr"]=t,!e["s-cr"]||!e["s-cr"].parentNode)return;const r=e["s-cr"].parentNode,o=ae(r,"appendChild");if(void 0!==s){i["s-oo"]=s;const t=ae(r,"childNodes"),e=[i];t.forEach((t=>{t["s-nr"]&&e.push(t)})),e.sort(((t,e)=>!t["s-oo"]||t["s-oo"]<(e["s-oo"]||0)?-1:!e["s-oo"]||e["s-oo"]<t["s-oo"]?1:0)),e.forEach((t=>o.call(r,t)))}else o.call(r,i);t["s-ol"]=i,t["s-sh"]=e["s-hn"]},ue=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function ae(t,e){if("__"+e in t){const n=t["__"+e];return"function"!=typeof n?n:n.bind(t)}return"function"!=typeof t[e]?t[e]:t[e].bind(t)}var he=new WeakMap,pe=(t,e,n)=>{let s=B.get(t);Y&&n?(s=s||new CSSStyleSheet,"string"==typeof s?s=e:s.replaceSync(e)):s=e,B.set(t,s)},de=(t,e)=>{var n,s,i;const r=$e(e),o=B.get(r);if(!H.document)return r;if(t=11===t.nodeType?t:H.document,o)if("string"==typeof o){let i,l=he.get(t=t.head||t);l||he.set(t,l=new Set);const c=t.querySelector(`[${G}="${r}"]`);if(c)c.innerHTML=o;else if(!l.has(r)){i=H.document.createElement("style"),i.innerHTML=o;const c=null!=(n=J.h)?n:function(){var t,e,n;return null!=(n=null==(e=null==(t=H.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:e.getAttribute("content"))?n:void 0}();if(null!=c&&i.setAttribute("nonce",c),!(1&e.l))if("HEAD"===t.nodeName){const e=t.querySelectorAll("link[rel=preconnect]"),n=e.length>0?e[e.length-1].nextSibling:t.querySelector("style");t.insertBefore(i,(null==n?void 0:n.parentNode)===t?n:null)}else if("host"in t)if(Y){const e=new(null!=(s=t.defaultView)?s:t.ownerDocument.defaultView).CSSStyleSheet;e.replaceSync(o),K?t.adoptedStyleSheets.unshift(e):t.adoptedStyleSheets=[e,...t.adoptedStyleSheets]}else{const e=t.querySelector("style");e?e.innerHTML=o+e.innerHTML:t.prepend(i)}else t.append(i);1&e.l&&t.insertBefore(i,null),4&e.l&&(i.innerHTML+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),l&&l.add(r)}}else{let e=he.get(t);if(e||he.set(t,e=new Set),!e.has(r)){const n=null!=(i=t.defaultView)?i:t.ownerDocument.defaultView;let s;if(o.constructor===n.CSSStyleSheet)s=o;else{s=new n.CSSStyleSheet;for(let t=0;t<o.cssRules.length;t++)s.insertRule(o.cssRules[t].cssText,t)}K?t.adoptedStyleSheets.push(s):t.adoptedStyleSheets=[...t.adoptedStyleSheets,s],e.add(r)}}return r},$e=t=>"sc-"+t.p,ve=(t,e,...n)=>{let s=null,i=null,r=!1,o=!1;const l=[],c=e=>{for(let n=0;n<e.length;n++)s=e[n],Array.isArray(s)?c(s):null!=s&&"boolean"!=typeof s&&((r="function"!=typeof t&&!ct(s))&&(s=String(s)),r&&o?l[l.length-1].$+=s:l.push(r?we(null,s):s),o=r)};if(c(n),e){e.key&&(i=e.key);{const t=e.className||e.class;t&&(e.class="object"!=typeof t?t:Object.keys(t).filter((e=>t[e])).join(" "))}}const f=we(t,null);return f.v=e,l.length>0&&(f.m=l),f.S=i,f},we=(t,e)=>({l:0,O:t,$:e,j:null,m:null,v:null,S:null}),be={},ge=(t,e,n,s,i,r,o,l=[])=>{let c,f,u,a;if(1===r.nodeType){if(c=r.getAttribute(Z),c&&(f=c.split("."),f[0]===o||"0"===f[0])){u=ye({l:0,M:f[0],k:f[1],N:f[2],P:f[3],O:r.tagName.toLowerCase(),j:r,v:{class:r.className||""}}),e.push(u),r.removeAttribute(Z),t.m||(t.m=[]);const i=u.j.getAttribute("s-sn");"string"==typeof i&&("slot-fb"===u.O&&Se(i,f[2],u,r,t,e,n,s,l),u.j["s-sn"]=i,u.j.removeAttribute("s-sn")),void 0!==u.P&&(t.m[u.P]=u),t=u,s&&"0"===u.N&&(s[u.P]=u.j)}if(r.shadowRoot)for(a=r.shadowRoot.childNodes.length-1;a>=0;a--)ge(t,e,n,s,i,r.shadowRoot.childNodes[a],o,l);const h=r.__childNodes||r.childNodes;for(a=h.length-1;a>=0;a--)ge(t,e,n,s,i,h[a],o,l)}else if(8===r.nodeType)f=r.nodeValue.split("."),(f[1]===o||"0"===f[1])&&(c=f[0],u=ye({M:f[1],k:f[2],N:f[3],P:f[4]||"0",j:r,v:null,m:null,S:null,W:null,O:null,$:null}),"t"===c?(u.j=je(r,3),u.j&&3===u.j.nodeType&&(u.$=u.j.textContent,e.push(u),r.remove(),o===u.M&&(t.m||(t.m=[]),t.m[u.P]=u),s&&"0"===u.N&&(s[u.P]=u.j))):"c"===c?(u.j=je(r,8),u.j&&8===u.j.nodeType&&(e.push(u),r.remove())):u.M===o&&("s"===c?Se(r["s-sn"]=f[5]||"",f[2],u,r,t,e,n,s,l):"r"===c&&s&&r.remove()));else if(t&&"style"===t.O){const e=we(null,r.textContent);e.j=r,e.P="0",t.m=[e]}return t},me=(t,e)=>{if(1===t.nodeType){const n=t[F]||t.getAttribute(F);n&&e.set(n,t);let s=0;if(t.shadowRoot)for(;s<t.shadowRoot.childNodes.length;s++)me(t.shadowRoot.childNodes[s],e);const i=t.__childNodes||t.childNodes;for(s=0;s<i.length;s++)me(i[s],e)}else if(8===t.nodeType){const n=t.nodeValue.split(".");"o"===n[0]&&(e.set(n[1]+"."+n[2],t),t.nodeValue="",t["s-en"]=n[3])}},ye=t=>({l:0,M:null,k:null,N:null,P:"0",j:null,v:null,m:null,S:null,W:null,O:null,$:null,...t});function Se(t,e,n,s,i,r,o,l,c){s["s-sr"]=!0,n.W=t||null,n.O="slot";const f=(null==i?void 0:i.j)?i.j["s-id"]||i.j.getAttribute("s-id"):"";if(l&&H.document){const r=n.j=H.document.createElement(n.O);n.W&&n.j.setAttribute("name",t),i.j.shadowRoot&&f&&f!==n.M?ae(i.j,"insertBefore")(r,ae(i.j,"children")[0]):ae(ae(s,"parentNode"),"insertBefore")(r,s),Oe(c,e,t,s,n.M),s.remove(),"0"===n.N&&(l[n.P]=n.j)}else{const r=n.j,o=f&&f!==n.M&&i.j.shadowRoot;Oe(c,e,t,s,o?f:n.M),function(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const e=e=>function(t){const n=[],s=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const i=this["s-cr"].parentElement;return(i.__childNodes?i.childNodes:(t=>{const e=[];for(let n=0;n<t.length;n++){const s=t[n]["s-nr"]||void 0;s&&s.isConnected&&e.push(s)}return e})(i.childNodes)).forEach((t=>{s===ue(t)&&n.push(t)})),e?n.filter((t=>1===t.nodeType)):n}.bind(t);t.assignedElements=e(!0),t.assignedNodes=e(!1)}(s),o&&i.j.insertBefore(r,i.j.children[0])}r.push(n),o.push(n),i.m||(i.m=[]),i.m[n.P]=n}var Oe=(t,e,n,s,i)=>{var r,o;let l=s.nextSibling;if(t[e]=t[e]||[],l&&!(null==(r=l.nodeValue)?void 0:r.startsWith("s.")))do{!l||(l.getAttribute&&l.getAttribute("slot")||l["s-sn"])!==n&&(""!==n||l["s-sn"]||l.getAttribute&&l.getAttribute("slot")||8!==l.nodeType&&3!==l.nodeType)||(l["s-sn"]=n,t[e].push({slot:s,node:l,hostId:i})),l=null==l?void 0:l.nextSibling}while(l&&!(null==(o=l.nodeValue)?void 0:o.startsWith("s.")))},je=(t,e)=>{let n=t;do{n=n.nextSibling}while(n&&(n.nodeType!==e||!n.nodeValue));return n},Me=t=>{const e=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${e}))(${e}\\b)`,"g")};Me("::slotted"),Me(":host"),Me(":host-context");var Ee,ke=(t,e)=>{return"string"==typeof t&&t.startsWith(_)?t="string"==typeof(n=t)&&n.startsWith(_)?te.fromLocalValue(JSON.parse(atob(n.slice(11)))):n:null==t||ct(t)?t:4&e?"false"!==t&&(""===t||!!t):1&e?String(t):t;var n},xe=(t,e)=>{const n=t;return{emit:t=>Ne(n,e,{bubbles:!0,composed:!0,cancelable:!0,detail:t})}},Ne=(t,e,n)=>{const s=J.ce(e,n);return t.dispatchEvent(s),s},Pe=(t,e,n,s,i,r,o)=>{if(n===s)return;let l=U(t,e),c=e.toLowerCase();if("class"===e){const e=t.classList,i=Re(n);let r=Re(s);if((t["s-si"]||t["s-sc"])&&o){const n=t["s-sc"]||t["s-si"];r.push(n),i.forEach((t=>{t.startsWith(n)&&r.push(t)})),r=[...new Set(r)].filter((t=>t)),e.add(...r)}else e.remove(...i.filter((t=>t&&!r.includes(t)))),e.add(...r.filter((t=>t&&!i.includes(t))))}else if("key"===e);else if(t.__lookupSetter__(e)||"o"!==e[0]||"n"!==e[1]){const o=ct(s);if(l||o&&null!==s)try{if(t.tagName.includes("-"))t[e]!==s&&(t[e]=s);else{const i=null==s?"":s;"list"===e?l=!1:null!=n&&t[e]==i||("function"==typeof t.__lookupSetter__(e)?t[e]=i:t.setAttribute(e,i))}}catch(t){}null==s||!1===s?!1===s&&""!==t.getAttribute(e)||t.removeAttribute(e):(!l||4&r||i)&&!o&&1===t.nodeType&&t.setAttribute(e,s=!0===s?"":s)}else if(e="-"===e[2]?e.slice(3):U(H,c)?c.slice(2):c[2]+e.slice(3),n||s){const i=e.endsWith(Ae);e=e.replace(Le,""),n&&J.rel(t,e,n,i),s&&J.ael(t,e,s,i)}},We=/\s/,Re=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(We):[]),Ae="Capture",Le=new RegExp(Ae+"$"),Ce=(t,e,n,s)=>{const i=11===e.j.nodeType&&e.j.host?e.j.host:e.j,r=t&&t.v||{},o=e.v||{};for(const t of Ie(Object.keys(r)))t in o||Pe(i,t,r[t],void 0,n,e.l,s);for(const t of Ie(Object.keys(o)))Pe(i,t,r[t],o[t],n,e.l,s)};function Ie(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var ze=!1,_e=(t,e,n)=>{const s=e.m[n];let i,r,o=0;if(null!==s.$)i=s.j=H.document.createTextNode(s.$);else{if(!H.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(i=s.j=H.document.createElement(s.O),Ce(null,s,ze),s.m){const e="template"===s.O?i.content:i;for(o=0;o<s.m.length;++o)r=_e(t,s,o),r&&e.appendChild(r)}}return i["s-hn"]=Ee,i},Te=(t,e,n,s,i,r)=>{let o,l=t;for(l.shadowRoot&&l.tagName===Ee&&(l=l.shadowRoot),"template"===n.O&&(l=l.content);i<=r;++i)s[i]&&(o=_e(null,n,i),o&&(s[i].j=o,Be(l,o,e)))},De=(t,e,n)=>{for(let s=e;s<=n;++s){const e=t[s];if(e){const t=e.j;t&&t.remove()}}},Ue=(t,e,n=!1)=>t.O===e.O&&(n?(n&&!t.S&&e.S&&(t.S=e.S),!0):t.S===e.S),Ve=(t,e,n=!1)=>{const s=e.j=t.j,i=t.m,r=e.m,o=e.$;null===o?(Ce(t,e,ze,n),null!==i&&null!==r?((t,e,n,s,i=!1)=>{let r,o,l=0,c=0,f=0,u=0,a=e.length-1,h=e[0],p=e[a],d=s.length-1,$=s[0],v=s[d];const w="template"===n.O?t.content:t;for(;l<=a&&c<=d;)if(null==h)h=e[++l];else if(null==p)p=e[--a];else if(null==$)$=s[++c];else if(null==v)v=s[--d];else if(Ue(h,$,i))Ve(h,$,i),h=e[++l],$=s[++c];else if(Ue(p,v,i))Ve(p,v,i),p=e[--a],v=s[--d];else if(Ue(h,v,i))Ve(h,v,i),Be(w,h.j,p.j.nextSibling),h=e[++l],v=s[--d];else if(Ue(p,$,i))Ve(p,$,i),Be(w,p.j,h.j),p=e[--a],$=s[++c];else{for(f=-1,u=l;u<=a;++u)if(e[u]&&null!==e[u].S&&e[u].S===$.S){f=u;break}f>=0?(o=e[f],o.O!==$.O?r=_e(e&&e[c],n,f):(Ve(o,$,i),e[f]=void 0,r=o.j),$=s[++c]):(r=_e(e&&e[c],n,c),$=s[++c]),r&&Be(h.j.parentNode,r,h.j)}l>a?Te(t,null==s[d+1]?null:s[d+1].j,n,s,c,d):c>d&&De(e,l,a)})(s,i,e,r,n):null!==r?(null!==t.$&&(s.textContent=""),Te(s,null,e,r,0,r.length-1)):n||null===i?n&&null!==i&&null===r&&(e.m=i):De(i,0,i.length-1)):t.$!==o&&(s.data=o)},Be=(t,e,n)=>{if("string"==typeof e["s-sn"]){t.insertBefore(e,n);const{slotNode:s}=function(t,e){var n;if(!(e=e||(null==(n=t["s-ol"])?void 0:n.parentElement)))return{slotNode:null,slotName:""};const s=t["s-sn"]=ue(t)||"";return{slotNode:ce(ae(e,"childNodes"),e.tagName,s)[0],slotName:s}}(e);return s&&s.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1})),e}return t.__insertBefore?t.__insertBefore(e,n):null==t?void 0:t.insertBefore(e,n)},Fe=(t,e,n=!1)=>{const s=t.$hostElement$,i=t.R||we(null,null);var r;const o=(r=e)&&r.O===be?e:ve(null,null,e);if(Ee=s.tagName,n&&o.v)for(const t of Object.keys(o.v))s.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(o.v[t]=s[t]);o.O=null,o.l|=4,t.R=o,o.j=i.j=s.shadowRoot||s,Ve(i,o,n)},Ge=(t,e)=>{if(e&&!t.A&&e["s-p"]){const n=e["s-p"].push(new Promise((s=>t.A=()=>{e["s-p"].splice(n-1,1),s()})))}},Ze=(t,e)=>{if(t.l|=16,4&t.l)return void(t.l|=512);Ge(t,t.L);const n=()=>He(t,e);if(!e)return rt(n);queueMicrotask((()=>{n()}))},He=(t,e)=>{const n=t.$hostElement$,s=n;if(!s)throw new Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let i;return i=tn(s,e?"componentWillLoad":"componentWillUpdate",void 0,n),i=qe(i,(()=>tn(s,"componentWillRender",void 0,n))),qe(i,(()=>Ye(t,s,e)))},qe=(t,e)=>Je(t)?t.then(e).catch((t=>{console.error(t),e()})):e(),Je=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Ye=async(t,e,n)=>{var s;const i=t.$hostElement$,r=i["s-rc"];n&&(t=>{const e=t.i,n=t.$hostElement$,s=e.l,i=de(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);10&s&&(n["s-sc"]=i,n.classList.add(i+"-h"))})(t);Ke(t,e,i,n),r&&(r.map((t=>t())),i["s-rc"]=void 0);{const e=null!=(s=i["s-p"])?s:[],n=()=>Qe(t);0===e.length?n():(Promise.all(e).then(n),t.l|=4,e.length=0)}},Ke=(t,e,n,s)=>{try{e=e.render(),t.l&=-17,t.l|=2,Fe(t,e,s)}catch(e){V(e,t.$hostElement$)}return null},Qe=t=>{const e=t.$hostElement$,n=e,s=t.L;tn(n,"componentDidRender",void 0,e),64&t.l?tn(n,"componentDidUpdate",void 0,e):(t.l|=64,en(e),tn(n,"componentDidLoad",void 0,e),t.C(e),s||Xe()),t.A&&(t.A(),t.A=void 0),512&t.l&&it((()=>Ze(t,!1))),t.l&=-517},Xe=()=>{var t;it((()=>Ne(H,"appload",{detail:{namespace:"authhero-widget"}}))),(null==(t=J.I)?void 0:t.size)&&J.I.clear()},tn=(t,e,n,s)=>{if(t&&t[e])try{return t[e](n)}catch(t){V(t,s)}},en=t=>t.classList.add("hydrated"),nn=(t,e,n,s)=>{const i=D(t);if(!i)return;const r=t,o=i.o.get(e),l=i.l,c=r;n=ke(n,s.t[e][0]);const f=Number.isNaN(o)&&Number.isNaN(n);if(n!==o&&!f){if(i.o.set(e,n),s._){const t=s._[e];t&&t.map((t=>{try{const[[s,r]]=Object.entries(t);(128&l||1&r)&&(c?c[s](n,o,e):i.T.push((()=>{i.D[s](n,o,e)})))}catch(t){V(t,r)}}))}if(2==(18&l)){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(n,o,e))return;Ze(i,!1)}}},sn=(t,e)=>{var n,s;const i=t.prototype;{t.watchers&&!e._&&(e._=t.watchers),t.deserializers&&!e.U&&(e.U=t.deserializers),t.serializers&&!e.V&&(e.V=t.serializers);const r=Object.entries(null!=(n=e.t)?n:{});r.map((([t,[n]])=>{if(31&n||32&n){const{get:s,set:r}=Object.getOwnPropertyDescriptor(i,t)||{};s&&(e.t[t][0]|=2048),r&&(e.t[t][0]|=4096),Object.defineProperty(i,t,{get(){return s?s.apply(this):(e=t,D(this).o.get(e));var e},configurable:!0,enumerable:!0}),Object.defineProperty(i,t,{set(s){const i=D(this);if(i){if(r)return void 0===(32&n?this[t]:i.$hostElement$[t])&&i.o.get(t)&&(s=i.o.get(t)),r.apply(this,[ke(s,n)]),void nn(this,t,s=32&n?this[t]:i.$hostElement$[t],e);nn(this,t,s,e)}}})}}));{const n=new Map;i.attributeChangedCallback=function(t,s,o){J.jmp((()=>{var l;const c=n.get(t),f=D(this);if(this.hasOwnProperty(c),i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==o)return;if(null==c){const n=null==f?void 0:f.l;if(f&&n&&!(8&n)&&o!==s){const i=this,r=null==(l=e._)?void 0:l[t];null==r||r.forEach((e=>{const[[r,l]]=Object.entries(e);null!=i[r]&&(128&n||1&l)&&i[r].call(i,o,s,t)}))}return}const u=r.find((([t])=>t===c));u&&4&u[1][0]&&(o=null!==o&&"false"!==o);const a=Object.getOwnPropertyDescriptor(i,c);o==this[c]||a.get&&!a.set||(this[c]=o)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(s=e._)?s:{}),...r.filter((([t,e])=>31&e[0])).map((([t,e])=>{const s=e[1]||t;return n.set(s,t),s}))]))}}return t},rn=(t,e)=>{const n={l:e[0],p:e[1]};n.t=e[2],n._=t._,n.U=t.U,n.V=t.V,(()=>{if(!H.document)return;const t=H.document.querySelectorAll(`[${G}]`);let e=0;for(;e<t.length;e++)pe(t[e].getAttribute(G),t[e].innerHTML.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),!0)})();const s=t.prototype.connectedCallback,i=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,e)=>{const n={l:0,$hostElement$:t,i:e,o:new Map,B:new Map};n.F=new Promise((t=>n.C=t)),t["s-p"]=[],t["s-rc"]=[];const s=n;t.__stencil__getHostRef=()=>s,512&e.l&&T(t,n)})(this,n)},connectedCallback(){if(!this.__hasHostListenerAttached){if(!D(this))return;this.__hasHostListenerAttached=!0}(t=>{if(!(1&J.l)){const e=D(t);if(!e)return;const n=e.i,s=()=>{};if(1&e.l)(null==e?void 0:e.D)||(null==e?void 0:e.F)&&e.F.then((()=>{}));else{let s;if(e.l|=1,s=t.getAttribute(F),s){if(1&n.l){const e=de(t.shadowRoot,n);t.classList.remove(e+"-h",e+"-s")}((t,e,n,s)=>{var i,r,o,l;const c=t.shadowRoot,f=[],u=[],a=c?[]:null,h=we(e,null);h.j=t,!H.document||J.I&&J.I.size||me(H.document.body,J.I=new Map),t[F]=n,t.removeAttribute(F),s.R=ge(h,f,[],a,t,t,n,u);let p=0;const d=f.length;let $;for(;p<d;p++){$=f[p];const n=$.M+"."+$.k,s=J.I.get(n),r=$.j;if(c){if((null==(i=$.O)?void 0:i.toString().includes("-"))&&"slot-fb"!==$.O&&!$.j.shadowRoot){const e=D($.j);if(e){const n=$e(e.i),s=H.document.querySelector(`style[sty-id="${n}"]`);s&&t.shadowRoot.append(s.cloneNode(!0))}}}else r["s-hn"]=e.toUpperCase(),"slot"===$.O&&(r["s-cr"]=t["s-cr"]);"slot"===$.O&&($.W=$.j["s-sn"]||$.j.name||null,$.m?($.l|=2,$.j.childNodes.length||$.m.forEach((t=>{$.j.appendChild(t.j)}))):$.l|=1),s&&s.isConnected&&(s.parentElement.shadowRoot&&""===s["s-en"]&&s.parentNode.insertBefore(r,s.nextSibling),s.parentNode.removeChild(s),c||(r["s-oo"]=parseInt($.k))),s&&!s["s-id"]&&J.I.delete(n)}const v=[],w=u.length;let b,g,m,y,S=0,O=0;for(;S<w;S++)if(b=u[S],b&&b.length)for(m=b.length,g=0;g<m;g++){if(y=b[g],v[y.hostId]||(v[y.hostId]=J.I.get(y.hostId)),!v[y.hostId])continue;const t=v[y.hostId];t.shadowRoot&&y.node.parentElement!==t&&t.insertBefore(y.node,null==(o=null==(r=b[g-1])?void 0:r.node)?void 0:o.nextSibling),t.shadowRoot&&c||(y.slot["s-cr"]||(y.slot["s-cr"]=t["s-cr"],y.slot["s-cr"]=!y.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),fe(y.node,y.slot,0,y.node["s-oo"]||O),(null==(l=y.node.parentElement)?void 0:l.shadowRoot)&&y.node.getAttribute&&y.node.getAttribute("slot")&&y.node.removeAttribute("slot")),O=(y.node["s-oo"]||O)+1}if(c){let e=0;const n=a.length;if(n){for(;e<n;e++){const t=a[e];t&&c.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}s.$hostElement$=t})(t,n.p,s,e)}{let n=t;for(;n=n.parentNode||n.host;)if(1===n.nodeType&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){Ge(e,e.L=n);break}}n.t&&Object.entries(n.t).map((([e,[n]])=>{if(31&n&&e in t&&t[e]!==Object.prototype[e]){const n=t[e];delete t[e],t[e]=n}})),(async(t,e,n)=>{let s;if(!(32&e.l)&&(e.l|=32,s=t.constructor,customElements.whenDefined(t.localName).then((()=>e.l|=128)),s&&s.style)){let t;"string"==typeof s.style&&(t=s.style);const e=$e(n);if(!B.has(e)){const s=()=>{};pe(e,t,!!(1&n.l)),s()}}const i=e.L,r=()=>Ze(e,!0);i&&i["s-rc"]?i["s-rc"].push(r):r()})(t,e,n)}s()}})(this),s&&s.call(this)},disconnectedCallback(){(async t=>{1&J.l||D(t),he.has(t)&&he.delete(t),t.shadowRoot&&he.has(t.shadowRoot)&&he.delete(t.shadowRoot)})(this),i&&i.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${n.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else le.call(this,n)}}),t.is=n.p,sn(t,n)},on=t=>J.h=t,ln=t=>Object.assign(J,t);function cn(t,e){Fe({$hostElement$:e},t)}function fn(t){return t}export{q as H,on as a,ln as b,xe as c,ot as g,ve as h,rn as p,cn as r,lt as s,fn as t}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e,p as r,H as t,c as a,h as i}from"./p-086EZrPM.js";const s=r(class extends t{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.fieldChange=a(this,"fieldChange"),this.buttonClick=a(this,"buttonClick")}component;value;disabled=!1;fieldChange;buttonClick;handleInput=e=>{this.fieldChange.emit({id:this.component.id,value:e.target.value})};handleCheckbox=e=>{this.fieldChange.emit({id:this.component.id,value:e.target.checked?"true":"false"})};handleButtonClick=(e,r,t)=>{"submit"!==r&&e.preventDefault(),this.buttonClick.emit({id:this.component.id,type:r,value:t})};getErrors(){const e=this.component;return e.messages?.filter((e=>"error"===e.type))||[]}renderLabel(e,r,t){return e?i("label",{class:"input-label",part:"label",htmlFor:r},e,t&&i("span",{class:"required"},"*")):null}renderErrors(){return this.getErrors().map((e=>i("span",{class:"error-text",part:"error-text",key:e.id??e.text},e.text)))}renderHint(e){return e?i("span",{class:"helper-text",part:"helper-text"},e):null}renderDivider(){return i("hr",{class:"divider",part:"divider"})}renderHtml(e){return i("div",{class:"html-content",part:"html-content",innerHTML:e.config?.content??""})}renderImage(e){const{src:r,alt:t,width:a,height:s}=e.config??{};return r?i("img",{class:"image",part:"image",src:r,alt:t??"",width:a,height:s,loading:"lazy"}):null}renderRichText(e){return i("div",{class:"rich-text",part:"rich-text",innerHTML:e.config?.content??""})}renderNextButton(e){return i("button",{type:"submit",class:"btn btn-primary",part:"button button-primary",disabled:this.disabled,onClick:e=>this.handleButtonClick(e,"submit","next")},e.config.text??"Continue")}renderPreviousButton(e){return i("button",{type:"button",class:"btn btn-secondary",part:"button button-secondary",disabled:this.disabled,onClick:e=>this.handleButtonClick(e,"previous","back")},e.config.text??"Back")}renderJumpButton(e){return i("button",{type:"button",class:"btn btn-link",part:"button button-link",disabled:this.disabled,onClick:r=>this.handleButtonClick(r,"jump",e.config.target_step)},e.config.text??"Go")}renderResendButton(e){return i("button",{type:"button",class:"btn btn-link",part:"button button-link",disabled:this.disabled,onClick:r=>this.handleButtonClick(r,"resend",e.config.resend_action)},e.config.text??"Resend")}renderTextField(e){const r=`input-${e.id}`,t=this.getErrors(),{placeholder:a,multiline:s,max_length:o}=e.config??{};return i("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(e.label,r,e.required),s?i("textarea",{id:r,class:{"input-field":!0,"has-error":t.length>0},part:"input textarea",name:e.id,placeholder:a,required:e.required,disabled:this.disabled,maxLength:o,onInput:this.handleInput},this.value??""):i("input",{id:r,class:{"input-field":!0,"has-error":t.length>0},part:"input",type:e.sensitive?"password":"text",name:e.id,value:this.value??"",placeholder:a,required:e.required,disabled:this.disabled,maxLength:o,onInput:this.handleInput}),this.renderErrors(),0===t.length&&this.renderHint(e.hint))}renderEmailField(e){const r=`input-${e.id}`,t=this.getErrors();return i("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(e.label,r,e.required),i("input",{id:r,class:{"input-field":!0,"has-error":t.length>0},part:"input",type:"email",name:e.id,value:this.value??"",placeholder:e.config?.placeholder,required:e.required,disabled:this.disabled,autocomplete:"email",onInput:this.handleInput}),this.renderErrors(),0===t.length&&this.renderHint(e.hint))}renderPasswordField(e){const r=`input-${e.id}`,t=this.getErrors();return i("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(e.label,r,e.required),i("input",{id:r,class:{"input-field":!0,"has-error":t.length>0},part:"input",type:"password",name:e.id,value:this.value??"",placeholder:e.config?.placeholder,required:e.required,disabled:this.disabled,minLength:e.config?.min_length,autocomplete:"current-password",onInput:this.handleInput}),this.renderErrors(),0===t.length&&this.renderHint(e.hint))}renderNumberField(e){const r=`input-${e.id}`,t=this.getErrors(),{placeholder:a,min:s,max:o,step:n}=e.config??{};return i("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(e.label,r,e.required),i("input",{id:r,class:{"input-field":!0,"has-error":t.length>0},part:"input",type:"number",name:e.id,value:this.value??"",placeholder:a,required:e.required,disabled:this.disabled,min:s,max:o,step:n,onInput:this.handleInput}),this.renderErrors(),0===t.length&&this.renderHint(e.hint))}renderTelField(e){const r=`input-${e.id}`,t=this.getErrors();return i("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(e.label,r,e.required),i("input",{id:r,class:{"input-field":!0,"has-error":t.length>0},part:"input",type:"tel",name:e.id,value:this.value??"",placeholder:e.config?.placeholder,required:e.required,disabled:this.disabled,autocomplete:"tel",onInput:this.handleInput}),this.renderErrors(),0===t.length&&this.renderHint(e.hint))}renderUrlField(e){const r=`input-${e.id}`,t=this.getErrors();return i("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(e.label,r,e.required),i("input",{id:r,class:{"input-field":!0,"has-error":t.length>0},part:"input",type:"url",name:e.id,value:this.value??"",placeholder:e.config?.placeholder,required:e.required,disabled:this.disabled,onInput:this.handleInput}),this.renderErrors(),0===t.length&&this.renderHint(e.hint))}renderDateField(e){const r=`input-${e.id}`,t=this.getErrors(),{min:a,max:s}=e.config??{};return i("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(e.label,r,e.required),i("input",{id:r,class:{"input-field":!0,"has-error":t.length>0},part:"input",type:"date",name:e.id,value:this.value??"",required:e.required,disabled:this.disabled,min:a,max:s,onInput:this.handleInput}),this.renderErrors(),0===t.length&&this.renderHint(e.hint))}renderBooleanField(e){return i("label",{class:"checkbox-wrapper",part:"checkbox-wrapper"},i("input",{type:"checkbox",part:"checkbox",name:e.id,checked:"true"===this.value||!0===e.config?.default_value,required:e.required,disabled:this.disabled,onChange:this.handleCheckbox}),i("span",{class:"checkbox-label",part:"checkbox-label"},e.label))}renderLegalField(e){const r=e.config?.text??e.label??"",t=!0===e.config?.html;return i("label",{class:"checkbox-wrapper",part:"checkbox-wrapper"},i("input",{type:"checkbox",part:"checkbox",name:e.id,checked:"true"===this.value,required:e.required,disabled:this.disabled,onChange:this.handleCheckbox}),t?i("span",{class:"checkbox-label",part:"checkbox-label",innerHTML:r}):i("span",{class:"checkbox-label",part:"checkbox-label"},r))}renderDropdownField(e){const r=`input-${e.id}`,t=this.getErrors(),{options:a,placeholder:s}=e.config??{};return i("div",{class:"input-wrapper",part:"input-wrapper"},this.renderLabel(e.label,r,e.required),i("select",{id:r,class:{"input-field":!0,"has-error":t.length>0},part:"input select",name:e.id,required:e.required,disabled:this.disabled,onChange:this.handleInput},s&&i("option",{value:"",disabled:!0,selected:!this.value},s),a?.map((e=>i("option",{value:e.value,selected:this.value===e.value,key:e.value},e.label)))),this.renderErrors(),0===t.length&&this.renderHint(e.hint))}renderChoiceField(e){const r=this.getErrors(),{options:t,display:a}=e.config??{},s="checkbox"===a,o=s?"checkbox":"radio";return i("div",{class:"choice-wrapper",part:"choice-wrapper"},e.label&&i("span",{class:"choice-label",part:"choice-label"},e.label,e.required&&i("span",{class:"required"},"*")),i("div",{class:"choice-options",part:"choice-options"},t?.map((r=>i("label",{class:"choice-option",part:"choice-option",key:r.value},i("input",{type:o,part:o,name:e.id,value:r.value,checked:this.value===r.value,required:e.required&&!s,disabled:this.disabled,onChange:this.handleInput}),i("span",null,r.label))))),this.renderErrors(),0===r.length&&this.renderHint(e.hint))}renderSocialField(e){return i("div",{class:"social-buttons",part:"social-buttons"},(e.config?.providers??[]).map((e=>i("button",{type:"button",class:"btn btn-secondary btn-social",part:"button button-secondary button-social","data-provider":e,disabled:this.disabled,onClick:r=>this.handleButtonClick(r,"social",e),key:e},"Continue with ",e.charAt(0).toUpperCase()+e.slice(1)))))}render(){if(!this.component)return null;if(!1===this.component.visible)return null;switch(this.component.type){case"DIVIDER":return this.renderDivider();case"HTML":return this.renderHtml(this.component);case"IMAGE":return this.renderImage(this.component);case"RICH_TEXT":return this.renderRichText(this.component);case"NEXT_BUTTON":return this.renderNextButton(this.component);case"PREVIOUS_BUTTON":return this.renderPreviousButton(this.component);case"JUMP_BUTTON":return this.renderJumpButton(this.component);case"RESEND_BUTTON":return this.renderResendButton(this.component);case"TEXT":return this.renderTextField(this.component);case"EMAIL":return this.renderEmailField(this.component);case"PASSWORD":return this.renderPasswordField(this.component);case"NUMBER":return this.renderNumberField(this.component);case"TEL":return this.renderTelField(this.component);case"URL":return this.renderUrlField(this.component);case"DATE":return this.renderDateField(this.component);case"BOOLEAN":return this.renderBooleanField(this.component);case"LEGAL":return this.renderLegalField(this.component);case"DROPDOWN":return this.renderDropdownField(this.component);case"CHOICE":return this.renderChoiceField(this.component);case"SOCIAL":return this.renderSocialField(this.component);case"AUTH0_VERIFIABLE_CREDENTIALS":case"GMAPS_ADDRESS":case"RECAPTCHA":return console.warn(`Widget component "${this.component.type}" not yet implemented`),null;case"CARDS":case"CUSTOM":case"FILE":case"PAYMENT":return console.warn(`Component "${this.component.type}" not yet implemented`),null;default:return console.warn(`Unknown component type: ${this.component.type}`),null}}static get style(){return":host{display:block}.input-wrapper{display:flex;flex-direction:column;gap:var(--ah-space-1, 0.25rem)}.input-label{font-size:var(--ah-font-size-sm, 0.875rem);font-weight:var(--ah-font-weight-medium, 500);color:var(--ah-color-text-label, #374151);line-height:var(--ah-line-height-normal, 1.5)}.required{color:var(--ah-color-error, #dc2626);margin-left:var(--ah-space-1, 0.25rem)}.input-field{padding:var(--ah-input-padding-y, 0.75rem) var(--ah-input-padding-x, 1rem);font-size:var(--ah-font-size-base, 1rem);font-family:inherit;color:var(--ah-color-text, #1f2937);background-color:var(--ah-color-bg, #ffffff);border:var(--ah-input-border-width, 1px) solid var(--ah-color-border, #d1d5db);border-radius:var(--ah-input-radius, 6px);outline:none;transition:border-color var(--ah-transition-base, 200ms ease), box-shadow var(--ah-transition-base, 200ms ease)}.input-field::placeholder{color:var(--ah-color-text-muted, #9ca3af)}.input-field:focus{border-color:var(--ah-color-primary, #0066cc);box-shadow:0 0 0 3px var(--ah-color-primary-focus-ring, rgba(0, 102, 204, 0.1))}.input-field.has-error{border-color:var(--ah-color-error, #dc2626)}.input-field.has-error:focus{box-shadow:0 0 0 3px rgba(220, 38, 38, 0.1)}.input-field:disabled{background-color:var(--ah-color-bg-disabled, #f3f4f6);cursor:not-allowed;opacity:0.7}.error-text{font-size:var(--ah-font-size-xs, 0.75rem);color:var(--ah-color-error, #dc2626);margin-top:var(--ah-space-1, 0.25rem)}.helper-text{font-size:var(--ah-font-size-xs, 0.75rem);color:var(--ah-color-text-muted, #6b7280);margin-top:var(--ah-space-1, 0.25rem)}.checkbox-wrapper{display:flex;align-items:flex-start;gap:var(--ah-space-2, 0.5rem);cursor:pointer}.checkbox-wrapper input[type='checkbox']{width:1rem;height:1rem;margin-top:0.125rem;accent-color:var(--ah-color-primary, #0066cc);cursor:pointer}.checkbox-label{font-size:var(--ah-font-size-sm, 0.875rem);color:var(--ah-color-text-label, #374151);line-height:var(--ah-line-height-normal, 1.5)}.btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--ah-space-2, 0.5rem);width:100%;padding:var(--ah-btn-padding-y, 0.875rem) var(--ah-btn-padding-x, 1.5rem);font-size:var(--ah-font-size-base, 1rem);font-weight:var(--ah-btn-font-weight, 500);font-family:inherit;line-height:var(--ah-line-height-tight, 1.25);text-align:center;text-decoration:none;border:none;border-radius:var(--ah-btn-radius, 8px);cursor:pointer;transition:background-color var(--ah-transition-base, 200ms ease), transform var(--ah-transition-fast, 150ms ease), box-shadow var(--ah-transition-base, 200ms ease)}.btn:disabled{opacity:0.6;cursor:not-allowed}.btn:not(:disabled):active{transform:scale(0.98)}.btn:focus-visible{outline:2px solid var(--ah-color-primary, #0066cc);outline-offset:2px}.btn-primary{background-color:var(--ah-color-primary, #0066cc);color:var(--ah-color-text-on-primary, #ffffff)}.btn-primary:not(:disabled):hover{background-color:var(--ah-color-primary-hover, #0052a3)}.btn-secondary{background-color:var(--ah-color-bg, #ffffff);color:var(--ah-color-text, #374151);border:1px solid var(--ah-color-border-muted, #e5e7eb)}.btn-secondary:not(:disabled):hover{background-color:var(--ah-color-bg-muted, #f9fafb);border-color:var(--ah-color-border, #d1d5db)}.text-title{font-size:var(--ah-font-size-xl, 1.25rem);font-weight:var(--ah-font-weight-semibold, 600);color:var(--ah-color-text, #1f2937);margin:var(--ah-space-2, 0.5rem) 0;line-height:var(--ah-line-height-tight, 1.25)}.text-title.text-success{color:var(--ah-color-success, #16a34a)}.text-description{font-size:var(--ah-font-size-sm, 0.875rem);color:var(--ah-color-text-muted, #6b7280);margin:var(--ah-space-1, 0.25rem) 0;line-height:var(--ah-line-height-normal, 1.5)}.image{display:block;max-width:100%;height:auto;border-radius:var(--ah-radius-lg, 8px)}.image-centered{margin:0 auto var(--ah-space-4, 1rem);width:var(--ah-logo-size, 48px);height:var(--ah-logo-size, 48px);object-fit:contain}.link{color:var(--ah-color-primary, #0066cc);text-decoration:none;font-size:var(--ah-font-size-sm, 0.875rem);transition:color var(--ah-transition-fast, 150ms ease)}.link:hover{text-decoration:underline}.link:focus-visible{outline:2px solid var(--ah-color-primary, #0066cc);outline-offset:2px}.node-error{padding:var(--ah-space-3, 0.75rem) var(--ah-space-4, 1rem);background-color:var(--ah-color-error-bg, #fee2e2);color:var(--ah-color-error, #dc2626);border:1px solid var(--ah-color-error-border, #fecaca);border-radius:var(--ah-radius-md, 6px);font-size:var(--ah-font-size-sm, 0.875rem)}.node-success{padding:var(--ah-space-3, 0.75rem) var(--ah-space-4, 1rem);background-color:var(--ah-color-success-bg, #dcfce7);color:var(--ah-color-success, #16a34a);border:1px solid var(--ah-color-success-border, #bbf7d0);border-radius:var(--ah-radius-md, 6px);font-size:var(--ah-font-size-sm, 0.875rem)}.divider{display:flex;align-items:center;text-align:center;margin:var(--ah-space-4, 1rem) 0}.divider::before,.divider::after{content:'';flex:1;border-bottom:1px solid var(--ah-color-border-muted, #e5e7eb)}.divider-text{padding:0 var(--ah-space-4, 1rem);font-size:var(--ah-font-size-sm, 0.875rem);color:var(--ah-color-text-muted, #9ca3af);text-transform:uppercase;letter-spacing:0.05em}"}},[513,"authhero-node",{component:[16],value:[1],disabled:[4]}]);function o(){"undefined"!=typeof customElements&&["authhero-node"].forEach((r=>{"authhero-node"===r&&(customElements.get(e(r))||customElements.define(e(r),s))}))}o();export{s as A,o as d}
|