@singlebase/elements 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{authui-display-BCZBP7HR.js → authui-display-CKfGK5va.js} +519 -503
- package/dist/authui-display-CKfGK5va.js.map +1 -0
- package/dist/{authui-display-CLGFSqRi.cjs → authui-display-aWNht0cW.cjs} +38 -58
- package/dist/authui-display-aWNht0cW.cjs.map +1 -0
- package/dist/authui.cjs +1 -1
- package/dist/authui.js +2 -2
- package/dist/chat-C-gsskho.cjs +3258 -0
- package/dist/chat-C-gsskho.cjs.map +1 -0
- package/dist/{chat-bXaRWel7.js → chat-CEh6RygY.js} +1957 -1137
- package/dist/chat-CEh6RygY.js.map +1 -0
- package/dist/chat-messages.d.ts +11 -5
- package/dist/chat.cjs +1 -1
- package/dist/chat.d.ts +4 -3
- package/dist/chat.js +8 -6
- package/dist/elements/authui-base.d.ts +2 -0
- package/dist/elements/authui-buttons.d.ts +1 -1
- package/dist/elements/authui-display.d.ts +1 -1
- package/dist/elements/authui.d.ts +5 -1
- package/dist/elements/chat.d.ts +153 -10
- package/dist/elements/uploader.d.ts +14 -0
- package/dist/{files-BOwtpYyQ.js → files-DDJWPzZW.js} +82 -35
- package/dist/files-DDJWPzZW.js.map +1 -0
- package/dist/files-DyxcjZsx.cjs +75 -0
- package/dist/files-DyxcjZsx.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +24 -22
- package/dist/singlebase-elements.min.js +3799 -2892
- package/dist/singlebase-elements.min.js.map +1 -1
- package/dist/styles/branding.d.ts +5 -0
- package/dist/styles/tokens.d.ts +2 -0
- package/dist/{uploader-DGV2y9uT.cjs → uploader-660JIgIN.cjs} +53 -76
- package/dist/uploader-660JIgIN.cjs.map +1 -0
- package/dist/{uploader-abQoem5q.js → uploader-vfczkX51.js} +294 -271
- package/dist/uploader-vfczkX51.js.map +1 -0
- package/dist/uploader.cjs +1 -1
- package/dist/uploader.js +2 -2
- package/dist/utils/branding.d.ts +8 -0
- package/dist/utils/markdown.d.ts +69 -12
- package/dist/utils/svg.d.ts +10 -0
- package/package.json +3 -3
- package/dist/authui-display-BCZBP7HR.js.map +0 -1
- package/dist/authui-display-CLGFSqRi.cjs.map +0 -1
- package/dist/chat-DRenTJlI.cjs +0 -3001
- package/dist/chat-DRenTJlI.cjs.map +0 -1
- package/dist/chat-bXaRWel7.js.map +0 -1
- package/dist/files-BOwtpYyQ.js.map +0 -1
- package/dist/files-DW8A4Jl-.cjs +0 -38
- package/dist/files-DW8A4Jl-.cjs.map +0 -1
- package/dist/uploader-DGV2y9uT.cjs.map +0 -1
- package/dist/uploader-abQoem5q.js.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var is = Object.defineProperty;
|
|
2
|
+
var Ae = (l) => {
|
|
3
|
+
throw TypeError(l);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var b = (
|
|
7
|
-
var
|
|
8
|
-
import { LitElement as
|
|
9
|
-
import { property as p, state as m, customElement as
|
|
5
|
+
var as = (l, t, e) => t in l ? is(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
|
|
6
|
+
var b = (l, t, e) => as(l, typeof t != "symbol" ? t + "" : t, e), Me = (l, t, e) => t.has(l) || Ae("Cannot " + e);
|
|
7
|
+
var r = (l, t, e) => (Me(l, t, "read from private field"), e ? e.call(l) : t.get(l)), n = (l, t, e) => t.has(l) ? Ae("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(l) : t.set(l, e), o = (l, t, e, s) => (Me(l, t, "write to private field"), s ? s.call(l, e) : t.set(l, e), e);
|
|
8
|
+
import { LitElement as rs, html as a, nothing as d, css as Ge } from "lit";
|
|
9
|
+
import { property as p, state as m, customElement as ye } from "lit/decorators.js";
|
|
10
10
|
import { ifDefined as k } from "lit/directives/if-defined.js";
|
|
11
|
-
import { SinglebaseAuthError as
|
|
12
|
-
import { s as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
class
|
|
11
|
+
import { SinglebaseAuthError as Ce, mapErrorToHint as ns, createFilesUploadApi as os, resolveScreen as ls } from "@singlebase/singlebase-sdk";
|
|
12
|
+
import { s as hs, r as ds } from "./uploader-vfczkX51.js";
|
|
13
|
+
import { t as cs, b as us, j as ps } from "./files-DDJWPzZW.js";
|
|
14
|
+
import { getDefaultClient as gs, AUTHUI_PROP_KEYS as ms, authUIAttributeFor as bs, matchesPredicate as fs, validatePredicate as vs, getPath as Ne } from "@singlebase/core";
|
|
15
|
+
class ws {
|
|
16
16
|
constructor(t) {
|
|
17
17
|
b(this, "host");
|
|
18
18
|
b(this, "client", null);
|
|
@@ -31,7 +31,7 @@ class gs {
|
|
|
31
31
|
(t = this.unsubscribe) == null || t.call(this), this.unsubscribe = null;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const Ie = {
|
|
35
35
|
signInTitle: "Sign in",
|
|
36
36
|
signUpTitle: "Create your account",
|
|
37
37
|
forgotTitle: "Reset your password",
|
|
@@ -167,55 +167,62 @@ const Ae = {
|
|
|
167
167
|
oauthCallbackSub: "One moment while we complete your sign-in.",
|
|
168
168
|
oauthDenied: "Sign-in was cancelled or denied."
|
|
169
169
|
};
|
|
170
|
-
function
|
|
171
|
-
return
|
|
170
|
+
function $s(l) {
|
|
171
|
+
return l ? { ...Ie, ...l } : Ie;
|
|
172
172
|
}
|
|
173
|
-
var
|
|
174
|
-
for (var i =
|
|
175
|
-
(c =
|
|
176
|
-
return i &&
|
|
177
|
-
},
|
|
178
|
-
class $ extends
|
|
173
|
+
var ys = Object.defineProperty, Es = Object.getOwnPropertyDescriptor, _ = (l, t, e, s) => {
|
|
174
|
+
for (var i = Es(t, e), h = l.length - 1, c; h >= 0; h--)
|
|
175
|
+
(c = l[h]) && (i = c(t, e, i) || i);
|
|
176
|
+
return i && ys(t, e, i), i;
|
|
177
|
+
}, T, U, L, A, M, N;
|
|
178
|
+
class $ extends rs {
|
|
179
179
|
constructor() {
|
|
180
180
|
super(...arguments);
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
181
|
+
n(this, T, null);
|
|
182
|
+
n(this, U, {});
|
|
183
|
+
n(this, L);
|
|
184
|
+
n(this, A);
|
|
185
|
+
n(this, M);
|
|
186
|
+
n(this, N);
|
|
187
|
+
b(this, "auth", new ws(this));
|
|
187
188
|
/** Config keys already applied, so a later render does not fight the host. */
|
|
188
189
|
b(this, "appliedConfig", /* @__PURE__ */ new Set());
|
|
189
190
|
}
|
|
190
191
|
get client() {
|
|
191
|
-
return
|
|
192
|
+
return r(this, T);
|
|
192
193
|
}
|
|
193
194
|
set client(e) {
|
|
194
|
-
|
|
195
|
+
o(this, T, e);
|
|
195
196
|
}
|
|
196
197
|
get messages() {
|
|
197
|
-
return
|
|
198
|
+
return r(this, U);
|
|
198
199
|
}
|
|
199
200
|
set messages(e) {
|
|
200
|
-
|
|
201
|
+
o(this, U, e);
|
|
201
202
|
}
|
|
202
203
|
get theme() {
|
|
203
|
-
return
|
|
204
|
+
return r(this, L);
|
|
204
205
|
}
|
|
205
206
|
set theme(e) {
|
|
206
|
-
|
|
207
|
+
o(this, L, e);
|
|
207
208
|
}
|
|
208
209
|
get density() {
|
|
209
|
-
return
|
|
210
|
+
return r(this, A);
|
|
210
211
|
}
|
|
211
212
|
set density(e) {
|
|
212
|
-
|
|
213
|
+
o(this, A, e);
|
|
213
214
|
}
|
|
214
215
|
get fieldStyle() {
|
|
215
|
-
return
|
|
216
|
+
return r(this, M);
|
|
216
217
|
}
|
|
217
218
|
set fieldStyle(e) {
|
|
218
|
-
|
|
219
|
+
o(this, M, e);
|
|
220
|
+
}
|
|
221
|
+
get radius() {
|
|
222
|
+
return r(this, N);
|
|
223
|
+
}
|
|
224
|
+
set radius(e) {
|
|
225
|
+
o(this, N, e);
|
|
219
226
|
}
|
|
220
227
|
/**
|
|
221
228
|
* Resolution order: an explicit `.client`, then the page's default
|
|
@@ -231,7 +238,7 @@ class $ extends ss {
|
|
|
231
238
|
*/
|
|
232
239
|
get resolvedClient() {
|
|
233
240
|
var e;
|
|
234
|
-
return this.client ? this.client : ((e =
|
|
241
|
+
return this.client ? this.client : ((e = gs()) == null ? void 0 : e.auth) ?? null;
|
|
235
242
|
}
|
|
236
243
|
/** Page-wide UI config from SinglebaseClient({ authui }), if there is one. */
|
|
237
244
|
get uiConfig() {
|
|
@@ -245,7 +252,7 @@ class $ extends ss {
|
|
|
245
252
|
get msg() {
|
|
246
253
|
var s;
|
|
247
254
|
const e = (s = this.uiConfig) == null ? void 0 : s.messages;
|
|
248
|
-
return
|
|
255
|
+
return $s(e ? { ...e, ...this.messages } : this.messages);
|
|
249
256
|
}
|
|
250
257
|
/**
|
|
251
258
|
* Copies the page-wide config onto this element.
|
|
@@ -259,9 +266,9 @@ class $ extends ss {
|
|
|
259
266
|
applyUIConfig() {
|
|
260
267
|
const e = this.uiConfig;
|
|
261
268
|
if (e) {
|
|
262
|
-
for (const s of
|
|
269
|
+
for (const s of ms) {
|
|
263
270
|
const i = e[s];
|
|
264
|
-
i !== void 0 && s in this && (this.hasAttribute(
|
|
271
|
+
i !== void 0 && s in this && (this.hasAttribute(bs(s)) || this.appliedConfig.has(s) || (this.appliedConfig.add(s), this[s] = i));
|
|
265
272
|
}
|
|
266
273
|
for (const [s, i] of Object.entries(e.tokens ?? {}))
|
|
267
274
|
s.startsWith("--") && (this.style.getPropertyValue(s) || this.style.setProperty(s, i));
|
|
@@ -288,23 +295,26 @@ class $ extends ss {
|
|
|
288
295
|
super.willUpdate(e), this.auth.bind(this.resolvedClient), this.applyUIConfig();
|
|
289
296
|
}
|
|
290
297
|
}
|
|
291
|
-
|
|
292
|
-
|
|
298
|
+
T = new WeakMap(), U = new WeakMap(), L = new WeakMap(), A = new WeakMap(), M = new WeakMap(), N = new WeakMap(), b($, "styles", [cs, hs]);
|
|
299
|
+
_([
|
|
293
300
|
p({ attribute: !1 })
|
|
294
301
|
], $.prototype, "client");
|
|
295
|
-
|
|
302
|
+
_([
|
|
296
303
|
p({ attribute: !1 })
|
|
297
304
|
], $.prototype, "messages");
|
|
298
|
-
|
|
305
|
+
_([
|
|
299
306
|
p({ reflect: !0 })
|
|
300
307
|
], $.prototype, "theme");
|
|
301
|
-
|
|
308
|
+
_([
|
|
302
309
|
p({ reflect: !0 })
|
|
303
310
|
], $.prototype, "density");
|
|
304
|
-
|
|
311
|
+
_([
|
|
305
312
|
p({ reflect: !0, attribute: "field-style" })
|
|
306
313
|
], $.prototype, "fieldStyle");
|
|
307
|
-
|
|
314
|
+
_([
|
|
315
|
+
p({ reflect: !0 })
|
|
316
|
+
], $.prototype, "radius");
|
|
317
|
+
class ke {
|
|
308
318
|
constructor(t) {
|
|
309
319
|
b(this, "host");
|
|
310
320
|
b(this, "client", null);
|
|
@@ -330,7 +340,7 @@ class Se {
|
|
|
330
340
|
});
|
|
331
341
|
}
|
|
332
342
|
}
|
|
333
|
-
const
|
|
343
|
+
const Ss = [
|
|
334
344
|
"load",
|
|
335
345
|
"success",
|
|
336
346
|
"error",
|
|
@@ -345,7 +355,7 @@ const vs = [
|
|
|
345
355
|
"expired",
|
|
346
356
|
"navigate",
|
|
347
357
|
"goto"
|
|
348
|
-
],
|
|
358
|
+
], Cs = {
|
|
349
359
|
load: "auth:ready",
|
|
350
360
|
signin: "auth:signin",
|
|
351
361
|
signup: "auth:signup",
|
|
@@ -355,31 +365,31 @@ const vs = [
|
|
|
355
365
|
error: "auth:error",
|
|
356
366
|
navigate: "auth:navigate"
|
|
357
367
|
};
|
|
358
|
-
function
|
|
359
|
-
return "on" +
|
|
368
|
+
function Fe(l) {
|
|
369
|
+
return "on" + l.replace(/(^|-)([a-z])/g, (t, e, s) => s.toUpperCase());
|
|
360
370
|
}
|
|
361
|
-
class
|
|
371
|
+
class Ps {
|
|
362
372
|
constructor(t) {
|
|
363
373
|
b(this, "unsubscribes", []);
|
|
364
374
|
b(this, "client", null);
|
|
365
375
|
this.host = t, t.addController(this);
|
|
366
376
|
}
|
|
367
377
|
bind(t) {
|
|
368
|
-
t !== this.client && (this.release(), this.client = t, t && (this.unsubscribes =
|
|
378
|
+
t !== this.client && (this.release(), this.client = t, t && (this.unsubscribes = Ss.map(
|
|
369
379
|
(e) => t.on(e, (s) => this.publish(e, s))
|
|
370
380
|
)));
|
|
371
381
|
}
|
|
372
382
|
publish(t, e) {
|
|
373
|
-
const s = this.host[
|
|
383
|
+
const s = this.host[Fe(t)];
|
|
374
384
|
if (typeof s == "function")
|
|
375
385
|
try {
|
|
376
386
|
s.call(this.host, e);
|
|
377
387
|
} catch (c) {
|
|
378
|
-
console.error(`[singlebase] ${
|
|
388
|
+
console.error(`[singlebase] ${Fe(t)} threw:`, c);
|
|
379
389
|
}
|
|
380
390
|
const i = { detail: e, bubbles: !0, composed: !0 };
|
|
381
391
|
this.host.dispatchEvent(new CustomEvent(`singlebase-${t}`, i));
|
|
382
|
-
const h =
|
|
392
|
+
const h = Cs[t];
|
|
383
393
|
h && this.host.dispatchEvent(new CustomEvent(h, i));
|
|
384
394
|
}
|
|
385
395
|
release() {
|
|
@@ -389,36 +399,36 @@ class $s {
|
|
|
389
399
|
this.release(), this.client = null;
|
|
390
400
|
}
|
|
391
401
|
}
|
|
392
|
-
var
|
|
393
|
-
for (var i =
|
|
394
|
-
(c =
|
|
395
|
-
return i &&
|
|
396
|
-
},
|
|
397
|
-
class
|
|
402
|
+
var ks = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, _e = (l, t, e, s) => {
|
|
403
|
+
for (var i = _s(t, e), h = l.length - 1, c; h >= 0; h--)
|
|
404
|
+
(c = l[h]) && (i = c(t, e, i) || i);
|
|
405
|
+
return i && ks(t, e, i), i;
|
|
406
|
+
}, I, F, D;
|
|
407
|
+
class Ee extends $ {
|
|
398
408
|
constructor() {
|
|
399
409
|
super(...arguments);
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
410
|
+
n(this, I, "idle");
|
|
411
|
+
n(this, F, "");
|
|
412
|
+
n(this, D, "");
|
|
403
413
|
b(this, "abortController", null);
|
|
404
414
|
}
|
|
405
415
|
get phase() {
|
|
406
|
-
return
|
|
416
|
+
return r(this, I);
|
|
407
417
|
}
|
|
408
418
|
set phase(e) {
|
|
409
|
-
|
|
419
|
+
o(this, I, e);
|
|
410
420
|
}
|
|
411
421
|
get formError() {
|
|
412
|
-
return
|
|
422
|
+
return r(this, F);
|
|
413
423
|
}
|
|
414
424
|
set formError(e) {
|
|
415
|
-
|
|
425
|
+
o(this, F, e);
|
|
416
426
|
}
|
|
417
427
|
get noticeMessage() {
|
|
418
|
-
return
|
|
428
|
+
return r(this, D);
|
|
419
429
|
}
|
|
420
430
|
set noticeMessage(e) {
|
|
421
|
-
|
|
431
|
+
o(this, D, e);
|
|
422
432
|
}
|
|
423
433
|
disconnectedCallback() {
|
|
424
434
|
var e;
|
|
@@ -442,8 +452,8 @@ class we extends $ {
|
|
|
442
452
|
return e instanceof DOMException && e.name === "AbortError";
|
|
443
453
|
}
|
|
444
454
|
describeError(e) {
|
|
445
|
-
if (e instanceof
|
|
446
|
-
const s =
|
|
455
|
+
if (e instanceof Ce) {
|
|
456
|
+
const s = ns(e.code);
|
|
447
457
|
return s === "disable_retry_show_rate_limited" ? this.msg.rateLimitedMessage : s === "generic_credentials_message" ? this.msg.genericErrorMessage : this.msg.genericErrorMessage;
|
|
448
458
|
}
|
|
449
459
|
return this.msg.genericErrorMessage;
|
|
@@ -467,63 +477,63 @@ class we extends $ {
|
|
|
467
477
|
`;
|
|
468
478
|
}
|
|
469
479
|
}
|
|
470
|
-
|
|
471
|
-
|
|
480
|
+
I = new WeakMap(), F = new WeakMap(), D = new WeakMap();
|
|
481
|
+
_e([
|
|
472
482
|
m()
|
|
473
|
-
],
|
|
474
|
-
|
|
483
|
+
], Ee.prototype, "phase");
|
|
484
|
+
_e([
|
|
475
485
|
m()
|
|
476
|
-
],
|
|
477
|
-
|
|
486
|
+
], Ee.prototype, "formError");
|
|
487
|
+
_e([
|
|
478
488
|
m()
|
|
479
|
-
],
|
|
480
|
-
function
|
|
481
|
-
return [
|
|
489
|
+
], Ee.prototype, "noticeMessage");
|
|
490
|
+
function Ke(l) {
|
|
491
|
+
return [l == null ? void 0 : l.first_name, l == null ? void 0 : l.last_name].filter(Boolean).join(" ").trim();
|
|
482
492
|
}
|
|
483
|
-
function
|
|
484
|
-
const t =
|
|
493
|
+
function Ye(l) {
|
|
494
|
+
const t = Ke(l);
|
|
485
495
|
if (t)
|
|
486
496
|
return t.split(/\s+/).map((s) => s[0]).join("").slice(0, 2).toUpperCase();
|
|
487
|
-
const e = (
|
|
497
|
+
const e = (l == null ? void 0 : l.email) ?? "";
|
|
488
498
|
return e ? e[0].toUpperCase() : "·";
|
|
489
499
|
}
|
|
490
|
-
var
|
|
491
|
-
for (var i = s > 1 ? void 0 : s ?
|
|
492
|
-
(c =
|
|
493
|
-
return s && i &&
|
|
500
|
+
var Os = Object.defineProperty, xs = Object.getOwnPropertyDescriptor, v = (l, t, e, s) => {
|
|
501
|
+
for (var i = s > 1 ? void 0 : s ? xs(t, e) : t, h = l.length - 1, c; h >= 0; h--)
|
|
502
|
+
(c = l[h]) && (i = (s ? c(t, e, i) : c(i)) || i);
|
|
503
|
+
return s && i && Os(t, e, i), i;
|
|
494
504
|
};
|
|
495
|
-
const
|
|
496
|
-
var
|
|
497
|
-
let f = (
|
|
505
|
+
const Ts = { profile_photo: !0 }, Us = ".jpg,.jpeg,.png,.webp,image/jpeg,image/png,image/webp";
|
|
506
|
+
var B, R, j, H, q, V, G, K, Y, W, z, J, Q, X, Z, tt, et, st, it, at, rt, nt, ot, lt, ht, dt, Re;
|
|
507
|
+
let f = (Re = class extends Ee {
|
|
498
508
|
constructor() {
|
|
499
509
|
super(...arguments);
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
b(this, "settingsCtl", new
|
|
510
|
+
n(this, B, "");
|
|
511
|
+
n(this, R, "");
|
|
512
|
+
n(this, j, null);
|
|
513
|
+
n(this, H, "singlebase-oauth-nonce");
|
|
514
|
+
n(this, q, "");
|
|
515
|
+
n(this, V, "");
|
|
516
|
+
n(this, G, !1);
|
|
517
|
+
n(this, K, "");
|
|
518
|
+
n(this, Y, "");
|
|
519
|
+
n(this, W, "");
|
|
520
|
+
n(this, z, "");
|
|
521
|
+
n(this, J, "");
|
|
522
|
+
n(this, Q, 0);
|
|
523
|
+
n(this, X, "");
|
|
524
|
+
n(this, Z, "");
|
|
525
|
+
n(this, tt, "");
|
|
526
|
+
n(this, et, "");
|
|
527
|
+
n(this, st, "");
|
|
528
|
+
n(this, it, "request");
|
|
529
|
+
n(this, at, "");
|
|
530
|
+
n(this, rt, "");
|
|
531
|
+
n(this, nt, "");
|
|
532
|
+
n(this, ot, "");
|
|
533
|
+
n(this, lt, "");
|
|
534
|
+
n(this, ht, "");
|
|
535
|
+
n(this, dt, "");
|
|
536
|
+
b(this, "settingsCtl", new ke(this));
|
|
527
537
|
b(this, "flashTimer");
|
|
528
538
|
b(this, "uidBase", `sb-acct-${Math.random().toString(36).slice(2, 8)}`);
|
|
529
539
|
// ── profile photo ─────────────────────────────────────────
|
|
@@ -553,160 +563,160 @@ let f = (Fe = class extends we {
|
|
|
553
563
|
});
|
|
554
564
|
}
|
|
555
565
|
get logoText() {
|
|
556
|
-
return
|
|
566
|
+
return r(this, B);
|
|
557
567
|
}
|
|
558
568
|
set logoText(t) {
|
|
559
|
-
|
|
569
|
+
o(this, B, t);
|
|
560
570
|
}
|
|
561
571
|
get logoUrl() {
|
|
562
|
-
return
|
|
572
|
+
return r(this, R);
|
|
563
573
|
}
|
|
564
574
|
set logoUrl(t) {
|
|
565
|
-
|
|
575
|
+
o(this, R, t);
|
|
566
576
|
}
|
|
567
577
|
get settings() {
|
|
568
|
-
return
|
|
578
|
+
return r(this, j);
|
|
569
579
|
}
|
|
570
580
|
set settings(t) {
|
|
571
|
-
|
|
581
|
+
o(this, j, t);
|
|
572
582
|
}
|
|
573
583
|
get nonceStorageKey() {
|
|
574
|
-
return
|
|
584
|
+
return r(this, H);
|
|
575
585
|
}
|
|
576
586
|
set nonceStorageKey(t) {
|
|
577
|
-
|
|
587
|
+
o(this, H, t);
|
|
578
588
|
}
|
|
579
589
|
get editMode() {
|
|
580
|
-
return
|
|
590
|
+
return r(this, q);
|
|
581
591
|
}
|
|
582
592
|
set editMode(t) {
|
|
583
|
-
|
|
593
|
+
o(this, q, t);
|
|
584
594
|
}
|
|
585
595
|
get toast() {
|
|
586
|
-
return
|
|
596
|
+
return r(this, V);
|
|
587
597
|
}
|
|
588
598
|
set toast(t) {
|
|
589
|
-
|
|
599
|
+
o(this, V, t);
|
|
590
600
|
}
|
|
591
601
|
get photoBusy() {
|
|
592
|
-
return
|
|
602
|
+
return r(this, G);
|
|
593
603
|
}
|
|
594
604
|
set photoBusy(t) {
|
|
595
|
-
|
|
605
|
+
o(this, G, t);
|
|
596
606
|
}
|
|
597
607
|
get photoFailed() {
|
|
598
|
-
return
|
|
608
|
+
return r(this, K);
|
|
599
609
|
}
|
|
600
610
|
set photoFailed(t) {
|
|
601
|
-
|
|
611
|
+
o(this, K, t);
|
|
602
612
|
}
|
|
603
613
|
get profileSaved() {
|
|
604
|
-
return
|
|
614
|
+
return r(this, Y);
|
|
605
615
|
}
|
|
606
616
|
set profileSaved(t) {
|
|
607
|
-
|
|
617
|
+
o(this, Y, t);
|
|
608
618
|
}
|
|
609
619
|
get passSaved() {
|
|
610
|
-
return
|
|
620
|
+
return r(this, W);
|
|
611
621
|
}
|
|
612
622
|
set passSaved(t) {
|
|
613
|
-
|
|
623
|
+
o(this, W, t);
|
|
614
624
|
}
|
|
615
625
|
get profileError() {
|
|
616
|
-
return
|
|
626
|
+
return r(this, z);
|
|
617
627
|
}
|
|
618
628
|
set profileError(t) {
|
|
619
|
-
|
|
629
|
+
o(this, z, t);
|
|
620
630
|
}
|
|
621
631
|
get newPassError() {
|
|
622
|
-
return
|
|
632
|
+
return r(this, J);
|
|
623
633
|
}
|
|
624
634
|
set newPassError(t) {
|
|
625
|
-
|
|
635
|
+
o(this, J, t);
|
|
626
636
|
}
|
|
627
637
|
get deleteStage() {
|
|
628
|
-
return
|
|
638
|
+
return r(this, Q);
|
|
629
639
|
}
|
|
630
640
|
set deleteStage(t) {
|
|
631
|
-
|
|
641
|
+
o(this, Q, t);
|
|
632
642
|
}
|
|
633
643
|
get confirmText() {
|
|
634
|
-
return
|
|
644
|
+
return r(this, X);
|
|
635
645
|
}
|
|
636
646
|
set confirmText(t) {
|
|
637
|
-
|
|
647
|
+
o(this, X, t);
|
|
638
648
|
}
|
|
639
649
|
get dFirst() {
|
|
640
|
-
return
|
|
650
|
+
return r(this, Z);
|
|
641
651
|
}
|
|
642
652
|
set dFirst(t) {
|
|
643
|
-
|
|
653
|
+
o(this, Z, t);
|
|
644
654
|
}
|
|
645
655
|
get dLast() {
|
|
646
|
-
return
|
|
656
|
+
return r(this, tt);
|
|
647
657
|
}
|
|
648
658
|
set dLast(t) {
|
|
649
|
-
|
|
659
|
+
o(this, tt, t);
|
|
650
660
|
}
|
|
651
661
|
get dPhone() {
|
|
652
|
-
return
|
|
662
|
+
return r(this, et);
|
|
653
663
|
}
|
|
654
664
|
set dPhone(t) {
|
|
655
|
-
|
|
665
|
+
o(this, et, t);
|
|
656
666
|
}
|
|
657
667
|
get dEmail() {
|
|
658
|
-
return
|
|
668
|
+
return r(this, st);
|
|
659
669
|
}
|
|
660
670
|
set dEmail(t) {
|
|
661
|
-
|
|
671
|
+
o(this, st, t);
|
|
662
672
|
}
|
|
663
673
|
get emailStep() {
|
|
664
|
-
return
|
|
674
|
+
return r(this, it);
|
|
665
675
|
}
|
|
666
676
|
set emailStep(t) {
|
|
667
|
-
|
|
677
|
+
o(this, it, t);
|
|
668
678
|
}
|
|
669
679
|
get dNewEmail() {
|
|
670
|
-
return
|
|
680
|
+
return r(this, at);
|
|
671
681
|
}
|
|
672
682
|
set dNewEmail(t) {
|
|
673
|
-
|
|
683
|
+
o(this, at, t);
|
|
674
684
|
}
|
|
675
685
|
get emailCode() {
|
|
676
|
-
return
|
|
686
|
+
return r(this, rt);
|
|
677
687
|
}
|
|
678
688
|
set emailCode(t) {
|
|
679
|
-
|
|
689
|
+
o(this, rt, t);
|
|
680
690
|
}
|
|
681
691
|
get emailError() {
|
|
682
|
-
return
|
|
692
|
+
return r(this, nt);
|
|
683
693
|
}
|
|
684
694
|
set emailError(t) {
|
|
685
|
-
|
|
695
|
+
o(this, nt, t);
|
|
686
696
|
}
|
|
687
697
|
get emailSaved() {
|
|
688
|
-
return
|
|
698
|
+
return r(this, ot);
|
|
689
699
|
}
|
|
690
700
|
set emailSaved(t) {
|
|
691
|
-
|
|
701
|
+
o(this, ot, t);
|
|
692
702
|
}
|
|
693
703
|
get curPass() {
|
|
694
|
-
return
|
|
704
|
+
return r(this, lt);
|
|
695
705
|
}
|
|
696
706
|
set curPass(t) {
|
|
697
|
-
|
|
707
|
+
o(this, lt, t);
|
|
698
708
|
}
|
|
699
709
|
get newPass() {
|
|
700
|
-
return
|
|
710
|
+
return r(this, ht);
|
|
701
711
|
}
|
|
702
712
|
set newPass(t) {
|
|
703
|
-
|
|
713
|
+
o(this, ht, t);
|
|
704
714
|
}
|
|
705
715
|
get confirmPass() {
|
|
706
|
-
return
|
|
716
|
+
return r(this, dt);
|
|
707
717
|
}
|
|
708
718
|
set confirmPass(t) {
|
|
709
|
-
|
|
719
|
+
o(this, dt, t);
|
|
710
720
|
}
|
|
711
721
|
uid(t) {
|
|
712
722
|
return `${this.uidBase}-${t}`;
|
|
@@ -736,10 +746,10 @@ let f = (Fe = class extends we {
|
|
|
736
746
|
return t.status === "authenticated" ? t.user : null;
|
|
737
747
|
}
|
|
738
748
|
get fullName() {
|
|
739
|
-
return
|
|
749
|
+
return Ke(this.user);
|
|
740
750
|
}
|
|
741
751
|
get initials() {
|
|
742
|
-
return
|
|
752
|
+
return Ye(this.user);
|
|
743
753
|
}
|
|
744
754
|
/**
|
|
745
755
|
* The upload API bound to the same dispatcher as this widget's auth client,
|
|
@@ -748,7 +758,7 @@ let f = (Fe = class extends we {
|
|
|
748
758
|
*/
|
|
749
759
|
get uploadClient() {
|
|
750
760
|
const t = this.resolvedClient;
|
|
751
|
-
return t ? (this.uploadClientFor !== t && (this.uploadClientFor = t, this.uploadClientCache = { files:
|
|
761
|
+
return t ? (this.uploadClientFor !== t && (this.uploadClientFor = t, this.uploadClientCache = { files: os(t.dispatcher) }), this.uploadClientCache) : null;
|
|
752
762
|
}
|
|
753
763
|
startProfileEdit() {
|
|
754
764
|
const t = this.user;
|
|
@@ -1015,9 +1025,9 @@ let f = (Fe = class extends we {
|
|
|
1015
1025
|
view="button"
|
|
1016
1026
|
max-files="1"
|
|
1017
1027
|
branding="false"
|
|
1018
|
-
accept=${
|
|
1028
|
+
accept=${Us}
|
|
1019
1029
|
.client=${this.uploadClient}
|
|
1020
|
-
.options=${
|
|
1030
|
+
.options=${Ts}
|
|
1021
1031
|
@singlebase-upload-selected=${this.onPhotoSelected}
|
|
1022
1032
|
@singlebase-upload-complete=${this.onPhotoUploaded}
|
|
1023
1033
|
@singlebase-upload-error=${this.onPhotoProblem}
|
|
@@ -1332,7 +1342,7 @@ let f = (Fe = class extends we {
|
|
|
1332
1342
|
</div>
|
|
1333
1343
|
` : a`<p class="disabled-note">Not signed in.</p>`;
|
|
1334
1344
|
}
|
|
1335
|
-
},
|
|
1345
|
+
}, B = new WeakMap(), R = new WeakMap(), j = new WeakMap(), H = new WeakMap(), q = new WeakMap(), V = new WeakMap(), G = new WeakMap(), K = new WeakMap(), Y = new WeakMap(), W = new WeakMap(), z = new WeakMap(), J = new WeakMap(), Q = new WeakMap(), X = new WeakMap(), Z = new WeakMap(), tt = new WeakMap(), et = new WeakMap(), st = new WeakMap(), it = new WeakMap(), at = new WeakMap(), rt = new WeakMap(), nt = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), ht = new WeakMap(), dt = new WeakMap(), Re);
|
|
1336
1346
|
v([
|
|
1337
1347
|
p({ attribute: "logo-text" })
|
|
1338
1348
|
], f.prototype, "logoText", 1);
|
|
@@ -1412,66 +1422,66 @@ v([
|
|
|
1412
1422
|
m()
|
|
1413
1423
|
], f.prototype, "confirmPass", 1);
|
|
1414
1424
|
f = v([
|
|
1415
|
-
|
|
1425
|
+
ye("singlebase-authui-account")
|
|
1416
1426
|
], f);
|
|
1417
|
-
var
|
|
1418
|
-
for (var i = s > 1 ? void 0 : s ?
|
|
1419
|
-
(c =
|
|
1420
|
-
return s && i &&
|
|
1421
|
-
},
|
|
1422
|
-
let E = (
|
|
1427
|
+
var Ls = Object.defineProperty, As = Object.getOwnPropertyDescriptor, C = (l, t, e, s) => {
|
|
1428
|
+
for (var i = s > 1 ? void 0 : s ? As(t, e) : t, h = l.length - 1, c; h >= 0; h--)
|
|
1429
|
+
(c = l[h]) && (i = (s ? c(t, e, i) : c(i)) || i);
|
|
1430
|
+
return s && i && Ls(t, e, i), i;
|
|
1431
|
+
}, ct, ut, pt, gt, mt, bt, ft, je;
|
|
1432
|
+
let E = (je = class extends Ee {
|
|
1423
1433
|
constructor() {
|
|
1424
1434
|
super(...arguments);
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
b(this, "settingsCtl", new
|
|
1435
|
+
n(this, ct, "signout");
|
|
1436
|
+
n(this, ut, "signin");
|
|
1437
|
+
n(this, pt, "");
|
|
1438
|
+
n(this, gt, "");
|
|
1439
|
+
n(this, mt, !1);
|
|
1440
|
+
n(this, bt, null);
|
|
1441
|
+
n(this, ft, "singlebase-oauth-nonce");
|
|
1442
|
+
b(this, "settingsCtl", new ke(this));
|
|
1433
1443
|
}
|
|
1434
1444
|
get type() {
|
|
1435
|
-
return
|
|
1445
|
+
return r(this, ct);
|
|
1436
1446
|
}
|
|
1437
1447
|
set type(t) {
|
|
1438
|
-
|
|
1448
|
+
o(this, ct, t);
|
|
1439
1449
|
}
|
|
1440
1450
|
get intent() {
|
|
1441
|
-
return
|
|
1451
|
+
return r(this, ut);
|
|
1442
1452
|
}
|
|
1443
1453
|
set intent(t) {
|
|
1444
|
-
|
|
1454
|
+
o(this, ut, t);
|
|
1445
1455
|
}
|
|
1446
1456
|
get provider() {
|
|
1447
|
-
return
|
|
1457
|
+
return r(this, pt);
|
|
1448
1458
|
}
|
|
1449
1459
|
set provider(t) {
|
|
1450
|
-
|
|
1460
|
+
o(this, pt, t);
|
|
1451
1461
|
}
|
|
1452
1462
|
get providerName() {
|
|
1453
|
-
return
|
|
1463
|
+
return r(this, gt);
|
|
1454
1464
|
}
|
|
1455
1465
|
set providerName(t) {
|
|
1456
|
-
|
|
1466
|
+
o(this, gt, t);
|
|
1457
1467
|
}
|
|
1458
1468
|
get embedded() {
|
|
1459
|
-
return
|
|
1469
|
+
return r(this, mt);
|
|
1460
1470
|
}
|
|
1461
1471
|
set embedded(t) {
|
|
1462
|
-
|
|
1472
|
+
o(this, mt, t);
|
|
1463
1473
|
}
|
|
1464
1474
|
get settings() {
|
|
1465
|
-
return
|
|
1475
|
+
return r(this, bt);
|
|
1466
1476
|
}
|
|
1467
1477
|
set settings(t) {
|
|
1468
|
-
|
|
1478
|
+
o(this, bt, t);
|
|
1469
1479
|
}
|
|
1470
1480
|
get nonceStorageKey() {
|
|
1471
|
-
return
|
|
1481
|
+
return r(this, ft);
|
|
1472
1482
|
}
|
|
1473
1483
|
set nonceStorageKey(t) {
|
|
1474
|
-
|
|
1484
|
+
o(this, ft, t);
|
|
1475
1485
|
}
|
|
1476
1486
|
willUpdate(t) {
|
|
1477
1487
|
super.willUpdate(t), this.type === "oauth" && this.settingsCtl.load(this.resolvedClient, this.settings);
|
|
@@ -1510,9 +1520,9 @@ let E = (De = class extends we {
|
|
|
1510
1520
|
h = w.session.id_token, c = w.session.refresh_token;
|
|
1511
1521
|
}
|
|
1512
1522
|
await this.run(async () => {
|
|
1513
|
-
var
|
|
1523
|
+
var Se;
|
|
1514
1524
|
const w = await i.createOAuthNonce(this.signal);
|
|
1515
|
-
(
|
|
1525
|
+
(Se = globalThis.sessionStorage) == null || Se.setItem(this.nonceStorageKey, w);
|
|
1516
1526
|
const { oauth_redirect_url: y } = await i.startOAuth(
|
|
1517
1527
|
{
|
|
1518
1528
|
provider: t,
|
|
@@ -1618,7 +1628,7 @@ let E = (De = class extends we {
|
|
|
1618
1628
|
render() {
|
|
1619
1629
|
return this.type === "oauth" ? this.renderOAuth() : this.type === "link" ? this.renderLink() : this.renderSignOut();
|
|
1620
1630
|
}
|
|
1621
|
-
},
|
|
1631
|
+
}, ct = new WeakMap(), ut = new WeakMap(), pt = new WeakMap(), gt = new WeakMap(), mt = new WeakMap(), bt = new WeakMap(), ft = new WeakMap(), je);
|
|
1622
1632
|
C([
|
|
1623
1633
|
p()
|
|
1624
1634
|
], E.prototype, "type", 1);
|
|
@@ -1641,14 +1651,14 @@ C([
|
|
|
1641
1651
|
p({ attribute: "nonce-storage-key" })
|
|
1642
1652
|
], E.prototype, "nonceStorageKey", 1);
|
|
1643
1653
|
E = C([
|
|
1644
|
-
|
|
1654
|
+
ye("singlebase-authui-buttons")
|
|
1645
1655
|
], E);
|
|
1646
|
-
var
|
|
1647
|
-
for (var i = s > 1 ? void 0 : s ?
|
|
1648
|
-
(c =
|
|
1649
|
-
return s && i &&
|
|
1650
|
-
},
|
|
1651
|
-
const
|
|
1656
|
+
var We = Object.defineProperty, Ms = Object.getOwnPropertyDescriptor, Ns = (l, t, e) => t in l ? We(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e, g = (l, t, e, s) => {
|
|
1657
|
+
for (var i = s > 1 ? void 0 : s ? Ms(t, e) : t, h = l.length - 1, c; h >= 0; h--)
|
|
1658
|
+
(c = l[h]) && (i = (s ? c(t, e, i) : c(i)) || i);
|
|
1659
|
+
return s && i && We(t, e, i), i;
|
|
1660
|
+
}, Is = (l, t, e) => Ns(l, t + "", e);
|
|
1661
|
+
const ze = [
|
|
1652
1662
|
"signin",
|
|
1653
1663
|
"signup",
|
|
1654
1664
|
"forgot",
|
|
@@ -1656,80 +1666,82 @@ const Ke = [
|
|
|
1656
1666
|
"otp",
|
|
1657
1667
|
"newpass",
|
|
1658
1668
|
"invite"
|
|
1659
|
-
],
|
|
1660
|
-
function
|
|
1661
|
-
return
|
|
1669
|
+
], Je = ["account"], Fs = [...ze, ...Je, "oauth-callback"];
|
|
1670
|
+
function De(l) {
|
|
1671
|
+
return ze.includes(l);
|
|
1662
1672
|
}
|
|
1663
|
-
function
|
|
1664
|
-
return
|
|
1673
|
+
function Ds(l) {
|
|
1674
|
+
return Je.includes(l);
|
|
1665
1675
|
}
|
|
1666
|
-
function
|
|
1667
|
-
return
|
|
1676
|
+
function Be(l) {
|
|
1677
|
+
return Fs.includes(l);
|
|
1668
1678
|
}
|
|
1669
1679
|
const P = {
|
|
1670
1680
|
// An absent attribute must mean "default" (true), not false. Lit calls
|
|
1671
1681
|
// fromAttribute(null) when an attribute is *removed*, so returning false
|
|
1672
1682
|
// there would make removing `allow-oauth="false"` leave the flag off
|
|
1673
1683
|
// forever instead of restoring the default.
|
|
1674
|
-
fromAttribute: (
|
|
1675
|
-
toAttribute: (
|
|
1684
|
+
fromAttribute: (l) => l === null ? !0 : l !== "false",
|
|
1685
|
+
toAttribute: (l) => l ? null : "false"
|
|
1676
1686
|
};
|
|
1677
|
-
var
|
|
1678
|
-
let u = (
|
|
1687
|
+
var vt, wt, $t, yt, Et, St, Ct, Pt, kt, _t, Ot, xt, Tt, Ut, Lt, At, Mt, Nt, It, Ft, Dt, Bt, Rt, jt, Ht, qt, Vt, Gt, Kt, Yt, Wt, zt, Jt, Qt, Xt, Zt, te, ee, se, ie, ae, re, ne, oe, le, he, de, ce, ue, He;
|
|
1688
|
+
let u = (He = class extends $ {
|
|
1679
1689
|
constructor() {
|
|
1680
1690
|
super(...arguments);
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1691
|
+
n(this, vt, "signin");
|
|
1692
|
+
n(this, wt, "");
|
|
1693
|
+
n(this, $t, !1);
|
|
1694
|
+
n(this, yt, null);
|
|
1695
|
+
n(this, Et, !0);
|
|
1696
|
+
n(this, St, !0);
|
|
1697
|
+
n(this, Ct, !0);
|
|
1698
|
+
n(this, Pt, !0);
|
|
1699
|
+
n(this, kt, !0);
|
|
1700
|
+
n(this, _t, !0);
|
|
1701
|
+
n(this, Ot, "card");
|
|
1702
|
+
n(this, xt, "bottom");
|
|
1703
|
+
n(this, Tt, !1);
|
|
1704
|
+
n(this, Ut, "");
|
|
1705
|
+
n(this, Lt, "");
|
|
1706
|
+
n(this, At, "");
|
|
1707
|
+
n(this, Mt, "");
|
|
1708
|
+
n(this, Nt, "");
|
|
1709
|
+
n(this, It, !0);
|
|
1710
|
+
n(this, Ft, "");
|
|
1711
|
+
n(this, Dt, "");
|
|
1712
|
+
n(this, Bt, "");
|
|
1713
|
+
n(this, Rt, "");
|
|
1714
|
+
n(this, jt, "");
|
|
1715
|
+
n(this, Ht, "singlebase-oauth-nonce");
|
|
1716
|
+
n(this, qt, "");
|
|
1717
|
+
n(this, Vt, "");
|
|
1718
|
+
n(this, Gt, "");
|
|
1719
|
+
n(this, Kt, 0);
|
|
1720
|
+
n(this, Yt, "");
|
|
1721
|
+
n(this, Wt, "");
|
|
1722
|
+
n(this, zt, "");
|
|
1723
|
+
n(this, Jt, "");
|
|
1724
|
+
n(this, Qt, "");
|
|
1725
|
+
n(this, Xt, "");
|
|
1726
|
+
n(this, Zt, "");
|
|
1727
|
+
n(this, te, "");
|
|
1728
|
+
n(this, ee, "");
|
|
1729
|
+
n(this, se, ["", "", "", "", "", ""]);
|
|
1730
|
+
n(this, ie, "signin_code");
|
|
1731
|
+
n(this, ae, !1);
|
|
1732
|
+
n(this, re, "");
|
|
1733
|
+
n(this, ne, "");
|
|
1734
|
+
n(this, oe, "");
|
|
1735
|
+
n(this, le, "");
|
|
1736
|
+
n(this, he, "");
|
|
1737
|
+
n(this, de, 0);
|
|
1738
|
+
n(this, ce, !1);
|
|
1739
|
+
b(this, "settingsCtl", new ke(this));
|
|
1740
|
+
b(this, "bridge", new Ps(this));
|
|
1729
1741
|
b(this, "uidBase", `sb-${Math.random().toString(36).slice(2, 8)}`);
|
|
1730
1742
|
b(this, "gotoUnsubscribe");
|
|
1731
1743
|
b(this, "gotoClient", null);
|
|
1732
|
-
|
|
1744
|
+
n(this, ue, !1);
|
|
1733
1745
|
b(this, "abortController", null);
|
|
1734
1746
|
b(this, "onContinue", () => {
|
|
1735
1747
|
this.followRedirect() || (this.dispatchEvent(
|
|
@@ -1746,280 +1758,292 @@ let u = (Be = class extends $ {
|
|
|
1746
1758
|
});
|
|
1747
1759
|
}
|
|
1748
1760
|
get initialScreen() {
|
|
1749
|
-
return
|
|
1761
|
+
return r(this, vt);
|
|
1750
1762
|
}
|
|
1751
1763
|
set initialScreen(t) {
|
|
1752
|
-
|
|
1764
|
+
o(this, vt, t);
|
|
1753
1765
|
}
|
|
1754
1766
|
get screen() {
|
|
1755
|
-
return
|
|
1767
|
+
return r(this, wt);
|
|
1756
1768
|
}
|
|
1757
1769
|
set screen(t) {
|
|
1758
|
-
|
|
1770
|
+
o(this, wt, t);
|
|
1759
1771
|
}
|
|
1760
1772
|
get noAccountView() {
|
|
1761
|
-
return
|
|
1773
|
+
return r(this, $t);
|
|
1762
1774
|
}
|
|
1763
1775
|
set noAccountView(t) {
|
|
1764
|
-
|
|
1776
|
+
o(this, $t, t);
|
|
1765
1777
|
}
|
|
1766
1778
|
get settings() {
|
|
1767
|
-
return
|
|
1779
|
+
return r(this, yt);
|
|
1768
1780
|
}
|
|
1769
1781
|
set settings(t) {
|
|
1770
|
-
|
|
1782
|
+
o(this, yt, t);
|
|
1771
1783
|
}
|
|
1772
1784
|
get authEnabled() {
|
|
1773
|
-
return
|
|
1785
|
+
return r(this, Et);
|
|
1774
1786
|
}
|
|
1775
1787
|
set authEnabled(t) {
|
|
1776
|
-
|
|
1788
|
+
o(this, Et, t);
|
|
1777
1789
|
}
|
|
1778
1790
|
get allowEmailSignin() {
|
|
1779
|
-
return
|
|
1791
|
+
return r(this, St);
|
|
1780
1792
|
}
|
|
1781
1793
|
set allowEmailSignin(t) {
|
|
1782
|
-
|
|
1794
|
+
o(this, St, t);
|
|
1783
1795
|
}
|
|
1784
1796
|
get allowEmailSignup() {
|
|
1785
|
-
return
|
|
1797
|
+
return r(this, Ct);
|
|
1786
1798
|
}
|
|
1787
1799
|
set allowEmailSignup(t) {
|
|
1788
|
-
|
|
1800
|
+
o(this, Ct, t);
|
|
1789
1801
|
}
|
|
1790
1802
|
get allowEmailOtp() {
|
|
1791
|
-
return
|
|
1803
|
+
return r(this, Pt);
|
|
1792
1804
|
}
|
|
1793
1805
|
set allowEmailOtp(t) {
|
|
1794
|
-
|
|
1806
|
+
o(this, Pt, t);
|
|
1795
1807
|
}
|
|
1796
1808
|
get allowOauth() {
|
|
1797
|
-
return
|
|
1809
|
+
return r(this, kt);
|
|
1798
1810
|
}
|
|
1799
1811
|
set allowOauth(t) {
|
|
1800
|
-
|
|
1812
|
+
o(this, kt, t);
|
|
1801
1813
|
}
|
|
1802
1814
|
get allowAccountCreation() {
|
|
1803
|
-
return
|
|
1815
|
+
return r(this, _t);
|
|
1804
1816
|
}
|
|
1805
1817
|
set allowAccountCreation(t) {
|
|
1806
|
-
|
|
1818
|
+
o(this, _t, t);
|
|
1807
1819
|
}
|
|
1808
1820
|
get layout() {
|
|
1809
|
-
return
|
|
1821
|
+
return r(this, Ot);
|
|
1810
1822
|
}
|
|
1811
1823
|
set layout(t) {
|
|
1812
|
-
|
|
1824
|
+
o(this, Ot, t);
|
|
1813
1825
|
}
|
|
1814
1826
|
get oauthPlacement() {
|
|
1815
|
-
return
|
|
1827
|
+
return r(this, xt);
|
|
1816
1828
|
}
|
|
1817
1829
|
set oauthPlacement(t) {
|
|
1818
|
-
|
|
1830
|
+
o(this, xt, t);
|
|
1819
1831
|
}
|
|
1820
1832
|
get stepped() {
|
|
1821
|
-
return
|
|
1833
|
+
return r(this, Tt);
|
|
1822
1834
|
}
|
|
1823
1835
|
set stepped(t) {
|
|
1824
|
-
|
|
1836
|
+
o(this, Tt, t);
|
|
1825
1837
|
}
|
|
1826
1838
|
get logoText() {
|
|
1827
|
-
return
|
|
1839
|
+
return r(this, Ut);
|
|
1828
1840
|
}
|
|
1829
1841
|
set logoText(t) {
|
|
1830
|
-
|
|
1842
|
+
o(this, Ut, t);
|
|
1831
1843
|
}
|
|
1832
1844
|
get logoUrl() {
|
|
1833
|
-
return
|
|
1845
|
+
return r(this, Lt);
|
|
1834
1846
|
}
|
|
1835
1847
|
set logoUrl(t) {
|
|
1836
|
-
|
|
1848
|
+
o(this, Lt, t);
|
|
1837
1849
|
}
|
|
1838
1850
|
get brandLine() {
|
|
1839
|
-
return
|
|
1851
|
+
return r(this, At);
|
|
1840
1852
|
}
|
|
1841
1853
|
set brandLine(t) {
|
|
1842
|
-
|
|
1854
|
+
o(this, At, t);
|
|
1843
1855
|
}
|
|
1844
1856
|
get brandFoot() {
|
|
1845
|
-
return
|
|
1857
|
+
return r(this, Mt);
|
|
1846
1858
|
}
|
|
1847
1859
|
set brandFoot(t) {
|
|
1848
|
-
|
|
1860
|
+
o(this, Mt, t);
|
|
1849
1861
|
}
|
|
1850
1862
|
get signInTitle() {
|
|
1851
|
-
return
|
|
1863
|
+
return r(this, Nt);
|
|
1852
1864
|
}
|
|
1853
1865
|
set signInTitle(t) {
|
|
1854
|
-
|
|
1866
|
+
o(this, Nt, t);
|
|
1855
1867
|
}
|
|
1856
1868
|
get branding() {
|
|
1857
|
-
return
|
|
1869
|
+
return r(this, It);
|
|
1858
1870
|
}
|
|
1859
1871
|
set branding(t) {
|
|
1860
|
-
|
|
1872
|
+
o(this, It, t);
|
|
1873
|
+
}
|
|
1874
|
+
get brandingText() {
|
|
1875
|
+
return r(this, Ft);
|
|
1876
|
+
}
|
|
1877
|
+
set brandingText(t) {
|
|
1878
|
+
o(this, Ft, t);
|
|
1879
|
+
}
|
|
1880
|
+
get brandingUrl() {
|
|
1881
|
+
return r(this, Dt);
|
|
1882
|
+
}
|
|
1883
|
+
set brandingUrl(t) {
|
|
1884
|
+
o(this, Dt, t);
|
|
1861
1885
|
}
|
|
1862
1886
|
get redirectUrl() {
|
|
1863
|
-
return
|
|
1887
|
+
return r(this, Bt);
|
|
1864
1888
|
}
|
|
1865
1889
|
set redirectUrl(t) {
|
|
1866
|
-
|
|
1890
|
+
o(this, Bt, t);
|
|
1867
1891
|
}
|
|
1868
1892
|
get tosUrl() {
|
|
1869
|
-
return
|
|
1893
|
+
return r(this, Rt);
|
|
1870
1894
|
}
|
|
1871
1895
|
set tosUrl(t) {
|
|
1872
|
-
|
|
1896
|
+
o(this, Rt, t);
|
|
1873
1897
|
}
|
|
1874
1898
|
get privacyUrl() {
|
|
1875
|
-
return
|
|
1899
|
+
return r(this, jt);
|
|
1876
1900
|
}
|
|
1877
1901
|
set privacyUrl(t) {
|
|
1878
|
-
|
|
1902
|
+
o(this, jt, t);
|
|
1879
1903
|
}
|
|
1880
1904
|
get nonceStorageKey() {
|
|
1881
|
-
return
|
|
1905
|
+
return r(this, Ht);
|
|
1882
1906
|
}
|
|
1883
1907
|
set nonceStorageKey(t) {
|
|
1884
|
-
|
|
1908
|
+
o(this, Ht, t);
|
|
1885
1909
|
}
|
|
1886
1910
|
get inviteEmail() {
|
|
1887
|
-
return
|
|
1911
|
+
return r(this, qt);
|
|
1888
1912
|
}
|
|
1889
1913
|
set inviteEmail(t) {
|
|
1890
|
-
|
|
1914
|
+
o(this, qt, t);
|
|
1891
1915
|
}
|
|
1892
1916
|
get inviteOrg() {
|
|
1893
|
-
return
|
|
1917
|
+
return r(this, Vt);
|
|
1894
1918
|
}
|
|
1895
1919
|
set inviteOrg(t) {
|
|
1896
|
-
|
|
1920
|
+
o(this, Vt, t);
|
|
1897
1921
|
}
|
|
1898
1922
|
get inviteCode() {
|
|
1899
|
-
return
|
|
1923
|
+
return r(this, Gt);
|
|
1900
1924
|
}
|
|
1901
1925
|
set inviteCode(t) {
|
|
1902
|
-
|
|
1926
|
+
o(this, Gt, t);
|
|
1903
1927
|
}
|
|
1904
1928
|
get step() {
|
|
1905
|
-
return
|
|
1929
|
+
return r(this, Kt);
|
|
1906
1930
|
}
|
|
1907
1931
|
set step(t) {
|
|
1908
|
-
|
|
1932
|
+
o(this, Kt, t);
|
|
1909
1933
|
}
|
|
1910
1934
|
get method() {
|
|
1911
|
-
return
|
|
1935
|
+
return r(this, Yt);
|
|
1912
1936
|
}
|
|
1913
1937
|
set method(t) {
|
|
1914
|
-
|
|
1938
|
+
o(this, Yt, t);
|
|
1915
1939
|
}
|
|
1916
1940
|
get email() {
|
|
1917
|
-
return
|
|
1941
|
+
return r(this, Wt);
|
|
1918
1942
|
}
|
|
1919
1943
|
set email(t) {
|
|
1920
|
-
|
|
1944
|
+
o(this, Wt, t);
|
|
1921
1945
|
}
|
|
1922
1946
|
get password() {
|
|
1923
|
-
return
|
|
1947
|
+
return r(this, zt);
|
|
1924
1948
|
}
|
|
1925
1949
|
set password(t) {
|
|
1926
|
-
|
|
1950
|
+
o(this, zt, t);
|
|
1927
1951
|
}
|
|
1928
1952
|
get name() {
|
|
1929
|
-
return
|
|
1953
|
+
return r(this, Jt);
|
|
1930
1954
|
}
|
|
1931
1955
|
set name(t) {
|
|
1932
|
-
|
|
1956
|
+
o(this, Jt, t);
|
|
1933
1957
|
}
|
|
1934
1958
|
get firstName() {
|
|
1935
|
-
return
|
|
1959
|
+
return r(this, Qt);
|
|
1936
1960
|
}
|
|
1937
1961
|
set firstName(t) {
|
|
1938
|
-
|
|
1962
|
+
o(this, Qt, t);
|
|
1939
1963
|
}
|
|
1940
1964
|
get lastName() {
|
|
1941
|
-
return
|
|
1965
|
+
return r(this, Xt);
|
|
1942
1966
|
}
|
|
1943
1967
|
set lastName(t) {
|
|
1944
|
-
|
|
1968
|
+
o(this, Xt, t);
|
|
1945
1969
|
}
|
|
1946
1970
|
get phone() {
|
|
1947
|
-
return
|
|
1971
|
+
return r(this, Zt);
|
|
1948
1972
|
}
|
|
1949
1973
|
set phone(t) {
|
|
1950
|
-
|
|
1974
|
+
o(this, Zt, t);
|
|
1951
1975
|
}
|
|
1952
1976
|
get newPass() {
|
|
1953
|
-
return
|
|
1977
|
+
return r(this, te);
|
|
1954
1978
|
}
|
|
1955
1979
|
set newPass(t) {
|
|
1956
|
-
|
|
1980
|
+
o(this, te, t);
|
|
1957
1981
|
}
|
|
1958
1982
|
get confirmPass() {
|
|
1959
|
-
return
|
|
1983
|
+
return r(this, ee);
|
|
1960
1984
|
}
|
|
1961
1985
|
set confirmPass(t) {
|
|
1962
|
-
|
|
1986
|
+
o(this, ee, t);
|
|
1963
1987
|
}
|
|
1964
1988
|
get code() {
|
|
1965
|
-
return
|
|
1989
|
+
return r(this, se);
|
|
1966
1990
|
}
|
|
1967
1991
|
set code(t) {
|
|
1968
|
-
|
|
1992
|
+
o(this, se, t);
|
|
1969
1993
|
}
|
|
1970
1994
|
get verifyNext() {
|
|
1971
|
-
return
|
|
1995
|
+
return r(this, ie);
|
|
1972
1996
|
}
|
|
1973
1997
|
set verifyNext(t) {
|
|
1974
|
-
|
|
1998
|
+
o(this, ie, t);
|
|
1975
1999
|
}
|
|
1976
2000
|
get loading() {
|
|
1977
|
-
return
|
|
2001
|
+
return r(this, ae);
|
|
1978
2002
|
}
|
|
1979
2003
|
set loading(t) {
|
|
1980
|
-
|
|
2004
|
+
o(this, ae, t);
|
|
1981
2005
|
}
|
|
1982
2006
|
get banner() {
|
|
1983
|
-
return
|
|
2007
|
+
return r(this, re);
|
|
1984
2008
|
}
|
|
1985
2009
|
set banner(t) {
|
|
1986
|
-
|
|
2010
|
+
o(this, re, t);
|
|
1987
2011
|
}
|
|
1988
2012
|
get notice() {
|
|
1989
|
-
return
|
|
2013
|
+
return r(this, ne);
|
|
1990
2014
|
}
|
|
1991
2015
|
set notice(t) {
|
|
1992
|
-
|
|
2016
|
+
o(this, ne, t);
|
|
1993
2017
|
}
|
|
1994
2018
|
get emailError() {
|
|
1995
|
-
return
|
|
2019
|
+
return r(this, oe);
|
|
1996
2020
|
}
|
|
1997
2021
|
set emailError(t) {
|
|
1998
|
-
|
|
2022
|
+
o(this, oe, t);
|
|
1999
2023
|
}
|
|
2000
2024
|
get passError() {
|
|
2001
|
-
return
|
|
2025
|
+
return r(this, le);
|
|
2002
2026
|
}
|
|
2003
2027
|
set passError(t) {
|
|
2004
|
-
|
|
2028
|
+
o(this, le, t);
|
|
2005
2029
|
}
|
|
2006
2030
|
get newPassError() {
|
|
2007
|
-
return
|
|
2031
|
+
return r(this, he);
|
|
2008
2032
|
}
|
|
2009
2033
|
set newPassError(t) {
|
|
2010
|
-
|
|
2034
|
+
o(this, he, t);
|
|
2011
2035
|
}
|
|
2012
2036
|
get attempts() {
|
|
2013
|
-
return
|
|
2037
|
+
return r(this, de);
|
|
2014
2038
|
}
|
|
2015
2039
|
set attempts(t) {
|
|
2016
|
-
|
|
2040
|
+
o(this, de, t);
|
|
2017
2041
|
}
|
|
2018
2042
|
get needsMfaCode() {
|
|
2019
|
-
return
|
|
2043
|
+
return r(this, ce);
|
|
2020
2044
|
}
|
|
2021
2045
|
set needsMfaCode(t) {
|
|
2022
|
-
|
|
2046
|
+
o(this, ce, t);
|
|
2023
2047
|
}
|
|
2024
2048
|
uid(t) {
|
|
2025
2049
|
return `${this.uidBase}-${t}`;
|
|
@@ -2041,7 +2065,7 @@ let u = (Be = class extends $ {
|
|
|
2041
2065
|
var i;
|
|
2042
2066
|
if (t === this.gotoClient || ((i = this.gotoUnsubscribe) == null || i.call(this), this.gotoUnsubscribe = void 0, this.gotoClient = t, !t)) return;
|
|
2043
2067
|
const e = t.on("goto", ({ screen: h }) => {
|
|
2044
|
-
|
|
2068
|
+
Be(h) && this.goto(h);
|
|
2045
2069
|
}), s = t.on("signin", () => {
|
|
2046
2070
|
this.followRedirect();
|
|
2047
2071
|
});
|
|
@@ -2084,7 +2108,7 @@ let u = (Be = class extends $ {
|
|
|
2084
2108
|
/** The screen the host asked for, before any guarding is applied. */
|
|
2085
2109
|
get requestedScreen() {
|
|
2086
2110
|
const t = this.screen || this.initialScreen || "signin";
|
|
2087
|
-
return
|
|
2111
|
+
return Be(t) ? t : "signin";
|
|
2088
2112
|
}
|
|
2089
2113
|
/**
|
|
2090
2114
|
* Resolves the screen actually rendered.
|
|
@@ -2097,7 +2121,7 @@ let u = (Be = class extends $ {
|
|
|
2097
2121
|
get activeScreen() {
|
|
2098
2122
|
if (this.isOAuthCallback) return "oauth-callback";
|
|
2099
2123
|
const t = this.auth.state.status === "authenticated", e = this.requestedScreen;
|
|
2100
|
-
if (
|
|
2124
|
+
if (Ds(e))
|
|
2101
2125
|
return t ? e : "signin";
|
|
2102
2126
|
if (t)
|
|
2103
2127
|
return this.screen !== "" || this.initialScreen !== "signin" ? e : "account";
|
|
@@ -2107,7 +2131,7 @@ let u = (Be = class extends $ {
|
|
|
2107
2131
|
}
|
|
2108
2132
|
/** True when a signed-in user is sitting on a guest screen (spec: offer continue/sign out). */
|
|
2109
2133
|
get showsSignedInInterstitial() {
|
|
2110
|
-
return this.auth.state.status === "authenticated" &&
|
|
2134
|
+
return this.auth.state.status === "authenticated" && De(this.activeScreen);
|
|
2111
2135
|
}
|
|
2112
2136
|
// ── redirect ──────────────────────────────────────────────
|
|
2113
2137
|
/**
|
|
@@ -2120,7 +2144,7 @@ let u = (Be = class extends $ {
|
|
|
2120
2144
|
*/
|
|
2121
2145
|
get redirectTarget() {
|
|
2122
2146
|
var t;
|
|
2123
|
-
return
|
|
2147
|
+
return ds(
|
|
2124
2148
|
this.redirectUrl || this.redirectParam,
|
|
2125
2149
|
(t = globalThis.location) == null ? void 0 : t.href,
|
|
2126
2150
|
(e) => console.warn(`[singlebase] ${e}`)
|
|
@@ -2143,10 +2167,10 @@ let u = (Be = class extends $ {
|
|
|
2143
2167
|
return t.has("access_code") || t.has("error");
|
|
2144
2168
|
}
|
|
2145
2169
|
get callbackDone() {
|
|
2146
|
-
return
|
|
2170
|
+
return r(this, ue);
|
|
2147
2171
|
}
|
|
2148
2172
|
set callbackDone(t) {
|
|
2149
|
-
|
|
2173
|
+
o(this, ue, t);
|
|
2150
2174
|
}
|
|
2151
2175
|
/** Strips the provider's parameters so a reload cannot replay the exchange. */
|
|
2152
2176
|
cleanCallbackUrl() {
|
|
@@ -2189,11 +2213,12 @@ let u = (Be = class extends $ {
|
|
|
2189
2213
|
return this.logoUrl ? a`<img class="brand-img" part="logo" src=${this.logoUrl} alt=${this.logoText} />` : this.logoText ? a`<div class="brand-mark" part="logo">${this.logoText}</div>` : d;
|
|
2190
2214
|
}
|
|
2191
2215
|
renderBranding() {
|
|
2192
|
-
return
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2216
|
+
return ps(
|
|
2217
|
+
this.branding,
|
|
2218
|
+
this.brandingText,
|
|
2219
|
+
this.msg.brandingLabel,
|
|
2220
|
+
this.brandingUrl
|
|
2221
|
+
);
|
|
2197
2222
|
}
|
|
2198
2223
|
/** Every screen renders inside this, so the credit appears once and only once. */
|
|
2199
2224
|
panel(t) {
|
|
@@ -2238,7 +2263,7 @@ let u = (Be = class extends $ {
|
|
|
2238
2263
|
}
|
|
2239
2264
|
}
|
|
2240
2265
|
describeError(t) {
|
|
2241
|
-
if (t instanceof
|
|
2266
|
+
if (t instanceof Ce) {
|
|
2242
2267
|
if (t.code === "AUTH_RATE_LIMITED") return this.msg.rateLimitedMessage;
|
|
2243
2268
|
if (t.code === "INVALID_TOKEN") return "That code is not valid. Check it and try again.";
|
|
2244
2269
|
}
|
|
@@ -2357,7 +2382,7 @@ let u = (Be = class extends $ {
|
|
|
2357
2382
|
last_name: h.join(" ") || "—"
|
|
2358
2383
|
},
|
|
2359
2384
|
this.signal()
|
|
2360
|
-
), w =
|
|
2385
|
+
), w = ls({
|
|
2361
2386
|
next_action: c.next_action,
|
|
2362
2387
|
next_operation: c.next_operation
|
|
2363
2388
|
});
|
|
@@ -2385,11 +2410,11 @@ let u = (Be = class extends $ {
|
|
|
2385
2410
|
this.signal()
|
|
2386
2411
|
), this.step = 0;
|
|
2387
2412
|
} catch (i) {
|
|
2388
|
-
if (i instanceof
|
|
2413
|
+
if (i instanceof Ce && i.code === "CODE_REQUIRED") {
|
|
2389
2414
|
this.needsMfaCode = !0, await e.requestCode({ email: this.email, purpose: "signin" }, this.signal()), this.notice = this.msg.codeSentNeutral;
|
|
2390
2415
|
return;
|
|
2391
2416
|
}
|
|
2392
|
-
if (i instanceof
|
|
2417
|
+
if (i instanceof Ce && i.code === "INVALID_CREDENTIALS") {
|
|
2393
2418
|
this.attempts += 1, this.banner = this.attempts >= 3 ? this.msg.rateLimitedMessage : "That email and password do not match.";
|
|
2394
2419
|
return;
|
|
2395
2420
|
}
|
|
@@ -2630,35 +2655,35 @@ let u = (Be = class extends $ {
|
|
|
2630
2655
|
renderAccordion(t) {
|
|
2631
2656
|
const e = this.cfg, s = t === "signin" && e.allowEmailSignin || t === "signup" && e.allowEmailSignup || t === "otp" && e.allowEmailOtp, i = e.allowOauth;
|
|
2632
2657
|
if (!s && !i) return d;
|
|
2633
|
-
const h = s && i, c = s ? i && this.method || "email" : "oauth", w = c === "email", y = c === "oauth",
|
|
2634
|
-
<div class="acc-item ${
|
|
2658
|
+
const h = s && i, c = s ? i && this.method || "email" : "oauth", w = c === "email", y = c === "oauth", Se = t === "signup" ? this.msg.emailMethodTitleSignUp : this.msg.emailMethodTitle, Xe = t === "otp" ? this.msg.emailMethodMetaOtp : t === "signup" ? this.msg.emailMethodMetaSignUp : this.msg.emailMethodMeta, Oe = (Ue, Ze, ts, es, ss, Le) => a`
|
|
2659
|
+
<div class="acc-item ${Ue ? "open" : ""} ${h ? "" : "bare"}" part="acc-item">
|
|
2635
2660
|
${h ? a`
|
|
2636
2661
|
<button
|
|
2637
2662
|
type="button"
|
|
2638
2663
|
class="acc-head"
|
|
2639
|
-
aria-expanded=${
|
|
2640
|
-
aria-controls=${this.uid(`acc-${
|
|
2641
|
-
@click=${
|
|
2664
|
+
aria-expanded=${Ue ? "true" : "false"}
|
|
2665
|
+
aria-controls=${this.uid(`acc-${Le}`)}
|
|
2666
|
+
@click=${ss}
|
|
2642
2667
|
>
|
|
2643
2668
|
<span class="chev" aria-hidden="true">›</span>
|
|
2644
|
-
<span class="acc-title">${
|
|
2645
|
-
<span class="acc-meta">${
|
|
2669
|
+
<span class="acc-title">${Ze}</span>
|
|
2670
|
+
<span class="acc-meta">${ts}</span>
|
|
2646
2671
|
</button>
|
|
2647
2672
|
` : d}
|
|
2648
|
-
<div class="acc-body" id=${this.uid(`acc-${
|
|
2673
|
+
<div class="acc-body" id=${this.uid(`acc-${Le}`)}>
|
|
2649
2674
|
<div class="acc-clip">
|
|
2650
|
-
<div class="acc-inner">${
|
|
2675
|
+
<div class="acc-inner">${es}</div>
|
|
2651
2676
|
</div>
|
|
2652
2677
|
</div>
|
|
2653
2678
|
</div>
|
|
2654
|
-
`,
|
|
2679
|
+
`, xe = s ? Oe(
|
|
2655
2680
|
w,
|
|
2656
|
-
|
|
2657
|
-
|
|
2681
|
+
Se,
|
|
2682
|
+
Xe,
|
|
2658
2683
|
this.renderEmailMethodBody(t),
|
|
2659
2684
|
() => this.method = w ? "" : "email",
|
|
2660
2685
|
"email"
|
|
2661
|
-
) : d,
|
|
2686
|
+
) : d, Te = i ? Oe(
|
|
2662
2687
|
y,
|
|
2663
2688
|
this.msg.oauthMethodTitle,
|
|
2664
2689
|
this.msg.oauthMethodMeta,
|
|
@@ -2678,7 +2703,7 @@ let u = (Be = class extends $ {
|
|
|
2678
2703
|
) : d;
|
|
2679
2704
|
return a`
|
|
2680
2705
|
<div class="acc-wrap">
|
|
2681
|
-
${this.oauthPlacement === "top" ? a`${
|
|
2706
|
+
${this.oauthPlacement === "top" ? a`${Te}${xe}` : a`${xe}${Te}`}
|
|
2682
2707
|
</div>
|
|
2683
2708
|
`;
|
|
2684
2709
|
}
|
|
@@ -2921,7 +2946,7 @@ let u = (Be = class extends $ {
|
|
|
2921
2946
|
`);
|
|
2922
2947
|
if (this.showsSignedInInterstitial)
|
|
2923
2948
|
return this.noAccountView ? d : this.panel(this.renderSignedIn());
|
|
2924
|
-
const e = this.cfg, s = !e.allowEmailSignin && !e.allowEmailOtp && !e.allowOauth, i = !e.authEnabled || s &&
|
|
2949
|
+
const e = this.cfg, s = !e.allowEmailSignin && !e.allowEmailOtp && !e.allowOauth, i = !e.authEnabled || s && De(t);
|
|
2925
2950
|
return a`
|
|
2926
2951
|
${this.layout === "split" ? a`
|
|
2927
2952
|
<div class="brand-panel">
|
|
@@ -2933,10 +2958,11 @@ let u = (Be = class extends $ {
|
|
|
2933
2958
|
${this.panel(i ? this.renderBlocked() : this.renderGuest(t))}
|
|
2934
2959
|
`;
|
|
2935
2960
|
}
|
|
2936
|
-
},
|
|
2937
|
-
|
|
2961
|
+
}, vt = new WeakMap(), wt = new WeakMap(), $t = new WeakMap(), yt = new WeakMap(), Et = new WeakMap(), St = new WeakMap(), Ct = new WeakMap(), Pt = new WeakMap(), kt = new WeakMap(), _t = new WeakMap(), Ot = new WeakMap(), xt = new WeakMap(), Tt = new WeakMap(), Ut = new WeakMap(), Lt = new WeakMap(), At = new WeakMap(), Mt = new WeakMap(), Nt = new WeakMap(), It = new WeakMap(), Ft = new WeakMap(), Dt = new WeakMap(), Bt = new WeakMap(), Rt = new WeakMap(), jt = new WeakMap(), Ht = new WeakMap(), qt = new WeakMap(), Vt = new WeakMap(), Gt = new WeakMap(), Kt = new WeakMap(), Yt = new WeakMap(), Wt = new WeakMap(), zt = new WeakMap(), Jt = new WeakMap(), Qt = new WeakMap(), Xt = new WeakMap(), Zt = new WeakMap(), te = new WeakMap(), ee = new WeakMap(), se = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), re = new WeakMap(), ne = new WeakMap(), oe = new WeakMap(), le = new WeakMap(), he = new WeakMap(), de = new WeakMap(), ce = new WeakMap(), ue = new WeakMap(), He);
|
|
2962
|
+
Is(u, "styles", [
|
|
2938
2963
|
...$.styles,
|
|
2939
|
-
|
|
2964
|
+
us,
|
|
2965
|
+
Ge`
|
|
2940
2966
|
/* the mock's root */
|
|
2941
2967
|
:host {
|
|
2942
2968
|
display: flex;
|
|
@@ -2945,7 +2971,7 @@ Us(u, "styles", [
|
|
|
2945
2971
|
background: var(--sb-surface, #ffffff);
|
|
2946
2972
|
color: var(--sb-ink, #16181a);
|
|
2947
2973
|
border: 1px solid var(--sb-border, #e4e6e9);
|
|
2948
|
-
border-radius: calc(var(--sb-radius, 4px) + 4px);
|
|
2974
|
+
border-radius: calc((var(--sb-radius, 4px) + 4px) * var(--sb-radius-scale, 1));
|
|
2949
2975
|
overflow: hidden;
|
|
2950
2976
|
}
|
|
2951
2977
|
|
|
@@ -3003,22 +3029,6 @@ Us(u, "styles", [
|
|
|
3003
3029
|
|
|
3004
3030
|
.branding {
|
|
3005
3031
|
margin-top: 18px;
|
|
3006
|
-
text-align: center;
|
|
3007
|
-
font-family: var(--sb-mono, "Geist Mono", ui-monospace, monospace);
|
|
3008
|
-
font-size: 10.5px;
|
|
3009
|
-
letter-spacing: 0.06em;
|
|
3010
|
-
color: var(--sb-muted-ink, #61666c);
|
|
3011
|
-
}
|
|
3012
|
-
|
|
3013
|
-
.branding a {
|
|
3014
|
-
color: inherit;
|
|
3015
|
-
text-decoration: none;
|
|
3016
|
-
}
|
|
3017
|
-
|
|
3018
|
-
.branding a:hover {
|
|
3019
|
-
color: var(--sb-ink, #16181a);
|
|
3020
|
-
text-decoration: underline;
|
|
3021
|
-
text-underline-offset: 3px;
|
|
3022
3032
|
}
|
|
3023
3033
|
|
|
3024
3034
|
/* the mock's panel */
|
|
@@ -3097,6 +3107,12 @@ g([
|
|
|
3097
3107
|
g([
|
|
3098
3108
|
p({ converter: P, attribute: "branding" })
|
|
3099
3109
|
], u.prototype, "branding", 1);
|
|
3110
|
+
g([
|
|
3111
|
+
p({ attribute: "branding-text" })
|
|
3112
|
+
], u.prototype, "brandingText", 1);
|
|
3113
|
+
g([
|
|
3114
|
+
p({ attribute: "branding-url" })
|
|
3115
|
+
], u.prototype, "brandingUrl", 1);
|
|
3100
3116
|
g([
|
|
3101
3117
|
p({ attribute: "redirect-url" })
|
|
3102
3118
|
], u.prototype, "redirectUrl", 1);
|
|
@@ -3182,40 +3198,40 @@ g([
|
|
|
3182
3198
|
m()
|
|
3183
3199
|
], u.prototype, "callbackDone", 1);
|
|
3184
3200
|
u = g([
|
|
3185
|
-
|
|
3201
|
+
ye("singlebase-authui")
|
|
3186
3202
|
], u);
|
|
3187
|
-
var
|
|
3188
|
-
for (var i = s > 1 ? void 0 : s ?
|
|
3189
|
-
(c =
|
|
3190
|
-
return s && i &&
|
|
3203
|
+
var Bs = Object.defineProperty, Rs = Object.getOwnPropertyDescriptor, Pe = (l, t, e, s) => {
|
|
3204
|
+
for (var i = s > 1 ? void 0 : s ? Rs(t, e) : t, h = l.length - 1, c; h >= 0; h--)
|
|
3205
|
+
(c = l[h]) && (i = (s ? c(t, e, i) : c(i)) || i);
|
|
3206
|
+
return s && i && Bs(t, e, i), i;
|
|
3191
3207
|
};
|
|
3192
|
-
const
|
|
3193
|
-
var
|
|
3194
|
-
let
|
|
3208
|
+
const js = ["loading", "authenticated", "unauthenticated"];
|
|
3209
|
+
var pe, ge, me, qe;
|
|
3210
|
+
let x = (qe = class extends $ {
|
|
3195
3211
|
constructor() {
|
|
3196
3212
|
super(...arguments);
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3213
|
+
n(this, pe, "");
|
|
3214
|
+
n(this, ge, null);
|
|
3215
|
+
n(this, me, "unauthenticated");
|
|
3200
3216
|
b(this, "warnedFor", null);
|
|
3201
3217
|
}
|
|
3202
3218
|
get slot() {
|
|
3203
|
-
return
|
|
3219
|
+
return r(this, pe);
|
|
3204
3220
|
}
|
|
3205
3221
|
set slot(t) {
|
|
3206
|
-
|
|
3222
|
+
o(this, pe, t);
|
|
3207
3223
|
}
|
|
3208
3224
|
get predicate() {
|
|
3209
|
-
return
|
|
3225
|
+
return r(this, ge);
|
|
3210
3226
|
}
|
|
3211
3227
|
set predicate(t) {
|
|
3212
|
-
|
|
3228
|
+
o(this, ge, t);
|
|
3213
3229
|
}
|
|
3214
3230
|
get onMismatch() {
|
|
3215
|
-
return
|
|
3231
|
+
return r(this, me);
|
|
3216
3232
|
}
|
|
3217
3233
|
set onMismatch(t) {
|
|
3218
|
-
|
|
3234
|
+
o(this, me, t);
|
|
3219
3235
|
}
|
|
3220
3236
|
createRenderRoot() {
|
|
3221
3237
|
return this;
|
|
@@ -3228,21 +3244,21 @@ let O = (Re = class extends $ {
|
|
|
3228
3244
|
if (!this.predicate) return "authenticated";
|
|
3229
3245
|
this.warnOnce(this.predicate);
|
|
3230
3246
|
const e = this.auth.state.user;
|
|
3231
|
-
return
|
|
3247
|
+
return fs(e, this.predicate) ? "authenticated" : this.onMismatch === "hidden" ? "hidden" : "unauthenticated";
|
|
3232
3248
|
}
|
|
3233
3249
|
/** Surfaces a malformed predicate once, rather than silently never matching. */
|
|
3234
3250
|
warnOnce(t) {
|
|
3235
3251
|
const e = JSON.stringify(t);
|
|
3236
3252
|
if (this.warnedFor !== e) {
|
|
3237
3253
|
this.warnedFor = e;
|
|
3238
|
-
for (const s of
|
|
3254
|
+
for (const s of vs(t))
|
|
3239
3255
|
console.warn(`[singlebase] <singlebase-authui-guard> predicate: ${s}`);
|
|
3240
3256
|
}
|
|
3241
3257
|
}
|
|
3242
3258
|
render() {
|
|
3243
3259
|
const t = this.activeState;
|
|
3244
3260
|
if (this.slot) {
|
|
3245
|
-
const e =
|
|
3261
|
+
const e = js.includes(this.slot) && this.slot === t;
|
|
3246
3262
|
return this.toggleAttribute("hidden", !e), a`<slot></slot>`;
|
|
3247
3263
|
}
|
|
3248
3264
|
this.toggleAttribute("hidden", !1);
|
|
@@ -3252,76 +3268,76 @@ let O = (Re = class extends $ {
|
|
|
3252
3268
|
}
|
|
3253
3269
|
return a`<slot></slot>`;
|
|
3254
3270
|
}
|
|
3255
|
-
},
|
|
3256
|
-
|
|
3271
|
+
}, pe = new WeakMap(), ge = new WeakMap(), me = new WeakMap(), qe);
|
|
3272
|
+
Pe([
|
|
3257
3273
|
p({ reflect: !0 })
|
|
3258
|
-
],
|
|
3259
|
-
|
|
3274
|
+
], x.prototype, "slot", 1);
|
|
3275
|
+
Pe([
|
|
3260
3276
|
p({
|
|
3261
3277
|
converter: {
|
|
3262
|
-
fromAttribute: (
|
|
3263
|
-
if (!
|
|
3278
|
+
fromAttribute: (l) => {
|
|
3279
|
+
if (!l) return null;
|
|
3264
3280
|
try {
|
|
3265
|
-
return JSON.parse(
|
|
3281
|
+
return JSON.parse(l);
|
|
3266
3282
|
} catch {
|
|
3267
|
-
return console.error("[singlebase] guard predicate is not valid JSON:",
|
|
3283
|
+
return console.error("[singlebase] guard predicate is not valid JSON:", l), null;
|
|
3268
3284
|
}
|
|
3269
3285
|
},
|
|
3270
|
-
toAttribute: (
|
|
3286
|
+
toAttribute: (l) => l ? JSON.stringify(l) : null
|
|
3271
3287
|
}
|
|
3272
3288
|
})
|
|
3273
|
-
],
|
|
3274
|
-
|
|
3289
|
+
], x.prototype, "predicate", 1);
|
|
3290
|
+
Pe([
|
|
3275
3291
|
p({ attribute: "on-mismatch" })
|
|
3276
|
-
],
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
],
|
|
3280
|
-
var
|
|
3281
|
-
for (var i = s > 1 ? void 0 : s ?
|
|
3282
|
-
(c =
|
|
3283
|
-
return s && i &&
|
|
3284
|
-
},
|
|
3285
|
-
const
|
|
3286
|
-
var
|
|
3287
|
-
let S = (
|
|
3292
|
+
], x.prototype, "onMismatch", 1);
|
|
3293
|
+
x = Pe([
|
|
3294
|
+
ye("singlebase-authui-guard")
|
|
3295
|
+
], x);
|
|
3296
|
+
var Qe = Object.defineProperty, Hs = Object.getOwnPropertyDescriptor, qs = (l, t, e) => t in l ? Qe(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e, O = (l, t, e, s) => {
|
|
3297
|
+
for (var i = s > 1 ? void 0 : s ? Hs(t, e) : t, h = l.length - 1, c; h >= 0; h--)
|
|
3298
|
+
(c = l[h]) && (i = (s ? c(t, e, i) : c(i)) || i);
|
|
3299
|
+
return s && i && Qe(t, e, i), i;
|
|
3300
|
+
}, Vs = (l, t, e) => qs(l, t + "", e);
|
|
3301
|
+
const Gs = "profile_photo";
|
|
3302
|
+
var be, fe, ve, we, $e, Ve;
|
|
3303
|
+
let S = (Ve = class extends $ {
|
|
3288
3304
|
constructor() {
|
|
3289
3305
|
super(...arguments);
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3306
|
+
n(this, be, "");
|
|
3307
|
+
n(this, fe, "");
|
|
3308
|
+
n(this, ve, !1);
|
|
3309
|
+
n(this, we, "");
|
|
3310
|
+
n(this, $e, !1);
|
|
3295
3311
|
}
|
|
3296
3312
|
get path() {
|
|
3297
|
-
return
|
|
3313
|
+
return r(this, be);
|
|
3298
3314
|
}
|
|
3299
3315
|
set path(t) {
|
|
3300
|
-
|
|
3316
|
+
o(this, be, t);
|
|
3301
3317
|
}
|
|
3302
3318
|
get fallback() {
|
|
3303
|
-
return
|
|
3319
|
+
return r(this, fe);
|
|
3304
3320
|
}
|
|
3305
3321
|
set fallback(t) {
|
|
3306
|
-
|
|
3322
|
+
o(this, fe, t);
|
|
3307
3323
|
}
|
|
3308
3324
|
get avatar() {
|
|
3309
|
-
return
|
|
3325
|
+
return r(this, ve);
|
|
3310
3326
|
}
|
|
3311
3327
|
set avatar(t) {
|
|
3312
|
-
|
|
3328
|
+
o(this, ve, t);
|
|
3313
3329
|
}
|
|
3314
3330
|
get alt() {
|
|
3315
|
-
return
|
|
3331
|
+
return r(this, we);
|
|
3316
3332
|
}
|
|
3317
3333
|
set alt(t) {
|
|
3318
|
-
|
|
3334
|
+
o(this, we, t);
|
|
3319
3335
|
}
|
|
3320
3336
|
get imageFailed() {
|
|
3321
|
-
return
|
|
3337
|
+
return r(this, $e);
|
|
3322
3338
|
}
|
|
3323
3339
|
set imageFailed(t) {
|
|
3324
|
-
|
|
3340
|
+
o(this, $e, t);
|
|
3325
3341
|
}
|
|
3326
3342
|
willUpdate(t) {
|
|
3327
3343
|
super.willUpdate(t), (t.has("path") || t.has("avatar")) && (this.imageFailed = !1);
|
|
@@ -3334,13 +3350,13 @@ let S = (He = class extends $ {
|
|
|
3334
3350
|
get textValue() {
|
|
3335
3351
|
const t = this.profile;
|
|
3336
3352
|
if (!t || !this.path) return "";
|
|
3337
|
-
const e =
|
|
3353
|
+
const e = Ne(t, this.path);
|
|
3338
3354
|
return e == null || e === "" ? "" : Array.isArray(e) ? e.filter((s) => s != null).join(", ") : typeof e == "object" ? "" : String(e);
|
|
3339
3355
|
}
|
|
3340
3356
|
get avatarSrc() {
|
|
3341
3357
|
const t = this.profile;
|
|
3342
3358
|
if (!t) return "";
|
|
3343
|
-
const e =
|
|
3359
|
+
const e = Ne(t, this.path || Gs);
|
|
3344
3360
|
return typeof e == "string" ? e : "";
|
|
3345
3361
|
}
|
|
3346
3362
|
render() {
|
|
@@ -3362,13 +3378,13 @@ let S = (He = class extends $ {
|
|
|
3362
3378
|
part="avatar-initials"
|
|
3363
3379
|
class="initials"
|
|
3364
3380
|
aria-hidden=${this.alt ? "false" : "true"}
|
|
3365
|
-
>${
|
|
3381
|
+
>${Ye(t)}</span
|
|
3366
3382
|
>`;
|
|
3367
3383
|
}
|
|
3368
|
-
},
|
|
3369
|
-
|
|
3384
|
+
}, be = new WeakMap(), fe = new WeakMap(), ve = new WeakMap(), we = new WeakMap(), $e = new WeakMap(), Ve);
|
|
3385
|
+
Vs(S, "styles", [
|
|
3370
3386
|
...$.styles,
|
|
3371
|
-
|
|
3387
|
+
Ge`
|
|
3372
3388
|
/* Text sits in a sentence; an avatar is a box the host sizes. */
|
|
3373
3389
|
:host {
|
|
3374
3390
|
display: inline;
|
|
@@ -3408,38 +3424,38 @@ Bs(S, "styles", [
|
|
|
3408
3424
|
}
|
|
3409
3425
|
`
|
|
3410
3426
|
]);
|
|
3411
|
-
|
|
3427
|
+
O([
|
|
3412
3428
|
p()
|
|
3413
3429
|
], S.prototype, "path", 1);
|
|
3414
|
-
|
|
3430
|
+
O([
|
|
3415
3431
|
p()
|
|
3416
3432
|
], S.prototype, "fallback", 1);
|
|
3417
|
-
|
|
3433
|
+
O([
|
|
3418
3434
|
p({ type: Boolean, reflect: !0 })
|
|
3419
3435
|
], S.prototype, "avatar", 1);
|
|
3420
|
-
|
|
3436
|
+
O([
|
|
3421
3437
|
p()
|
|
3422
3438
|
], S.prototype, "alt", 1);
|
|
3423
|
-
|
|
3439
|
+
O([
|
|
3424
3440
|
m()
|
|
3425
3441
|
], S.prototype, "imageFailed", 1);
|
|
3426
|
-
S =
|
|
3427
|
-
|
|
3442
|
+
S = O([
|
|
3443
|
+
ye("singlebase-authui-display")
|
|
3428
3444
|
], S);
|
|
3429
3445
|
export {
|
|
3430
|
-
|
|
3431
|
-
|
|
3446
|
+
ws as A,
|
|
3447
|
+
ke as S,
|
|
3432
3448
|
f as a,
|
|
3433
3449
|
E as b,
|
|
3434
3450
|
S as c,
|
|
3435
|
-
|
|
3451
|
+
x as d,
|
|
3436
3452
|
u as e,
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3453
|
+
Ie as f,
|
|
3454
|
+
Ke as g,
|
|
3455
|
+
De as h,
|
|
3456
|
+
Ye as i,
|
|
3457
|
+
Ds as j,
|
|
3458
|
+
Be as k,
|
|
3459
|
+
$s as r
|
|
3444
3460
|
};
|
|
3445
|
-
//# sourceMappingURL=authui-display-
|
|
3461
|
+
//# sourceMappingURL=authui-display-CKfGK5va.js.map
|