@panneau/form-auth 4.0.39 → 4.0.40-alpha.3

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.
Files changed (2) hide show
  1. package/dist/index.js +959 -452
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1,537 +1,1044 @@
1
- import _objectSpread from '@babel/runtime/helpers/objectSpread2';
2
- import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
1
+ import { c } from 'react/compiler-runtime';
3
2
  import { FormattedMessage } from 'react-intl';
4
3
  import Form from '@panneau/form';
5
4
  import { jsx } from 'react/jsx-runtime';
6
5
  import Link from '@panneau/element-link';
7
6
  import { postJSON, getCSRFHeaders } from '@folklore/fetch';
8
- import { useCallback } from 'react';
9
7
 
10
- var _excluded$8 = ["action", "fields", "size", "currentPasswordLabel", "passwordLabel", "passwordConfirmationLabel", "submitButtonLabel"];
11
- function ChangePassword(_ref) {
12
- var _ref$action = _ref.action,
13
- action = _ref$action === void 0 ? '/user/password' : _ref$action,
14
- _ref$fields = _ref.fields,
15
- fields = _ref$fields === void 0 ? null : _ref$fields,
16
- _ref$size = _ref.size,
17
- size = _ref$size === void 0 ? 'lg' : _ref$size,
18
- _ref$currentPasswordL = _ref.currentPasswordLabel,
19
- currentPasswordLabel = _ref$currentPasswordL === void 0 ? null : _ref$currentPasswordL,
20
- _ref$passwordLabel = _ref.passwordLabel,
21
- passwordLabel = _ref$passwordLabel === void 0 ? null : _ref$passwordLabel,
22
- _ref$passwordConfirma = _ref.passwordConfirmationLabel,
23
- passwordConfirmationLabel = _ref$passwordConfirma === void 0 ? null : _ref$passwordConfirma,
24
- _ref$submitButtonLabe = _ref.submitButtonLabel,
25
- submitButtonLabel = _ref$submitButtonLabe === void 0 ? null : _ref$submitButtonLabe,
26
- props = _objectWithoutProperties(_ref, _excluded$8);
27
- return /*#__PURE__*/jsx(Form, _objectSpread({
28
- action: action,
29
- method: "PUT",
30
- fields: fields || [{
31
- name: 'current_password',
32
- type: 'password',
33
- size: size,
8
+ function ChangePassword(t0) {
9
+ const $ = c(22);
10
+ let props;
11
+ let t1;
12
+ let t2;
13
+ let t3;
14
+ let t4;
15
+ let t5;
16
+ let t6;
17
+ let t7;
18
+ if ($[0] !== t0) {
19
+ ({
20
+ action: t1,
21
+ fields: t2,
22
+ size: t3,
23
+ currentPasswordLabel: t4,
24
+ passwordLabel: t5,
25
+ passwordConfirmationLabel: t6,
26
+ submitButtonLabel: t7,
27
+ ...props
28
+ } = t0);
29
+ $[0] = t0;
30
+ $[1] = props;
31
+ $[2] = t1;
32
+ $[3] = t2;
33
+ $[4] = t3;
34
+ $[5] = t4;
35
+ $[6] = t5;
36
+ $[7] = t6;
37
+ $[8] = t7;
38
+ } else {
39
+ props = $[1];
40
+ t1 = $[2];
41
+ t2 = $[3];
42
+ t3 = $[4];
43
+ t4 = $[5];
44
+ t5 = $[6];
45
+ t6 = $[7];
46
+ t7 = $[8];
47
+ }
48
+ const action = t1 === undefined ? "/user/password" : t1;
49
+ const fields = t2 === undefined ? null : t2;
50
+ const size = t3 === undefined ? "lg" : t3;
51
+ const currentPasswordLabel = t4 === undefined ? null : t4;
52
+ const passwordLabel = t5 === undefined ? null : t5;
53
+ const passwordConfirmationLabel = t6 === undefined ? null : t6;
54
+ const submitButtonLabel = t7 === undefined ? null : t7;
55
+ let t8;
56
+ if ($[9] !== currentPasswordLabel || $[10] !== fields || $[11] !== passwordConfirmationLabel || $[12] !== passwordLabel || $[13] !== size) {
57
+ t8 = fields || [{
58
+ name: "current_password",
59
+ type: "password",
60
+ size,
34
61
  label: currentPasswordLabel || /*#__PURE__*/jsx(FormattedMessage, {
35
- id: "8LSb8C",
36
- defaultMessage: [{
37
- "type": 0,
38
- "value": "Current password"
39
- }]
62
+ id: "8LSb8C"
40
63
  })
41
64
  }, {
42
- name: 'password',
43
- type: 'password',
44
- size: size,
65
+ name: "password",
66
+ type: "password",
67
+ size,
45
68
  label: passwordLabel || /*#__PURE__*/jsx(FormattedMessage, {
46
- id: "XJ1dc3",
47
- defaultMessage: [{
48
- "type": 0,
49
- "value": "New password"
50
- }]
69
+ id: "XJ1dc3"
51
70
  })
52
71
  }, {
53
- name: 'password_confirmation',
54
- type: 'password',
55
- size: size,
72
+ name: "password_confirmation",
73
+ type: "password",
74
+ size,
56
75
  label: passwordConfirmationLabel || /*#__PURE__*/jsx(FormattedMessage, {
57
- id: "DUbv+u",
58
- defaultMessage: [{
59
- "type": 0,
60
- "value": "Confirm your new password"
61
- }]
76
+ id: "DUbv+u"
62
77
  })
63
- }],
64
- submitButtonLabel: submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
65
- id: "XW9IKQ",
66
- defaultMessage: [{
67
- "type": 0,
68
- "value": "Update password"
69
- }]
70
- })
71
- }, props));
78
+ }];
79
+ $[9] = currentPasswordLabel;
80
+ $[10] = fields;
81
+ $[11] = passwordConfirmationLabel;
82
+ $[12] = passwordLabel;
83
+ $[13] = size;
84
+ $[14] = t8;
85
+ } else {
86
+ t8 = $[14];
87
+ }
88
+ let t9;
89
+ if ($[15] !== submitButtonLabel) {
90
+ t9 = submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
91
+ id: "XW9IKQ"
92
+ });
93
+ $[15] = submitButtonLabel;
94
+ $[16] = t9;
95
+ } else {
96
+ t9 = $[16];
97
+ }
98
+ let t10;
99
+ if ($[17] !== action || $[18] !== props || $[19] !== t8 || $[20] !== t9) {
100
+ t10 = /*#__PURE__*/jsx(Form, {
101
+ action: action,
102
+ method: "PUT",
103
+ fields: t8,
104
+ submitButtonLabel: t9,
105
+ ...props
106
+ });
107
+ $[17] = action;
108
+ $[18] = props;
109
+ $[19] = t8;
110
+ $[20] = t9;
111
+ $[21] = t10;
112
+ } else {
113
+ t10 = $[21];
114
+ }
115
+ return t10;
72
116
  }
73
117
 
