@everymatrix/user-login 1.94.18 → 1.94.19
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/cjs/{index-7c1c14d6.js → index-abb69c35.js} +2 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/user-login.cjs.entry.js +465 -90
- package/dist/cjs/user-login.cjs.js +2 -2
- package/dist/collection/components/user-login/user-login.js +150 -98
- package/dist/collection/utils/utils.js +1 -0
- package/dist/esm/{index-13692399.js → index-b943f0d9.js} +2 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/user-login.entry.js +465 -90
- package/dist/esm/user-login.js +3 -3
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/user-login/.stencil/libs/common/src/captcha/google/index.d.ts +13 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/user-login/.stencil/libs/common/src/captcha/index.d.ts +15 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/user-login/.stencil/libs/common/src/captcha/turnstile/index.d.ts +55 -0
- package/dist/types/components/user-login/user-login.d.ts +33 -30
- package/dist/types/components.d.ts +28 -4
- package/dist/types/utils/types.d.ts +0 -6
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/user-login/index-b943f0d9.js +2 -0
- package/dist/user-login/user-login.entry.js +241 -241
- package/dist/user-login/user-login.esm.js +1 -1
- package/package.json +1 -1
- package/dist/user-login/index-13692399.js +0 -2
package/dist/esm/user-login.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-b943f0d9.js';
|
|
2
|
+
export { s as setNonce } from './index-b943f0d9.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["user-login",[[1,"user-login",{"endpoint":[513],"minPassLength":[514,"min-pass-length"],"lang":[1537],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"passwordReset":[513,"password-reset"],"userEmailRegex":[513,"user-email-regex"],"userEmailRegexOptions":[513,"user-email-regex-options"],"userPhoneRegex":[513,"user-phone-regex"],"userPhoneRegexOptions":[513,"user-phone-regex-options"],"passwordRegex":[513,"password-regex"],"passwordRegexOptions":[513,"password-regex-options"],"version":[513],"loginByPhoneNumber":[513,"login-by-phone-number"],"defaultPrefix":[513,"default-prefix"],"isPrefixEditable":[513,"is-prefix-editable"],"mbSource":[513,"mb-source"],"biometricEnabled":[513,"biometric-enabled"],"biometricactionmode":[1],"isFromLogin":[4,"is-from-login"],"userNameEmail":[32],"userPassword":[32],"isValidUserEmail":[32],"userPhone":[32],"userPrefix":[32],"isValidPassword":[32],"isValidUserPhone":[32],"isPasswordVisible":[32],"errorMessage":[32],"errorForFields":[32],"hasError":[32],"phoneCodes":[32],"isLoginLoading":[32],"
|
|
19
|
+
return bootstrapLazy([["user-login",[[1,"user-login",{"endpoint":[513],"minPassLength":[514,"min-pass-length"],"lang":[1537],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"passwordReset":[513,"password-reset"],"userEmailRegex":[513,"user-email-regex"],"userEmailRegexOptions":[513,"user-email-regex-options"],"userPhoneRegex":[513,"user-phone-regex"],"userPhoneRegexOptions":[513,"user-phone-regex-options"],"passwordRegex":[513,"password-regex"],"passwordRegexOptions":[513,"password-regex-options"],"version":[513],"loginByPhoneNumber":[513,"login-by-phone-number"],"defaultPrefix":[513,"default-prefix"],"isPrefixEditable":[513,"is-prefix-editable"],"mbSource":[513,"mb-source"],"biometricEnabled":[513,"biometric-enabled"],"biometricactionmode":[1],"isFromLogin":[4,"is-from-login"],"turnstileSiteKey":[1,"turnstile-site-key"],"turnstileEnableFallback":[4,"turnstile-enable-fallback"],"turnstileRetryCount":[2,"turnstile-retry-count"],"userNameEmail":[32],"userPassword":[32],"isValidUserEmail":[32],"userPhone":[32],"userPrefix":[32],"isValidPassword":[32],"isValidUserPhone":[32],"isPasswordVisible":[32],"errorMessage":[32],"errorForFields":[32],"hasError":[32],"phoneCodes":[32],"isLoginLoading":[32],"isNativeApp":[32],"biometricsLoaded":[32],"isTurnstileLoading":[32],"autofillCredentials":[64]},null,{"translationUrl":["handleNewTranslations"],"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingChangeURL"]}]]]], options);
|
|
20
20
|
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type RenderRecaptchaOptions = {
|
|
2
|
+
siteKey: string;
|
|
3
|
+
theme?: 'light' | 'dark';
|
|
4
|
+
size?: 'normal' | 'compact';
|
|
5
|
+
callback?: (token: string) => void;
|
|
6
|
+
'expired-callback'?: () => void;
|
|
7
|
+
'error-callback'?: () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function createRecaptcha(options: RenderRecaptchaOptions): {
|
|
10
|
+
render: (container: HTMLElement) => Promise<void>;
|
|
11
|
+
reset: () => void;
|
|
12
|
+
cleanup: () => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createRecaptcha } from './google';
|
|
2
|
+
import { createTurnstile } from './turnstile';
|
|
3
|
+
type CaptchaProvider = 'google' | 'cloudflare';
|
|
4
|
+
type GM17CaptchaData = {
|
|
5
|
+
isEnabled: boolean;
|
|
6
|
+
provider: CaptchaProvider;
|
|
7
|
+
siteKey: string;
|
|
8
|
+
};
|
|
9
|
+
type CaptchaOption = GM17CaptchaData & {
|
|
10
|
+
enableFallback?: boolean;
|
|
11
|
+
};
|
|
12
|
+
type RecaptchaInstance = ReturnType<typeof createRecaptcha>;
|
|
13
|
+
type TurnstileInstance = ReturnType<typeof createTurnstile>;
|
|
14
|
+
type CaptchaInstance = RecaptchaInstance | TurnstileInstance;
|
|
15
|
+
export { createRecaptcha, createTurnstile, RecaptchaInstance, TurnstileInstance, CaptchaInstance, CaptchaProvider, CaptchaOption, GM17CaptchaData };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export type CreateTurnstileOptions = {
|
|
2
|
+
siteKey: string;
|
|
3
|
+
action?: string;
|
|
4
|
+
/** When false every method is a no-op; getToken/ensureToken resolve to undefined. */
|
|
5
|
+
isEnabled?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Resolve with DUMMY_TURNSTILE_RESPONSE after DEFAULT_RETRY_COUNT consecutive
|
|
8
|
+
* retries. Only enable when the backend is configured to accept it (e.g. login only).
|
|
9
|
+
*/
|
|
10
|
+
enableFallback?: boolean;
|
|
11
|
+
retryCount?: number;
|
|
12
|
+
/** Fired once the script has loaded and the widget is rendered. */
|
|
13
|
+
onReady?: () => void;
|
|
14
|
+
/** Fired whenever the cached token changes (new value or null on expiry/reset). */
|
|
15
|
+
onTokenChange?: (token: string | null) => void;
|
|
16
|
+
/** Fired when an async token fetch starts (true) or finishes (false). */
|
|
17
|
+
onLoadingChange?: (isLoading: boolean) => void;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Creates a self-contained Cloudflare Turnstile controller for use in any
|
|
21
|
+
* framework (Stencil, Vue, Svelte, vanilla TS). Mirrors the behavior of the
|
|
22
|
+
* React `useTurnstile` hook used in the Flash project.
|
|
23
|
+
*
|
|
24
|
+
* Typical lifecycle:
|
|
25
|
+
* 1. Call `render(containerEl)` in your mount/componentDidLoad — loads the
|
|
26
|
+
* script and renders an invisible widget.
|
|
27
|
+
* 2. On form submit, `await ensureToken()` to get (or obtain) a token.
|
|
28
|
+
* 3. Call `cleanup()` in your unmount/disconnectedCallback.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const turnstile = createTurnstile({
|
|
33
|
+
* siteKey: 'YOUR_SITE_KEY',
|
|
34
|
+
* action: 'login',
|
|
35
|
+
* onLoadingChange: (loading) => { this.isTurnstileLoading = loading; },
|
|
36
|
+
* });
|
|
37
|
+
*
|
|
38
|
+
* // in componentDidLoad
|
|
39
|
+
* await turnstile.render(this.turnstileContainerEl);
|
|
40
|
+
*
|
|
41
|
+
* // in handleSubmit
|
|
42
|
+
* const token = await turnstile.ensureToken();
|
|
43
|
+
* headers['X-Captcha-Response'] = token;
|
|
44
|
+
*
|
|
45
|
+
* // in disconnectedCallback
|
|
46
|
+
* turnstile.cleanup();
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare function createTurnstile(options: CreateTurnstileOptions): {
|
|
50
|
+
render: (hostContainer: HTMLElement) => Promise<void>;
|
|
51
|
+
getToken: () => Promise<string | undefined>;
|
|
52
|
+
ensureToken: () => Promise<string | undefined>;
|
|
53
|
+
reset: () => void;
|
|
54
|
+
cleanup: () => void;
|
|
55
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Credentials } from '../../utils/types';
|
|
2
|
+
import { type GM17CaptchaData } from "../../../../../../libs/common/src/captcha/index";
|
|
2
3
|
import "../../../../../../dist/libs/vaadin-facade/index";
|
|
3
4
|
export declare class UserLogin {
|
|
4
5
|
/**
|
|
@@ -56,7 +57,7 @@ export declare class UserLogin {
|
|
|
56
57
|
/**
|
|
57
58
|
* Flag to determine if the component uses version 2 of the API
|
|
58
59
|
*/
|
|
59
|
-
version:
|
|
60
|
+
version: 'gm16' | 'gm17';
|
|
60
61
|
/**
|
|
61
62
|
* If set to true, login will be done by phone number, else by username/email
|
|
62
63
|
*/
|
|
@@ -64,7 +65,7 @@ export declare class UserLogin {
|
|
|
64
65
|
/**
|
|
65
66
|
* Defines a prefix to be pre-selected
|
|
66
67
|
*/
|
|
67
|
-
defaultPrefix
|
|
68
|
+
defaultPrefix?: string;
|
|
68
69
|
/**
|
|
69
70
|
* Flag to determine if prefix is editable
|
|
70
71
|
*/
|
|
@@ -73,7 +74,7 @@ export declare class UserLogin {
|
|
|
73
74
|
* The source identifier for message bus styling.
|
|
74
75
|
* This is used to apply styles dynamically from a stream.
|
|
75
76
|
*/
|
|
76
|
-
mbSource
|
|
77
|
+
mbSource?: string;
|
|
77
78
|
/**
|
|
78
79
|
* Flag for enabling biometric login on native apps only.
|
|
79
80
|
*/
|
|
@@ -86,6 +87,19 @@ export declare class UserLogin {
|
|
|
86
87
|
* Flag indicating whether the component is rendered from the login flow
|
|
87
88
|
*/
|
|
88
89
|
isFromLogin: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Cloudflare Turnstile site key.
|
|
92
|
+
* Acts as the enable/disable flag for Turnstile.
|
|
93
|
+
*/
|
|
94
|
+
turnstileSiteKey?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Enable Turnstile fallback behavior.
|
|
97
|
+
*/
|
|
98
|
+
turnstileEnableFallback?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Number of retry attempts for Turnstile.
|
|
101
|
+
*/
|
|
102
|
+
turnstileRetryCount?: number;
|
|
89
103
|
userNameEmail: string;
|
|
90
104
|
userPassword: string;
|
|
91
105
|
isValidUserEmail: boolean;
|
|
@@ -102,14 +116,18 @@ export declare class UserLogin {
|
|
|
102
116
|
value: string;
|
|
103
117
|
}[];
|
|
104
118
|
isLoginLoading: boolean;
|
|
105
|
-
captchaData: CaptchaData;
|
|
106
119
|
isNativeApp: boolean;
|
|
107
120
|
biometricsLoaded: boolean;
|
|
121
|
+
isTurnstileLoading: boolean;
|
|
122
|
+
host: HTMLElement;
|
|
108
123
|
private errorCode;
|
|
109
|
-
private stylingContainer
|
|
124
|
+
private stylingContainer?;
|
|
110
125
|
private stylingSubscription;
|
|
111
|
-
|
|
112
|
-
|
|
126
|
+
private captchaInstance;
|
|
127
|
+
private captchaContainerEl;
|
|
128
|
+
private captchaToken?;
|
|
129
|
+
updateLoginCredentialsEvent?: CustomEvent;
|
|
130
|
+
inputUserPhoneReference?: HTMLInputElement;
|
|
113
131
|
/**
|
|
114
132
|
* Watch for changes in the translation URL and fetch new translations
|
|
115
133
|
*/
|
|
@@ -136,27 +154,12 @@ export declare class UserLogin {
|
|
|
136
154
|
*/
|
|
137
155
|
componentDidLoad(): void;
|
|
138
156
|
/**
|
|
139
|
-
* Fetches the login configuration from the backend API.
|
|
157
|
+
* Fetches the login configuration from the backend API, used for gm17 only.
|
|
140
158
|
*
|
|
141
159
|
* @returns A Promise that resolves once the configuration is fetched and set.
|
|
142
160
|
*/
|
|
143
|
-
getLoginConfig(): Promise<
|
|
144
|
-
|
|
145
|
-
* Handles the integration of CAPTCHA based on the login configuration.
|
|
146
|
-
* Dynamically injects the necessary CAPTCHA script if enabled.
|
|
147
|
-
*/
|
|
148
|
-
handleCaptcha(): void;
|
|
149
|
-
/**
|
|
150
|
-
* Common callback function for CAPTCHA response handling.
|
|
151
|
-
* @param token CAPTCHA response token.
|
|
152
|
-
*/
|
|
153
|
-
private captchaCallback;
|
|
154
|
-
/**
|
|
155
|
-
* Dynamically loads the Turnstile script and renders CAPTCHA when ready.
|
|
156
|
-
* @param src - The URL of the CAPTCHA script to load.
|
|
157
|
-
* @param captcha - The CAPTCHA configuration.
|
|
158
|
-
*/
|
|
159
|
-
appendCaptchaScript(): void;
|
|
161
|
+
getLoginConfig(): Promise<GM17CaptchaData>;
|
|
162
|
+
private initializeCaptcha;
|
|
160
163
|
private messageHandler;
|
|
161
164
|
private checkNativeApp;
|
|
162
165
|
/**
|
|
@@ -169,7 +172,7 @@ export declare class UserLogin {
|
|
|
169
172
|
getPhoneCodes: () => Promise<{
|
|
170
173
|
label: string;
|
|
171
174
|
value: string;
|
|
172
|
-
}[]>;
|
|
175
|
+
}[] | void>;
|
|
173
176
|
/**
|
|
174
177
|
* Handle autofilling of credentials from a dispatched event
|
|
175
178
|
*/
|
|
@@ -189,11 +192,11 @@ export declare class UserLogin {
|
|
|
189
192
|
/**
|
|
190
193
|
* Send error notification as a post message
|
|
191
194
|
*/
|
|
192
|
-
sendErrorNotification(errorMessage:
|
|
195
|
+
sendErrorNotification(errorMessage: string): void;
|
|
193
196
|
/**
|
|
194
197
|
* Debounce function to limit API calls
|
|
195
198
|
*/
|
|
196
|
-
debounce(
|
|
199
|
+
debounce<T extends unknown[]>(fn: (...args: T) => void, delay?: number): (...args: T) => void;
|
|
197
200
|
/**
|
|
198
201
|
* Trigger login process
|
|
199
202
|
*/
|
|
@@ -235,6 +238,6 @@ export declare class UserLogin {
|
|
|
235
238
|
renderUserIdentification(): any;
|
|
236
239
|
/**
|
|
237
240
|
* Render function
|
|
238
|
-
|
|
241
|
+
*/
|
|
239
242
|
render(): any;
|
|
240
243
|
}
|
|
@@ -32,7 +32,7 @@ export namespace Components {
|
|
|
32
32
|
/**
|
|
33
33
|
* Defines a prefix to be pre-selected
|
|
34
34
|
*/
|
|
35
|
-
"defaultPrefix"
|
|
35
|
+
"defaultPrefix"?: string;
|
|
36
36
|
/**
|
|
37
37
|
* API endpoint URL for login requests
|
|
38
38
|
*/
|
|
@@ -56,7 +56,7 @@ export namespace Components {
|
|
|
56
56
|
/**
|
|
57
57
|
* The source identifier for message bus styling. This is used to apply styles dynamically from a stream.
|
|
58
58
|
*/
|
|
59
|
-
"mbSource"
|
|
59
|
+
"mbSource"?: string;
|
|
60
60
|
/**
|
|
61
61
|
* minPassLength for declare min password length
|
|
62
62
|
*/
|
|
@@ -77,6 +77,18 @@ export namespace Components {
|
|
|
77
77
|
* URL for fetching translations
|
|
78
78
|
*/
|
|
79
79
|
"translationUrl": string;
|
|
80
|
+
/**
|
|
81
|
+
* Enable Turnstile fallback behavior.
|
|
82
|
+
*/
|
|
83
|
+
"turnstileEnableFallback"?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Number of retry attempts for Turnstile.
|
|
86
|
+
*/
|
|
87
|
+
"turnstileRetryCount"?: number;
|
|
88
|
+
/**
|
|
89
|
+
* Cloudflare Turnstile site key. Acts as the enable/disable flag for Turnstile.
|
|
90
|
+
*/
|
|
91
|
+
"turnstileSiteKey"?: string;
|
|
80
92
|
/**
|
|
81
93
|
* Regular expression for validating the user email
|
|
82
94
|
*/
|
|
@@ -96,7 +108,7 @@ export namespace Components {
|
|
|
96
108
|
/**
|
|
97
109
|
* Flag to determine if the component uses version 2 of the API
|
|
98
110
|
*/
|
|
99
|
-
"version":
|
|
111
|
+
"version": 'gm16' | 'gm17';
|
|
100
112
|
}
|
|
101
113
|
}
|
|
102
114
|
declare global {
|
|
@@ -176,6 +188,18 @@ declare namespace LocalJSX {
|
|
|
176
188
|
* URL for fetching translations
|
|
177
189
|
*/
|
|
178
190
|
"translationUrl"?: string;
|
|
191
|
+
/**
|
|
192
|
+
* Enable Turnstile fallback behavior.
|
|
193
|
+
*/
|
|
194
|
+
"turnstileEnableFallback"?: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Number of retry attempts for Turnstile.
|
|
197
|
+
*/
|
|
198
|
+
"turnstileRetryCount"?: number;
|
|
199
|
+
/**
|
|
200
|
+
* Cloudflare Turnstile site key. Acts as the enable/disable flag for Turnstile.
|
|
201
|
+
*/
|
|
202
|
+
"turnstileSiteKey"?: string;
|
|
179
203
|
/**
|
|
180
204
|
* Regular expression for validating the user email
|
|
181
205
|
*/
|
|
@@ -195,7 +219,7 @@ declare namespace LocalJSX {
|
|
|
195
219
|
/**
|
|
196
220
|
* Flag to determine if the component uses version 2 of the API
|
|
197
221
|
*/
|
|
198
|
-
"version"?:
|
|
222
|
+
"version"?: 'gm16' | 'gm17';
|
|
199
223
|
}
|
|
200
224
|
interface IntrinsicElements {
|
|
201
225
|
"user-login": UserLogin;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),d=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),p=!1,m=[],v=[],w=(e,t)=>n=>{e.push(n),p||(p=!0,t&&4&f.l?b($):f.raf($))},y=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},$=()=>{y(m),y(v),(p=m.length>0)&&f.raf($)},b=e=>h().then(e),g=w(v,!0),S={},j=e=>"object"==(e=typeof e)||"function"===e;function O(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>k,unwrap:()=>P,unwrapErr:()=>L});var k=e=>({isOk:!0,isErr:!1,value:e}),E=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>k(e))):k(n)}if(e.isErr)return E(e.value);throw"should never get here"}var M,x,P=e=>{if(e.isOk)return e.value;throw e.value},L=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!j(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?T(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=T(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},T=(e,t)=>({l:0,m:e,i:t,v:null,h:null,u:null,p:null}),A={},F=e=>n(e).$hostElement$,N=new WeakMap,U=e=>"sc-"+e.$,W=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=H(n),s=H(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=j(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(q);t=t.replace(G,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},D=/\s/,H=e=>e?e.split(D):[],q="Capture",G=RegExp(q+"$"),V=(e,t,n)=>{const l=11===t.v.nodeType&&t.v.host?t.v.host:t.v,o=e&&e.u||S,s=t.u||S;for(const e of _(Object.keys(o)))e in s||W(l,e,o[e],void 0,n,t.l);for(const e of _(Object.keys(s)))W(l,e,o[e],s[e],n,t.l)};function _(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var z=!1,B=!1,I=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.v=a.createTextNode(l.i);else{if(B||(B="svg"===l.m),o=l.v=a.createElementNS(B?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",l.m),B&&"foreignObject"===l.m&&(B=!1),V(null,l,B),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=I(e,l,r),s&&o.appendChild(s);"svg"===l.m?B=!1:"foreignObject"===o.tagName&&(B=!0)}return o["s-hn"]=x,o},J=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=I(null,n,o),r&&(l[o].v=r,Z(i,r,t)))},K=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.v;Y(t),e&&e.remove()}}},Q=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),X=(e,t,n=!1)=>{const l=t.v=e.v,o=e.h,s=t.h,r=t.m,i=t.i;null===i?(B="svg"===r||"foreignObject"!==r&&B,("slot"!==r||z)&&V(e,t,B),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],d=t[f],p=l.length-1,m=l[0],v=l[p];for(;i<=f&&c<=p;)if(null==h)h=t[++i];else if(null==d)d=t[--f];else if(null==m)m=l[++c];else if(null==v)v=l[--p];else if(Q(h,m,o))X(h,m,o),h=t[++i],m=l[++c];else if(Q(d,v,o))X(d,v,o),d=t[--f],v=l[--p];else if(Q(h,v,o))X(h,v,o),Z(e,h.v,d.v.nextSibling),h=t[++i],v=l[--p];else if(Q(d,m,o))X(d,m,o),Z(e,d.v,h.v),d=t[--f],m=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===m.p){u=a;break}u>=0?(r=t[u],r.m!==m.m?s=I(t&&t[c],n,u):(X(r,m,o),t[u]=void 0,s=r.v),m=l[++c]):(s=I(t&&t[c],n,c),m=l[++c]),s&&Z(h.v.parentNode,s,h.v)}i>f?J(e,null==l[p+1]?null:l[p+1].v,n,l,c,p):c>p&&K(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),J(l,null,t,s,0,s.length-1)):null!==o&&K(o,0,o.length-1),B&&"svg"===r&&(B=!1)):e.i!==i&&(l.data=i)},Y=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Y)},Z=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),ee=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},te=(e,t)=>{if(e.l|=16,!(4&e.l))return ee(e,e.j),g((()=>ne(e,t)));e.l|=512},ne=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.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 l;return t&&(l=ue(n,"componentWillLoad")),le(l,(()=>se(e,n,t)))},le=(e,t)=>oe(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),oe=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,se=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.O,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=U(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=N.get(e=e.head||e);if(r||N.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const t=null!=(n=f.k)?n:O(a);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);re(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>ie(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},re=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.O,s=e.C||T(null,null),r=(e=>e&&e.m===A)(t)?t:R(null,null,t);if(x=l.tagName,o.M&&(r.u=r.u||{},o.M.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.C=r,r.v=s.v=l.shadowRoot||l,M=l["s-sc"],z=!!(1&o.l),X(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},ie=e=>{const t=e.$hostElement$,n=e.t,l=e.j;64&e.l||(e.l|=64,ae(t),ue(n,"componentDidLoad"),e.P(t),l||ce()),e.L(t),e.S&&(e.S(),e.S=void 0),512&e.l&&b((()=>te(e,!1))),e.l&=-517},ce=()=>{ae(a.documentElement),b((()=>(e=>{const t=f.ce("appload",{detail:{namespace:"user-login"}});return e.dispatchEvent(t),t})(u)))},ue=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ae=e=>e.classList.add("hydrated"),fe=(e,t,l)=>{var o,r;const i=e.prototype;if(t.R||t.T||e.watchers){e.watchers&&!t.T&&(t.T=e.watchers);const c=Object.entries(null!=(o=t.R)?o:{});if(c.map((([e,[o]])=>{31&o||2&l&&32&o?Object.defineProperty(i,e,{get(){return((e,t)=>n(this).A.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.A.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||j(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,o.R[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.A.set(t,l),a)){if(o.T&&128&u){const e=o.T[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&te(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0}):1&l&&64&o&&Object.defineProperty(i,e,{value(...t){var l;const o=n(this);return null==(l=null==o?void 0:o.F)?void 0:l.then((()=>{var n;return null==(n=o.t)?void 0:n[e](...t)}))}})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.T)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.T)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.M)||o.push([e,s])),s}))]))}}return e},he=e=>{ue(e,"disconnectedCallback")},de=(e,l={})=>{var o;const h=[],p=l.exclude||[],m=u.customElements,v=a.head,w=v.querySelector("meta[charset]"),y=a.createElement("style"),$=[];let b,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],$:l[1],R:l[2],N:l[3]};4&c.l&&(S=!0),c.R=l[2],c.M=[],c.T=null!=(o=l[4])?o:{};const u=c.$,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,O:n,A:new Map};l.F=new Promise((e=>l.L=e)),l.U=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.$}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),g?$.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.O,o=()=>{};if(1&t.l)(null==t?void 0:t.t)||(null==t?void 0:t.U)&&t.U.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){ee(t,t.j=n);break}}l.R&&Object.entries(l.R).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.W){const e=(e=>{const t=e.$.replace(/-/g,"_"),n=e.W;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.$}#${t.D}" was not found`);l.isProxied||(n.T=l.watchers,fe(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=U(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);d&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>te(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);(null==e?void 0:e.t)?he(e.t):(null==e?void 0:e.U)&&e.U.then((()=>he(e.t)))}})()))}componentOnReady(){return n(this).U}};c.W=e[0],p.includes(u)||m.get(u)||(h.push(u),m.define(u,fe(a,c,1)))}))})),h.length>0&&(S&&(y.textContent+=c),y.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",y.innerHTML.length)){y.setAttribute("data-styles","");const e=null!=(o=f.k)?o:O(a);null!=e&&y.setAttribute("nonce",e),v.insertBefore(y,w?w.nextSibling:v.firstChild)}g=!1,$.length?$.map((e=>e.connectedCallback())):f.jmp((()=>b=setTimeout(ce,30)))},pe=e=>f.k=e;export{de as b,F as g,R as h,h as p,l as r,pe as s}
|