@blinkk/root-cms 1.0.0-beta.9 → 1.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +93 -136
- package/dist/cli.js +59 -52
- package/dist/client.d.ts +186 -0
- package/dist/client.js +334 -0
- package/dist/core.d.ts +35 -21
- package/dist/core.js +495 -67
- package/dist/functions.d.ts +13 -0
- package/dist/functions.js +261 -0
- package/dist/plugin.d.ts +20 -3
- package/dist/plugin.js +386 -34
- package/dist/project.d.ts +1 -1
- package/dist/project.js +4 -1
- package/dist/{schema-e7beb758.d.ts → schema-49de9659.d.ts} +70 -48
- package/dist/ui/signin.css +10 -3
- package/dist/ui/signin.js +1401 -764
- package/dist/ui/ui.css +525 -192
- package/dist/ui/ui.js +15674 -11422
- package/package.json +52 -31
package/dist/ui/signin.js
CHANGED
|
@@ -1,5 +1,385 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(() => {
|
|
3
|
+
// ../../node_modules/.pnpm/preact@10.11.0/node_modules/preact/dist/preact.module.js
|
|
4
|
+
var n;
|
|
5
|
+
var l;
|
|
6
|
+
var u;
|
|
7
|
+
var i;
|
|
8
|
+
var t;
|
|
9
|
+
var o;
|
|
10
|
+
var r;
|
|
11
|
+
var f = {};
|
|
12
|
+
var e = [];
|
|
13
|
+
var c = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
|
|
14
|
+
function s(n2, l2) {
|
|
15
|
+
for (var u2 in l2)
|
|
16
|
+
n2[u2] = l2[u2];
|
|
17
|
+
return n2;
|
|
18
|
+
}
|
|
19
|
+
function a(n2) {
|
|
20
|
+
var l2 = n2.parentNode;
|
|
21
|
+
l2 && l2.removeChild(n2);
|
|
22
|
+
}
|
|
23
|
+
function h(l2, u2, i2) {
|
|
24
|
+
var t2, o3, r2, f2 = {};
|
|
25
|
+
for (r2 in u2)
|
|
26
|
+
"key" == r2 ? t2 = u2[r2] : "ref" == r2 ? o3 = u2[r2] : f2[r2] = u2[r2];
|
|
27
|
+
if (arguments.length > 2 && (f2.children = arguments.length > 3 ? n.call(arguments, 2) : i2), "function" == typeof l2 && null != l2.defaultProps)
|
|
28
|
+
for (r2 in l2.defaultProps)
|
|
29
|
+
void 0 === f2[r2] && (f2[r2] = l2.defaultProps[r2]);
|
|
30
|
+
return v(l2, f2, t2, o3, null);
|
|
31
|
+
}
|
|
32
|
+
function v(n2, i2, t2, o3, r2) {
|
|
33
|
+
var f2 = { type: n2, props: i2, key: t2, ref: o3, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: null == r2 ? ++u : r2 };
|
|
34
|
+
return null == r2 && null != l.vnode && l.vnode(f2), f2;
|
|
35
|
+
}
|
|
36
|
+
function p(n2) {
|
|
37
|
+
return n2.children;
|
|
38
|
+
}
|
|
39
|
+
function d(n2, l2) {
|
|
40
|
+
this.props = n2, this.context = l2;
|
|
41
|
+
}
|
|
42
|
+
function _(n2, l2) {
|
|
43
|
+
if (null == l2)
|
|
44
|
+
return n2.__ ? _(n2.__, n2.__.__k.indexOf(n2) + 1) : null;
|
|
45
|
+
for (var u2; l2 < n2.__k.length; l2++)
|
|
46
|
+
if (null != (u2 = n2.__k[l2]) && null != u2.__e)
|
|
47
|
+
return u2.__e;
|
|
48
|
+
return "function" == typeof n2.type ? _(n2) : null;
|
|
49
|
+
}
|
|
50
|
+
function k(n2) {
|
|
51
|
+
var l2, u2;
|
|
52
|
+
if (null != (n2 = n2.__) && null != n2.__c) {
|
|
53
|
+
for (n2.__e = n2.__c.base = null, l2 = 0; l2 < n2.__k.length; l2++)
|
|
54
|
+
if (null != (u2 = n2.__k[l2]) && null != u2.__e) {
|
|
55
|
+
n2.__e = n2.__c.base = u2.__e;
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
return k(n2);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function b(n2) {
|
|
62
|
+
(!n2.__d && (n2.__d = true) && t.push(n2) && !g.__r++ || o !== l.debounceRendering) && ((o = l.debounceRendering) || setTimeout)(g);
|
|
63
|
+
}
|
|
64
|
+
function g() {
|
|
65
|
+
for (var n2; g.__r = t.length; )
|
|
66
|
+
n2 = t.sort(function(n3, l2) {
|
|
67
|
+
return n3.__v.__b - l2.__v.__b;
|
|
68
|
+
}), t = [], n2.some(function(n3) {
|
|
69
|
+
var l2, u2, i2, t2, o3, r2;
|
|
70
|
+
n3.__d && (o3 = (t2 = (l2 = n3).__v).__e, (r2 = l2.__P) && (u2 = [], (i2 = s({}, t2)).__v = t2.__v + 1, j(r2, t2, i2, l2.__n, void 0 !== r2.ownerSVGElement, null != t2.__h ? [o3] : null, u2, null == o3 ? _(t2) : o3, t2.__h), z(u2, t2), t2.__e != o3 && k(t2)));
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function w(n2, l2, u2, i2, t2, o3, r2, c2, s2, a2) {
|
|
74
|
+
var h2, y, d2, k2, b2, g2, w2, x2 = i2 && i2.__k || e, C2 = x2.length;
|
|
75
|
+
for (u2.__k = [], h2 = 0; h2 < l2.length; h2++)
|
|
76
|
+
if (null != (k2 = u2.__k[h2] = null == (k2 = l2[h2]) || "boolean" == typeof k2 ? null : "string" == typeof k2 || "number" == typeof k2 || "bigint" == typeof k2 ? v(null, k2, null, null, k2) : Array.isArray(k2) ? v(p, { children: k2 }, null, null, null) : k2.__b > 0 ? v(k2.type, k2.props, k2.key, k2.ref ? k2.ref : null, k2.__v) : k2)) {
|
|
77
|
+
if (k2.__ = u2, k2.__b = u2.__b + 1, null === (d2 = x2[h2]) || d2 && k2.key == d2.key && k2.type === d2.type)
|
|
78
|
+
x2[h2] = void 0;
|
|
79
|
+
else
|
|
80
|
+
for (y = 0; y < C2; y++) {
|
|
81
|
+
if ((d2 = x2[y]) && k2.key == d2.key && k2.type === d2.type) {
|
|
82
|
+
x2[y] = void 0;
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
d2 = null;
|
|
86
|
+
}
|
|
87
|
+
j(n2, k2, d2 = d2 || f, t2, o3, r2, c2, s2, a2), b2 = k2.__e, (y = k2.ref) && d2.ref != y && (w2 || (w2 = []), d2.ref && w2.push(d2.ref, null, k2), w2.push(y, k2.__c || b2, k2)), null != b2 ? (null == g2 && (g2 = b2), "function" == typeof k2.type && k2.__k === d2.__k ? k2.__d = s2 = m(k2, s2, n2) : s2 = A(n2, k2, d2, x2, b2, s2), "function" == typeof u2.type && (u2.__d = s2)) : s2 && d2.__e == s2 && s2.parentNode != n2 && (s2 = _(d2));
|
|
88
|
+
}
|
|
89
|
+
for (u2.__e = g2, h2 = C2; h2--; )
|
|
90
|
+
null != x2[h2] && ("function" == typeof u2.type && null != x2[h2].__e && x2[h2].__e == u2.__d && (u2.__d = _(i2, h2 + 1)), N(x2[h2], x2[h2]));
|
|
91
|
+
if (w2)
|
|
92
|
+
for (h2 = 0; h2 < w2.length; h2++)
|
|
93
|
+
M(w2[h2], w2[++h2], w2[++h2]);
|
|
94
|
+
}
|
|
95
|
+
function m(n2, l2, u2) {
|
|
96
|
+
for (var i2, t2 = n2.__k, o3 = 0; t2 && o3 < t2.length; o3++)
|
|
97
|
+
(i2 = t2[o3]) && (i2.__ = n2, l2 = "function" == typeof i2.type ? m(i2, l2, u2) : A(u2, i2, i2, t2, i2.__e, l2));
|
|
98
|
+
return l2;
|
|
99
|
+
}
|
|
100
|
+
function x(n2, l2) {
|
|
101
|
+
return l2 = l2 || [], null == n2 || "boolean" == typeof n2 || (Array.isArray(n2) ? n2.some(function(n3) {
|
|
102
|
+
x(n3, l2);
|
|
103
|
+
}) : l2.push(n2)), l2;
|
|
104
|
+
}
|
|
105
|
+
function A(n2, l2, u2, i2, t2, o3) {
|
|
106
|
+
var r2, f2, e2;
|
|
107
|
+
if (void 0 !== l2.__d)
|
|
108
|
+
r2 = l2.__d, l2.__d = void 0;
|
|
109
|
+
else if (null == u2 || t2 != o3 || null == t2.parentNode)
|
|
110
|
+
n:
|
|
111
|
+
if (null == o3 || o3.parentNode !== n2)
|
|
112
|
+
n2.appendChild(t2), r2 = null;
|
|
113
|
+
else {
|
|
114
|
+
for (f2 = o3, e2 = 0; (f2 = f2.nextSibling) && e2 < i2.length; e2 += 2)
|
|
115
|
+
if (f2 == t2)
|
|
116
|
+
break n;
|
|
117
|
+
n2.insertBefore(t2, o3), r2 = o3;
|
|
118
|
+
}
|
|
119
|
+
return void 0 !== r2 ? r2 : t2.nextSibling;
|
|
120
|
+
}
|
|
121
|
+
function C(n2, l2, u2, i2, t2) {
|
|
122
|
+
var o3;
|
|
123
|
+
for (o3 in u2)
|
|
124
|
+
"children" === o3 || "key" === o3 || o3 in l2 || H(n2, o3, null, u2[o3], i2);
|
|
125
|
+
for (o3 in l2)
|
|
126
|
+
t2 && "function" != typeof l2[o3] || "children" === o3 || "key" === o3 || "value" === o3 || "checked" === o3 || u2[o3] === l2[o3] || H(n2, o3, l2[o3], u2[o3], i2);
|
|
127
|
+
}
|
|
128
|
+
function $(n2, l2, u2) {
|
|
129
|
+
"-" === l2[0] ? n2.setProperty(l2, u2) : n2[l2] = null == u2 ? "" : "number" != typeof u2 || c.test(l2) ? u2 : u2 + "px";
|
|
130
|
+
}
|
|
131
|
+
function H(n2, l2, u2, i2, t2) {
|
|
132
|
+
var o3;
|
|
133
|
+
n:
|
|
134
|
+
if ("style" === l2)
|
|
135
|
+
if ("string" == typeof u2)
|
|
136
|
+
n2.style.cssText = u2;
|
|
137
|
+
else {
|
|
138
|
+
if ("string" == typeof i2 && (n2.style.cssText = i2 = ""), i2)
|
|
139
|
+
for (l2 in i2)
|
|
140
|
+
u2 && l2 in u2 || $(n2.style, l2, "");
|
|
141
|
+
if (u2)
|
|
142
|
+
for (l2 in u2)
|
|
143
|
+
i2 && u2[l2] === i2[l2] || $(n2.style, l2, u2[l2]);
|
|
144
|
+
}
|
|
145
|
+
else if ("o" === l2[0] && "n" === l2[1])
|
|
146
|
+
o3 = l2 !== (l2 = l2.replace(/Capture$/, "")), l2 = l2.toLowerCase() in n2 ? l2.toLowerCase().slice(2) : l2.slice(2), n2.l || (n2.l = {}), n2.l[l2 + o3] = u2, u2 ? i2 || n2.addEventListener(l2, o3 ? T : I, o3) : n2.removeEventListener(l2, o3 ? T : I, o3);
|
|
147
|
+
else if ("dangerouslySetInnerHTML" !== l2) {
|
|
148
|
+
if (t2)
|
|
149
|
+
l2 = l2.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
150
|
+
else if ("href" !== l2 && "list" !== l2 && "form" !== l2 && "tabIndex" !== l2 && "download" !== l2 && l2 in n2)
|
|
151
|
+
try {
|
|
152
|
+
n2[l2] = null == u2 ? "" : u2;
|
|
153
|
+
break n;
|
|
154
|
+
} catch (n3) {
|
|
155
|
+
}
|
|
156
|
+
"function" == typeof u2 || (null != u2 && (false !== u2 || "a" === l2[0] && "r" === l2[1]) ? n2.setAttribute(l2, u2) : n2.removeAttribute(l2));
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function I(n2) {
|
|
160
|
+
this.l[n2.type + false](l.event ? l.event(n2) : n2);
|
|
161
|
+
}
|
|
162
|
+
function T(n2) {
|
|
163
|
+
this.l[n2.type + true](l.event ? l.event(n2) : n2);
|
|
164
|
+
}
|
|
165
|
+
function j(n2, u2, i2, t2, o3, r2, f2, e2, c2) {
|
|
166
|
+
var a2, h2, v2, y, _3, k2, b2, g2, m2, x2, A2, C2, $2, H2 = u2.type;
|
|
167
|
+
if (void 0 !== u2.constructor)
|
|
168
|
+
return null;
|
|
169
|
+
null != i2.__h && (c2 = i2.__h, e2 = u2.__e = i2.__e, u2.__h = null, r2 = [e2]), (a2 = l.__b) && a2(u2);
|
|
170
|
+
try {
|
|
171
|
+
n:
|
|
172
|
+
if ("function" == typeof H2) {
|
|
173
|
+
if (g2 = u2.props, m2 = (a2 = H2.contextType) && t2[a2.__c], x2 = a2 ? m2 ? m2.props.value : a2.__ : t2, i2.__c ? b2 = (h2 = u2.__c = i2.__c).__ = h2.__E : ("prototype" in H2 && H2.prototype.render ? u2.__c = h2 = new H2(g2, x2) : (u2.__c = h2 = new d(g2, x2), h2.constructor = H2, h2.render = O), m2 && m2.sub(h2), h2.props = g2, h2.state || (h2.state = {}), h2.context = x2, h2.__n = t2, v2 = h2.__d = true, h2.__h = []), null == h2.__s && (h2.__s = h2.state), null != H2.getDerivedStateFromProps && (h2.__s == h2.state && (h2.__s = s({}, h2.__s)), s(h2.__s, H2.getDerivedStateFromProps(g2, h2.__s))), y = h2.props, _3 = h2.state, v2)
|
|
174
|
+
null == H2.getDerivedStateFromProps && null != h2.componentWillMount && h2.componentWillMount(), null != h2.componentDidMount && h2.__h.push(h2.componentDidMount);
|
|
175
|
+
else {
|
|
176
|
+
if (null == H2.getDerivedStateFromProps && g2 !== y && null != h2.componentWillReceiveProps && h2.componentWillReceiveProps(g2, x2), !h2.__e && null != h2.shouldComponentUpdate && false === h2.shouldComponentUpdate(g2, h2.__s, x2) || u2.__v === i2.__v) {
|
|
177
|
+
h2.props = g2, h2.state = h2.__s, u2.__v !== i2.__v && (h2.__d = false), h2.__v = u2, u2.__e = i2.__e, u2.__k = i2.__k, u2.__k.forEach(function(n3) {
|
|
178
|
+
n3 && (n3.__ = u2);
|
|
179
|
+
}), h2.__h.length && f2.push(h2);
|
|
180
|
+
break n;
|
|
181
|
+
}
|
|
182
|
+
null != h2.componentWillUpdate && h2.componentWillUpdate(g2, h2.__s, x2), null != h2.componentDidUpdate && h2.__h.push(function() {
|
|
183
|
+
h2.componentDidUpdate(y, _3, k2);
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
if (h2.context = x2, h2.props = g2, h2.__v = u2, h2.__P = n2, A2 = l.__r, C2 = 0, "prototype" in H2 && H2.prototype.render)
|
|
187
|
+
h2.state = h2.__s, h2.__d = false, A2 && A2(u2), a2 = h2.render(h2.props, h2.state, h2.context);
|
|
188
|
+
else
|
|
189
|
+
do {
|
|
190
|
+
h2.__d = false, A2 && A2(u2), a2 = h2.render(h2.props, h2.state, h2.context), h2.state = h2.__s;
|
|
191
|
+
} while (h2.__d && ++C2 < 25);
|
|
192
|
+
h2.state = h2.__s, null != h2.getChildContext && (t2 = s(s({}, t2), h2.getChildContext())), v2 || null == h2.getSnapshotBeforeUpdate || (k2 = h2.getSnapshotBeforeUpdate(y, _3)), $2 = null != a2 && a2.type === p && null == a2.key ? a2.props.children : a2, w(n2, Array.isArray($2) ? $2 : [$2], u2, i2, t2, o3, r2, f2, e2, c2), h2.base = u2.__e, u2.__h = null, h2.__h.length && f2.push(h2), b2 && (h2.__E = h2.__ = null), h2.__e = false;
|
|
193
|
+
} else
|
|
194
|
+
null == r2 && u2.__v === i2.__v ? (u2.__k = i2.__k, u2.__e = i2.__e) : u2.__e = L(i2.__e, u2, i2, t2, o3, r2, f2, c2);
|
|
195
|
+
(a2 = l.diffed) && a2(u2);
|
|
196
|
+
} catch (n3) {
|
|
197
|
+
u2.__v = null, (c2 || null != r2) && (u2.__e = e2, u2.__h = !!c2, r2[r2.indexOf(e2)] = null), l.__e(n3, u2, i2);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
function z(n2, u2) {
|
|
201
|
+
l.__c && l.__c(u2, n2), n2.some(function(u3) {
|
|
202
|
+
try {
|
|
203
|
+
n2 = u3.__h, u3.__h = [], n2.some(function(n3) {
|
|
204
|
+
n3.call(u3);
|
|
205
|
+
});
|
|
206
|
+
} catch (n3) {
|
|
207
|
+
l.__e(n3, u3.__v);
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
function L(l2, u2, i2, t2, o3, r2, e2, c2) {
|
|
212
|
+
var s2, h2, v2, y = i2.props, p2 = u2.props, d2 = u2.type, k2 = 0;
|
|
213
|
+
if ("svg" === d2 && (o3 = true), null != r2) {
|
|
214
|
+
for (; k2 < r2.length; k2++)
|
|
215
|
+
if ((s2 = r2[k2]) && "setAttribute" in s2 == !!d2 && (d2 ? s2.localName === d2 : 3 === s2.nodeType)) {
|
|
216
|
+
l2 = s2, r2[k2] = null;
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
if (null == l2) {
|
|
221
|
+
if (null === d2)
|
|
222
|
+
return document.createTextNode(p2);
|
|
223
|
+
l2 = o3 ? document.createElementNS("http://www.w3.org/2000/svg", d2) : document.createElement(d2, p2.is && p2), r2 = null, c2 = false;
|
|
224
|
+
}
|
|
225
|
+
if (null === d2)
|
|
226
|
+
y === p2 || c2 && l2.data === p2 || (l2.data = p2);
|
|
227
|
+
else {
|
|
228
|
+
if (r2 = r2 && n.call(l2.childNodes), h2 = (y = i2.props || f).dangerouslySetInnerHTML, v2 = p2.dangerouslySetInnerHTML, !c2) {
|
|
229
|
+
if (null != r2)
|
|
230
|
+
for (y = {}, k2 = 0; k2 < l2.attributes.length; k2++)
|
|
231
|
+
y[l2.attributes[k2].name] = l2.attributes[k2].value;
|
|
232
|
+
(v2 || h2) && (v2 && (h2 && v2.__html == h2.__html || v2.__html === l2.innerHTML) || (l2.innerHTML = v2 && v2.__html || ""));
|
|
233
|
+
}
|
|
234
|
+
if (C(l2, p2, y, o3, c2), v2)
|
|
235
|
+
u2.__k = [];
|
|
236
|
+
else if (k2 = u2.props.children, w(l2, Array.isArray(k2) ? k2 : [k2], u2, i2, t2, o3 && "foreignObject" !== d2, r2, e2, r2 ? r2[0] : i2.__k && _(i2, 0), c2), null != r2)
|
|
237
|
+
for (k2 = r2.length; k2--; )
|
|
238
|
+
null != r2[k2] && a(r2[k2]);
|
|
239
|
+
c2 || ("value" in p2 && void 0 !== (k2 = p2.value) && (k2 !== l2.value || "progress" === d2 && !k2 || "option" === d2 && k2 !== y.value) && H(l2, "value", k2, y.value, false), "checked" in p2 && void 0 !== (k2 = p2.checked) && k2 !== l2.checked && H(l2, "checked", k2, y.checked, false));
|
|
240
|
+
}
|
|
241
|
+
return l2;
|
|
242
|
+
}
|
|
243
|
+
function M(n2, u2, i2) {
|
|
244
|
+
try {
|
|
245
|
+
"function" == typeof n2 ? n2(u2) : n2.current = u2;
|
|
246
|
+
} catch (n3) {
|
|
247
|
+
l.__e(n3, i2);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
function N(n2, u2, i2) {
|
|
251
|
+
var t2, o3;
|
|
252
|
+
if (l.unmount && l.unmount(n2), (t2 = n2.ref) && (t2.current && t2.current !== n2.__e || M(t2, null, u2)), null != (t2 = n2.__c)) {
|
|
253
|
+
if (t2.componentWillUnmount)
|
|
254
|
+
try {
|
|
255
|
+
t2.componentWillUnmount();
|
|
256
|
+
} catch (n3) {
|
|
257
|
+
l.__e(n3, u2);
|
|
258
|
+
}
|
|
259
|
+
t2.base = t2.__P = null, n2.__c = void 0;
|
|
260
|
+
}
|
|
261
|
+
if (t2 = n2.__k)
|
|
262
|
+
for (o3 = 0; o3 < t2.length; o3++)
|
|
263
|
+
t2[o3] && N(t2[o3], u2, "function" != typeof n2.type);
|
|
264
|
+
i2 || null == n2.__e || a(n2.__e), n2.__ = n2.__e = n2.__d = void 0;
|
|
265
|
+
}
|
|
266
|
+
function O(n2, l2, u2) {
|
|
267
|
+
return this.constructor(n2, u2);
|
|
268
|
+
}
|
|
269
|
+
function P(u2, i2, t2) {
|
|
270
|
+
var o3, r2, e2;
|
|
271
|
+
l.__ && l.__(u2, i2), r2 = (o3 = "function" == typeof t2) ? null : t2 && t2.__k || i2.__k, e2 = [], j(i2, u2 = (!o3 && t2 || i2).__k = h(p, null, [u2]), r2 || f, f, void 0 !== i2.ownerSVGElement, !o3 && t2 ? [t2] : r2 ? null : i2.firstChild ? n.call(i2.childNodes) : null, e2, !o3 && t2 ? t2 : r2 ? r2.__e : i2.firstChild, o3), z(e2, u2);
|
|
272
|
+
}
|
|
273
|
+
n = e.slice, l = { __e: function(n2, l2, u2, i2) {
|
|
274
|
+
for (var t2, o3, r2; l2 = l2.__; )
|
|
275
|
+
if ((t2 = l2.__c) && !t2.__)
|
|
276
|
+
try {
|
|
277
|
+
if ((o3 = t2.constructor) && null != o3.getDerivedStateFromError && (t2.setState(o3.getDerivedStateFromError(n2)), r2 = t2.__d), null != t2.componentDidCatch && (t2.componentDidCatch(n2, i2 || {}), r2 = t2.__d), r2)
|
|
278
|
+
return t2.__E = t2;
|
|
279
|
+
} catch (l3) {
|
|
280
|
+
n2 = l3;
|
|
281
|
+
}
|
|
282
|
+
throw n2;
|
|
283
|
+
} }, u = 0, i = function(n2) {
|
|
284
|
+
return null != n2 && void 0 === n2.constructor;
|
|
285
|
+
}, d.prototype.setState = function(n2, l2) {
|
|
286
|
+
var u2;
|
|
287
|
+
u2 = null != this.__s && this.__s !== this.state ? this.__s : this.__s = s({}, this.state), "function" == typeof n2 && (n2 = n2(s({}, u2), this.props)), n2 && s(u2, n2), null != n2 && this.__v && (l2 && this.__h.push(l2), b(this));
|
|
288
|
+
}, d.prototype.forceUpdate = function(n2) {
|
|
289
|
+
this.__v && (this.__e = true, n2 && this.__h.push(n2), b(this));
|
|
290
|
+
}, d.prototype.render = p, t = [], g.__r = 0, r = 0;
|
|
291
|
+
|
|
292
|
+
// ../../node_modules/.pnpm/@tabler+icons-preact@2.39.0_preact@10.11.0/node_modules/@tabler/icons-preact/dist/esm/defaultAttributes.js
|
|
293
|
+
var defaultAttributes = {
|
|
294
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
295
|
+
width: 24,
|
|
296
|
+
height: 24,
|
|
297
|
+
viewBox: "0 0 24 24",
|
|
298
|
+
fill: "none",
|
|
299
|
+
stroke: "currentColor",
|
|
300
|
+
"stroke-width": 2,
|
|
301
|
+
"stroke-linecap": "round",
|
|
302
|
+
"stroke-linejoin": "round"
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
// ../../node_modules/.pnpm/@tabler+icons-preact@2.39.0_preact@10.11.0/node_modules/@tabler/icons-preact/dist/esm/createPreactComponent.js
|
|
306
|
+
var __defProp = Object.defineProperty;
|
|
307
|
+
var __defProps = Object.defineProperties;
|
|
308
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
309
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
310
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
311
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
312
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
313
|
+
var __spreadValues = (a2, b2) => {
|
|
314
|
+
for (var prop in b2 || (b2 = {}))
|
|
315
|
+
if (__hasOwnProp.call(b2, prop))
|
|
316
|
+
__defNormalProp(a2, prop, b2[prop]);
|
|
317
|
+
if (__getOwnPropSymbols)
|
|
318
|
+
for (var prop of __getOwnPropSymbols(b2)) {
|
|
319
|
+
if (__propIsEnum.call(b2, prop))
|
|
320
|
+
__defNormalProp(a2, prop, b2[prop]);
|
|
321
|
+
}
|
|
322
|
+
return a2;
|
|
323
|
+
};
|
|
324
|
+
var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
|
|
325
|
+
var __objRest = (source, exclude) => {
|
|
326
|
+
var target = {};
|
|
327
|
+
for (var prop in source)
|
|
328
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
329
|
+
target[prop] = source[prop];
|
|
330
|
+
if (source != null && __getOwnPropSymbols)
|
|
331
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
332
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
333
|
+
target[prop] = source[prop];
|
|
334
|
+
}
|
|
335
|
+
return target;
|
|
336
|
+
};
|
|
337
|
+
var createPreactComponent = (iconName, iconNamePascal, iconNode) => {
|
|
338
|
+
const Component2 = (_a) => {
|
|
339
|
+
var _b = _a, { color = "currentColor", size = 24, stroke = 2, children } = _b, rest = __objRest(_b, ["color", "size", "stroke", "children"]);
|
|
340
|
+
return h(
|
|
341
|
+
"svg",
|
|
342
|
+
__spreadValues(__spreadProps(__spreadValues({}, defaultAttributes), {
|
|
343
|
+
width: size,
|
|
344
|
+
height: size,
|
|
345
|
+
stroke: color,
|
|
346
|
+
"stroke-width": stroke,
|
|
347
|
+
class: `tabler-icon tabler-icon-${iconName}`
|
|
348
|
+
}), rest),
|
|
349
|
+
[...iconNode.map(([tag, attrs]) => h(tag, attrs)), ...x(children)]
|
|
350
|
+
);
|
|
351
|
+
};
|
|
352
|
+
Component2.displayName = `${iconNamePascal}`;
|
|
353
|
+
return Component2;
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
// ../../node_modules/.pnpm/@tabler+icons-preact@2.39.0_preact@10.11.0/node_modules/@tabler/icons-preact/dist/esm/icons/IconSitemap.js
|
|
357
|
+
var IconSitemap = createPreactComponent("sitemap", "IconSitemap", [
|
|
358
|
+
[
|
|
359
|
+
"path",
|
|
360
|
+
{
|
|
361
|
+
d: "M3 15m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",
|
|
362
|
+
key: "svg-0"
|
|
363
|
+
}
|
|
364
|
+
],
|
|
365
|
+
[
|
|
366
|
+
"path",
|
|
367
|
+
{
|
|
368
|
+
d: "M15 15m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",
|
|
369
|
+
key: "svg-1"
|
|
370
|
+
}
|
|
371
|
+
],
|
|
372
|
+
[
|
|
373
|
+
"path",
|
|
374
|
+
{
|
|
375
|
+
d: "M9 3m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z",
|
|
376
|
+
key: "svg-2"
|
|
377
|
+
}
|
|
378
|
+
],
|
|
379
|
+
["path", { d: "M6 15v-1a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v1", key: "svg-3" }],
|
|
380
|
+
["path", { d: "M12 9l0 3", key: "svg-4" }]
|
|
381
|
+
]);
|
|
382
|
+
|
|
3
383
|
// ../../node_modules/.pnpm/@firebase+util@1.9.3/node_modules/@firebase/util/dist/index.esm2017.js
|
|
4
384
|
var stringToByteArray$1 = function(str) {
|
|
5
385
|
const out = [];
|
|
@@ -395,13 +775,13 @@
|
|
|
395
775
|
});
|
|
396
776
|
}
|
|
397
777
|
var ERROR_NAME = "FirebaseError";
|
|
398
|
-
var FirebaseError = class extends Error {
|
|
778
|
+
var FirebaseError = class _FirebaseError extends Error {
|
|
399
779
|
constructor(code, message, customData) {
|
|
400
780
|
super(message);
|
|
401
781
|
this.code = code;
|
|
402
782
|
this.customData = customData;
|
|
403
783
|
this.name = ERROR_NAME;
|
|
404
|
-
Object.setPrototypeOf(this,
|
|
784
|
+
Object.setPrototypeOf(this, _FirebaseError.prototype);
|
|
405
785
|
if (Error.captureStackTrace) {
|
|
406
786
|
Error.captureStackTrace(this, ErrorFactory.prototype.create);
|
|
407
787
|
}
|
|
@@ -1057,7 +1437,7 @@
|
|
|
1057
1437
|
}
|
|
1058
1438
|
};
|
|
1059
1439
|
|
|
1060
|
-
// ../../node_modules/.pnpm/idb@7.
|
|
1440
|
+
// ../../node_modules/.pnpm/idb@7.1.1/node_modules/idb/build/wrap-idb-value.js
|
|
1061
1441
|
var instanceOfAny = (object, constructors) => constructors.some((c2) => object instanceof c2);
|
|
1062
1442
|
var idbProxyableTypes;
|
|
1063
1443
|
var cursorAdvanceMethods;
|
|
@@ -1200,22 +1580,29 @@
|
|
|
1200
1580
|
}
|
|
1201
1581
|
var unwrap = (value) => reverseTransformCache.get(value);
|
|
1202
1582
|
|
|
1203
|
-
// ../../node_modules/.pnpm/idb@7.
|
|
1583
|
+
// ../../node_modules/.pnpm/idb@7.1.1/node_modules/idb/build/index.js
|
|
1204
1584
|
function openDB(name4, version4, { blocked, upgrade, blocking, terminated } = {}) {
|
|
1205
1585
|
const request = indexedDB.open(name4, version4);
|
|
1206
1586
|
const openPromise = wrap(request);
|
|
1207
1587
|
if (upgrade) {
|
|
1208
1588
|
request.addEventListener("upgradeneeded", (event) => {
|
|
1209
|
-
upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction));
|
|
1589
|
+
upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);
|
|
1210
1590
|
});
|
|
1211
1591
|
}
|
|
1212
|
-
if (blocked)
|
|
1213
|
-
request.addEventListener("blocked", () => blocked(
|
|
1592
|
+
if (blocked) {
|
|
1593
|
+
request.addEventListener("blocked", (event) => blocked(
|
|
1594
|
+
// Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
|
|
1595
|
+
event.oldVersion,
|
|
1596
|
+
event.newVersion,
|
|
1597
|
+
event
|
|
1598
|
+
));
|
|
1599
|
+
}
|
|
1214
1600
|
openPromise.then((db) => {
|
|
1215
1601
|
if (terminated)
|
|
1216
1602
|
db.addEventListener("close", () => terminated());
|
|
1217
|
-
if (blocking)
|
|
1218
|
-
db.addEventListener("versionchange", () => blocking());
|
|
1603
|
+
if (blocking) {
|
|
1604
|
+
db.addEventListener("versionchange", (event) => blocking(event.oldVersion, event.newVersion, event));
|
|
1605
|
+
}
|
|
1219
1606
|
}).catch(() => {
|
|
1220
1607
|
});
|
|
1221
1608
|
return openPromise;
|
|
@@ -1257,7 +1644,7 @@
|
|
|
1257
1644
|
has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop)
|
|
1258
1645
|
}));
|
|
1259
1646
|
|
|
1260
|
-
// ../../node_modules/.pnpm/@firebase+app@0.9.
|
|
1647
|
+
// ../../node_modules/.pnpm/@firebase+app@0.9.19/node_modules/@firebase/app/dist/esm/index.esm2017.js
|
|
1261
1648
|
var PlatformLoggerServiceImpl = class {
|
|
1262
1649
|
constructor(container) {
|
|
1263
1650
|
this.container = container;
|
|
@@ -1281,7 +1668,7 @@
|
|
|
1281
1668
|
return (component === null || component === void 0 ? void 0 : component.type) === "VERSION";
|
|
1282
1669
|
}
|
|
1283
1670
|
var name$o = "@firebase/app";
|
|
1284
|
-
var version$1 = "0.9.
|
|
1671
|
+
var version$1 = "0.9.19";
|
|
1285
1672
|
var logger = new Logger("@firebase/app");
|
|
1286
1673
|
var name$n = "@firebase/app-compat";
|
|
1287
1674
|
var name$m = "@firebase/analytics-compat";
|
|
@@ -1307,7 +1694,7 @@
|
|
|
1307
1694
|
var name$2 = "@firebase/firestore";
|
|
1308
1695
|
var name$1 = "@firebase/firestore-compat";
|
|
1309
1696
|
var name = "firebase";
|
|
1310
|
-
var version = "
|
|
1697
|
+
var version = "10.4.0";
|
|
1311
1698
|
var DEFAULT_ENTRY_NAME2 = "[DEFAULT]";
|
|
1312
1699
|
var PLATFORM_LOG_STRING = {
|
|
1313
1700
|
[name$o]: "fire-core",
|
|
@@ -1369,7 +1756,7 @@
|
|
|
1369
1756
|
[
|
|
1370
1757
|
"no-app"
|
|
1371
1758
|
/* AppError.NO_APP */
|
|
1372
|
-
]: "No Firebase App '{$appName}' has been created - call
|
|
1759
|
+
]: "No Firebase App '{$appName}' has been created - call initializeApp() first",
|
|
1373
1760
|
[
|
|
1374
1761
|
"bad-app-name"
|
|
1375
1762
|
/* AppError.BAD_APP_NAME */
|
|
@@ -1505,7 +1892,7 @@
|
|
|
1505
1892
|
}
|
|
1506
1893
|
function getApp(name4 = DEFAULT_ENTRY_NAME2) {
|
|
1507
1894
|
const app2 = _apps.get(name4);
|
|
1508
|
-
if (!app2 && name4 === DEFAULT_ENTRY_NAME2) {
|
|
1895
|
+
if (!app2 && name4 === DEFAULT_ENTRY_NAME2 && getDefaultAppConfig()) {
|
|
1509
1896
|
return initializeApp();
|
|
1510
1897
|
}
|
|
1511
1898
|
if (!app2) {
|
|
@@ -1568,7 +1955,8 @@
|
|
|
1568
1955
|
async function readHeartbeatsFromIndexedDB(app2) {
|
|
1569
1956
|
try {
|
|
1570
1957
|
const db = await getDbPromise();
|
|
1571
|
-
|
|
1958
|
+
const result = await db.transaction(STORE_NAME).objectStore(STORE_NAME).get(computeKey(app2));
|
|
1959
|
+
return result;
|
|
1572
1960
|
} catch (e2) {
|
|
1573
1961
|
if (e2 instanceof FirebaseError) {
|
|
1574
1962
|
logger.warn(e2.message);
|
|
@@ -1586,7 +1974,7 @@
|
|
|
1586
1974
|
const tx = db.transaction(STORE_NAME, "readwrite");
|
|
1587
1975
|
const objectStore = tx.objectStore(STORE_NAME);
|
|
1588
1976
|
await objectStore.put(heartbeatObject, computeKey(app2));
|
|
1589
|
-
|
|
1977
|
+
await tx.done;
|
|
1590
1978
|
} catch (e2) {
|
|
1591
1979
|
if (e2 instanceof FirebaseError) {
|
|
1592
1980
|
logger.warn(e2.message);
|
|
@@ -1781,6 +2169,11 @@
|
|
|
1781
2169
|
}
|
|
1782
2170
|
registerCoreComponents("");
|
|
1783
2171
|
|
|
2172
|
+
// ../../node_modules/.pnpm/firebase@10.4.0/node_modules/firebase/app/dist/esm/index.esm.js
|
|
2173
|
+
var name2 = "firebase";
|
|
2174
|
+
var version2 = "10.4.0";
|
|
2175
|
+
registerVersion(name2, version2, "app");
|
|
2176
|
+
|
|
1784
2177
|
// ../../node_modules/.pnpm/tslib@2.4.1/node_modules/tslib/tslib.es6.js
|
|
1785
2178
|
function __rest(s2, e2) {
|
|
1786
2179
|
var t2 = {};
|
|
@@ -1795,7 +2188,21 @@
|
|
|
1795
2188
|
return t2;
|
|
1796
2189
|
}
|
|
1797
2190
|
|
|
1798
|
-
// ../../node_modules/.pnpm/@firebase+auth@
|
|
2191
|
+
// ../../node_modules/.pnpm/@firebase+auth@1.3.0_@firebase+app@0.9.19/node_modules/@firebase/auth/dist/esm2017/index-9a76d29a.js
|
|
2192
|
+
function isEnterprise(grecaptcha) {
|
|
2193
|
+
return grecaptcha !== void 0 && grecaptcha.enterprise !== void 0;
|
|
2194
|
+
}
|
|
2195
|
+
var RecaptchaConfig = class {
|
|
2196
|
+
constructor(response) {
|
|
2197
|
+
this.siteKey = "";
|
|
2198
|
+
this.emailPasswordEnabled = false;
|
|
2199
|
+
if (response.recaptchaKey === void 0) {
|
|
2200
|
+
throw new Error("recaptchaKey undefined");
|
|
2201
|
+
}
|
|
2202
|
+
this.siteKey = response.recaptchaKey.split("/")[3];
|
|
2203
|
+
this.emailPasswordEnabled = response.recaptchaEnforcementState.some((enforcementState) => enforcementState.provider === "EMAIL_PASSWORD_PROVIDER" && enforcementState.enforcementState !== "OFF");
|
|
2204
|
+
}
|
|
2205
|
+
};
|
|
1799
2206
|
function _prodErrorMap() {
|
|
1800
2207
|
return {
|
|
1801
2208
|
[
|
|
@@ -1807,6 +2214,11 @@
|
|
|
1807
2214
|
var prodErrorMap = _prodErrorMap;
|
|
1808
2215
|
var _DEFAULT_AUTH_ERROR_FACTORY = new ErrorFactory("auth", "Firebase", _prodErrorMap());
|
|
1809
2216
|
var logClient = new Logger("@firebase/auth");
|
|
2217
|
+
function _logWarn(msg, ...args) {
|
|
2218
|
+
if (logClient.logLevel <= LogLevel.WARN) {
|
|
2219
|
+
logClient.warn(`Auth (${SDK_VERSION}): ${msg}`, ...args);
|
|
2220
|
+
}
|
|
2221
|
+
}
|
|
1810
2222
|
function _logError(msg, ...args) {
|
|
1811
2223
|
if (logClient.logLevel <= LogLevel.ERROR) {
|
|
1812
2224
|
logClient.error(`Auth (${SDK_VERSION}): ${msg}`, ...args);
|
|
@@ -1864,44 +2276,6 @@
|
|
|
1864
2276
|
debugFail(message);
|
|
1865
2277
|
}
|
|
1866
2278
|
}
|
|
1867
|
-
var instanceCache = /* @__PURE__ */ new Map();
|
|
1868
|
-
function _getInstance(cls) {
|
|
1869
|
-
debugAssert(cls instanceof Function, "Expected a class definition");
|
|
1870
|
-
let instance = instanceCache.get(cls);
|
|
1871
|
-
if (instance) {
|
|
1872
|
-
debugAssert(instance instanceof cls, "Instance stored in cache mismatched with class");
|
|
1873
|
-
return instance;
|
|
1874
|
-
}
|
|
1875
|
-
instance = new cls();
|
|
1876
|
-
instanceCache.set(cls, instance);
|
|
1877
|
-
return instance;
|
|
1878
|
-
}
|
|
1879
|
-
function initializeAuth(app2, deps) {
|
|
1880
|
-
const provider = _getProvider(app2, "auth");
|
|
1881
|
-
if (provider.isInitialized()) {
|
|
1882
|
-
const auth3 = provider.getImmediate();
|
|
1883
|
-
const initialOptions = provider.getOptions();
|
|
1884
|
-
if (deepEqual(initialOptions, deps !== null && deps !== void 0 ? deps : {})) {
|
|
1885
|
-
return auth3;
|
|
1886
|
-
} else {
|
|
1887
|
-
_fail(
|
|
1888
|
-
auth3,
|
|
1889
|
-
"already-initialized"
|
|
1890
|
-
/* AuthErrorCode.ALREADY_INITIALIZED */
|
|
1891
|
-
);
|
|
1892
|
-
}
|
|
1893
|
-
}
|
|
1894
|
-
const auth2 = provider.initialize({ options: deps });
|
|
1895
|
-
return auth2;
|
|
1896
|
-
}
|
|
1897
|
-
function _initializeAuthInstance(auth2, deps) {
|
|
1898
|
-
const persistence = (deps === null || deps === void 0 ? void 0 : deps.persistence) || [];
|
|
1899
|
-
const hierarchy = (Array.isArray(persistence) ? persistence : [persistence]).map(_getInstance);
|
|
1900
|
-
if (deps === null || deps === void 0 ? void 0 : deps.errorMap) {
|
|
1901
|
-
auth2._updateErrorMap(deps.errorMap);
|
|
1902
|
-
}
|
|
1903
|
-
auth2._initializeWithPersistence(hierarchy, deps === null || deps === void 0 ? void 0 : deps.popupRedirectResolver);
|
|
1904
|
-
}
|
|
1905
2279
|
function _getCurrentUrl() {
|
|
1906
2280
|
var _a;
|
|
1907
2281
|
return typeof self !== "undefined" && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.href) || "";
|
|
@@ -2027,7 +2401,7 @@
|
|
|
2027
2401
|
[
|
|
2028
2402
|
"MISSING_PASSWORD"
|
|
2029
2403
|
/* ServerError.MISSING_PASSWORD */
|
|
2030
|
-
]: "
|
|
2404
|
+
]: "missing-password",
|
|
2031
2405
|
// Sign up with email and password errors.
|
|
2032
2406
|
[
|
|
2033
2407
|
"EMAIL_EXISTS"
|
|
@@ -2099,6 +2473,10 @@
|
|
|
2099
2473
|
"TOO_MANY_ATTEMPTS_TRY_LATER"
|
|
2100
2474
|
/* ServerError.TOO_MANY_ATTEMPTS_TRY_LATER */
|
|
2101
2475
|
]: "too-many-requests",
|
|
2476
|
+
[
|
|
2477
|
+
"PASSWORD_DOES_NOT_MEET_REQUIREMENTS"
|
|
2478
|
+
/* ServerError.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */
|
|
2479
|
+
]: "password-does-not-meet-requirements",
|
|
2102
2480
|
// Phone Auth related errors.
|
|
2103
2481
|
[
|
|
2104
2482
|
"INVALID_CODE"
|
|
@@ -2170,8 +2548,41 @@
|
|
|
2170
2548
|
[
|
|
2171
2549
|
"BLOCKING_FUNCTION_ERROR_RESPONSE"
|
|
2172
2550
|
/* ServerError.BLOCKING_FUNCTION_ERROR_RESPONSE */
|
|
2173
|
-
]: "internal-error"
|
|
2174
|
-
|
|
2551
|
+
]: "internal-error",
|
|
2552
|
+
// Recaptcha related errors.
|
|
2553
|
+
[
|
|
2554
|
+
"RECAPTCHA_NOT_ENABLED"
|
|
2555
|
+
/* ServerError.RECAPTCHA_NOT_ENABLED */
|
|
2556
|
+
]: "recaptcha-not-enabled",
|
|
2557
|
+
[
|
|
2558
|
+
"MISSING_RECAPTCHA_TOKEN"
|
|
2559
|
+
/* ServerError.MISSING_RECAPTCHA_TOKEN */
|
|
2560
|
+
]: "missing-recaptcha-token",
|
|
2561
|
+
[
|
|
2562
|
+
"INVALID_RECAPTCHA_TOKEN"
|
|
2563
|
+
/* ServerError.INVALID_RECAPTCHA_TOKEN */
|
|
2564
|
+
]: "invalid-recaptcha-token",
|
|
2565
|
+
[
|
|
2566
|
+
"INVALID_RECAPTCHA_ACTION"
|
|
2567
|
+
/* ServerError.INVALID_RECAPTCHA_ACTION */
|
|
2568
|
+
]: "invalid-recaptcha-action",
|
|
2569
|
+
[
|
|
2570
|
+
"MISSING_CLIENT_TYPE"
|
|
2571
|
+
/* ServerError.MISSING_CLIENT_TYPE */
|
|
2572
|
+
]: "missing-client-type",
|
|
2573
|
+
[
|
|
2574
|
+
"MISSING_RECAPTCHA_VERSION"
|
|
2575
|
+
/* ServerError.MISSING_RECAPTCHA_VERSION */
|
|
2576
|
+
]: "missing-recaptcha-version",
|
|
2577
|
+
[
|
|
2578
|
+
"INVALID_RECAPTCHA_VERSION"
|
|
2579
|
+
/* ServerError.INVALID_RECAPTCHA_VERSION */
|
|
2580
|
+
]: "invalid-recaptcha-version",
|
|
2581
|
+
[
|
|
2582
|
+
"INVALID_REQ_TYPE"
|
|
2583
|
+
/* ServerError.INVALID_REQ_TYPE */
|
|
2584
|
+
]: "invalid-req-type"
|
|
2585
|
+
/* AuthErrorCode.INVALID_REQ_TYPE */
|
|
2175
2586
|
};
|
|
2176
2587
|
var DEFAULT_API_TIMEOUT_MS = new Delay(3e4, 6e4);
|
|
2177
2588
|
function _addTidIfNecessary(auth2, request) {
|
|
@@ -2249,7 +2660,7 @@
|
|
|
2249
2660
|
if (e2 instanceof FirebaseError) {
|
|
2250
2661
|
throw e2;
|
|
2251
2662
|
}
|
|
2252
|
-
_fail(auth2, "
|
|
2663
|
+
_fail(auth2, "network-request-failed", { "message": String(e2) });
|
|
2253
2664
|
}
|
|
2254
2665
|
}
|
|
2255
2666
|
async function _performSignInRequest(auth2, method, path, request, customErrorMap = {}) {
|
|
@@ -2300,6 +2711,9 @@
|
|
|
2300
2711
|
error.customData._tokenResponse = response;
|
|
2301
2712
|
return error;
|
|
2302
2713
|
}
|
|
2714
|
+
async function getRecaptchaConfig(auth2, request) {
|
|
2715
|
+
return _performApiRequest(auth2, "GET", "/v2/recaptchaConfig", _addTidIfNecessary(auth2, request));
|
|
2716
|
+
}
|
|
2303
2717
|
async function deleteAccount(auth2, request) {
|
|
2304
2718
|
return _performApiRequest(auth2, "POST", "/v1/accounts:delete", request);
|
|
2305
2719
|
}
|
|
@@ -2565,7 +2979,7 @@
|
|
|
2565
2979
|
refreshToken: response.refresh_token
|
|
2566
2980
|
};
|
|
2567
2981
|
}
|
|
2568
|
-
var StsTokenManager = class {
|
|
2982
|
+
var StsTokenManager = class _StsTokenManager {
|
|
2569
2983
|
constructor() {
|
|
2570
2984
|
this.refreshToken = null;
|
|
2571
2985
|
this.accessToken = null;
|
|
@@ -2623,7 +3037,7 @@
|
|
|
2623
3037
|
}
|
|
2624
3038
|
static fromJSON(appName, object) {
|
|
2625
3039
|
const { refreshToken, accessToken, expirationTime } = object;
|
|
2626
|
-
const manager = new
|
|
3040
|
+
const manager = new _StsTokenManager();
|
|
2627
3041
|
if (refreshToken) {
|
|
2628
3042
|
_assert(typeof refreshToken === "string", "internal-error", {
|
|
2629
3043
|
appName
|
|
@@ -2657,7 +3071,7 @@
|
|
|
2657
3071
|
this.expirationTime = stsTokenManager.expirationTime;
|
|
2658
3072
|
}
|
|
2659
3073
|
_clone() {
|
|
2660
|
-
return Object.assign(new
|
|
3074
|
+
return Object.assign(new _StsTokenManager(), this.toJSON());
|
|
2661
3075
|
}
|
|
2662
3076
|
_performRefresh() {
|
|
2663
3077
|
return debugFail("not implemented");
|
|
@@ -2666,7 +3080,7 @@
|
|
|
2666
3080
|
function assertStringOrUndefined(assertion, appName) {
|
|
2667
3081
|
_assert(typeof assertion === "string" || typeof assertion === "undefined", "internal-error", { appName });
|
|
2668
3082
|
}
|
|
2669
|
-
var UserImpl = class {
|
|
3083
|
+
var UserImpl = class _UserImpl {
|
|
2670
3084
|
constructor(_a) {
|
|
2671
3085
|
var { uid, auth: auth2, stsTokenManager } = _a, opt = __rest(_a, ["uid", "auth", "stsTokenManager"]);
|
|
2672
3086
|
this.providerId = "firebase";
|
|
@@ -2730,7 +3144,9 @@
|
|
|
2730
3144
|
this.stsTokenManager._assign(user.stsTokenManager);
|
|
2731
3145
|
}
|
|
2732
3146
|
_clone(auth2) {
|
|
2733
|
-
|
|
3147
|
+
const newUser = new _UserImpl(Object.assign(Object.assign({}, this), { auth: auth2, stsTokenManager: this.stsTokenManager._clone() }));
|
|
3148
|
+
newUser.metadata._copy(this.metadata);
|
|
3149
|
+
return newUser;
|
|
2734
3150
|
}
|
|
2735
3151
|
_onReload(callback) {
|
|
2736
3152
|
_assert(
|
|
@@ -2846,7 +3262,7 @@
|
|
|
2846
3262
|
assertStringOrUndefined(_redirectEventId, auth2.name);
|
|
2847
3263
|
assertStringOrUndefined(createdAt, auth2.name);
|
|
2848
3264
|
assertStringOrUndefined(lastLoginAt, auth2.name);
|
|
2849
|
-
const user = new
|
|
3265
|
+
const user = new _UserImpl({
|
|
2850
3266
|
uid,
|
|
2851
3267
|
auth: auth2,
|
|
2852
3268
|
email,
|
|
@@ -2876,7 +3292,7 @@
|
|
|
2876
3292
|
static async _fromIdTokenResponse(auth2, idTokenResponse, isAnonymous = false) {
|
|
2877
3293
|
const stsTokenManager = new StsTokenManager();
|
|
2878
3294
|
stsTokenManager.updateFromServerResponse(idTokenResponse);
|
|
2879
|
-
const user = new
|
|
3295
|
+
const user = new _UserImpl({
|
|
2880
3296
|
uid: idTokenResponse.localId,
|
|
2881
3297
|
auth: auth2,
|
|
2882
3298
|
stsTokenManager,
|
|
@@ -2886,6 +3302,18 @@
|
|
|
2886
3302
|
return user;
|
|
2887
3303
|
}
|
|
2888
3304
|
};
|
|
3305
|
+
var instanceCache = /* @__PURE__ */ new Map();
|
|
3306
|
+
function _getInstance(cls) {
|
|
3307
|
+
debugAssert(cls instanceof Function, "Expected a class definition");
|
|
3308
|
+
let instance = instanceCache.get(cls);
|
|
3309
|
+
if (instance) {
|
|
3310
|
+
debugAssert(instance instanceof cls, "Instance stored in cache mismatched with class");
|
|
3311
|
+
return instance;
|
|
3312
|
+
}
|
|
3313
|
+
instance = new cls();
|
|
3314
|
+
instanceCache.set(cls, instance);
|
|
3315
|
+
return instance;
|
|
3316
|
+
}
|
|
2889
3317
|
var InMemoryPersistence = class {
|
|
2890
3318
|
constructor() {
|
|
2891
3319
|
this.type = "NONE";
|
|
@@ -2916,7 +3344,7 @@
|
|
|
2916
3344
|
function _persistenceKeyName(key, apiKey, appName) {
|
|
2917
3345
|
return `${"firebase"}:${key}:${apiKey}:${appName}`;
|
|
2918
3346
|
}
|
|
2919
|
-
var PersistenceUserManager = class {
|
|
3347
|
+
var PersistenceUserManager = class _PersistenceUserManager {
|
|
2920
3348
|
constructor(persistence, auth2, userKey) {
|
|
2921
3349
|
this.persistence = persistence;
|
|
2922
3350
|
this.auth = auth2;
|
|
@@ -2956,7 +3384,7 @@
|
|
|
2956
3384
|
}
|
|
2957
3385
|
static async create(auth2, persistenceHierarchy, userKey = "authUser") {
|
|
2958
3386
|
if (!persistenceHierarchy.length) {
|
|
2959
|
-
return new
|
|
3387
|
+
return new _PersistenceUserManager(_getInstance(inMemoryPersistence), auth2, userKey);
|
|
2960
3388
|
}
|
|
2961
3389
|
const availablePersistences = (await Promise.all(persistenceHierarchy.map(async (persistence) => {
|
|
2962
3390
|
if (await persistence._isAvailable()) {
|
|
@@ -2983,7 +3411,7 @@
|
|
|
2983
3411
|
}
|
|
2984
3412
|
const migrationHierarchy = availablePersistences.filter((p2) => p2._shouldAllowMigration);
|
|
2985
3413
|
if (!selectedPersistence._shouldAllowMigration || !migrationHierarchy.length) {
|
|
2986
|
-
return new
|
|
3414
|
+
return new _PersistenceUserManager(selectedPersistence, auth2, userKey);
|
|
2987
3415
|
}
|
|
2988
3416
|
selectedPersistence = migrationHierarchy[0];
|
|
2989
3417
|
if (userToMigrate) {
|
|
@@ -2997,7 +3425,7 @@
|
|
|
2997
3425
|
}
|
|
2998
3426
|
}
|
|
2999
3427
|
}));
|
|
3000
|
-
return new
|
|
3428
|
+
return new _PersistenceUserManager(selectedPersistence, auth2, userKey);
|
|
3001
3429
|
}
|
|
3002
3430
|
};
|
|
3003
3431
|
function _getBrowserName(userAgent) {
|
|
@@ -3137,10 +3565,136 @@
|
|
|
3137
3565
|
}
|
|
3138
3566
|
}
|
|
3139
3567
|
};
|
|
3568
|
+
async function _getPasswordPolicy(auth2, request = {}) {
|
|
3569
|
+
return _performApiRequest(auth2, "GET", "/v2/passwordPolicy", _addTidIfNecessary(auth2, request));
|
|
3570
|
+
}
|
|
3571
|
+
var MINIMUM_MIN_PASSWORD_LENGTH = 6;
|
|
3572
|
+
var PasswordPolicyImpl = class {
|
|
3573
|
+
constructor(response) {
|
|
3574
|
+
var _a, _b, _c, _d;
|
|
3575
|
+
const responseOptions = response.customStrengthOptions;
|
|
3576
|
+
this.customStrengthOptions = {};
|
|
3577
|
+
this.customStrengthOptions.minPasswordLength = (_a = responseOptions.minPasswordLength) !== null && _a !== void 0 ? _a : MINIMUM_MIN_PASSWORD_LENGTH;
|
|
3578
|
+
if (responseOptions.maxPasswordLength) {
|
|
3579
|
+
this.customStrengthOptions.maxPasswordLength = responseOptions.maxPasswordLength;
|
|
3580
|
+
}
|
|
3581
|
+
if (responseOptions.containsLowercaseCharacter !== void 0) {
|
|
3582
|
+
this.customStrengthOptions.containsLowercaseLetter = responseOptions.containsLowercaseCharacter;
|
|
3583
|
+
}
|
|
3584
|
+
if (responseOptions.containsUppercaseCharacter !== void 0) {
|
|
3585
|
+
this.customStrengthOptions.containsUppercaseLetter = responseOptions.containsUppercaseCharacter;
|
|
3586
|
+
}
|
|
3587
|
+
if (responseOptions.containsNumericCharacter !== void 0) {
|
|
3588
|
+
this.customStrengthOptions.containsNumericCharacter = responseOptions.containsNumericCharacter;
|
|
3589
|
+
}
|
|
3590
|
+
if (responseOptions.containsNonAlphanumericCharacter !== void 0) {
|
|
3591
|
+
this.customStrengthOptions.containsNonAlphanumericCharacter = responseOptions.containsNonAlphanumericCharacter;
|
|
3592
|
+
}
|
|
3593
|
+
this.enforcementState = response.enforcementState;
|
|
3594
|
+
if (this.enforcementState === "ENFORCEMENT_STATE_UNSPECIFIED") {
|
|
3595
|
+
this.enforcementState = "OFF";
|
|
3596
|
+
}
|
|
3597
|
+
this.allowedNonAlphanumericCharacters = (_c = (_b = response.allowedNonAlphanumericCharacters) === null || _b === void 0 ? void 0 : _b.join("")) !== null && _c !== void 0 ? _c : "";
|
|
3598
|
+
this.forceUpgradeOnSignin = (_d = response.forceUpgradeOnSignin) !== null && _d !== void 0 ? _d : false;
|
|
3599
|
+
this.schemaVersion = response.schemaVersion;
|
|
3600
|
+
}
|
|
3601
|
+
validatePassword(password) {
|
|
3602
|
+
var _a, _b, _c, _d, _e, _f;
|
|
3603
|
+
const status = {
|
|
3604
|
+
isValid: true,
|
|
3605
|
+
passwordPolicy: this
|
|
3606
|
+
};
|
|
3607
|
+
this.validatePasswordLengthOptions(password, status);
|
|
3608
|
+
this.validatePasswordCharacterOptions(password, status);
|
|
3609
|
+
status.isValid && (status.isValid = (_a = status.meetsMinPasswordLength) !== null && _a !== void 0 ? _a : true);
|
|
3610
|
+
status.isValid && (status.isValid = (_b = status.meetsMaxPasswordLength) !== null && _b !== void 0 ? _b : true);
|
|
3611
|
+
status.isValid && (status.isValid = (_c = status.containsLowercaseLetter) !== null && _c !== void 0 ? _c : true);
|
|
3612
|
+
status.isValid && (status.isValid = (_d = status.containsUppercaseLetter) !== null && _d !== void 0 ? _d : true);
|
|
3613
|
+
status.isValid && (status.isValid = (_e = status.containsNumericCharacter) !== null && _e !== void 0 ? _e : true);
|
|
3614
|
+
status.isValid && (status.isValid = (_f = status.containsNonAlphanumericCharacter) !== null && _f !== void 0 ? _f : true);
|
|
3615
|
+
return status;
|
|
3616
|
+
}
|
|
3617
|
+
/**
|
|
3618
|
+
* Validates that the password meets the length options for the policy.
|
|
3619
|
+
*
|
|
3620
|
+
* @param password Password to validate.
|
|
3621
|
+
* @param status Validation status.
|
|
3622
|
+
*/
|
|
3623
|
+
validatePasswordLengthOptions(password, status) {
|
|
3624
|
+
const minPasswordLength = this.customStrengthOptions.minPasswordLength;
|
|
3625
|
+
const maxPasswordLength = this.customStrengthOptions.maxPasswordLength;
|
|
3626
|
+
if (minPasswordLength) {
|
|
3627
|
+
status.meetsMinPasswordLength = password.length >= minPasswordLength;
|
|
3628
|
+
}
|
|
3629
|
+
if (maxPasswordLength) {
|
|
3630
|
+
status.meetsMaxPasswordLength = password.length <= maxPasswordLength;
|
|
3631
|
+
}
|
|
3632
|
+
}
|
|
3633
|
+
/**
|
|
3634
|
+
* Validates that the password meets the character options for the policy.
|
|
3635
|
+
*
|
|
3636
|
+
* @param password Password to validate.
|
|
3637
|
+
* @param status Validation status.
|
|
3638
|
+
*/
|
|
3639
|
+
validatePasswordCharacterOptions(password, status) {
|
|
3640
|
+
this.updatePasswordCharacterOptionsStatuses(
|
|
3641
|
+
status,
|
|
3642
|
+
/* containsLowercaseCharacter= */
|
|
3643
|
+
false,
|
|
3644
|
+
/* containsUppercaseCharacter= */
|
|
3645
|
+
false,
|
|
3646
|
+
/* containsNumericCharacter= */
|
|
3647
|
+
false,
|
|
3648
|
+
/* containsNonAlphanumericCharacter= */
|
|
3649
|
+
false
|
|
3650
|
+
);
|
|
3651
|
+
let passwordChar;
|
|
3652
|
+
for (let i2 = 0; i2 < password.length; i2++) {
|
|
3653
|
+
passwordChar = password.charAt(i2);
|
|
3654
|
+
this.updatePasswordCharacterOptionsStatuses(
|
|
3655
|
+
status,
|
|
3656
|
+
/* containsLowercaseCharacter= */
|
|
3657
|
+
passwordChar >= "a" && passwordChar <= "z",
|
|
3658
|
+
/* containsUppercaseCharacter= */
|
|
3659
|
+
passwordChar >= "A" && passwordChar <= "Z",
|
|
3660
|
+
/* containsNumericCharacter= */
|
|
3661
|
+
passwordChar >= "0" && passwordChar <= "9",
|
|
3662
|
+
/* containsNonAlphanumericCharacter= */
|
|
3663
|
+
this.allowedNonAlphanumericCharacters.includes(passwordChar)
|
|
3664
|
+
);
|
|
3665
|
+
}
|
|
3666
|
+
}
|
|
3667
|
+
/**
|
|
3668
|
+
* Updates the running validation status with the statuses for the character options.
|
|
3669
|
+
* Expected to be called each time a character is processed to update each option status
|
|
3670
|
+
* based on the current character.
|
|
3671
|
+
*
|
|
3672
|
+
* @param status Validation status.
|
|
3673
|
+
* @param containsLowercaseCharacter Whether the character is a lowercase letter.
|
|
3674
|
+
* @param containsUppercaseCharacter Whether the character is an uppercase letter.
|
|
3675
|
+
* @param containsNumericCharacter Whether the character is a numeric character.
|
|
3676
|
+
* @param containsNonAlphanumericCharacter Whether the character is a non-alphanumeric character.
|
|
3677
|
+
*/
|
|
3678
|
+
updatePasswordCharacterOptionsStatuses(status, containsLowercaseCharacter, containsUppercaseCharacter, containsNumericCharacter, containsNonAlphanumericCharacter) {
|
|
3679
|
+
if (this.customStrengthOptions.containsLowercaseLetter) {
|
|
3680
|
+
status.containsLowercaseLetter || (status.containsLowercaseLetter = containsLowercaseCharacter);
|
|
3681
|
+
}
|
|
3682
|
+
if (this.customStrengthOptions.containsUppercaseLetter) {
|
|
3683
|
+
status.containsUppercaseLetter || (status.containsUppercaseLetter = containsUppercaseCharacter);
|
|
3684
|
+
}
|
|
3685
|
+
if (this.customStrengthOptions.containsNumericCharacter) {
|
|
3686
|
+
status.containsNumericCharacter || (status.containsNumericCharacter = containsNumericCharacter);
|
|
3687
|
+
}
|
|
3688
|
+
if (this.customStrengthOptions.containsNonAlphanumericCharacter) {
|
|
3689
|
+
status.containsNonAlphanumericCharacter || (status.containsNonAlphanumericCharacter = containsNonAlphanumericCharacter);
|
|
3690
|
+
}
|
|
3691
|
+
}
|
|
3692
|
+
};
|
|
3140
3693
|
var AuthImpl = class {
|
|
3141
|
-
constructor(app2, heartbeatServiceProvider, config) {
|
|
3694
|
+
constructor(app2, heartbeatServiceProvider, appCheckServiceProvider, config) {
|
|
3142
3695
|
this.app = app2;
|
|
3143
3696
|
this.heartbeatServiceProvider = heartbeatServiceProvider;
|
|
3697
|
+
this.appCheckServiceProvider = appCheckServiceProvider;
|
|
3144
3698
|
this.config = config;
|
|
3145
3699
|
this.currentUser = null;
|
|
3146
3700
|
this.emulatorConfig = null;
|
|
@@ -3150,12 +3704,17 @@
|
|
|
3150
3704
|
this.beforeStateQueue = new AuthMiddlewareQueue(this);
|
|
3151
3705
|
this.redirectUser = null;
|
|
3152
3706
|
this.isProactiveRefreshEnabled = false;
|
|
3707
|
+
this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1;
|
|
3153
3708
|
this._canInitEmulator = true;
|
|
3154
3709
|
this._isInitialized = false;
|
|
3155
3710
|
this._deleted = false;
|
|
3156
3711
|
this._initializationPromise = null;
|
|
3157
3712
|
this._popupRedirectResolver = null;
|
|
3158
3713
|
this._errorFactory = _DEFAULT_AUTH_ERROR_FACTORY;
|
|
3714
|
+
this._agentRecaptchaConfig = null;
|
|
3715
|
+
this._tenantRecaptchaConfigs = {};
|
|
3716
|
+
this._projectPasswordPolicy = null;
|
|
3717
|
+
this._tenantPasswordPolicies = {};
|
|
3159
3718
|
this.lastNotifiedUid = void 0;
|
|
3160
3719
|
this.languageCode = null;
|
|
3161
3720
|
this.tenantId = null;
|
|
@@ -3332,6 +3891,39 @@
|
|
|
3332
3891
|
await this.assertedPersistence.setPersistence(_getInstance(persistence));
|
|
3333
3892
|
});
|
|
3334
3893
|
}
|
|
3894
|
+
_getRecaptchaConfig() {
|
|
3895
|
+
if (this.tenantId == null) {
|
|
3896
|
+
return this._agentRecaptchaConfig;
|
|
3897
|
+
} else {
|
|
3898
|
+
return this._tenantRecaptchaConfigs[this.tenantId];
|
|
3899
|
+
}
|
|
3900
|
+
}
|
|
3901
|
+
async validatePassword(password) {
|
|
3902
|
+
if (!this._getPasswordPolicyInternal()) {
|
|
3903
|
+
await this._updatePasswordPolicy();
|
|
3904
|
+
}
|
|
3905
|
+
const passwordPolicy = this._getPasswordPolicyInternal();
|
|
3906
|
+
if (passwordPolicy.schemaVersion !== this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION) {
|
|
3907
|
+
return Promise.reject(this._errorFactory.create("unsupported-password-policy-schema-version", {}));
|
|
3908
|
+
}
|
|
3909
|
+
return passwordPolicy.validatePassword(password);
|
|
3910
|
+
}
|
|
3911
|
+
_getPasswordPolicyInternal() {
|
|
3912
|
+
if (this.tenantId === null) {
|
|
3913
|
+
return this._projectPasswordPolicy;
|
|
3914
|
+
} else {
|
|
3915
|
+
return this._tenantPasswordPolicies[this.tenantId];
|
|
3916
|
+
}
|
|
3917
|
+
}
|
|
3918
|
+
async _updatePasswordPolicy() {
|
|
3919
|
+
const response = await _getPasswordPolicy(this);
|
|
3920
|
+
const passwordPolicy = new PasswordPolicyImpl(response);
|
|
3921
|
+
if (this.tenantId === null) {
|
|
3922
|
+
this._projectPasswordPolicy = passwordPolicy;
|
|
3923
|
+
} else {
|
|
3924
|
+
this._tenantPasswordPolicies[this.tenantId] = passwordPolicy;
|
|
3925
|
+
}
|
|
3926
|
+
}
|
|
3335
3927
|
_getPersistence() {
|
|
3336
3928
|
return this.assertedPersistence.persistence.type;
|
|
3337
3929
|
}
|
|
@@ -3347,6 +3939,18 @@
|
|
|
3347
3939
|
onIdTokenChanged(nextOrObserver, error, completed) {
|
|
3348
3940
|
return this.registerStateListener(this.idTokenSubscription, nextOrObserver, error, completed);
|
|
3349
3941
|
}
|
|
3942
|
+
authStateReady() {
|
|
3943
|
+
return new Promise((resolve, reject) => {
|
|
3944
|
+
if (this.currentUser) {
|
|
3945
|
+
resolve();
|
|
3946
|
+
} else {
|
|
3947
|
+
const unsubscribe = this.onAuthStateChanged(() => {
|
|
3948
|
+
unsubscribe();
|
|
3949
|
+
resolve();
|
|
3950
|
+
}, reject);
|
|
3951
|
+
}
|
|
3952
|
+
});
|
|
3953
|
+
}
|
|
3350
3954
|
toJSON() {
|
|
3351
3955
|
var _a;
|
|
3352
3956
|
return {
|
|
@@ -3441,6 +4045,7 @@
|
|
|
3441
4045
|
};
|
|
3442
4046
|
}
|
|
3443
4047
|
const cb = typeof nextOrObserver === "function" ? nextOrObserver : nextOrObserver.next.bind(nextOrObserver);
|
|
4048
|
+
let isUnsubscribed = false;
|
|
3444
4049
|
const promise = this._isInitialized ? Promise.resolve() : this._initializationPromise;
|
|
3445
4050
|
_assert(
|
|
3446
4051
|
promise,
|
|
@@ -3448,11 +4053,24 @@
|
|
|
3448
4053
|
"internal-error"
|
|
3449
4054
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3450
4055
|
);
|
|
3451
|
-
promise.then(() =>
|
|
4056
|
+
promise.then(() => {
|
|
4057
|
+
if (isUnsubscribed) {
|
|
4058
|
+
return;
|
|
4059
|
+
}
|
|
4060
|
+
cb(this.currentUser);
|
|
4061
|
+
});
|
|
3452
4062
|
if (typeof nextOrObserver === "function") {
|
|
3453
|
-
|
|
4063
|
+
const unsubscribe = subscription.addObserver(nextOrObserver, error, completed);
|
|
4064
|
+
return () => {
|
|
4065
|
+
isUnsubscribed = true;
|
|
4066
|
+
unsubscribe();
|
|
4067
|
+
};
|
|
3454
4068
|
} else {
|
|
3455
|
-
|
|
4069
|
+
const unsubscribe = subscription.addObserver(nextOrObserver);
|
|
4070
|
+
return () => {
|
|
4071
|
+
isUnsubscribed = true;
|
|
4072
|
+
unsubscribe();
|
|
4073
|
+
};
|
|
3456
4074
|
}
|
|
3457
4075
|
}
|
|
3458
4076
|
/**
|
|
@@ -3521,8 +4139,23 @@
|
|
|
3521
4139
|
/* HttpHeader.X_FIREBASE_CLIENT */
|
|
3522
4140
|
] = heartbeatsHeader;
|
|
3523
4141
|
}
|
|
4142
|
+
const appCheckToken = await this._getAppCheckToken();
|
|
4143
|
+
if (appCheckToken) {
|
|
4144
|
+
headers[
|
|
4145
|
+
"X-Firebase-AppCheck"
|
|
4146
|
+
/* HttpHeader.X_FIREBASE_APP_CHECK */
|
|
4147
|
+
] = appCheckToken;
|
|
4148
|
+
}
|
|
3524
4149
|
return headers;
|
|
3525
4150
|
}
|
|
4151
|
+
async _getAppCheckToken() {
|
|
4152
|
+
var _a;
|
|
4153
|
+
const appCheckTokenResult = await ((_a = this.appCheckServiceProvider.getImmediate({ optional: true })) === null || _a === void 0 ? void 0 : _a.getToken());
|
|
4154
|
+
if (appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.error) {
|
|
4155
|
+
_logWarn(`Error while retrieving App Check token: ${appCheckTokenResult.error}`);
|
|
4156
|
+
}
|
|
4157
|
+
return appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.token;
|
|
4158
|
+
}
|
|
3526
4159
|
};
|
|
3527
4160
|
function _castAuth(auth2) {
|
|
3528
4161
|
return getModularInstance(auth2);
|
|
@@ -3543,6 +4176,166 @@
|
|
|
3543
4176
|
return this.observer.next.bind(this.observer);
|
|
3544
4177
|
}
|
|
3545
4178
|
};
|
|
4179
|
+
function getScriptParentElement() {
|
|
4180
|
+
var _a, _b;
|
|
4181
|
+
return (_b = (_a = document.getElementsByTagName("head")) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : document;
|
|
4182
|
+
}
|
|
4183
|
+
function _loadJS(url) {
|
|
4184
|
+
return new Promise((resolve, reject) => {
|
|
4185
|
+
const el = document.createElement("script");
|
|
4186
|
+
el.setAttribute("src", url);
|
|
4187
|
+
el.onload = resolve;
|
|
4188
|
+
el.onerror = (e2) => {
|
|
4189
|
+
const error = _createError(
|
|
4190
|
+
"internal-error"
|
|
4191
|
+
/* AuthErrorCode.INTERNAL_ERROR */
|
|
4192
|
+
);
|
|
4193
|
+
error.customData = e2;
|
|
4194
|
+
reject(error);
|
|
4195
|
+
};
|
|
4196
|
+
el.type = "text/javascript";
|
|
4197
|
+
el.charset = "UTF-8";
|
|
4198
|
+
getScriptParentElement().appendChild(el);
|
|
4199
|
+
});
|
|
4200
|
+
}
|
|
4201
|
+
function _generateCallbackName(prefix) {
|
|
4202
|
+
return `__${prefix}${Math.floor(Math.random() * 1e6)}`;
|
|
4203
|
+
}
|
|
4204
|
+
var RECAPTCHA_ENTERPRISE_URL = "https://www.google.com/recaptcha/enterprise.js?render=";
|
|
4205
|
+
var RECAPTCHA_ENTERPRISE_VERIFIER_TYPE = "recaptcha-enterprise";
|
|
4206
|
+
var FAKE_TOKEN = "NO_RECAPTCHA";
|
|
4207
|
+
var RecaptchaEnterpriseVerifier = class {
|
|
4208
|
+
/**
|
|
4209
|
+
*
|
|
4210
|
+
* @param authExtern - The corresponding Firebase {@link Auth} instance.
|
|
4211
|
+
*
|
|
4212
|
+
*/
|
|
4213
|
+
constructor(authExtern) {
|
|
4214
|
+
this.type = RECAPTCHA_ENTERPRISE_VERIFIER_TYPE;
|
|
4215
|
+
this.auth = _castAuth(authExtern);
|
|
4216
|
+
}
|
|
4217
|
+
/**
|
|
4218
|
+
* Executes the verification process.
|
|
4219
|
+
*
|
|
4220
|
+
* @returns A Promise for a token that can be used to assert the validity of a request.
|
|
4221
|
+
*/
|
|
4222
|
+
async verify(action = "verify", forceRefresh = false) {
|
|
4223
|
+
async function retrieveSiteKey(auth2) {
|
|
4224
|
+
if (!forceRefresh) {
|
|
4225
|
+
if (auth2.tenantId == null && auth2._agentRecaptchaConfig != null) {
|
|
4226
|
+
return auth2._agentRecaptchaConfig.siteKey;
|
|
4227
|
+
}
|
|
4228
|
+
if (auth2.tenantId != null && auth2._tenantRecaptchaConfigs[auth2.tenantId] !== void 0) {
|
|
4229
|
+
return auth2._tenantRecaptchaConfigs[auth2.tenantId].siteKey;
|
|
4230
|
+
}
|
|
4231
|
+
}
|
|
4232
|
+
return new Promise(async (resolve, reject) => {
|
|
4233
|
+
getRecaptchaConfig(auth2, {
|
|
4234
|
+
clientType: "CLIENT_TYPE_WEB",
|
|
4235
|
+
version: "RECAPTCHA_ENTERPRISE"
|
|
4236
|
+
/* RecaptchaVersion.ENTERPRISE */
|
|
4237
|
+
}).then((response) => {
|
|
4238
|
+
if (response.recaptchaKey === void 0) {
|
|
4239
|
+
reject(new Error("recaptcha Enterprise site key undefined"));
|
|
4240
|
+
} else {
|
|
4241
|
+
const config = new RecaptchaConfig(response);
|
|
4242
|
+
if (auth2.tenantId == null) {
|
|
4243
|
+
auth2._agentRecaptchaConfig = config;
|
|
4244
|
+
} else {
|
|
4245
|
+
auth2._tenantRecaptchaConfigs[auth2.tenantId] = config;
|
|
4246
|
+
}
|
|
4247
|
+
return resolve(config.siteKey);
|
|
4248
|
+
}
|
|
4249
|
+
}).catch((error) => {
|
|
4250
|
+
reject(error);
|
|
4251
|
+
});
|
|
4252
|
+
});
|
|
4253
|
+
}
|
|
4254
|
+
function retrieveRecaptchaToken(siteKey, resolve, reject) {
|
|
4255
|
+
const grecaptcha = window.grecaptcha;
|
|
4256
|
+
if (isEnterprise(grecaptcha)) {
|
|
4257
|
+
grecaptcha.enterprise.ready(() => {
|
|
4258
|
+
grecaptcha.enterprise.execute(siteKey, { action }).then((token) => {
|
|
4259
|
+
resolve(token);
|
|
4260
|
+
}).catch(() => {
|
|
4261
|
+
resolve(FAKE_TOKEN);
|
|
4262
|
+
});
|
|
4263
|
+
});
|
|
4264
|
+
} else {
|
|
4265
|
+
reject(Error("No reCAPTCHA enterprise script loaded."));
|
|
4266
|
+
}
|
|
4267
|
+
}
|
|
4268
|
+
return new Promise((resolve, reject) => {
|
|
4269
|
+
retrieveSiteKey(this.auth).then((siteKey) => {
|
|
4270
|
+
if (!forceRefresh && isEnterprise(window.grecaptcha)) {
|
|
4271
|
+
retrieveRecaptchaToken(siteKey, resolve, reject);
|
|
4272
|
+
} else {
|
|
4273
|
+
if (typeof window === "undefined") {
|
|
4274
|
+
reject(new Error("RecaptchaVerifier is only supported in browser"));
|
|
4275
|
+
return;
|
|
4276
|
+
}
|
|
4277
|
+
_loadJS(RECAPTCHA_ENTERPRISE_URL + siteKey).then(() => {
|
|
4278
|
+
retrieveRecaptchaToken(siteKey, resolve, reject);
|
|
4279
|
+
}).catch((error) => {
|
|
4280
|
+
reject(error);
|
|
4281
|
+
});
|
|
4282
|
+
}
|
|
4283
|
+
}).catch((error) => {
|
|
4284
|
+
reject(error);
|
|
4285
|
+
});
|
|
4286
|
+
});
|
|
4287
|
+
}
|
|
4288
|
+
};
|
|
4289
|
+
async function injectRecaptchaFields(auth2, request, action, captchaResp = false) {
|
|
4290
|
+
const verifier = new RecaptchaEnterpriseVerifier(auth2);
|
|
4291
|
+
let captchaResponse;
|
|
4292
|
+
try {
|
|
4293
|
+
captchaResponse = await verifier.verify(action);
|
|
4294
|
+
} catch (error) {
|
|
4295
|
+
captchaResponse = await verifier.verify(action, true);
|
|
4296
|
+
}
|
|
4297
|
+
const newRequest = Object.assign({}, request);
|
|
4298
|
+
if (!captchaResp) {
|
|
4299
|
+
Object.assign(newRequest, { captchaResponse });
|
|
4300
|
+
} else {
|
|
4301
|
+
Object.assign(newRequest, { "captchaResp": captchaResponse });
|
|
4302
|
+
}
|
|
4303
|
+
Object.assign(newRequest, {
|
|
4304
|
+
"clientType": "CLIENT_TYPE_WEB"
|
|
4305
|
+
/* RecaptchaClientType.WEB */
|
|
4306
|
+
});
|
|
4307
|
+
Object.assign(newRequest, {
|
|
4308
|
+
"recaptchaVersion": "RECAPTCHA_ENTERPRISE"
|
|
4309
|
+
/* RecaptchaVersion.ENTERPRISE */
|
|
4310
|
+
});
|
|
4311
|
+
return newRequest;
|
|
4312
|
+
}
|
|
4313
|
+
function initializeAuth(app2, deps) {
|
|
4314
|
+
const provider = _getProvider(app2, "auth");
|
|
4315
|
+
if (provider.isInitialized()) {
|
|
4316
|
+
const auth3 = provider.getImmediate();
|
|
4317
|
+
const initialOptions = provider.getOptions();
|
|
4318
|
+
if (deepEqual(initialOptions, deps !== null && deps !== void 0 ? deps : {})) {
|
|
4319
|
+
return auth3;
|
|
4320
|
+
} else {
|
|
4321
|
+
_fail(
|
|
4322
|
+
auth3,
|
|
4323
|
+
"already-initialized"
|
|
4324
|
+
/* AuthErrorCode.ALREADY_INITIALIZED */
|
|
4325
|
+
);
|
|
4326
|
+
}
|
|
4327
|
+
}
|
|
4328
|
+
const auth2 = provider.initialize({ options: deps });
|
|
4329
|
+
return auth2;
|
|
4330
|
+
}
|
|
4331
|
+
function _initializeAuthInstance(auth2, deps) {
|
|
4332
|
+
const persistence = (deps === null || deps === void 0 ? void 0 : deps.persistence) || [];
|
|
4333
|
+
const hierarchy = (Array.isArray(persistence) ? persistence : [persistence]).map(_getInstance);
|
|
4334
|
+
if (deps === null || deps === void 0 ? void 0 : deps.errorMap) {
|
|
4335
|
+
auth2._updateErrorMap(deps.errorMap);
|
|
4336
|
+
}
|
|
4337
|
+
auth2._initializeWithPersistence(hierarchy, deps === null || deps === void 0 ? void 0 : deps.popupRedirectResolver);
|
|
4338
|
+
}
|
|
3546
4339
|
function connectAuthEmulator(auth2, url, options) {
|
|
3547
4340
|
const authInternal = _castAuth(auth2);
|
|
3548
4341
|
_assert(
|
|
@@ -3671,7 +4464,7 @@
|
|
|
3671
4464
|
async function signInWithEmailLinkForLinking(auth2, request) {
|
|
3672
4465
|
return _performSignInRequest(auth2, "POST", "/v1/accounts:signInWithEmailLink", _addTidIfNecessary(auth2, request));
|
|
3673
4466
|
}
|
|
3674
|
-
var EmailAuthCredential = class extends AuthCredential {
|
|
4467
|
+
var EmailAuthCredential = class _EmailAuthCredential extends AuthCredential {
|
|
3675
4468
|
/** @internal */
|
|
3676
4469
|
constructor(_email, _password, signInMethod, _tenantId = null) {
|
|
3677
4470
|
super("password", signInMethod);
|
|
@@ -3681,7 +4474,7 @@
|
|
|
3681
4474
|
}
|
|
3682
4475
|
/** @internal */
|
|
3683
4476
|
static _fromEmailAndPassword(email, password) {
|
|
3684
|
-
return new
|
|
4477
|
+
return new _EmailAuthCredential(
|
|
3685
4478
|
email,
|
|
3686
4479
|
password,
|
|
3687
4480
|
"password"
|
|
@@ -3690,7 +4483,7 @@
|
|
|
3690
4483
|
}
|
|
3691
4484
|
/** @internal */
|
|
3692
4485
|
static _fromEmailAndCode(email, oobCode, tenantId = null) {
|
|
3693
|
-
return new
|
|
4486
|
+
return new _EmailAuthCredential(email, oobCode, "emailLink", tenantId);
|
|
3694
4487
|
}
|
|
3695
4488
|
/** {@inheritdoc AuthCredential.toJSON} */
|
|
3696
4489
|
toJSON() {
|
|
@@ -3722,13 +4515,40 @@
|
|
|
3722
4515
|
}
|
|
3723
4516
|
/** @internal */
|
|
3724
4517
|
async _getIdTokenResponse(auth2) {
|
|
4518
|
+
var _a;
|
|
3725
4519
|
switch (this.signInMethod) {
|
|
3726
4520
|
case "password":
|
|
3727
|
-
|
|
4521
|
+
const request = {
|
|
3728
4522
|
returnSecureToken: true,
|
|
3729
4523
|
email: this._email,
|
|
3730
|
-
password: this._password
|
|
3731
|
-
|
|
4524
|
+
password: this._password,
|
|
4525
|
+
clientType: "CLIENT_TYPE_WEB"
|
|
4526
|
+
/* RecaptchaClientType.WEB */
|
|
4527
|
+
};
|
|
4528
|
+
if ((_a = auth2._getRecaptchaConfig()) === null || _a === void 0 ? void 0 : _a.emailPasswordEnabled) {
|
|
4529
|
+
const requestWithRecaptcha = await injectRecaptchaFields(
|
|
4530
|
+
auth2,
|
|
4531
|
+
request,
|
|
4532
|
+
"signInWithPassword"
|
|
4533
|
+
/* RecaptchaActionName.SIGN_IN_WITH_PASSWORD */
|
|
4534
|
+
);
|
|
4535
|
+
return signInWithPassword(auth2, requestWithRecaptcha);
|
|
4536
|
+
} else {
|
|
4537
|
+
return signInWithPassword(auth2, request).catch(async (error) => {
|
|
4538
|
+
if (error.code === `auth/${"missing-recaptcha-token"}`) {
|
|
4539
|
+
console.log("Sign-in with email address and password is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-in flow.");
|
|
4540
|
+
const requestWithRecaptcha = await injectRecaptchaFields(
|
|
4541
|
+
auth2,
|
|
4542
|
+
request,
|
|
4543
|
+
"signInWithPassword"
|
|
4544
|
+
/* RecaptchaActionName.SIGN_IN_WITH_PASSWORD */
|
|
4545
|
+
);
|
|
4546
|
+
return signInWithPassword(auth2, requestWithRecaptcha);
|
|
4547
|
+
} else {
|
|
4548
|
+
return Promise.reject(error);
|
|
4549
|
+
}
|
|
4550
|
+
});
|
|
4551
|
+
}
|
|
3732
4552
|
case "emailLink":
|
|
3733
4553
|
return signInWithEmailLink$1(auth2, {
|
|
3734
4554
|
email: this._email,
|
|
@@ -3775,14 +4595,14 @@
|
|
|
3775
4595
|
return _performSignInRequest(auth2, "POST", "/v1/accounts:signInWithIdp", _addTidIfNecessary(auth2, request));
|
|
3776
4596
|
}
|
|
3777
4597
|
var IDP_REQUEST_URI$1 = "http://localhost";
|
|
3778
|
-
var OAuthCredential = class extends AuthCredential {
|
|
4598
|
+
var OAuthCredential = class _OAuthCredential extends AuthCredential {
|
|
3779
4599
|
constructor() {
|
|
3780
4600
|
super(...arguments);
|
|
3781
4601
|
this.pendingToken = null;
|
|
3782
4602
|
}
|
|
3783
4603
|
/** @internal */
|
|
3784
4604
|
static _fromParams(params) {
|
|
3785
|
-
const cred = new
|
|
4605
|
+
const cred = new _OAuthCredential(params.providerId, params.signInMethod);
|
|
3786
4606
|
if (params.idToken || params.accessToken) {
|
|
3787
4607
|
if (params.idToken) {
|
|
3788
4608
|
cred.idToken = params.idToken;
|
|
@@ -3834,7 +4654,7 @@
|
|
|
3834
4654
|
if (!providerId || !signInMethod) {
|
|
3835
4655
|
return null;
|
|
3836
4656
|
}
|
|
3837
|
-
const cred = new
|
|
4657
|
+
const cred = new _OAuthCredential(providerId, signInMethod);
|
|
3838
4658
|
cred.idToken = rest.idToken || void 0;
|
|
3839
4659
|
cred.accessToken = rest.accessToken || void 0;
|
|
3840
4660
|
cred.secret = rest.secret;
|
|
@@ -3910,7 +4730,7 @@
|
|
|
3910
4730
|
const apiRequest = Object.assign(Object.assign({}, request), { operation: "REAUTH" });
|
|
3911
4731
|
return _performSignInRequest(auth2, "POST", "/v1/accounts:signInWithPhoneNumber", _addTidIfNecessary(auth2, apiRequest), VERIFY_PHONE_NUMBER_FOR_EXISTING_ERROR_MAP_);
|
|
3912
4732
|
}
|
|
3913
|
-
var PhoneAuthCredential = class extends AuthCredential {
|
|
4733
|
+
var PhoneAuthCredential = class _PhoneAuthCredential extends AuthCredential {
|
|
3914
4734
|
constructor(params) {
|
|
3915
4735
|
super(
|
|
3916
4736
|
"phone",
|
|
@@ -3921,11 +4741,11 @@
|
|
|
3921
4741
|
}
|
|
3922
4742
|
/** @internal */
|
|
3923
4743
|
static _fromVerification(verificationId, verificationCode) {
|
|
3924
|
-
return new
|
|
4744
|
+
return new _PhoneAuthCredential({ verificationId, verificationCode });
|
|
3925
4745
|
}
|
|
3926
4746
|
/** @internal */
|
|
3927
4747
|
static _fromTokenResponse(phoneNumber, temporaryProof) {
|
|
3928
|
-
return new
|
|
4748
|
+
return new _PhoneAuthCredential({ phoneNumber, temporaryProof });
|
|
3929
4749
|
}
|
|
3930
4750
|
/** @internal */
|
|
3931
4751
|
_getIdTokenResponse(auth2) {
|
|
@@ -3978,7 +4798,7 @@
|
|
|
3978
4798
|
if (!verificationCode && !verificationId && !phoneNumber && !temporaryProof) {
|
|
3979
4799
|
return null;
|
|
3980
4800
|
}
|
|
3981
|
-
return new
|
|
4801
|
+
return new _PhoneAuthCredential({
|
|
3982
4802
|
verificationId,
|
|
3983
4803
|
verificationCode,
|
|
3984
4804
|
phoneNumber,
|
|
@@ -4011,7 +4831,7 @@
|
|
|
4011
4831
|
const iOSDoubleDeepLink = iOSDeepLink ? querystringDecode(extractQuerystring(iOSDeepLink))["link"] : null;
|
|
4012
4832
|
return iOSDoubleDeepLink || iOSDeepLink || doubleDeepLink || link || url;
|
|
4013
4833
|
}
|
|
4014
|
-
var ActionCodeURL = class {
|
|
4834
|
+
var ActionCodeURL = class _ActionCodeURL {
|
|
4015
4835
|
/**
|
|
4016
4836
|
* @param actionLink - The link from which to extract the URL.
|
|
4017
4837
|
* @returns The {@link ActionCodeURL} object, or null if the link is invalid.
|
|
@@ -4066,15 +4886,15 @@
|
|
|
4066
4886
|
static parseLink(link) {
|
|
4067
4887
|
const actionLink = parseDeepLink(link);
|
|
4068
4888
|
try {
|
|
4069
|
-
return new
|
|
4889
|
+
return new _ActionCodeURL(actionLink);
|
|
4070
4890
|
} catch (_a) {
|
|
4071
4891
|
return null;
|
|
4072
4892
|
}
|
|
4073
4893
|
}
|
|
4074
4894
|
};
|
|
4075
|
-
var EmailAuthProvider = class {
|
|
4895
|
+
var EmailAuthProvider = class _EmailAuthProvider {
|
|
4076
4896
|
constructor() {
|
|
4077
|
-
this.providerId =
|
|
4897
|
+
this.providerId = _EmailAuthProvider.PROVIDER_ID;
|
|
4078
4898
|
}
|
|
4079
4899
|
/**
|
|
4080
4900
|
* Initialize an {@link AuthCredential} using an email and password.
|
|
@@ -4195,7 +5015,7 @@
|
|
|
4195
5015
|
return [...this.scopes];
|
|
4196
5016
|
}
|
|
4197
5017
|
};
|
|
4198
|
-
var FacebookAuthProvider = class extends BaseOAuthProvider {
|
|
5018
|
+
var FacebookAuthProvider = class _FacebookAuthProvider extends BaseOAuthProvider {
|
|
4199
5019
|
constructor() {
|
|
4200
5020
|
super(
|
|
4201
5021
|
"facebook.com"
|
|
@@ -4216,8 +5036,8 @@
|
|
|
4216
5036
|
*/
|
|
4217
5037
|
static credential(accessToken) {
|
|
4218
5038
|
return OAuthCredential._fromParams({
|
|
4219
|
-
providerId:
|
|
4220
|
-
signInMethod:
|
|
5039
|
+
providerId: _FacebookAuthProvider.PROVIDER_ID,
|
|
5040
|
+
signInMethod: _FacebookAuthProvider.FACEBOOK_SIGN_IN_METHOD,
|
|
4221
5041
|
accessToken
|
|
4222
5042
|
});
|
|
4223
5043
|
}
|
|
@@ -4227,7 +5047,7 @@
|
|
|
4227
5047
|
* @param userCredential - The user credential.
|
|
4228
5048
|
*/
|
|
4229
5049
|
static credentialFromResult(userCredential) {
|
|
4230
|
-
return
|
|
5050
|
+
return _FacebookAuthProvider.credentialFromTaggedObject(userCredential);
|
|
4231
5051
|
}
|
|
4232
5052
|
/**
|
|
4233
5053
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -4236,7 +5056,7 @@
|
|
|
4236
5056
|
* @param userCredential - The user credential.
|
|
4237
5057
|
*/
|
|
4238
5058
|
static credentialFromError(error) {
|
|
4239
|
-
return
|
|
5059
|
+
return _FacebookAuthProvider.credentialFromTaggedObject(error.customData || {});
|
|
4240
5060
|
}
|
|
4241
5061
|
static credentialFromTaggedObject({ _tokenResponse: tokenResponse }) {
|
|
4242
5062
|
if (!tokenResponse || !("oauthAccessToken" in tokenResponse)) {
|
|
@@ -4246,7 +5066,7 @@
|
|
|
4246
5066
|
return null;
|
|
4247
5067
|
}
|
|
4248
5068
|
try {
|
|
4249
|
-
return
|
|
5069
|
+
return _FacebookAuthProvider.credential(tokenResponse.oauthAccessToken);
|
|
4250
5070
|
} catch (_a) {
|
|
4251
5071
|
return null;
|
|
4252
5072
|
}
|
|
@@ -4254,7 +5074,7 @@
|
|
|
4254
5074
|
};
|
|
4255
5075
|
FacebookAuthProvider.FACEBOOK_SIGN_IN_METHOD = "facebook.com";
|
|
4256
5076
|
FacebookAuthProvider.PROVIDER_ID = "facebook.com";
|
|
4257
|
-
var GoogleAuthProvider = class extends BaseOAuthProvider {
|
|
5077
|
+
var GoogleAuthProvider = class _GoogleAuthProvider extends BaseOAuthProvider {
|
|
4258
5078
|
constructor() {
|
|
4259
5079
|
super(
|
|
4260
5080
|
"google.com"
|
|
@@ -4277,8 +5097,8 @@
|
|
|
4277
5097
|
*/
|
|
4278
5098
|
static credential(idToken, accessToken) {
|
|
4279
5099
|
return OAuthCredential._fromParams({
|
|
4280
|
-
providerId:
|
|
4281
|
-
signInMethod:
|
|
5100
|
+
providerId: _GoogleAuthProvider.PROVIDER_ID,
|
|
5101
|
+
signInMethod: _GoogleAuthProvider.GOOGLE_SIGN_IN_METHOD,
|
|
4282
5102
|
idToken,
|
|
4283
5103
|
accessToken
|
|
4284
5104
|
});
|
|
@@ -4289,7 +5109,7 @@
|
|
|
4289
5109
|
* @param userCredential - The user credential.
|
|
4290
5110
|
*/
|
|
4291
5111
|
static credentialFromResult(userCredential) {
|
|
4292
|
-
return
|
|
5112
|
+
return _GoogleAuthProvider.credentialFromTaggedObject(userCredential);
|
|
4293
5113
|
}
|
|
4294
5114
|
/**
|
|
4295
5115
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -4298,7 +5118,7 @@
|
|
|
4298
5118
|
* @param userCredential - The user credential.
|
|
4299
5119
|
*/
|
|
4300
5120
|
static credentialFromError(error) {
|
|
4301
|
-
return
|
|
5121
|
+
return _GoogleAuthProvider.credentialFromTaggedObject(error.customData || {});
|
|
4302
5122
|
}
|
|
4303
5123
|
static credentialFromTaggedObject({ _tokenResponse: tokenResponse }) {
|
|
4304
5124
|
if (!tokenResponse) {
|
|
@@ -4309,7 +5129,7 @@
|
|
|
4309
5129
|
return null;
|
|
4310
5130
|
}
|
|
4311
5131
|
try {
|
|
4312
|
-
return
|
|
5132
|
+
return _GoogleAuthProvider.credential(oauthIdToken, oauthAccessToken);
|
|
4313
5133
|
} catch (_a) {
|
|
4314
5134
|
return null;
|
|
4315
5135
|
}
|
|
@@ -4317,7 +5137,7 @@
|
|
|
4317
5137
|
};
|
|
4318
5138
|
GoogleAuthProvider.GOOGLE_SIGN_IN_METHOD = "google.com";
|
|
4319
5139
|
GoogleAuthProvider.PROVIDER_ID = "google.com";
|
|
4320
|
-
var GithubAuthProvider = class extends BaseOAuthProvider {
|
|
5140
|
+
var GithubAuthProvider = class _GithubAuthProvider extends BaseOAuthProvider {
|
|
4321
5141
|
constructor() {
|
|
4322
5142
|
super(
|
|
4323
5143
|
"github.com"
|
|
@@ -4331,8 +5151,8 @@
|
|
|
4331
5151
|
*/
|
|
4332
5152
|
static credential(accessToken) {
|
|
4333
5153
|
return OAuthCredential._fromParams({
|
|
4334
|
-
providerId:
|
|
4335
|
-
signInMethod:
|
|
5154
|
+
providerId: _GithubAuthProvider.PROVIDER_ID,
|
|
5155
|
+
signInMethod: _GithubAuthProvider.GITHUB_SIGN_IN_METHOD,
|
|
4336
5156
|
accessToken
|
|
4337
5157
|
});
|
|
4338
5158
|
}
|
|
@@ -4342,7 +5162,7 @@
|
|
|
4342
5162
|
* @param userCredential - The user credential.
|
|
4343
5163
|
*/
|
|
4344
5164
|
static credentialFromResult(userCredential) {
|
|
4345
|
-
return
|
|
5165
|
+
return _GithubAuthProvider.credentialFromTaggedObject(userCredential);
|
|
4346
5166
|
}
|
|
4347
5167
|
/**
|
|
4348
5168
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -4351,7 +5171,7 @@
|
|
|
4351
5171
|
* @param userCredential - The user credential.
|
|
4352
5172
|
*/
|
|
4353
5173
|
static credentialFromError(error) {
|
|
4354
|
-
return
|
|
5174
|
+
return _GithubAuthProvider.credentialFromTaggedObject(error.customData || {});
|
|
4355
5175
|
}
|
|
4356
5176
|
static credentialFromTaggedObject({ _tokenResponse: tokenResponse }) {
|
|
4357
5177
|
if (!tokenResponse || !("oauthAccessToken" in tokenResponse)) {
|
|
@@ -4361,7 +5181,7 @@
|
|
|
4361
5181
|
return null;
|
|
4362
5182
|
}
|
|
4363
5183
|
try {
|
|
4364
|
-
return
|
|
5184
|
+
return _GithubAuthProvider.credential(tokenResponse.oauthAccessToken);
|
|
4365
5185
|
} catch (_a) {
|
|
4366
5186
|
return null;
|
|
4367
5187
|
}
|
|
@@ -4369,7 +5189,7 @@
|
|
|
4369
5189
|
};
|
|
4370
5190
|
GithubAuthProvider.GITHUB_SIGN_IN_METHOD = "github.com";
|
|
4371
5191
|
GithubAuthProvider.PROVIDER_ID = "github.com";
|
|
4372
|
-
var TwitterAuthProvider = class extends BaseOAuthProvider {
|
|
5192
|
+
var TwitterAuthProvider = class _TwitterAuthProvider extends BaseOAuthProvider {
|
|
4373
5193
|
constructor() {
|
|
4374
5194
|
super(
|
|
4375
5195
|
"twitter.com"
|
|
@@ -4384,8 +5204,8 @@
|
|
|
4384
5204
|
*/
|
|
4385
5205
|
static credential(token, secret) {
|
|
4386
5206
|
return OAuthCredential._fromParams({
|
|
4387
|
-
providerId:
|
|
4388
|
-
signInMethod:
|
|
5207
|
+
providerId: _TwitterAuthProvider.PROVIDER_ID,
|
|
5208
|
+
signInMethod: _TwitterAuthProvider.TWITTER_SIGN_IN_METHOD,
|
|
4389
5209
|
oauthToken: token,
|
|
4390
5210
|
oauthTokenSecret: secret
|
|
4391
5211
|
});
|
|
@@ -4396,7 +5216,7 @@
|
|
|
4396
5216
|
* @param userCredential - The user credential.
|
|
4397
5217
|
*/
|
|
4398
5218
|
static credentialFromResult(userCredential) {
|
|
4399
|
-
return
|
|
5219
|
+
return _TwitterAuthProvider.credentialFromTaggedObject(userCredential);
|
|
4400
5220
|
}
|
|
4401
5221
|
/**
|
|
4402
5222
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -4405,7 +5225,7 @@
|
|
|
4405
5225
|
* @param userCredential - The user credential.
|
|
4406
5226
|
*/
|
|
4407
5227
|
static credentialFromError(error) {
|
|
4408
|
-
return
|
|
5228
|
+
return _TwitterAuthProvider.credentialFromTaggedObject(error.customData || {});
|
|
4409
5229
|
}
|
|
4410
5230
|
static credentialFromTaggedObject({ _tokenResponse: tokenResponse }) {
|
|
4411
5231
|
if (!tokenResponse) {
|
|
@@ -4416,7 +5236,7 @@
|
|
|
4416
5236
|
return null;
|
|
4417
5237
|
}
|
|
4418
5238
|
try {
|
|
4419
|
-
return
|
|
5239
|
+
return _TwitterAuthProvider.credential(oauthAccessToken, oauthTokenSecret);
|
|
4420
5240
|
} catch (_a) {
|
|
4421
5241
|
return null;
|
|
4422
5242
|
}
|
|
@@ -4424,7 +5244,7 @@
|
|
|
4424
5244
|
};
|
|
4425
5245
|
TwitterAuthProvider.TWITTER_SIGN_IN_METHOD = "twitter.com";
|
|
4426
5246
|
TwitterAuthProvider.PROVIDER_ID = "twitter.com";
|
|
4427
|
-
var UserCredentialImpl = class {
|
|
5247
|
+
var UserCredentialImpl = class _UserCredentialImpl {
|
|
4428
5248
|
constructor(params) {
|
|
4429
5249
|
this.user = params.user;
|
|
4430
5250
|
this.providerId = params.providerId;
|
|
@@ -4434,7 +5254,7 @@
|
|
|
4434
5254
|
static async _fromIdTokenResponse(auth2, operationType, idTokenResponse, isAnonymous = false) {
|
|
4435
5255
|
const user = await UserImpl._fromIdTokenResponse(auth2, idTokenResponse, isAnonymous);
|
|
4436
5256
|
const providerId = providerIdForResponse(idTokenResponse);
|
|
4437
|
-
const userCred = new
|
|
5257
|
+
const userCred = new _UserCredentialImpl({
|
|
4438
5258
|
user,
|
|
4439
5259
|
providerId,
|
|
4440
5260
|
_tokenResponse: idTokenResponse,
|
|
@@ -4449,7 +5269,7 @@
|
|
|
4449
5269
|
true
|
|
4450
5270
|
);
|
|
4451
5271
|
const providerId = providerIdForResponse(response);
|
|
4452
|
-
return new
|
|
5272
|
+
return new _UserCredentialImpl({
|
|
4453
5273
|
user,
|
|
4454
5274
|
providerId,
|
|
4455
5275
|
_tokenResponse: response,
|
|
@@ -4466,13 +5286,13 @@
|
|
|
4466
5286
|
}
|
|
4467
5287
|
return null;
|
|
4468
5288
|
}
|
|
4469
|
-
var MultiFactorError = class extends FirebaseError {
|
|
5289
|
+
var MultiFactorError = class _MultiFactorError extends FirebaseError {
|
|
4470
5290
|
constructor(auth2, error, operationType, user) {
|
|
4471
5291
|
var _a;
|
|
4472
5292
|
super(error.code, error.message);
|
|
4473
5293
|
this.operationType = operationType;
|
|
4474
5294
|
this.user = user;
|
|
4475
|
-
Object.setPrototypeOf(this,
|
|
5295
|
+
Object.setPrototypeOf(this, _MultiFactorError.prototype);
|
|
4476
5296
|
this.customData = {
|
|
4477
5297
|
appName: auth2.name,
|
|
4478
5298
|
tenantId: (_a = auth2.tenantId) !== null && _a !== void 0 ? _a : void 0,
|
|
@@ -4481,7 +5301,7 @@
|
|
|
4481
5301
|
};
|
|
4482
5302
|
}
|
|
4483
5303
|
static _fromErrorAndOperation(auth2, error, operationType, user) {
|
|
4484
|
-
return new
|
|
5304
|
+
return new _MultiFactorError(auth2, error, operationType, user);
|
|
4485
5305
|
}
|
|
4486
5306
|
};
|
|
4487
5307
|
function _processCredentialSavingMfaContextIfNecessary(auth2, operationType, credential, user) {
|
|
@@ -4555,6 +5375,12 @@
|
|
|
4555
5375
|
function finalizeEnrollPhoneMfa(auth2, request) {
|
|
4556
5376
|
return _performApiRequest(auth2, "POST", "/v2/accounts/mfaEnrollment:finalize", _addTidIfNecessary(auth2, request));
|
|
4557
5377
|
}
|
|
5378
|
+
function startEnrollTotpMfa(auth2, request) {
|
|
5379
|
+
return _performApiRequest(auth2, "POST", "/v2/accounts/mfaEnrollment:start", _addTidIfNecessary(auth2, request));
|
|
5380
|
+
}
|
|
5381
|
+
function finalizeEnrollTotpMfa(auth2, request) {
|
|
5382
|
+
return _performApiRequest(auth2, "POST", "/v2/accounts/mfaEnrollment:finalize", _addTidIfNecessary(auth2, request));
|
|
5383
|
+
}
|
|
4558
5384
|
var STORAGE_AVAILABLE_KEY = "__sak";
|
|
4559
5385
|
var BrowserPersistenceClass = class {
|
|
4560
5386
|
constructor(storageRetriever, type) {
|
|
@@ -4771,7 +5597,7 @@
|
|
|
4771
5597
|
}
|
|
4772
5598
|
}));
|
|
4773
5599
|
}
|
|
4774
|
-
var Receiver = class {
|
|
5600
|
+
var Receiver = class _Receiver {
|
|
4775
5601
|
constructor(eventTarget) {
|
|
4776
5602
|
this.eventTarget = eventTarget;
|
|
4777
5603
|
this.handlersMap = {};
|
|
@@ -4788,7 +5614,7 @@
|
|
|
4788
5614
|
if (existingInstance) {
|
|
4789
5615
|
return existingInstance;
|
|
4790
5616
|
}
|
|
4791
|
-
const newInstance = new
|
|
5617
|
+
const newInstance = new _Receiver(eventTarget);
|
|
4792
5618
|
this.receivers.push(newInstance);
|
|
4793
5619
|
return newInstance;
|
|
4794
5620
|
}
|
|
@@ -5301,30 +6127,8 @@
|
|
|
5301
6127
|
function finalizeSignInPhoneMfa(auth2, request) {
|
|
5302
6128
|
return _performApiRequest(auth2, "POST", "/v2/accounts/mfaSignIn:finalize", _addTidIfNecessary(auth2, request));
|
|
5303
6129
|
}
|
|
5304
|
-
function
|
|
5305
|
-
|
|
5306
|
-
return (_b = (_a = document.getElementsByTagName("head")) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : document;
|
|
5307
|
-
}
|
|
5308
|
-
function _loadJS(url) {
|
|
5309
|
-
return new Promise((resolve, reject) => {
|
|
5310
|
-
const el = document.createElement("script");
|
|
5311
|
-
el.setAttribute("src", url);
|
|
5312
|
-
el.onload = resolve;
|
|
5313
|
-
el.onerror = (e2) => {
|
|
5314
|
-
const error = _createError(
|
|
5315
|
-
"internal-error"
|
|
5316
|
-
/* AuthErrorCode.INTERNAL_ERROR */
|
|
5317
|
-
);
|
|
5318
|
-
error.customData = e2;
|
|
5319
|
-
reject(error);
|
|
5320
|
-
};
|
|
5321
|
-
el.type = "text/javascript";
|
|
5322
|
-
el.charset = "UTF-8";
|
|
5323
|
-
getScriptParentElement().appendChild(el);
|
|
5324
|
-
});
|
|
5325
|
-
}
|
|
5326
|
-
function _generateCallbackName(prefix) {
|
|
5327
|
-
return `__${prefix}${Math.floor(Math.random() * 1e6)}`;
|
|
6130
|
+
function finalizeSignInTotpMfa(auth2, request) {
|
|
6131
|
+
return _performApiRequest(auth2, "POST", "/v2/accounts/mfaSignIn:finalize", _addTidIfNecessary(auth2, request));
|
|
5328
6132
|
}
|
|
5329
6133
|
var _JSLOAD_CALLBACK = _generateCallbackName("rcb");
|
|
5330
6134
|
var NETWORK_TIMEOUT_DELAY = new Delay(3e4, 6e4);
|
|
@@ -5404,13 +6208,13 @@
|
|
|
5404
6208
|
verifier._reset();
|
|
5405
6209
|
}
|
|
5406
6210
|
}
|
|
5407
|
-
var PhoneAuthProvider = class {
|
|
6211
|
+
var PhoneAuthProvider = class _PhoneAuthProvider {
|
|
5408
6212
|
/**
|
|
5409
6213
|
* @param auth - The Firebase {@link Auth} instance in which sign-ins should occur.
|
|
5410
6214
|
*
|
|
5411
6215
|
*/
|
|
5412
6216
|
constructor(auth2) {
|
|
5413
|
-
this.providerId =
|
|
6217
|
+
this.providerId = _PhoneAuthProvider.PROVIDER_ID;
|
|
5414
6218
|
this.auth = _castAuth(auth2);
|
|
5415
6219
|
}
|
|
5416
6220
|
/**
|
|
@@ -5483,7 +6287,7 @@
|
|
|
5483
6287
|
*/
|
|
5484
6288
|
static credentialFromResult(userCredential) {
|
|
5485
6289
|
const credential = userCredential;
|
|
5486
|
-
return
|
|
6290
|
+
return _PhoneAuthProvider.credentialFromTaggedObject(credential);
|
|
5487
6291
|
}
|
|
5488
6292
|
/**
|
|
5489
6293
|
* Returns an {@link AuthCredential} when passed an error.
|
|
@@ -5518,7 +6322,7 @@
|
|
|
5518
6322
|
* @param error - The error to generate a credential from.
|
|
5519
6323
|
*/
|
|
5520
6324
|
static credentialFromError(error) {
|
|
5521
|
-
return
|
|
6325
|
+
return _PhoneAuthProvider.credentialFromTaggedObject(error.customData || {});
|
|
5522
6326
|
}
|
|
5523
6327
|
static credentialFromTaggedObject({ _tokenResponse: tokenResponse }) {
|
|
5524
6328
|
if (!tokenResponse) {
|
|
@@ -5693,16 +6497,16 @@
|
|
|
5693
6497
|
const action = new PopupOperation(authInternal, "signInViaPopup", provider, resolverInternal);
|
|
5694
6498
|
return action.executeNotNull();
|
|
5695
6499
|
}
|
|
5696
|
-
var PopupOperation = class extends AbstractPopupRedirectOperation {
|
|
6500
|
+
var PopupOperation = class _PopupOperation extends AbstractPopupRedirectOperation {
|
|
5697
6501
|
constructor(auth2, filter, provider, resolver, user) {
|
|
5698
6502
|
super(auth2, filter, resolver, user);
|
|
5699
6503
|
this.provider = provider;
|
|
5700
6504
|
this.authWindow = null;
|
|
5701
6505
|
this.pollId = null;
|
|
5702
|
-
if (
|
|
5703
|
-
|
|
6506
|
+
if (_PopupOperation.currentPopupAction) {
|
|
6507
|
+
_PopupOperation.currentPopupAction.cancel();
|
|
5704
6508
|
}
|
|
5705
|
-
|
|
6509
|
+
_PopupOperation.currentPopupAction = this;
|
|
5706
6510
|
}
|
|
5707
6511
|
async executeNotNull() {
|
|
5708
6512
|
const result = await this.execute();
|
|
@@ -5759,7 +6563,7 @@
|
|
|
5759
6563
|
}
|
|
5760
6564
|
this.authWindow = null;
|
|
5761
6565
|
this.pollId = null;
|
|
5762
|
-
|
|
6566
|
+
_PopupOperation.currentPopupAction = null;
|
|
5763
6567
|
}
|
|
5764
6568
|
pollUserCancellation() {
|
|
5765
6569
|
const poll = () => {
|
|
@@ -5774,7 +6578,7 @@
|
|
|
5774
6578
|
/* AuthErrorCode.POPUP_CLOSED_BY_USER */
|
|
5775
6579
|
));
|
|
5776
6580
|
},
|
|
5777
|
-
|
|
6581
|
+
8e3
|
|
5778
6582
|
/* _Timeout.AUTH_EVENT */
|
|
5779
6583
|
);
|
|
5780
6584
|
return;
|
|
@@ -6216,7 +7020,8 @@
|
|
|
6216
7020
|
}
|
|
6217
7021
|
var WIDGET_PATH = "__/auth/handler";
|
|
6218
7022
|
var EMULATOR_WIDGET_PATH = "emulator/auth/handler";
|
|
6219
|
-
|
|
7023
|
+
var FIREBASE_APP_CHECK_FRAGMENT_ID = encodeURIComponent("fac");
|
|
7024
|
+
async function _getRedirectUrl(auth2, provider, authType, redirectUrl, eventId, additionalParams) {
|
|
6220
7025
|
_assert(
|
|
6221
7026
|
auth2.config.authDomain,
|
|
6222
7027
|
auth2,
|
|
@@ -6262,7 +7067,9 @@
|
|
|
6262
7067
|
delete paramsDict[key];
|
|
6263
7068
|
}
|
|
6264
7069
|
}
|
|
6265
|
-
|
|
7070
|
+
const appCheckToken = await auth2._getAppCheckToken();
|
|
7071
|
+
const appCheckTokenFragment = appCheckToken ? `#${FIREBASE_APP_CHECK_FRAGMENT_ID}=${encodeURIComponent(appCheckToken)}` : "";
|
|
7072
|
+
return `${getHandlerBase(auth2)}?${querystring(paramsDict).slice(1)}${appCheckTokenFragment}`;
|
|
6266
7073
|
}
|
|
6267
7074
|
function getHandlerBase({ config }) {
|
|
6268
7075
|
if (!config.emulator) {
|
|
@@ -6285,12 +7092,13 @@
|
|
|
6285
7092
|
async _openPopup(auth2, provider, authType, eventId) {
|
|
6286
7093
|
var _a;
|
|
6287
7094
|
debugAssert((_a = this.eventManagers[auth2._key()]) === null || _a === void 0 ? void 0 : _a.manager, "_initialize() not called before _openPopup()");
|
|
6288
|
-
const url = _getRedirectUrl(auth2, provider, authType, _getCurrentUrl(), eventId);
|
|
7095
|
+
const url = await _getRedirectUrl(auth2, provider, authType, _getCurrentUrl(), eventId);
|
|
6289
7096
|
return _open(auth2, url, _generateEventId());
|
|
6290
7097
|
}
|
|
6291
7098
|
async _openRedirect(auth2, provider, authType, eventId) {
|
|
6292
7099
|
await this._originValidation(auth2);
|
|
6293
|
-
|
|
7100
|
+
const url = await _getRedirectUrl(auth2, provider, authType, _getCurrentUrl(), eventId);
|
|
7101
|
+
_setWindowLocation(url);
|
|
6294
7102
|
return new Promise(() => {
|
|
6295
7103
|
});
|
|
6296
7104
|
}
|
|
@@ -6374,7 +7182,7 @@
|
|
|
6374
7182
|
}
|
|
6375
7183
|
}
|
|
6376
7184
|
};
|
|
6377
|
-
var PhoneMultiFactorAssertionImpl = class extends MultiFactorAssertionImpl {
|
|
7185
|
+
var PhoneMultiFactorAssertionImpl = class _PhoneMultiFactorAssertionImpl extends MultiFactorAssertionImpl {
|
|
6378
7186
|
constructor(credential) {
|
|
6379
7187
|
super(
|
|
6380
7188
|
"phone"
|
|
@@ -6384,7 +7192,7 @@
|
|
|
6384
7192
|
}
|
|
6385
7193
|
/** @internal */
|
|
6386
7194
|
static _fromCredential(credential) {
|
|
6387
|
-
return new
|
|
7195
|
+
return new _PhoneMultiFactorAssertionImpl(credential);
|
|
6388
7196
|
}
|
|
6389
7197
|
/** @internal */
|
|
6390
7198
|
_finalizeEnroll(auth2, idToken, displayName) {
|
|
@@ -6408,6 +7216,9 @@
|
|
|
6408
7216
|
/**
|
|
6409
7217
|
* Provides a {@link PhoneMultiFactorAssertion} to confirm ownership of the phone second factor.
|
|
6410
7218
|
*
|
|
7219
|
+
* @remarks
|
|
7220
|
+
* This method does not work in a Node.js environment.
|
|
7221
|
+
*
|
|
6411
7222
|
* @param phoneAuthCredential - A credential provided by {@link PhoneAuthProvider.credential}.
|
|
6412
7223
|
* @returns A {@link PhoneMultiFactorAssertion} which can be used with
|
|
6413
7224
|
* {@link MultiFactorResolver.resolveSignIn}
|
|
@@ -6417,568 +7228,327 @@
|
|
|
6417
7228
|
}
|
|
6418
7229
|
};
|
|
6419
7230
|
PhoneMultiFactorGenerator.FACTOR_ID = "phone";
|
|
6420
|
-
var
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
this.assertAuthConfigured();
|
|
6434
|
-
await this.auth._initializationPromise;
|
|
6435
|
-
if (!this.auth.currentUser) {
|
|
6436
|
-
return null;
|
|
6437
|
-
}
|
|
6438
|
-
const accessToken = await this.auth.currentUser.getIdToken(forceRefresh);
|
|
6439
|
-
return { accessToken };
|
|
6440
|
-
}
|
|
6441
|
-
addAuthTokenListener(listener) {
|
|
6442
|
-
this.assertAuthConfigured();
|
|
6443
|
-
if (this.internalListeners.has(listener)) {
|
|
6444
|
-
return;
|
|
6445
|
-
}
|
|
6446
|
-
const unsubscribe = this.auth.onIdTokenChanged((user) => {
|
|
6447
|
-
listener((user === null || user === void 0 ? void 0 : user.stsTokenManager.accessToken) || null);
|
|
6448
|
-
});
|
|
6449
|
-
this.internalListeners.set(listener, unsubscribe);
|
|
6450
|
-
this.updateProactiveRefresh();
|
|
6451
|
-
}
|
|
6452
|
-
removeAuthTokenListener(listener) {
|
|
6453
|
-
this.assertAuthConfigured();
|
|
6454
|
-
const unsubscribe = this.internalListeners.get(listener);
|
|
6455
|
-
if (!unsubscribe) {
|
|
6456
|
-
return;
|
|
6457
|
-
}
|
|
6458
|
-
this.internalListeners.delete(listener);
|
|
6459
|
-
unsubscribe();
|
|
6460
|
-
this.updateProactiveRefresh();
|
|
7231
|
+
var TotpMultiFactorGenerator = class {
|
|
7232
|
+
/**
|
|
7233
|
+
* Provides a {@link TotpMultiFactorAssertion} to confirm ownership of
|
|
7234
|
+
* the TOTP (time-based one-time password) second factor.
|
|
7235
|
+
* This assertion is used to complete enrollment in TOTP second factor.
|
|
7236
|
+
*
|
|
7237
|
+
* @param secret A {@link TotpSecret} containing the shared secret key and other TOTP parameters.
|
|
7238
|
+
* @param oneTimePassword One-time password from TOTP App.
|
|
7239
|
+
* @returns A {@link TotpMultiFactorAssertion} which can be used with
|
|
7240
|
+
* {@link MultiFactorUser.enroll}.
|
|
7241
|
+
*/
|
|
7242
|
+
static assertionForEnrollment(secret, oneTimePassword) {
|
|
7243
|
+
return TotpMultiFactorAssertionImpl._fromSecret(secret, oneTimePassword);
|
|
6461
7244
|
}
|
|
6462
|
-
|
|
7245
|
+
/**
|
|
7246
|
+
* Provides a {@link TotpMultiFactorAssertion} to confirm ownership of the TOTP second factor.
|
|
7247
|
+
* This assertion is used to complete signIn with TOTP as the second factor.
|
|
7248
|
+
*
|
|
7249
|
+
* @param enrollmentId identifies the enrolled TOTP second factor.
|
|
7250
|
+
* @param oneTimePassword One-time password from TOTP App.
|
|
7251
|
+
* @returns A {@link TotpMultiFactorAssertion} which can be used with
|
|
7252
|
+
* {@link MultiFactorResolver.resolveSignIn}.
|
|
7253
|
+
*/
|
|
7254
|
+
static assertionForSignIn(enrollmentId, oneTimePassword) {
|
|
7255
|
+
return TotpMultiFactorAssertionImpl._fromEnrollmentId(enrollmentId, oneTimePassword);
|
|
7256
|
+
}
|
|
7257
|
+
/**
|
|
7258
|
+
* Returns a promise to {@link TotpSecret} which contains the TOTP shared secret key and other parameters.
|
|
7259
|
+
* Creates a TOTP secret as part of enrolling a TOTP second factor.
|
|
7260
|
+
* Used for generating a QR code URL or inputting into a TOTP app.
|
|
7261
|
+
* This method uses the auth instance corresponding to the user in the multiFactorSession.
|
|
7262
|
+
*
|
|
7263
|
+
* @param session The {@link MultiFactorSession} that the user is part of.
|
|
7264
|
+
* @returns A promise to {@link TotpSecret}.
|
|
7265
|
+
*/
|
|
7266
|
+
static async generateSecret(session) {
|
|
7267
|
+
var _a;
|
|
7268
|
+
const mfaSession = session;
|
|
6463
7269
|
_assert(
|
|
6464
|
-
|
|
6465
|
-
"
|
|
6466
|
-
/* AuthErrorCode.
|
|
7270
|
+
typeof ((_a = mfaSession.user) === null || _a === void 0 ? void 0 : _a.auth) !== "undefined",
|
|
7271
|
+
"internal-error"
|
|
7272
|
+
/* AuthErrorCode.INTERNAL_ERROR */
|
|
6467
7273
|
);
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
this.auth._stopProactiveRefresh();
|
|
6474
|
-
}
|
|
7274
|
+
const response = await startEnrollTotpMfa(mfaSession.user.auth, {
|
|
7275
|
+
idToken: mfaSession.credential,
|
|
7276
|
+
totpEnrollmentInfo: {}
|
|
7277
|
+
});
|
|
7278
|
+
return TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.user.auth);
|
|
6475
7279
|
}
|
|
6476
7280
|
};
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
case "Worker":
|
|
6484
|
-
return "webworker";
|
|
6485
|
-
case "Cordova":
|
|
6486
|
-
return "cordova";
|
|
6487
|
-
default:
|
|
6488
|
-
return void 0;
|
|
6489
|
-
}
|
|
6490
|
-
}
|
|
6491
|
-
function registerAuth(clientPlatform) {
|
|
6492
|
-
_registerComponent(new Component(
|
|
6493
|
-
"auth",
|
|
6494
|
-
(container, { options: deps }) => {
|
|
6495
|
-
const app2 = container.getProvider("app").getImmediate();
|
|
6496
|
-
const heartbeatServiceProvider = container.getProvider("heartbeat");
|
|
6497
|
-
const { apiKey, authDomain } = app2.options;
|
|
6498
|
-
return ((app3, heartbeatServiceProvider2) => {
|
|
6499
|
-
_assert(apiKey && !apiKey.includes(":"), "invalid-api-key", { appName: app3.name });
|
|
6500
|
-
_assert(!(authDomain === null || authDomain === void 0 ? void 0 : authDomain.includes(":")), "argument-error", {
|
|
6501
|
-
appName: app3.name
|
|
6502
|
-
});
|
|
6503
|
-
const config = {
|
|
6504
|
-
apiKey,
|
|
6505
|
-
authDomain,
|
|
6506
|
-
clientPlatform,
|
|
6507
|
-
apiHost: "identitytoolkit.googleapis.com",
|
|
6508
|
-
tokenApiHost: "securetoken.googleapis.com",
|
|
6509
|
-
apiScheme: "https",
|
|
6510
|
-
sdkClientVersion: _getClientVersion(clientPlatform)
|
|
6511
|
-
};
|
|
6512
|
-
const authInstance = new AuthImpl(app3, heartbeatServiceProvider2, config);
|
|
6513
|
-
_initializeAuthInstance(authInstance, deps);
|
|
6514
|
-
return authInstance;
|
|
6515
|
-
})(app2, heartbeatServiceProvider);
|
|
6516
|
-
},
|
|
6517
|
-
"PUBLIC"
|
|
6518
|
-
/* ComponentType.PUBLIC */
|
|
6519
|
-
).setInstantiationMode(
|
|
6520
|
-
"EXPLICIT"
|
|
6521
|
-
/* InstantiationMode.EXPLICIT */
|
|
6522
|
-
).setInstanceCreatedCallback((container, _instanceIdentifier, _instance) => {
|
|
6523
|
-
const authInternalProvider = container.getProvider(
|
|
6524
|
-
"auth-internal"
|
|
6525
|
-
/* _ComponentName.AUTH_INTERNAL */
|
|
7281
|
+
TotpMultiFactorGenerator.FACTOR_ID = "totp";
|
|
7282
|
+
var TotpMultiFactorAssertionImpl = class _TotpMultiFactorAssertionImpl extends MultiFactorAssertionImpl {
|
|
7283
|
+
constructor(otp, enrollmentId, secret) {
|
|
7284
|
+
super(
|
|
7285
|
+
"totp"
|
|
7286
|
+
/* FactorId.TOTP */
|
|
6526
7287
|
);
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
"auth-internal",
|
|
6531
|
-
(container) => {
|
|
6532
|
-
const auth2 = _castAuth(container.getProvider(
|
|
6533
|
-
"auth"
|
|
6534
|
-
/* _ComponentName.AUTH */
|
|
6535
|
-
).getImmediate());
|
|
6536
|
-
return ((auth3) => new AuthInterop(auth3))(auth2);
|
|
6537
|
-
},
|
|
6538
|
-
"PRIVATE"
|
|
6539
|
-
/* ComponentType.PRIVATE */
|
|
6540
|
-
).setInstantiationMode(
|
|
6541
|
-
"EXPLICIT"
|
|
6542
|
-
/* InstantiationMode.EXPLICIT */
|
|
6543
|
-
));
|
|
6544
|
-
registerVersion(name2, version2, getVersionForPlatform(clientPlatform));
|
|
6545
|
-
registerVersion(name2, version2, "esm2017");
|
|
6546
|
-
}
|
|
6547
|
-
var DEFAULT_ID_TOKEN_MAX_AGE = 5 * 60;
|
|
6548
|
-
var authIdTokenMaxAge = getExperimentalSetting("authIdTokenMaxAge") || DEFAULT_ID_TOKEN_MAX_AGE;
|
|
6549
|
-
var lastPostedIdToken = null;
|
|
6550
|
-
var mintCookieFactory = (url) => async (user) => {
|
|
6551
|
-
const idTokenResult = user && await user.getIdTokenResult();
|
|
6552
|
-
const idTokenAge = idTokenResult && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(idTokenResult.issuedAtTime)) / 1e3;
|
|
6553
|
-
if (idTokenAge && idTokenAge > authIdTokenMaxAge) {
|
|
6554
|
-
return;
|
|
7288
|
+
this.otp = otp;
|
|
7289
|
+
this.enrollmentId = enrollmentId;
|
|
7290
|
+
this.secret = secret;
|
|
6555
7291
|
}
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
return;
|
|
7292
|
+
/** @internal */
|
|
7293
|
+
static _fromSecret(secret, otp) {
|
|
7294
|
+
return new _TotpMultiFactorAssertionImpl(otp, void 0, secret);
|
|
6559
7295
|
}
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
headers: idToken ? {
|
|
6564
|
-
"Authorization": `Bearer ${idToken}`
|
|
6565
|
-
} : {}
|
|
6566
|
-
});
|
|
6567
|
-
};
|
|
6568
|
-
function getAuth(app2 = getApp()) {
|
|
6569
|
-
const provider = _getProvider(app2, "auth");
|
|
6570
|
-
if (provider.isInitialized()) {
|
|
6571
|
-
return provider.getImmediate();
|
|
7296
|
+
/** @internal */
|
|
7297
|
+
static _fromEnrollmentId(enrollmentId, otp) {
|
|
7298
|
+
return new _TotpMultiFactorAssertionImpl(otp, enrollmentId);
|
|
6572
7299
|
}
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
|
|
7300
|
+
/** @internal */
|
|
7301
|
+
async _finalizeEnroll(auth2, idToken, displayName) {
|
|
7302
|
+
_assert(
|
|
7303
|
+
typeof this.secret !== "undefined",
|
|
7304
|
+
auth2,
|
|
7305
|
+
"argument-error"
|
|
7306
|
+
/* AuthErrorCode.ARGUMENT_ERROR */
|
|
7307
|
+
);
|
|
7308
|
+
return finalizeEnrollTotpMfa(auth2, {
|
|
7309
|
+
idToken,
|
|
7310
|
+
displayName,
|
|
7311
|
+
totpVerificationInfo: this.secret._makeTotpVerificationInfo(this.otp)
|
|
7312
|
+
});
|
|
6586
7313
|
}
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
7314
|
+
/** @internal */
|
|
7315
|
+
async _finalizeSignIn(auth2, mfaPendingCredential) {
|
|
7316
|
+
_assert(
|
|
7317
|
+
this.enrollmentId !== void 0 && this.otp !== void 0,
|
|
7318
|
+
auth2,
|
|
7319
|
+
"argument-error"
|
|
7320
|
+
/* AuthErrorCode.ARGUMENT_ERROR */
|
|
7321
|
+
);
|
|
7322
|
+
const totpVerificationInfo = { verificationCode: this.otp };
|
|
7323
|
+
return finalizeSignInTotpMfa(auth2, {
|
|
7324
|
+
mfaPendingCredential,
|
|
7325
|
+
mfaEnrollmentId: this.enrollmentId,
|
|
7326
|
+
totpVerificationInfo
|
|
7327
|
+
});
|
|
6590
7328
|
}
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
var i;
|
|
6603
|
-
var t;
|
|
6604
|
-
var o;
|
|
6605
|
-
var r;
|
|
6606
|
-
var f = {};
|
|
6607
|
-
var e = [];
|
|
6608
|
-
var c = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
|
|
6609
|
-
function s(n2, l2) {
|
|
6610
|
-
for (var u2 in l2)
|
|
6611
|
-
n2[u2] = l2[u2];
|
|
6612
|
-
return n2;
|
|
6613
|
-
}
|
|
6614
|
-
function a(n2) {
|
|
6615
|
-
var l2 = n2.parentNode;
|
|
6616
|
-
l2 && l2.removeChild(n2);
|
|
6617
|
-
}
|
|
6618
|
-
function h(l2, u2, i2) {
|
|
6619
|
-
var t2, o3, r2, f2 = {};
|
|
6620
|
-
for (r2 in u2)
|
|
6621
|
-
"key" == r2 ? t2 = u2[r2] : "ref" == r2 ? o3 = u2[r2] : f2[r2] = u2[r2];
|
|
6622
|
-
if (arguments.length > 2 && (f2.children = arguments.length > 3 ? n.call(arguments, 2) : i2), "function" == typeof l2 && null != l2.defaultProps)
|
|
6623
|
-
for (r2 in l2.defaultProps)
|
|
6624
|
-
void 0 === f2[r2] && (f2[r2] = l2.defaultProps[r2]);
|
|
6625
|
-
return v(l2, f2, t2, o3, null);
|
|
6626
|
-
}
|
|
6627
|
-
function v(n2, i2, t2, o3, r2) {
|
|
6628
|
-
var f2 = { type: n2, props: i2, key: t2, ref: o3, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: null == r2 ? ++u : r2 };
|
|
6629
|
-
return null == r2 && null != l.vnode && l.vnode(f2), f2;
|
|
6630
|
-
}
|
|
6631
|
-
function p(n2) {
|
|
6632
|
-
return n2.children;
|
|
6633
|
-
}
|
|
6634
|
-
function d(n2, l2) {
|
|
6635
|
-
this.props = n2, this.context = l2;
|
|
6636
|
-
}
|
|
6637
|
-
function _(n2, l2) {
|
|
6638
|
-
if (null == l2)
|
|
6639
|
-
return n2.__ ? _(n2.__, n2.__.__k.indexOf(n2) + 1) : null;
|
|
6640
|
-
for (var u2; l2 < n2.__k.length; l2++)
|
|
6641
|
-
if (null != (u2 = n2.__k[l2]) && null != u2.__e)
|
|
6642
|
-
return u2.__e;
|
|
6643
|
-
return "function" == typeof n2.type ? _(n2) : null;
|
|
6644
|
-
}
|
|
6645
|
-
function k(n2) {
|
|
6646
|
-
var l2, u2;
|
|
6647
|
-
if (null != (n2 = n2.__) && null != n2.__c) {
|
|
6648
|
-
for (n2.__e = n2.__c.base = null, l2 = 0; l2 < n2.__k.length; l2++)
|
|
6649
|
-
if (null != (u2 = n2.__k[l2]) && null != u2.__e) {
|
|
6650
|
-
n2.__e = n2.__c.base = u2.__e;
|
|
6651
|
-
break;
|
|
6652
|
-
}
|
|
6653
|
-
return k(n2);
|
|
7329
|
+
};
|
|
7330
|
+
var TotpSecret = class _TotpSecret {
|
|
7331
|
+
// The public members are declared outside the constructor so the docs can be generated.
|
|
7332
|
+
constructor(secretKey, hashingAlgorithm, codeLength, codeIntervalSeconds, enrollmentCompletionDeadline, sessionInfo, auth2) {
|
|
7333
|
+
this.sessionInfo = sessionInfo;
|
|
7334
|
+
this.auth = auth2;
|
|
7335
|
+
this.secretKey = secretKey;
|
|
7336
|
+
this.hashingAlgorithm = hashingAlgorithm;
|
|
7337
|
+
this.codeLength = codeLength;
|
|
7338
|
+
this.codeIntervalSeconds = codeIntervalSeconds;
|
|
7339
|
+
this.enrollmentCompletionDeadline = enrollmentCompletionDeadline;
|
|
6654
7340
|
}
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
j(n2, k2, d2 = d2 || f, t2, o3, r2, c2, s2, a2), b2 = k2.__e, (y = k2.ref) && d2.ref != y && (w2 || (w2 = []), d2.ref && w2.push(d2.ref, null, k2), w2.push(y, k2.__c || b2, k2)), null != b2 ? (null == g2 && (g2 = b2), "function" == typeof k2.type && k2.__k === d2.__k ? k2.__d = s2 = m(k2, s2, n2) : s2 = A(n2, k2, d2, x2, b2, s2), "function" == typeof u2.type && (u2.__d = s2)) : s2 && d2.__e == s2 && s2.parentNode != n2 && (s2 = _(d2));
|
|
6683
|
-
}
|
|
6684
|
-
for (u2.__e = g2, h2 = C2; h2--; )
|
|
6685
|
-
null != x2[h2] && ("function" == typeof u2.type && null != x2[h2].__e && x2[h2].__e == u2.__d && (u2.__d = _(i2, h2 + 1)), N(x2[h2], x2[h2]));
|
|
6686
|
-
if (w2)
|
|
6687
|
-
for (h2 = 0; h2 < w2.length; h2++)
|
|
6688
|
-
M(w2[h2], w2[++h2], w2[++h2]);
|
|
6689
|
-
}
|
|
6690
|
-
function m(n2, l2, u2) {
|
|
6691
|
-
for (var i2, t2 = n2.__k, o3 = 0; t2 && o3 < t2.length; o3++)
|
|
6692
|
-
(i2 = t2[o3]) && (i2.__ = n2, l2 = "function" == typeof i2.type ? m(i2, l2, u2) : A(u2, i2, i2, t2, i2.__e, l2));
|
|
6693
|
-
return l2;
|
|
6694
|
-
}
|
|
6695
|
-
function x(n2, l2) {
|
|
6696
|
-
return l2 = l2 || [], null == n2 || "boolean" == typeof n2 || (Array.isArray(n2) ? n2.some(function(n3) {
|
|
6697
|
-
x(n3, l2);
|
|
6698
|
-
}) : l2.push(n2)), l2;
|
|
6699
|
-
}
|
|
6700
|
-
function A(n2, l2, u2, i2, t2, o3) {
|
|
6701
|
-
var r2, f2, e2;
|
|
6702
|
-
if (void 0 !== l2.__d)
|
|
6703
|
-
r2 = l2.__d, l2.__d = void 0;
|
|
6704
|
-
else if (null == u2 || t2 != o3 || null == t2.parentNode)
|
|
6705
|
-
n:
|
|
6706
|
-
if (null == o3 || o3.parentNode !== n2)
|
|
6707
|
-
n2.appendChild(t2), r2 = null;
|
|
6708
|
-
else {
|
|
6709
|
-
for (f2 = o3, e2 = 0; (f2 = f2.nextSibling) && e2 < i2.length; e2 += 2)
|
|
6710
|
-
if (f2 == t2)
|
|
6711
|
-
break n;
|
|
6712
|
-
n2.insertBefore(t2, o3), r2 = o3;
|
|
7341
|
+
/** @internal */
|
|
7342
|
+
static _fromStartTotpMfaEnrollmentResponse(response, auth2) {
|
|
7343
|
+
return new _TotpSecret(response.totpSessionInfo.sharedSecretKey, response.totpSessionInfo.hashingAlgorithm, response.totpSessionInfo.verificationCodeLength, response.totpSessionInfo.periodSec, new Date(response.totpSessionInfo.finalizeEnrollmentTime).toUTCString(), response.totpSessionInfo.sessionInfo, auth2);
|
|
7344
|
+
}
|
|
7345
|
+
/** @internal */
|
|
7346
|
+
_makeTotpVerificationInfo(otp) {
|
|
7347
|
+
return { sessionInfo: this.sessionInfo, verificationCode: otp };
|
|
7348
|
+
}
|
|
7349
|
+
/**
|
|
7350
|
+
* Returns a QR code URL as described in
|
|
7351
|
+
* https://github.com/google/google-authenticator/wiki/Key-Uri-Format
|
|
7352
|
+
* This can be displayed to the user as a QR code to be scanned into a TOTP app like Google Authenticator.
|
|
7353
|
+
* If the optional parameters are unspecified, an accountName of <userEmail> and issuer of <firebaseAppName> are used.
|
|
7354
|
+
*
|
|
7355
|
+
* @param accountName the name of the account/app along with a user identifier.
|
|
7356
|
+
* @param issuer issuer of the TOTP (likely the app name).
|
|
7357
|
+
* @returns A QR code URL string.
|
|
7358
|
+
*/
|
|
7359
|
+
generateQrCodeUrl(accountName, issuer) {
|
|
7360
|
+
var _a;
|
|
7361
|
+
let useDefaults = false;
|
|
7362
|
+
if (_isEmptyString(accountName) || _isEmptyString(issuer)) {
|
|
7363
|
+
useDefaults = true;
|
|
7364
|
+
}
|
|
7365
|
+
if (useDefaults) {
|
|
7366
|
+
if (_isEmptyString(accountName)) {
|
|
7367
|
+
accountName = ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.email) || "unknownuser";
|
|
6713
7368
|
}
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
function C(n2, l2, u2, i2, t2) {
|
|
6717
|
-
var o3;
|
|
6718
|
-
for (o3 in u2)
|
|
6719
|
-
"children" === o3 || "key" === o3 || o3 in l2 || H(n2, o3, null, u2[o3], i2);
|
|
6720
|
-
for (o3 in l2)
|
|
6721
|
-
t2 && "function" != typeof l2[o3] || "children" === o3 || "key" === o3 || "value" === o3 || "checked" === o3 || u2[o3] === l2[o3] || H(n2, o3, l2[o3], u2[o3], i2);
|
|
6722
|
-
}
|
|
6723
|
-
function $(n2, l2, u2) {
|
|
6724
|
-
"-" === l2[0] ? n2.setProperty(l2, u2) : n2[l2] = null == u2 ? "" : "number" != typeof u2 || c.test(l2) ? u2 : u2 + "px";
|
|
6725
|
-
}
|
|
6726
|
-
function H(n2, l2, u2, i2, t2) {
|
|
6727
|
-
var o3;
|
|
6728
|
-
n:
|
|
6729
|
-
if ("style" === l2)
|
|
6730
|
-
if ("string" == typeof u2)
|
|
6731
|
-
n2.style.cssText = u2;
|
|
6732
|
-
else {
|
|
6733
|
-
if ("string" == typeof i2 && (n2.style.cssText = i2 = ""), i2)
|
|
6734
|
-
for (l2 in i2)
|
|
6735
|
-
u2 && l2 in u2 || $(n2.style, l2, "");
|
|
6736
|
-
if (u2)
|
|
6737
|
-
for (l2 in u2)
|
|
6738
|
-
i2 && u2[l2] === i2[l2] || $(n2.style, l2, u2[l2]);
|
|
7369
|
+
if (_isEmptyString(issuer)) {
|
|
7370
|
+
issuer = this.auth.name;
|
|
6739
7371
|
}
|
|
6740
|
-
else if ("o" === l2[0] && "n" === l2[1])
|
|
6741
|
-
o3 = l2 !== (l2 = l2.replace(/Capture$/, "")), l2 = l2.toLowerCase() in n2 ? l2.toLowerCase().slice(2) : l2.slice(2), n2.l || (n2.l = {}), n2.l[l2 + o3] = u2, u2 ? i2 || n2.addEventListener(l2, o3 ? T : I, o3) : n2.removeEventListener(l2, o3 ? T : I, o3);
|
|
6742
|
-
else if ("dangerouslySetInnerHTML" !== l2) {
|
|
6743
|
-
if (t2)
|
|
6744
|
-
l2 = l2.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
6745
|
-
else if ("href" !== l2 && "list" !== l2 && "form" !== l2 && "tabIndex" !== l2 && "download" !== l2 && l2 in n2)
|
|
6746
|
-
try {
|
|
6747
|
-
n2[l2] = null == u2 ? "" : u2;
|
|
6748
|
-
break n;
|
|
6749
|
-
} catch (n3) {
|
|
6750
|
-
}
|
|
6751
|
-
"function" == typeof u2 || (null != u2 && (false !== u2 || "a" === l2[0] && "r" === l2[1]) ? n2.setAttribute(l2, u2) : n2.removeAttribute(l2));
|
|
6752
7372
|
}
|
|
6753
|
-
|
|
6754
|
-
function I(n2) {
|
|
6755
|
-
this.l[n2.type + false](l.event ? l.event(n2) : n2);
|
|
6756
|
-
}
|
|
6757
|
-
function T(n2) {
|
|
6758
|
-
this.l[n2.type + true](l.event ? l.event(n2) : n2);
|
|
6759
|
-
}
|
|
6760
|
-
function j(n2, u2, i2, t2, o3, r2, f2, e2, c2) {
|
|
6761
|
-
var a2, h2, v2, y, _3, k2, b2, g2, m2, x2, A2, C2, $2, H2 = u2.type;
|
|
6762
|
-
if (void 0 !== u2.constructor)
|
|
6763
|
-
return null;
|
|
6764
|
-
null != i2.__h && (c2 = i2.__h, e2 = u2.__e = i2.__e, u2.__h = null, r2 = [e2]), (a2 = l.__b) && a2(u2);
|
|
6765
|
-
try {
|
|
6766
|
-
n:
|
|
6767
|
-
if ("function" == typeof H2) {
|
|
6768
|
-
if (g2 = u2.props, m2 = (a2 = H2.contextType) && t2[a2.__c], x2 = a2 ? m2 ? m2.props.value : a2.__ : t2, i2.__c ? b2 = (h2 = u2.__c = i2.__c).__ = h2.__E : ("prototype" in H2 && H2.prototype.render ? u2.__c = h2 = new H2(g2, x2) : (u2.__c = h2 = new d(g2, x2), h2.constructor = H2, h2.render = O), m2 && m2.sub(h2), h2.props = g2, h2.state || (h2.state = {}), h2.context = x2, h2.__n = t2, v2 = h2.__d = true, h2.__h = []), null == h2.__s && (h2.__s = h2.state), null != H2.getDerivedStateFromProps && (h2.__s == h2.state && (h2.__s = s({}, h2.__s)), s(h2.__s, H2.getDerivedStateFromProps(g2, h2.__s))), y = h2.props, _3 = h2.state, v2)
|
|
6769
|
-
null == H2.getDerivedStateFromProps && null != h2.componentWillMount && h2.componentWillMount(), null != h2.componentDidMount && h2.__h.push(h2.componentDidMount);
|
|
6770
|
-
else {
|
|
6771
|
-
if (null == H2.getDerivedStateFromProps && g2 !== y && null != h2.componentWillReceiveProps && h2.componentWillReceiveProps(g2, x2), !h2.__e && null != h2.shouldComponentUpdate && false === h2.shouldComponentUpdate(g2, h2.__s, x2) || u2.__v === i2.__v) {
|
|
6772
|
-
h2.props = g2, h2.state = h2.__s, u2.__v !== i2.__v && (h2.__d = false), h2.__v = u2, u2.__e = i2.__e, u2.__k = i2.__k, u2.__k.forEach(function(n3) {
|
|
6773
|
-
n3 && (n3.__ = u2);
|
|
6774
|
-
}), h2.__h.length && f2.push(h2);
|
|
6775
|
-
break n;
|
|
6776
|
-
}
|
|
6777
|
-
null != h2.componentWillUpdate && h2.componentWillUpdate(g2, h2.__s, x2), null != h2.componentDidUpdate && h2.__h.push(function() {
|
|
6778
|
-
h2.componentDidUpdate(y, _3, k2);
|
|
6779
|
-
});
|
|
6780
|
-
}
|
|
6781
|
-
if (h2.context = x2, h2.props = g2, h2.__v = u2, h2.__P = n2, A2 = l.__r, C2 = 0, "prototype" in H2 && H2.prototype.render)
|
|
6782
|
-
h2.state = h2.__s, h2.__d = false, A2 && A2(u2), a2 = h2.render(h2.props, h2.state, h2.context);
|
|
6783
|
-
else
|
|
6784
|
-
do {
|
|
6785
|
-
h2.__d = false, A2 && A2(u2), a2 = h2.render(h2.props, h2.state, h2.context), h2.state = h2.__s;
|
|
6786
|
-
} while (h2.__d && ++C2 < 25);
|
|
6787
|
-
h2.state = h2.__s, null != h2.getChildContext && (t2 = s(s({}, t2), h2.getChildContext())), v2 || null == h2.getSnapshotBeforeUpdate || (k2 = h2.getSnapshotBeforeUpdate(y, _3)), $2 = null != a2 && a2.type === p && null == a2.key ? a2.props.children : a2, w(n2, Array.isArray($2) ? $2 : [$2], u2, i2, t2, o3, r2, f2, e2, c2), h2.base = u2.__e, u2.__h = null, h2.__h.length && f2.push(h2), b2 && (h2.__E = h2.__ = null), h2.__e = false;
|
|
6788
|
-
} else
|
|
6789
|
-
null == r2 && u2.__v === i2.__v ? (u2.__k = i2.__k, u2.__e = i2.__e) : u2.__e = L(i2.__e, u2, i2, t2, o3, r2, f2, c2);
|
|
6790
|
-
(a2 = l.diffed) && a2(u2);
|
|
6791
|
-
} catch (n3) {
|
|
6792
|
-
u2.__v = null, (c2 || null != r2) && (u2.__e = e2, u2.__h = !!c2, r2[r2.indexOf(e2)] = null), l.__e(n3, u2, i2);
|
|
7373
|
+
return `otpauth://totp/${issuer}:${accountName}?secret=${this.secretKey}&issuer=${issuer}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`;
|
|
6793
7374
|
}
|
|
7375
|
+
};
|
|
7376
|
+
function _isEmptyString(input) {
|
|
7377
|
+
return typeof input === "undefined" || (input === null || input === void 0 ? void 0 : input.length) === 0;
|
|
6794
7378
|
}
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
|
|
6801
|
-
} catch (n3) {
|
|
6802
|
-
l.__e(n3, u3.__v);
|
|
6803
|
-
}
|
|
6804
|
-
});
|
|
6805
|
-
}
|
|
6806
|
-
function L(l2, u2, i2, t2, o3, r2, e2, c2) {
|
|
6807
|
-
var s2, h2, v2, y = i2.props, p2 = u2.props, d2 = u2.type, k2 = 0;
|
|
6808
|
-
if ("svg" === d2 && (o3 = true), null != r2) {
|
|
6809
|
-
for (; k2 < r2.length; k2++)
|
|
6810
|
-
if ((s2 = r2[k2]) && "setAttribute" in s2 == !!d2 && (d2 ? s2.localName === d2 : 3 === s2.nodeType)) {
|
|
6811
|
-
l2 = s2, r2[k2] = null;
|
|
6812
|
-
break;
|
|
6813
|
-
}
|
|
7379
|
+
var name3 = "@firebase/auth";
|
|
7380
|
+
var version3 = "1.3.0";
|
|
7381
|
+
var AuthInterop = class {
|
|
7382
|
+
constructor(auth2) {
|
|
7383
|
+
this.auth = auth2;
|
|
7384
|
+
this.internalListeners = /* @__PURE__ */ new Map();
|
|
6814
7385
|
}
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
7386
|
+
getUid() {
|
|
7387
|
+
var _a;
|
|
7388
|
+
this.assertAuthConfigured();
|
|
7389
|
+
return ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.uid) || null;
|
|
6819
7390
|
}
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
if (
|
|
6824
|
-
|
|
6825
|
-
for (y = {}, k2 = 0; k2 < l2.attributes.length; k2++)
|
|
6826
|
-
y[l2.attributes[k2].name] = l2.attributes[k2].value;
|
|
6827
|
-
(v2 || h2) && (v2 && (h2 && v2.__html == h2.__html || v2.__html === l2.innerHTML) || (l2.innerHTML = v2 && v2.__html || ""));
|
|
7391
|
+
async getToken(forceRefresh) {
|
|
7392
|
+
this.assertAuthConfigured();
|
|
7393
|
+
await this.auth._initializationPromise;
|
|
7394
|
+
if (!this.auth.currentUser) {
|
|
7395
|
+
return null;
|
|
6828
7396
|
}
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
else if (k2 = u2.props.children, w(l2, Array.isArray(k2) ? k2 : [k2], u2, i2, t2, o3 && "foreignObject" !== d2, r2, e2, r2 ? r2[0] : i2.__k && _(i2, 0), c2), null != r2)
|
|
6832
|
-
for (k2 = r2.length; k2--; )
|
|
6833
|
-
null != r2[k2] && a(r2[k2]);
|
|
6834
|
-
c2 || ("value" in p2 && void 0 !== (k2 = p2.value) && (k2 !== l2.value || "progress" === d2 && !k2 || "option" === d2 && k2 !== y.value) && H(l2, "value", k2, y.value, false), "checked" in p2 && void 0 !== (k2 = p2.checked) && k2 !== l2.checked && H(l2, "checked", k2, y.checked, false));
|
|
6835
|
-
}
|
|
6836
|
-
return l2;
|
|
6837
|
-
}
|
|
6838
|
-
function M(n2, u2, i2) {
|
|
6839
|
-
try {
|
|
6840
|
-
"function" == typeof n2 ? n2(u2) : n2.current = u2;
|
|
6841
|
-
} catch (n3) {
|
|
6842
|
-
l.__e(n3, i2);
|
|
7397
|
+
const accessToken = await this.auth.currentUser.getIdToken(forceRefresh);
|
|
7398
|
+
return { accessToken };
|
|
6843
7399
|
}
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
t2.base = t2.__P = null, n2.__c = void 0;
|
|
7400
|
+
addAuthTokenListener(listener) {
|
|
7401
|
+
this.assertAuthConfigured();
|
|
7402
|
+
if (this.internalListeners.has(listener)) {
|
|
7403
|
+
return;
|
|
7404
|
+
}
|
|
7405
|
+
const unsubscribe = this.auth.onIdTokenChanged((user) => {
|
|
7406
|
+
listener((user === null || user === void 0 ? void 0 : user.stsTokenManager.accessToken) || null);
|
|
7407
|
+
});
|
|
7408
|
+
this.internalListeners.set(listener, unsubscribe);
|
|
7409
|
+
this.updateProactiveRefresh();
|
|
6855
7410
|
}
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
function O(n2, l2, u2) {
|
|
6862
|
-
return this.constructor(n2, u2);
|
|
6863
|
-
}
|
|
6864
|
-
function P(u2, i2, t2) {
|
|
6865
|
-
var o3, r2, e2;
|
|
6866
|
-
l.__ && l.__(u2, i2), r2 = (o3 = "function" == typeof t2) ? null : t2 && t2.__k || i2.__k, e2 = [], j(i2, u2 = (!o3 && t2 || i2).__k = h(p, null, [u2]), r2 || f, f, void 0 !== i2.ownerSVGElement, !o3 && t2 ? [t2] : r2 ? null : i2.firstChild ? n.call(i2.childNodes) : null, e2, !o3 && t2 ? t2 : r2 ? r2.__e : i2.firstChild, o3), z(e2, u2);
|
|
6867
|
-
}
|
|
6868
|
-
n = e.slice, l = { __e: function(n2, l2, u2, i2) {
|
|
6869
|
-
for (var t2, o3, r2; l2 = l2.__; )
|
|
6870
|
-
if ((t2 = l2.__c) && !t2.__)
|
|
6871
|
-
try {
|
|
6872
|
-
if ((o3 = t2.constructor) && null != o3.getDerivedStateFromError && (t2.setState(o3.getDerivedStateFromError(n2)), r2 = t2.__d), null != t2.componentDidCatch && (t2.componentDidCatch(n2, i2 || {}), r2 = t2.__d), r2)
|
|
6873
|
-
return t2.__E = t2;
|
|
6874
|
-
} catch (l3) {
|
|
6875
|
-
n2 = l3;
|
|
6876
|
-
}
|
|
6877
|
-
throw n2;
|
|
6878
|
-
} }, u = 0, i = function(n2) {
|
|
6879
|
-
return null != n2 && void 0 === n2.constructor;
|
|
6880
|
-
}, d.prototype.setState = function(n2, l2) {
|
|
6881
|
-
var u2;
|
|
6882
|
-
u2 = null != this.__s && this.__s !== this.state ? this.__s : this.__s = s({}, this.state), "function" == typeof n2 && (n2 = n2(s({}, u2), this.props)), n2 && s(u2, n2), null != n2 && this.__v && (l2 && this.__h.push(l2), b(this));
|
|
6883
|
-
}, d.prototype.forceUpdate = function(n2) {
|
|
6884
|
-
this.__v && (this.__e = true, n2 && this.__h.push(n2), b(this));
|
|
6885
|
-
}, d.prototype.render = p, t = [], g.__r = 0, r = 0;
|
|
6886
|
-
|
|
6887
|
-
// ../../node_modules/.pnpm/firebase@9.17.2/node_modules/firebase/app/dist/esm/index.esm.js
|
|
6888
|
-
var name3 = "firebase";
|
|
6889
|
-
var version3 = "9.17.2";
|
|
6890
|
-
registerVersion(name3, version3, "app");
|
|
6891
|
-
|
|
6892
|
-
// ../../node_modules/.pnpm/@tabler+icons-preact@2.7.0_preact@10.11.0/node_modules/@tabler/icons-preact/dist/esm/defaultAttributes.js
|
|
6893
|
-
var defaultAttributes = {
|
|
6894
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
6895
|
-
width: 24,
|
|
6896
|
-
height: 24,
|
|
6897
|
-
viewBox: "0 0 24 24",
|
|
6898
|
-
fill: "none",
|
|
6899
|
-
stroke: "currentColor",
|
|
6900
|
-
"stroke-width": 2,
|
|
6901
|
-
"stroke-linecap": "round",
|
|
6902
|
-
"stroke-linejoin": "round"
|
|
6903
|
-
};
|
|
6904
|
-
|
|
6905
|
-
// ../../node_modules/.pnpm/@tabler+icons-preact@2.7.0_preact@10.11.0/node_modules/@tabler/icons-preact/dist/esm/createPreactComponent.js
|
|
6906
|
-
var __defProp = Object.defineProperty;
|
|
6907
|
-
var __defProps = Object.defineProperties;
|
|
6908
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6909
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6910
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6911
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
6912
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6913
|
-
var __spreadValues = (a2, b2) => {
|
|
6914
|
-
for (var prop in b2 || (b2 = {}))
|
|
6915
|
-
if (__hasOwnProp.call(b2, prop))
|
|
6916
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
6917
|
-
if (__getOwnPropSymbols)
|
|
6918
|
-
for (var prop of __getOwnPropSymbols(b2)) {
|
|
6919
|
-
if (__propIsEnum.call(b2, prop))
|
|
6920
|
-
__defNormalProp(a2, prop, b2[prop]);
|
|
7411
|
+
removeAuthTokenListener(listener) {
|
|
7412
|
+
this.assertAuthConfigured();
|
|
7413
|
+
const unsubscribe = this.internalListeners.get(listener);
|
|
7414
|
+
if (!unsubscribe) {
|
|
7415
|
+
return;
|
|
6921
7416
|
}
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
7417
|
+
this.internalListeners.delete(listener);
|
|
7418
|
+
unsubscribe();
|
|
7419
|
+
this.updateProactiveRefresh();
|
|
7420
|
+
}
|
|
7421
|
+
assertAuthConfigured() {
|
|
7422
|
+
_assert(
|
|
7423
|
+
this.auth._initializationPromise,
|
|
7424
|
+
"dependent-sdk-initialized-before-auth"
|
|
7425
|
+
/* AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH */
|
|
7426
|
+
);
|
|
7427
|
+
}
|
|
7428
|
+
updateProactiveRefresh() {
|
|
7429
|
+
if (this.internalListeners.size > 0) {
|
|
7430
|
+
this.auth._startProactiveRefresh();
|
|
7431
|
+
} else {
|
|
7432
|
+
this.auth._stopProactiveRefresh();
|
|
6934
7433
|
}
|
|
6935
|
-
|
|
7434
|
+
}
|
|
6936
7435
|
};
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
7436
|
+
function getVersionForPlatform(clientPlatform) {
|
|
7437
|
+
switch (clientPlatform) {
|
|
7438
|
+
case "Node":
|
|
7439
|
+
return "node";
|
|
7440
|
+
case "ReactNative":
|
|
7441
|
+
return "rn";
|
|
7442
|
+
case "Worker":
|
|
7443
|
+
return "webworker";
|
|
7444
|
+
case "Cordova":
|
|
7445
|
+
return "cordova";
|
|
7446
|
+
default:
|
|
7447
|
+
return void 0;
|
|
7448
|
+
}
|
|
7449
|
+
}
|
|
7450
|
+
function registerAuth(clientPlatform) {
|
|
7451
|
+
_registerComponent(new Component(
|
|
7452
|
+
"auth",
|
|
7453
|
+
(container, { options: deps }) => {
|
|
7454
|
+
const app2 = container.getProvider("app").getImmediate();
|
|
7455
|
+
const heartbeatServiceProvider = container.getProvider("heartbeat");
|
|
7456
|
+
const appCheckServiceProvider = container.getProvider("app-check-internal");
|
|
7457
|
+
const { apiKey, authDomain } = app2.options;
|
|
7458
|
+
_assert(apiKey && !apiKey.includes(":"), "invalid-api-key", { appName: app2.name });
|
|
7459
|
+
const config = {
|
|
7460
|
+
apiKey,
|
|
7461
|
+
authDomain,
|
|
7462
|
+
clientPlatform,
|
|
7463
|
+
apiHost: "identitytoolkit.googleapis.com",
|
|
7464
|
+
tokenApiHost: "securetoken.googleapis.com",
|
|
7465
|
+
apiScheme: "https",
|
|
7466
|
+
sdkClientVersion: _getClientVersion(clientPlatform)
|
|
7467
|
+
};
|
|
7468
|
+
const authInstance = new AuthImpl(app2, heartbeatServiceProvider, appCheckServiceProvider, config);
|
|
7469
|
+
_initializeAuthInstance(authInstance, deps);
|
|
7470
|
+
return authInstance;
|
|
7471
|
+
},
|
|
7472
|
+
"PUBLIC"
|
|
7473
|
+
/* ComponentType.PUBLIC */
|
|
7474
|
+
).setInstantiationMode(
|
|
7475
|
+
"EXPLICIT"
|
|
7476
|
+
/* InstantiationMode.EXPLICIT */
|
|
7477
|
+
).setInstanceCreatedCallback((container, _instanceIdentifier, _instance) => {
|
|
7478
|
+
const authInternalProvider = container.getProvider(
|
|
7479
|
+
"auth-internal"
|
|
7480
|
+
/* _ComponentName.AUTH_INTERNAL */
|
|
6950
7481
|
);
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
7482
|
+
authInternalProvider.initialize();
|
|
7483
|
+
}));
|
|
7484
|
+
_registerComponent(new Component(
|
|
7485
|
+
"auth-internal",
|
|
7486
|
+
(container) => {
|
|
7487
|
+
const auth2 = _castAuth(container.getProvider(
|
|
7488
|
+
"auth"
|
|
7489
|
+
/* _ComponentName.AUTH */
|
|
7490
|
+
).getImmediate());
|
|
7491
|
+
return ((auth3) => new AuthInterop(auth3))(auth2);
|
|
7492
|
+
},
|
|
7493
|
+
"PRIVATE"
|
|
7494
|
+
/* ComponentType.PRIVATE */
|
|
7495
|
+
).setInstantiationMode(
|
|
7496
|
+
"EXPLICIT"
|
|
7497
|
+
/* InstantiationMode.EXPLICIT */
|
|
7498
|
+
));
|
|
7499
|
+
registerVersion(name3, version3, getVersionForPlatform(clientPlatform));
|
|
7500
|
+
registerVersion(name3, version3, "esm2017");
|
|
7501
|
+
}
|
|
7502
|
+
var DEFAULT_ID_TOKEN_MAX_AGE = 5 * 60;
|
|
7503
|
+
var authIdTokenMaxAge = getExperimentalSetting("authIdTokenMaxAge") || DEFAULT_ID_TOKEN_MAX_AGE;
|
|
7504
|
+
var lastPostedIdToken = null;
|
|
7505
|
+
var mintCookieFactory = (url) => async (user) => {
|
|
7506
|
+
const idTokenResult = user && await user.getIdTokenResult();
|
|
7507
|
+
const idTokenAge = idTokenResult && ((/* @__PURE__ */ new Date()).getTime() - Date.parse(idTokenResult.issuedAtTime)) / 1e3;
|
|
7508
|
+
if (idTokenAge && idTokenAge > authIdTokenMaxAge) {
|
|
7509
|
+
return;
|
|
7510
|
+
}
|
|
7511
|
+
const idToken = idTokenResult === null || idTokenResult === void 0 ? void 0 : idTokenResult.token;
|
|
7512
|
+
if (lastPostedIdToken === idToken) {
|
|
7513
|
+
return;
|
|
7514
|
+
}
|
|
7515
|
+
lastPostedIdToken = idToken;
|
|
7516
|
+
await fetch(url, {
|
|
7517
|
+
method: idToken ? "POST" : "DELETE",
|
|
7518
|
+
headers: idToken ? {
|
|
7519
|
+
"Authorization": `Bearer ${idToken}`
|
|
7520
|
+
} : {}
|
|
7521
|
+
});
|
|
6954
7522
|
};
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
7523
|
+
function getAuth(app2 = getApp()) {
|
|
7524
|
+
const provider = _getProvider(app2, "auth");
|
|
7525
|
+
if (provider.isInitialized()) {
|
|
7526
|
+
return provider.getImmediate();
|
|
7527
|
+
}
|
|
7528
|
+
const auth2 = initializeAuth(app2, {
|
|
7529
|
+
popupRedirectResolver: browserPopupRedirectResolver,
|
|
7530
|
+
persistence: [
|
|
7531
|
+
indexedDBLocalPersistence,
|
|
7532
|
+
browserLocalPersistence,
|
|
7533
|
+
browserSessionPersistence
|
|
7534
|
+
]
|
|
7535
|
+
});
|
|
7536
|
+
const authTokenSyncUrl = getExperimentalSetting("authTokenSyncURL");
|
|
7537
|
+
if (authTokenSyncUrl) {
|
|
7538
|
+
const mintCookie = mintCookieFactory(authTokenSyncUrl);
|
|
7539
|
+
beforeAuthStateChanged(auth2, mintCookie, () => mintCookie(auth2.currentUser));
|
|
7540
|
+
onIdTokenChanged(auth2, (user) => mintCookie(user));
|
|
7541
|
+
}
|
|
7542
|
+
const authEmulatorHost = getDefaultEmulatorHost("auth");
|
|
7543
|
+
if (authEmulatorHost) {
|
|
7544
|
+
connectAuthEmulator(auth2, `http://${authEmulatorHost}`);
|
|
7545
|
+
}
|
|
7546
|
+
return auth2;
|
|
7547
|
+
}
|
|
7548
|
+
registerAuth(
|
|
7549
|
+
"Browser"
|
|
7550
|
+
/* ClientPlatform.BROWSER */
|
|
7551
|
+
);
|
|
6982
7552
|
|
|
6983
7553
|
// ../../node_modules/.pnpm/preact@10.11.0/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
|
|
6984
7554
|
var _2 = 0;
|
|
@@ -6996,10 +7566,7 @@
|
|
|
6996
7566
|
// signin/signin.tsx
|
|
6997
7567
|
function SignIn() {
|
|
6998
7568
|
return /* @__PURE__ */ o2("div", { className: "signin", children: /* @__PURE__ */ o2("div", { className: "signin__card", children: [
|
|
6999
|
-
/* @__PURE__ */ o2("div", { className: "signin__card__header", children:
|
|
7000
|
-
/* @__PURE__ */ o2(IconSitemap, { className: "signin__card__header__icon", size: 48 }),
|
|
7001
|
-
/* @__PURE__ */ o2("h1", { children: "Root.js CMS" })
|
|
7002
|
-
] }),
|
|
7569
|
+
/* @__PURE__ */ o2("div", { className: "signin__card__header", children: /* @__PURE__ */ o2("div", { className: "signin__card__header__icon", children: /* @__PURE__ */ o2(IconSitemap, { size: 80, "stroke-width": 1.5 }) }) }),
|
|
7003
7570
|
/* @__PURE__ */ o2(SignIn.Button, {})
|
|
7004
7571
|
] }) });
|
|
7005
7572
|
}
|
|
@@ -7070,7 +7637,7 @@
|
|
|
7070
7637
|
function loginSuccessRedirect() {
|
|
7071
7638
|
const params = new URLSearchParams(window.location.search);
|
|
7072
7639
|
let redirectUrl = params.get("continue");
|
|
7073
|
-
if (!redirectUrl || !redirectUrl.startsWith("/
|
|
7640
|
+
if (!redirectUrl || !redirectUrl.startsWith("/") || redirectUrl.startsWith("/cms/login")) {
|
|
7074
7641
|
redirectUrl = "/cms";
|
|
7075
7642
|
}
|
|
7076
7643
|
window.location.replace(redirectUrl);
|
|
@@ -7512,7 +8079,25 @@
|
|
|
7512
8079
|
* limitations under the License.
|
|
7513
8080
|
*)
|
|
7514
8081
|
|
|
7515
|
-
|
|
8082
|
+
firebase/app/dist/esm/index.esm.js:
|
|
8083
|
+
(**
|
|
8084
|
+
* @license
|
|
8085
|
+
* Copyright 2020 Google LLC
|
|
8086
|
+
*
|
|
8087
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8088
|
+
* you may not use this file except in compliance with the License.
|
|
8089
|
+
* You may obtain a copy of the License at
|
|
8090
|
+
*
|
|
8091
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8092
|
+
*
|
|
8093
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8094
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8095
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8096
|
+
* See the License for the specific language governing permissions and
|
|
8097
|
+
* limitations under the License.
|
|
8098
|
+
*)
|
|
8099
|
+
|
|
8100
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7516
8101
|
(**
|
|
7517
8102
|
* @license
|
|
7518
8103
|
* Copyright 2021 Google LLC
|
|
@@ -7530,7 +8115,7 @@
|
|
|
7530
8115
|
* limitations under the License.
|
|
7531
8116
|
*)
|
|
7532
8117
|
|
|
7533
|
-
@firebase/auth/dist/esm2017/index-
|
|
8118
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7534
8119
|
(**
|
|
7535
8120
|
* @license
|
|
7536
8121
|
* Copyright 2020 Google LLC
|
|
@@ -7548,7 +8133,7 @@
|
|
|
7548
8133
|
* limitations under the License.
|
|
7549
8134
|
*)
|
|
7550
8135
|
|
|
7551
|
-
@firebase/auth/dist/esm2017/index-
|
|
8136
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7552
8137
|
(**
|
|
7553
8138
|
* @license
|
|
7554
8139
|
* Copyright 2020 Google LLC
|
|
@@ -7566,7 +8151,7 @@
|
|
|
7566
8151
|
* limitations under the License.
|
|
7567
8152
|
*)
|
|
7568
8153
|
|
|
7569
|
-
@firebase/auth/dist/esm2017/index-
|
|
8154
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7570
8155
|
(**
|
|
7571
8156
|
* @license
|
|
7572
8157
|
* Copyright 2020 Google LLC
|
|
@@ -7584,7 +8169,7 @@
|
|
|
7584
8169
|
* limitations under the License.
|
|
7585
8170
|
*)
|
|
7586
8171
|
|
|
7587
|
-
@firebase/auth/dist/esm2017/index-
|
|
8172
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7588
8173
|
(**
|
|
7589
8174
|
* @license
|
|
7590
8175
|
* Copyright 2020 Google LLC
|
|
@@ -7601,9 +8186,11 @@
|
|
|
7601
8186
|
* See the License for the specific language governing permissions and
|
|
7602
8187
|
* limitations under the License.
|
|
7603
8188
|
*)
|
|
8189
|
+
|
|
8190
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7604
8191
|
(**
|
|
7605
8192
|
* @license
|
|
7606
|
-
* Copyright
|
|
8193
|
+
* Copyright 2020 Google LLC
|
|
7607
8194
|
*
|
|
7608
8195
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7609
8196
|
* you may not use this file except in compliance with the License.
|
|
@@ -7618,7 +8205,7 @@
|
|
|
7618
8205
|
* limitations under the License.
|
|
7619
8206
|
*)
|
|
7620
8207
|
|
|
7621
|
-
@firebase/auth/dist/esm2017/index-
|
|
8208
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7622
8209
|
(**
|
|
7623
8210
|
* @license
|
|
7624
8211
|
* Copyright 2020 Google LLC
|
|
@@ -7637,7 +8224,7 @@
|
|
|
7637
8224
|
*)
|
|
7638
8225
|
(**
|
|
7639
8226
|
* @license
|
|
7640
|
-
* Copyright
|
|
8227
|
+
* Copyright 2019 Google LLC
|
|
7641
8228
|
*
|
|
7642
8229
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7643
8230
|
* you may not use this file except in compliance with the License.
|
|
@@ -7652,7 +8239,7 @@
|
|
|
7652
8239
|
* limitations under the License.
|
|
7653
8240
|
*)
|
|
7654
8241
|
|
|
7655
|
-
@firebase/auth/dist/esm2017/index-
|
|
8242
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7656
8243
|
(**
|
|
7657
8244
|
* @license
|
|
7658
8245
|
* Copyright 2020 Google LLC
|
|
@@ -7669,8 +8256,40 @@
|
|
|
7669
8256
|
* See the License for the specific language governing permissions and
|
|
7670
8257
|
* limitations under the License.
|
|
7671
8258
|
*)
|
|
8259
|
+
(**
|
|
8260
|
+
* @license
|
|
8261
|
+
* Copyright 2022 Google LLC
|
|
8262
|
+
*
|
|
8263
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8264
|
+
* you may not use this file except in compliance with the License.
|
|
8265
|
+
* You may obtain a copy of the License at
|
|
8266
|
+
*
|
|
8267
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8268
|
+
*
|
|
8269
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8270
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8271
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8272
|
+
* See the License for the specific language governing permissions and
|
|
8273
|
+
* limitations under the License.
|
|
8274
|
+
*)
|
|
8275
|
+
(**
|
|
8276
|
+
* @license
|
|
8277
|
+
* Copyright 2023 Google LLC
|
|
8278
|
+
*
|
|
8279
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8280
|
+
* you may not use this file except in compliance with the License.
|
|
8281
|
+
* You may obtain a copy of the License at
|
|
8282
|
+
*
|
|
8283
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8284
|
+
*
|
|
8285
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8286
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8287
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8288
|
+
* See the License for the specific language governing permissions and
|
|
8289
|
+
* limitations under the License.
|
|
8290
|
+
*)
|
|
7672
8291
|
|
|
7673
|
-
@firebase/auth/dist/esm2017/index-
|
|
8292
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7674
8293
|
(**
|
|
7675
8294
|
* @license
|
|
7676
8295
|
* Copyright 2020 Google LLC
|
|
@@ -7688,7 +8307,7 @@
|
|
|
7688
8307
|
* limitations under the License.
|
|
7689
8308
|
*)
|
|
7690
8309
|
|
|
7691
|
-
@firebase/auth/dist/esm2017/index-
|
|
8310
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7692
8311
|
(**
|
|
7693
8312
|
* @license
|
|
7694
8313
|
* Copyright 2020 Google LLC
|
|
@@ -7705,9 +8324,11 @@
|
|
|
7705
8324
|
* See the License for the specific language governing permissions and
|
|
7706
8325
|
* limitations under the License.
|
|
7707
8326
|
*)
|
|
8327
|
+
|
|
8328
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7708
8329
|
(**
|
|
7709
8330
|
* @license
|
|
7710
|
-
* Copyright
|
|
8331
|
+
* Copyright 2020 Google LLC
|
|
7711
8332
|
*
|
|
7712
8333
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7713
8334
|
* you may not use this file except in compliance with the License.
|
|
@@ -7722,7 +8343,7 @@
|
|
|
7722
8343
|
* limitations under the License.
|
|
7723
8344
|
*)
|
|
7724
8345
|
|
|
7725
|
-
@firebase/auth/dist/esm2017/index-
|
|
8346
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7726
8347
|
(**
|
|
7727
8348
|
* @license
|
|
7728
8349
|
* Copyright 2020 Google LLC
|
|
@@ -7739,8 +8360,24 @@
|
|
|
7739
8360
|
* See the License for the specific language governing permissions and
|
|
7740
8361
|
* limitations under the License.
|
|
7741
8362
|
*)
|
|
8363
|
+
(**
|
|
8364
|
+
* @license
|
|
8365
|
+
* Copyright 2019 Google LLC
|
|
8366
|
+
*
|
|
8367
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8368
|
+
* you may not use this file except in compliance with the License.
|
|
8369
|
+
* You may obtain a copy of the License at
|
|
8370
|
+
*
|
|
8371
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8372
|
+
*
|
|
8373
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
8374
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
8375
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
8376
|
+
* See the License for the specific language governing permissions and
|
|
8377
|
+
* limitations under the License.
|
|
8378
|
+
*)
|
|
7742
8379
|
|
|
7743
|
-
@firebase/auth/dist/esm2017/index-
|
|
8380
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7744
8381
|
(**
|
|
7745
8382
|
* @license
|
|
7746
8383
|
* Copyright 2020 Google LLC
|
|
@@ -7758,7 +8395,7 @@
|
|
|
7758
8395
|
* limitations under the License.
|
|
7759
8396
|
*)
|
|
7760
8397
|
|
|
7761
|
-
@firebase/auth/dist/esm2017/index-
|
|
8398
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7762
8399
|
(**
|
|
7763
8400
|
* @license
|
|
7764
8401
|
* Copyright 2020 Google LLC
|
|
@@ -7776,7 +8413,7 @@
|
|
|
7776
8413
|
* limitations under the License.
|
|
7777
8414
|
*)
|
|
7778
8415
|
|
|
7779
|
-
@firebase/auth/dist/esm2017/index-
|
|
8416
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7780
8417
|
(**
|
|
7781
8418
|
* @license
|
|
7782
8419
|
* Copyright 2020 Google LLC
|
|
@@ -7794,7 +8431,7 @@
|
|
|
7794
8431
|
* limitations under the License.
|
|
7795
8432
|
*)
|
|
7796
8433
|
|
|
7797
|
-
@firebase/auth/dist/esm2017/index-
|
|
8434
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7798
8435
|
(**
|
|
7799
8436
|
* @license
|
|
7800
8437
|
* Copyright 2020 Google LLC
|
|
@@ -7812,10 +8449,10 @@
|
|
|
7812
8449
|
* limitations under the License.
|
|
7813
8450
|
*)
|
|
7814
8451
|
|
|
7815
|
-
@firebase/auth/dist/esm2017/index-
|
|
8452
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7816
8453
|
(**
|
|
7817
8454
|
* @license
|
|
7818
|
-
* Copyright
|
|
8455
|
+
* Copyright 2020 Google LLC
|
|
7819
8456
|
*
|
|
7820
8457
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7821
8458
|
* you may not use this file except in compliance with the License.
|
|
@@ -7830,7 +8467,7 @@
|
|
|
7830
8467
|
* limitations under the License.
|
|
7831
8468
|
*)
|
|
7832
8469
|
|
|
7833
|
-
@firebase/auth/dist/esm2017/index-
|
|
8470
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7834
8471
|
(**
|
|
7835
8472
|
* @license
|
|
7836
8473
|
* Copyright 2019 Google LLC
|
|
@@ -7847,9 +8484,11 @@
|
|
|
7847
8484
|
* See the License for the specific language governing permissions and
|
|
7848
8485
|
* limitations under the License.
|
|
7849
8486
|
*)
|
|
8487
|
+
|
|
8488
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7850
8489
|
(**
|
|
7851
8490
|
* @license
|
|
7852
|
-
* Copyright
|
|
8491
|
+
* Copyright 2019 Google LLC
|
|
7853
8492
|
*
|
|
7854
8493
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7855
8494
|
* you may not use this file except in compliance with the License.
|
|
@@ -7863,8 +8502,6 @@
|
|
|
7863
8502
|
* See the License for the specific language governing permissions and
|
|
7864
8503
|
* limitations under the License.
|
|
7865
8504
|
*)
|
|
7866
|
-
|
|
7867
|
-
@firebase/auth/dist/esm2017/index-e3f1fbba.js:
|
|
7868
8505
|
(**
|
|
7869
8506
|
* @license
|
|
7870
8507
|
* Copyright 2020 Google LLC
|
|
@@ -7882,7 +8519,7 @@
|
|
|
7882
8519
|
* limitations under the License.
|
|
7883
8520
|
*)
|
|
7884
8521
|
|
|
7885
|
-
@firebase/auth/dist/esm2017/index-
|
|
8522
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7886
8523
|
(**
|
|
7887
8524
|
* @license
|
|
7888
8525
|
* Copyright 2020 Google LLC
|
|
@@ -7900,7 +8537,7 @@
|
|
|
7900
8537
|
* limitations under the License.
|
|
7901
8538
|
*)
|
|
7902
8539
|
|
|
7903
|
-
@firebase/auth/dist/esm2017/index-
|
|
8540
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7904
8541
|
(**
|
|
7905
8542
|
* @license
|
|
7906
8543
|
* Copyright 2020 Google LLC
|
|
@@ -7918,7 +8555,7 @@
|
|
|
7918
8555
|
* limitations under the License.
|
|
7919
8556
|
*)
|
|
7920
8557
|
|
|
7921
|
-
@firebase/auth/dist/esm2017/index-
|
|
8558
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7922
8559
|
(**
|
|
7923
8560
|
* @license
|
|
7924
8561
|
* Copyright 2020 Google LLC
|
|
@@ -7936,7 +8573,7 @@
|
|
|
7936
8573
|
* limitations under the License.
|
|
7937
8574
|
*)
|
|
7938
8575
|
|
|
7939
|
-
@firebase/auth/dist/esm2017/index-
|
|
8576
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7940
8577
|
(**
|
|
7941
8578
|
* @license
|
|
7942
8579
|
* Copyright 2020 Google LLC
|
|
@@ -7954,7 +8591,7 @@
|
|
|
7954
8591
|
* limitations under the License.
|
|
7955
8592
|
*)
|
|
7956
8593
|
|
|
7957
|
-
@firebase/auth/dist/esm2017/index-
|
|
8594
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7958
8595
|
(**
|
|
7959
8596
|
* @license
|
|
7960
8597
|
* Copyright 2020 Google LLC
|
|
@@ -7972,7 +8609,7 @@
|
|
|
7972
8609
|
* limitations under the License.
|
|
7973
8610
|
*)
|
|
7974
8611
|
|
|
7975
|
-
@firebase/auth/dist/esm2017/index-
|
|
8612
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7976
8613
|
(**
|
|
7977
8614
|
* @license
|
|
7978
8615
|
* Copyright 2020 Google LLC
|
|
@@ -7990,7 +8627,7 @@
|
|
|
7990
8627
|
* limitations under the License.
|
|
7991
8628
|
*)
|
|
7992
8629
|
|
|
7993
|
-
@firebase/auth/dist/esm2017/index-
|
|
8630
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
7994
8631
|
(**
|
|
7995
8632
|
* @license
|
|
7996
8633
|
* Copyright 2020 Google LLC
|
|
@@ -8008,7 +8645,7 @@
|
|
|
8008
8645
|
* limitations under the License.
|
|
8009
8646
|
*)
|
|
8010
8647
|
|
|
8011
|
-
@firebase/auth/dist/esm2017/index-
|
|
8648
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
8012
8649
|
(**
|
|
8013
8650
|
* @license
|
|
8014
8651
|
* Copyright 2020 Google LLC
|
|
@@ -8026,7 +8663,7 @@
|
|
|
8026
8663
|
* limitations under the License.
|
|
8027
8664
|
*)
|
|
8028
8665
|
|
|
8029
|
-
@firebase/auth/dist/esm2017/index-
|
|
8666
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
8030
8667
|
(**
|
|
8031
8668
|
* @license
|
|
8032
8669
|
* Copyright 2020 Google LLC
|
|
@@ -8044,10 +8681,10 @@
|
|
|
8044
8681
|
* limitations under the License.
|
|
8045
8682
|
*)
|
|
8046
8683
|
|
|
8047
|
-
@firebase/auth/dist/esm2017/index-
|
|
8684
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
8048
8685
|
(**
|
|
8049
8686
|
* @license
|
|
8050
|
-
* Copyright
|
|
8687
|
+
* Copyright 2020 Google LLC
|
|
8051
8688
|
*
|
|
8052
8689
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8053
8690
|
* you may not use this file except in compliance with the License.
|
|
@@ -8062,10 +8699,10 @@
|
|
|
8062
8699
|
* limitations under the License.
|
|
8063
8700
|
*)
|
|
8064
8701
|
|
|
8065
|
-
@firebase/auth/dist/esm2017/index-
|
|
8702
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
8066
8703
|
(**
|
|
8067
8704
|
* @license
|
|
8068
|
-
* Copyright
|
|
8705
|
+
* Copyright 2019 Google LLC
|
|
8069
8706
|
*
|
|
8070
8707
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8071
8708
|
* you may not use this file except in compliance with the License.
|
|
@@ -8080,7 +8717,7 @@
|
|
|
8080
8717
|
* limitations under the License.
|
|
8081
8718
|
*)
|
|
8082
8719
|
|
|
8083
|
-
@firebase/auth/dist/esm2017/index-
|
|
8720
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
8084
8721
|
(**
|
|
8085
8722
|
* @license
|
|
8086
8723
|
* Copyright 2020 Google LLC
|
|
@@ -8098,7 +8735,7 @@
|
|
|
8098
8735
|
* limitations under the License.
|
|
8099
8736
|
*)
|
|
8100
8737
|
|
|
8101
|
-
@firebase/auth/dist/esm2017/index-
|
|
8738
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
8102
8739
|
(**
|
|
8103
8740
|
* @license
|
|
8104
8741
|
* Copyright 2020 Google LLC
|
|
@@ -8116,10 +8753,10 @@
|
|
|
8116
8753
|
* limitations under the License.
|
|
8117
8754
|
*)
|
|
8118
8755
|
|
|
8119
|
-
@firebase/auth/dist/esm2017/index-
|
|
8756
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
8120
8757
|
(**
|
|
8121
8758
|
* @license
|
|
8122
|
-
* Copyright
|
|
8759
|
+
* Copyright 2020 Google LLC
|
|
8123
8760
|
*
|
|
8124
8761
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8125
8762
|
* you may not use this file except in compliance with the License.
|
|
@@ -8133,6 +8770,8 @@
|
|
|
8133
8770
|
* See the License for the specific language governing permissions and
|
|
8134
8771
|
* limitations under the License.
|
|
8135
8772
|
*)
|
|
8773
|
+
|
|
8774
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
8136
8775
|
(**
|
|
8137
8776
|
* @license
|
|
8138
8777
|
* Copyright 2020 Google LLC
|
|
@@ -8149,9 +8788,11 @@
|
|
|
8149
8788
|
* See the License for the specific language governing permissions and
|
|
8150
8789
|
* limitations under the License.
|
|
8151
8790
|
*)
|
|
8791
|
+
|
|
8792
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
8152
8793
|
(**
|
|
8153
8794
|
* @license
|
|
8154
|
-
* Copyright
|
|
8795
|
+
* Copyright 2019 Google LLC
|
|
8155
8796
|
*
|
|
8156
8797
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8157
8798
|
* you may not use this file except in compliance with the License.
|
|
@@ -8165,8 +8806,6 @@
|
|
|
8165
8806
|
* See the License for the specific language governing permissions and
|
|
8166
8807
|
* limitations under the License.
|
|
8167
8808
|
*)
|
|
8168
|
-
|
|
8169
|
-
@firebase/auth/dist/esm2017/index-e3f1fbba.js:
|
|
8170
8809
|
(**
|
|
8171
8810
|
* @license
|
|
8172
8811
|
* Copyright 2020 Google LLC
|
|
@@ -8183,11 +8822,9 @@
|
|
|
8183
8822
|
* See the License for the specific language governing permissions and
|
|
8184
8823
|
* limitations under the License.
|
|
8185
8824
|
*)
|
|
8186
|
-
|
|
8187
|
-
@firebase/auth/dist/esm2017/index-e3f1fbba.js:
|
|
8188
8825
|
(**
|
|
8189
8826
|
* @license
|
|
8190
|
-
* Copyright 2020 Google LLC
|
|
8827
|
+
* Copyright 2020 Google LLC.
|
|
8191
8828
|
*
|
|
8192
8829
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8193
8830
|
* you may not use this file except in compliance with the License.
|
|
@@ -8202,7 +8839,7 @@
|
|
|
8202
8839
|
* limitations under the License.
|
|
8203
8840
|
*)
|
|
8204
8841
|
|
|
8205
|
-
@firebase/auth/dist/esm2017/index-
|
|
8842
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
8206
8843
|
(**
|
|
8207
8844
|
* @license
|
|
8208
8845
|
* Copyright 2020 Google LLC
|
|
@@ -8220,7 +8857,7 @@
|
|
|
8220
8857
|
* limitations under the License.
|
|
8221
8858
|
*)
|
|
8222
8859
|
|
|
8223
|
-
@firebase/auth/dist/esm2017/index-
|
|
8860
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
8224
8861
|
(**
|
|
8225
8862
|
* @license
|
|
8226
8863
|
* Copyright 2020 Google LLC
|
|
@@ -8238,7 +8875,7 @@
|
|
|
8238
8875
|
* limitations under the License.
|
|
8239
8876
|
*)
|
|
8240
8877
|
|
|
8241
|
-
@firebase/auth/dist/esm2017/index-
|
|
8878
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
8242
8879
|
(**
|
|
8243
8880
|
* @license
|
|
8244
8881
|
* Copyright 2020 Google LLC
|
|
@@ -8255,9 +8892,11 @@
|
|
|
8255
8892
|
* See the License for the specific language governing permissions and
|
|
8256
8893
|
* limitations under the License.
|
|
8257
8894
|
*)
|
|
8895
|
+
|
|
8896
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
8258
8897
|
(**
|
|
8259
8898
|
* @license
|
|
8260
|
-
* Copyright
|
|
8899
|
+
* Copyright 2020 Google LLC
|
|
8261
8900
|
*
|
|
8262
8901
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8263
8902
|
* you may not use this file except in compliance with the License.
|
|
@@ -8273,7 +8912,7 @@
|
|
|
8273
8912
|
*)
|
|
8274
8913
|
(**
|
|
8275
8914
|
* @license
|
|
8276
|
-
* Copyright
|
|
8915
|
+
* Copyright 2021 Google LLC
|
|
8277
8916
|
*
|
|
8278
8917
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8279
8918
|
* you may not use this file except in compliance with the License.
|
|
@@ -8287,11 +8926,9 @@
|
|
|
8287
8926
|
* See the License for the specific language governing permissions and
|
|
8288
8927
|
* limitations under the License.
|
|
8289
8928
|
*)
|
|
8290
|
-
|
|
8291
|
-
@firebase/auth/dist/esm2017/index-e3f1fbba.js:
|
|
8292
8929
|
(**
|
|
8293
8930
|
* @license
|
|
8294
|
-
* Copyright
|
|
8931
|
+
* Copyright 2019 Google LLC
|
|
8295
8932
|
*
|
|
8296
8933
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8297
8934
|
* you may not use this file except in compliance with the License.
|
|
@@ -8306,7 +8943,7 @@
|
|
|
8306
8943
|
* limitations under the License.
|
|
8307
8944
|
*)
|
|
8308
8945
|
|
|
8309
|
-
@firebase/auth/dist/esm2017/index-
|
|
8946
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
8310
8947
|
(**
|
|
8311
8948
|
* @license
|
|
8312
8949
|
* Copyright 2020 Google LLC
|
|
@@ -8324,7 +8961,7 @@
|
|
|
8324
8961
|
* limitations under the License.
|
|
8325
8962
|
*)
|
|
8326
8963
|
|
|
8327
|
-
@firebase/auth/dist/esm2017/index-
|
|
8964
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
8328
8965
|
(**
|
|
8329
8966
|
* @license
|
|
8330
8967
|
* Copyright 2020 Google LLC
|
|
@@ -8341,9 +8978,11 @@
|
|
|
8341
8978
|
* See the License for the specific language governing permissions and
|
|
8342
8979
|
* limitations under the License.
|
|
8343
8980
|
*)
|
|
8981
|
+
|
|
8982
|
+
@firebase/auth/dist/esm2017/index-9a76d29a.js:
|
|
8344
8983
|
(**
|
|
8345
8984
|
* @license
|
|
8346
|
-
* Copyright 2020 Google LLC
|
|
8985
|
+
* Copyright 2020 Google LLC
|
|
8347
8986
|
*
|
|
8348
8987
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8349
8988
|
* you may not use this file except in compliance with the License.
|
|
@@ -8359,7 +8998,7 @@
|
|
|
8359
8998
|
*)
|
|
8360
8999
|
(**
|
|
8361
9000
|
* @license
|
|
8362
|
-
* Copyright
|
|
9001
|
+
* Copyright 2020 Google LLC.
|
|
8363
9002
|
*
|
|
8364
9003
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8365
9004
|
* you may not use this file except in compliance with the License.
|
|
@@ -8373,11 +9012,9 @@
|
|
|
8373
9012
|
* See the License for the specific language governing permissions and
|
|
8374
9013
|
* limitations under the License.
|
|
8375
9014
|
*)
|
|
8376
|
-
|
|
8377
|
-
firebase/app/dist/esm/index.esm.js:
|
|
8378
9015
|
(**
|
|
8379
9016
|
* @license
|
|
8380
|
-
* Copyright
|
|
9017
|
+
* Copyright 2021 Google LLC
|
|
8381
9018
|
*
|
|
8382
9019
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8383
9020
|
* you may not use this file except in compliance with the License.
|