74
- var _excluded$7 = ["action", "fields", "size", "passwordLabel", "submitButtonLabel"];
75
- function ConfirmPassword(_ref) {
76
- var _ref$action = _ref.action,
77
- action = _ref$action === void 0 ? '/user/confirm-password' : _ref$action,
78
- _ref$fields = _ref.fields,
79
- fields = _ref$fields === void 0 ? null : _ref$fields,
80
- _ref$size = _ref.size,
81
- size = _ref$size === void 0 ? 'lg' : _ref$size,
82
- _ref$passwordLabel = _ref.passwordLabel,
83
- passwordLabel = _ref$passwordLabel === void 0 ? null : _ref$passwordLabel,
84
- _ref$submitButtonLabe = _ref.submitButtonLabel,
85
- submitButtonLabel = _ref$submitButtonLabe === void 0 ? null : _ref$submitButtonLabe,
86
- props = _objectWithoutProperties(_ref, _excluded$7);
87
- return /*#__PURE__*/jsx(Form, _objectSpread({
88
- action: action,
89
- fields: fields || [{
90
- name: 'password',
91
- type: 'password',
92
- size: size,
118
+ function ConfirmPassword(t0) {
119
+ const $ = c(18);
120
+ let props;
121
+ let t1;
122
+ let t2;
123
+ let t3;
124
+ let t4;
125
+ let t5;
126
+ if ($[0] !== t0) {
127
+ ({
128
+ action: t1,
129
+ fields: t2,
130
+ size: t3,
131
+ passwordLabel: t4,
132
+ submitButtonLabel: t5,
133
+ ...props
134
+ } = t0);
135
+ $[0] = t0;
136
+ $[1] = props;
137
+ $[2] = t1;
138
+ $[3] = t2;
139
+ $[4] = t3;
140
+ $[5] = t4;
141
+ $[6] = t5;
142
+ } else {
143
+ props = $[1];
144
+ t1 = $[2];
145
+ t2 = $[3];
146
+ t3 = $[4];
147
+ t4 = $[5];
148
+ t5 = $[6];
149
+ }
150
+ const action = t1 === undefined ? "/user/confirm-password" : t1;
151
+ const fields = t2 === undefined ? null : t2;
152
+ const size = t3 === undefined ? "lg" : t3;
153
+ const passwordLabel = t4 === undefined ? null : t4;
154
+ const submitButtonLabel = t5 === undefined ? null : t5;
155
+ let t6;
156
+ if ($[7] !== fields || $[8] !== passwordLabel || $[9] !== size) {
157
+ t6 = fields || [{
158
+ name: "password",
159
+ type: "password",
160
+ size,
93
161
  label: passwordLabel || /*#__PURE__*/jsx(FormattedMessage, {
94
- id: "B1h3gd",
95
- defaultMessage: [{
96
- "type": 0,
97
- "value": "Please enter your password to continue"
98
- }]
162
+ id: "B1h3gd"
99
163
  })
100
- }],
101
- submitButtonLabel: submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
102
- id: "QUAHwy",
103
- defaultMessage: [{
104
- "type": 0,
105
- "value": "Continue"
106
- }]
107
- })
108
- }, props));
164
+ }];
165
+ $[7] = fields;
166
+ $[8] = passwordLabel;
167
+ $[9] = size;
168
+ $[10] = t6;
169
+ } else {
170
+ t6 = $[10];
171
+ }
172
+ let t7;
173
+ if ($[11] !== submitButtonLabel) {
174
+ t7 = submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
175
+ id: "QUAHwy"
176
+ });
177
+ $[11] = submitButtonLabel;
178
+ $[12] = t7;
179
+ } else {
180
+ t7 = $[12];
181
+ }
182
+ let t8;
183
+ if ($[13] !== action || $[14] !== props || $[15] !== t6 || $[16] !== t7) {
184
+ t8 = /*#__PURE__*/jsx(Form, {
185
+ action: action,
186
+ fields: t6,
187
+ submitButtonLabel: t7,
188
+ ...props
189
+ });
190
+ $[13] = action;
191
+ $[14] = props;
192
+ $[15] = t6;
193
+ $[16] = t7;
194
+ $[17] = t8;
195
+ } else {
196
+ t8 = $[17];
197
+ }
198
+ return t8;
109
199
  }
110
200
 
111
- var _excluded$6 = ["action", "fields", "emailLabel", "submitButtonLabel", "size", "withLoginLink", "loginLink", "loginLabel"];
112
- function ForgotPassword(_ref) {
113
- var _ref$action = _ref.action,
114
- action = _ref$action === void 0 ? '/forgot-password' : _ref$action,
115
- _ref$fields = _ref.fields,
116
- fields = _ref$fields === void 0 ? null : _ref$fields,
117
- _ref$emailLabel = _ref.emailLabel,
118
- emailLabel = _ref$emailLabel === void 0 ? null : _ref$emailLabel,
119
- _ref$submitButtonLabe = _ref.submitButtonLabel,
120
- submitButtonLabel = _ref$submitButtonLabe === void 0 ? null : _ref$submitButtonLabe,
121
- _ref$size = _ref.size,
122
- size = _ref$size === void 0 ? 'lg' : _ref$size,
123
- _ref$withLoginLink = _ref.withLoginLink,
124
- withLoginLink = _ref$withLoginLink === void 0 ? true : _ref$withLoginLink,
125
- _ref$loginLink = _ref.loginLink,
126
- loginLink = _ref$loginLink === void 0 ? '/login' : _ref$loginLink,
127
- _ref$loginLabel = _ref.loginLabel,
128
- loginLabel = _ref$loginLabel === void 0 ? null : _ref$loginLabel,
129
- props = _objectWithoutProperties(_ref, _excluded$6);
130
- return /*#__PURE__*/jsx(Form, _objectSpread({
131
- action: action,
132
- fields: fields || [{
133
- name: 'email',
134
- type: 'email',
135
- size: size,
201
+ function ForgotPassword(t0) {
202
+ const $ = c(26);
203
+ let props;
204
+ let t1;
205
+ let t2;
206
+ let t3;
207
+ let t4;
208
+ let t5;
209
+ let t6;
210
+ let t7;
211
+ let t8;
212
+ if ($[0] !== t0) {
213
+ ({
214
+ action: t1,
215
+ fields: t2,
216
+ emailLabel: t3,
217
+ submitButtonLabel: t4,
218
+ size: t5,
219
+ withLoginLink: t6,
220
+ loginLink: t7,
221
+ loginLabel: t8,
222
+ ...props
223
+ } = t0);
224
+ $[0] = t0;
225
+ $[1] = props;
226
+ $[2] = t1;
227
+ $[3] = t2;
228
+ $[4] = t3;
229
+ $[5] = t4;
230
+ $[6] = t5;
231
+ $[7] = t6;
232
+ $[8] = t7;
233
+ $[9] = t8;
234
+ } else {
235
+ props = $[1];
236
+ t1 = $[2];
237
+ t2 = $[3];
238
+ t3 = $[4];
239
+ t4 = $[5];
240
+ t5 = $[6];
241
+ t6 = $[7];
242
+ t7 = $[8];
243
+ t8 = $[9];
244
+ }
245
+ const action = t1 === undefined ? "/forgot-password" : t1;
246
+ const fields = t2 === undefined ? null : t2;
247
+ const emailLabel = t3 === undefined ? null : t3;
248
+ const submitButtonLabel = t4 === undefined ? null : t4;
249
+ const size = t5 === undefined ? "lg" : t5;
250
+ const withLoginLink = t6 === undefined ? true : t6;
251
+ const loginLink = t7 === undefined ? "/login" : t7;
252
+ const loginLabel = t8 === undefined ? null : t8;
253
+ let t9;
254
+ if ($[10] !== emailLabel || $[11] !== fields || $[12] !== size) {
255
+ t9 = fields || [{
256
+ name: "email",
257
+ type: "email",
258
+ size,
136
259
  label: emailLabel || /*#__PURE__*/jsx(FormattedMessage, {
137
- id: "LI0Gz4",
138
- defaultMessage: [{
139
- "type": 0,
140
- "value": "Email"
141
- }]
260
+ id: "LI0Gz4"
142
261
  })
143
- }],
144
- submitButtonLabel: submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
145
- id: "12Px0g",
146
- defaultMessage: [{
147
- "type": 0,
148
- "value": "Send reset link"
149
- }]
150
- }),
151
- actions: withLoginLink ? /*#__PURE__*/jsx(Link, {
262
+ }];
263
+ $[10] = emailLabel;
264
+ $[11] = fields;
265
+ $[12] = size;
266
+ $[13] = t9;
267
+ } else {
268
+ t9 = $[13];
269
+ }
270
+ let t10;
271
+ if ($[14] !== submitButtonLabel) {
272
+ t10 = submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
273
+ id: "12Px0g"
274
+ });
275
+ $[14] = submitButtonLabel;
276
+ $[15] = t10;
277
+ } else {
278
+ t10 = $[15];
279
+ }
280
+ let t11;
281
+ if ($[16] !== loginLabel || $[17] !== loginLink || $[18] !== withLoginLink) {
282
+ t11 = withLoginLink ? /*#__PURE__*/jsx(Link, {
152
283
  href: loginLink,
153
284
  className: "py-2 px-4",
154
285
  children: loginLabel || /*#__PURE__*/jsx(FormattedMessage, {
155
- id: "tPeIKO",
156
- defaultMessage: [{
157
- "type": 0,
158
- "value": "Go back to login"
159
- }]
286
+ id: "tPeIKO"
160
287
  })
161
- }) : null
162
- }, props));
288
+ }) : null;
289
+ $[16] = loginLabel;
290
+ $[17] = loginLink;
291
+ $[18] = withLoginLink;
292
+ $[19] = t11;
293
+ } else {
294
+ t11 = $[19];
295
+ }
296
+ let t12;
297
+ if ($[20] !== action || $[21] !== props || $[22] !== t10 || $[23] !== t11 || $[24] !== t9) {
298
+ t12 = /*#__PURE__*/jsx(Form, {
299
+ action: action,
300
+ fields: t9,
301
+ submitButtonLabel: t10,
302
+ actions: t11,
303
+ ...props
304
+ });
305
+ $[20] = action;
306
+ $[21] = props;
307
+ $[22] = t10;
308
+ $[23] = t11;
309
+ $[24] = t9;
310
+ $[25] = t12;
311
+ } else {
312
+ t12 = $[25];
313
+ }
314
+ return t12;
163
315
  }
