@forgerock/login-widget 1.2.0-beta.9 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +176 -145
- package/index.cjs +624 -294
- package/index.cjs.map +1 -1
- package/index.d.ts +9 -1
- package/index.js +624 -294
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/types.d.ts +13 -2
package/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @forgerock/login-widget
|
|
3
3
|
*
|
|
4
|
-
* Copyright (c)
|
|
4
|
+
* Copyright (c) 2024 ForgeRock. All rights reserved.
|
|
5
5
|
* This software may be modified and distributed under the terms
|
|
6
6
|
* of the MIT license.
|
|
7
7
|
*
|
|
8
8
|
* MIT License
|
|
9
9
|
*
|
|
10
|
-
* Copyright (c)
|
|
10
|
+
* Copyright (c) 2024
|
|
11
11
|
*
|
|
12
12
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
13
|
* of this software and associated documentation files (the "Software"), to deal
|
|
@@ -65,14 +65,6 @@ function is_function(thing) {
|
|
|
65
65
|
function safe_not_equal(a, b) {
|
|
66
66
|
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
|
|
67
67
|
}
|
|
68
|
-
let src_url_equal_anchor;
|
|
69
|
-
function src_url_equal(element_src, url) {
|
|
70
|
-
if (!src_url_equal_anchor) {
|
|
71
|
-
src_url_equal_anchor = document.createElement('a');
|
|
72
|
-
}
|
|
73
|
-
src_url_equal_anchor.href = url;
|
|
74
|
-
return element_src === src_url_equal_anchor.href;
|
|
75
|
-
}
|
|
76
68
|
function is_empty(obj) {
|
|
77
69
|
return Object.keys(obj).length === 0;
|
|
78
70
|
}
|
|
@@ -11940,6 +11932,7 @@ const journeyStore = writable({
|
|
|
11940
11932
|
step: null,
|
|
11941
11933
|
successful: false,
|
|
11942
11934
|
response: null,
|
|
11935
|
+
recaptchaAction: null,
|
|
11943
11936
|
});
|
|
11944
11937
|
/**
|
|
11945
11938
|
* @function initialize - Initializes the journey store
|
|
@@ -11949,7 +11942,7 @@ const journeyStore = writable({
|
|
|
11949
11942
|
function initialize$4(initOptions) {
|
|
11950
11943
|
const stack = initializeStack();
|
|
11951
11944
|
let stepNumber = 0;
|
|
11952
|
-
async function next(prevStep
|
|
11945
|
+
async function next(prevStep, nextOptions, resumeUrl) {
|
|
11953
11946
|
if (!Config.get().serverConfig?.baseUrl) {
|
|
11954
11947
|
logErrorAndThrow('missingBaseUrl');
|
|
11955
11948
|
}
|
|
@@ -11979,6 +11972,7 @@ function initialize$4(initOptions) {
|
|
|
11979
11972
|
step: prevStep,
|
|
11980
11973
|
successful: false,
|
|
11981
11974
|
response: null,
|
|
11975
|
+
recaptchaAction: nextOptions?.recaptchaAction,
|
|
11982
11976
|
});
|
|
11983
11977
|
try {
|
|
11984
11978
|
if (resumeUrl) {
|
|
@@ -12041,6 +12035,7 @@ function initialize$4(initOptions) {
|
|
|
12041
12035
|
step: nextStep,
|
|
12042
12036
|
successful: false,
|
|
12043
12037
|
response: null,
|
|
12038
|
+
recaptchaAction: nextOptions?.recaptchaAction,
|
|
12044
12039
|
});
|
|
12045
12040
|
}
|
|
12046
12041
|
else if (nextStep.type === StepType.LoginSuccess) {
|
|
@@ -12057,6 +12052,7 @@ function initialize$4(initOptions) {
|
|
|
12057
12052
|
step: null,
|
|
12058
12053
|
successful: true,
|
|
12059
12054
|
response: nextStep.payload,
|
|
12055
|
+
recaptchaAction: nextOptions?.recaptchaAction,
|
|
12060
12056
|
});
|
|
12061
12057
|
}
|
|
12062
12058
|
else if (nextStep.type === StepType.LoginFailure) {
|
|
@@ -12159,6 +12155,7 @@ function initialize$4(initOptions) {
|
|
|
12159
12155
|
step: restartedStep,
|
|
12160
12156
|
successful: false,
|
|
12161
12157
|
response: null,
|
|
12158
|
+
recaptchaAction: null,
|
|
12162
12159
|
});
|
|
12163
12160
|
}
|
|
12164
12161
|
else if (restartedStep.type === StepType.LoginSuccess) {
|
|
@@ -12170,6 +12167,7 @@ function initialize$4(initOptions) {
|
|
|
12170
12167
|
step: null,
|
|
12171
12168
|
successful: true,
|
|
12172
12169
|
response: restartedStep.payload,
|
|
12170
|
+
recaptchaAction: null,
|
|
12173
12171
|
});
|
|
12174
12172
|
}
|
|
12175
12173
|
else {
|
|
@@ -12186,6 +12184,7 @@ function initialize$4(initOptions) {
|
|
|
12186
12184
|
step: null,
|
|
12187
12185
|
successful: false,
|
|
12188
12186
|
response: restartedStep.payload,
|
|
12187
|
+
recaptchaAction: null,
|
|
12189
12188
|
});
|
|
12190
12189
|
}
|
|
12191
12190
|
}
|
|
@@ -12217,6 +12216,9 @@ function initialize$4(initOptions) {
|
|
|
12217
12216
|
};
|
|
12218
12217
|
}
|
|
12219
12218
|
}
|
|
12219
|
+
if (!startOptions?.recaptchaAction && startOptions?.tree) {
|
|
12220
|
+
startOptions.recaptchaAction = startOptions.tree;
|
|
12221
|
+
}
|
|
12220
12222
|
await stack.push(startOptions);
|
|
12221
12223
|
await next(undefined, startOptions);
|
|
12222
12224
|
}
|
|
@@ -12229,6 +12231,7 @@ function initialize$4(initOptions) {
|
|
|
12229
12231
|
step: null,
|
|
12230
12232
|
successful: false,
|
|
12231
12233
|
response: null,
|
|
12234
|
+
recaptchaAction: null,
|
|
12232
12235
|
});
|
|
12233
12236
|
}
|
|
12234
12237
|
return {
|
|
@@ -12451,6 +12454,7 @@ const styleSchema = z
|
|
|
12451
12454
|
.object({
|
|
12452
12455
|
checksAndRadios: z.union([z.literal('animated'), z.literal('standard')]).optional(),
|
|
12453
12456
|
labels: z.union([z.literal('floating').optional(), z.literal('stacked')]).optional(),
|
|
12457
|
+
showPassword: z.union([z.literal('none'), z.literal('button'), z.literal('checkbox')]).optional(),
|
|
12454
12458
|
logo: logoSchema.optional(),
|
|
12455
12459
|
sections: z
|
|
12456
12460
|
.object({
|
|
@@ -12470,6 +12474,7 @@ styleSchema.partial();
|
|
|
12470
12474
|
const fallbackStyles = {
|
|
12471
12475
|
checksAndRadios: 'animated',
|
|
12472
12476
|
labels: 'floating',
|
|
12477
|
+
showPassword: 'button',
|
|
12473
12478
|
logo: undefined,
|
|
12474
12479
|
sections: undefined,
|
|
12475
12480
|
stage: undefined,
|
|
@@ -12483,8 +12488,19 @@ const styleStore = writable(fallbackStyles);
|
|
|
12483
12488
|
*/
|
|
12484
12489
|
function initialize(customStyle) {
|
|
12485
12490
|
if (customStyle) {
|
|
12486
|
-
|
|
12487
|
-
|
|
12491
|
+
/*
|
|
12492
|
+
Helper function to safely assign keys to strict object
|
|
12493
|
+
*/
|
|
12494
|
+
const accessStrictType = (str) => {
|
|
12495
|
+
return customStyle[str];
|
|
12496
|
+
};
|
|
12497
|
+
const newStyleConfig = Object.keys(customStyle).reduce((acc, key) => {
|
|
12498
|
+
if (accessStrictType(key) === undefined || accessStrictType(key) === null) {
|
|
12499
|
+
return acc;
|
|
12500
|
+
}
|
|
12501
|
+
return { ...acc, [key]: accessStrictType(key) };
|
|
12502
|
+
}, fallbackStyles);
|
|
12503
|
+
styleStore.set(newStyleConfig);
|
|
12488
12504
|
}
|
|
12489
12505
|
else {
|
|
12490
12506
|
styleStore.set(fallbackStyles);
|
|
@@ -12646,6 +12662,7 @@ function widgetApiFactory(componentApi) {
|
|
|
12646
12662
|
}
|
|
12647
12663
|
else {
|
|
12648
12664
|
journeyStore.start({
|
|
12665
|
+
recaptchaAction: startOptions?.recaptchaAction,
|
|
12649
12666
|
...startOptions?.forgerock,
|
|
12650
12667
|
// Only include a `tree` property if the `journey` options prop is truthy
|
|
12651
12668
|
...(startOptions?.journey && { tree: startOptions?.journey }),
|
|
@@ -12833,7 +12850,7 @@ function create_else_block$d(ctx) {
|
|
|
12833
12850
|
}
|
|
12834
12851
|
|
|
12835
12852
|
// (11:0) {#if html}
|
|
12836
|
-
function create_if_block$
|
|
12853
|
+
function create_if_block$w(ctx) {
|
|
12837
12854
|
let current;
|
|
12838
12855
|
const default_slot_template = /*#slots*/ ctx[5].default;
|
|
12839
12856
|
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[4], null);
|
|
@@ -12935,7 +12952,7 @@ function create_fragment$18(ctx) {
|
|
|
12935
12952
|
let if_block;
|
|
12936
12953
|
let if_block_anchor;
|
|
12937
12954
|
let current;
|
|
12938
|
-
const if_block_creators = [create_if_block$
|
|
12955
|
+
const if_block_creators = [create_if_block$w, create_else_block$d];
|
|
12939
12956
|
const if_blocks = [];
|
|
12940
12957
|
|
|
12941
12958
|
function select_block_type(ctx, dirty) {
|
|
@@ -13150,7 +13167,7 @@ function create_else_block$c(ctx) {
|
|
|
13150
13167
|
}
|
|
13151
13168
|
});
|
|
13152
13169
|
|
|
13153
|
-
let if_block = /*$styleStore*/ ctx[5]?.logo && create_if_block_1$
|
|
13170
|
+
let if_block = /*$styleStore*/ ctx[5]?.logo && create_if_block_1$h(ctx);
|
|
13154
13171
|
|
|
13155
13172
|
return {
|
|
13156
13173
|
c() {
|
|
@@ -13196,7 +13213,7 @@ function create_else_block$c(ctx) {
|
|
|
13196
13213
|
if (if_block) {
|
|
13197
13214
|
if_block.p(ctx, dirty);
|
|
13198
13215
|
} else {
|
|
13199
|
-
if_block = create_if_block_1$
|
|
13216
|
+
if_block = create_if_block_1$h(ctx);
|
|
13200
13217
|
if_block.c();
|
|
13201
13218
|
if_block.m(div, null);
|
|
13202
13219
|
}
|
|
@@ -13231,7 +13248,7 @@ function create_else_block$c(ctx) {
|
|
|
13231
13248
|
}
|
|
13232
13249
|
|
|
13233
13250
|
// (39:2) {#if withHeader}
|
|
13234
|
-
function create_if_block$
|
|
13251
|
+
function create_if_block$v(ctx) {
|
|
13235
13252
|
let div1;
|
|
13236
13253
|
let div0;
|
|
13237
13254
|
let div0_style_value;
|
|
@@ -13353,7 +13370,7 @@ function create_default_slot_1$i(ctx) {
|
|
|
13353
13370
|
}
|
|
13354
13371
|
|
|
13355
13372
|
// (77:6) {#if $styleStore?.logo}
|
|
13356
|
-
function create_if_block_1$
|
|
13373
|
+
function create_if_block_1$h(ctx) {
|
|
13357
13374
|
let div;
|
|
13358
13375
|
let div_style_value;
|
|
13359
13376
|
|
|
@@ -13415,7 +13432,7 @@ function create_fragment$16(ctx) {
|
|
|
13415
13432
|
let div;
|
|
13416
13433
|
let dialog_class_value;
|
|
13417
13434
|
let current;
|
|
13418
|
-
const if_block_creators = [create_if_block$
|
|
13435
|
+
const if_block_creators = [create_if_block$v, create_else_block$c];
|
|
13419
13436
|
const if_blocks = [];
|
|
13420
13437
|
|
|
13421
13438
|
function select_block_type(ctx, dirty) {
|
|
@@ -13943,7 +13960,7 @@ function create_else_block$b(ctx) {
|
|
|
13943
13960
|
}
|
|
13944
13961
|
|
|
13945
13962
|
// (44:33)
|
|
13946
|
-
function create_if_block_1$
|
|
13963
|
+
function create_if_block_1$g(ctx) {
|
|
13947
13964
|
let warningicon;
|
|
13948
13965
|
let current;
|
|
13949
13966
|
warningicon = new Warning_icon({});
|
|
@@ -13972,7 +13989,7 @@ function create_if_block_1$e(ctx) {
|
|
|
13972
13989
|
}
|
|
13973
13990
|
|
|
13974
13991
|
// (42:4) {#if type === 'error'}
|
|
13975
|
-
function create_if_block$
|
|
13992
|
+
function create_if_block$u(ctx) {
|
|
13976
13993
|
let alerticon;
|
|
13977
13994
|
let current;
|
|
13978
13995
|
alerticon = new Alert_icon({});
|
|
@@ -14010,7 +14027,7 @@ function create_fragment$12(ctx) {
|
|
|
14010
14027
|
let div_class_value;
|
|
14011
14028
|
let div_role_value;
|
|
14012
14029
|
let current;
|
|
14013
|
-
const if_block_creators = [create_if_block$
|
|
14030
|
+
const if_block_creators = [create_if_block$u, create_if_block_1$g, create_else_block$b];
|
|
14014
14031
|
const if_blocks = [];
|
|
14015
14032
|
|
|
14016
14033
|
function select_block_type(ctx, dirty) {
|
|
@@ -14250,7 +14267,7 @@ class Spinner extends SvelteComponent {
|
|
|
14250
14267
|
|
|
14251
14268
|
/* src/lib/components/primitives/button/button.svelte generated by Svelte v3.59.2 */
|
|
14252
14269
|
|
|
14253
|
-
function create_if_block$
|
|
14270
|
+
function create_if_block$t(ctx) {
|
|
14254
14271
|
let spinner;
|
|
14255
14272
|
let current;
|
|
14256
14273
|
|
|
@@ -14308,7 +14325,7 @@ function create_fragment$10(ctx) {
|
|
|
14308
14325
|
let current;
|
|
14309
14326
|
let mounted;
|
|
14310
14327
|
let dispose;
|
|
14311
|
-
let if_block = /*busy*/ ctx[0] && create_if_block$
|
|
14328
|
+
let if_block = /*busy*/ ctx[0] && create_if_block$t();
|
|
14312
14329
|
const default_slot_template = /*#slots*/ ctx[7].default;
|
|
14313
14330
|
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[6], null);
|
|
14314
14331
|
const default_slot_or_fallback = default_slot || fallback_block$1();
|
|
@@ -14350,7 +14367,7 @@ function create_fragment$10(ctx) {
|
|
|
14350
14367
|
transition_in(if_block, 1);
|
|
14351
14368
|
}
|
|
14352
14369
|
} else {
|
|
14353
|
-
if_block = create_if_block$
|
|
14370
|
+
if_block = create_if_block$t();
|
|
14354
14371
|
if_block.c();
|
|
14355
14372
|
transition_in(if_block, 1);
|
|
14356
14373
|
if_block.m(button, t);
|
|
@@ -14753,7 +14770,7 @@ function create_else_block$a(ctx) {
|
|
|
14753
14770
|
}
|
|
14754
14771
|
|
|
14755
14772
|
// (10:0) {#if html}
|
|
14756
|
-
function create_if_block$
|
|
14773
|
+
function create_if_block$s(ctx) {
|
|
14757
14774
|
let current;
|
|
14758
14775
|
const default_slot_template = /*#slots*/ ctx[4].default;
|
|
14759
14776
|
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[3], null);
|
|
@@ -14855,7 +14872,7 @@ function create_fragment$_(ctx) {
|
|
|
14855
14872
|
let if_block;
|
|
14856
14873
|
let if_block_anchor;
|
|
14857
14874
|
let current;
|
|
14858
|
-
const if_block_creators = [create_if_block$
|
|
14875
|
+
const if_block_creators = [create_if_block$s, create_else_block$a];
|
|
14859
14876
|
const if_blocks = [];
|
|
14860
14877
|
|
|
14861
14878
|
function select_block_type(ctx, dirty) {
|
|
@@ -15050,7 +15067,7 @@ class Shield_icon extends SvelteComponent {
|
|
|
15050
15067
|
|
|
15051
15068
|
/* src/lib/journey/stages/_utilities/back-to.svelte generated by Svelte v3.59.2 */
|
|
15052
15069
|
|
|
15053
|
-
function create_if_block$
|
|
15070
|
+
function create_if_block$r(ctx) {
|
|
15054
15071
|
let p;
|
|
15055
15072
|
let button;
|
|
15056
15073
|
let t_value = interpolate(/*string*/ ctx[1]) + "";
|
|
@@ -15088,7 +15105,7 @@ function create_if_block$q(ctx) {
|
|
|
15088
15105
|
|
|
15089
15106
|
function create_fragment$Y(ctx) {
|
|
15090
15107
|
let if_block_anchor;
|
|
15091
|
-
let if_block = /*$stack*/ ctx[2].length > 1 && create_if_block$
|
|
15108
|
+
let if_block = /*$stack*/ ctx[2].length > 1 && create_if_block$r(ctx);
|
|
15092
15109
|
|
|
15093
15110
|
return {
|
|
15094
15111
|
c() {
|
|
@@ -15104,7 +15121,7 @@ function create_fragment$Y(ctx) {
|
|
|
15104
15121
|
if (if_block) {
|
|
15105
15122
|
if_block.p(ctx, dirty);
|
|
15106
15123
|
} else {
|
|
15107
|
-
if_block = create_if_block$
|
|
15124
|
+
if_block = create_if_block$r(ctx);
|
|
15108
15125
|
if_block.c();
|
|
15109
15126
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
15110
15127
|
}
|
|
@@ -15627,7 +15644,7 @@ function getAttributeValidationFailureText(callback) {
|
|
|
15627
15644
|
|
|
15628
15645
|
/* src/lib/components/primitives/message/input-message.svelte generated by Svelte v3.59.2 */
|
|
15629
15646
|
|
|
15630
|
-
function create_if_block$
|
|
15647
|
+
function create_if_block$q(ctx) {
|
|
15631
15648
|
let p;
|
|
15632
15649
|
let p_class_value;
|
|
15633
15650
|
let p_id_value;
|
|
@@ -15660,7 +15677,7 @@ function create_if_block$p(ctx) {
|
|
|
15660
15677
|
|
|
15661
15678
|
function create_fragment$X(ctx) {
|
|
15662
15679
|
let if_block_anchor;
|
|
15663
|
-
let if_block = /*dirtyMessage*/ ctx[1] && create_if_block$
|
|
15680
|
+
let if_block = /*dirtyMessage*/ ctx[1] && create_if_block$q(ctx);
|
|
15664
15681
|
|
|
15665
15682
|
return {
|
|
15666
15683
|
c() {
|
|
@@ -15676,7 +15693,7 @@ function create_fragment$X(ctx) {
|
|
|
15676
15693
|
if (if_block) {
|
|
15677
15694
|
if_block.p(ctx, dirty);
|
|
15678
15695
|
} else {
|
|
15679
|
-
if_block = create_if_block$
|
|
15696
|
+
if_block = create_if_block$q(ctx);
|
|
15680
15697
|
if_block.c();
|
|
15681
15698
|
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
15682
15699
|
}
|
|
@@ -17584,7 +17601,7 @@ function get_each_context$a(ctx, list, i) {
|
|
|
17584
17601
|
}
|
|
17585
17602
|
|
|
17586
17603
|
// (39:0) {#if labelOrder === 'first'}
|
|
17587
|
-
function create_if_block_1$
|
|
17604
|
+
function create_if_block_1$f(ctx) {
|
|
17588
17605
|
let label_1;
|
|
17589
17606
|
let current;
|
|
17590
17607
|
|
|
@@ -17693,7 +17710,7 @@ function create_each_block$a(ctx) {
|
|
|
17693
17710
|
}
|
|
17694
17711
|
|
|
17695
17712
|
// (61:0) {#if labelOrder === 'last'}
|
|
17696
|
-
function create_if_block$
|
|
17713
|
+
function create_if_block$p(ctx) {
|
|
17697
17714
|
let label_1;
|
|
17698
17715
|
let current;
|
|
17699
17716
|
|
|
@@ -17775,7 +17792,7 @@ function create_fragment$O(ctx) {
|
|
|
17775
17792
|
let current;
|
|
17776
17793
|
let mounted;
|
|
17777
17794
|
let dispose;
|
|
17778
|
-
let if_block0 = /*labelOrder*/ ctx[7] === 'first' && create_if_block_1$
|
|
17795
|
+
let if_block0 = /*labelOrder*/ ctx[7] === 'first' && create_if_block_1$f(ctx);
|
|
17779
17796
|
let each_value = /*options*/ ctx[8];
|
|
17780
17797
|
let each_blocks = [];
|
|
17781
17798
|
|
|
@@ -17783,7 +17800,7 @@ function create_fragment$O(ctx) {
|
|
|
17783
17800
|
each_blocks[i] = create_each_block$a(get_each_context$a(ctx, each_value, i));
|
|
17784
17801
|
}
|
|
17785
17802
|
|
|
17786
|
-
let if_block1 = /*labelOrder*/ ctx[7] === 'last' && create_if_block$
|
|
17803
|
+
let if_block1 = /*labelOrder*/ ctx[7] === 'last' && create_if_block$p(ctx);
|
|
17787
17804
|
|
|
17788
17805
|
return {
|
|
17789
17806
|
c() {
|
|
@@ -17839,7 +17856,7 @@ function create_fragment$O(ctx) {
|
|
|
17839
17856
|
transition_in(if_block0, 1);
|
|
17840
17857
|
}
|
|
17841
17858
|
} else {
|
|
17842
|
-
if_block0 = create_if_block_1$
|
|
17859
|
+
if_block0 = create_if_block_1$f(ctx);
|
|
17843
17860
|
if_block0.c();
|
|
17844
17861
|
transition_in(if_block0, 1);
|
|
17845
17862
|
if_block0.m(t0.parentNode, t0);
|
|
@@ -17907,7 +17924,7 @@ function create_fragment$O(ctx) {
|
|
|
17907
17924
|
transition_in(if_block1, 1);
|
|
17908
17925
|
}
|
|
17909
17926
|
} else {
|
|
17910
|
-
if_block1 = create_if_block$
|
|
17927
|
+
if_block1 = create_if_block$p(ctx);
|
|
17911
17928
|
if_block1.c();
|
|
17912
17929
|
transition_in(if_block1, 1);
|
|
17913
17930
|
if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
|
|
@@ -18413,7 +18430,7 @@ function create_else_block$9(ctx) {
|
|
|
18413
18430
|
}
|
|
18414
18431
|
|
|
18415
18432
|
// (52:0) {#if callbackMetadata?.platform?.displayType === 'radio'}
|
|
18416
|
-
function create_if_block$
|
|
18433
|
+
function create_if_block$o(ctx) {
|
|
18417
18434
|
let radio;
|
|
18418
18435
|
let current;
|
|
18419
18436
|
|
|
@@ -18468,7 +18485,7 @@ function create_fragment$L(ctx) {
|
|
|
18468
18485
|
let if_block;
|
|
18469
18486
|
let if_block_anchor;
|
|
18470
18487
|
let current;
|
|
18471
|
-
const if_block_creators = [create_if_block$
|
|
18488
|
+
const if_block_creators = [create_if_block$o, create_else_block$9];
|
|
18472
18489
|
const if_blocks = [];
|
|
18473
18490
|
|
|
18474
18491
|
function select_block_type(ctx, dirty) {
|
|
@@ -18790,12 +18807,12 @@ function create_else_block_1(ctx) {
|
|
|
18790
18807
|
}
|
|
18791
18808
|
|
|
18792
18809
|
// (80:0) {#if !stepMetadata?.derived.isStepSelfSubmittable()}
|
|
18793
|
-
function create_if_block$
|
|
18810
|
+
function create_if_block$n(ctx) {
|
|
18794
18811
|
let current_block_type_index;
|
|
18795
18812
|
let if_block;
|
|
18796
18813
|
let if_block_anchor;
|
|
18797
18814
|
let current;
|
|
18798
|
-
const if_block_creators = [create_if_block_1$
|
|
18815
|
+
const if_block_creators = [create_if_block_1$e, create_else_block$8];
|
|
18799
18816
|
const if_blocks = [];
|
|
18800
18817
|
|
|
18801
18818
|
function select_block_type_1(ctx, dirty) {
|
|
@@ -18860,7 +18877,7 @@ function create_if_block$m(ctx) {
|
|
|
18860
18877
|
}
|
|
18861
18878
|
|
|
18862
18879
|
// (104:6) <Button style={options.length > 1 && defaultChoice === Number(opt.value) ? 'primary' : buttonStyle} type="button" width="auto" onClick={() => setBtnValue(Number(opt.value))} >
|
|
18863
|
-
function create_default_slot_2$
|
|
18880
|
+
function create_default_slot_2$8(ctx) {
|
|
18864
18881
|
let t0_value = /*opt*/ ctx[15].text + "";
|
|
18865
18882
|
let t0;
|
|
18866
18883
|
let t1;
|
|
@@ -18901,7 +18918,7 @@ function create_each_block$9(ctx) {
|
|
|
18901
18918
|
type: "button",
|
|
18902
18919
|
width: "auto",
|
|
18903
18920
|
onClick: func,
|
|
18904
|
-
$$slots: { default: [create_default_slot_2$
|
|
18921
|
+
$$slots: { default: [create_default_slot_2$8] },
|
|
18905
18922
|
$$scope: { ctx }
|
|
18906
18923
|
}
|
|
18907
18924
|
});
|
|
@@ -19083,7 +19100,7 @@ function create_else_block$8(ctx) {
|
|
|
19083
19100
|
}
|
|
19084
19101
|
|
|
19085
19102
|
// (81:2) {#if options.length > 1}
|
|
19086
|
-
function create_if_block_1$
|
|
19103
|
+
function create_if_block_1$e(ctx) {
|
|
19087
19104
|
let select;
|
|
19088
19105
|
let current;
|
|
19089
19106
|
|
|
@@ -19156,7 +19173,7 @@ function create_fragment$J(ctx) {
|
|
|
19156
19173
|
let if_block;
|
|
19157
19174
|
let if_block_anchor;
|
|
19158
19175
|
let current;
|
|
19159
|
-
const if_block_creators = [create_if_block$
|
|
19176
|
+
const if_block_creators = [create_if_block$n, create_else_block_1];
|
|
19160
19177
|
const if_blocks = [];
|
|
19161
19178
|
|
|
19162
19179
|
function select_block_type(ctx, dirty) {
|
|
@@ -19790,7 +19807,7 @@ function create_if_block_3$8(ctx) {
|
|
|
19790
19807
|
}
|
|
19791
19808
|
|
|
19792
19809
|
// (97:0) {#if type === 'phone'}
|
|
19793
|
-
function create_if_block_2$
|
|
19810
|
+
function create_if_block_2$a(ctx) {
|
|
19794
19811
|
let input;
|
|
19795
19812
|
let input_aria_describedby_value;
|
|
19796
19813
|
let input_class_value;
|
|
@@ -19870,7 +19887,7 @@ function create_if_block_2$9(ctx) {
|
|
|
19870
19887
|
}
|
|
19871
19888
|
|
|
19872
19889
|
// (113:0) {#if type === 'text'}
|
|
19873
|
-
function create_if_block_1$
|
|
19890
|
+
function create_if_block_1$d(ctx) {
|
|
19874
19891
|
let input;
|
|
19875
19892
|
let input_aria_describedby_value;
|
|
19876
19893
|
let input_class_value;
|
|
@@ -19950,7 +19967,7 @@ function create_if_block_1$b(ctx) {
|
|
|
19950
19967
|
}
|
|
19951
19968
|
|
|
19952
19969
|
// (129:0) {#if labelOrder === 'last'}
|
|
19953
|
-
function create_if_block$
|
|
19970
|
+
function create_if_block$m(ctx) {
|
|
19954
19971
|
let label_1;
|
|
19955
19972
|
let current;
|
|
19956
19973
|
|
|
@@ -20032,9 +20049,9 @@ function create_fragment$I(ctx) {
|
|
|
20032
20049
|
let if_block2 = /*type*/ ctx[11] === 'email' && create_if_block_5$2(ctx);
|
|
20033
20050
|
let if_block3 = /*type*/ ctx[11] === 'number' && create_if_block_4$5(ctx);
|
|
20034
20051
|
let if_block4 = /*type*/ ctx[11] === 'password' && create_if_block_3$8(ctx);
|
|
20035
|
-
let if_block5 = /*type*/ ctx[11] === 'phone' && create_if_block_2$
|
|
20036
|
-
let if_block6 = /*type*/ ctx[11] === 'text' && create_if_block_1$
|
|
20037
|
-
let if_block7 = /*labelOrder*/ ctx[6] === 'last' && create_if_block$
|
|
20052
|
+
let if_block5 = /*type*/ ctx[11] === 'phone' && create_if_block_2$a(ctx);
|
|
20053
|
+
let if_block6 = /*type*/ ctx[11] === 'text' && create_if_block_1$d(ctx);
|
|
20054
|
+
let if_block7 = /*labelOrder*/ ctx[6] === 'last' && create_if_block$m(ctx);
|
|
20038
20055
|
|
|
20039
20056
|
return {
|
|
20040
20057
|
c() {
|
|
@@ -20154,7 +20171,7 @@ function create_fragment$I(ctx) {
|
|
|
20154
20171
|
if (if_block5) {
|
|
20155
20172
|
if_block5.p(ctx, dirty);
|
|
20156
20173
|
} else {
|
|
20157
|
-
if_block5 = create_if_block_2$
|
|
20174
|
+
if_block5 = create_if_block_2$a(ctx);
|
|
20158
20175
|
if_block5.c();
|
|
20159
20176
|
if_block5.m(t5.parentNode, t5);
|
|
20160
20177
|
}
|
|
@@ -20167,7 +20184,7 @@ function create_fragment$I(ctx) {
|
|
|
20167
20184
|
if (if_block6) {
|
|
20168
20185
|
if_block6.p(ctx, dirty);
|
|
20169
20186
|
} else {
|
|
20170
|
-
if_block6 = create_if_block_1$
|
|
20187
|
+
if_block6 = create_if_block_1$d(ctx);
|
|
20171
20188
|
if_block6.c();
|
|
20172
20189
|
if_block6.m(t6.parentNode, t6);
|
|
20173
20190
|
}
|
|
@@ -20184,7 +20201,7 @@ function create_fragment$I(ctx) {
|
|
|
20184
20201
|
transition_in(if_block7, 1);
|
|
20185
20202
|
}
|
|
20186
20203
|
} else {
|
|
20187
|
-
if_block7 = create_if_block$
|
|
20204
|
+
if_block7 = create_if_block$m(ctx);
|
|
20188
20205
|
if_block7.c();
|
|
20189
20206
|
transition_in(if_block7, 1);
|
|
20190
20207
|
if_block7.m(if_block7_anchor.parentNode, if_block7_anchor);
|
|
@@ -21043,7 +21060,7 @@ class Lock_icon extends SvelteComponent {
|
|
|
21043
21060
|
|
|
21044
21061
|
/* src/lib/journey/callbacks/kba/kba-create.svelte generated by Svelte v3.59.2 */
|
|
21045
21062
|
|
|
21046
|
-
function create_if_block$
|
|
21063
|
+
function create_if_block$l(ctx) {
|
|
21047
21064
|
let input;
|
|
21048
21065
|
let current;
|
|
21049
21066
|
|
|
@@ -21124,7 +21141,7 @@ function create_fragment$E(ctx) {
|
|
|
21124
21141
|
}
|
|
21125
21142
|
});
|
|
21126
21143
|
|
|
21127
|
-
let if_block = /*displayCustomQuestionInput*/ ctx[3] && create_if_block$
|
|
21144
|
+
let if_block = /*displayCustomQuestionInput*/ ctx[3] && create_if_block$l(ctx);
|
|
21128
21145
|
|
|
21129
21146
|
function input_value_binding(value) {
|
|
21130
21147
|
/*input_value_binding*/ ctx[21](value);
|
|
@@ -21203,7 +21220,7 @@ function create_fragment$E(ctx) {
|
|
|
21203
21220
|
transition_in(if_block, 1);
|
|
21204
21221
|
}
|
|
21205
21222
|
} else {
|
|
21206
|
-
if_block = create_if_block$
|
|
21223
|
+
if_block = create_if_block$l(ctx);
|
|
21207
21224
|
if_block.c();
|
|
21208
21225
|
transition_in(if_block, 1);
|
|
21209
21226
|
if_block.m(fieldset, t6);
|
|
@@ -21689,7 +21706,7 @@ function create_else_block$7(ctx) {
|
|
|
21689
21706
|
}
|
|
21690
21707
|
|
|
21691
21708
|
// (6:0) {#if !visible}
|
|
21692
|
-
function create_if_block$
|
|
21709
|
+
function create_if_block$k(ctx) {
|
|
21693
21710
|
let svg;
|
|
21694
21711
|
let path0;
|
|
21695
21712
|
let path1;
|
|
@@ -21775,7 +21792,7 @@ function create_fragment$C(ctx) {
|
|
|
21775
21792
|
let if_block;
|
|
21776
21793
|
let if_block_anchor;
|
|
21777
21794
|
let current;
|
|
21778
|
-
const if_block_creators = [create_if_block$
|
|
21795
|
+
const if_block_creators = [create_if_block$k, create_else_block$7];
|
|
21779
21796
|
const if_blocks = [];
|
|
21780
21797
|
|
|
21781
21798
|
function select_block_type(ctx, dirty) {
|
|
@@ -21864,10 +21881,10 @@ class Eye_icon extends SvelteComponent {
|
|
|
21864
21881
|
|
|
21865
21882
|
/* src/lib/journey/callbacks/password/confirm-input.svelte generated by Svelte v3.59.2 */
|
|
21866
21883
|
|
|
21867
|
-
function
|
|
21884
|
+
function create_default_slot_2$7(ctx) {
|
|
21868
21885
|
let current;
|
|
21869
|
-
const default_slot_template = /*#slots*/ ctx[
|
|
21870
|
-
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[
|
|
21886
|
+
const default_slot_template = /*#slots*/ ctx[17].default;
|
|
21887
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[18], null);
|
|
21871
21888
|
|
|
21872
21889
|
return {
|
|
21873
21890
|
c() {
|
|
@@ -21882,15 +21899,15 @@ function create_default_slot_1$e(ctx) {
|
|
|
21882
21899
|
},
|
|
21883
21900
|
p(ctx, dirty) {
|
|
21884
21901
|
if (default_slot) {
|
|
21885
|
-
if (default_slot.p && (!current || dirty & /*$$scope*/
|
|
21902
|
+
if (default_slot.p && (!current || dirty & /*$$scope*/ 262144)) {
|
|
21886
21903
|
update_slot_base(
|
|
21887
21904
|
default_slot,
|
|
21888
21905
|
default_slot_template,
|
|
21889
21906
|
ctx,
|
|
21890
|
-
/*$$scope*/ ctx[
|
|
21907
|
+
/*$$scope*/ ctx[18],
|
|
21891
21908
|
!current
|
|
21892
|
-
? get_all_dirty_from_scope(/*$$scope*/ ctx[
|
|
21893
|
-
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[
|
|
21909
|
+
? get_all_dirty_from_scope(/*$$scope*/ ctx[18])
|
|
21910
|
+
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[18], dirty, null),
|
|
21894
21911
|
null
|
|
21895
21912
|
);
|
|
21896
21913
|
}
|
|
@@ -21911,8 +21928,70 @@ function create_default_slot_1$e(ctx) {
|
|
|
21911
21928
|
};
|
|
21912
21929
|
}
|
|
21913
21930
|
|
|
21914
|
-
// (
|
|
21915
|
-
function
|
|
21931
|
+
// (66:6) {#if showPassword === "button"}
|
|
21932
|
+
function create_if_block_1$c(ctx) {
|
|
21933
|
+
let button;
|
|
21934
|
+
let eyeicon;
|
|
21935
|
+
let current;
|
|
21936
|
+
let mounted;
|
|
21937
|
+
let dispose;
|
|
21938
|
+
|
|
21939
|
+
eyeicon = new Eye_icon({
|
|
21940
|
+
props: {
|
|
21941
|
+
classes: "tw_password-icon dark:tw_password-icon_dark",
|
|
21942
|
+
visible: /*isVisible*/ ctx[8],
|
|
21943
|
+
$$slots: { default: [create_default_slot_1$e] },
|
|
21944
|
+
$$scope: { ctx }
|
|
21945
|
+
}
|
|
21946
|
+
});
|
|
21947
|
+
|
|
21948
|
+
return {
|
|
21949
|
+
c() {
|
|
21950
|
+
button = element("button");
|
|
21951
|
+
create_component(eyeicon.$$.fragment);
|
|
21952
|
+
attr(button, "class", `tw_password-button dark:tw_password-button_dark tw_focusable-element tw_input-base dark:tw_input-base_dark`);
|
|
21953
|
+
attr(button, "type", "button");
|
|
21954
|
+
},
|
|
21955
|
+
m(target, anchor) {
|
|
21956
|
+
insert(target, button, anchor);
|
|
21957
|
+
mount_component(eyeicon, button, null);
|
|
21958
|
+
current = true;
|
|
21959
|
+
|
|
21960
|
+
if (!mounted) {
|
|
21961
|
+
dispose = listen(button, "click", /*toggleVisibility*/ ctx[14]);
|
|
21962
|
+
mounted = true;
|
|
21963
|
+
}
|
|
21964
|
+
},
|
|
21965
|
+
p(ctx, dirty) {
|
|
21966
|
+
const eyeicon_changes = {};
|
|
21967
|
+
if (dirty & /*isVisible*/ 256) eyeicon_changes.visible = /*isVisible*/ ctx[8];
|
|
21968
|
+
|
|
21969
|
+
if (dirty & /*$$scope*/ 262144) {
|
|
21970
|
+
eyeicon_changes.$$scope = { dirty, ctx };
|
|
21971
|
+
}
|
|
21972
|
+
|
|
21973
|
+
eyeicon.$set(eyeicon_changes);
|
|
21974
|
+
},
|
|
21975
|
+
i(local) {
|
|
21976
|
+
if (current) return;
|
|
21977
|
+
transition_in(eyeicon.$$.fragment, local);
|
|
21978
|
+
current = true;
|
|
21979
|
+
},
|
|
21980
|
+
o(local) {
|
|
21981
|
+
transition_out(eyeicon.$$.fragment, local);
|
|
21982
|
+
current = false;
|
|
21983
|
+
},
|
|
21984
|
+
d(detaching) {
|
|
21985
|
+
if (detaching) detach(button);
|
|
21986
|
+
destroy_component(eyeicon);
|
|
21987
|
+
mounted = false;
|
|
21988
|
+
dispose();
|
|
21989
|
+
}
|
|
21990
|
+
};
|
|
21991
|
+
}
|
|
21992
|
+
|
|
21993
|
+
// (72:10) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible}>
|
|
21994
|
+
function create_default_slot_1$e(ctx) {
|
|
21916
21995
|
let t;
|
|
21917
21996
|
let current;
|
|
21918
21997
|
t = new Locale_strings({ props: { key: "showPassword" } });
|
|
@@ -21941,18 +22020,54 @@ function create_default_slot$k(ctx) {
|
|
|
21941
22020
|
};
|
|
21942
22021
|
}
|
|
21943
22022
|
|
|
21944
|
-
// (
|
|
22023
|
+
// (65:1) <svelte:fragment slot="input-button">
|
|
21945
22024
|
function create_input_button_slot$1(ctx) {
|
|
21946
|
-
let
|
|
21947
|
-
let eyeicon;
|
|
22025
|
+
let if_block_anchor;
|
|
21948
22026
|
let current;
|
|
21949
|
-
let
|
|
21950
|
-
let dispose;
|
|
22027
|
+
let if_block = /*showPassword*/ ctx[12] === "button" && create_if_block_1$c(ctx);
|
|
21951
22028
|
|
|
21952
|
-
|
|
22029
|
+
return {
|
|
22030
|
+
c() {
|
|
22031
|
+
if (if_block) if_block.c();
|
|
22032
|
+
if_block_anchor = empty();
|
|
22033
|
+
},
|
|
22034
|
+
m(target, anchor) {
|
|
22035
|
+
if (if_block) if_block.m(target, anchor);
|
|
22036
|
+
insert(target, if_block_anchor, anchor);
|
|
22037
|
+
current = true;
|
|
22038
|
+
},
|
|
22039
|
+
p(ctx, dirty) {
|
|
22040
|
+
if (/*showPassword*/ ctx[12] === "button") if_block.p(ctx, dirty);
|
|
22041
|
+
},
|
|
22042
|
+
i(local) {
|
|
22043
|
+
if (current) return;
|
|
22044
|
+
transition_in(if_block);
|
|
22045
|
+
current = true;
|
|
22046
|
+
},
|
|
22047
|
+
o(local) {
|
|
22048
|
+
transition_out(if_block);
|
|
22049
|
+
current = false;
|
|
22050
|
+
},
|
|
22051
|
+
d(detaching) {
|
|
22052
|
+
if (if_block) if_block.d(detaching);
|
|
22053
|
+
if (detaching) detach(if_block_anchor);
|
|
22054
|
+
}
|
|
22055
|
+
};
|
|
22056
|
+
}
|
|
22057
|
+
|
|
22058
|
+
// (80:0) {#if showPassword === "checkbox"}
|
|
22059
|
+
function create_if_block$j(ctx) {
|
|
22060
|
+
let div;
|
|
22061
|
+
let checkbox;
|
|
22062
|
+
let current;
|
|
22063
|
+
|
|
22064
|
+
checkbox = new Checkbox({
|
|
21953
22065
|
props: {
|
|
21954
|
-
|
|
21955
|
-
|
|
22066
|
+
isFirstInvalidInput: /*isFirstInvalidInput*/ ctx[5],
|
|
22067
|
+
isInvalid: false,
|
|
22068
|
+
key: /*key*/ ctx[3] + /*style*/ ctx[4].showPassword,
|
|
22069
|
+
onChange: /*toggleVisibility*/ ctx[14],
|
|
22070
|
+
value: false,
|
|
21956
22071
|
$$slots: { default: [create_default_slot$k] },
|
|
21957
22072
|
$$scope: { ctx }
|
|
21958
22073
|
}
|
|
@@ -21960,117 +22075,149 @@ function create_input_button_slot$1(ctx) {
|
|
|
21960
22075
|
|
|
21961
22076
|
return {
|
|
21962
22077
|
c() {
|
|
21963
|
-
|
|
21964
|
-
create_component(
|
|
21965
|
-
attr(
|
|
21966
|
-
attr(button, "slot", "input-button");
|
|
21967
|
-
attr(button, "type", "button");
|
|
22078
|
+
div = element("div");
|
|
22079
|
+
create_component(checkbox.$$.fragment);
|
|
22080
|
+
attr(div, "class", "tw_w-full tw_input-spacing");
|
|
21968
22081
|
},
|
|
21969
22082
|
m(target, anchor) {
|
|
21970
|
-
insert(target,
|
|
21971
|
-
mount_component(
|
|
22083
|
+
insert(target, div, anchor);
|
|
22084
|
+
mount_component(checkbox, div, null);
|
|
21972
22085
|
current = true;
|
|
21973
|
-
|
|
21974
|
-
if (!mounted) {
|
|
21975
|
-
dispose = listen(button, "click", /*toggleVisibility*/ ctx[11]);
|
|
21976
|
-
mounted = true;
|
|
21977
|
-
}
|
|
21978
22086
|
},
|
|
21979
22087
|
p(ctx, dirty) {
|
|
21980
|
-
const
|
|
21981
|
-
if (dirty & /*
|
|
22088
|
+
const checkbox_changes = {};
|
|
22089
|
+
if (dirty & /*isFirstInvalidInput*/ 32) checkbox_changes.isFirstInvalidInput = /*isFirstInvalidInput*/ ctx[5];
|
|
22090
|
+
if (dirty & /*key, style*/ 24) checkbox_changes.key = /*key*/ ctx[3] + /*style*/ ctx[4].showPassword;
|
|
21982
22091
|
|
|
21983
|
-
if (dirty & /*$$scope*/
|
|
21984
|
-
|
|
22092
|
+
if (dirty & /*$$scope*/ 262144) {
|
|
22093
|
+
checkbox_changes.$$scope = { dirty, ctx };
|
|
21985
22094
|
}
|
|
21986
22095
|
|
|
21987
|
-
|
|
22096
|
+
checkbox.$set(checkbox_changes);
|
|
21988
22097
|
},
|
|
21989
22098
|
i(local) {
|
|
21990
22099
|
if (current) return;
|
|
21991
|
-
transition_in(
|
|
22100
|
+
transition_in(checkbox.$$.fragment, local);
|
|
21992
22101
|
current = true;
|
|
21993
22102
|
},
|
|
21994
22103
|
o(local) {
|
|
21995
|
-
transition_out(
|
|
22104
|
+
transition_out(checkbox.$$.fragment, local);
|
|
21996
22105
|
current = false;
|
|
21997
22106
|
},
|
|
21998
22107
|
d(detaching) {
|
|
21999
|
-
if (detaching) detach(
|
|
22000
|
-
destroy_component(
|
|
22001
|
-
|
|
22002
|
-
|
|
22108
|
+
if (detaching) detach(div);
|
|
22109
|
+
destroy_component(checkbox);
|
|
22110
|
+
}
|
|
22111
|
+
};
|
|
22112
|
+
}
|
|
22113
|
+
|
|
22114
|
+
// (82:6) <Checkbox {isFirstInvalidInput} isInvalid={false} key = {key + style.showPassword} onChange={toggleVisibility} value={false} >
|
|
22115
|
+
function create_default_slot$k(ctx) {
|
|
22116
|
+
let t;
|
|
22117
|
+
|
|
22118
|
+
return {
|
|
22119
|
+
c() {
|
|
22120
|
+
t = text("Show Password");
|
|
22121
|
+
},
|
|
22122
|
+
m(target, anchor) {
|
|
22123
|
+
insert(target, t, anchor);
|
|
22124
|
+
},
|
|
22125
|
+
d(detaching) {
|
|
22126
|
+
if (detaching) detach(t);
|
|
22003
22127
|
}
|
|
22004
22128
|
};
|
|
22005
22129
|
}
|
|
22006
22130
|
|
|
22007
22131
|
function create_fragment$B(ctx) {
|
|
22008
22132
|
let input;
|
|
22133
|
+
let t;
|
|
22134
|
+
let if_block_anchor;
|
|
22009
22135
|
let current;
|
|
22010
22136
|
|
|
22011
|
-
input = new /*Input*/ ctx[
|
|
22137
|
+
input = new /*Input*/ ctx[11]({
|
|
22012
22138
|
props: {
|
|
22013
22139
|
forceValidityFailure: /*forceValidityFailure*/ ctx[0],
|
|
22014
22140
|
isFirstInvalidInput: false,
|
|
22015
|
-
hasRightIcon:
|
|
22141
|
+
hasRightIcon: /*style*/ ctx[4].showPassword === 'button'
|
|
22142
|
+
? true
|
|
22143
|
+
: false,
|
|
22016
22144
|
key: `${/*key*/ ctx[3]}-confirm`,
|
|
22017
22145
|
label: interpolate('confirmPassword', null, 'Confirm Password'),
|
|
22018
|
-
message: /*message*/ ctx[
|
|
22019
|
-
onChange: /*onChangeWrapper*/ ctx[
|
|
22146
|
+
message: /*message*/ ctx[10],
|
|
22147
|
+
onChange: /*onChangeWrapper*/ ctx[13],
|
|
22020
22148
|
isInvalid: /*passwordsDoNotMatch*/ ctx[1],
|
|
22021
22149
|
isRequired: /*isRequired*/ ctx[2],
|
|
22022
|
-
showMessage: /*showMessage*/ ctx[
|
|
22023
|
-
type: /*type*/ ctx[
|
|
22024
|
-
value: typeof /*value*/ ctx[
|
|
22025
|
-
? /*value*/ ctx[
|
|
22150
|
+
showMessage: /*showMessage*/ ctx[6],
|
|
22151
|
+
type: /*type*/ ctx[9],
|
|
22152
|
+
value: typeof /*value*/ ctx[7] === 'string'
|
|
22153
|
+
? /*value*/ ctx[7]
|
|
22026
22154
|
: '',
|
|
22027
22155
|
$$slots: {
|
|
22028
22156
|
"input-button": [create_input_button_slot$1],
|
|
22029
|
-
default: [
|
|
22157
|
+
default: [create_default_slot_2$7]
|
|
22030
22158
|
},
|
|
22031
22159
|
$$scope: { ctx }
|
|
22032
22160
|
}
|
|
22033
22161
|
});
|
|
22034
22162
|
|
|
22163
|
+
let if_block = /*showPassword*/ ctx[12] === "checkbox" && create_if_block$j(ctx);
|
|
22164
|
+
|
|
22035
22165
|
return {
|
|
22036
22166
|
c() {
|
|
22037
22167
|
create_component(input.$$.fragment);
|
|
22168
|
+
t = space();
|
|
22169
|
+
if (if_block) if_block.c();
|
|
22170
|
+
if_block_anchor = empty();
|
|
22038
22171
|
},
|
|
22039
22172
|
m(target, anchor) {
|
|
22040
22173
|
mount_component(input, target, anchor);
|
|
22174
|
+
insert(target, t, anchor);
|
|
22175
|
+
if (if_block) if_block.m(target, anchor);
|
|
22176
|
+
insert(target, if_block_anchor, anchor);
|
|
22041
22177
|
current = true;
|
|
22042
22178
|
},
|
|
22043
22179
|
p(ctx, [dirty]) {
|
|
22044
22180
|
const input_changes = {};
|
|
22045
22181
|
if (dirty & /*forceValidityFailure*/ 1) input_changes.forceValidityFailure = /*forceValidityFailure*/ ctx[0];
|
|
22182
|
+
|
|
22183
|
+
if (dirty & /*style*/ 16) input_changes.hasRightIcon = /*style*/ ctx[4].showPassword === 'button'
|
|
22184
|
+
? true
|
|
22185
|
+
: false;
|
|
22186
|
+
|
|
22046
22187
|
if (dirty & /*key*/ 8) input_changes.key = `${/*key*/ ctx[3]}-confirm`;
|
|
22047
|
-
if (dirty & /*message*/
|
|
22188
|
+
if (dirty & /*message*/ 1024) input_changes.message = /*message*/ ctx[10];
|
|
22048
22189
|
if (dirty & /*passwordsDoNotMatch*/ 2) input_changes.isInvalid = /*passwordsDoNotMatch*/ ctx[1];
|
|
22049
22190
|
if (dirty & /*isRequired*/ 4) input_changes.isRequired = /*isRequired*/ ctx[2];
|
|
22050
|
-
if (dirty & /*showMessage*/
|
|
22051
|
-
if (dirty & /*type*/
|
|
22191
|
+
if (dirty & /*showMessage*/ 64) input_changes.showMessage = /*showMessage*/ ctx[6];
|
|
22192
|
+
if (dirty & /*type*/ 512) input_changes.type = /*type*/ ctx[9];
|
|
22052
22193
|
|
|
22053
|
-
if (dirty & /*value*/
|
|
22054
|
-
? /*value*/ ctx[
|
|
22194
|
+
if (dirty & /*value*/ 128) input_changes.value = typeof /*value*/ ctx[7] === 'string'
|
|
22195
|
+
? /*value*/ ctx[7]
|
|
22055
22196
|
: '';
|
|
22056
22197
|
|
|
22057
|
-
if (dirty & /*$$scope, isVisible*/
|
|
22198
|
+
if (dirty & /*$$scope, isVisible*/ 262400) {
|
|
22058
22199
|
input_changes.$$scope = { dirty, ctx };
|
|
22059
22200
|
}
|
|
22060
22201
|
|
|
22061
22202
|
input.$set(input_changes);
|
|
22203
|
+
if (/*showPassword*/ ctx[12] === "checkbox") if_block.p(ctx, dirty);
|
|
22062
22204
|
},
|
|
22063
22205
|
i(local) {
|
|
22064
22206
|
if (current) return;
|
|
22065
22207
|
transition_in(input.$$.fragment, local);
|
|
22208
|
+
transition_in(if_block);
|
|
22066
22209
|
current = true;
|
|
22067
22210
|
},
|
|
22068
22211
|
o(local) {
|
|
22069
22212
|
transition_out(input.$$.fragment, local);
|
|
22213
|
+
transition_out(if_block);
|
|
22070
22214
|
current = false;
|
|
22071
22215
|
},
|
|
22072
22216
|
d(detaching) {
|
|
22073
22217
|
destroy_component(input, detaching);
|
|
22218
|
+
if (detaching) detach(t);
|
|
22219
|
+
if (if_block) if_block.d(detaching);
|
|
22220
|
+
if (detaching) detach(if_block_anchor);
|
|
22074
22221
|
}
|
|
22075
22222
|
};
|
|
22076
22223
|
}
|
|
@@ -22084,7 +22231,9 @@ function instance$C($$self, $$props, $$invalidate) {
|
|
|
22084
22231
|
let { onChange } = $$props;
|
|
22085
22232
|
let { resetValue } = $$props;
|
|
22086
22233
|
let { style = {} } = $$props;
|
|
22234
|
+
let { isFirstInvalidInput } = $$props;
|
|
22087
22235
|
const Input = style.labels === 'stacked' ? Stacked_label : Floating_label;
|
|
22236
|
+
const showPassword = style.showPassword;
|
|
22088
22237
|
let { showMessage = undefined } = $$props;
|
|
22089
22238
|
let isVisible = false;
|
|
22090
22239
|
let type = 'password';
|
|
@@ -22092,7 +22241,7 @@ function instance$C($$self, $$props, $$invalidate) {
|
|
|
22092
22241
|
let message = '';
|
|
22093
22242
|
|
|
22094
22243
|
function onChangeWrapper(event) {
|
|
22095
|
-
$$invalidate(
|
|
22244
|
+
$$invalidate(7, value = event.target?.value);
|
|
22096
22245
|
|
|
22097
22246
|
// TODO: revisit this logic to avoid unnecessary ternary
|
|
22098
22247
|
onChange(typeof value === 'string' ? value : undefined);
|
|
@@ -22102,8 +22251,8 @@ function instance$C($$self, $$props, $$invalidate) {
|
|
|
22102
22251
|
* @function toggleVisibility - toggles the password from masked to plaintext
|
|
22103
22252
|
*/
|
|
22104
22253
|
function toggleVisibility() {
|
|
22105
|
-
$$invalidate(
|
|
22106
|
-
$$invalidate(
|
|
22254
|
+
$$invalidate(8, isVisible = !isVisible);
|
|
22255
|
+
$$invalidate(9, type = isVisible ? 'text' : 'password');
|
|
22107
22256
|
}
|
|
22108
22257
|
|
|
22109
22258
|
$$self.$$set = $$props => {
|
|
@@ -22111,27 +22260,28 @@ function instance$C($$self, $$props, $$invalidate) {
|
|
|
22111
22260
|
if ('passwordsDoNotMatch' in $$props) $$invalidate(1, passwordsDoNotMatch = $$props.passwordsDoNotMatch);
|
|
22112
22261
|
if ('isRequired' in $$props) $$invalidate(2, isRequired = $$props.isRequired);
|
|
22113
22262
|
if ('key' in $$props) $$invalidate(3, key = $$props.key);
|
|
22114
|
-
if ('onChange' in $$props) $$invalidate(
|
|
22115
|
-
if ('resetValue' in $$props) $$invalidate(
|
|
22116
|
-
if ('style' in $$props) $$invalidate(
|
|
22117
|
-
if ('
|
|
22118
|
-
if ('
|
|
22263
|
+
if ('onChange' in $$props) $$invalidate(15, onChange = $$props.onChange);
|
|
22264
|
+
if ('resetValue' in $$props) $$invalidate(16, resetValue = $$props.resetValue);
|
|
22265
|
+
if ('style' in $$props) $$invalidate(4, style = $$props.style);
|
|
22266
|
+
if ('isFirstInvalidInput' in $$props) $$invalidate(5, isFirstInvalidInput = $$props.isFirstInvalidInput);
|
|
22267
|
+
if ('showMessage' in $$props) $$invalidate(6, showMessage = $$props.showMessage);
|
|
22268
|
+
if ('$$scope' in $$props) $$invalidate(18, $$scope = $$props.$$scope);
|
|
22119
22269
|
};
|
|
22120
22270
|
|
|
22121
22271
|
$$self.$$.update = () => {
|
|
22122
|
-
if ($$self.$$.dirty & /*resetValue, onChange, value, passwordsDoNotMatch, isRequired*/
|
|
22272
|
+
if ($$self.$$.dirty & /*resetValue, onChange, value, passwordsDoNotMatch, isRequired*/ 98438) {
|
|
22123
22273
|
{
|
|
22124
22274
|
if (resetValue) {
|
|
22125
|
-
$$invalidate(
|
|
22275
|
+
$$invalidate(7, value = undefined);
|
|
22126
22276
|
onChange(value);
|
|
22127
22277
|
}
|
|
22128
22278
|
|
|
22129
22279
|
if (passwordsDoNotMatch) {
|
|
22130
|
-
$$invalidate(
|
|
22280
|
+
$$invalidate(10, message = interpolate('passwordConfirmationError', null, 'Passwords do not match'));
|
|
22131
22281
|
} else if (isRequired) {
|
|
22132
|
-
$$invalidate(
|
|
22282
|
+
$$invalidate(10, message = interpolate('requiredField', null, 'This field is required'));
|
|
22133
22283
|
} else {
|
|
22134
|
-
$$invalidate(
|
|
22284
|
+
$$invalidate(10, message = '');
|
|
22135
22285
|
}
|
|
22136
22286
|
}
|
|
22137
22287
|
}
|
|
@@ -22142,17 +22292,19 @@ function instance$C($$self, $$props, $$invalidate) {
|
|
|
22142
22292
|
passwordsDoNotMatch,
|
|
22143
22293
|
isRequired,
|
|
22144
22294
|
key,
|
|
22295
|
+
style,
|
|
22296
|
+
isFirstInvalidInput,
|
|
22145
22297
|
showMessage,
|
|
22146
22298
|
value,
|
|
22147
22299
|
isVisible,
|
|
22148
22300
|
type,
|
|
22149
22301
|
message,
|
|
22150
22302
|
Input,
|
|
22303
|
+
showPassword,
|
|
22151
22304
|
onChangeWrapper,
|
|
22152
22305
|
toggleVisibility,
|
|
22153
22306
|
onChange,
|
|
22154
22307
|
resetValue,
|
|
22155
|
-
style,
|
|
22156
22308
|
slots,
|
|
22157
22309
|
$$scope
|
|
22158
22310
|
];
|
|
@@ -22167,20 +22319,21 @@ class Confirm_input extends SvelteComponent {
|
|
|
22167
22319
|
passwordsDoNotMatch: 1,
|
|
22168
22320
|
isRequired: 2,
|
|
22169
22321
|
key: 3,
|
|
22170
|
-
onChange:
|
|
22171
|
-
resetValue:
|
|
22172
|
-
style:
|
|
22173
|
-
|
|
22322
|
+
onChange: 15,
|
|
22323
|
+
resetValue: 16,
|
|
22324
|
+
style: 4,
|
|
22325
|
+
isFirstInvalidInput: 5,
|
|
22326
|
+
showMessage: 6
|
|
22174
22327
|
});
|
|
22175
22328
|
}
|
|
22176
22329
|
}
|
|
22177
22330
|
|
|
22178
22331
|
/* src/lib/journey/callbacks/password/base.svelte generated by Svelte v3.59.2 */
|
|
22179
22332
|
|
|
22180
|
-
function
|
|
22333
|
+
function create_default_slot_2$6(ctx) {
|
|
22181
22334
|
let current;
|
|
22182
|
-
const default_slot_template = /*#slots*/ ctx[
|
|
22183
|
-
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[
|
|
22335
|
+
const default_slot_template = /*#slots*/ ctx[22].default;
|
|
22336
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[23], null);
|
|
22184
22337
|
|
|
22185
22338
|
return {
|
|
22186
22339
|
c() {
|
|
@@ -22195,15 +22348,15 @@ function create_default_slot_1$d(ctx) {
|
|
|
22195
22348
|
},
|
|
22196
22349
|
p(ctx, dirty) {
|
|
22197
22350
|
if (default_slot) {
|
|
22198
|
-
if (default_slot.p && (!current || dirty & /*$$scope*/
|
|
22351
|
+
if (default_slot.p && (!current || dirty & /*$$scope*/ 8388608)) {
|
|
22199
22352
|
update_slot_base(
|
|
22200
22353
|
default_slot,
|
|
22201
22354
|
default_slot_template,
|
|
22202
22355
|
ctx,
|
|
22203
|
-
/*$$scope*/ ctx[
|
|
22356
|
+
/*$$scope*/ ctx[23],
|
|
22204
22357
|
!current
|
|
22205
|
-
? get_all_dirty_from_scope(/*$$scope*/ ctx[
|
|
22206
|
-
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[
|
|
22358
|
+
? get_all_dirty_from_scope(/*$$scope*/ ctx[23])
|
|
22359
|
+
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[23], dirty, null),
|
|
22207
22360
|
null
|
|
22208
22361
|
);
|
|
22209
22362
|
}
|
|
@@ -22224,15 +22377,77 @@ function create_default_slot_1$d(ctx) {
|
|
|
22224
22377
|
};
|
|
22225
22378
|
}
|
|
22226
22379
|
|
|
22227
|
-
// (
|
|
22228
|
-
function
|
|
22229
|
-
let
|
|
22380
|
+
// (92:6) {#if showPassword === "button"}
|
|
22381
|
+
function create_if_block_2$9(ctx) {
|
|
22382
|
+
let button;
|
|
22383
|
+
let eyeicon;
|
|
22230
22384
|
let current;
|
|
22231
|
-
|
|
22385
|
+
let mounted;
|
|
22386
|
+
let dispose;
|
|
22387
|
+
|
|
22388
|
+
eyeicon = new Eye_icon({
|
|
22389
|
+
props: {
|
|
22390
|
+
classes: "tw_password-icon dark:tw_password-icon_dark",
|
|
22391
|
+
visible: /*isVisible*/ ctx[11],
|
|
22392
|
+
$$slots: { default: [create_default_slot_1$d] },
|
|
22393
|
+
$$scope: { ctx }
|
|
22394
|
+
}
|
|
22395
|
+
});
|
|
22232
22396
|
|
|
22233
22397
|
return {
|
|
22234
22398
|
c() {
|
|
22235
|
-
|
|
22399
|
+
button = element("button");
|
|
22400
|
+
create_component(eyeicon.$$.fragment);
|
|
22401
|
+
attr(button, "class", `tw_password-button dark:tw_password-button_dark tw_focusable-element tw_input-base dark:tw_input-base_dark`);
|
|
22402
|
+
attr(button, "type", "button");
|
|
22403
|
+
},
|
|
22404
|
+
m(target, anchor) {
|
|
22405
|
+
insert(target, button, anchor);
|
|
22406
|
+
mount_component(eyeicon, button, null);
|
|
22407
|
+
current = true;
|
|
22408
|
+
|
|
22409
|
+
if (!mounted) {
|
|
22410
|
+
dispose = listen(button, "click", /*toggleVisibility*/ ctx[19]);
|
|
22411
|
+
mounted = true;
|
|
22412
|
+
}
|
|
22413
|
+
},
|
|
22414
|
+
p(ctx, dirty) {
|
|
22415
|
+
const eyeicon_changes = {};
|
|
22416
|
+
if (dirty & /*isVisible*/ 2048) eyeicon_changes.visible = /*isVisible*/ ctx[11];
|
|
22417
|
+
|
|
22418
|
+
if (dirty & /*$$scope*/ 8388608) {
|
|
22419
|
+
eyeicon_changes.$$scope = { dirty, ctx };
|
|
22420
|
+
}
|
|
22421
|
+
|
|
22422
|
+
eyeicon.$set(eyeicon_changes);
|
|
22423
|
+
},
|
|
22424
|
+
i(local) {
|
|
22425
|
+
if (current) return;
|
|
22426
|
+
transition_in(eyeicon.$$.fragment, local);
|
|
22427
|
+
current = true;
|
|
22428
|
+
},
|
|
22429
|
+
o(local) {
|
|
22430
|
+
transition_out(eyeicon.$$.fragment, local);
|
|
22431
|
+
current = false;
|
|
22432
|
+
},
|
|
22433
|
+
d(detaching) {
|
|
22434
|
+
if (detaching) detach(button);
|
|
22435
|
+
destroy_component(eyeicon);
|
|
22436
|
+
mounted = false;
|
|
22437
|
+
dispose();
|
|
22438
|
+
}
|
|
22439
|
+
};
|
|
22440
|
+
}
|
|
22441
|
+
|
|
22442
|
+
// (98:10) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible}>
|
|
22443
|
+
function create_default_slot_1$d(ctx) {
|
|
22444
|
+
let t;
|
|
22445
|
+
let current;
|
|
22446
|
+
t = new Locale_strings({ props: { key: "showPassword" } });
|
|
22447
|
+
|
|
22448
|
+
return {
|
|
22449
|
+
c() {
|
|
22450
|
+
create_component(t.$$.fragment);
|
|
22236
22451
|
},
|
|
22237
22452
|
m(target, anchor) {
|
|
22238
22453
|
mount_component(t, target, anchor);
|
|
@@ -22254,18 +22469,54 @@ function create_default_slot$j(ctx) {
|
|
|
22254
22469
|
};
|
|
22255
22470
|
}
|
|
22256
22471
|
|
|
22257
|
-
// (
|
|
22472
|
+
// (91:4) <svelte:fragment slot="input-button">
|
|
22258
22473
|
function create_input_button_slot(ctx) {
|
|
22259
|
-
let
|
|
22260
|
-
let eyeicon;
|
|
22474
|
+
let if_block_anchor;
|
|
22261
22475
|
let current;
|
|
22262
|
-
let
|
|
22263
|
-
let dispose;
|
|
22476
|
+
let if_block = /*showPassword*/ ctx[16] === "button" && create_if_block_2$9(ctx);
|
|
22264
22477
|
|
|
22265
|
-
|
|
22478
|
+
return {
|
|
22479
|
+
c() {
|
|
22480
|
+
if (if_block) if_block.c();
|
|
22481
|
+
if_block_anchor = empty();
|
|
22482
|
+
},
|
|
22483
|
+
m(target, anchor) {
|
|
22484
|
+
if (if_block) if_block.m(target, anchor);
|
|
22485
|
+
insert(target, if_block_anchor, anchor);
|
|
22486
|
+
current = true;
|
|
22487
|
+
},
|
|
22488
|
+
p(ctx, dirty) {
|
|
22489
|
+
if (/*showPassword*/ ctx[16] === "button") if_block.p(ctx, dirty);
|
|
22490
|
+
},
|
|
22491
|
+
i(local) {
|
|
22492
|
+
if (current) return;
|
|
22493
|
+
transition_in(if_block);
|
|
22494
|
+
current = true;
|
|
22495
|
+
},
|
|
22496
|
+
o(local) {
|
|
22497
|
+
transition_out(if_block);
|
|
22498
|
+
current = false;
|
|
22499
|
+
},
|
|
22500
|
+
d(detaching) {
|
|
22501
|
+
if (if_block) if_block.d(detaching);
|
|
22502
|
+
if (detaching) detach(if_block_anchor);
|
|
22503
|
+
}
|
|
22504
|
+
};
|
|
22505
|
+
}
|
|
22506
|
+
|
|
22507
|
+
// (107:2) {#if showPassword === "checkbox"}
|
|
22508
|
+
function create_if_block_1$b(ctx) {
|
|
22509
|
+
let div;
|
|
22510
|
+
let checkbox;
|
|
22511
|
+
let current;
|
|
22512
|
+
|
|
22513
|
+
checkbox = new Checkbox({
|
|
22266
22514
|
props: {
|
|
22267
|
-
|
|
22268
|
-
|
|
22515
|
+
isFirstInvalidInput: /*callbackMetadata*/ ctx[2]?.derived.isFirstInvalidInput || false,
|
|
22516
|
+
isInvalid: false,
|
|
22517
|
+
key: /*key*/ ctx[0] + /*style*/ ctx[5].showPassword,
|
|
22518
|
+
onChange: /*toggleVisibility*/ ctx[19],
|
|
22519
|
+
value: false,
|
|
22269
22520
|
$$slots: { default: [create_default_slot$j] },
|
|
22270
22521
|
$$scope: { ctx }
|
|
22271
22522
|
}
|
|
@@ -22273,51 +22524,60 @@ function create_input_button_slot(ctx) {
|
|
|
22273
22524
|
|
|
22274
22525
|
return {
|
|
22275
22526
|
c() {
|
|
22276
|
-
|
|
22277
|
-
create_component(
|
|
22278
|
-
attr(
|
|
22279
|
-
attr(button, "slot", "input-button");
|
|
22280
|
-
attr(button, "type", "button");
|
|
22527
|
+
div = element("div");
|
|
22528
|
+
create_component(checkbox.$$.fragment);
|
|
22529
|
+
attr(div, "class", "tw_w-full tw_input-spacing");
|
|
22281
22530
|
},
|
|
22282
22531
|
m(target, anchor) {
|
|
22283
|
-
insert(target,
|
|
22284
|
-
mount_component(
|
|
22532
|
+
insert(target, div, anchor);
|
|
22533
|
+
mount_component(checkbox, div, null);
|
|
22285
22534
|
current = true;
|
|
22286
|
-
|
|
22287
|
-
if (!mounted) {
|
|
22288
|
-
dispose = listen(button, "click", /*toggleVisibility*/ ctx[18]);
|
|
22289
|
-
mounted = true;
|
|
22290
|
-
}
|
|
22291
22535
|
},
|
|
22292
22536
|
p(ctx, dirty) {
|
|
22293
|
-
const
|
|
22294
|
-
if (dirty & /*
|
|
22537
|
+
const checkbox_changes = {};
|
|
22538
|
+
if (dirty & /*callbackMetadata*/ 4) checkbox_changes.isFirstInvalidInput = /*callbackMetadata*/ ctx[2]?.derived.isFirstInvalidInput || false;
|
|
22539
|
+
if (dirty & /*key, style*/ 33) checkbox_changes.key = /*key*/ ctx[0] + /*style*/ ctx[5].showPassword;
|
|
22295
22540
|
|
|
22296
|
-
if (dirty & /*$$scope*/
|
|
22297
|
-
|
|
22541
|
+
if (dirty & /*$$scope*/ 8388608) {
|
|
22542
|
+
checkbox_changes.$$scope = { dirty, ctx };
|
|
22298
22543
|
}
|
|
22299
22544
|
|
|
22300
|
-
|
|
22545
|
+
checkbox.$set(checkbox_changes);
|
|
22301
22546
|
},
|
|
22302
22547
|
i(local) {
|
|
22303
22548
|
if (current) return;
|
|
22304
|
-
transition_in(
|
|
22549
|
+
transition_in(checkbox.$$.fragment, local);
|
|
22305
22550
|
current = true;
|
|
22306
22551
|
},
|
|
22307
22552
|
o(local) {
|
|
22308
|
-
transition_out(
|
|
22553
|
+
transition_out(checkbox.$$.fragment, local);
|
|
22309
22554
|
current = false;
|
|
22310
22555
|
},
|
|
22311
22556
|
d(detaching) {
|
|
22312
|
-
if (detaching) detach(
|
|
22313
|
-
destroy_component(
|
|
22314
|
-
mounted = false;
|
|
22315
|
-
dispose();
|
|
22557
|
+
if (detaching) detach(div);
|
|
22558
|
+
destroy_component(checkbox);
|
|
22316
22559
|
}
|
|
22317
22560
|
};
|
|
22318
22561
|
}
|
|
22319
22562
|
|
|
22320
|
-
// (
|
|
22563
|
+
// (109:6) <Checkbox isFirstInvalidInput={callbackMetadata?.derived.isFirstInvalidInput || false} isInvalid={false} key = {key + style.showPassword} onChange={toggleVisibility} value={false} >
|
|
22564
|
+
function create_default_slot$j(ctx) {
|
|
22565
|
+
let t;
|
|
22566
|
+
|
|
22567
|
+
return {
|
|
22568
|
+
c() {
|
|
22569
|
+
t = text("Show Password");
|
|
22570
|
+
},
|
|
22571
|
+
m(target, anchor) {
|
|
22572
|
+
insert(target, t, anchor);
|
|
22573
|
+
},
|
|
22574
|
+
d(detaching) {
|
|
22575
|
+
if (detaching) detach(t);
|
|
22576
|
+
}
|
|
22577
|
+
};
|
|
22578
|
+
}
|
|
22579
|
+
|
|
22580
|
+
// (119:2) {#if callbackMetadata?.platform?.confirmPassword}
|
|
22321
22581
|
function create_if_block$i(ctx) {
|
|
22322
22582
|
let confirminput;
|
|
22323
22583
|
let current;
|
|
@@ -22328,10 +22588,11 @@ function create_if_block$i(ctx) {
|
|
|
22328
22588
|
passwordsDoNotMatch: /*doPasswordsMatch*/ ctx[10] === false,
|
|
22329
22589
|
key: /*key*/ ctx[0],
|
|
22330
22590
|
isRequired: /*value*/ ctx[8].length > 0,
|
|
22331
|
-
onChange: /*confirmInput*/ ctx[
|
|
22591
|
+
onChange: /*confirmInput*/ ctx[17],
|
|
22332
22592
|
resetValue: /*resetValue*/ ctx[12],
|
|
22333
22593
|
showMessage: /*doPasswordsMatch*/ ctx[10] === false,
|
|
22334
|
-
style: /*style*/ ctx[5]
|
|
22594
|
+
style: /*style*/ ctx[5],
|
|
22595
|
+
isFirstInvalidInput: /*callbackMetadata*/ ctx[2]?.derived.isFirstInvalidInput || false
|
|
22335
22596
|
}
|
|
22336
22597
|
});
|
|
22337
22598
|
|
|
@@ -22352,6 +22613,7 @@ function create_if_block$i(ctx) {
|
|
|
22352
22613
|
if (dirty & /*resetValue*/ 4096) confirminput_changes.resetValue = /*resetValue*/ ctx[12];
|
|
22353
22614
|
if (dirty & /*doPasswordsMatch*/ 1024) confirminput_changes.showMessage = /*doPasswordsMatch*/ ctx[10] === false;
|
|
22354
22615
|
if (dirty & /*style*/ 32) confirminput_changes.style = /*style*/ ctx[5];
|
|
22616
|
+
if (dirty & /*callbackMetadata*/ 4) confirminput_changes.isFirstInvalidInput = /*callbackMetadata*/ ctx[2]?.derived.isFirstInvalidInput || false;
|
|
22355
22617
|
confirminput.$set(confirminput_changes);
|
|
22356
22618
|
},
|
|
22357
22619
|
i(local) {
|
|
@@ -22369,23 +22631,26 @@ function create_if_block$i(ctx) {
|
|
|
22369
22631
|
};
|
|
22370
22632
|
}
|
|
22371
22633
|
|
|
22372
|
-
// (
|
|
22634
|
+
// (77:0) {#key callback}
|
|
22373
22635
|
function create_key_block$3(ctx) {
|
|
22374
22636
|
let input;
|
|
22375
|
-
let
|
|
22376
|
-
let
|
|
22637
|
+
let t0;
|
|
22638
|
+
let t1;
|
|
22639
|
+
let if_block1_anchor;
|
|
22377
22640
|
let current;
|
|
22378
22641
|
|
|
22379
22642
|
input = new /*Input*/ ctx[15]({
|
|
22380
22643
|
props: {
|
|
22381
22644
|
isFirstInvalidInput: /*callbackMetadata*/ ctx[2]?.derived.isFirstInvalidInput || false,
|
|
22382
|
-
hasRightIcon:
|
|
22645
|
+
hasRightIcon: /*style*/ ctx[5].showPassword === 'button'
|
|
22646
|
+
? true
|
|
22647
|
+
: false,
|
|
22383
22648
|
key: /*key*/ ctx[0],
|
|
22384
22649
|
label: interpolate(textToKey(/*callbackType*/ ctx[9]), null, /*textInputLabel*/ ctx[13]),
|
|
22385
22650
|
message: /*validationFailure*/ ctx[7] || (/*isRequired*/ ctx[4]
|
|
22386
22651
|
? interpolate('inputRequiredError')
|
|
22387
22652
|
: undefined),
|
|
22388
|
-
onChange: /*setValue*/ ctx[
|
|
22653
|
+
onChange: /*setValue*/ ctx[18],
|
|
22389
22654
|
isInvalid: /*isInvalid*/ ctx[3],
|
|
22390
22655
|
isRequired: /*isRequired*/ ctx[4],
|
|
22391
22656
|
showMessage: /*showMessage*/ ctx[6],
|
|
@@ -22395,31 +22660,41 @@ function create_key_block$3(ctx) {
|
|
|
22395
22660
|
: '',
|
|
22396
22661
|
$$slots: {
|
|
22397
22662
|
"input-button": [create_input_button_slot],
|
|
22398
|
-
default: [
|
|
22663
|
+
default: [create_default_slot_2$6]
|
|
22399
22664
|
},
|
|
22400
22665
|
$$scope: { ctx }
|
|
22401
22666
|
}
|
|
22402
22667
|
});
|
|
22403
22668
|
|
|
22404
|
-
let
|
|
22669
|
+
let if_block0 = /*showPassword*/ ctx[16] === "checkbox" && create_if_block_1$b(ctx);
|
|
22670
|
+
let if_block1 = /*callbackMetadata*/ ctx[2]?.platform?.confirmPassword && create_if_block$i(ctx);
|
|
22405
22671
|
|
|
22406
22672
|
return {
|
|
22407
22673
|
c() {
|
|
22408
22674
|
create_component(input.$$.fragment);
|
|
22409
|
-
|
|
22410
|
-
if (
|
|
22411
|
-
|
|
22675
|
+
t0 = space();
|
|
22676
|
+
if (if_block0) if_block0.c();
|
|
22677
|
+
t1 = space();
|
|
22678
|
+
if (if_block1) if_block1.c();
|
|
22679
|
+
if_block1_anchor = empty();
|
|
22412
22680
|
},
|
|
22413
22681
|
m(target, anchor) {
|
|
22414
22682
|
mount_component(input, target, anchor);
|
|
22415
|
-
insert(target,
|
|
22416
|
-
if (
|
|
22417
|
-
insert(target,
|
|
22683
|
+
insert(target, t0, anchor);
|
|
22684
|
+
if (if_block0) if_block0.m(target, anchor);
|
|
22685
|
+
insert(target, t1, anchor);
|
|
22686
|
+
if (if_block1) if_block1.m(target, anchor);
|
|
22687
|
+
insert(target, if_block1_anchor, anchor);
|
|
22418
22688
|
current = true;
|
|
22419
22689
|
},
|
|
22420
22690
|
p(ctx, dirty) {
|
|
22421
22691
|
const input_changes = {};
|
|
22422
22692
|
if (dirty & /*callbackMetadata*/ 4) input_changes.isFirstInvalidInput = /*callbackMetadata*/ ctx[2]?.derived.isFirstInvalidInput || false;
|
|
22693
|
+
|
|
22694
|
+
if (dirty & /*style*/ 32) input_changes.hasRightIcon = /*style*/ ctx[5].showPassword === 'button'
|
|
22695
|
+
? true
|
|
22696
|
+
: false;
|
|
22697
|
+
|
|
22423
22698
|
if (dirty & /*key*/ 1) input_changes.key = /*key*/ ctx[0];
|
|
22424
22699
|
if (dirty & /*callbackType, textInputLabel*/ 8704) input_changes.label = interpolate(textToKey(/*callbackType*/ ctx[9]), null, /*textInputLabel*/ ctx[13]);
|
|
22425
22700
|
|
|
@@ -22436,30 +22711,31 @@ function create_key_block$3(ctx) {
|
|
|
22436
22711
|
? /*value*/ ctx[8]
|
|
22437
22712
|
: '';
|
|
22438
22713
|
|
|
22439
|
-
if (dirty & /*$$scope, isVisible*/
|
|
22714
|
+
if (dirty & /*$$scope, isVisible*/ 8390656) {
|
|
22440
22715
|
input_changes.$$scope = { dirty, ctx };
|
|
22441
22716
|
}
|
|
22442
22717
|
|
|
22443
22718
|
input.$set(input_changes);
|
|
22719
|
+
if (/*showPassword*/ ctx[16] === "checkbox") if_block0.p(ctx, dirty);
|
|
22444
22720
|
|
|
22445
22721
|
if (/*callbackMetadata*/ ctx[2]?.platform?.confirmPassword) {
|
|
22446
|
-
if (
|
|
22447
|
-
|
|
22722
|
+
if (if_block1) {
|
|
22723
|
+
if_block1.p(ctx, dirty);
|
|
22448
22724
|
|
|
22449
22725
|
if (dirty & /*callbackMetadata*/ 4) {
|
|
22450
|
-
transition_in(
|
|
22726
|
+
transition_in(if_block1, 1);
|
|
22451
22727
|
}
|
|
22452
22728
|
} else {
|
|
22453
|
-
|
|
22454
|
-
|
|
22455
|
-
transition_in(
|
|
22456
|
-
|
|
22729
|
+
if_block1 = create_if_block$i(ctx);
|
|
22730
|
+
if_block1.c();
|
|
22731
|
+
transition_in(if_block1, 1);
|
|
22732
|
+
if_block1.m(if_block1_anchor.parentNode, if_block1_anchor);
|
|
22457
22733
|
}
|
|
22458
|
-
} else if (
|
|
22734
|
+
} else if (if_block1) {
|
|
22459
22735
|
group_outros();
|
|
22460
22736
|
|
|
22461
|
-
transition_out(
|
|
22462
|
-
|
|
22737
|
+
transition_out(if_block1, 1, 1, () => {
|
|
22738
|
+
if_block1 = null;
|
|
22463
22739
|
});
|
|
22464
22740
|
|
|
22465
22741
|
check_outros();
|
|
@@ -22468,19 +22744,23 @@ function create_key_block$3(ctx) {
|
|
|
22468
22744
|
i(local) {
|
|
22469
22745
|
if (current) return;
|
|
22470
22746
|
transition_in(input.$$.fragment, local);
|
|
22471
|
-
transition_in(
|
|
22747
|
+
transition_in(if_block0);
|
|
22748
|
+
transition_in(if_block1);
|
|
22472
22749
|
current = true;
|
|
22473
22750
|
},
|
|
22474
22751
|
o(local) {
|
|
22475
22752
|
transition_out(input.$$.fragment, local);
|
|
22476
|
-
transition_out(
|
|
22753
|
+
transition_out(if_block0);
|
|
22754
|
+
transition_out(if_block1);
|
|
22477
22755
|
current = false;
|
|
22478
22756
|
},
|
|
22479
22757
|
d(detaching) {
|
|
22480
22758
|
destroy_component(input, detaching);
|
|
22481
|
-
if (detaching) detach(
|
|
22482
|
-
if (
|
|
22483
|
-
if (detaching) detach(
|
|
22759
|
+
if (detaching) detach(t0);
|
|
22760
|
+
if (if_block0) if_block0.d(detaching);
|
|
22761
|
+
if (detaching) detach(t1);
|
|
22762
|
+
if (if_block1) if_block1.d(detaching);
|
|
22763
|
+
if (detaching) detach(if_block1_anchor);
|
|
22484
22764
|
}
|
|
22485
22765
|
};
|
|
22486
22766
|
}
|
|
@@ -22539,6 +22819,7 @@ function instance$B($$self, $$props, $$invalidate) {
|
|
|
22539
22819
|
let { isRequired = false } = $$props;
|
|
22540
22820
|
let { style = {} } = $$props;
|
|
22541
22821
|
const Input = style.labels === 'stacked' ? Stacked_label : Floating_label;
|
|
22822
|
+
const showPassword = style.showPassword;
|
|
22542
22823
|
let { showMessage = undefined } = $$props;
|
|
22543
22824
|
let { validationFailure = '' } = $$props;
|
|
22544
22825
|
let confirmValue;
|
|
@@ -22556,7 +22837,7 @@ function instance$B($$self, $$props, $$invalidate) {
|
|
|
22556
22837
|
* @param event
|
|
22557
22838
|
*/
|
|
22558
22839
|
function confirmInput(val) {
|
|
22559
|
-
$$invalidate(
|
|
22840
|
+
$$invalidate(20, confirmValue = val);
|
|
22560
22841
|
}
|
|
22561
22842
|
|
|
22562
22843
|
/**
|
|
@@ -22575,7 +22856,7 @@ function instance$B($$self, $$props, $$invalidate) {
|
|
|
22575
22856
|
*********************************************************************** */
|
|
22576
22857
|
callback.setInputValue(value);
|
|
22577
22858
|
|
|
22578
|
-
$$invalidate(
|
|
22859
|
+
$$invalidate(21, savedValue = String(value));
|
|
22579
22860
|
}
|
|
22580
22861
|
|
|
22581
22862
|
/**
|
|
@@ -22595,11 +22876,11 @@ function instance$B($$self, $$props, $$invalidate) {
|
|
|
22595
22876
|
if ('style' in $$props) $$invalidate(5, style = $$props.style);
|
|
22596
22877
|
if ('showMessage' in $$props) $$invalidate(6, showMessage = $$props.showMessage);
|
|
22597
22878
|
if ('validationFailure' in $$props) $$invalidate(7, validationFailure = $$props.validationFailure);
|
|
22598
|
-
if ('$$scope' in $$props) $$invalidate(
|
|
22879
|
+
if ('$$scope' in $$props) $$invalidate(23, $$scope = $$props.$$scope);
|
|
22599
22880
|
};
|
|
22600
22881
|
|
|
22601
22882
|
$$self.$$.update = () => {
|
|
22602
|
-
if ($$self.$$.dirty & /*callback, callbackMetadata, savedValue, value, confirmValue*/
|
|
22883
|
+
if ($$self.$$.dirty & /*callback, callbackMetadata, savedValue, value, confirmValue*/ 3145990) {
|
|
22603
22884
|
{
|
|
22604
22885
|
$$invalidate(9, callbackType = callback.getType());
|
|
22605
22886
|
$$invalidate(0, key = callback?.payload?.input?.[0].name || `password-${callbackMetadata?.idx}`);
|
|
@@ -22641,6 +22922,7 @@ function instance$B($$self, $$props, $$invalidate) {
|
|
|
22641
22922
|
textInputLabel,
|
|
22642
22923
|
type,
|
|
22643
22924
|
Input,
|
|
22925
|
+
showPassword,
|
|
22644
22926
|
confirmInput,
|
|
22645
22927
|
setValue,
|
|
22646
22928
|
toggleVisibility,
|
|
@@ -26314,61 +26596,96 @@ class Device_profile extends SvelteComponent {
|
|
|
26314
26596
|
}
|
|
26315
26597
|
}
|
|
26316
26598
|
|
|
26599
|
+
/*
|
|
26600
|
+
* Because hcaptch and grecaptcha would
|
|
26601
|
+
* both be loaded on the page, we need to just leverage
|
|
26602
|
+
* the classnames to determine which one is being rendered.
|
|
26603
|
+
* This is retrieved from the step
|
|
26604
|
+
*/
|
|
26605
|
+
function checkForHCaptcha(captchaClassname) {
|
|
26606
|
+
return captchaClassname.match('h-captcha');
|
|
26607
|
+
}
|
|
26608
|
+
function renderCaptcha({ nameOfCaptcha, siteKey, }) {
|
|
26609
|
+
if (nameOfCaptcha === 'hcaptcha' && window.hcaptcha) {
|
|
26610
|
+
return window.hcaptcha.render('fr-recaptcha', {
|
|
26611
|
+
sitekey: siteKey,
|
|
26612
|
+
callback: 'frHandleCaptcha',
|
|
26613
|
+
'expired-callback': 'frHandleExpiredCallback',
|
|
26614
|
+
'chalexpired-callback': 'frHandleExpiredCallback',
|
|
26615
|
+
'error-callback': 'frHandleErrorCallback',
|
|
26616
|
+
});
|
|
26617
|
+
}
|
|
26618
|
+
if (nameOfCaptcha === 'grecaptcha' && window.grecaptcha) {
|
|
26619
|
+
return window.grecaptcha.render('fr-recaptcha', {
|
|
26620
|
+
sitekey: siteKey,
|
|
26621
|
+
callback: window.frHandleCaptcha,
|
|
26622
|
+
'expired-callback': window.frHandleExpiredCallback,
|
|
26623
|
+
});
|
|
26624
|
+
}
|
|
26625
|
+
}
|
|
26626
|
+
function handleCaptchaError(callback) {
|
|
26627
|
+
const siteKey = callback?.getSiteKey() ?? '';
|
|
26628
|
+
const className = callback?.getOutputByName('captchaDivClass', 'h-captcha') ?? 'h-captcha';
|
|
26629
|
+
if (checkForHCaptcha(className)) {
|
|
26630
|
+
return () => renderCaptcha({ nameOfCaptcha: 'hcaptcha', siteKey });
|
|
26631
|
+
}
|
|
26632
|
+
else {
|
|
26633
|
+
return () => renderCaptcha({ nameOfCaptcha: 'grecaptcha', siteKey });
|
|
26634
|
+
}
|
|
26635
|
+
}
|
|
26636
|
+
function handleCaptchaToken(callback) {
|
|
26637
|
+
return (token) => {
|
|
26638
|
+
callback?.setResult(token);
|
|
26639
|
+
};
|
|
26640
|
+
}
|
|
26641
|
+
|
|
26317
26642
|
/* src/lib/journey/callbacks/recaptcha/recaptcha.svelte generated by Svelte v3.59.2 */
|
|
26318
26643
|
|
|
26319
26644
|
function create_if_block$b(ctx) {
|
|
26320
|
-
let
|
|
26321
|
-
let script_src_value;
|
|
26645
|
+
let div;
|
|
26322
26646
|
|
|
26323
26647
|
return {
|
|
26324
26648
|
c() {
|
|
26325
|
-
|
|
26326
|
-
|
|
26327
|
-
|
|
26328
|
-
|
|
26649
|
+
div = element("div");
|
|
26650
|
+
attr(div, "id", "fr-recaptcha");
|
|
26651
|
+
attr(div, "class", `${/*recaptchaClass*/ ctx[2]} tw_flex-1 tw_w-full tw_input-spacing`);
|
|
26652
|
+
attr(div, "data-sitekey", /*siteKey*/ ctx[0]);
|
|
26653
|
+
attr(div, "data-expired-callback", "frHandleExpiredCallback");
|
|
26654
|
+
attr(div, "data-chalexpired-callback", "frHandleExpiredCallback");
|
|
26655
|
+
attr(div, "data-error-callback", "frHandleErrorCallback");
|
|
26656
|
+
attr(div, "data-callback", "frHandleCaptcha");
|
|
26329
26657
|
},
|
|
26330
26658
|
m(target, anchor) {
|
|
26331
|
-
insert(target,
|
|
26659
|
+
insert(target, div, anchor);
|
|
26332
26660
|
},
|
|
26333
26661
|
p: noop,
|
|
26334
26662
|
d(detaching) {
|
|
26335
|
-
if (detaching) detach(
|
|
26663
|
+
if (detaching) detach(div);
|
|
26336
26664
|
}
|
|
26337
26665
|
};
|
|
26338
26666
|
}
|
|
26339
26667
|
|
|
26340
26668
|
function create_fragment$i(ctx) {
|
|
26341
|
-
let
|
|
26342
|
-
let
|
|
26343
|
-
let if_block = /*recaptchaApi*/ ctx[1].length && create_if_block$b(ctx);
|
|
26669
|
+
let if_block_anchor;
|
|
26670
|
+
let if_block = /*isV3*/ ctx[1] === false && create_if_block$b(ctx);
|
|
26344
26671
|
|
|
26345
26672
|
return {
|
|
26346
26673
|
c() {
|
|
26347
26674
|
if (if_block) if_block.c();
|
|
26348
|
-
|
|
26349
|
-
div = element("div");
|
|
26350
|
-
attr(div, "id", "fr-recaptcha");
|
|
26351
|
-
attr(div, "class", `${/*recaptchaClass*/ ctx[2]} tw_flex-1 tw_w-full tw_input-spacing`);
|
|
26352
|
-
attr(div, "data-sitekey", /*siteKey*/ ctx[0]);
|
|
26353
|
-
attr(div, "data-expired-callback", "frHandleExpiredCallback");
|
|
26354
|
-
attr(div, "data-chalexpired-callback", "frHandleExpiredCallback");
|
|
26355
|
-
attr(div, "data-error-callback", "frHandleErrorCallback");
|
|
26356
|
-
attr(div, "data-callback", "frHandleCaptcha");
|
|
26675
|
+
if_block_anchor = empty();
|
|
26357
26676
|
},
|
|
26358
26677
|
m(target, anchor) {
|
|
26359
26678
|
if (if_block) if_block.m(target, anchor);
|
|
26360
|
-
insert(target,
|
|
26361
|
-
insert(target, div, anchor);
|
|
26679
|
+
insert(target, if_block_anchor, anchor);
|
|
26362
26680
|
},
|
|
26363
26681
|
p(ctx, [dirty]) {
|
|
26364
|
-
if (/*
|
|
26682
|
+
if (/*isV3*/ ctx[1] === false) if_block.p(ctx, dirty);
|
|
26365
26683
|
},
|
|
26366
26684
|
i: noop,
|
|
26367
26685
|
o: noop,
|
|
26368
26686
|
d(detaching) {
|
|
26369
26687
|
if (if_block) if_block.d(detaching);
|
|
26370
|
-
if (detaching) detach(
|
|
26371
|
-
if (detaching) detach(div);
|
|
26688
|
+
if (detaching) detach(if_block_anchor);
|
|
26372
26689
|
}
|
|
26373
26690
|
};
|
|
26374
26691
|
}
|
|
@@ -26378,8 +26695,19 @@ function instance$j($$self, $$props, $$invalidate) {
|
|
|
26378
26695
|
const selfSubmitFunction = null;
|
|
26379
26696
|
const stepMetadata = null;
|
|
26380
26697
|
const style = {};
|
|
26698
|
+
|
|
26699
|
+
/**
|
|
26700
|
+
* This is a component level variable that is set from the journey store
|
|
26701
|
+
* If it isn't passed in via journey.start, we
|
|
26702
|
+
* default to the journey.tree value. However, journey.tree won't
|
|
26703
|
+
* necessarily be set on mount. It is async, so we
|
|
26704
|
+
* have to wait for it to resolve. Therefore, defaulting to
|
|
26705
|
+
* an empty string so its falsey.
|
|
26706
|
+
*/
|
|
26707
|
+
let recaptchaAction = '';
|
|
26708
|
+
|
|
26381
26709
|
const siteKey = callback?.getSiteKey() ?? '';
|
|
26382
|
-
let
|
|
26710
|
+
let isV3 = callback?.getOutputByName('reCaptchaV3', false);
|
|
26383
26711
|
|
|
26384
26712
|
/**
|
|
26385
26713
|
* AM defaults the class name to g-captcha which is wrong
|
|
@@ -26389,63 +26717,71 @@ function instance$j($$self, $$props, $$invalidate) {
|
|
|
26389
26717
|
const recaptchaClass = callback?.getOutputByName('captchaDivClass', 'h-captcha') ?? 'h-captcha';
|
|
26390
26718
|
|
|
26391
26719
|
onMount(() => {
|
|
26392
|
-
|
|
26393
|
-
|
|
26394
|
-
|
|
26395
|
-
|
|
26396
|
-
window.hcaptcha.render(recaptchaClass, {
|
|
26397
|
-
sitekey: siteKey,
|
|
26398
|
-
callback: 'frHandleCaptcha',
|
|
26399
|
-
'expired-callback': 'frHandleExpiredCallback',
|
|
26400
|
-
'chalexpired-callback': 'frHandleExpiredCallback',
|
|
26401
|
-
'error-callback': 'frHandleErrorCallback'
|
|
26402
|
-
});
|
|
26403
|
-
} else {
|
|
26404
|
-
window.grecaptcha.render(recaptchaClass, {
|
|
26405
|
-
sitekey: siteKey,
|
|
26406
|
-
callback: window.frHandleCaptcha,
|
|
26407
|
-
'expired-callback': window.frHandleExpiredCallback
|
|
26408
|
-
});
|
|
26409
|
-
}
|
|
26410
|
-
};
|
|
26720
|
+
if (isV3) {
|
|
26721
|
+
// If ReCaptcha v3, do nothing and return early
|
|
26722
|
+
return;
|
|
26723
|
+
}
|
|
26411
26724
|
|
|
26412
|
-
|
|
26413
|
-
callback
|
|
26414
|
-
|
|
26725
|
+
if (callback) {
|
|
26726
|
+
window.frHandleCaptchaError = handleCaptchaError(callback);
|
|
26727
|
+
window.frHandleCaptcha = handleCaptchaToken(callback);
|
|
26415
26728
|
|
|
26416
|
-
|
|
26417
|
-
|
|
26729
|
+
window.frHandleExpiredCallback = function handleExpiredCallback() {
|
|
26730
|
+
callback?.setResult('');
|
|
26731
|
+
renderCaptcha({ nameOfCaptcha: 'hcaptcha', siteKey });
|
|
26732
|
+
};
|
|
26418
26733
|
|
|
26419
|
-
|
|
26420
|
-
|
|
26421
|
-
|
|
26422
|
-
|
|
26423
|
-
|
|
26424
|
-
|
|
26425
|
-
|
|
26426
|
-
|
|
26427
|
-
|
|
26428
|
-
|
|
26429
|
-
|
|
26430
|
-
|
|
26431
|
-
|
|
26734
|
+
renderCaptcha({
|
|
26735
|
+
nameOfCaptcha: recaptchaClass === 'g-recaptcha'
|
|
26736
|
+
? 'grecaptcha'
|
|
26737
|
+
: 'hcaptcha',
|
|
26738
|
+
siteKey
|
|
26739
|
+
});
|
|
26740
|
+
}
|
|
26741
|
+
});
|
|
26742
|
+
|
|
26743
|
+
// defining this outside of the reactive block and guarding it with a isV3 check so it only runs when v3
|
|
26744
|
+
// is defined as true and we have a recaptcha action to assign.
|
|
26745
|
+
function executeV3Captcha() {
|
|
26746
|
+
if (isV3 && recaptchaAction.length) {
|
|
26747
|
+
try {
|
|
26748
|
+
window.grecaptcha.ready(async function () {
|
|
26749
|
+
const value = await window.grecaptcha.execute(siteKey, { action: recaptchaAction });
|
|
26750
|
+
callback?.setResult(value);
|
|
26432
26751
|
});
|
|
26752
|
+
} catch(err) {
|
|
26753
|
+
throw new Error(`Error executing recaptcha. Please make sure you have passed a siteKey and you have loaded the google recaptcha script in your app prior to this Error: ${err}`);
|
|
26433
26754
|
}
|
|
26434
|
-
}
|
|
26755
|
+
}
|
|
26756
|
+
}
|
|
26757
|
+
|
|
26758
|
+
journeyStore.subscribe(value => {
|
|
26759
|
+
$$invalidate(7, recaptchaAction = value?.recaptchaAction ?? '');
|
|
26435
26760
|
});
|
|
26436
26761
|
|
|
26437
26762
|
$$self.$$set = $$props => {
|
|
26438
26763
|
if ('callback' in $$props) $$invalidate(3, callback = $$props.callback);
|
|
26439
26764
|
};
|
|
26440
26765
|
|
|
26766
|
+
$$self.$$.update = () => {
|
|
26767
|
+
if ($$self.$$.dirty & /*recaptchaAction*/ 128) {
|
|
26768
|
+
{
|
|
26769
|
+
if (recaptchaAction.length) {
|
|
26770
|
+
executeV3Captcha();
|
|
26771
|
+
}
|
|
26772
|
+
}
|
|
26773
|
+
}
|
|
26774
|
+
};
|
|
26775
|
+
|
|
26441
26776
|
return [
|
|
26442
26777
|
siteKey,
|
|
26443
|
-
|
|
26778
|
+
isV3,
|
|
26444
26779
|
recaptchaClass,
|
|
26445
26780
|
callback,
|
|
26446
26781
|
selfSubmitFunction,
|
|
26447
26782
|
stepMetadata,
|
|
26448
|
-
style
|
|
26783
|
+
style,
|
|
26784
|
+
recaptchaAction
|
|
26449
26785
|
];
|
|
26450
26786
|
}
|
|
26451
26787
|
|
|
@@ -29787,7 +30123,7 @@ function get_each_context$4(ctx, list, i) {
|
|
|
29787
30123
|
return child_ctx;
|
|
29788
30124
|
}
|
|
29789
30125
|
|
|
29790
|
-
// (
|
|
30126
|
+
// (45:2) {#if componentStyle !== 'inline'}
|
|
29791
30127
|
function create_if_block_2$4(ctx) {
|
|
29792
30128
|
let t0;
|
|
29793
30129
|
let h1;
|
|
@@ -29874,7 +30210,7 @@ function create_if_block_2$4(ctx) {
|
|
|
29874
30210
|
};
|
|
29875
30211
|
}
|
|
29876
30212
|
|
|
29877
|
-
// (
|
|
30213
|
+
// (46:4) {#if form?.icon}
|
|
29878
30214
|
function create_if_block_3$3(ctx) {
|
|
29879
30215
|
let div;
|
|
29880
30216
|
let newusericon;
|
|
@@ -29914,7 +30250,7 @@ function create_if_block_3$3(ctx) {
|
|
|
29914
30250
|
};
|
|
29915
30251
|
}
|
|
29916
30252
|
|
|
29917
|
-
// (
|
|
30253
|
+
// (62:2) {#if form.message}
|
|
29918
30254
|
function create_if_block_1$5(ctx) {
|
|
29919
30255
|
let alert;
|
|
29920
30256
|
let current;
|
|
@@ -29962,7 +30298,7 @@ function create_if_block_1$5(ctx) {
|
|
|
29962
30298
|
};
|
|
29963
30299
|
}
|
|
29964
30300
|
|
|
29965
|
-
// (
|
|
30301
|
+
// (63:4) <Alert id="formFailureMessageAlert" needsFocus={alertNeedsFocus} type="error">
|
|
29966
30302
|
function create_default_slot_2$2(ctx) {
|
|
29967
30303
|
let t_value = interpolate(/*formMessageKey*/ ctx[7], null, /*form*/ ctx[2]?.message) + "";
|
|
29968
30304
|
let t;
|
|
@@ -29983,7 +30319,7 @@ function create_default_slot_2$2(ctx) {
|
|
|
29983
30319
|
};
|
|
29984
30320
|
}
|
|
29985
30321
|
|
|
29986
|
-
// (
|
|
30322
|
+
// (68:2) {#each step?.callbacks as callback, idx}
|
|
29987
30323
|
function create_each_block$4(ctx) {
|
|
29988
30324
|
let callbackmapper;
|
|
29989
30325
|
let current;
|
|
@@ -30036,7 +30372,7 @@ function create_each_block$4(ctx) {
|
|
|
30036
30372
|
};
|
|
30037
30373
|
}
|
|
30038
30374
|
|
|
30039
|
-
// (
|
|
30375
|
+
// (80:2) {#if metadata?.step?.derived.isUserInputOptional || !metadata?.step?.derived.isStepSelfSubmittable()}
|
|
30040
30376
|
function create_if_block$7(ctx) {
|
|
30041
30377
|
let button;
|
|
30042
30378
|
let current;
|
|
@@ -30085,7 +30421,7 @@ function create_if_block$7(ctx) {
|
|
|
30085
30421
|
};
|
|
30086
30422
|
}
|
|
30087
30423
|
|
|
30088
|
-
// (
|
|
30424
|
+
// (81:4) <Button busy={journey?.loading} style="primary" type="submit" width="full">
|
|
30089
30425
|
function create_default_slot_1$6(ctx) {
|
|
30090
30426
|
let t;
|
|
30091
30427
|
let current;
|
|
@@ -30115,7 +30451,7 @@ function create_default_slot_1$6(ctx) {
|
|
|
30115
30451
|
};
|
|
30116
30452
|
}
|
|
30117
30453
|
|
|
30118
|
-
// (
|
|
30454
|
+
// (44:0) <Form bind:formEl ariaDescribedBy="formFailureMessageAlert" onSubmitWhenValid={form?.submit}>
|
|
30119
30455
|
function create_default_slot$7(ctx) {
|
|
30120
30456
|
let t0;
|
|
30121
30457
|
let t1;
|
|
@@ -30400,12 +30736,6 @@ function instance$c($$self, $$props, $$invalidate) {
|
|
|
30400
30736
|
}
|
|
30401
30737
|
});
|
|
30402
30738
|
|
|
30403
|
-
onMount(() => {
|
|
30404
|
-
if (componentStyle === 'modal') {
|
|
30405
|
-
captureLinks(linkWrapper, journey);
|
|
30406
|
-
}
|
|
30407
|
-
});
|
|
30408
|
-
|
|
30409
30739
|
function p_binding($$value) {
|
|
30410
30740
|
binding_callbacks[$$value ? 'unshift' : 'push'](() => {
|
|
30411
30741
|
linkWrapper = $$value;
|