@feedmepos/mf-mdm 1.6.3 → 1.6.4-beta.217
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as jt, ref as Wt, watch as de, onMounted as Ht, resolveComponent as Me, openBlock as he, createElementBlock as De, createBlock as qt, createVNode as zt, nextTick as $t } from "vue";
|
|
2
|
-
import { r as ge, g as nt, i as
|
|
2
|
+
import { r as ge, g as nt, i as Gt, a as Bt, _, b as Fe, C as xe, c as it, d as Kt, e as rt, f as Jt, S as W, h as F, E as Ie, j as Xt, k as Yt, L as st, l as p, m as Qt, F as we, n as Zt, o as en, q as H, p as tn, u as nn, s as rn, t as sn, v as on } from "./index-a6504132.js";
|
|
3
3
|
import { useCoreStore as an } from "@feedmepos/mf-common";
|
|
4
4
|
import "pinia";
|
|
5
5
|
var cn = "firebase", ln = "10.12.2";
|
|
@@ -55,7 +55,7 @@ const Y = new Qt("@firebase/auth");
|
|
|
55
55
|
function dn(n, ...e) {
|
|
56
56
|
Y.logLevel <= st.WARN && Y.warn(`Auth (${W}): ${n}`, ...e);
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function B(n, ...e) {
|
|
59
59
|
Y.logLevel <= st.ERROR && Y.error(`Auth (${W}): ${n}`, ...e);
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
@@ -102,7 +102,7 @@ function l(n, e, ...t) {
|
|
|
102
102
|
}
|
|
103
103
|
function v(n) {
|
|
104
104
|
const e = "INTERNAL ASSERTION FAILED: " + n;
|
|
105
|
-
throw
|
|
105
|
+
throw B(e), new Error(e);
|
|
106
106
|
}
|
|
107
107
|
function T(n, e) {
|
|
108
108
|
n || v(e);
|
|
@@ -188,7 +188,7 @@ function pn() {
|
|
|
188
188
|
*/
|
|
189
189
|
class q {
|
|
190
190
|
constructor(e, t) {
|
|
191
|
-
this.shortDelay = e, this.longDelay = t, T(t > e, "Short delay should be less than long delay!"), this.isMobile =
|
|
191
|
+
this.shortDelay = e, this.longDelay = t, T(t > e, "Short delay should be less than long delay!"), this.isMobile = Gt() || Bt();
|
|
192
192
|
}
|
|
193
193
|
get() {
|
|
194
194
|
return fn() ? this.isMobile ? this.longDelay : this.shortDelay : Math.min(5e3, this.shortDelay);
|
|
@@ -411,17 +411,17 @@ async function ut(n, e, t) {
|
|
|
411
411
|
r.clearNetworkTimeout();
|
|
412
412
|
const o = await s.json();
|
|
413
413
|
if ("needConfirmation" in o)
|
|
414
|
-
throw
|
|
414
|
+
throw G(n, "account-exists-with-different-credential", o);
|
|
415
415
|
if (s.ok && !("errorMessage" in o))
|
|
416
416
|
return o;
|
|
417
417
|
{
|
|
418
418
|
const c = s.ok ? o.errorMessage : o.error.message, [a, u] = c.split(" : ");
|
|
419
419
|
if (a === "FEDERATED_USER_ID_ALREADY_LINKED")
|
|
420
|
-
throw
|
|
420
|
+
throw G(n, "credential-already-in-use", o);
|
|
421
421
|
if (a === "EMAIL_EXISTS")
|
|
422
|
-
throw
|
|
422
|
+
throw G(n, "email-already-in-use", o);
|
|
423
423
|
if (a === "USER_DISABLED")
|
|
424
|
-
throw
|
|
424
|
+
throw G(n, "user-disabled", o);
|
|
425
425
|
const h = i[a] || a.toLowerCase().replace(/[_\s]+/g, "-");
|
|
426
426
|
if (u)
|
|
427
427
|
throw ct(n, h, u);
|
|
@@ -457,7 +457,7 @@ class _n {
|
|
|
457
457
|
clearTimeout(this.timer);
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function G(n, e, t) {
|
|
461
461
|
const i = {
|
|
462
462
|
appName: n.name
|
|
463
463
|
};
|
|
@@ -537,12 +537,12 @@ function fe(n) {
|
|
|
537
537
|
function ke(n) {
|
|
538
538
|
const [e, t, i] = n.split(".");
|
|
539
539
|
if (e === void 0 || t === void 0 || i === void 0)
|
|
540
|
-
return
|
|
540
|
+
return B("JWT malformed, contained fewer than 3 sections"), null;
|
|
541
541
|
try {
|
|
542
542
|
const r = Zt(t);
|
|
543
|
-
return r ? JSON.parse(r) : (
|
|
543
|
+
return r ? JSON.parse(r) : (B("Failed to decode base64 JWT payload"), null);
|
|
544
544
|
} catch (r) {
|
|
545
|
-
return
|
|
545
|
+
return B("Caught error parsing JWT payload as JSON", r == null ? void 0 : r.toString()), null;
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
548
|
function je(n) {
|
|
@@ -1285,17 +1285,17 @@ function yt(n = p()) {
|
|
|
1285
1285
|
function ie(n = p()) {
|
|
1286
1286
|
return /iphone|ipad|ipod/i.test(n) || /macintosh/i.test(n) && /mobile/i.test(n);
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1288
|
+
function bn(n = p()) {
|
|
1289
1289
|
var e;
|
|
1290
1290
|
return ie(n) && !!(!((e = window.navigator) === null || e === void 0) && e.standalone);
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1292
|
+
function Pn() {
|
|
1293
1293
|
return en() && document.documentMode === 10;
|
|
1294
1294
|
}
|
|
1295
1295
|
function Tt(n = p()) {
|
|
1296
1296
|
return ie(n) || It(n) || yt(n) || wt(n) || /windows phone/i.test(n) || vt(n);
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1298
|
+
function Rn() {
|
|
1299
1299
|
try {
|
|
1300
1300
|
return !!(window && window !== window.top);
|
|
1301
1301
|
} catch {
|
|
@@ -1876,7 +1876,7 @@ class ze {
|
|
|
1876
1876
|
* See the License for the specific language governing permissions and
|
|
1877
1877
|
* limitations under the License.
|
|
1878
1878
|
*/
|
|
1879
|
-
let
|
|
1879
|
+
let be = {
|
|
1880
1880
|
async loadJS() {
|
|
1881
1881
|
throw new Error("Unable to load external scripts");
|
|
1882
1882
|
},
|
|
@@ -1885,13 +1885,13 @@ let Re = {
|
|
|
1885
1885
|
gapiScript: ""
|
|
1886
1886
|
};
|
|
1887
1887
|
function Un(n) {
|
|
1888
|
-
|
|
1888
|
+
be = n;
|
|
1889
1889
|
}
|
|
1890
1890
|
function Mn(n) {
|
|
1891
|
-
return
|
|
1891
|
+
return be.loadJS(n);
|
|
1892
1892
|
}
|
|
1893
1893
|
function Dn() {
|
|
1894
|
-
return
|
|
1894
|
+
return be.gapiScript;
|
|
1895
1895
|
}
|
|
1896
1896
|
function Fn(n) {
|
|
1897
1897
|
return `__${n}${Math.floor(Math.random() * 1e6)}`;
|
|
@@ -2144,7 +2144,7 @@ class C extends St {
|
|
|
2144
2144
|
* See the License for the specific language governing permissions and
|
|
2145
2145
|
* limitations under the License.
|
|
2146
2146
|
*/
|
|
2147
|
-
class
|
|
2147
|
+
class bt {
|
|
2148
2148
|
/**
|
|
2149
2149
|
* Constructor for generic OAuth providers.
|
|
2150
2150
|
*
|
|
@@ -2197,7 +2197,7 @@ class Rt {
|
|
|
2197
2197
|
* See the License for the specific language governing permissions and
|
|
2198
2198
|
* limitations under the License.
|
|
2199
2199
|
*/
|
|
2200
|
-
class z extends
|
|
2200
|
+
class z extends bt {
|
|
2201
2201
|
constructor() {
|
|
2202
2202
|
super(...arguments), this.scopes = [];
|
|
2203
2203
|
}
|
|
@@ -2303,7 +2303,7 @@ S.PROVIDER_ID = "facebook.com";
|
|
|
2303
2303
|
* See the License for the specific language governing permissions and
|
|
2304
2304
|
* limitations under the License.
|
|
2305
2305
|
*/
|
|
2306
|
-
class
|
|
2306
|
+
class b extends z {
|
|
2307
2307
|
constructor() {
|
|
2308
2308
|
super(
|
|
2309
2309
|
"google.com"
|
|
@@ -2325,8 +2325,8 @@ class R extends z {
|
|
|
2325
2325
|
*/
|
|
2326
2326
|
static credential(e, t) {
|
|
2327
2327
|
return C._fromParams({
|
|
2328
|
-
providerId:
|
|
2329
|
-
signInMethod:
|
|
2328
|
+
providerId: b.PROVIDER_ID,
|
|
2329
|
+
signInMethod: b.GOOGLE_SIGN_IN_METHOD,
|
|
2330
2330
|
idToken: e,
|
|
2331
2331
|
accessToken: t
|
|
2332
2332
|
});
|
|
@@ -2337,7 +2337,7 @@ class R extends z {
|
|
|
2337
2337
|
* @param userCredential - The user credential.
|
|
2338
2338
|
*/
|
|
2339
2339
|
static credentialFromResult(e) {
|
|
2340
|
-
return
|
|
2340
|
+
return b.credentialFromTaggedObject(e);
|
|
2341
2341
|
}
|
|
2342
2342
|
/**
|
|
2343
2343
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -2346,7 +2346,7 @@ class R extends z {
|
|
|
2346
2346
|
* @param userCredential - The user credential.
|
|
2347
2347
|
*/
|
|
2348
2348
|
static credentialFromError(e) {
|
|
2349
|
-
return
|
|
2349
|
+
return b.credentialFromTaggedObject(e.customData || {});
|
|
2350
2350
|
}
|
|
2351
2351
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
2352
2352
|
if (!e)
|
|
@@ -2355,14 +2355,14 @@ class R extends z {
|
|
|
2355
2355
|
if (!t && !i)
|
|
2356
2356
|
return null;
|
|
2357
2357
|
try {
|
|
2358
|
-
return
|
|
2358
|
+
return b.credential(t, i);
|
|
2359
2359
|
} catch {
|
|
2360
2360
|
return null;
|
|
2361
2361
|
}
|
|
2362
2362
|
}
|
|
2363
2363
|
}
|
|
2364
|
-
|
|
2365
|
-
|
|
2364
|
+
b.GOOGLE_SIGN_IN_METHOD = "google.com";
|
|
2365
|
+
b.PROVIDER_ID = "google.com";
|
|
2366
2366
|
/**
|
|
2367
2367
|
* @license
|
|
2368
2368
|
* Copyright 2020 Google LLC
|
|
@@ -2379,7 +2379,7 @@ R.PROVIDER_ID = "google.com";
|
|
|
2379
2379
|
* See the License for the specific language governing permissions and
|
|
2380
2380
|
* limitations under the License.
|
|
2381
2381
|
*/
|
|
2382
|
-
class
|
|
2382
|
+
class P extends z {
|
|
2383
2383
|
constructor() {
|
|
2384
2384
|
super(
|
|
2385
2385
|
"github.com"
|
|
@@ -2393,8 +2393,8 @@ class b extends z {
|
|
|
2393
2393
|
*/
|
|
2394
2394
|
static credential(e) {
|
|
2395
2395
|
return C._fromParams({
|
|
2396
|
-
providerId:
|
|
2397
|
-
signInMethod:
|
|
2396
|
+
providerId: P.PROVIDER_ID,
|
|
2397
|
+
signInMethod: P.GITHUB_SIGN_IN_METHOD,
|
|
2398
2398
|
accessToken: e
|
|
2399
2399
|
});
|
|
2400
2400
|
}
|
|
@@ -2404,7 +2404,7 @@ class b extends z {
|
|
|
2404
2404
|
* @param userCredential - The user credential.
|
|
2405
2405
|
*/
|
|
2406
2406
|
static credentialFromResult(e) {
|
|
2407
|
-
return
|
|
2407
|
+
return P.credentialFromTaggedObject(e);
|
|
2408
2408
|
}
|
|
2409
2409
|
/**
|
|
2410
2410
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -2413,20 +2413,20 @@ class b extends z {
|
|
|
2413
2413
|
* @param userCredential - The user credential.
|
|
2414
2414
|
*/
|
|
2415
2415
|
static credentialFromError(e) {
|
|
2416
|
-
return
|
|
2416
|
+
return P.credentialFromTaggedObject(e.customData || {});
|
|
2417
2417
|
}
|
|
2418
2418
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
2419
2419
|
if (!e || !("oauthAccessToken" in e) || !e.oauthAccessToken)
|
|
2420
2420
|
return null;
|
|
2421
2421
|
try {
|
|
2422
|
-
return
|
|
2422
|
+
return P.credential(e.oauthAccessToken);
|
|
2423
2423
|
} catch {
|
|
2424
2424
|
return null;
|
|
2425
2425
|
}
|
|
2426
2426
|
}
|
|
2427
2427
|
}
|
|
2428
|
-
|
|
2429
|
-
|
|
2428
|
+
P.GITHUB_SIGN_IN_METHOD = "github.com";
|
|
2429
|
+
P.PROVIDER_ID = "github.com";
|
|
2430
2430
|
/**
|
|
2431
2431
|
* @license
|
|
2432
2432
|
* Copyright 2020 Google LLC
|
|
@@ -2443,7 +2443,7 @@ b.PROVIDER_ID = "github.com";
|
|
|
2443
2443
|
* See the License for the specific language governing permissions and
|
|
2444
2444
|
* limitations under the License.
|
|
2445
2445
|
*/
|
|
2446
|
-
class
|
|
2446
|
+
class R extends z {
|
|
2447
2447
|
constructor() {
|
|
2448
2448
|
super(
|
|
2449
2449
|
"twitter.com"
|
|
@@ -2458,8 +2458,8 @@ class P extends z {
|
|
|
2458
2458
|
*/
|
|
2459
2459
|
static credential(e, t) {
|
|
2460
2460
|
return C._fromParams({
|
|
2461
|
-
providerId:
|
|
2462
|
-
signInMethod:
|
|
2461
|
+
providerId: R.PROVIDER_ID,
|
|
2462
|
+
signInMethod: R.TWITTER_SIGN_IN_METHOD,
|
|
2463
2463
|
oauthToken: e,
|
|
2464
2464
|
oauthTokenSecret: t
|
|
2465
2465
|
});
|
|
@@ -2470,7 +2470,7 @@ class P extends z {
|
|
|
2470
2470
|
* @param userCredential - The user credential.
|
|
2471
2471
|
*/
|
|
2472
2472
|
static credentialFromResult(e) {
|
|
2473
|
-
return
|
|
2473
|
+
return R.credentialFromTaggedObject(e);
|
|
2474
2474
|
}
|
|
2475
2475
|
/**
|
|
2476
2476
|
* Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was
|
|
@@ -2479,7 +2479,7 @@ class P extends z {
|
|
|
2479
2479
|
* @param userCredential - The user credential.
|
|
2480
2480
|
*/
|
|
2481
2481
|
static credentialFromError(e) {
|
|
2482
|
-
return
|
|
2482
|
+
return R.credentialFromTaggedObject(e.customData || {});
|
|
2483
2483
|
}
|
|
2484
2484
|
static credentialFromTaggedObject({ _tokenResponse: e }) {
|
|
2485
2485
|
if (!e)
|
|
@@ -2488,14 +2488,14 @@ class P extends z {
|
|
|
2488
2488
|
if (!t || !i)
|
|
2489
2489
|
return null;
|
|
2490
2490
|
try {
|
|
2491
|
-
return
|
|
2491
|
+
return R.credential(t, i);
|
|
2492
2492
|
} catch {
|
|
2493
2493
|
return null;
|
|
2494
2494
|
}
|
|
2495
2495
|
}
|
|
2496
2496
|
}
|
|
2497
|
-
|
|
2498
|
-
|
|
2497
|
+
R.TWITTER_SIGN_IN_METHOD = "twitter.com";
|
|
2498
|
+
R.PROVIDER_ID = "twitter.com";
|
|
2499
2499
|
/**
|
|
2500
2500
|
* @license
|
|
2501
2501
|
* Copyright 2020 Google LLC
|
|
@@ -2517,7 +2517,7 @@ class O {
|
|
|
2517
2517
|
this.user = e.user, this.providerId = e.providerId, this._tokenResponse = e._tokenResponse, this.operationType = e.operationType;
|
|
2518
2518
|
}
|
|
2519
2519
|
static async _fromIdTokenResponse(e, t, i, r = !1) {
|
|
2520
|
-
const s = await I._fromIdTokenResponse(e, i, r), o =
|
|
2520
|
+
const s = await I._fromIdTokenResponse(e, i, r), o = Ge(i);
|
|
2521
2521
|
return new O({
|
|
2522
2522
|
user: s,
|
|
2523
2523
|
providerId: o,
|
|
@@ -2531,7 +2531,7 @@ class O {
|
|
|
2531
2531
|
/* reload */
|
|
2532
2532
|
!0
|
|
2533
2533
|
);
|
|
2534
|
-
const r =
|
|
2534
|
+
const r = Ge(i);
|
|
2535
2535
|
return new O({
|
|
2536
2536
|
user: e,
|
|
2537
2537
|
providerId: r,
|
|
@@ -2540,7 +2540,7 @@ class O {
|
|
|
2540
2540
|
});
|
|
2541
2541
|
}
|
|
2542
2542
|
}
|
|
2543
|
-
function
|
|
2543
|
+
function Ge(n) {
|
|
2544
2544
|
return n.providerId ? n.providerId : "phoneNumber" in n ? "phone" : null;
|
|
2545
2545
|
}
|
|
2546
2546
|
/**
|
|
@@ -2573,7 +2573,7 @@ class Z extends we {
|
|
|
2573
2573
|
return new Z(e, t, i, r);
|
|
2574
2574
|
}
|
|
2575
2575
|
}
|
|
2576
|
-
function
|
|
2576
|
+
function Pt(n, e, t, i) {
|
|
2577
2577
|
return (e === "reauthenticate" ? t._getReauthenticationResolver(n) : t._getIdTokenResponse(n)).catch((s) => {
|
|
2578
2578
|
throw s.code === "auth/multi-factor-auth-required" ? Z._fromErrorAndOperation(n, s, e, i) : s;
|
|
2579
2579
|
});
|
|
@@ -2604,7 +2604,7 @@ async function $n(n, e, t = !1) {
|
|
|
2604
2604
|
return Promise.reject(A(i));
|
|
2605
2605
|
const r = "reauthenticate";
|
|
2606
2606
|
try {
|
|
2607
|
-
const s = await j(n,
|
|
2607
|
+
const s = await j(n, Pt(i, r, e, n), t);
|
|
2608
2608
|
l(
|
|
2609
2609
|
s.idToken,
|
|
2610
2610
|
i,
|
|
@@ -2649,10 +2649,10 @@ async function $n(n, e, t = !1) {
|
|
|
2649
2649
|
* See the License for the specific language governing permissions and
|
|
2650
2650
|
* limitations under the License.
|
|
2651
2651
|
*/
|
|
2652
|
-
async function
|
|
2652
|
+
async function Gn(n, e, t = !1) {
|
|
2653
2653
|
if (_(n.app))
|
|
2654
2654
|
return Promise.reject(A(n));
|
|
2655
|
-
const i = "signIn", r = await
|
|
2655
|
+
const i = "signIn", r = await Pt(n, i, e), s = await O._fromIdTokenResponse(n, i, r);
|
|
2656
2656
|
return t || await n._updateCurrentUser(s.user), s;
|
|
2657
2657
|
}
|
|
2658
2658
|
/**
|
|
@@ -2671,7 +2671,7 @@ async function Bn(n, e, t = !1) {
|
|
|
2671
2671
|
* See the License for the specific language governing permissions and
|
|
2672
2672
|
* limitations under the License.
|
|
2673
2673
|
*/
|
|
2674
|
-
async function
|
|
2674
|
+
async function Bn(n, e) {
|
|
2675
2675
|
return dt(n, "POST", "/v1/accounts:signInWithCustomToken", ne(n, e));
|
|
2676
2676
|
}
|
|
2677
2677
|
/**
|
|
@@ -2693,7 +2693,7 @@ async function Gn(n, e) {
|
|
|
2693
2693
|
async function Kn(n, e) {
|
|
2694
2694
|
if (_(n.app))
|
|
2695
2695
|
return Promise.reject(A(n));
|
|
2696
|
-
const t = re(n), i = await
|
|
2696
|
+
const t = re(n), i = await Bn(t, {
|
|
2697
2697
|
token: e,
|
|
2698
2698
|
returnSecureToken: !0
|
|
2699
2699
|
}), r = await O._fromIdTokenResponse(t, "signIn", i);
|
|
@@ -2722,7 +2722,7 @@ const ee = "__sak";
|
|
|
2722
2722
|
* See the License for the specific language governing permissions and
|
|
2723
2723
|
* limitations under the License.
|
|
2724
2724
|
*/
|
|
2725
|
-
class
|
|
2725
|
+
class Rt {
|
|
2726
2726
|
constructor(e, t) {
|
|
2727
2727
|
this.storageRetriever = e, this.type = t;
|
|
2728
2728
|
}
|
|
@@ -2768,13 +2768,13 @@ function Yn() {
|
|
|
2768
2768
|
return Se(n) || ie(n);
|
|
2769
2769
|
}
|
|
2770
2770
|
const Qn = 1e3, Zn = 10;
|
|
2771
|
-
class At extends
|
|
2771
|
+
class At extends Rt {
|
|
2772
2772
|
constructor() {
|
|
2773
2773
|
super(
|
|
2774
2774
|
() => window.localStorage,
|
|
2775
2775
|
"LOCAL"
|
|
2776
2776
|
/* PersistenceType.LOCAL */
|
|
2777
|
-
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = Yn() &&
|
|
2777
|
+
), this.boundEventHandler = (e, t) => this.onStorageEvent(e, t), this.listeners = {}, this.localCache = {}, this.pollTimer = null, this.safariLocalStorageNotSynced = Yn() && Rn(), this.fallbackToPolling = Tt(), this._shouldAllowMigration = !0;
|
|
2778
2778
|
}
|
|
2779
2779
|
forAllChangedKeys(e) {
|
|
2780
2780
|
for (const t of Object.keys(this.listeners)) {
|
|
@@ -2801,7 +2801,7 @@ class At extends Pt {
|
|
|
2801
2801
|
const o = this.storage.getItem(i);
|
|
2802
2802
|
!t && this.localCache[i] === o || this.notifyListeners(i, o);
|
|
2803
2803
|
}, s = this.storage.getItem(i);
|
|
2804
|
-
|
|
2804
|
+
Pn() && s !== e.newValue && e.newValue !== e.oldValue ? setTimeout(r, Zn) : r();
|
|
2805
2805
|
}
|
|
2806
2806
|
notifyListeners(e, t) {
|
|
2807
2807
|
this.localCache[e] = t;
|
|
@@ -2870,7 +2870,7 @@ const ei = At;
|
|
|
2870
2870
|
* See the License for the specific language governing permissions and
|
|
2871
2871
|
* limitations under the License.
|
|
2872
2872
|
*/
|
|
2873
|
-
class Ct extends
|
|
2873
|
+
class Ct extends Rt {
|
|
2874
2874
|
constructor() {
|
|
2875
2875
|
super(
|
|
2876
2876
|
() => window.sessionStorage,
|
|
@@ -3017,7 +3017,7 @@ se.receivers = [];
|
|
|
3017
3017
|
* See the License for the specific language governing permissions and
|
|
3018
3018
|
* limitations under the License.
|
|
3019
3019
|
*/
|
|
3020
|
-
function
|
|
3020
|
+
function Pe(n = "", e = 10) {
|
|
3021
3021
|
let t = "";
|
|
3022
3022
|
for (let i = 0; i < e; i++)
|
|
3023
3023
|
t += Math.floor(Math.random() * 10);
|
|
@@ -3073,7 +3073,7 @@ class ni {
|
|
|
3073
3073
|
);
|
|
3074
3074
|
let s, o;
|
|
3075
3075
|
return new Promise((c, a) => {
|
|
3076
|
-
const u =
|
|
3076
|
+
const u = Pe("", 20);
|
|
3077
3077
|
r.port1.start();
|
|
3078
3078
|
const h = setTimeout(() => {
|
|
3079
3079
|
a(new Error(
|
|
@@ -3233,7 +3233,7 @@ function ve() {
|
|
|
3233
3233
|
});
|
|
3234
3234
|
});
|
|
3235
3235
|
}
|
|
3236
|
-
async function
|
|
3236
|
+
async function Be(n, e, t) {
|
|
3237
3237
|
const i = oe(n, !0).put({
|
|
3238
3238
|
[Ut]: e,
|
|
3239
3239
|
value: t
|
|
@@ -3338,7 +3338,7 @@ class Mt {
|
|
|
3338
3338
|
if (!indexedDB)
|
|
3339
3339
|
return !1;
|
|
3340
3340
|
const e = await ve();
|
|
3341
|
-
return await
|
|
3341
|
+
return await Be(e, ee, "1"), await Ke(e, ee), !0;
|
|
3342
3342
|
} catch {
|
|
3343
3343
|
}
|
|
3344
3344
|
return !1;
|
|
@@ -3352,7 +3352,7 @@ class Mt {
|
|
|
3352
3352
|
}
|
|
3353
3353
|
}
|
|
3354
3354
|
async _set(e, t) {
|
|
3355
|
-
return this._withPendingWrite(async () => (await this._withRetries((i) =>
|
|
3355
|
+
return this._withPendingWrite(async () => (await this._withRetries((i) => Be(i, e, t)), this.localCache[e] = t, this.notifyServiceWorker(e)));
|
|
3356
3356
|
}
|
|
3357
3357
|
async _get(e) {
|
|
3358
3358
|
const t = await this._withRetries((i) => li(i, e));
|
|
@@ -3441,7 +3441,7 @@ function fi(n, e) {
|
|
|
3441
3441
|
* See the License for the specific language governing permissions and
|
|
3442
3442
|
* limitations under the License.
|
|
3443
3443
|
*/
|
|
3444
|
-
class
|
|
3444
|
+
class Re extends St {
|
|
3445
3445
|
constructor(e) {
|
|
3446
3446
|
super(
|
|
3447
3447
|
"custom",
|
|
@@ -3472,7 +3472,7 @@ class Pe extends St {
|
|
|
3472
3472
|
}
|
|
3473
3473
|
}
|
|
3474
3474
|
function pi(n) {
|
|
3475
|
-
return
|
|
3475
|
+
return Gn(n.auth, new Re(n), n.bypassAuthState);
|
|
3476
3476
|
}
|
|
3477
3477
|
function gi(n) {
|
|
3478
3478
|
const { auth: e, user: t } = n;
|
|
@@ -3481,7 +3481,7 @@ function gi(n) {
|
|
|
3481
3481
|
e,
|
|
3482
3482
|
"internal-error"
|
|
3483
3483
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3484
|
-
), $n(t, new
|
|
3484
|
+
), $n(t, new Re(n), n.bypassAuthState);
|
|
3485
3485
|
}
|
|
3486
3486
|
async function mi(n) {
|
|
3487
3487
|
const { auth: e, user: t } = n;
|
|
@@ -3490,7 +3490,7 @@ async function mi(n) {
|
|
|
3490
3490
|
e,
|
|
3491
3491
|
"internal-error"
|
|
3492
3492
|
/* AuthErrorCode.INTERNAL_ERROR */
|
|
3493
|
-
), zn(t, new
|
|
3493
|
+
), zn(t, new Re(n), n.bypassAuthState);
|
|
3494
3494
|
}
|
|
3495
3495
|
/**
|
|
3496
3496
|
* @license
|
|
@@ -3607,7 +3607,7 @@ class L extends Dt {
|
|
|
3607
3607
|
}
|
|
3608
3608
|
async onExecution() {
|
|
3609
3609
|
T(this.filter.length === 1, "Popup operations only handle one event");
|
|
3610
|
-
const e =
|
|
3610
|
+
const e = Pe();
|
|
3611
3611
|
this.authWindow = await this.resolver._openPopup(
|
|
3612
3612
|
this.auth,
|
|
3613
3613
|
this.provider,
|
|
@@ -3763,7 +3763,7 @@ async function ki(n, e, t = !1) {
|
|
|
3763
3763
|
* limitations under the License.
|
|
3764
3764
|
*/
|
|
3765
3765
|
const Si = 10 * 60 * 1e3;
|
|
3766
|
-
class
|
|
3766
|
+
class bi {
|
|
3767
3767
|
constructor(e) {
|
|
3768
3768
|
this.auth = e, this.cachedEventUids = /* @__PURE__ */ new Set(), this.consumers = /* @__PURE__ */ new Set(), this.queuedRedirectEvent = null, this.hasHandledPotentialRedirect = !1, this.lastProcessedEventTime = Date.now();
|
|
3769
3769
|
}
|
|
@@ -3779,7 +3779,7 @@ class Ri {
|
|
|
3779
3779
|
let t = !1;
|
|
3780
3780
|
return this.consumers.forEach((i) => {
|
|
3781
3781
|
this.isEventForConsumer(e, i) && (t = !0, this.sendToConsumer(e, i), this.saveEventToCache(e));
|
|
3782
|
-
}), this.hasHandledPotentialRedirect || !
|
|
3782
|
+
}), this.hasHandledPotentialRedirect || !Pi(e) || (this.hasHandledPotentialRedirect = !0, t || (this.queuedRedirectEvent = e, t = !0)), t;
|
|
3783
3783
|
}
|
|
3784
3784
|
sendToConsumer(e, t) {
|
|
3785
3785
|
var i;
|
|
@@ -3806,7 +3806,7 @@ function Je(n) {
|
|
|
3806
3806
|
function Ft({ type: n, error: e }) {
|
|
3807
3807
|
return n === "unknown" && (e == null ? void 0 : e.code) === "auth/no-auth-event";
|
|
3808
3808
|
}
|
|
3809
|
-
function
|
|
3809
|
+
function Pi(n) {
|
|
3810
3810
|
switch (n.type) {
|
|
3811
3811
|
case "signInViaRedirect":
|
|
3812
3812
|
case "linkViaRedirect":
|
|
@@ -3834,7 +3834,7 @@ function bi(n) {
|
|
|
3834
3834
|
* See the License for the specific language governing permissions and
|
|
3835
3835
|
* limitations under the License.
|
|
3836
3836
|
*/
|
|
3837
|
-
async function
|
|
3837
|
+
async function Ri(n, e = {}) {
|
|
3838
3838
|
return x(n, "GET", "/v1/projects", e);
|
|
3839
3839
|
}
|
|
3840
3840
|
/**
|
|
@@ -3857,7 +3857,7 @@ const Ai = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/, Ci = /^https?/;
|
|
|
3857
3857
|
async function Oi(n) {
|
|
3858
3858
|
if (n.config.emulator)
|
|
3859
3859
|
return;
|
|
3860
|
-
const { authorizedDomains: e } = await
|
|
3860
|
+
const { authorizedDomains: e } = await Ri(n);
|
|
3861
3861
|
for (const t of e)
|
|
3862
3862
|
try {
|
|
3863
3863
|
if (Ni(t))
|
|
@@ -4051,7 +4051,7 @@ const qi = {
|
|
|
4051
4051
|
resizable: "yes",
|
|
4052
4052
|
statusbar: "yes",
|
|
4053
4053
|
toolbar: "no"
|
|
4054
|
-
}, zi = 500, $i = 600,
|
|
4054
|
+
}, zi = 500, $i = 600, Gi = "_blank", Bi = "http://localhost";
|
|
4055
4055
|
class Ye {
|
|
4056
4056
|
constructor(e) {
|
|
4057
4057
|
this.window = e, this.associatedEvent = null;
|
|
@@ -4073,9 +4073,9 @@ function Ki(n, e, t, i = zi, r = $i) {
|
|
|
4073
4073
|
top: s,
|
|
4074
4074
|
left: o
|
|
4075
4075
|
}), u = p().toLowerCase();
|
|
4076
|
-
t && (c = _t(u) ?
|
|
4076
|
+
t && (c = _t(u) ? Gi : t), mt(u) && (e = e || Bi, a.scrollbars = "yes");
|
|
4077
4077
|
const h = Object.entries(a).reduce((f, [E, N]) => `${f}${E}=${N},`, "");
|
|
4078
|
-
if (
|
|
4078
|
+
if (bn(u) && c !== "_self")
|
|
4079
4079
|
return Ji(e || "", c), new Ye(null);
|
|
4080
4080
|
const d = window.open(e || "", c, h);
|
|
4081
4081
|
l(
|
|
@@ -4133,7 +4133,7 @@ async function Qe(n, e, t, i, r, s) {
|
|
|
4133
4133
|
v: W,
|
|
4134
4134
|
eventId: r
|
|
4135
4135
|
};
|
|
4136
|
-
if (e instanceof
|
|
4136
|
+
if (e instanceof bt) {
|
|
4137
4137
|
e.setDefaultLanguage(n.languageCode), o.providerId = e.providerId || "", tn(e.getCustomParameters()) || (o.customParameters = JSON.stringify(e.getCustomParameters()));
|
|
4138
4138
|
for (const [h, d] of Object.entries(s || {}))
|
|
4139
4139
|
o[h] = d;
|
|
@@ -4179,7 +4179,7 @@ class er {
|
|
|
4179
4179
|
var s;
|
|
4180
4180
|
T((s = this.eventManagers[e._key()]) === null || s === void 0 ? void 0 : s.manager, "_initialize() not called before _openPopup()");
|
|
4181
4181
|
const o = await Qe(e, t, i, me(), r);
|
|
4182
|
-
return Ki(e, o,
|
|
4182
|
+
return Ki(e, o, Pe());
|
|
4183
4183
|
}
|
|
4184
4184
|
async _openRedirect(e, t, i, r) {
|
|
4185
4185
|
await this._originValidation(e);
|
|
@@ -4199,7 +4199,7 @@ class er {
|
|
|
4199
4199
|
}), i;
|
|
4200
4200
|
}
|
|
4201
4201
|
async initAndGetManager(e) {
|
|
4202
|
-
const t = await Hi(e), i = new
|
|
4202
|
+
const t = await Hi(e), i = new bi(e);
|
|
4203
4203
|
return t.register("authEvent", (r) => (l(
|
|
4204
4204
|
r == null ? void 0 : r.authEvent,
|
|
4205
4205
|
e,
|
|
@@ -4441,7 +4441,7 @@ const ur = { class: "bg-white flex flex-col max-h-dvh" }, dr = {
|
|
|
4441
4441
|
__name: "App",
|
|
4442
4442
|
setup(n) {
|
|
4443
4443
|
const e = Wt(!1), { currentBusiness: t, readRestaurants: i, fetchUserPermissions: r, sessionUser: s, signIn: o } = an(), c = nn();
|
|
4444
|
-
rn().length === 0 ? sn({ apiKey: "
|
|
4444
|
+
rn().length === 0 ? sn({ apiKey: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", authDomain: "feedme-dev-4c3ef.firebaseapp.com", databaseURL: "https://feedme-dev-4c3ef.firebaseio.com", projectId: "feedme-dev-4c3ef", storageBucket: "feedme-dev-4c3ef.appspot.com", messagingSenderId: "458797803788", appId: "458797803788", measurementId: "G-YH5GZ1DF39" }) : rt();
|
|
4445
4445
|
const a = async () => {
|
|
4446
4446
|
var d;
|
|
4447
4447
|
try {
|
|
@@ -4452,7 +4452,7 @@ const ur = { class: "bg-white flex flex-col max-h-dvh" }, dr = {
|
|
|
4452
4452
|
}, u = () => {
|
|
4453
4453
|
const { init: d } = on();
|
|
4454
4454
|
d({
|
|
4455
|
-
apiKey: "
|
|
4455
|
+
apiKey: "MaGoXrEWuEJNpWgKTqseee",
|
|
4456
4456
|
url: {}.VITE_FEATURE_FLAG_URL
|
|
4457
4457
|
}).catch((f) => console.warn("Feature flag initialization failed:", f));
|
|
4458
4458
|
}, h = async () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as Ne, resolveComponent as I, openBlock as p, createElementBlock as g, createElementVNode as l, toDisplayString as h, unref as i, createVNode as f, computed as Q, ref as N, watch as je, onMounted as mt, createBlock as V, isRef as nn, createSlots as On, withCtx as k, createCommentVNode as C, Fragment as oe, renderList as me, normalizeClass as on, withModifiers as Rt, nextTick as sn, createTextVNode as Ct, Teleport as Sn, h as X } from "vue";
|
|
2
|
-
import { b as An, C as Dn, r as Wt, h as nt, c as xn, w as zn, e as Nn, S as Pn, x as Un, F as Ln, u as an, y as Z, z as Mn, A as J, B as Tt, D as we, G as pt, H as ln, I as lt, v as Bn } from "./index-
|
|
2
|
+
import { b as An, C as Dn, r as Wt, h as nt, c as xn, w as zn, e as Nn, S as Pn, x as Un, F as Ln, u as an, y as Z, z as Mn, A as J, B as Tt, D as we, G as pt, H as ln, I as lt, v as Bn } from "./index-a6504132.js";
|
|
3
3
|
import { useI18n as Se, useCoreStore as ft } from "@feedmepos/mf-common";
|
|
4
4
|
import { useProxiedModel as dt, useSnackbar as qe, SnackbarPosition as W, useBreakpoints as Ot, useDialog as St, useDialogChild as rn, components as $e } from "@feedmepos/ui-library";
|
|
5
5
|
import { storeToRefs as $n } from "pinia";
|
|
@@ -2976,7 +2976,7 @@ const ba = { class: "fm-typo-en-body-md-400" }, ya = { class: "xs:flex-col-rever
|
|
|
2976
2976
|
}, se = (r) => {
|
|
2977
2977
|
if (!r.restaurantId)
|
|
2978
2978
|
return;
|
|
2979
|
-
const v = `https://grafana.feedme.farm/d/ee5tjb68adwjkb/pos-dashboard-quickwit?orgId=1&var-maxRows=1000&var-severity=All&var-env=
|
|
2979
|
+
const v = `https://grafana.feedme.farm/d/ee5tjb68adwjkb/pos-dashboard-quickwit?orgId=1&var-maxRows=1000&var-severity=All&var-env=dev&var-country=All&var-restaurantId=${r.restaurantId}`;
|
|
2980
2980
|
d.open({
|
|
2981
2981
|
message: t("device.logs.redirect", { name: r.name ?? fe(r.restaurantId) }),
|
|
2982
2982
|
type: "success",
|
package/dist/app.js
CHANGED
|
@@ -888,13 +888,13 @@ const r = {
|
|
|
888
888
|
{
|
|
889
889
|
path: "/",
|
|
890
890
|
name: "$devices",
|
|
891
|
-
component: e(() => import("./DeviceList-
|
|
891
|
+
component: e(() => import("./DeviceList-8bc285f7.js"))
|
|
892
892
|
}
|
|
893
893
|
], l = {
|
|
894
894
|
"en-US": i,
|
|
895
895
|
"zh-CN": n,
|
|
896
896
|
"th-TH": a
|
|
897
|
-
}, m = e(() => import("./App-
|
|
897
|
+
}, m = e(() => import("./App-44782dae.js"));
|
|
898
898
|
export {
|
|
899
899
|
m as FmApp,
|
|
900
900
|
l as i18nMessages,
|