164
316
 
165
- var _excluded$5 = ["action", "postForm", "fields", "size", "emailLabel", "passwordLabel", "submitButtonLabel", "withForgotPassword", "forgotPasswordLink", "forgotPasswordLabel"];
166
- function Login(_ref) {
167
- var _ref$action = _ref.action,
168
- action = _ref$action === void 0 ? '/login' : _ref$action,
169
- _ref$postForm = _ref.postForm,
170
- postForm = _ref$postForm === void 0 ? null : _ref$postForm,
171
- _ref$fields = _ref.fields,
172
- fields = _ref$fields === void 0 ? null : _ref$fields,
173
- _ref$size = _ref.size,
174
- size = _ref$size === void 0 ? 'lg' : _ref$size,
175
- _ref$emailLabel = _ref.emailLabel,
176
- emailLabel = _ref$emailLabel === void 0 ? null : _ref$emailLabel,
177
- _ref$passwordLabel = _ref.passwordLabel,
178
- passwordLabel = _ref$passwordLabel === void 0 ? null : _ref$passwordLabel,
179
- _ref$submitButtonLabe = _ref.submitButtonLabel,
180
- submitButtonLabel = _ref$submitButtonLabe === void 0 ? null : _ref$submitButtonLabe,
181
- _ref$withForgotPasswo = _ref.withForgotPassword,
182
- withForgotPassword = _ref$withForgotPasswo === void 0 ? false : _ref$withForgotPasswo,
183
- _ref$forgotPasswordLi = _ref.forgotPasswordLink,
184
- forgotPasswordLink = _ref$forgotPasswordLi === void 0 ? '/forgot-password' : _ref$forgotPasswordLi,
185
- _ref$forgotPasswordLa = _ref.forgotPasswordLabel,
186
- forgotPasswordLabel = _ref$forgotPasswordLa === void 0 ? null : _ref$forgotPasswordLa,
187
- props = _objectWithoutProperties(_ref, _excluded$5);
188
- return /*#__PURE__*/jsx(Form, _objectSpread({
189
- action: action,
190
- postForm: postForm,
191
- fields: fields || [{
192
- name: 'email',
193
- type: 'email',
194
- size: size,
317
+ function Login(t0) {
318
+ const $ = c(30);
319
+ let props;
320
+ let t1;
321
+ let t10;
322
+ let t2;
323
+ let t3;
324
+ let t4;
325
+ let t5;
326
+ let t6;
327
+ let t7;
328
+ let t8;
329
+ let t9;
330
+ if ($[0] !== t0) {
331
+ ({
332
+ action: t1,
333
+ postForm: t2,
334
+ fields: t3,
335
+ size: t4,
336
+ emailLabel: t5,
337
+ passwordLabel: t6,
338
+ submitButtonLabel: t7,
339
+ withForgotPassword: t8,
340
+ forgotPasswordLink: t9,
341
+ forgotPasswordLabel: t10,
342
+ ...props
343
+ } = t0);
344
+ $[0] = t0;
345
+ $[1] = props;
346
+ $[2] = t1;
347
+ $[3] = t10;
348
+ $[4] = t2;
349
+ $[5] = t3;
350
+ $[6] = t4;
351
+ $[7] = t5;
352
+ $[8] = t6;
353
+ $[9] = t7;
354
+ $[10] = t8;
355
+ $[11] = t9;
356
+ } else {
357
+ props = $[1];
358
+ t1 = $[2];
359
+ t10 = $[3];
360
+ t2 = $[4];
361
+ t3 = $[5];
362
+ t4 = $[6];
363
+ t5 = $[7];
364
+ t6 = $[8];
365
+ t7 = $[9];
366
+ t8 = $[10];
367
+ t9 = $[11];
368
+ }
369
+ const action = t1 === undefined ? "/login" : t1;
370
+ const postForm = t2 === undefined ? null : t2;
371
+ const fields = t3 === undefined ? null : t3;
372
+ const size = t4 === undefined ? "lg" : t4;
373
+ const emailLabel = t5 === undefined ? null : t5;
374
+ const passwordLabel = t6 === undefined ? null : t6;
375
+ const submitButtonLabel = t7 === undefined ? null : t7;
376
+ const withForgotPassword = t8 === undefined ? false : t8;
377
+ const forgotPasswordLink = t9 === undefined ? "/forgot-password" : t9;
378
+ const forgotPasswordLabel = t10 === undefined ? null : t10;
379
+ let t11;
380
+ if ($[12] !== emailLabel || $[13] !== fields || $[14] !== passwordLabel || $[15] !== size) {
381
+ t11 = fields || [{
382
+ name: "email",
383
+ type: "email",
384
+ size,
195
385
  label: emailLabel || /*#__PURE__*/jsx(FormattedMessage, {
196
- id: "LI0Gz4",
197
- defaultMessage: [{
198
- "type": 0,
199
- "value": "Email"
200
- }]
386
+ id: "LI0Gz4"
201
387
  })
202
388
  }, {
203
- name: 'password',
204
- type: 'password',
205
- size: size,
389
+ name: "password",
390
+ type: "password",
391
+ size,
206
392
  label: passwordLabel || /*#__PURE__*/jsx(FormattedMessage, {
207
- id: "4yfet+",
208
- defaultMessage: [{
209
- "type": 0,
210
- "value": "Password"
211
- }]
393
+ id: "4yfet+"
212
394
  })
213
- }],
214
- submitButtonLabel: submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
215
- id: "g6qbbX",
216
- defaultMessage: [{
217
- "type": 0,
218
- "value": "Log in"
219
- }]
220
- }),
221
- actions: withForgotPassword ? /*#__PURE__*/jsx(Link, {
395
+ }];
396
+ $[12] = emailLabel;
397
+ $[13] = fields;
398
+ $[14] = passwordLabel;
399
+ $[15] = size;
400
+ $[16] = t11;
401
+ } else {
402
+ t11 = $[16];
403
+ }
404
+ let t12;
405
+ if ($[17] !== submitButtonLabel) {
406
+ t12 = submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
407
+ id: "g6qbbX"
408
+ });
409
+ $[17] = submitButtonLabel;
410
+ $[18] = t12;
411
+ } else {
412
+ t12 = $[18];
413
+ }
414
+ let t13;
415
+ if ($[19] !== forgotPasswordLabel || $[20] !== forgotPasswordLink || $[21] !== withForgotPassword) {
416
+ t13 = withForgotPassword ? /*#__PURE__*/jsx(Link, {
222
417
  href: forgotPasswordLink,
223
418
  className: "py-2 px-4",
224
419
  children: forgotPasswordLabel || /*#__PURE__*/jsx(FormattedMessage, {
225
- id: "ZBNqY2",
226
- defaultMessage: [{
227
- "type": 0,
228
- "value": "Forgot your password?"
229
- }]
420
+ id: "ZBNqY2"
230
421
  })
231
- }) : null
232
- }, props));
422
+ }) : null;
423
+ $[19] = forgotPasswordLabel;
424
+ $[20] = forgotPasswordLink;
425
+ $[21] = withForgotPassword;
426
+ $[22] = t13;
427
+ } else {
428
+ t13 = $[22];
429
+ }
430
+ let t14;
431
+ if ($[23] !== action || $[24] !== postForm || $[25] !== props || $[26] !== t11 || $[27] !== t12 || $[28] !== t13) {
432
+ t14 = /*#__PURE__*/jsx(Form, {
433
+ action: action,
434
+ postForm: postForm,
435
+ fields: t11,
436
+ submitButtonLabel: t12,
437
+ actions: t13,
438
+ ...props
439
+ });
440
+ $[23] = action;
441
+ $[24] = postForm;
442
+ $[25] = props;
443
+ $[26] = t11;
444
+ $[27] = t12;
445
+ $[28] = t13;
446
+ $[29] = t14;
447
+ } else {
448
+ t14 = $[29];
449
+ }
450
+ return t14;
233
451
  }
