@hostlink/light 2.11.1 → 2.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/createClient.d.ts +2 -2
- package/dist/createList.d.ts +3 -1
- package/dist/index.d.ts +3 -0
- package/dist/light.js +634 -493
- package/dist/light.umd.cjs +1 -1
- package/dist/model.d.ts +176 -16
- package/dist/useModel.d.ts +271 -0
- package/dist/users.d.ts +17 -1
- package/package.json +1 -1
- package/dist/gqlBuilder.d.ts +0 -6
- package/dist/model.test.d.ts +0 -1
- package/dist/models.d.ts +0 -9
package/dist/light.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { jsonToGraphQLQuery as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
const
|
|
1
|
+
var U = Object.defineProperty;
|
|
2
|
+
var L = (t, e, r) => e in t ? U(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
3
|
+
var F = (t, e, r) => L(t, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
+
import { jsonToGraphQLQuery as N, VariableType as C } from "json-to-graphql-query";
|
|
5
|
+
import J from "axios";
|
|
6
|
+
import P from "collect.js";
|
|
7
|
+
const I = (t) => ({
|
|
8
8
|
assertion: async () => {
|
|
9
9
|
const { app: s } = await m(t, {
|
|
10
10
|
app: {
|
|
@@ -12,8 +12,8 @@ const U = (t) => ({
|
|
|
12
12
|
webAuthnRequestOptions: !0
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
}),
|
|
16
|
-
return await navigator.credentials.get({ publicKey:
|
|
15
|
+
}), n = s.auth.webAuthnRequestOptions, c = PublicKeyCredential.parseRequestOptionsFromJSON(n);
|
|
16
|
+
return await navigator.credentials.get({ publicKey: c });
|
|
17
17
|
},
|
|
18
18
|
attestation: async () => {
|
|
19
19
|
const { app: s } = await m(t, {
|
|
@@ -22,80 +22,484 @@ const U = (t) => ({
|
|
|
22
22
|
webAuthnCreationOptions: !0
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
}),
|
|
26
|
-
return await navigator.credentials.create({ publicKey:
|
|
25
|
+
}), n = PublicKeyCredential.parseCreationOptionsFromJSON(s.auth.webAuthnCreationOptions);
|
|
26
|
+
return await navigator.credentials.create({ publicKey: n });
|
|
27
27
|
}
|
|
28
|
-
})
|
|
29
|
-
|
|
28
|
+
});
|
|
29
|
+
function D(t) {
|
|
30
|
+
if (t === null || typeof t != "object")
|
|
31
|
+
return !1;
|
|
32
|
+
const e = Object.getPrototypeOf(t);
|
|
33
|
+
return e !== null && e !== Object.prototype && Object.getPrototypeOf(e) !== null || Symbol.iterator in t ? !1 : Symbol.toStringTag in t ? Object.prototype.toString.call(t) === "[object Module]" : !0;
|
|
34
|
+
}
|
|
35
|
+
function v(t, e, r = ".", s) {
|
|
36
|
+
if (!D(e))
|
|
37
|
+
return v(t, {}, r, s);
|
|
38
|
+
const n = Object.assign({}, e);
|
|
39
|
+
for (const c in t) {
|
|
40
|
+
if (c === "__proto__" || c === "constructor")
|
|
41
|
+
continue;
|
|
42
|
+
const f = t[c];
|
|
43
|
+
f != null && (s && s(n, c, f, r) || (Array.isArray(f) && Array.isArray(n[c]) ? n[c] = [...f, ...n[c]] : D(f) && D(n[c]) ? n[c] = v(
|
|
44
|
+
f,
|
|
45
|
+
n[c],
|
|
46
|
+
(r ? `${r}.` : "") + c.toString(),
|
|
47
|
+
s
|
|
48
|
+
) : n[c] = f));
|
|
49
|
+
}
|
|
50
|
+
return n;
|
|
51
|
+
}
|
|
52
|
+
function T(t) {
|
|
53
|
+
return (...e) => (
|
|
54
|
+
// eslint-disable-next-line unicorn/no-array-reduce
|
|
55
|
+
e.reduce((r, s) => v(r, s, "", t), {})
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
const A = T(), M = (t) => {
|
|
59
|
+
let e = {};
|
|
60
|
+
return typeof t == "string" ? (e[t] = !0, e) : t instanceof Array ? (t.forEach((r) => {
|
|
61
|
+
Object.entries(M(r)).forEach(([s, n]) => {
|
|
62
|
+
e[s] = n;
|
|
63
|
+
});
|
|
64
|
+
}), e) : (Object.entries(t).forEach(([r, s]) => {
|
|
65
|
+
if (r == "__args" || r == "__aliasFor" || r == "__variables" || r == "__directives" || r == "__all_on" || r == "__name") {
|
|
66
|
+
e[r] = s;
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (typeof s == "boolean") {
|
|
70
|
+
e[r] = s;
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
e[r] = M(s);
|
|
74
|
+
}), e);
|
|
75
|
+
}, E = (t) => M(t), m = async (t, e) => {
|
|
76
|
+
let r = N(E(e));
|
|
77
|
+
const s = await t.post("", {
|
|
78
|
+
query: `{ ${r} }`
|
|
79
|
+
});
|
|
80
|
+
if (s.data.errors)
|
|
81
|
+
throw new Error(s.data.errors[0].message);
|
|
82
|
+
return s.data.data;
|
|
83
|
+
};
|
|
84
|
+
function S(t, e, r) {
|
|
85
|
+
let s, n = [], c, f;
|
|
86
|
+
const l = (a) => !a || typeof a != "object" ? !1 : Object.values(a).some((o) => o && typeof o == "object" && Object.keys(o).some((i) => i.startsWith("_"))), h = () => n.length === 0 ? (n.unshift({}), n[0]) : (l(n[0]) && n.unshift({}), n[0]);
|
|
87
|
+
return {
|
|
88
|
+
first() {
|
|
89
|
+
return this.fetchFirst();
|
|
90
|
+
},
|
|
91
|
+
all() {
|
|
92
|
+
return this.fetch();
|
|
93
|
+
},
|
|
94
|
+
async fetchFirst() {
|
|
95
|
+
const o = await this.limit(1).fetch();
|
|
96
|
+
return Array.isArray(o) && o.length > 0 ? o[0] : null;
|
|
97
|
+
},
|
|
98
|
+
async fetchWithMeta() {
|
|
99
|
+
let o = await m(t, this.toQuery(!0));
|
|
100
|
+
if (f) {
|
|
101
|
+
const i = f.split(".");
|
|
102
|
+
for (const u of i)
|
|
103
|
+
o = o[u];
|
|
104
|
+
return o;
|
|
105
|
+
}
|
|
106
|
+
return o[`list${e}`];
|
|
107
|
+
},
|
|
108
|
+
async fetch() {
|
|
109
|
+
let o = await m(t, this.toQuery());
|
|
110
|
+
if (f) {
|
|
111
|
+
const i = f.split(".");
|
|
112
|
+
for (const u of i)
|
|
113
|
+
o = o[u];
|
|
114
|
+
return o.data;
|
|
115
|
+
}
|
|
116
|
+
return o[`list${e}`].data;
|
|
117
|
+
},
|
|
118
|
+
dataPath(a) {
|
|
119
|
+
return a && typeof a == "string" && (f = a), this;
|
|
120
|
+
},
|
|
121
|
+
sort(a) {
|
|
122
|
+
return a && typeof a == "string" && (c = a), this;
|
|
123
|
+
},
|
|
124
|
+
filters(a) {
|
|
125
|
+
return a && typeof a == "object" && (n = [a]), this;
|
|
126
|
+
},
|
|
127
|
+
// where can be called as:
|
|
128
|
+
// where('key', value) -> exact match
|
|
129
|
+
// where('key', '>', value) -> operator-based (>, <, >=, <=, !=, in, contains)
|
|
130
|
+
where(a, o, i) {
|
|
131
|
+
const u = (p, g, y) => {
|
|
132
|
+
const b = {
|
|
133
|
+
">": "_gt",
|
|
134
|
+
"<": "_lt",
|
|
135
|
+
">=": "_gte",
|
|
136
|
+
"<=": "_lte",
|
|
137
|
+
"!=": "_ne",
|
|
138
|
+
in: "_in",
|
|
139
|
+
contains: "_contains"
|
|
140
|
+
}[g];
|
|
141
|
+
b && n.push({ [p]: { [b]: y } });
|
|
142
|
+
};
|
|
143
|
+
if (i !== void 0)
|
|
144
|
+
u(a, String(o), i);
|
|
145
|
+
else {
|
|
146
|
+
const p = h(), g = A(p, { [a]: o });
|
|
147
|
+
n[0] = g;
|
|
148
|
+
}
|
|
149
|
+
return this;
|
|
150
|
+
},
|
|
151
|
+
// whereContains adds a _contains filter for a specific field
|
|
152
|
+
// If the same field is used multiple times, it merges them into an array
|
|
153
|
+
whereContains(a, o) {
|
|
154
|
+
if (a && typeof a == "string") {
|
|
155
|
+
const i = h(), u = { _contains: o };
|
|
156
|
+
i[a] ? Array.isArray(i[a]) ? i[a].push(u) : i[a] = [i[a], u] : i[a] = [u], n[0] = i;
|
|
157
|
+
}
|
|
158
|
+
return this;
|
|
159
|
+
},
|
|
160
|
+
// ...existing code...
|
|
161
|
+
// whereIn adds an _in filter for a specific field
|
|
162
|
+
// If the same field is used multiple times, it merges them into an array
|
|
163
|
+
whereIn(a, o) {
|
|
164
|
+
if (a && typeof a == "string" && Array.isArray(o)) {
|
|
165
|
+
const i = h(), u = { _in: o };
|
|
166
|
+
i[a] ? Array.isArray(i[a]) ? i[a].push(u) : i[a] = [i[a], u] : i[a] = [u], n[0] = i;
|
|
167
|
+
}
|
|
168
|
+
return this;
|
|
169
|
+
},
|
|
170
|
+
// whereBetween adds a _between filter for a specific field
|
|
171
|
+
whereBetween(a, o, i) {
|
|
172
|
+
if (a && typeof a == "string") {
|
|
173
|
+
const u = h(), p = { _between: [o, i] };
|
|
174
|
+
u[a] ? Array.isArray(u[a]) ? u[a].push(p) : u[a] = [u[a], p] : u[a] = p, n[0] = u;
|
|
175
|
+
}
|
|
176
|
+
return this;
|
|
177
|
+
},
|
|
178
|
+
// limit sets paging/limit for the data selection
|
|
179
|
+
limit(a) {
|
|
180
|
+
return typeof a == "number" && Number.isFinite(a) && (s = A(s || {}, { limit: a })), this;
|
|
181
|
+
},
|
|
182
|
+
// offset sets the starting index for the data selection
|
|
183
|
+
offset(a) {
|
|
184
|
+
return typeof a == "number" && Number.isFinite(a) && (s = A(s || {}, { offset: a })), this;
|
|
185
|
+
},
|
|
186
|
+
toQuery(a = !1) {
|
|
187
|
+
let o;
|
|
188
|
+
const i = n.length > 0 && Object.keys(n[0] || {}).length > 0, u = i ? 1 : 0, p = n.length > u;
|
|
189
|
+
i && p ? o = n : p ? o = n.slice(u) : i && (o = n[0]);
|
|
190
|
+
const g = A(
|
|
191
|
+
c ? { sort: c } : {},
|
|
192
|
+
o ? { filters: o } : {}
|
|
193
|
+
), y = {
|
|
194
|
+
data: {
|
|
195
|
+
...r
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
if (s && (y.data.__args = s), Object.keys(g).length > 0 && (y.__args = g), a && (y.meta = {
|
|
199
|
+
total: !0,
|
|
200
|
+
key: !0,
|
|
201
|
+
name: !0
|
|
202
|
+
}), f) {
|
|
203
|
+
const w = f.split(".");
|
|
204
|
+
let b = y;
|
|
205
|
+
for (let j = w.length - 1; j >= 0; j--)
|
|
206
|
+
b = {
|
|
207
|
+
[w[j]]: b
|
|
208
|
+
};
|
|
209
|
+
return b;
|
|
210
|
+
}
|
|
211
|
+
return {
|
|
212
|
+
[`list${e}`]: y
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
const q = (t, e, r) => {
|
|
218
|
+
const s = e, n = t, c = r;
|
|
219
|
+
let f = "list" + e;
|
|
220
|
+
const l = (h) => c[h] ? c[h] : null;
|
|
221
|
+
return {
|
|
222
|
+
field: l,
|
|
223
|
+
$fields: c,
|
|
224
|
+
setDataPath(h) {
|
|
225
|
+
return f = h, f;
|
|
226
|
+
},
|
|
227
|
+
getDataPath() {
|
|
228
|
+
return f;
|
|
229
|
+
},
|
|
230
|
+
gqlFields(h) {
|
|
231
|
+
let a = {};
|
|
232
|
+
for (const o of h)
|
|
233
|
+
if (typeof o == "string") {
|
|
234
|
+
const i = l(o);
|
|
235
|
+
i && (a = A(a, i.gqlField ? typeof i.gqlField == "string" ? { [i.gqlField]: !0 } : i.gqlField : { [i.name || o]: !0 }));
|
|
236
|
+
} else typeof o == "object" && (a = A(a, o));
|
|
237
|
+
return a;
|
|
238
|
+
},
|
|
239
|
+
async update(h, a) {
|
|
240
|
+
return await d(n, "update" + s, { id: h, data: a });
|
|
241
|
+
},
|
|
242
|
+
async delete(h) {
|
|
243
|
+
return await d(n, "delete" + s, { id: h });
|
|
244
|
+
},
|
|
245
|
+
async add(h) {
|
|
246
|
+
return await d(n, "add" + s, { data: h });
|
|
247
|
+
},
|
|
248
|
+
fields(h) {
|
|
249
|
+
let a = [];
|
|
250
|
+
for (let o of h) {
|
|
251
|
+
const i = l(o);
|
|
252
|
+
i && a.push(i);
|
|
253
|
+
}
|
|
254
|
+
return a;
|
|
255
|
+
},
|
|
256
|
+
async get(h, a) {
|
|
257
|
+
const o = (await Promise.resolve().then(() => et)).default, i = o(s, n, E(a));
|
|
258
|
+
for (const [u, p] of Object.entries(h))
|
|
259
|
+
i.where(u, "==", p);
|
|
260
|
+
return await i.first();
|
|
261
|
+
},
|
|
262
|
+
list(h) {
|
|
263
|
+
let a = h;
|
|
264
|
+
const o = {};
|
|
265
|
+
Object.entries(h).forEach(([p]) => {
|
|
266
|
+
c[p] && (o[p] = c[p], c[p].gqlField && (delete a[p], a = A(a, c[p].gqlField)));
|
|
267
|
+
});
|
|
268
|
+
const i = S(n, s, a).dataPath(f), u = i.fetch.bind(i);
|
|
269
|
+
return {
|
|
270
|
+
...i,
|
|
271
|
+
async fetch() {
|
|
272
|
+
return (await u()).map((g) => {
|
|
273
|
+
const y = { ...g };
|
|
274
|
+
return Object.entries(o).forEach(([w, b]) => {
|
|
275
|
+
b.format && typeof b.format == "function" && (y[w] = b.format(g));
|
|
276
|
+
}), y;
|
|
277
|
+
});
|
|
278
|
+
},
|
|
279
|
+
async fetchFirst() {
|
|
280
|
+
const g = await i.fetchFirst.bind(i)();
|
|
281
|
+
if (!g) return g;
|
|
282
|
+
const y = { ...g };
|
|
283
|
+
return Object.entries(o).forEach(([w, b]) => {
|
|
284
|
+
b.format && typeof b.format == "function" && (y[w] = b.format(g));
|
|
285
|
+
}), y;
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
}, O = {}, B = (t, e = !1) => {
|
|
291
|
+
const r = t, s = {};
|
|
292
|
+
return {
|
|
293
|
+
/**
|
|
294
|
+
* 創建新模型
|
|
295
|
+
* @param name 模型名稱
|
|
296
|
+
* @param fields 模型欄位定義
|
|
297
|
+
*/
|
|
298
|
+
create(n, c) {
|
|
299
|
+
const f = q(r, n, c);
|
|
300
|
+
s[n] = f, e && (O[n] = f);
|
|
301
|
+
},
|
|
302
|
+
/**
|
|
303
|
+
* 獲取模型
|
|
304
|
+
* @param name 模型名稱
|
|
305
|
+
* @returns 模型實例
|
|
306
|
+
*/
|
|
307
|
+
get(n) {
|
|
308
|
+
return s[n] || (e && O[n] ? s[n] = O[n] : this.create(n, {})), s[n];
|
|
309
|
+
},
|
|
310
|
+
/**
|
|
311
|
+
* 檢查模型是否存在
|
|
312
|
+
* @param name 模型名稱
|
|
313
|
+
* @returns 是否存在
|
|
314
|
+
*/
|
|
315
|
+
has(n) {
|
|
316
|
+
return !!s[n] || e && !!O[n];
|
|
317
|
+
},
|
|
318
|
+
/**
|
|
319
|
+
* 列出所有模型名稱
|
|
320
|
+
* @returns 模型名稱陣列
|
|
321
|
+
*/
|
|
322
|
+
list() {
|
|
323
|
+
const n = Object.keys(s), c = e ? Object.keys(O) : [];
|
|
324
|
+
return [.../* @__PURE__ */ new Set([...n, ...c])];
|
|
325
|
+
},
|
|
326
|
+
/**
|
|
327
|
+
* 清除所有模型
|
|
328
|
+
*/
|
|
329
|
+
clear() {
|
|
330
|
+
Object.keys(s).forEach((n) => delete s[n]);
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
}, ot = (t) => {
|
|
334
|
+
const e = B(t, !1);
|
|
335
|
+
return {
|
|
336
|
+
// 暴露完整的管理器
|
|
337
|
+
manager: e,
|
|
338
|
+
// 便利方法 - 直接暴露常用功能
|
|
339
|
+
createModel: e.create,
|
|
340
|
+
getModel: e.get,
|
|
341
|
+
hasModel: e.has,
|
|
342
|
+
listModels: e.list,
|
|
343
|
+
clearModels: e.clear,
|
|
344
|
+
/**
|
|
345
|
+
* 快速創建並獲取模型
|
|
346
|
+
* @param name 模型名稱
|
|
347
|
+
* @param fields 模型欄位定義
|
|
348
|
+
* @returns 模型實例
|
|
349
|
+
*/
|
|
350
|
+
defineModel(r, s) {
|
|
351
|
+
return e.create(r, s), e.get(r);
|
|
352
|
+
},
|
|
353
|
+
/**
|
|
354
|
+
* 批量創建模型
|
|
355
|
+
* @param models 模型定義對象
|
|
356
|
+
*/
|
|
357
|
+
defineModels(r) {
|
|
358
|
+
Object.entries(r).forEach(([s, n]) => {
|
|
359
|
+
e.create(s, n);
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
}, lt = (t) => {
|
|
364
|
+
const e = B(t, !0);
|
|
365
|
+
return {
|
|
366
|
+
// 暴露完整的管理器
|
|
367
|
+
manager: e,
|
|
368
|
+
// 便利方法 - 直接暴露常用功能
|
|
369
|
+
createModel: e.create,
|
|
370
|
+
getModel: e.get,
|
|
371
|
+
hasModel: e.has,
|
|
372
|
+
listModels: e.list,
|
|
373
|
+
clearModels: e.clear,
|
|
374
|
+
/**
|
|
375
|
+
* 快速創建並獲取模型
|
|
376
|
+
* @param name 模型名稱
|
|
377
|
+
* @param fields 模型欄位定義
|
|
378
|
+
* @returns 模型實例
|
|
379
|
+
*/
|
|
380
|
+
defineModel(r, s) {
|
|
381
|
+
return e.create(r, s), e.get(r);
|
|
382
|
+
},
|
|
383
|
+
/**
|
|
384
|
+
* 批量創建模型
|
|
385
|
+
* @param models 模型定義對象
|
|
386
|
+
*/
|
|
387
|
+
defineModels(r) {
|
|
388
|
+
Object.entries(r).forEach(([s, n]) => {
|
|
389
|
+
e.create(s, n);
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
}, ct = (t) => ({
|
|
394
|
+
/**
|
|
395
|
+
* 創建全域模型
|
|
396
|
+
* @param name 模型名稱
|
|
397
|
+
* @param fields 模型欄位定義
|
|
398
|
+
*/
|
|
399
|
+
define(e, r) {
|
|
400
|
+
const s = q(t, e, r);
|
|
401
|
+
return O[e] = s, s;
|
|
402
|
+
},
|
|
403
|
+
/**
|
|
404
|
+
* 獲取全域模型
|
|
405
|
+
* @param name 模型名稱
|
|
406
|
+
* @returns 模型實例
|
|
407
|
+
*/
|
|
408
|
+
get(e) {
|
|
409
|
+
return O[e];
|
|
410
|
+
},
|
|
411
|
+
/**
|
|
412
|
+
* 檢查全域模型是否存在
|
|
413
|
+
* @param name 模型名稱
|
|
414
|
+
* @returns 是否存在
|
|
415
|
+
*/
|
|
416
|
+
has(e) {
|
|
417
|
+
return !!O[e];
|
|
418
|
+
},
|
|
419
|
+
/**
|
|
420
|
+
* 列出所有全域模型
|
|
421
|
+
* @returns 模型名稱陣列
|
|
422
|
+
*/
|
|
423
|
+
list() {
|
|
424
|
+
return Object.keys(O);
|
|
425
|
+
},
|
|
426
|
+
/**
|
|
427
|
+
* 清除所有全域模型
|
|
428
|
+
*/
|
|
429
|
+
clear() {
|
|
430
|
+
Object.keys(O).forEach((e) => delete O[e]);
|
|
431
|
+
}
|
|
432
|
+
}), W = (t) => {
|
|
433
|
+
const { assertion: e, attestation: r } = I(t);
|
|
30
434
|
return {
|
|
31
435
|
login: async () => {
|
|
32
436
|
const s = await e();
|
|
33
|
-
await
|
|
437
|
+
await d(t, "webAuthnAssertion", {
|
|
34
438
|
assertion: s.toJSON()
|
|
35
439
|
});
|
|
36
440
|
},
|
|
37
441
|
register: async () => {
|
|
38
442
|
const s = await r();
|
|
39
|
-
await
|
|
443
|
+
await d(t, "webAuthnRegister", {
|
|
40
444
|
registration: s.toJSON()
|
|
41
445
|
});
|
|
42
446
|
}
|
|
43
447
|
};
|
|
44
|
-
},
|
|
45
|
-
WebAuthn:
|
|
448
|
+
}, $ = (t) => ({
|
|
449
|
+
WebAuthn: W(t),
|
|
46
450
|
google: {
|
|
47
|
-
unlink: () =>
|
|
48
|
-
login: (e) =>
|
|
451
|
+
unlink: () => d(t, "lightAuthUnlinkGoogle"),
|
|
452
|
+
login: (e) => d(t, "lightAuthLoginGoogle", {
|
|
49
453
|
credential: e
|
|
50
454
|
}),
|
|
51
|
-
register: (e) =>
|
|
455
|
+
register: (e) => d(t, "lightAuthRegisterGoogle", {
|
|
52
456
|
credential: e
|
|
53
457
|
})
|
|
54
458
|
},
|
|
55
459
|
facebook: {
|
|
56
|
-
unlink: () =>
|
|
57
|
-
login: (e) =>
|
|
460
|
+
unlink: () => d(t, "lightAuthUnlinkFacebook"),
|
|
461
|
+
login: (e) => d(t, "lightAuthLoginFacebook", {
|
|
58
462
|
access_token: e
|
|
59
463
|
}),
|
|
60
|
-
register: (e) =>
|
|
464
|
+
register: (e) => d(t, "lightAuthRegisterFacebook", {
|
|
61
465
|
access_token: e
|
|
62
466
|
})
|
|
63
467
|
},
|
|
64
468
|
microsoft: {
|
|
65
|
-
unlink: () =>
|
|
66
|
-
login: (e) =>
|
|
469
|
+
unlink: () => d(t, "lightAuthUnlinkMicrosoft"),
|
|
470
|
+
login: (e) => d(t, "lightAuthLoginMicrosoft", {
|
|
67
471
|
access_token: e
|
|
68
472
|
}),
|
|
69
|
-
register: (e) =>
|
|
473
|
+
register: (e) => d(t, "lightAuthRegisterMicrosoft", {
|
|
70
474
|
account_id: e
|
|
71
475
|
})
|
|
72
476
|
},
|
|
73
|
-
login: (e, r, s = "") =>
|
|
477
|
+
login: (e, r, s = "") => d(t, "login", {
|
|
74
478
|
username: e,
|
|
75
479
|
password: r,
|
|
76
480
|
code: s
|
|
77
481
|
}),
|
|
78
|
-
logout: () =>
|
|
79
|
-
changeExpiredPassword: (e, r, s) =>
|
|
482
|
+
logout: () => d(t, "logout"),
|
|
483
|
+
changeExpiredPassword: (e, r, s) => d(t, "changeExpiredPassword", {
|
|
80
484
|
username: e,
|
|
81
485
|
old_password: r,
|
|
82
486
|
new_password: s
|
|
83
487
|
}),
|
|
84
|
-
updatePassword: (e, r) =>
|
|
488
|
+
updatePassword: (e, r) => d(t, "changeUserPassword", {
|
|
85
489
|
old_password: e,
|
|
86
490
|
new_password: r
|
|
87
491
|
}),
|
|
88
|
-
resetPassword: (e, r, s) =>
|
|
492
|
+
resetPassword: (e, r, s) => d(t, "resetPassword", {
|
|
89
493
|
jwt: e,
|
|
90
494
|
password: r,
|
|
91
495
|
code: s
|
|
92
496
|
}),
|
|
93
|
-
forgetPassword: (e, r) =>
|
|
497
|
+
forgetPassword: (e, r) => d(t, "forgetPassword", {
|
|
94
498
|
username: e,
|
|
95
499
|
email: r
|
|
96
500
|
}),
|
|
97
501
|
verifyCode(e, r) {
|
|
98
|
-
return
|
|
502
|
+
return d(t, "forgetPasswordVerifyCode", {
|
|
99
503
|
jwt: e,
|
|
100
504
|
code: r
|
|
101
505
|
});
|
|
@@ -112,163 +516,86 @@ const U = (t) => ({
|
|
|
112
516
|
});
|
|
113
517
|
return r.grantedRights;
|
|
114
518
|
}
|
|
115
|
-
})
|
|
116
|
-
|
|
117
|
-
let f = "list" + e;
|
|
118
|
-
const a = (c) => h[c] ? h[c]() : null;
|
|
119
|
-
return {
|
|
120
|
-
field: a,
|
|
121
|
-
$fields: h,
|
|
122
|
-
setDataPath(c) {
|
|
123
|
-
return f = c, f;
|
|
124
|
-
},
|
|
125
|
-
getDataPath() {
|
|
126
|
-
return f;
|
|
127
|
-
},
|
|
128
|
-
gqlFields(c) {
|
|
129
|
-
const n = [];
|
|
130
|
-
for (const o of c)
|
|
131
|
-
if (typeof o == "string") {
|
|
132
|
-
const l = a(o);
|
|
133
|
-
l && n.push(l.getGQLField());
|
|
134
|
-
} else typeof o == "object" && n.push(o);
|
|
135
|
-
return n;
|
|
136
|
-
},
|
|
137
|
-
async update(c, n) {
|
|
138
|
-
return await p(i, "update" + s, { id: c, data: n });
|
|
139
|
-
},
|
|
140
|
-
async delete(c) {
|
|
141
|
-
return await p(i, "delete" + s, { id: c });
|
|
142
|
-
},
|
|
143
|
-
async add(c) {
|
|
144
|
-
return await p(i, "add" + s, { data: c });
|
|
145
|
-
},
|
|
146
|
-
fields(c) {
|
|
147
|
-
let n = [];
|
|
148
|
-
for (let o of c) {
|
|
149
|
-
const l = a(o);
|
|
150
|
-
l && n.push(l);
|
|
151
|
-
}
|
|
152
|
-
return n;
|
|
153
|
-
},
|
|
154
|
-
async get(c, n) {
|
|
155
|
-
const o = (await Promise.resolve().then(() => B)).default, l = o(s, i, O(n));
|
|
156
|
-
for (const [u, d] of Object.entries(c))
|
|
157
|
-
l.where(u, "==", d);
|
|
158
|
-
return await l.first();
|
|
159
|
-
},
|
|
160
|
-
async list(c, n) {
|
|
161
|
-
const o = (await Promise.resolve().then(() => B)).default, l = o(s, i, O(n));
|
|
162
|
-
for (const [u, d] of Object.entries(c))
|
|
163
|
-
l.where(u, "==", d);
|
|
164
|
-
return await l.all();
|
|
165
|
-
}
|
|
166
|
-
};
|
|
167
|
-
};
|
|
168
|
-
function T(t) {
|
|
519
|
+
});
|
|
520
|
+
function Q(t) {
|
|
169
521
|
t = "<~" + t + "~>";
|
|
170
|
-
var e, r, s,
|
|
171
|
-
for (t.slice(0, 2) === "<~" && t.slice(-2), t = t.slice(2, -2).replace(/\s/g, "").replace("z", "!!!!!"), e = "uuuuu".slice(t.length % 5 || 5), t += e, s = [],
|
|
172
|
-
return function(
|
|
173
|
-
for (var o =
|
|
522
|
+
var e, r, s, n, c, f = String, l = 255;
|
|
523
|
+
for (t.slice(0, 2) === "<~" && t.slice(-2), t = t.slice(2, -2).replace(/\s/g, "").replace("z", "!!!!!"), e = "uuuuu".slice(t.length % 5 || 5), t += e, s = [], n = 0, c = t.length; c > n; n += 5) r = 52200625 * (t.charCodeAt(n) - 33) + 614125 * (t.charCodeAt(n + 1) - 33) + 7225 * (t.charCodeAt(n + 2) - 33) + 85 * (t.charCodeAt(n + 3) - 33) + (t.charCodeAt(n + 4) - 33), s.push(l & r >> 24, l & r >> 16, l & r >> 8, l & r);
|
|
524
|
+
return function(h, a) {
|
|
525
|
+
for (var o = a; o > 0; o--) h.pop();
|
|
174
526
|
}(s, e.length), f.fromCharCode.apply(f, s);
|
|
175
527
|
}
|
|
176
|
-
const
|
|
528
|
+
const k = (t = "") => {
|
|
177
529
|
const e = t, r = (s = "application/octet-stream") => {
|
|
178
|
-
const
|
|
179
|
-
for (let
|
|
180
|
-
|
|
181
|
-
const
|
|
182
|
-
return URL.createObjectURL(
|
|
530
|
+
const n = new Uint8Array(e.length);
|
|
531
|
+
for (let l = 0; l < e.length; l++)
|
|
532
|
+
n[l] = e.charCodeAt(l);
|
|
533
|
+
const c = new Blob([n], { type: s });
|
|
534
|
+
return URL.createObjectURL(c);
|
|
183
535
|
};
|
|
184
536
|
return {
|
|
185
537
|
getContent: () => e,
|
|
186
538
|
getURL: r,
|
|
187
539
|
download: (s) => {
|
|
188
|
-
const
|
|
189
|
-
|
|
540
|
+
const n = document.createElement("a");
|
|
541
|
+
n.download = s, n.href = r(), document.body.appendChild(n), n.click(), document.body.removeChild(n);
|
|
190
542
|
},
|
|
191
543
|
open: (s) => {
|
|
192
544
|
window.open(r(s), "_blank");
|
|
193
545
|
}
|
|
194
546
|
};
|
|
195
|
-
},
|
|
196
|
-
fromBase85: (t) =>
|
|
197
|
-
fromBase64: (t) =>
|
|
198
|
-
fromString: (t) =>
|
|
199
|
-
}, P = (t) => {
|
|
200
|
-
let e = {};
|
|
201
|
-
return typeof t == "string" ? (e[t] = !0, e) : t instanceof Array ? (t.forEach((r) => {
|
|
202
|
-
Object.entries(P(r)).forEach(([s, i]) => {
|
|
203
|
-
e[s] = i;
|
|
204
|
-
});
|
|
205
|
-
}), e) : (Object.entries(t).forEach(([r, s]) => {
|
|
206
|
-
if (r == "__args" || r == "__aliasFor" || r == "__variables" || r == "__directives" || r == "__all_on" || r == "__name") {
|
|
207
|
-
e[r] = s;
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
if (typeof s == "boolean") {
|
|
211
|
-
e[r] = s;
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
e[r] = P(s);
|
|
215
|
-
}), e);
|
|
216
|
-
}, O = (t) => P(t), m = async (t, e) => {
|
|
217
|
-
let r = E(O(e));
|
|
218
|
-
const s = await t.post("", {
|
|
219
|
-
query: `{ ${r} }`
|
|
220
|
-
});
|
|
221
|
-
if (s.data.errors)
|
|
222
|
-
throw new Error(s.data.errors[0].message);
|
|
223
|
-
return s.data.data;
|
|
547
|
+
}, ut = {
|
|
548
|
+
fromBase85: (t) => k(Q(t)),
|
|
549
|
+
fromBase64: (t) => k(atob(t)),
|
|
550
|
+
fromString: (t) => k(t)
|
|
224
551
|
};
|
|
225
|
-
function
|
|
552
|
+
function K(t) {
|
|
226
553
|
for (let e = 0; e < t.length; e++)
|
|
227
554
|
if (t[e] instanceof File)
|
|
228
555
|
return !0;
|
|
229
556
|
return !1;
|
|
230
557
|
}
|
|
231
|
-
function
|
|
558
|
+
function z(t) {
|
|
232
559
|
for (let e in t)
|
|
233
560
|
if (t[e] instanceof File)
|
|
234
561
|
return !0;
|
|
235
562
|
return !1;
|
|
236
563
|
}
|
|
237
|
-
const
|
|
238
|
-
let
|
|
564
|
+
const d = async (t, e, r = null, s = []) => {
|
|
565
|
+
let n = {
|
|
239
566
|
[e]: {}
|
|
240
567
|
};
|
|
241
|
-
const
|
|
568
|
+
const c = new FormData();
|
|
242
569
|
let f = !1;
|
|
243
570
|
if (r) {
|
|
244
|
-
const
|
|
571
|
+
const a = {}, o = {}, i = {};
|
|
245
572
|
let u = 0;
|
|
246
|
-
Object.entries(r).forEach(([
|
|
247
|
-
if (
|
|
573
|
+
Object.entries(r).forEach(([p, g]) => {
|
|
574
|
+
if (g instanceof Array && K(g)) {
|
|
248
575
|
f = !0;
|
|
249
576
|
let y = 0;
|
|
250
|
-
|
|
251
|
-
w instanceof File && (
|
|
252
|
-
}),
|
|
253
|
-
} else
|
|
254
|
-
w instanceof File ? (
|
|
255
|
-
})) :
|
|
256
|
-
}),
|
|
577
|
+
g.forEach((w) => {
|
|
578
|
+
w instanceof File && (a[p] = new C(p), o[u] = ["variables." + p + "." + y], c.append(u.toString(), w), u++);
|
|
579
|
+
}), i[p] = "[Upload!]!";
|
|
580
|
+
} else g instanceof File ? (f = !0, a[p] = new C(p), o[u] = ["variables." + p], c.append(u.toString(), g), i[p] = "Upload!", u++) : g instanceof Object && z(g) ? (f = !0, a[p] = {}, Object.entries(g).forEach(([y, w]) => {
|
|
581
|
+
w instanceof File ? (a[p][y] = new C(y), o[u] = ["variables." + y], c.append(u.toString(), w), i[y] = "Upload!", u++) : a[p][y] = w;
|
|
582
|
+
})) : g !== void 0 && (a[p] = g);
|
|
583
|
+
}), n[e].__args = a, n.__variables = i, f && c.append("map", JSON.stringify(o));
|
|
257
584
|
}
|
|
258
|
-
Object.entries(
|
|
259
|
-
|
|
260
|
-
}), Object.entries(
|
|
261
|
-
let
|
|
262
|
-
const
|
|
263
|
-
if (f ? (
|
|
264
|
-
query:
|
|
265
|
-
})),
|
|
266
|
-
query:
|
|
267
|
-
}),
|
|
268
|
-
throw new Error(
|
|
269
|
-
return
|
|
270
|
-
},
|
|
271
|
-
uploadTempFile: (e) =>
|
|
585
|
+
Object.entries(E(s)).forEach(([a, o]) => {
|
|
586
|
+
n[e][a] = o;
|
|
587
|
+
}), Object.entries(n[e]).length === 0 && (n[e] = !0);
|
|
588
|
+
let l = null;
|
|
589
|
+
const h = N({ mutation: n });
|
|
590
|
+
if (f ? (c.append("operations", JSON.stringify({
|
|
591
|
+
query: h
|
|
592
|
+
})), l = await t.post("", c)) : l = await t.post("", {
|
|
593
|
+
query: h
|
|
594
|
+
}), l.data.errors)
|
|
595
|
+
throw new Error(l.data.errors[0].message);
|
|
596
|
+
return l.data.data[e];
|
|
597
|
+
}, G = (t) => ({
|
|
598
|
+
uploadTempFile: (e) => d(t, "fsUploadTempFile", {
|
|
272
599
|
file: e
|
|
273
600
|
}, {
|
|
274
601
|
name: !0,
|
|
@@ -286,9 +613,9 @@ const p = async (t, e, r = null, s = []) => {
|
|
|
286
613
|
path: !0
|
|
287
614
|
}
|
|
288
615
|
})).fsListFolders,
|
|
289
|
-
create: (e) =>
|
|
290
|
-
delete: (e) =>
|
|
291
|
-
rename: (e, r) =>
|
|
616
|
+
create: (e) => d(t, "fsCreateFolder", { path: e }),
|
|
617
|
+
delete: (e) => d(t, "fsDeleteFolder", { path: e }),
|
|
618
|
+
rename: (e, r) => d(t, "fsRenameFolder", { path: e, name: r })
|
|
292
619
|
},
|
|
293
620
|
files: {
|
|
294
621
|
list: async (e) => {
|
|
@@ -326,15 +653,15 @@ const p = async (t, e, r = null, s = []) => {
|
|
|
326
653
|
});
|
|
327
654
|
return window.atob(r.drive.files[0].base64Content);
|
|
328
655
|
},
|
|
329
|
-
write: (e, r) =>
|
|
656
|
+
write: (e, r) => d(t, "fsWriteFile", {
|
|
330
657
|
path: e,
|
|
331
658
|
content: r
|
|
332
659
|
}),
|
|
333
|
-
delete: (e) =>
|
|
334
|
-
rename: (e, r) =>
|
|
335
|
-
move: (e, r) =>
|
|
660
|
+
delete: (e) => d(t, "fsDeleteFile", { path: e }),
|
|
661
|
+
rename: (e, r) => d(t, "fsRenameFile", { path: e, name: r }),
|
|
662
|
+
move: (e, r) => d(t, "fsMoveFile", { source: e, target: r })
|
|
336
663
|
}
|
|
337
|
-
}),
|
|
664
|
+
}), H = (t) => ({
|
|
338
665
|
get: async (e) => (await t({
|
|
339
666
|
config: {
|
|
340
667
|
__args: {
|
|
@@ -342,55 +669,21 @@ const p = async (t, e, r = null, s = []) => {
|
|
|
342
669
|
}
|
|
343
670
|
}
|
|
344
671
|
})).config
|
|
345
|
-
}),
|
|
346
|
-
send: (e, r, s) =>
|
|
672
|
+
}), X = (t) => ({
|
|
673
|
+
send: (e, r, s) => d(t, "sendMail", {
|
|
347
674
|
email: e,
|
|
348
675
|
subject: r,
|
|
349
676
|
message: s
|
|
350
677
|
})
|
|
351
|
-
}),
|
|
352
|
-
list:
|
|
678
|
+
}), V = (t) => ({
|
|
679
|
+
list: (e = {
|
|
353
680
|
user_id: !0,
|
|
354
681
|
username: !0,
|
|
355
682
|
first_name: !0,
|
|
356
683
|
last_name: !0,
|
|
357
684
|
status: !0
|
|
358
|
-
}) =>
|
|
359
|
-
|
|
360
|
-
return r.data_path = "app.users", r.all();
|
|
361
|
-
}
|
|
362
|
-
}), V = (t) => {
|
|
363
|
-
const e = t, r = {};
|
|
364
|
-
return {
|
|
365
|
-
create(s, i) {
|
|
366
|
-
r[s] = null;
|
|
367
|
-
let h = {};
|
|
368
|
-
for (const f of Object.entries(i)) {
|
|
369
|
-
const [a, c] = f;
|
|
370
|
-
h[a] = () => ({
|
|
371
|
-
name: c.name ? c.name : a,
|
|
372
|
-
raw: c,
|
|
373
|
-
getName: () => c.name ? c.name : a,
|
|
374
|
-
getGQLField: () => c.gqlField !== void 0 ? c.gqlField : c.name || a,
|
|
375
|
-
getRaw() {
|
|
376
|
-
return c;
|
|
377
|
-
},
|
|
378
|
-
getValue(n) {
|
|
379
|
-
return c.field && typeof c.field == "function" ? c.field(n) : c.field && typeof c.field == "string" ? n[c.field] : n[this.getName()];
|
|
380
|
-
},
|
|
381
|
-
getFormattedValue(n) {
|
|
382
|
-
const o = this.getValue(n);
|
|
383
|
-
return c.format ? c.format(o) : o;
|
|
384
|
-
}
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
|
-
r[s] = Q(e, s, h);
|
|
388
|
-
},
|
|
389
|
-
get(s) {
|
|
390
|
-
return r[s] || this.create(s, {}), r[s];
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
}, H = (t) => ({
|
|
685
|
+
}) => S(t, "Users", e).dataPath("app.users")
|
|
686
|
+
}), Y = (t) => ({
|
|
394
687
|
list: async (e = {
|
|
395
688
|
name: !0
|
|
396
689
|
}) => {
|
|
@@ -401,7 +694,7 @@ const p = async (t, e, r = null, s = []) => {
|
|
|
401
694
|
});
|
|
402
695
|
return r;
|
|
403
696
|
}
|
|
404
|
-
}),
|
|
697
|
+
}), Z = "list", x = [
|
|
405
698
|
"flatMap",
|
|
406
699
|
"chunk",
|
|
407
700
|
"shuffle",
|
|
@@ -427,7 +720,7 @@ const p = async (t, e, r = null, s = []) => {
|
|
|
427
720
|
"slice",
|
|
428
721
|
"tap",
|
|
429
722
|
"sort"
|
|
430
|
-
],
|
|
723
|
+
], tt = [
|
|
431
724
|
"avg",
|
|
432
725
|
"count",
|
|
433
726
|
"countBy",
|
|
@@ -455,25 +748,25 @@ const p = async (t, e, r = null, s = []) => {
|
|
|
455
748
|
"implode",
|
|
456
749
|
"partition"
|
|
457
750
|
];
|
|
458
|
-
class
|
|
751
|
+
class _ {
|
|
459
752
|
constructor(e, r) {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
753
|
+
F(this, "_batchData", null);
|
|
754
|
+
F(this, "data_path", "");
|
|
755
|
+
F(this, "axios");
|
|
756
|
+
F(this, "filters");
|
|
757
|
+
F(this, "steps");
|
|
758
|
+
F(this, "fields");
|
|
759
|
+
F(this, "already_limit", !1);
|
|
760
|
+
F(this, "already_offset", !1);
|
|
761
|
+
F(this, "limit", null);
|
|
762
|
+
F(this, "offset", null);
|
|
763
|
+
F(this, "_sort", null);
|
|
764
|
+
F(this, "_sortDesc", !1);
|
|
765
|
+
F(this, "meta", {});
|
|
473
766
|
this.axios = r, this.filters = {}, this.steps = [], this.fields = e;
|
|
474
767
|
}
|
|
475
768
|
}
|
|
476
|
-
|
|
769
|
+
_.prototype.getQueryPayload = function() {
|
|
477
770
|
let t = {
|
|
478
771
|
meta: {
|
|
479
772
|
total: !0,
|
|
@@ -487,26 +780,26 @@ g.prototype.getQueryPayload = function() {
|
|
|
487
780
|
steps: this.steps
|
|
488
781
|
};
|
|
489
782
|
};
|
|
490
|
-
|
|
783
|
+
_.prototype.dataPath = function(t) {
|
|
491
784
|
const e = this.clone();
|
|
492
785
|
return e.data_path = t, e;
|
|
493
786
|
};
|
|
494
|
-
|
|
787
|
+
_.prototype.buildArgs = function() {
|
|
495
788
|
let t = {};
|
|
496
789
|
return Object.keys(this.filters).length > 0 && (t.filters = this.filters), this._sort && (t.sort = this._sort, this._sortDesc && (t.sort += ":desc")), t;
|
|
497
790
|
};
|
|
498
|
-
|
|
791
|
+
_.prototype.clone = function() {
|
|
499
792
|
const t = Object.create(this);
|
|
500
793
|
return t.steps = JSON.parse(JSON.stringify(this.steps)), t.filters = JSON.parse(JSON.stringify(this.filters)), t.fields = JSON.parse(JSON.stringify(this.fields)), t;
|
|
501
794
|
};
|
|
502
|
-
|
|
795
|
+
P().macro("whereContains", function(t, e) {
|
|
503
796
|
return this.filter((r) => r[t].toLowerCase().includes(e.toLowerCase()));
|
|
504
797
|
});
|
|
505
|
-
|
|
798
|
+
_.prototype.fetchData = async function() {
|
|
506
799
|
try {
|
|
507
800
|
if (this._batchData) {
|
|
508
|
-
const
|
|
509
|
-
return this.meta =
|
|
801
|
+
const l = this._batchData;
|
|
802
|
+
return this.meta = l.meta, P(l.data);
|
|
510
803
|
}
|
|
511
804
|
let t = {
|
|
512
805
|
meta: {
|
|
@@ -517,72 +810,72 @@ g.prototype.fetchData = async function() {
|
|
|
517
810
|
};
|
|
518
811
|
t.__args = this.buildArgs(), t.data = this.fields, this.already_limit && (t.data.__args = t.data.__args || {}, t.data.__args.limit = this.limit), this.already_offset && (t.data.__args = t.data.__args || {}, t.data.__args.offset = this.offset);
|
|
519
812
|
const e = this.data_path.split(".");
|
|
520
|
-
let r = {}, s = r,
|
|
521
|
-
for (const
|
|
522
|
-
if (
|
|
523
|
-
s[
|
|
813
|
+
let r = {}, s = r, n = e[e.length - 1];
|
|
814
|
+
for (const l of e) {
|
|
815
|
+
if (l === n) {
|
|
816
|
+
s[l] = t;
|
|
524
817
|
break;
|
|
525
818
|
}
|
|
526
|
-
s[
|
|
819
|
+
s[l] = {}, s = s[l];
|
|
527
820
|
}
|
|
528
821
|
let f = await m(this.axios, r);
|
|
529
|
-
for (const
|
|
530
|
-
f = f[
|
|
531
|
-
return this.meta = f.meta,
|
|
822
|
+
for (const l of e)
|
|
823
|
+
f = f[l];
|
|
824
|
+
return this.meta = f.meta, P(f.data);
|
|
532
825
|
} catch (t) {
|
|
533
826
|
throw console.error("Error fetching collection data:", t), t;
|
|
534
827
|
}
|
|
535
828
|
};
|
|
536
|
-
|
|
829
|
+
_.prototype.processData = async function() {
|
|
537
830
|
let t = await this.fetchData();
|
|
538
831
|
for (const e of this.steps)
|
|
539
832
|
t = t[e.type](...e.args);
|
|
540
833
|
return t;
|
|
541
834
|
};
|
|
542
|
-
|
|
835
|
+
_.prototype.all = async function() {
|
|
543
836
|
return (await this.processData()).all();
|
|
544
837
|
};
|
|
545
|
-
for (const t of
|
|
546
|
-
|
|
838
|
+
for (const t of x)
|
|
839
|
+
_.prototype[t] = function(...e) {
|
|
547
840
|
const r = this.clone();
|
|
548
841
|
return r.steps.push({ type: t, args: e }), r;
|
|
549
842
|
};
|
|
550
|
-
for (const t of
|
|
551
|
-
|
|
843
|
+
for (const t of tt)
|
|
844
|
+
_.prototype[t] = async function(...e) {
|
|
552
845
|
return (await this.clone().processData())[t](...e);
|
|
553
846
|
};
|
|
554
|
-
|
|
555
|
-
|
|
847
|
+
_.prototype.average = _.prototype.avg;
|
|
848
|
+
_.prototype.first = async function() {
|
|
556
849
|
return this.take(1), (await this.processData()).first();
|
|
557
850
|
};
|
|
558
|
-
|
|
851
|
+
_.prototype._handleBatchData = function(t, e) {
|
|
559
852
|
return this._batchData ? (this.steps.push({ type: t, args: e }), this) : null;
|
|
560
853
|
};
|
|
561
|
-
|
|
854
|
+
_.prototype.where = function(...t) {
|
|
562
855
|
const e = this._handleBatchData("where", t);
|
|
563
856
|
if (e) return e;
|
|
564
857
|
if (t.length === 2)
|
|
565
858
|
this.filters[t[0]] = t[1];
|
|
566
859
|
else if (t.length === 3) {
|
|
567
|
-
const r = t[0], s = t[1],
|
|
860
|
+
const r = t[0], s = t[1], n = t[2];
|
|
568
861
|
switch (s) {
|
|
569
862
|
case "==":
|
|
570
|
-
this.filters[r] =
|
|
863
|
+
this.filters[r] = n;
|
|
571
864
|
break;
|
|
572
865
|
case "<":
|
|
573
|
-
this.filters[r] = { lt:
|
|
866
|
+
this.filters[r] = { lt: n };
|
|
574
867
|
break;
|
|
575
868
|
case "<=":
|
|
576
|
-
this.filters[r] = { lte:
|
|
869
|
+
this.filters[r] = { lte: n };
|
|
577
870
|
break;
|
|
578
871
|
case ">":
|
|
579
|
-
this.filters[r] = { gt:
|
|
872
|
+
this.filters[r] = { gt: n };
|
|
580
873
|
break;
|
|
581
874
|
case ">=":
|
|
582
|
-
this.filters[r] = { gte:
|
|
875
|
+
this.filters[r] = { gte: n };
|
|
583
876
|
break;
|
|
584
877
|
case "!==":
|
|
585
|
-
this.filters[r] = { ne:
|
|
878
|
+
this.filters[r] = { ne: n };
|
|
586
879
|
break;
|
|
587
880
|
default:
|
|
588
881
|
throw new Error(`Unsupported operator: ${s}`);
|
|
@@ -590,56 +883,56 @@ g.prototype.where = function(...t) {
|
|
|
590
883
|
}
|
|
591
884
|
return this;
|
|
592
885
|
};
|
|
593
|
-
|
|
886
|
+
_.prototype.whereContains = function(t, e) {
|
|
594
887
|
const r = this._handleBatchData("whereContains", [t, e]);
|
|
595
888
|
return r || (this.filters[t] = { contains: e }, this);
|
|
596
889
|
};
|
|
597
|
-
|
|
890
|
+
_.prototype.forPage = function(t, e) {
|
|
598
891
|
return t = Math.max(1, t), this.already_limit ? (this.steps.push({ type: "forPage", args: [t, e] }), this) : (this.limit = e, this.offset = (t - 1) * e, this.already_limit = !0, this.already_offset = !0, this);
|
|
599
892
|
};
|
|
600
|
-
|
|
893
|
+
_.prototype.whereIn = function(t, e) {
|
|
601
894
|
const r = this._handleBatchData("whereIn", [t, e]);
|
|
602
895
|
return r || (this.filters[t] = { in: e }, this);
|
|
603
896
|
};
|
|
604
|
-
|
|
897
|
+
_.prototype.whereNotIn = function(t, e) {
|
|
605
898
|
const r = this._handleBatchData("whereNotIn", [t, e]);
|
|
606
899
|
return r || (this.filters[t] = { nin: e }, this);
|
|
607
900
|
};
|
|
608
|
-
|
|
901
|
+
_.prototype.whereNotBetween = function(t, e) {
|
|
609
902
|
const r = this._handleBatchData("whereNotBetween", [t, e]);
|
|
610
903
|
return r || (this.filters[t] = { notBetween: e }, this);
|
|
611
904
|
};
|
|
612
|
-
|
|
905
|
+
_.prototype.whereBetween = function(t, e) {
|
|
613
906
|
const r = this._handleBatchData("whereBetween", [t, e]);
|
|
614
907
|
return r || (this.filters[t] = { between: e }, this);
|
|
615
908
|
};
|
|
616
|
-
|
|
909
|
+
_.prototype.sortBy = function(t) {
|
|
617
910
|
return this.steps.push({ type: "sortBy", args: [t] }), typeof t == "string" && (this._sort = t), this;
|
|
618
911
|
};
|
|
619
|
-
|
|
912
|
+
_.prototype.sortByDesc = function(t) {
|
|
620
913
|
return this.steps.push({ type: "sortByDesc", args: [t] }), typeof t == "string" && (this._sort = t, this._sortDesc = !0), this;
|
|
621
914
|
};
|
|
622
|
-
|
|
915
|
+
_.prototype.skip = function(t) {
|
|
623
916
|
if (t < 0)
|
|
624
917
|
throw new Error("Offset must be non-negative");
|
|
625
918
|
return this.already_offset && this.steps.push({ type: "skip", args: [t] }), this.offset = t, this.already_offset = !0, this;
|
|
626
919
|
};
|
|
627
|
-
|
|
920
|
+
_.prototype.take = function(t) {
|
|
628
921
|
if (t < 0)
|
|
629
922
|
throw new Error("Length must be non-negative");
|
|
630
923
|
return this.already_limit ? (this.steps.push({ type: "take", args: [t] }), this) : (this.limit = t, this.already_limit = !0, this);
|
|
631
924
|
};
|
|
632
|
-
|
|
925
|
+
_.prototype.splice = function(t, e) {
|
|
633
926
|
return this.steps.push({ type: "splice", args: [t, e] }), this.offset = t, this.limit = e, this.already_limit = !0, this.already_offset = !0, this;
|
|
634
927
|
};
|
|
635
|
-
const
|
|
636
|
-
const s = new
|
|
637
|
-
return s.data_path =
|
|
638
|
-
},
|
|
928
|
+
const R = (t, e, r) => {
|
|
929
|
+
const s = new _(r, e);
|
|
930
|
+
return s.data_path = Z + t, s;
|
|
931
|
+
}, et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
639
932
|
__proto__: null,
|
|
640
|
-
default:
|
|
641
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
642
|
-
uploadTempFile: (r) =>
|
|
933
|
+
default: R
|
|
934
|
+
}, Symbol.toStringTag, { value: "Module" })), rt = (t, e) => ({
|
|
935
|
+
uploadTempFile: (r) => d(e, "lightDriveUploadTempFile", {
|
|
643
936
|
index: t,
|
|
644
937
|
file: r
|
|
645
938
|
}, {
|
|
@@ -667,9 +960,9 @@ const N = (t, e, r) => {
|
|
|
667
960
|
}
|
|
668
961
|
}
|
|
669
962
|
})).app.drive.folders,
|
|
670
|
-
create: (r) =>
|
|
671
|
-
delete: (r) =>
|
|
672
|
-
rename: (r, s) =>
|
|
963
|
+
create: (r) => d(e, "lightDriveCreateFolder", { index: t, path: r }),
|
|
964
|
+
delete: (r) => d(e, "lightDriveDeleteFolder", { index: t, path: r }),
|
|
965
|
+
rename: (r, s) => d(e, "lightDriveRenameFolder", { index: t, path: r, name: s })
|
|
673
966
|
},
|
|
674
967
|
files: {
|
|
675
968
|
list: async (r, s = {
|
|
@@ -734,251 +1027,99 @@ const N = (t, e, r) => {
|
|
|
734
1027
|
throw new Error(`File not found or cannot read content: ${r}`);
|
|
735
1028
|
return typeof window < "u" && window.atob ? window.atob(s.app.drive.file.base64Content) : s.app.drive.file.base64Content;
|
|
736
1029
|
},
|
|
737
|
-
write: (r, s) =>
|
|
738
|
-
delete: (r) =>
|
|
739
|
-
rename: (r, s) =>
|
|
740
|
-
move: (r, s) =>
|
|
1030
|
+
write: (r, s) => d(e, "lightDriveWriteFile", { index: t, path: r, content: s }),
|
|
1031
|
+
delete: (r) => d(e, "lightDriveDeleteFile", { index: t, path: r }),
|
|
1032
|
+
rename: (r, s) => d(e, "lightDriveRenameFile", { index: t, path: r, name: s }),
|
|
1033
|
+
move: (r, s) => d(e, "lightDriveMoveFile", { index: t, source: r, destination: s })
|
|
741
1034
|
}
|
|
742
|
-
})
|
|
743
|
-
function v(t) {
|
|
744
|
-
if (t === null || typeof t != "object")
|
|
745
|
-
return !1;
|
|
746
|
-
const e = Object.getPrototypeOf(t);
|
|
747
|
-
return e !== null && e !== Object.prototype && Object.getPrototypeOf(e) !== null || Symbol.iterator in t ? !1 : Symbol.toStringTag in t ? Object.prototype.toString.call(t) === "[object Module]" : !0;
|
|
748
|
-
}
|
|
749
|
-
function S(t, e, r = ".", s) {
|
|
750
|
-
if (!v(e))
|
|
751
|
-
return S(t, {}, r, s);
|
|
752
|
-
const i = Object.assign({}, e);
|
|
753
|
-
for (const h in t) {
|
|
754
|
-
if (h === "__proto__" || h === "constructor")
|
|
755
|
-
continue;
|
|
756
|
-
const f = t[h];
|
|
757
|
-
f != null && (s && s(i, h, f, r) || (Array.isArray(f) && Array.isArray(i[h]) ? i[h] = [...f, ...i[h]] : v(f) && v(i[h]) ? i[h] = S(
|
|
758
|
-
f,
|
|
759
|
-
i[h],
|
|
760
|
-
(r ? `${r}.` : "") + h.toString(),
|
|
761
|
-
s
|
|
762
|
-
) : i[h] = f));
|
|
763
|
-
}
|
|
764
|
-
return i;
|
|
765
|
-
}
|
|
766
|
-
function tt(t) {
|
|
767
|
-
return (...e) => (
|
|
768
|
-
// eslint-disable-next-line unicorn/no-array-reduce
|
|
769
|
-
e.reduce((r, s) => S(r, s, "", t), {})
|
|
770
|
-
);
|
|
771
|
-
}
|
|
772
|
-
const C = tt();
|
|
773
|
-
function et(t, e, r) {
|
|
774
|
-
let s, i = [], h, f;
|
|
775
|
-
const a = (n) => !n || typeof n != "object" ? !1 : Object.values(n).some((o) => o && typeof o == "object" && Object.keys(o).some((l) => l.startsWith("_"))), c = () => i.length === 0 ? (i.unshift({}), i[0]) : (a(i[0]) && i.unshift({}), i[0]);
|
|
776
|
-
return {
|
|
777
|
-
async fetchFirst() {
|
|
778
|
-
return await this.limit(1).fetch().then((o) => Array.isArray(o) && o.length > 0 ? o[0] : null);
|
|
779
|
-
},
|
|
780
|
-
async fetchWithMeta() {
|
|
781
|
-
let o = await m(t, this.toQuery(!0));
|
|
782
|
-
if (f) {
|
|
783
|
-
const l = f.split(".");
|
|
784
|
-
for (const u of l)
|
|
785
|
-
o = o[u];
|
|
786
|
-
return o;
|
|
787
|
-
}
|
|
788
|
-
return o[`list${e}`];
|
|
789
|
-
},
|
|
790
|
-
async fetch() {
|
|
791
|
-
let o = await m(t, this.toQuery());
|
|
792
|
-
if (f) {
|
|
793
|
-
const l = f.split(".");
|
|
794
|
-
for (const u of l)
|
|
795
|
-
o = o[u];
|
|
796
|
-
return o.data;
|
|
797
|
-
}
|
|
798
|
-
return o[`list${e}`].data;
|
|
799
|
-
},
|
|
800
|
-
dataPath(n) {
|
|
801
|
-
return n && typeof n == "string" && (f = n), this;
|
|
802
|
-
},
|
|
803
|
-
sort(n) {
|
|
804
|
-
return n && typeof n == "string" && (h = n), this;
|
|
805
|
-
},
|
|
806
|
-
filters(n) {
|
|
807
|
-
return n && typeof n == "object" && (i = [n]), this;
|
|
808
|
-
},
|
|
809
|
-
// where can be called as:
|
|
810
|
-
// where('key', value) -> exact match
|
|
811
|
-
// where('key', '>', value) -> operator-based (>, <, >=, <=, !=, in, contains)
|
|
812
|
-
where(n, o, l) {
|
|
813
|
-
const u = (d, _, y) => {
|
|
814
|
-
const A = {
|
|
815
|
-
">": "_gt",
|
|
816
|
-
"<": "_lt",
|
|
817
|
-
">=": "_gte",
|
|
818
|
-
"<=": "_lte",
|
|
819
|
-
"!=": "_ne",
|
|
820
|
-
in: "_in",
|
|
821
|
-
contains: "_contains"
|
|
822
|
-
}[_];
|
|
823
|
-
A && i.push({ [d]: { [A]: y } });
|
|
824
|
-
};
|
|
825
|
-
if (l !== void 0)
|
|
826
|
-
u(n, String(o), l);
|
|
827
|
-
else {
|
|
828
|
-
const d = c(), _ = C(d, { [n]: o });
|
|
829
|
-
i[0] = _;
|
|
830
|
-
}
|
|
831
|
-
return this;
|
|
832
|
-
},
|
|
833
|
-
// whereContains adds a _contains filter for a specific field
|
|
834
|
-
// If the same field is used multiple times, it merges them into an array
|
|
835
|
-
whereContains(n, o) {
|
|
836
|
-
if (n && typeof n == "string") {
|
|
837
|
-
const l = c(), u = { _contains: o };
|
|
838
|
-
l[n] ? Array.isArray(l[n]) ? l[n].push(u) : l[n] = [l[n], u] : l[n] = [u], i[0] = l;
|
|
839
|
-
}
|
|
840
|
-
return this;
|
|
841
|
-
},
|
|
842
|
-
// ...existing code...
|
|
843
|
-
// whereIn adds an _in filter for a specific field
|
|
844
|
-
// If the same field is used multiple times, it merges them into an array
|
|
845
|
-
whereIn(n, o) {
|
|
846
|
-
if (n && typeof n == "string" && Array.isArray(o)) {
|
|
847
|
-
const l = c(), u = { _in: o };
|
|
848
|
-
l[n] ? Array.isArray(l[n]) ? l[n].push(u) : l[n] = [l[n], u] : l[n] = [u], i[0] = l;
|
|
849
|
-
}
|
|
850
|
-
return this;
|
|
851
|
-
},
|
|
852
|
-
// whereBetween adds a _between filter for a specific field
|
|
853
|
-
whereBetween(n, o, l) {
|
|
854
|
-
if (n && typeof n == "string") {
|
|
855
|
-
const u = c(), d = { _between: [o, l] };
|
|
856
|
-
u[n] ? Array.isArray(u[n]) ? u[n].push(d) : u[n] = [u[n], d] : u[n] = d, i[0] = u;
|
|
857
|
-
}
|
|
858
|
-
return this;
|
|
859
|
-
},
|
|
860
|
-
// limit sets paging/limit for the data selection
|
|
861
|
-
limit(n) {
|
|
862
|
-
return typeof n == "number" && Number.isFinite(n) && (s = C(s || {}, { limit: n })), this;
|
|
863
|
-
},
|
|
864
|
-
// offset sets the starting index for the data selection
|
|
865
|
-
offset(n) {
|
|
866
|
-
return typeof n == "number" && Number.isFinite(n) && (s = C(s || {}, { offset: n })), this;
|
|
867
|
-
},
|
|
868
|
-
toQuery(n = !1) {
|
|
869
|
-
let o;
|
|
870
|
-
const l = i.length > 0 && Object.keys(i[0] || {}).length > 0, u = l ? 1 : 0, d = i.length > u;
|
|
871
|
-
l && d ? o = i : d ? o = i.slice(u) : l && (o = i[0]);
|
|
872
|
-
const _ = C(
|
|
873
|
-
h ? { sort: h } : {},
|
|
874
|
-
o ? { filters: o } : {}
|
|
875
|
-
), y = {
|
|
876
|
-
data: {
|
|
877
|
-
...r
|
|
878
|
-
}
|
|
879
|
-
};
|
|
880
|
-
if (s && (y.data.__args = s), Object.keys(_).length > 0 && (y.__args = _), n && (y.meta = {
|
|
881
|
-
total: !0,
|
|
882
|
-
key: !0,
|
|
883
|
-
name: !0
|
|
884
|
-
}), f) {
|
|
885
|
-
const w = f.split(".");
|
|
886
|
-
let A = y;
|
|
887
|
-
for (let F = w.length - 1; F >= 0; F--)
|
|
888
|
-
A = {
|
|
889
|
-
[w[F]]: A
|
|
890
|
-
};
|
|
891
|
-
return A;
|
|
892
|
-
}
|
|
893
|
-
return {
|
|
894
|
-
[`list${e}`]: y
|
|
895
|
-
};
|
|
896
|
-
}
|
|
897
|
-
};
|
|
898
|
-
}
|
|
899
|
-
const at = (t) => {
|
|
1035
|
+
}), ft = (t) => {
|
|
900
1036
|
const e = typeof window > "u";
|
|
901
1037
|
let r = [];
|
|
902
|
-
const s =
|
|
1038
|
+
const s = J.create({
|
|
903
1039
|
baseURL: t,
|
|
904
1040
|
withCredentials: !0
|
|
905
1041
|
});
|
|
906
|
-
e && (s.interceptors.request.use((
|
|
907
|
-
if (
|
|
908
|
-
const
|
|
1042
|
+
e && (s.interceptors.request.use((l) => (l.withCredentials = !0, r.length > 0 && (l.headers.Cookie = r.join("; ")), l)), s.interceptors.response.use((l) => {
|
|
1043
|
+
if (l.headers["set-cookie"]) {
|
|
1044
|
+
const h = l.headers["set-cookie"].map((o) => o.split(";")[0]), a = /* @__PURE__ */ new Map();
|
|
909
1045
|
r.forEach((o) => {
|
|
910
|
-
const
|
|
911
|
-
|
|
912
|
-
}),
|
|
913
|
-
const
|
|
914
|
-
|
|
915
|
-
}), r = Array.from(
|
|
1046
|
+
const i = o.split("=")[0];
|
|
1047
|
+
a.set(i, o);
|
|
1048
|
+
}), h.forEach((o) => {
|
|
1049
|
+
const i = o.split("=")[0];
|
|
1050
|
+
a.set(i, o);
|
|
1051
|
+
}), r = Array.from(a.values());
|
|
916
1052
|
}
|
|
917
|
-
return
|
|
1053
|
+
return l;
|
|
918
1054
|
}));
|
|
919
|
-
const
|
|
1055
|
+
const n = (l, h = null, a = []) => d(s, l, h, a), c = (l) => m(s, l), f = B(s);
|
|
920
1056
|
return {
|
|
921
1057
|
baseURL: t,
|
|
922
1058
|
axios: s,
|
|
923
|
-
auth:
|
|
924
|
-
mutation:
|
|
925
|
-
query:
|
|
926
|
-
config:
|
|
927
|
-
mail:
|
|
928
|
-
users:
|
|
929
|
-
fs:
|
|
1059
|
+
auth: $(s),
|
|
1060
|
+
mutation: n,
|
|
1061
|
+
query: c,
|
|
1062
|
+
config: H(c),
|
|
1063
|
+
mail: X(s),
|
|
1064
|
+
users: V(s),
|
|
1065
|
+
fs: G(s),
|
|
930
1066
|
models: f,
|
|
931
|
-
model(
|
|
932
|
-
return f.get(
|
|
933
|
-
},
|
|
934
|
-
roles:
|
|
935
|
-
collect: (
|
|
936
|
-
const
|
|
937
|
-
return
|
|
938
|
-
},
|
|
939
|
-
list: (
|
|
940
|
-
drive(
|
|
941
|
-
return
|
|
942
|
-
},
|
|
943
|
-
async collects(
|
|
944
|
-
const
|
|
945
|
-
for (const
|
|
946
|
-
const u =
|
|
947
|
-
|
|
948
|
-
const
|
|
949
|
-
let
|
|
950
|
-
for (const w of
|
|
951
|
-
if (w ===
|
|
1067
|
+
model(l) {
|
|
1068
|
+
return f.get(l);
|
|
1069
|
+
},
|
|
1070
|
+
roles: Y(s),
|
|
1071
|
+
collect: (l, h) => {
|
|
1072
|
+
const a = R(l, s, h);
|
|
1073
|
+
return a.data_path = f.get(l).getDataPath(), a;
|
|
1074
|
+
},
|
|
1075
|
+
list: (l, h) => S(s, l, h).dataPath(f.get(l).getDataPath()),
|
|
1076
|
+
drive(l) {
|
|
1077
|
+
return rt(l, s);
|
|
1078
|
+
},
|
|
1079
|
+
async collects(l) {
|
|
1080
|
+
const h = {}, a = {};
|
|
1081
|
+
for (const i in l) {
|
|
1082
|
+
const u = l[i].getQueryPayload();
|
|
1083
|
+
a[i] = u.data_path, h[i] = {};
|
|
1084
|
+
const p = u.data_path.split(".");
|
|
1085
|
+
let g = p[p.length - 1], y = h[i];
|
|
1086
|
+
for (const w of p) {
|
|
1087
|
+
if (w === g) {
|
|
952
1088
|
y[w] = u.query;
|
|
953
1089
|
break;
|
|
954
1090
|
}
|
|
955
1091
|
y[w] = y[w] || {};
|
|
956
1092
|
}
|
|
957
|
-
|
|
1093
|
+
h[i].__aliasFor = p[0];
|
|
958
1094
|
}
|
|
959
|
-
const o = await m(s,
|
|
960
|
-
for (const
|
|
961
|
-
const u =
|
|
962
|
-
let
|
|
1095
|
+
const o = await m(s, h);
|
|
1096
|
+
for (const i in l) {
|
|
1097
|
+
const u = a[i].split(".");
|
|
1098
|
+
let p = u[u.length - 1], g = o[i];
|
|
963
1099
|
for (const y of u) {
|
|
964
|
-
if (y ===
|
|
965
|
-
|
|
1100
|
+
if (y === p) {
|
|
1101
|
+
l[i]._batchData = o[i][y];
|
|
966
1102
|
break;
|
|
967
1103
|
}
|
|
968
|
-
|
|
1104
|
+
g[y] = g[y] || {};
|
|
969
1105
|
}
|
|
970
1106
|
}
|
|
971
|
-
return
|
|
1107
|
+
return l;
|
|
972
1108
|
}
|
|
973
1109
|
};
|
|
974
1110
|
};
|
|
975
1111
|
export {
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1112
|
+
ut as File,
|
|
1113
|
+
ft as createClient,
|
|
1114
|
+
R as createCollection,
|
|
1115
|
+
S as createList,
|
|
1116
|
+
B as createModelManager,
|
|
1117
|
+
k as file,
|
|
1118
|
+
d as mutation,
|
|
981
1119
|
m as query,
|
|
982
|
-
|
|
983
|
-
|
|
1120
|
+
E as toQuery,
|
|
1121
|
+
lt as useGlobalModel,
|
|
1122
|
+
ct as useGlobalModels,
|
|
1123
|
+
ot as useModel,
|
|
1124
|
+
I as useWebAuthn
|
|
984
1125
|
};
|