234
452
 
235
- var _excluded$4 = ["action", "fields", "size", "nameLabel", "emailLabel", "passwordLabel", "passwordConfirmationLabel", "submitButtonLabel", "withLoginLink", "loginLink", "loginLabel"];
236
- function Register(_ref) {
237
- var _ref$action = _ref.action,
238
- action = _ref$action === void 0 ? '/register' : _ref$action,
239
- _ref$fields = _ref.fields,
240
- fields = _ref$fields === void 0 ? null : _ref$fields,
241
- _ref$size = _ref.size,
242
- size = _ref$size === void 0 ? 'lg' : _ref$size,
243
- _ref$nameLabel = _ref.nameLabel,
244
- nameLabel = _ref$nameLabel === void 0 ? null : _ref$nameLabel,
245
- _ref$emailLabel = _ref.emailLabel,
246
- emailLabel = _ref$emailLabel === void 0 ? null : _ref$emailLabel,
247
- _ref$passwordLabel = _ref.passwordLabel,
248
- passwordLabel = _ref$passwordLabel === void 0 ? null : _ref$passwordLabel,
249
- _ref$passwordConfirma = _ref.passwordConfirmationLabel,
250
- passwordConfirmationLabel = _ref$passwordConfirma === void 0 ? null : _ref$passwordConfirma,
251
- _ref$submitButtonLabe = _ref.submitButtonLabel,
252
- submitButtonLabel = _ref$submitButtonLabe === void 0 ? null : _ref$submitButtonLabe,
253
- _ref$withLoginLink = _ref.withLoginLink,
254
- withLoginLink = _ref$withLoginLink === void 0 ? true : _ref$withLoginLink,
255
- _ref$loginLink = _ref.loginLink,
256
- loginLink = _ref$loginLink === void 0 ? '/login' : _ref$loginLink,
257
- _ref$loginLabel = _ref.loginLabel,
258
- loginLabel = _ref$loginLabel === void 0 ? null : _ref$loginLabel,
259
- props = _objectWithoutProperties(_ref, _excluded$4);
260
- return /*#__PURE__*/jsx(Form, _objectSpread({
261
- action: action,
262
- fields: fields || [{
263
- name: 'name',
264
- type: 'text',
265
- size: size,
453
+ function Register(t0) {
454
+ const $ = c(32);
455
+ let props;
456
+ let t1;
457
+ let t10;
458
+ let t11;
459
+ let t2;
460
+ let t3;
461
+ let t4;
462
+ let t5;
463
+ let t6;
464
+ let t7;
465
+ let t8;
466
+ let t9;
467
+ if ($[0] !== t0) {
468
+ ({
469
+ action: t1,
470
+ fields: t2,
471
+ size: t3,
472
+ nameLabel: t4,
473
+ emailLabel: t5,
474
+ passwordLabel: t6,
475
+ passwordConfirmationLabel: t7,
476
+ submitButtonLabel: t8,
477
+ withLoginLink: t9,
478
+ loginLink: t10,
479
+ loginLabel: t11,
480
+ ...props
481
+ } = t0);
482
+ $[0] = t0;
483
+ $[1] = props;
484
+ $[2] = t1;
485
+ $[3] = t10;
486
+ $[4] = t11;
487
+ $[5] = t2;
488
+ $[6] = t3;
489
+ $[7] = t4;
490
+ $[8] = t5;
491
+ $[9] = t6;
492
+ $[10] = t7;
493
+ $[11] = t8;
494
+ $[12] = t9;
495
+ } else {
496
+ props = $[1];
497
+ t1 = $[2];
498
+ t10 = $[3];
499
+ t11 = $[4];
500
+ t2 = $[5];
501
+ t3 = $[6];
502
+ t4 = $[7];
503
+ t5 = $[8];
504
+ t6 = $[9];
505
+ t7 = $[10];
506
+ t8 = $[11];
507
+ t9 = $[12];
508
+ }
509
+ const action = t1 === undefined ? "/register" : t1;
510
+ const fields = t2 === undefined ? null : t2;
511
+ const size = t3 === undefined ? "lg" : t3;
512
+ const nameLabel = t4 === undefined ? null : t4;
513
+ const emailLabel = t5 === undefined ? null : t5;
514
+ const passwordLabel = t6 === undefined ? null : t6;
515
+ const passwordConfirmationLabel = t7 === undefined ? null : t7;
516
+ const submitButtonLabel = t8 === undefined ? null : t8;
517
+ const withLoginLink = t9 === undefined ? true : t9;
518
+ const loginLink = t10 === undefined ? "/login" : t10;
519
+ const loginLabel = t11 === undefined ? null : t11;
520
+ let t12;
521
+ if ($[13] !== emailLabel || $[14] !== fields || $[15] !== nameLabel || $[16] !== passwordConfirmationLabel || $[17] !== passwordLabel || $[18] !== size) {
522
+ t12 = fields || [{
523
+ name: "name",
524
+ type: "text",
525
+ size,
266
526
  label: nameLabel || /*#__PURE__*/jsx(FormattedMessage, {
267
- id: "UUv8FR",
268
- defaultMessage: [{
269
- "type": 0,
270
- "value": "Name"
271
- }]
527
+ id: "UUv8FR"
272
528
  })
273
529
  }, {
274
- name: 'email',
275
- type: 'email',
276
- size: size,
530
+ name: "email",
531
+ type: "email",
532
+ size,
277
533
  label: emailLabel || /*#__PURE__*/jsx(FormattedMessage, {
278
- id: "LI0Gz4",
279
- defaultMessage: [{
280
- "type": 0,
281
- "value": "Email"
282
- }]
534
+ id: "LI0Gz4"
283
535
  })
284
536
  }, {
285
- name: 'password',
286
- type: 'password',
287
- size: size,
537
+ name: "password",
538
+ type: "password",
539
+ size,
288
540
  label: passwordLabel || /*#__PURE__*/jsx(FormattedMessage, {
289
- id: "4yfet+",
290
- defaultMessage: [{
291
- "type": 0,
292
- "value": "Password"
293
- }]
541
+ id: "4yfet+"
294
542
  })
295
543
  }, {
296
- name: 'password_confirmation',
297
- type: 'password',
298
- size: size,
544
+ name: "password_confirmation",
545
+ type: "password",
546
+ size,
299
547
  label: passwordConfirmationLabel || /*#__PURE__*/jsx(FormattedMessage, {
300
- id: "VhJUeW",
301
- defaultMessage: [{
302
- "type": 0,
303
- "value": "Confirm your password"
304
- }]
548
+ id: "VhJUeW"
305
549
  })
306
- }],
307
- submitButtonLabel: submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
308
- id: "PQX/ph",
309
- defaultMessage: [{
310
- "type": 0,
311
- "value": "Create account"
312
- }]
313
- }),
314
- actions: withLoginLink ? /*#__PURE__*/jsx(Link, {
550
+ }];
551
+ $[13] = emailLabel;
552
+ $[14] = fields;
553
+ $[15] = nameLabel;
554
+ $[16] = passwordConfirmationLabel;
555
+ $[17] = passwordLabel;
556
+ $[18] = size;
557
+ $[19] = t12;
558
+ } else {
559
+ t12 = $[19];
560
+ }
561
+ let t13;
562
+ if ($[20] !== submitButtonLabel) {
563
+ t13 = submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
564
+ id: "PQX/ph"
565
+ });
566
+ $[20] = submitButtonLabel;
567
+ $[21] = t13;
568
+ } else {
569
+ t13 = $[21];
570
+ }
571
+ let t14;
572
+ if ($[22] !== loginLabel || $[23] !== loginLink || $[24] !== withLoginLink) {
573
+ t14 = withLoginLink ? /*#__PURE__*/jsx(Link, {
315
574
  href: loginLink,
316
575
  className: "py-2 px-4",
317
576
  children: loginLabel || /*#__PURE__*/jsx(FormattedMessage, {
318
- id: "wa783M",
319
- defaultMessage: [{
320
- "type": 0,
321
- "value": "Already have an account? Go to login"
322
- }]
577
+ id: "wa783M"
323
578
  })
324
- }) : null
325
- }, props));
579
+ }) : null;
580
+ $[22] = loginLabel;
581
+ $[23] = loginLink;
582
+ $[24] = withLoginLink;
583
+ $[25] = t14;
584
+ } else {
585
+ t14 = $[25];
586
+ }
587
+ let t15;
588
+ if ($[26] !== action || $[27] !== props || $[28] !== t12 || $[29] !== t13 || $[30] !== t14) {
589
+ t15 = /*#__PURE__*/jsx(Form, {
590
+ action: action,
591
+ fields: t12,
592
+ submitButtonLabel: t13,
593
+ actions: t14,
594
+ ...props
595
+ });
596
+ $[26] = action;
597
+ $[27] = props;
598
+ $[28] = t12;
599
+ $[29] = t13;
600
+ $[30] = t14;
601
+ $[31] = t15;
602
+ } else {
603
+ t15 = $[31];
604
+ }
605
+ return t15;
326
606
  }
327
607
 
328
- var _excluded$3 = ["action", "fields", "size", "emailLabel", "passwordLabel", "passwordConfirmationLabel", "submitButtonLabel"];
329
- function ResetPassword(_ref) {
330
- var _ref$action = _ref.action,
331
- action = _ref$action === void 0 ? '/reset-password' : _ref$action,
332
- _ref$fields = _ref.fields,
333
- fields = _ref$fields === void 0 ? null : _ref$fields,
334
- _ref$size = _ref.size,
335
- size = _ref$size === void 0 ? 'lg' : _ref$size,
336
- _ref$emailLabel = _ref.emailLabel,
337
- emailLabel = _ref$emailLabel === void 0 ? null : _ref$emailLabel,
338
- _ref$passwordLabel = _ref.passwordLabel,
339
- passwordLabel = _ref$passwordLabel === void 0 ? null : _ref$passwordLabel,
340
- _ref$passwordConfirma = _ref.passwordConfirmationLabel,
341
- passwordConfirmationLabel = _ref$passwordConfirma === void 0 ? null : _ref$passwordConfirma,
342
- _ref$submitButtonLabe = _ref.submitButtonLabel,
343
- submitButtonLabel = _ref$submitButtonLabe === void 0 ? null : _ref$submitButtonLabe,
344
- props = _objectWithoutProperties(_ref, _excluded$3);
345
- return /*#__PURE__*/jsx(Form, _objectSpread({
346
- action: action,
347
- fields: fields || [{
348
- name: 'email',
349
- type: 'email',
350
- size: size,
608
+ function ResetPassword(t0) {
609
+ const $ = c(22);
610
+ let props;
611
+ let t1;
612
+ let t2;
613
+ let t3;
614
+ let t4;
615
+ let t5;
616
+ let t6;
617
+ let t7;
618
+ if ($[0] !== t0) {
619
+ ({
620
+ action: t1,
621
+ fields: t2,
622
+ size: t3,
623
+ emailLabel: t4,
624
+ passwordLabel: t5,
625
+ passwordConfirmationLabel: t6,
626
+ submitButtonLabel: t7,
627
+ ...props
628
+ } = t0);
629
+ $[0] = t0;
630
+ $[1] = props;
631
+ $[2] = t1;
632
+ $[3] = t2;
633
+ $[4] = t3;
634
+ $[5] = t4;
635
+ $[6] = t5;
636
+ $[7] = t6;
637
+ $[8] = t7;
638
+ } else {
639
+ props = $[1];
640
+ t1 = $[2];
641
+ t2 = $[3];
642
+ t3 = $[4];
643
+ t4 = $[5];
644
+ t5 = $[6];
645
+ t6 = $[7];
646
+ t7 = $[8];
647
+ }
648
+ const action = t1 === undefined ? "/reset-password" : t1;
649
+ const fields = t2 === undefined ? null : t2;
650
+ const size = t3 === undefined ? "lg" : t3;
651
+ const emailLabel = t4 === undefined ? null : t4;
652
+ const passwordLabel = t5 === undefined ? null : t5;
653
+ const passwordConfirmationLabel = t6 === undefined ? null : t6;
654
+ const submitButtonLabel = t7 === undefined ? null : t7;
655
+ let t8;
656
+ if ($[9] !== emailLabel || $[10] !== fields || $[11] !== passwordConfirmationLabel || $[12] !== passwordLabel || $[13] !== size) {
657
+ t8 = fields || [{
658
+ name: "email",
659
+ type: "email",
660
+ size,
351
661
  label: emailLabel || /*#__PURE__*/jsx(FormattedMessage, {
352
- id: "LI0Gz4",
353
- defaultMessage: [{
354
- "type": 0,
355
- "value": "Email"
356
- }]
662
+ id: "LI0Gz4"
357
663
  }),
358
664
  readOnly: true
359
665
  }, {
360
- name: 'password',
361
- type: 'password',
362
- size: size,
666
+ name: "password",
667
+ type: "password",
668
+ size,
363
669
  label: passwordLabel || /*#__PURE__*/jsx(FormattedMessage, {
364
- id: "4yfet+",
365
- defaultMessage: [{
366
- "type": 0,
367
- "value": "Password"
368
- }]
670
+ id: "4yfet+"
369
671
  })
370
672
  }, {
371
- name: 'password_confirmation',
372
- type: 'password',
373
- size: size,
673
+ name: "password_confirmation",
674
+ type: "password",
675
+ size,
374
676
  label: passwordConfirmationLabel || /*#__PURE__*/jsx(FormattedMessage, {
375
- id: "VhJUeW",
376
- defaultMessage: [{
377
- "type": 0,
378
- "value": "Confirm your password"
379
- }]
677
+ id: "VhJUeW"
380
678
  })
381
- }],
382
- submitButtonLabel: submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
383
- id: "zwks3g",
384
- defaultMessage: [{
385
- "type": 0,
386
- "value": "Save new password"
387
- }]
388
- })
389
- }, props));
679
+ }];
680
+ $[9] = emailLabel;
681
+ $[10] = fields;
682
+ $[11] = passwordConfirmationLabel;
683
+ $[12] = passwordLabel;
684
+ $[13] = size;
685
+ $[14] = t8;
686
+ } else {
687
+ t8 = $[14];
688
+ }
689
+ let t9;
690
+ if ($[15] !== submitButtonLabel) {
691
+ t9 = submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
692
+ id: "zwks3g"
693
+ });
694
+ $[15] = submitButtonLabel;
695
+ $[16] = t9;
696
+ } else {
697
+ t9 = $[16];
698
+ }
699
+ let t10;
700
+ if ($[17] !== action || $[18] !== props || $[19] !== t8 || $[20] !== t9) {
701
+ t10 = /*#__PURE__*/jsx(Form, {
702
+ action: action,
703
+ fields: t8,
704
+ submitButtonLabel: t9,
705
+ ...props
706
+ });
707
+ $[17] = action;
708
+ $[18] = props;
709
+ $[19] = t8;
710
+ $[20] = t9;
711
+ $[21] = t10;
712
+ } else {
713
+ t10 = $[21];
714
+ }
715
+ return t10;
390
716
  }
391
717
 
392
- var _excluded$2 = ["action", "fields", "size", "codeLabel", "submitButtonLabel"];
393
- function TwoFactorChallenge(_ref) {
394
- var _ref$action = _ref.action,
395
- action = _ref$action === void 0 ? '/two-factor-challenge' : _ref$action,
396
- _ref$fields = _ref.fields,
397
- fields = _ref$fields === void 0 ? null : _ref$fields,
398
- _ref$size = _ref.size,
399
- size = _ref$size === void 0 ? 'lg' : _ref$size,
400
- _ref$codeLabel = _ref.codeLabel,
401
- codeLabel = _ref$codeLabel === void 0 ? null : _ref$codeLabel,
402
- _ref$submitButtonLabe = _ref.submitButtonLabel,
403
- submitButtonLabel = _ref$submitButtonLabe === void 0 ? null : _ref$submitButtonLabe,
404
- props = _objectWithoutProperties(_ref, _excluded$2);
405
- return /*#__PURE__*/jsx(Form, _objectSpread({
406
- action: action,
407
- fields: fields || [{
408
- name: 'code',
409
- type: 'text',
410
- size: size,
718
+ function TwoFactorChallenge(t0) {
719
+ const $ = c(18);
720
+ let props;
721
+ let t1;
722
+ let t2;
723
+ let t3;
724
+ let t4;
725
+ let t5;
726
+ if ($[0] !== t0) {
727
+ ({
728
+ action: t1,
729
+ fields: t2,
730
+ size: t3,
731
+ codeLabel: t4,
732
+ submitButtonLabel: t5,
733
+ ...props
734
+ } = t0);
735
+ $[0] = t0;
736
+ $[1] = props;
737
+ $[2] = t1;
738
+ $[3] = t2;
739
+ $[4] = t3;
740
+ $[5] = t4;
741
+ $[6] = t5;
742
+ } else {
743
+ props = $[1];
744
+ t1 = $[2];
745
+ t2 = $[3];
746
+ t3 = $[4];
747
+ t4 = $[5];
748
+ t5 = $[6];
749
+ }
750
+ const action = t1 === undefined ? "/two-factor-challenge" : t1;
751
+ const fields = t2 === undefined ? null : t2;
752
+ const size = t3 === undefined ? "lg" : t3;
753
+ const codeLabel = t4 === undefined ? null : t4;
754
+ const submitButtonLabel = t5 === undefined ? null : t5;
755
+ let t6;
756
+ if ($[7] !== codeLabel || $[8] !== fields || $[9] !== size) {
757
+ t6 = fields || [{
758
+ name: "code",
759
+ type: "text",
760
+ size,
411
761
  label: codeLabel || /*#__PURE__*/jsx(FormattedMessage, {
412
- id: "22Ld5M",
413
- defaultMessage: [{
414
- "type": 0,
415
- "value": "Enter the code from your authenticator app to continue"
416
- }]
762
+ id: "22Ld5M"
417
763
  })
418
- }],
419
- submitButtonLabel: submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
420
- id: "QUAHwy",
421
- defaultMessage: [{
422
- "type": 0,
423
- "value": "Continue"
424
- }]
425
- })
426
- }, props));
764
+ }];
765
+ $[7] = codeLabel;
766
+ $[8] = fields;
767
+ $[9] = size;
768
+ $[10] = t6;
769
+ } else {
770
+ t6 = $[10];
771
+ }
772
+ let t7;
773
+ if ($[11] !== submitButtonLabel) {
774
+ t7 = submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
775
+ id: "QUAHwy"
776
+ });
777
+ $[11] = submitButtonLabel;
778
+ $[12] = t7;
779
+ } else {
780
+ t7 = $[12];
781
+ }
782
+ let t8;
783
+ if ($[13] !== action || $[14] !== props || $[15] !== t6 || $[16] !== t7) {
784
+ t8 = /*#__PURE__*/jsx(Form, {
785
+ action: action,
786
+ fields: t6,
787
+ submitButtonLabel: t7,
788
+ ...props
789
+ });
790
+ $[13] = action;
791
+ $[14] = props;
792
+ $[15] = t6;
793
+ $[16] = t7;
794
+ $[17] = t8;
795
+ } else {
796
+ t8 = $[17];
797
+ }
798
+ return t8;
427
799
  }
428
800
 
429
- var _excluded$1 = ["action", "fields", "explainationLabel", "submitButtonLabel", "size", "withCancelLink", "cancelLink", "cancelLabel"];
430
- function TwoFactorDisable(_ref) {
431
- var _ref$action = _ref.action,
432
- action = _ref$action === void 0 ? '/user/two-factor-authentication' : _ref$action;
433
- _ref.fields;
434
- var _ref$explainationLabe = _ref.explainationLabel,
435
- explainationLabel = _ref$explainationLabe === void 0 ? null : _ref$explainationLabe,
436
- _ref$submitButtonLabe = _ref.submitButtonLabel,
437
- submitButtonLabel = _ref$submitButtonLabe === void 0 ? null : _ref$submitButtonLabe;
438
- _ref.size;
439
- var _ref$withCancelLink = _ref.withCancelLink,
440
- withCancelLink = _ref$withCancelLink === void 0 ? true : _ref$withCancelLink,
441
- _ref$cancelLink = _ref.cancelLink,
442
- cancelLink = _ref$cancelLink === void 0 ? '/home' : _ref$cancelLink,
443
- _ref$cancelLabel = _ref.cancelLabel,
444
- cancelLabel = _ref$cancelLabel === void 0 ? null : _ref$cancelLabel,
445
- props = _objectWithoutProperties(_ref, _excluded$1);
446
- var defaultPostForm = useCallback(function (act, data) {
447
- return postJSON(act, data, {
448
- credentials: 'include',
449
- headers: getCSRFHeaders(),
450
- method: 'DELETE'
801
+ function TwoFactorDisable(t0) {
802
+ const $ = c(26);
803
+ let props;
804
+ let t1;
805
+ let t2;
806
+ let t3;
807
+ let t4;
808
+ let t5;
809
+ let t6;
810
+ let t7;
811
+ let t8;
812
+ if ($[0] !== t0) {
813
+ ({
814
+ action: t1,
815
+ fields: t2,
816
+ explainationLabel: t3,
817
+ submitButtonLabel: t4,
818
+ size: t5,
819
+ withCancelLink: t6,
820
+ cancelLink: t7,
821
+ cancelLabel: t8,
822
+ ...props
823
+ } = t0);
824
+ $[0] = t0;
825
+ $[1] = props;
826
+ $[2] = t1;
827
+ $[3] = t2;
828
+ $[4] = t3;
829
+ $[5] = t4;
830
+ $[6] = t5;
831
+ $[7] = t6;
832
+ $[8] = t7;
833
+ $[9] = t8;
834
+ } else {
835
+ props = $[1];
836
+ t1 = $[2];
837
+ t2 = $[3];
838
+ t3 = $[4];
839
+ t4 = $[5];
840
+ t5 = $[6];
841
+ t6 = $[7];
842
+ t7 = $[8];
843
+ t8 = $[9];
844
+ }
845
+ const action = t1 === undefined ? "/user/two-factor-authentication" : t1;
846
+ const explainationLabel = t3 === undefined ? null : t3;
847
+ const submitButtonLabel = t4 === undefined ? null : t4;
848
+ const withCancelLink = t6 === undefined ? true : t6;
849
+ const cancelLink = t7 === undefined ? "/home" : t7;
850
+ const cancelLabel = t8 === undefined ? null : t8;
851
+ const defaultPostForm = _temp;
852
+ let t9;
853
+ if ($[10] !== submitButtonLabel) {
854
+ t9 = submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
855
+ id: "gWmL5V"
451
856
  });
452
- }, []);
453
- return /*#__PURE__*/jsx(Form, _objectSpread(_objectSpread({
454
- action: action,
455
- submitButtonLabel: submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
456
- id: "gWmL5V",
457
- defaultMessage: [{
458
- "type": 0,
459
- "value": "Disable two factor authentication"
460
- }]
461
- }),
462
- actions: withCancelLink ? /*#__PURE__*/jsx(Link, {
857
+ $[10] = submitButtonLabel;
858
+ $[11] = t9;
859
+ } else {
860
+ t9 = $[11];
861
+ }
862
+ let t10;
863
+ if ($[12] !== cancelLabel || $[13] !== cancelLink || $[14] !== withCancelLink) {
864
+ t10 = withCancelLink ? /*#__PURE__*/jsx(Link, {
463
865
  className: "py-2 px-4",
464
866
  href: cancelLink,
465
867
  children: cancelLabel || /*#__PURE__*/jsx(FormattedMessage, {
466
- id: "U/ye2x",
467
- defaultMessage: [{
468
- "type": 0,
469
- "value": "Cancel"
470
- }]
471
- })
472
- }) : null,
473
- postForm: defaultPostForm
474
- }, props), {}, {
475
- children: /*#__PURE__*/jsx("p", {
476
- children: explainationLabel || /*#__PURE__*/jsx(FormattedMessage, {
477
- id: "5nHK/H",
478
- defaultMessage: [{
479
- "type": 0,
480
- "value": "Do you really wish to disable two factor authentication on your account?"
481
- }]
868
+ id: "U/ye2x"
482
869
  })
483
- })
484
- }));
870
+ }) : null;
871
+ $[12] = cancelLabel;
872
+ $[13] = cancelLink;
873
+ $[14] = withCancelLink;
874
+ $[15] = t10;
875
+ } else {
876
+ t10 = $[15];
877
+ }
878
+ let t11;
879
+ if ($[16] !== explainationLabel) {
880
+ t11 = explainationLabel || /*#__PURE__*/jsx(FormattedMessage, {
881
+ id: "5nHK/H"
882
+ });
883
+ $[16] = explainationLabel;
884
+ $[17] = t11;
885
+ } else {
886
+ t11 = $[17];
887
+ }
888
+ let t12;
889
+ if ($[18] !== t11) {
890
+ t12 = /*#__PURE__*/jsx("p", {
891
+ children: t11
892
+ });
893
+ $[18] = t11;
894
+ $[19] = t12;
895
+ } else {
896
+ t12 = $[19];
897
+ }
898
+ let t13;
899
+ if ($[20] !== action || $[21] !== props || $[22] !== t10 || $[23] !== t12 || $[24] !== t9) {
900
+ t13 = /*#__PURE__*/jsx(Form, {
901
+ action: action,
902
+ submitButtonLabel: t9,
903
+ actions: t10,
904
+ postForm: defaultPostForm,
905
+ ...props,
906
+ children: t12
907
+ });
908
+ $[20] = action;
909
+ $[21] = props;
910
+ $[22] = t10;
911
+ $[23] = t12;
912
+ $[24] = t9;
913
+ $[25] = t13;
914
+ } else {
915
+ t13 = $[25];
916
+ }
917
+ return t13;
918
+ }
919
+ function _temp(act, data) {
920
+ return postJSON(act, data, {
921
+ credentials: "include",
922
+ headers: getCSRFHeaders(),
923
+ method: "DELETE"
924
+ });
485
925
  }
486
926
 
487
- var _excluded = ["action", "fields", "explainationLabel", "submitButtonLabel", "size", "withSkipLink", "skipLink", "skipLabel"];
488
- function TwoFactorEnable(_ref) {
489
- var _ref$action = _ref.action,
490
- action = _ref$action === void 0 ? '/user/two-factor-authentication' : _ref$action;
491
- _ref.fields;
492
- var _ref$explainationLabe = _ref.explainationLabel,
493
- explainationLabel = _ref$explainationLabe === void 0 ? null : _ref$explainationLabe,
494
- _ref$submitButtonLabe = _ref.submitButtonLabel,
495
- submitButtonLabel = _ref$submitButtonLabe === void 0 ? null : _ref$submitButtonLabe;
496
- _ref.size;
497
- var _ref$withSkipLink = _ref.withSkipLink,
498
- withSkipLink = _ref$withSkipLink === void 0 ? true : _ref$withSkipLink,
499
- _ref$skipLink = _ref.skipLink,
500
- skipLink = _ref$skipLink === void 0 ? '/home' : _ref$skipLink,
501
- _ref$skipLabel = _ref.skipLabel,
502
- skipLabel = _ref$skipLabel === void 0 ? null : _ref$skipLabel,
503
- props = _objectWithoutProperties(_ref, _excluded);
504
- return /*#__PURE__*/jsx(Form, _objectSpread(_objectSpread({
505
- action: action,
506
- submitButtonLabel: submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
507
- id: "pVHYDd",
508
- defaultMessage: [{
509
- "type": 0,
510
- "value": "Enable two factor authentication"
511
- }]
512
- }),
513
- actions: withSkipLink ? /*#__PURE__*/jsx(Link, {
927
+ function TwoFactorEnable(t0) {
928
+ const $ = c(26);
929
+ let props;
930
+ let t1;
931
+ let t2;
932
+ let t3;
933
+ let t4;
934
+ let t5;
935
+ let t6;
936
+ let t7;
937
+ let t8;
938
+ if ($[0] !== t0) {
939
+ ({
940
+ action: t1,
941
+ fields: t2,
942
+ explainationLabel: t3,
943
+ submitButtonLabel: t4,
944
+ size: t5,
945
+ withSkipLink: t6,
946
+ skipLink: t7,
947
+ skipLabel: t8,
948
+ ...props
949
+ } = t0);
950
+ $[0] = t0;
951
+ $[1] = props;
952
+ $[2] = t1;
953
+ $[3] = t2;
954
+ $[4] = t3;
955
+ $[5] = t4;
956
+ $[6] = t5;
957
+ $[7] = t6;
958
+ $[8] = t7;
959
+ $[9] = t8;
960
+ } else {
961
+ props = $[1];
962
+ t1 = $[2];
963
+ t2 = $[3];
964
+ t3 = $[4];
965
+ t4 = $[5];
966
+ t5 = $[6];
967
+ t6 = $[7];
968
+ t7 = $[8];
969
+ t8 = $[9];
970
+ }
971
+ const action = t1 === undefined ? "/user/two-factor-authentication" : t1;
972
+ const explainationLabel = t3 === undefined ? null : t3;
973
+ const submitButtonLabel = t4 === undefined ? null : t4;
974
+ const withSkipLink = t6 === undefined ? true : t6;
975
+ const skipLink = t7 === undefined ? "/home" : t7;
976
+ const skipLabel = t8 === undefined ? null : t8;
977
+ let t9;
978
+ if ($[10] !== submitButtonLabel) {
979
+ t9 = submitButtonLabel || /*#__PURE__*/jsx(FormattedMessage, {
980
+ id: "pVHYDd"
981
+ });
982
+ $[10] = submitButtonLabel;
983
+ $[11] = t9;
984
+ } else {
985
+ t9 = $[11];
986
+ }
987
+ let t10;
988
+ if ($[12] !== skipLabel || $[13] !== skipLink || $[14] !== withSkipLink) {
989
+ t10 = withSkipLink ? /*#__PURE__*/jsx(Link, {
514
990
  className: "py-2 px-4",
515
991
  href: skipLink,
516
992
  children: skipLabel || /*#__PURE__*/jsx(FormattedMessage, {
517
- id: "li2Qqu",
518
- defaultMessage: [{
519
- "type": 0,
520
- "value": "Skip setup"
521
- }]
522
- })
523
- }) : null
524
- }, props), {}, {
525
- children: /*#__PURE__*/jsx("p", {
526
- children: explainationLabel || /*#__PURE__*/jsx(FormattedMessage, {
527
- id: "zTiC4D",
528
- defaultMessage: [{
529
- "type": 0,
530
- "value": "Do you wish to enable two factor authentication on your account? You will have to use an authentication app such as Google Authenticator or Microsoft Authenticator in addition to your password to connect."
531
- }]
993
+ id: "li2Qqu"
532
994
  })
533
- })
534
- }));
995
+ }) : null;
996
+ $[12] = skipLabel;
997
+ $[13] = skipLink;
998
+ $[14] = withSkipLink;
999
+ $[15] = t10;
1000
+ } else {
1001
+ t10 = $[15];
1002
+ }
1003
+ let t11;
1004
+ if ($[16] !== explainationLabel) {
1005
+ t11 = explainationLabel || /*#__PURE__*/jsx(FormattedMessage, {
1006
+ id: "zTiC4D"
1007
+ });
1008
+ $[16] = explainationLabel;
1009
+ $[17] = t11;
1010
+ } else {
1011
+ t11 = $[17];
1012
+ }
1013
+ let t12;
1014
+ if ($[18] !== t11) {
1015
+ t12 = /*#__PURE__*/jsx("p", {
1016
+ children: t11
1017
+ });
1018
+ $[18] = t11;
1019
+ $[19] = t12;
1020
+ } else {
1021
+ t12 = $[19];
1022
+ }
1023
+ let t13;
1024
+ if ($[20] !== action || $[21] !== props || $[22] !== t10 || $[23] !== t12 || $[24] !== t9) {
1025
+ t13 = /*#__PURE__*/jsx(Form, {
1026
+ action: action,
1027
+ submitButtonLabel: t9,
1028
+ actions: t10,
1029
+ ...props,
1030
+ children: t12
1031
+ });
1032
+ $[20] = action;
1033
+ $[21] = props;
1034
+ $[22] = t10;
1035
+ $[23] = t12;
1036
+ $[24] = t9;
1037
+ $[25] = t13;
1038
+ } else {
1039
+ t13 = $[25];
1040
+ }
1041
+ return t13;
535
1042
  }
536
1043
 
537
1044
  export { ChangePassword, ConfirmPassword, ForgotPassword, Login, Register, ResetPassword, TwoFactorChallenge, TwoFactorDisable, TwoFactorEnable };