@hostlink/light 2.5.3 → 2.5.4
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/light.js +356 -1935
- package/dist/light.umd.cjs +1 -13
- package/package.json +1 -1
package/dist/light.js
CHANGED
|
@@ -1,187 +1,188 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var _ = (e, t, r) =>
|
|
4
|
-
import { jsonToGraphQLQuery as
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
var I = Object.defineProperty;
|
|
2
|
+
var V = (e, t, r) => t in e ? I(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var _ = (e, t, r) => V(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { jsonToGraphQLQuery as R, VariableType as S } from "json-to-graphql-query";
|
|
5
|
+
import W from "axios";
|
|
6
|
+
import k from "collect.js";
|
|
7
|
+
function q(e) {
|
|
8
|
+
const t = "==".slice(0, (4 - e.length % 4) % 4), r = e.replace(/-/g, "+").replace(/_/g, "/") + t, s = atob(r), n = new ArrayBuffer(s.length), a = new Uint8Array(n);
|
|
9
|
+
for (let u = 0; u < s.length; u++)
|
|
10
|
+
a[u] = s.charCodeAt(u);
|
|
11
|
+
return n;
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
+
function N(e) {
|
|
13
14
|
const t = new Uint8Array(e);
|
|
14
15
|
let r = "";
|
|
15
|
-
for (const
|
|
16
|
-
r += String.fromCharCode(
|
|
16
|
+
for (const a of t)
|
|
17
|
+
r += String.fromCharCode(a);
|
|
17
18
|
return btoa(r).replace(/\+/g, "-").replace(
|
|
18
19
|
/\//g,
|
|
19
20
|
"_"
|
|
20
21
|
).replace(/=/g, "");
|
|
21
22
|
}
|
|
22
|
-
var
|
|
23
|
-
function
|
|
24
|
-
if (t ===
|
|
23
|
+
var f = "copy", m = "convert";
|
|
24
|
+
function A(e, t, r) {
|
|
25
|
+
if (t === f)
|
|
25
26
|
return r;
|
|
26
|
-
if (t ===
|
|
27
|
+
if (t === m)
|
|
27
28
|
return e(r);
|
|
28
29
|
if (t instanceof Array)
|
|
29
|
-
return r.map((
|
|
30
|
+
return r.map((s) => A(e, t[0], s));
|
|
30
31
|
if (t instanceof Object) {
|
|
31
|
-
const
|
|
32
|
-
for (const [
|
|
33
|
-
if (
|
|
34
|
-
const
|
|
35
|
-
|
|
32
|
+
const s = {};
|
|
33
|
+
for (const [n, a] of Object.entries(t)) {
|
|
34
|
+
if (a.derive) {
|
|
35
|
+
const u = a.derive(r);
|
|
36
|
+
u !== void 0 && (r[n] = u);
|
|
36
37
|
}
|
|
37
|
-
if (!(
|
|
38
|
-
if (
|
|
39
|
-
throw new Error(`Missing key: ${
|
|
38
|
+
if (!(n in r)) {
|
|
39
|
+
if (a.required)
|
|
40
|
+
throw new Error(`Missing key: ${n}`);
|
|
40
41
|
continue;
|
|
41
42
|
}
|
|
42
|
-
if (r[
|
|
43
|
-
n
|
|
43
|
+
if (r[n] == null) {
|
|
44
|
+
s[n] = null;
|
|
44
45
|
continue;
|
|
45
46
|
}
|
|
46
|
-
n
|
|
47
|
+
s[n] = A(
|
|
47
48
|
e,
|
|
48
|
-
|
|
49
|
-
r[
|
|
49
|
+
a.schema,
|
|
50
|
+
r[n]
|
|
50
51
|
);
|
|
51
52
|
}
|
|
52
|
-
return
|
|
53
|
+
return s;
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
+
function E(e, t) {
|
|
56
57
|
return {
|
|
57
58
|
required: !0,
|
|
58
59
|
schema: e,
|
|
59
60
|
derive: t
|
|
60
61
|
};
|
|
61
62
|
}
|
|
62
|
-
function
|
|
63
|
+
function p(e) {
|
|
63
64
|
return {
|
|
64
65
|
required: !0,
|
|
65
66
|
schema: e
|
|
66
67
|
};
|
|
67
68
|
}
|
|
68
|
-
function
|
|
69
|
+
function h(e) {
|
|
69
70
|
return {
|
|
70
71
|
required: !1,
|
|
71
72
|
schema: e
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
|
-
var
|
|
75
|
-
type:
|
|
76
|
-
id:
|
|
77
|
-
transports:
|
|
78
|
-
},
|
|
79
|
-
appid:
|
|
80
|
-
appidExclude:
|
|
81
|
-
credProps:
|
|
82
|
-
},
|
|
83
|
-
appid:
|
|
84
|
-
appidExclude:
|
|
85
|
-
credProps:
|
|
86
|
-
},
|
|
87
|
-
publicKey:
|
|
88
|
-
rp:
|
|
89
|
-
user:
|
|
90
|
-
id:
|
|
91
|
-
name:
|
|
92
|
-
displayName:
|
|
75
|
+
var j = {
|
|
76
|
+
type: p(f),
|
|
77
|
+
id: p(m),
|
|
78
|
+
transports: h(f)
|
|
79
|
+
}, U = {
|
|
80
|
+
appid: h(f),
|
|
81
|
+
appidExclude: h(f),
|
|
82
|
+
credProps: h(f)
|
|
83
|
+
}, L = {
|
|
84
|
+
appid: h(f),
|
|
85
|
+
appidExclude: h(f),
|
|
86
|
+
credProps: h(f)
|
|
87
|
+
}, K = {
|
|
88
|
+
publicKey: p({
|
|
89
|
+
rp: p(f),
|
|
90
|
+
user: p({
|
|
91
|
+
id: p(m),
|
|
92
|
+
name: p(f),
|
|
93
|
+
displayName: p(f)
|
|
93
94
|
}),
|
|
94
|
-
challenge:
|
|
95
|
-
pubKeyCredParams:
|
|
96
|
-
timeout:
|
|
97
|
-
excludeCredentials:
|
|
98
|
-
authenticatorSelection:
|
|
99
|
-
attestation:
|
|
100
|
-
extensions:
|
|
95
|
+
challenge: p(m),
|
|
96
|
+
pubKeyCredParams: p(f),
|
|
97
|
+
timeout: h(f),
|
|
98
|
+
excludeCredentials: h([j]),
|
|
99
|
+
authenticatorSelection: h(f),
|
|
100
|
+
attestation: h(f),
|
|
101
|
+
extensions: h(U)
|
|
101
102
|
}),
|
|
102
|
-
signal:
|
|
103
|
-
},
|
|
104
|
-
type:
|
|
105
|
-
id:
|
|
106
|
-
rawId:
|
|
107
|
-
authenticatorAttachment:
|
|
108
|
-
response:
|
|
109
|
-
clientDataJSON:
|
|
110
|
-
attestationObject:
|
|
111
|
-
transports:
|
|
112
|
-
|
|
103
|
+
signal: h(f)
|
|
104
|
+
}, M = {
|
|
105
|
+
type: p(f),
|
|
106
|
+
id: p(f),
|
|
107
|
+
rawId: p(m),
|
|
108
|
+
authenticatorAttachment: h(f),
|
|
109
|
+
response: p({
|
|
110
|
+
clientDataJSON: p(m),
|
|
111
|
+
attestationObject: p(m),
|
|
112
|
+
transports: E(
|
|
113
|
+
f,
|
|
113
114
|
(e) => {
|
|
114
115
|
var t;
|
|
115
116
|
return ((t = e.getTransports) == null ? void 0 : t.call(e)) || [];
|
|
116
117
|
}
|
|
117
118
|
)
|
|
118
119
|
}),
|
|
119
|
-
clientExtensionResults:
|
|
120
|
-
|
|
120
|
+
clientExtensionResults: E(
|
|
121
|
+
L,
|
|
121
122
|
(e) => e.getClientExtensionResults()
|
|
122
123
|
)
|
|
123
|
-
},
|
|
124
|
-
mediation:
|
|
125
|
-
publicKey:
|
|
126
|
-
challenge:
|
|
127
|
-
timeout:
|
|
128
|
-
rpId:
|
|
129
|
-
allowCredentials:
|
|
130
|
-
userVerification:
|
|
131
|
-
extensions:
|
|
124
|
+
}, G = {
|
|
125
|
+
mediation: h(f),
|
|
126
|
+
publicKey: p({
|
|
127
|
+
challenge: p(m),
|
|
128
|
+
timeout: h(f),
|
|
129
|
+
rpId: h(f),
|
|
130
|
+
allowCredentials: h([j]),
|
|
131
|
+
userVerification: h(f),
|
|
132
|
+
extensions: h(U)
|
|
132
133
|
}),
|
|
133
|
-
signal:
|
|
134
|
-
},
|
|
135
|
-
type:
|
|
136
|
-
id:
|
|
137
|
-
rawId:
|
|
138
|
-
authenticatorAttachment:
|
|
139
|
-
response:
|
|
140
|
-
clientDataJSON:
|
|
141
|
-
authenticatorData:
|
|
142
|
-
signature:
|
|
143
|
-
userHandle:
|
|
134
|
+
signal: h(f)
|
|
135
|
+
}, z = {
|
|
136
|
+
type: p(f),
|
|
137
|
+
id: p(f),
|
|
138
|
+
rawId: p(m),
|
|
139
|
+
authenticatorAttachment: h(f),
|
|
140
|
+
response: p({
|
|
141
|
+
clientDataJSON: p(m),
|
|
142
|
+
authenticatorData: p(m),
|
|
143
|
+
signature: p(m),
|
|
144
|
+
userHandle: p(m)
|
|
144
145
|
}),
|
|
145
|
-
clientExtensionResults:
|
|
146
|
-
|
|
146
|
+
clientExtensionResults: E(
|
|
147
|
+
L,
|
|
147
148
|
(e) => e.getClientExtensionResults()
|
|
148
149
|
)
|
|
149
150
|
};
|
|
150
|
-
function
|
|
151
|
-
return
|
|
151
|
+
function Q(e) {
|
|
152
|
+
return A(q, K, e);
|
|
152
153
|
}
|
|
153
|
-
function
|
|
154
|
-
return
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
function $(e) {
|
|
155
|
+
return A(
|
|
156
|
+
N,
|
|
157
|
+
M,
|
|
157
158
|
e
|
|
158
159
|
);
|
|
159
160
|
}
|
|
160
|
-
function
|
|
161
|
-
return
|
|
161
|
+
function H(e) {
|
|
162
|
+
return A(q, G, e);
|
|
162
163
|
}
|
|
163
|
-
function
|
|
164
|
-
return
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
function X(e) {
|
|
165
|
+
return A(
|
|
166
|
+
N,
|
|
167
|
+
z,
|
|
167
168
|
e
|
|
168
169
|
);
|
|
169
170
|
}
|
|
170
|
-
async function
|
|
171
|
+
async function Y(e) {
|
|
171
172
|
const t = await navigator.credentials.create(
|
|
172
173
|
e
|
|
173
174
|
);
|
|
174
|
-
return t.toJSON = () =>
|
|
175
|
+
return t.toJSON = () => $(t), t;
|
|
175
176
|
}
|
|
176
|
-
async function
|
|
177
|
+
async function Z(e) {
|
|
177
178
|
const t = await navigator.credentials.get(
|
|
178
179
|
e
|
|
179
180
|
);
|
|
180
|
-
return t.toJSON = () =>
|
|
181
|
+
return t.toJSON = () => X(t), t;
|
|
181
182
|
}
|
|
182
|
-
const
|
|
183
|
+
const x = (e) => ({
|
|
183
184
|
login: async (t) => {
|
|
184
|
-
const { app: r } = await
|
|
185
|
+
const { app: r } = await y(e, {
|
|
185
186
|
app: {
|
|
186
187
|
auth: {
|
|
187
188
|
webAuthnRequestOptions: {
|
|
@@ -191,266 +192,266 @@ const fr = (e) => ({
|
|
|
191
192
|
}
|
|
192
193
|
}
|
|
193
194
|
}
|
|
194
|
-
}),
|
|
195
|
-
publicKey:
|
|
196
|
-
}),
|
|
197
|
-
await
|
|
195
|
+
}), s = r.auth.webAuthnRequestOptions, n = H({
|
|
196
|
+
publicKey: s
|
|
197
|
+
}), a = await Z(n);
|
|
198
|
+
await o(e, "webAuthnAssertion", {
|
|
198
199
|
username: t,
|
|
199
|
-
assertion:
|
|
200
|
+
assertion: a.toJSON()
|
|
200
201
|
});
|
|
201
202
|
},
|
|
202
203
|
register: async () => {
|
|
203
|
-
const { app: t } = await
|
|
204
|
+
const { app: t } = await y(e, {
|
|
204
205
|
app: {
|
|
205
206
|
auth: {
|
|
206
207
|
webAuthnCreationOptions: !0
|
|
207
208
|
}
|
|
208
209
|
}
|
|
209
|
-
}), r =
|
|
210
|
+
}), r = Q({
|
|
210
211
|
publicKey: t.auth.webAuthnCreationOptions
|
|
211
|
-
}),
|
|
212
|
-
await
|
|
213
|
-
registration:
|
|
212
|
+
}), s = await Y(r);
|
|
213
|
+
await o(e, "webAuthnRegister", {
|
|
214
|
+
registration: s.toJSON()
|
|
214
215
|
});
|
|
215
216
|
}
|
|
216
|
-
}),
|
|
217
|
-
WebAuthn:
|
|
217
|
+
}), ee = (e) => ({
|
|
218
|
+
WebAuthn: x(e),
|
|
218
219
|
google: {
|
|
219
|
-
unlink: () =>
|
|
220
|
-
login: (t) =>
|
|
220
|
+
unlink: () => o(e, "lightAuthUnlinkGoogle"),
|
|
221
|
+
login: (t) => o(e, "lightAuthLoginGoogle", {
|
|
221
222
|
credential: t
|
|
222
223
|
}),
|
|
223
|
-
register: (t) =>
|
|
224
|
+
register: (t) => o(e, "lightAuthRegisterGoogle", {
|
|
224
225
|
credential: t
|
|
225
226
|
})
|
|
226
227
|
},
|
|
227
228
|
facebook: {
|
|
228
|
-
unlink: () =>
|
|
229
|
-
login: (t) =>
|
|
229
|
+
unlink: () => o(e, "lightAuthUnlinkFacebook"),
|
|
230
|
+
login: (t) => o(e, "lightAuthLoginFacebook", {
|
|
230
231
|
access_token: t
|
|
231
232
|
}),
|
|
232
|
-
register: (t) =>
|
|
233
|
+
register: (t) => o(e, "lightAuthRegisterFacebook", {
|
|
233
234
|
access_token: t
|
|
234
235
|
})
|
|
235
236
|
},
|
|
236
237
|
microsoft: {
|
|
237
|
-
unlink: () =>
|
|
238
|
-
login: (t) =>
|
|
238
|
+
unlink: () => o(e, "lightAuthUnlinkMicrosoft"),
|
|
239
|
+
login: (t) => o(e, "lightAuthLoginMicrosoft", {
|
|
239
240
|
access_token: t
|
|
240
241
|
}),
|
|
241
|
-
register: (t) =>
|
|
242
|
+
register: (t) => o(e, "lightAuthRegisterMicrosoft", {
|
|
242
243
|
account_id: t
|
|
243
244
|
})
|
|
244
245
|
},
|
|
245
|
-
login: (t, r,
|
|
246
|
+
login: (t, r, s = "") => o(e, "login", {
|
|
246
247
|
username: t,
|
|
247
248
|
password: r,
|
|
248
|
-
code:
|
|
249
|
+
code: s
|
|
249
250
|
}),
|
|
250
|
-
logout: () =>
|
|
251
|
-
changeExpiredPassword: (t, r,
|
|
251
|
+
logout: () => o(e, "logout"),
|
|
252
|
+
changeExpiredPassword: (t, r, s) => o(e, "changeExpiredPassword", {
|
|
252
253
|
username: t,
|
|
253
254
|
old_password: r,
|
|
254
|
-
new_password:
|
|
255
|
+
new_password: s
|
|
255
256
|
}),
|
|
256
|
-
updatePassword: (t, r) =>
|
|
257
|
+
updatePassword: (t, r) => o(e, "updatePassword", {
|
|
257
258
|
old_password: t,
|
|
258
259
|
new_password: r
|
|
259
260
|
}),
|
|
260
|
-
resetPassword: (t, r,
|
|
261
|
+
resetPassword: (t, r, s) => o(e, "resetPassword", {
|
|
261
262
|
username: t,
|
|
262
263
|
password: r,
|
|
263
|
-
code:
|
|
264
|
+
code: s
|
|
264
265
|
}),
|
|
265
|
-
forgetPassword: (t, r) =>
|
|
266
|
+
forgetPassword: (t, r) => o(e, "forgetPassword", {
|
|
266
267
|
username: t,
|
|
267
268
|
email: r
|
|
268
269
|
}),
|
|
269
270
|
verifyCode(t, r) {
|
|
270
|
-
return
|
|
271
|
+
return o(e, "forgetPasswordVerifyCode", {
|
|
271
272
|
username: t,
|
|
272
273
|
code: r
|
|
273
274
|
});
|
|
274
275
|
},
|
|
275
|
-
granted: async (t) => (await
|
|
276
|
+
granted: async (t) => (await y(e, {
|
|
276
277
|
granted: {
|
|
277
278
|
__args: {
|
|
278
279
|
rights: t
|
|
279
280
|
}
|
|
280
281
|
}
|
|
281
282
|
})).granted
|
|
282
|
-
}),
|
|
283
|
-
const
|
|
284
|
-
let
|
|
285
|
-
const
|
|
283
|
+
}), te = (e, t, r) => {
|
|
284
|
+
const s = t, n = e, a = r;
|
|
285
|
+
let u = "list" + t;
|
|
286
|
+
const l = (i) => a[i] ? a[i]() : null;
|
|
286
287
|
return {
|
|
287
|
-
field:
|
|
288
|
-
$fields:
|
|
289
|
-
setDataPath(
|
|
290
|
-
return
|
|
288
|
+
field: l,
|
|
289
|
+
$fields: a,
|
|
290
|
+
setDataPath(i) {
|
|
291
|
+
return u = i, u;
|
|
291
292
|
},
|
|
292
293
|
getDataPath() {
|
|
293
|
-
return
|
|
294
|
+
return u;
|
|
294
295
|
},
|
|
295
|
-
gqlFields(
|
|
296
|
+
gqlFields(i) {
|
|
296
297
|
const c = [];
|
|
297
|
-
for (const
|
|
298
|
-
if (typeof
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
} else typeof
|
|
298
|
+
for (const d of i)
|
|
299
|
+
if (typeof d == "string") {
|
|
300
|
+
const b = l(d);
|
|
301
|
+
b && c.push(b.getGQLField());
|
|
302
|
+
} else typeof d == "object" && c.push(d);
|
|
302
303
|
return c;
|
|
303
304
|
},
|
|
304
|
-
async update(
|
|
305
|
-
return await
|
|
305
|
+
async update(i, c) {
|
|
306
|
+
return await o(n, "update" + s, { id: i, data: c });
|
|
306
307
|
},
|
|
307
|
-
async delete(
|
|
308
|
-
return await
|
|
308
|
+
async delete(i) {
|
|
309
|
+
return await o(n, "delete" + s, { id: i });
|
|
309
310
|
},
|
|
310
|
-
async add(
|
|
311
|
-
return await
|
|
311
|
+
async add(i) {
|
|
312
|
+
return await o(n, "add" + s, { data: i });
|
|
312
313
|
},
|
|
313
|
-
fields(
|
|
314
|
+
fields(i) {
|
|
314
315
|
let c = [];
|
|
315
|
-
for (let
|
|
316
|
-
const
|
|
317
|
-
|
|
316
|
+
for (let d of i) {
|
|
317
|
+
const b = l(d);
|
|
318
|
+
b && c.push(b);
|
|
318
319
|
}
|
|
319
320
|
return c;
|
|
320
321
|
},
|
|
321
|
-
async get(
|
|
322
|
-
return (await
|
|
323
|
-
["list" +
|
|
322
|
+
async get(i, c) {
|
|
323
|
+
return (await y(n, {
|
|
324
|
+
["list" + s]: {
|
|
324
325
|
__args: {
|
|
325
|
-
filters:
|
|
326
|
+
filters: i
|
|
326
327
|
},
|
|
327
328
|
data: {
|
|
328
329
|
__args: {
|
|
329
330
|
limit: 1
|
|
330
331
|
},
|
|
331
|
-
...
|
|
332
|
+
...O(c)
|
|
332
333
|
}
|
|
333
334
|
}
|
|
334
|
-
}))["list" +
|
|
335
|
+
}))["list" + s].data[0];
|
|
335
336
|
},
|
|
336
|
-
async list(
|
|
337
|
-
return (await
|
|
338
|
-
["list" +
|
|
337
|
+
async list(i, c) {
|
|
338
|
+
return (await y(n, {
|
|
339
|
+
["list" + s]: {
|
|
339
340
|
__args: {
|
|
340
|
-
filters:
|
|
341
|
+
filters: i
|
|
341
342
|
},
|
|
342
343
|
data: {
|
|
343
|
-
...
|
|
344
|
+
...O(c)
|
|
344
345
|
}
|
|
345
346
|
}
|
|
346
|
-
}))["list" +
|
|
347
|
+
}))["list" + s].data;
|
|
347
348
|
}
|
|
348
349
|
};
|
|
349
350
|
};
|
|
350
|
-
function
|
|
351
|
+
function re(e) {
|
|
351
352
|
e = "<~" + e + "~>";
|
|
352
|
-
var t, r,
|
|
353
|
-
for (e.slice(0, 2) === "<~" && e.slice(-2), e = e.slice(2, -2).replace(/\s/g, "").replace("z", "!!!!!"), t = "uuuuu".slice(e.length % 5 || 5), e += t,
|
|
354
|
-
return function(
|
|
355
|
-
for (var
|
|
356
|
-
}(
|
|
357
|
-
}
|
|
358
|
-
const
|
|
359
|
-
const t = e, r = (
|
|
360
|
-
const
|
|
361
|
-
for (let
|
|
362
|
-
|
|
363
|
-
const
|
|
364
|
-
return URL.createObjectURL(
|
|
353
|
+
var t, r, s, n, a, u = String, l = 255;
|
|
354
|
+
for (e.slice(0, 2) === "<~" && e.slice(-2), e = e.slice(2, -2).replace(/\s/g, "").replace("z", "!!!!!"), t = "uuuuu".slice(e.length % 5 || 5), e += t, s = [], n = 0, a = e.length; a > n; n += 5) r = 52200625 * (e.charCodeAt(n) - 33) + 614125 * (e.charCodeAt(n + 1) - 33) + 7225 * (e.charCodeAt(n + 2) - 33) + 85 * (e.charCodeAt(n + 3) - 33) + (e.charCodeAt(n + 4) - 33), s.push(l & r >> 24, l & r >> 16, l & r >> 8, l & r);
|
|
355
|
+
return function(i, c) {
|
|
356
|
+
for (var d = c; d > 0; d--) i.pop();
|
|
357
|
+
}(s, t.length), u.fromCharCode.apply(u, s);
|
|
358
|
+
}
|
|
359
|
+
const B = (e = "") => {
|
|
360
|
+
const t = e, r = (s = "application/octet-stream") => {
|
|
361
|
+
const n = new Uint8Array(t.length);
|
|
362
|
+
for (let l = 0; l < t.length; l++)
|
|
363
|
+
n[l] = t.charCodeAt(l);
|
|
364
|
+
const a = new Blob([n], { type: s });
|
|
365
|
+
return URL.createObjectURL(a);
|
|
365
366
|
};
|
|
366
367
|
return {
|
|
367
368
|
getContent: () => t,
|
|
368
369
|
getURL: r,
|
|
369
|
-
download: (
|
|
370
|
-
const
|
|
371
|
-
|
|
370
|
+
download: (s) => {
|
|
371
|
+
const n = document.createElement("a");
|
|
372
|
+
n.download = s, n.href = r(), document.body.appendChild(n), n.click(), document.body.removeChild(n);
|
|
372
373
|
},
|
|
373
|
-
open: (
|
|
374
|
-
window.open(r(
|
|
374
|
+
open: (s) => {
|
|
375
|
+
window.open(r(s), "_blank");
|
|
375
376
|
}
|
|
376
377
|
};
|
|
377
|
-
},
|
|
378
|
-
fromBase85: (e) =>
|
|
379
|
-
fromBase64: (e) =>
|
|
380
|
-
fromString: (e) =>
|
|
381
|
-
},
|
|
378
|
+
}, me = {
|
|
379
|
+
fromBase85: (e) => B(re(e)),
|
|
380
|
+
fromBase64: (e) => B(atob(e)),
|
|
381
|
+
fromString: (e) => B(e)
|
|
382
|
+
}, P = (e) => {
|
|
382
383
|
let t = {};
|
|
383
384
|
return typeof e == "string" ? (t[e] = !0, t) : e instanceof Array ? (e.forEach((r) => {
|
|
384
|
-
Object.entries(
|
|
385
|
-
t[
|
|
385
|
+
Object.entries(P(r)).forEach(([s, n]) => {
|
|
386
|
+
t[s] = n;
|
|
386
387
|
});
|
|
387
|
-
}), t) : (Object.entries(e).forEach(([r,
|
|
388
|
+
}), t) : (Object.entries(e).forEach(([r, s]) => {
|
|
388
389
|
if (r == "__args" || r == "__aliasFor" || r == "__variables" || r == "__directives" || r == "__all_on" || r == "__name") {
|
|
389
|
-
t[r] =
|
|
390
|
+
t[r] = s;
|
|
390
391
|
return;
|
|
391
392
|
}
|
|
392
|
-
if (typeof
|
|
393
|
-
t[r] =
|
|
393
|
+
if (typeof s == "boolean") {
|
|
394
|
+
t[r] = s;
|
|
394
395
|
return;
|
|
395
396
|
}
|
|
396
|
-
t[r] =
|
|
397
|
+
t[r] = P(s);
|
|
397
398
|
}), t);
|
|
398
|
-
},
|
|
399
|
-
let r =
|
|
400
|
-
const
|
|
399
|
+
}, O = (e) => P(e), y = async (e, t) => {
|
|
400
|
+
let r = R(O(t));
|
|
401
|
+
const s = await e.post("", {
|
|
401
402
|
query: `{ ${r} }`
|
|
402
403
|
});
|
|
403
|
-
if (
|
|
404
|
-
throw new Error(
|
|
405
|
-
return
|
|
404
|
+
if (s.data.errors)
|
|
405
|
+
throw new Error(s.data.errors[0].message);
|
|
406
|
+
return s.data.data;
|
|
406
407
|
};
|
|
407
|
-
function
|
|
408
|
+
function se(e) {
|
|
408
409
|
for (let t = 0; t < e.length; t++)
|
|
409
410
|
if (e[t] instanceof File)
|
|
410
411
|
return !0;
|
|
411
412
|
return !1;
|
|
412
413
|
}
|
|
413
|
-
function
|
|
414
|
+
function ne(e) {
|
|
414
415
|
for (let t in e)
|
|
415
416
|
if (e[t] instanceof File)
|
|
416
417
|
return !0;
|
|
417
418
|
return !1;
|
|
418
419
|
}
|
|
419
|
-
const
|
|
420
|
-
let
|
|
420
|
+
const o = async (e, t, r = null, s = []) => {
|
|
421
|
+
let n = {
|
|
421
422
|
[t]: {}
|
|
422
423
|
};
|
|
423
|
-
const
|
|
424
|
-
let
|
|
424
|
+
const a = new FormData();
|
|
425
|
+
let u = !1;
|
|
425
426
|
if (r) {
|
|
426
|
-
const c = {},
|
|
427
|
-
let
|
|
428
|
-
Object.entries(r).forEach(([
|
|
429
|
-
if (
|
|
430
|
-
|
|
431
|
-
let
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
}),
|
|
435
|
-
} else
|
|
436
|
-
|
|
437
|
-
})) :
|
|
438
|
-
}),
|
|
439
|
-
}
|
|
440
|
-
Object.entries(
|
|
441
|
-
|
|
442
|
-
}), Object.entries(
|
|
443
|
-
let
|
|
444
|
-
const
|
|
445
|
-
if (
|
|
446
|
-
query:
|
|
447
|
-
})),
|
|
448
|
-
query:
|
|
449
|
-
}),
|
|
450
|
-
throw new Error(
|
|
451
|
-
return
|
|
452
|
-
},
|
|
453
|
-
uploadTempFile: (t) =>
|
|
427
|
+
const c = {}, d = {}, b = {};
|
|
428
|
+
let F = 0;
|
|
429
|
+
Object.entries(r).forEach(([w, v]) => {
|
|
430
|
+
if (v instanceof Array && se(v)) {
|
|
431
|
+
u = !0;
|
|
432
|
+
let C = 0;
|
|
433
|
+
v.forEach((D) => {
|
|
434
|
+
D instanceof File && (c[w] = new S(w), d[F] = ["variables." + w + "." + C], a.append(F.toString(), D), F++);
|
|
435
|
+
}), b[w] = "[Upload!]!";
|
|
436
|
+
} else v instanceof File ? (u = !0, c[w] = new S(w), d[F] = ["variables." + w], a.append(F.toString(), v), b[w] = "Upload!", F++) : v instanceof Object && ne(v) ? (u = !0, c[w] = {}, Object.entries(v).forEach(([C, D]) => {
|
|
437
|
+
D instanceof File ? (c[w][C] = new S(C), d[F] = ["variables." + C], a.append(F.toString(), D), b[C] = "Upload!", F++) : c[w][C] = D;
|
|
438
|
+
})) : v !== void 0 && (c[w] = v);
|
|
439
|
+
}), n[t].__args = c, n.__variables = b, u && a.append("map", JSON.stringify(d));
|
|
440
|
+
}
|
|
441
|
+
Object.entries(O(s)).forEach(([c, d]) => {
|
|
442
|
+
n[t][c] = d;
|
|
443
|
+
}), Object.entries(n[t]).length === 0 && (n[t] = !0);
|
|
444
|
+
let l = null;
|
|
445
|
+
const i = R({ mutation: n });
|
|
446
|
+
if (u ? (a.append("operations", JSON.stringify({
|
|
447
|
+
query: i
|
|
448
|
+
})), l = await e.post("", a)) : l = await e.post("", {
|
|
449
|
+
query: i
|
|
450
|
+
}), l.data.errors)
|
|
451
|
+
throw new Error(l.data.errors[0].message);
|
|
452
|
+
return l.data.data[t];
|
|
453
|
+
}, ae = (e) => ({
|
|
454
|
+
uploadTempFile: (t) => o(e, "fsUploadTempFile", {
|
|
454
455
|
file: t
|
|
455
456
|
}, {
|
|
456
457
|
name: !0,
|
|
@@ -459,7 +460,7 @@ const f = async (e, t, r = null, n = []) => {
|
|
|
459
460
|
mime: !0
|
|
460
461
|
}),
|
|
461
462
|
folders: {
|
|
462
|
-
list: async (t) => (await
|
|
463
|
+
list: async (t) => (await y(e, {
|
|
463
464
|
fsListFolders: {
|
|
464
465
|
__args: {
|
|
465
466
|
path: t
|
|
@@ -468,12 +469,12 @@ const f = async (e, t, r = null, n = []) => {
|
|
|
468
469
|
path: !0
|
|
469
470
|
}
|
|
470
471
|
})).fsListFolders,
|
|
471
|
-
create: (t) =>
|
|
472
|
-
delete: (t) =>
|
|
473
|
-
rename: (t, r) =>
|
|
472
|
+
create: (t) => o(e, "fsCreateFolder", { path: t }),
|
|
473
|
+
delete: (t) => o(e, "fsDeleteFolder", { path: t }),
|
|
474
|
+
rename: (t, r) => o(e, "fsRenameFolder", { path: t, name: r })
|
|
474
475
|
},
|
|
475
476
|
files: {
|
|
476
|
-
list: async (t) => (await
|
|
477
|
+
list: async (t) => (await y(e, {
|
|
477
478
|
fsListFiles: {
|
|
478
479
|
__args: {
|
|
479
480
|
path: t
|
|
@@ -487,7 +488,7 @@ const f = async (e, t, r = null, n = []) => {
|
|
|
487
488
|
}
|
|
488
489
|
})).fsListFiles,
|
|
489
490
|
read: async (t) => {
|
|
490
|
-
let r = await
|
|
491
|
+
let r = await y(e, {
|
|
491
492
|
fsFile: {
|
|
492
493
|
__args: {
|
|
493
494
|
path: t
|
|
@@ -497,15 +498,15 @@ const f = async (e, t, r = null, n = []) => {
|
|
|
497
498
|
});
|
|
498
499
|
return window.atob(r.fsFile.base64Content);
|
|
499
500
|
},
|
|
500
|
-
write: (t, r) =>
|
|
501
|
+
write: (t, r) => o(e, "fsWriteFile", {
|
|
501
502
|
path: t,
|
|
502
503
|
content: r
|
|
503
504
|
}),
|
|
504
|
-
delete: (t) =>
|
|
505
|
-
rename: (t, r) =>
|
|
506
|
-
move: (t, r) =>
|
|
505
|
+
delete: (t) => o(e, "fsDeleteFile", { path: t }),
|
|
506
|
+
rename: (t, r) => o(e, "fsRenameFile", { path: t, name: r }),
|
|
507
|
+
move: (t, r) => o(e, "fsMoveFile", { source: t, target: r })
|
|
507
508
|
}
|
|
508
|
-
}),
|
|
509
|
+
}), ie = (e) => ({
|
|
509
510
|
get: async (t) => (await e({
|
|
510
511
|
config: {
|
|
511
512
|
__args: {
|
|
@@ -513,13 +514,13 @@ const f = async (e, t, r = null, n = []) => {
|
|
|
513
514
|
}
|
|
514
515
|
}
|
|
515
516
|
})).config
|
|
516
|
-
}),
|
|
517
|
-
send: (t, r,
|
|
517
|
+
}), oe = (e) => ({
|
|
518
|
+
send: (t, r, s) => o(e, "sendMail", {
|
|
518
519
|
email: t,
|
|
519
520
|
subject: r,
|
|
520
|
-
message:
|
|
521
|
+
message: s
|
|
521
522
|
})
|
|
522
|
-
}),
|
|
523
|
+
}), le = (e) => ({
|
|
523
524
|
list: async (t = {
|
|
524
525
|
user_id: !0,
|
|
525
526
|
username: !0,
|
|
@@ -527,1632 +528,52 @@ const f = async (e, t, r = null, n = []) => {
|
|
|
527
528
|
last_name: !0,
|
|
528
529
|
status: !0
|
|
529
530
|
}) => {
|
|
530
|
-
const r =
|
|
531
|
+
const r = T("Users", e, t);
|
|
531
532
|
return r.data_path = "app.users", r.all();
|
|
532
533
|
}
|
|
533
|
-
}),
|
|
534
|
+
}), ue = (e) => {
|
|
534
535
|
const t = e, r = {};
|
|
535
536
|
return {
|
|
536
|
-
create(
|
|
537
|
-
r[
|
|
538
|
-
let
|
|
539
|
-
for (const
|
|
540
|
-
const [
|
|
541
|
-
|
|
542
|
-
name:
|
|
543
|
-
raw:
|
|
544
|
-
getName: () =>
|
|
545
|
-
getGQLField: () =>
|
|
537
|
+
create(s, n) {
|
|
538
|
+
r[s] = null;
|
|
539
|
+
let a = {};
|
|
540
|
+
for (const u of Object.entries(n)) {
|
|
541
|
+
const [l, i] = u;
|
|
542
|
+
a[l] = () => ({
|
|
543
|
+
name: i.name ? i.name : l,
|
|
544
|
+
raw: i,
|
|
545
|
+
getName: () => i.name ? i.name : l,
|
|
546
|
+
getGQLField: () => i.gqlField !== void 0 ? i.gqlField : i.name || l,
|
|
546
547
|
getRaw() {
|
|
547
|
-
return
|
|
548
|
+
return i;
|
|
548
549
|
},
|
|
549
550
|
getValue(c) {
|
|
550
|
-
return
|
|
551
|
+
return i.field && typeof i.field == "function" ? i.field(c) : i.field && typeof i.field == "string" ? c[i.field] : c[this.getName()];
|
|
551
552
|
},
|
|
552
553
|
getFormattedValue(c) {
|
|
553
|
-
const
|
|
554
|
-
return
|
|
554
|
+
const d = this.getValue(c);
|
|
555
|
+
return i.format ? i.format(d) : d;
|
|
555
556
|
}
|
|
556
557
|
});
|
|
557
558
|
}
|
|
558
|
-
r[
|
|
559
|
+
r[s] = te(t, s, a);
|
|
559
560
|
},
|
|
560
|
-
get(
|
|
561
|
-
return r[
|
|
561
|
+
get(s) {
|
|
562
|
+
return r[s] || this.create(s, {}), r[s];
|
|
562
563
|
}
|
|
563
564
|
};
|
|
564
|
-
},
|
|
565
|
+
}, ce = (e) => ({
|
|
565
566
|
list: async (t = {
|
|
566
567
|
name: !0
|
|
567
568
|
}) => {
|
|
568
|
-
const { app: { roles: r } } = await
|
|
569
|
+
const { app: { roles: r } } = await y(e, {
|
|
569
570
|
app: {
|
|
570
571
|
roles: t
|
|
571
572
|
}
|
|
572
573
|
});
|
|
573
574
|
return r;
|
|
574
575
|
}
|
|
575
|
-
})
|
|
576
|
-
function _r(e) {
|
|
577
|
-
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
578
|
-
}
|
|
579
|
-
var Mt = { exports: {} }, Or = function() {
|
|
580
|
-
var t = this, r = -1;
|
|
581
|
-
return {
|
|
582
|
-
next: function() {
|
|
583
|
-
return r += 1, {
|
|
584
|
-
value: t.items[r],
|
|
585
|
-
done: r >= t.items.length
|
|
586
|
-
};
|
|
587
|
-
}
|
|
588
|
-
};
|
|
589
|
-
}, Sr = function() {
|
|
590
|
-
return this.items;
|
|
591
|
-
};
|
|
592
|
-
function Q(e) {
|
|
593
|
-
"@babel/helpers - typeof";
|
|
594
|
-
return Q = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
595
|
-
return typeof t;
|
|
596
|
-
} : function(t) {
|
|
597
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
598
|
-
}, Q(e);
|
|
599
|
-
}
|
|
600
|
-
var d = {
|
|
601
|
-
/**
|
|
602
|
-
* @returns {boolean}
|
|
603
|
-
*/
|
|
604
|
-
isArray: function(t) {
|
|
605
|
-
return Array.isArray(t);
|
|
606
|
-
},
|
|
607
|
-
/**
|
|
608
|
-
* @returns {boolean}
|
|
609
|
-
*/
|
|
610
|
-
isObject: function(t) {
|
|
611
|
-
return Q(t) === "object" && Array.isArray(t) === !1 && t !== null;
|
|
612
|
-
},
|
|
613
|
-
/**
|
|
614
|
-
* @returns {boolean}
|
|
615
|
-
*/
|
|
616
|
-
isFunction: function(t) {
|
|
617
|
-
return typeof t == "function";
|
|
618
|
-
}
|
|
619
|
-
}, $r = d, jr = $r.isFunction, Rt = function(t) {
|
|
620
|
-
return t === void 0 ? this.sum() / this.items.length : jr(t) ? new this.constructor(this.items).sum(t) / this.items.length : new this.constructor(this.items).pluck(t).sum() / this.items.length;
|
|
621
|
-
}, Er = Rt, Ir = Er;
|
|
622
|
-
function z(e) {
|
|
623
|
-
"@babel/helpers - typeof";
|
|
624
|
-
return z = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
625
|
-
return typeof t;
|
|
626
|
-
} : function(t) {
|
|
627
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
628
|
-
}, z(e);
|
|
629
|
-
}
|
|
630
|
-
var Cr = function(t) {
|
|
631
|
-
var r = this, n = [], i = 0;
|
|
632
|
-
if (Array.isArray(this.items))
|
|
633
|
-
do {
|
|
634
|
-
var s = this.items.slice(i, i + t), o = new this.constructor(s);
|
|
635
|
-
n.push(o), i += t;
|
|
636
|
-
} while (i < this.items.length);
|
|
637
|
-
else if (z(this.items) === "object") {
|
|
638
|
-
var u = Object.keys(this.items), a = function() {
|
|
639
|
-
var h = u.slice(i, i + t), v = new r.constructor({});
|
|
640
|
-
h.forEach(function(l) {
|
|
641
|
-
return v.put(l, r.items[l]);
|
|
642
|
-
}), n.push(v), i += t;
|
|
643
|
-
};
|
|
644
|
-
do
|
|
645
|
-
a();
|
|
646
|
-
while (i < u.length);
|
|
647
|
-
} else
|
|
648
|
-
n.push(new this.constructor([this.items]));
|
|
649
|
-
return new this.constructor(n);
|
|
650
|
-
};
|
|
651
|
-
function Dr(e) {
|
|
652
|
-
return Nr(e) || Pr(e) || Tr(e) || Fr();
|
|
653
|
-
}
|
|
654
|
-
function Fr() {
|
|
655
|
-
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
656
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
657
|
-
}
|
|
658
|
-
function Tr(e, t) {
|
|
659
|
-
if (e) {
|
|
660
|
-
if (typeof e == "string") return X(e, t);
|
|
661
|
-
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
662
|
-
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
663
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return X(e, t);
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
function Pr(e) {
|
|
667
|
-
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
668
|
-
}
|
|
669
|
-
function Nr(e) {
|
|
670
|
-
if (Array.isArray(e)) return X(e);
|
|
671
|
-
}
|
|
672
|
-
function X(e, t) {
|
|
673
|
-
(t == null || t > e.length) && (t = e.length);
|
|
674
|
-
for (var r = 0, n = new Array(t); r < t; r++)
|
|
675
|
-
n[r] = e[r];
|
|
676
|
-
return n;
|
|
677
|
-
}
|
|
678
|
-
var Br = function() {
|
|
679
|
-
var t;
|
|
680
|
-
return new this.constructor((t = []).concat.apply(t, Dr(this.items)));
|
|
681
|
-
};
|
|
682
|
-
function qr(e, t) {
|
|
683
|
-
return Kr(e) || Rr(e, t) || Mr(e, t) || Ur();
|
|
684
|
-
}
|
|
685
|
-
function Ur() {
|
|
686
|
-
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
687
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
688
|
-
}
|
|
689
|
-
function Mr(e, t) {
|
|
690
|
-
if (e) {
|
|
691
|
-
if (typeof e == "string") return ht(e, t);
|
|
692
|
-
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
693
|
-
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
694
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return ht(e, t);
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
function ht(e, t) {
|
|
698
|
-
(t == null || t > e.length) && (t = e.length);
|
|
699
|
-
for (var r = 0, n = new Array(t); r < t; r++)
|
|
700
|
-
n[r] = e[r];
|
|
701
|
-
return n;
|
|
702
|
-
}
|
|
703
|
-
function Rr(e, t) {
|
|
704
|
-
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
705
|
-
if (r != null) {
|
|
706
|
-
var n = [], i = !0, s = !1, o, u;
|
|
707
|
-
try {
|
|
708
|
-
for (r = r.call(e); !(i = (o = r.next()).done) && (n.push(o.value), !(t && n.length === t)); i = !0)
|
|
709
|
-
;
|
|
710
|
-
} catch (a) {
|
|
711
|
-
s = !0, u = a;
|
|
712
|
-
} finally {
|
|
713
|
-
try {
|
|
714
|
-
!i && r.return != null && r.return();
|
|
715
|
-
} finally {
|
|
716
|
-
if (s) throw u;
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
return n;
|
|
720
|
-
}
|
|
721
|
-
}
|
|
722
|
-
function Kr(e) {
|
|
723
|
-
if (Array.isArray(e)) return e;
|
|
724
|
-
}
|
|
725
|
-
function B(e) {
|
|
726
|
-
"@babel/helpers - typeof";
|
|
727
|
-
return B = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
728
|
-
return typeof t;
|
|
729
|
-
} : function(t) {
|
|
730
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
731
|
-
}, B(e);
|
|
732
|
-
}
|
|
733
|
-
var Wr = function(t) {
|
|
734
|
-
var r = this, n = t;
|
|
735
|
-
n instanceof this.constructor && (n = t.all());
|
|
736
|
-
var i = {};
|
|
737
|
-
if (Array.isArray(this.items) && Array.isArray(n))
|
|
738
|
-
this.items.forEach(function(u, a) {
|
|
739
|
-
i[u] = n[a];
|
|
740
|
-
});
|
|
741
|
-
else if (B(this.items) === "object" && B(n) === "object")
|
|
742
|
-
Object.keys(this.items).forEach(function(u, a) {
|
|
743
|
-
i[r.items[u]] = n[Object.keys(n)[a]];
|
|
744
|
-
});
|
|
745
|
-
else if (Array.isArray(this.items))
|
|
746
|
-
i[this.items[0]] = n;
|
|
747
|
-
else if (typeof this.items == "string" && Array.isArray(n)) {
|
|
748
|
-
var s = n, o = qr(s, 1);
|
|
749
|
-
i[this.items] = o[0];
|
|
750
|
-
} else typeof this.items == "string" && (i[this.items] = n);
|
|
751
|
-
return new this.constructor(i);
|
|
752
|
-
};
|
|
753
|
-
function Jr(e) {
|
|
754
|
-
return xr(e) || Hr(e) || Lr(e) || Vr();
|
|
755
|
-
}
|
|
756
|
-
function Vr() {
|
|
757
|
-
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
758
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
759
|
-
}
|
|
760
|
-
function Lr(e, t) {
|
|
761
|
-
if (e) {
|
|
762
|
-
if (typeof e == "string") return Y(e, t);
|
|
763
|
-
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
764
|
-
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
765
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Y(e, t);
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
function Hr(e) {
|
|
769
|
-
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
770
|
-
}
|
|
771
|
-
function xr(e) {
|
|
772
|
-
if (Array.isArray(e)) return Y(e);
|
|
773
|
-
}
|
|
774
|
-
function Y(e, t) {
|
|
775
|
-
(t == null || t > e.length) && (t = e.length);
|
|
776
|
-
for (var r = 0, n = new Array(t); r < t; r++)
|
|
777
|
-
n[r] = e[r];
|
|
778
|
-
return n;
|
|
779
|
-
}
|
|
780
|
-
var Kt = function(t) {
|
|
781
|
-
var r;
|
|
782
|
-
if (Array.isArray(t)) {
|
|
783
|
-
var n;
|
|
784
|
-
r = [], (n = r).push.apply(n, Jr(t));
|
|
785
|
-
} else
|
|
786
|
-
r = {}, Object.keys(t).forEach(function(i) {
|
|
787
|
-
r[i] = t[i];
|
|
788
|
-
});
|
|
789
|
-
return r;
|
|
790
|
-
};
|
|
791
|
-
function q(e) {
|
|
792
|
-
"@babel/helpers - typeof";
|
|
793
|
-
return q = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
794
|
-
return typeof t;
|
|
795
|
-
} : function(t) {
|
|
796
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
797
|
-
}, q(e);
|
|
798
|
-
}
|
|
799
|
-
var Gr = Kt, Qr = function(t) {
|
|
800
|
-
var r = t;
|
|
801
|
-
t instanceof this.constructor ? r = t.all() : q(t) === "object" && (r = [], Object.keys(t).forEach(function(i) {
|
|
802
|
-
r.push(t[i]);
|
|
803
|
-
}));
|
|
804
|
-
var n = Gr(this.items);
|
|
805
|
-
return r.forEach(function(i) {
|
|
806
|
-
q(i) === "object" ? Object.keys(i).forEach(function(s) {
|
|
807
|
-
return n.push(i[s]);
|
|
808
|
-
}) : n.push(i);
|
|
809
|
-
}), new this.constructor(n);
|
|
810
|
-
};
|
|
811
|
-
function yt(e) {
|
|
812
|
-
return Zr(e) || Yr(e) || Xr(e) || zr();
|
|
813
|
-
}
|
|
814
|
-
function zr() {
|
|
815
|
-
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
816
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
817
|
-
}
|
|
818
|
-
function Xr(e, t) {
|
|
819
|
-
if (e) {
|
|
820
|
-
if (typeof e == "string") return Z(e, t);
|
|
821
|
-
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
822
|
-
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
823
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return Z(e, t);
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
function Yr(e) {
|
|
827
|
-
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
828
|
-
}
|
|
829
|
-
function Zr(e) {
|
|
830
|
-
if (Array.isArray(e)) return Z(e);
|
|
831
|
-
}
|
|
832
|
-
function Z(e, t) {
|
|
833
|
-
(t == null || t > e.length) && (t = e.length);
|
|
834
|
-
for (var r = 0, n = new Array(t); r < t; r++)
|
|
835
|
-
n[r] = e[r];
|
|
836
|
-
return n;
|
|
837
|
-
}
|
|
838
|
-
var $ = function(t) {
|
|
839
|
-
var r = [];
|
|
840
|
-
return Array.isArray(t) ? r.push.apply(r, yt(t)) : t.constructor.name === "Collection" ? r.push.apply(r, yt(t.all())) : Object.keys(t).forEach(function(n) {
|
|
841
|
-
return r.push(t[n]);
|
|
842
|
-
}), r;
|
|
843
|
-
};
|
|
844
|
-
function kr(e) {
|
|
845
|
-
return ne(e) || ee(e) || re(e) || te();
|
|
846
|
-
}
|
|
847
|
-
function te() {
|
|
848
|
-
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
849
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
850
|
-
}
|
|
851
|
-
function re(e, t) {
|
|
852
|
-
if (e) {
|
|
853
|
-
if (typeof e == "string") return k(e, t);
|
|
854
|
-
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
855
|
-
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
856
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return k(e, t);
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
function ee(e) {
|
|
860
|
-
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
861
|
-
}
|
|
862
|
-
function ne(e) {
|
|
863
|
-
if (Array.isArray(e)) return k(e);
|
|
864
|
-
}
|
|
865
|
-
function k(e, t) {
|
|
866
|
-
(t == null || t > e.length) && (t = e.length);
|
|
867
|
-
for (var r = 0, n = new Array(t); r < t; r++)
|
|
868
|
-
n[r] = e[r];
|
|
869
|
-
return n;
|
|
870
|
-
}
|
|
871
|
-
var ie = $, se = d, oe = se.isFunction, Wt = function(t, r) {
|
|
872
|
-
if (r !== void 0)
|
|
873
|
-
return Array.isArray(this.items) ? this.items.filter(function(i) {
|
|
874
|
-
return i[t] !== void 0 && i[t] === r;
|
|
875
|
-
}).length > 0 : this.items[t] !== void 0 && this.items[t] === r;
|
|
876
|
-
if (oe(t))
|
|
877
|
-
return this.items.filter(function(i, s) {
|
|
878
|
-
return t(i, s);
|
|
879
|
-
}).length > 0;
|
|
880
|
-
if (Array.isArray(this.items))
|
|
881
|
-
return this.items.indexOf(t) !== -1;
|
|
882
|
-
var n = ie(this.items);
|
|
883
|
-
return n.push.apply(n, kr(Object.keys(this.items))), n.indexOf(t) !== -1;
|
|
884
|
-
}, ae = function() {
|
|
885
|
-
return this.count() === 1;
|
|
886
|
-
}, ue = function() {
|
|
887
|
-
var t = 0;
|
|
888
|
-
return Array.isArray(this.items) && (t = this.items.length), Math.max(Object.keys(this.items).length, t);
|
|
889
|
-
}, ce = function() {
|
|
890
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(r) {
|
|
891
|
-
return r;
|
|
892
|
-
};
|
|
893
|
-
return new this.constructor(this.items).groupBy(t).map(function(r) {
|
|
894
|
-
return r.count();
|
|
895
|
-
});
|
|
896
|
-
}, fe = function() {
|
|
897
|
-
function t(s, o, u) {
|
|
898
|
-
var a = u[0];
|
|
899
|
-
a instanceof o && (a = a.all());
|
|
900
|
-
for (var c = u.slice(1), h = !c.length, v = [], l = 0; l < a.length; l += 1) {
|
|
901
|
-
var m = s.slice();
|
|
902
|
-
m.push(a[l]), h ? v.push(m) : v = v.concat(t(m, o, c));
|
|
903
|
-
}
|
|
904
|
-
return v;
|
|
905
|
-
}
|
|
906
|
-
for (var r = arguments.length, n = new Array(r), i = 0; i < r; i++)
|
|
907
|
-
n[i] = arguments[i];
|
|
908
|
-
return new this.constructor(t([], this.constructor, [].concat([this.items], n)));
|
|
909
|
-
}, le = function() {
|
|
910
|
-
this.dump(), typeof process < "u" && process.exit(1);
|
|
911
|
-
}, pe = function(t) {
|
|
912
|
-
var r;
|
|
913
|
-
t instanceof this.constructor ? r = t.all() : r = t;
|
|
914
|
-
var n = this.items.filter(function(i) {
|
|
915
|
-
return r.indexOf(i) === -1;
|
|
916
|
-
});
|
|
917
|
-
return new this.constructor(n);
|
|
918
|
-
}, he = function(t) {
|
|
919
|
-
var r = this, n = t;
|
|
920
|
-
t instanceof this.constructor && (n = t.all());
|
|
921
|
-
var i = {};
|
|
922
|
-
return Object.keys(this.items).forEach(function(s) {
|
|
923
|
-
(n[s] === void 0 || n[s] !== r.items[s]) && (i[s] = r.items[s]);
|
|
924
|
-
}), new this.constructor(i);
|
|
925
|
-
}, ye = function(t) {
|
|
926
|
-
var r;
|
|
927
|
-
t instanceof this.constructor ? r = t.all() : r = t;
|
|
928
|
-
var n = Object.keys(r), i = Object.keys(this.items).filter(function(s) {
|
|
929
|
-
return n.indexOf(s) === -1;
|
|
930
|
-
});
|
|
931
|
-
return new this.constructor(this.items).only(i);
|
|
932
|
-
}, me = function(t, r) {
|
|
933
|
-
var n = this.items.filter(function(i) {
|
|
934
|
-
return !(t && t.some(function(s) {
|
|
935
|
-
return r(i, s) === 0;
|
|
936
|
-
}));
|
|
937
|
-
});
|
|
938
|
-
return new this.constructor(n);
|
|
939
|
-
}, de = function(t, r) {
|
|
940
|
-
return !this.contains(t, r);
|
|
941
|
-
}, ve = function() {
|
|
942
|
-
return console.log(this), this;
|
|
943
|
-
};
|
|
944
|
-
function U(e) {
|
|
945
|
-
"@babel/helpers - typeof";
|
|
946
|
-
return U = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
947
|
-
return typeof t;
|
|
948
|
-
} : function(t) {
|
|
949
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
950
|
-
}, U(e);
|
|
951
|
-
}
|
|
952
|
-
var be = function() {
|
|
953
|
-
var t = this, r = [], n = {}, i = function(o) {
|
|
954
|
-
return Array.isArray(o) || U(o) === "object" ? JSON.stringify(o) : o;
|
|
955
|
-
};
|
|
956
|
-
return Array.isArray(this.items) ? this.items.forEach(function(s, o) {
|
|
957
|
-
var u = i(s);
|
|
958
|
-
r.indexOf(u) === -1 ? r.push(u) : n[o] = s;
|
|
959
|
-
}) : U(this.items) === "object" && Object.keys(this.items).forEach(function(s) {
|
|
960
|
-
var o = i(t.items[s]);
|
|
961
|
-
r.indexOf(o) === -1 ? r.push(o) : n[s] = t.items[s];
|
|
962
|
-
}), new this.constructor(n);
|
|
963
|
-
}, ge = function(t) {
|
|
964
|
-
var r = !1;
|
|
965
|
-
if (Array.isArray(this.items))
|
|
966
|
-
for (var n = this.items.length, i = 0; i < n && !r; i += 1)
|
|
967
|
-
r = t(this.items[i], i, this.items) === !1;
|
|
968
|
-
else
|
|
969
|
-
for (var s = Object.keys(this.items), o = s.length, u = 0; u < o && !r; u += 1) {
|
|
970
|
-
var a = s[u];
|
|
971
|
-
r = t(this.items[a], a, this.items) === !1;
|
|
972
|
-
}
|
|
973
|
-
return this;
|
|
974
|
-
};
|
|
975
|
-
function we(e) {
|
|
976
|
-
return Se(e) || Oe(e) || _e(e) || Ae();
|
|
977
|
-
}
|
|
978
|
-
function Ae() {
|
|
979
|
-
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
980
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
981
|
-
}
|
|
982
|
-
function _e(e, t) {
|
|
983
|
-
if (e) {
|
|
984
|
-
if (typeof e == "string") return tt(e, t);
|
|
985
|
-
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
986
|
-
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
987
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return tt(e, t);
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
function Oe(e) {
|
|
991
|
-
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
992
|
-
}
|
|
993
|
-
function Se(e) {
|
|
994
|
-
if (Array.isArray(e)) return tt(e);
|
|
995
|
-
}
|
|
996
|
-
function tt(e, t) {
|
|
997
|
-
(t == null || t > e.length) && (t = e.length);
|
|
998
|
-
for (var r = 0, n = new Array(t); r < t; r++)
|
|
999
|
-
n[r] = e[r];
|
|
1000
|
-
return n;
|
|
1001
|
-
}
|
|
1002
|
-
var $e = function(t) {
|
|
1003
|
-
return this.each(function(r, n) {
|
|
1004
|
-
t.apply(void 0, we(r).concat([n]));
|
|
1005
|
-
}), this;
|
|
1006
|
-
}, je = $, Ee = function(t) {
|
|
1007
|
-
var r = je(this.items);
|
|
1008
|
-
return r.every(t);
|
|
1009
|
-
}, R = function(t) {
|
|
1010
|
-
return Array.isArray(t[0]) ? t[0] : t;
|
|
1011
|
-
}, Ie = R, Ce = function() {
|
|
1012
|
-
for (var t = this, r = arguments.length, n = new Array(r), i = 0; i < r; i++)
|
|
1013
|
-
n[i] = arguments[i];
|
|
1014
|
-
var s = Ie(n);
|
|
1015
|
-
if (Array.isArray(this.items)) {
|
|
1016
|
-
var o = this.items.filter(function(a) {
|
|
1017
|
-
return s.indexOf(a) === -1;
|
|
1018
|
-
});
|
|
1019
|
-
return new this.constructor(o);
|
|
1020
|
-
}
|
|
1021
|
-
var u = {};
|
|
1022
|
-
return Object.keys(this.items).forEach(function(a) {
|
|
1023
|
-
s.indexOf(a) === -1 && (u[a] = t.items[a]);
|
|
1024
|
-
}), new this.constructor(u);
|
|
1025
|
-
};
|
|
1026
|
-
function rt(e) {
|
|
1027
|
-
"@babel/helpers - typeof";
|
|
1028
|
-
return rt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1029
|
-
return typeof t;
|
|
1030
|
-
} : function(t) {
|
|
1031
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1032
|
-
}, rt(e);
|
|
1033
|
-
}
|
|
1034
|
-
function Jt(e) {
|
|
1035
|
-
if (Array.isArray(e)) {
|
|
1036
|
-
if (e.length)
|
|
1037
|
-
return !1;
|
|
1038
|
-
} else if (e != null && rt(e) === "object") {
|
|
1039
|
-
if (Object.keys(e).length)
|
|
1040
|
-
return !1;
|
|
1041
|
-
} else if (e)
|
|
1042
|
-
return !1;
|
|
1043
|
-
return !0;
|
|
1044
|
-
}
|
|
1045
|
-
function De(e, t) {
|
|
1046
|
-
var r = {};
|
|
1047
|
-
return Object.keys(t).forEach(function(n) {
|
|
1048
|
-
e ? e(t[n], n) && (r[n] = t[n]) : Jt(t[n]) || (r[n] = t[n]);
|
|
1049
|
-
}), r;
|
|
1050
|
-
}
|
|
1051
|
-
function Fe(e, t) {
|
|
1052
|
-
if (e)
|
|
1053
|
-
return t.filter(e);
|
|
1054
|
-
for (var r = [], n = 0; n < t.length; n += 1) {
|
|
1055
|
-
var i = t[n];
|
|
1056
|
-
Jt(i) || r.push(i);
|
|
1057
|
-
}
|
|
1058
|
-
return r;
|
|
1059
|
-
}
|
|
1060
|
-
var Te = function(t) {
|
|
1061
|
-
var r = t || !1, n = null;
|
|
1062
|
-
return Array.isArray(this.items) ? n = Fe(r, this.items) : n = De(r, this.items), new this.constructor(n);
|
|
1063
|
-
}, Pe = d, J = Pe.isFunction, Ne = function(t, r) {
|
|
1064
|
-
if (J(t)) {
|
|
1065
|
-
for (var n = Object.keys(this.items), i = 0; i < n.length; i += 1) {
|
|
1066
|
-
var s = n[i], o = this.items[s];
|
|
1067
|
-
if (t(o, s))
|
|
1068
|
-
return o;
|
|
1069
|
-
}
|
|
1070
|
-
return J(r) ? r() : r;
|
|
1071
|
-
}
|
|
1072
|
-
if (Array.isArray(this.items) && this.items.length || Object.keys(this.items).length) {
|
|
1073
|
-
if (Array.isArray(this.items))
|
|
1074
|
-
return this.items[0];
|
|
1075
|
-
var u = Object.keys(this.items)[0];
|
|
1076
|
-
return this.items[u];
|
|
1077
|
-
}
|
|
1078
|
-
return J(r) ? r() : r;
|
|
1079
|
-
}, Be = d, qe = Be.isFunction, Ue = function(t, r, n) {
|
|
1080
|
-
if (qe(t))
|
|
1081
|
-
return this.first(t, function() {
|
|
1082
|
-
throw new Error("Item not found.");
|
|
1083
|
-
});
|
|
1084
|
-
var i = this.where(t, r, n);
|
|
1085
|
-
if (i.isEmpty())
|
|
1086
|
-
throw new Error("Item not found.");
|
|
1087
|
-
return i.first();
|
|
1088
|
-
}, Me = function(t, r, n) {
|
|
1089
|
-
return this.where(t, r, n).first() || null;
|
|
1090
|
-
}, Re = function(t) {
|
|
1091
|
-
return this.map(t).collapse();
|
|
1092
|
-
}, Vt = d, V = Vt.isArray, L = Vt.isObject, Ke = function(t) {
|
|
1093
|
-
var r = t || 1 / 0, n = !1, i = [], s = function(u) {
|
|
1094
|
-
i = [], V(u) ? u.forEach(function(a) {
|
|
1095
|
-
V(a) ? i = i.concat(a) : L(a) ? Object.keys(a).forEach(function(c) {
|
|
1096
|
-
i = i.concat(a[c]);
|
|
1097
|
-
}) : i.push(a);
|
|
1098
|
-
}) : Object.keys(u).forEach(function(a) {
|
|
1099
|
-
V(u[a]) ? i = i.concat(u[a]) : L(u[a]) ? Object.keys(u[a]).forEach(function(c) {
|
|
1100
|
-
i = i.concat(u[a][c]);
|
|
1101
|
-
}) : i.push(u[a]);
|
|
1102
|
-
}), n = i.filter(function(a) {
|
|
1103
|
-
return L(a);
|
|
1104
|
-
}), n = n.length === 0, r -= 1;
|
|
1105
|
-
};
|
|
1106
|
-
for (s(this.items); !n && r > 0; )
|
|
1107
|
-
s(i);
|
|
1108
|
-
return new this.constructor(i);
|
|
1109
|
-
}, We = function() {
|
|
1110
|
-
var t = this, r = {};
|
|
1111
|
-
return Array.isArray(this.items) ? Object.keys(this.items).forEach(function(n) {
|
|
1112
|
-
r[t.items[n]] = Number(n);
|
|
1113
|
-
}) : Object.keys(this.items).forEach(function(n) {
|
|
1114
|
-
r[t.items[n]] = n;
|
|
1115
|
-
}), new this.constructor(r);
|
|
1116
|
-
}, Je = function(t, r) {
|
|
1117
|
-
var n = this, i = {};
|
|
1118
|
-
return Array.isArray(this.items) ? i = this.items.slice(t * r - r, t * r) : Object.keys(this.items).slice(t * r - r, t * r).forEach(function(s) {
|
|
1119
|
-
i[s] = n.items[s];
|
|
1120
|
-
}), new this.constructor(i);
|
|
1121
|
-
}, Ve = function(t) {
|
|
1122
|
-
return Array.isArray(this.items) ? this.items.splice(t, 1) : delete this.items[t], this;
|
|
1123
|
-
}, Le = d, He = Le.isFunction, xe = function(t) {
|
|
1124
|
-
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
1125
|
-
return this.items[t] !== void 0 ? this.items[t] : He(r) ? r() : r !== null ? r : null;
|
|
1126
|
-
}, j = function(t, r) {
|
|
1127
|
-
try {
|
|
1128
|
-
return r.split(".").reduce(function(n, i) {
|
|
1129
|
-
return n[i];
|
|
1130
|
-
}, t);
|
|
1131
|
-
} catch {
|
|
1132
|
-
return t;
|
|
1133
|
-
}
|
|
1134
|
-
}, H = j, Ge = d, Qe = Ge.isFunction, ze = function(t) {
|
|
1135
|
-
var r = this, n = {};
|
|
1136
|
-
return this.items.forEach(function(i, s) {
|
|
1137
|
-
var o;
|
|
1138
|
-
Qe(t) ? o = t(i, s) : H(i, t) || H(i, t) === 0 ? o = H(i, t) : o = "", n[o] === void 0 && (n[o] = new r.constructor([])), n[o].push(i);
|
|
1139
|
-
}), new this.constructor(n);
|
|
1140
|
-
}, Xe = R, Ye = function() {
|
|
1141
|
-
for (var t = this, r = arguments.length, n = new Array(r), i = 0; i < r; i++)
|
|
1142
|
-
n[i] = arguments[i];
|
|
1143
|
-
var s = Xe(n);
|
|
1144
|
-
return s.filter(function(o) {
|
|
1145
|
-
return Object.hasOwnProperty.call(t.items, o);
|
|
1146
|
-
}).length === s.length;
|
|
1147
|
-
}, Ze = function(t, r) {
|
|
1148
|
-
return r === void 0 ? this.items.join(t) : new this.constructor(this.items).pluck(t).all().join(r);
|
|
1149
|
-
}, ke = function(t) {
|
|
1150
|
-
var r = t;
|
|
1151
|
-
t instanceof this.constructor && (r = t.all());
|
|
1152
|
-
var n = this.items.filter(function(i) {
|
|
1153
|
-
return r.indexOf(i) !== -1;
|
|
1154
|
-
});
|
|
1155
|
-
return new this.constructor(n);
|
|
1156
|
-
}, tn = function(t) {
|
|
1157
|
-
var r = this, n = Object.keys(t);
|
|
1158
|
-
t instanceof this.constructor && (n = Object.keys(t.all()));
|
|
1159
|
-
var i = {};
|
|
1160
|
-
return Object.keys(this.items).forEach(function(s) {
|
|
1161
|
-
n.indexOf(s) !== -1 && (i[s] = r.items[s]);
|
|
1162
|
-
}), new this.constructor(i);
|
|
1163
|
-
}, rn = function() {
|
|
1164
|
-
return Array.isArray(this.items) ? !this.items.length : !Object.keys(this.items).length;
|
|
1165
|
-
}, en = function() {
|
|
1166
|
-
return !this.isEmpty();
|
|
1167
|
-
}, nn = function(t, r) {
|
|
1168
|
-
var n = this.values();
|
|
1169
|
-
if (r === void 0)
|
|
1170
|
-
return n.implode(t);
|
|
1171
|
-
var i = n.count();
|
|
1172
|
-
if (i === 0)
|
|
1173
|
-
return "";
|
|
1174
|
-
if (i === 1)
|
|
1175
|
-
return n.last();
|
|
1176
|
-
var s = n.pop();
|
|
1177
|
-
return n.implode(t) + r + s;
|
|
1178
|
-
}, sn = j, on = d, an = on.isFunction, un = function(t) {
|
|
1179
|
-
var r = {};
|
|
1180
|
-
return an(t) ? this.items.forEach(function(n) {
|
|
1181
|
-
r[t(n)] = n;
|
|
1182
|
-
}) : this.items.forEach(function(n) {
|
|
1183
|
-
var i = sn(n, t);
|
|
1184
|
-
r[i || ""] = n;
|
|
1185
|
-
}), new this.constructor(r);
|
|
1186
|
-
}, cn = function() {
|
|
1187
|
-
var t = Object.keys(this.items);
|
|
1188
|
-
return Array.isArray(this.items) && (t = t.map(Number)), new this.constructor(t);
|
|
1189
|
-
}, fn = d, mt = fn.isFunction, ln = function(t, r) {
|
|
1190
|
-
var n = this.items;
|
|
1191
|
-
if (mt(t) && (n = this.filter(t).all()), Array.isArray(n) && !n.length || !Object.keys(n).length)
|
|
1192
|
-
return mt(r) ? r() : r;
|
|
1193
|
-
if (Array.isArray(n))
|
|
1194
|
-
return n[n.length - 1];
|
|
1195
|
-
var i = Object.keys(n);
|
|
1196
|
-
return n[i[i.length - 1]];
|
|
1197
|
-
}, pn = function(t, r) {
|
|
1198
|
-
this.constructor.prototype[t] = r;
|
|
1199
|
-
}, hn = function() {
|
|
1200
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
1201
|
-
return new this.constructor(t);
|
|
1202
|
-
}, yn = function(t) {
|
|
1203
|
-
var r = this;
|
|
1204
|
-
if (Array.isArray(this.items))
|
|
1205
|
-
return new this.constructor(this.items.map(t));
|
|
1206
|
-
var n = {};
|
|
1207
|
-
return Object.keys(this.items).forEach(function(i) {
|
|
1208
|
-
n[i] = t(r.items[i], i);
|
|
1209
|
-
}), new this.constructor(n);
|
|
1210
|
-
};
|
|
1211
|
-
function mn(e) {
|
|
1212
|
-
return gn(e) || bn(e) || vn(e) || dn();
|
|
1213
|
-
}
|
|
1214
|
-
function dn() {
|
|
1215
|
-
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1216
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1217
|
-
}
|
|
1218
|
-
function vn(e, t) {
|
|
1219
|
-
if (e) {
|
|
1220
|
-
if (typeof e == "string") return et(e, t);
|
|
1221
|
-
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
1222
|
-
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
1223
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return et(e, t);
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
function bn(e) {
|
|
1227
|
-
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
1228
|
-
}
|
|
1229
|
-
function gn(e) {
|
|
1230
|
-
if (Array.isArray(e)) return et(e);
|
|
1231
|
-
}
|
|
1232
|
-
function et(e, t) {
|
|
1233
|
-
(t == null || t > e.length) && (t = e.length);
|
|
1234
|
-
for (var r = 0, n = new Array(t); r < t; r++)
|
|
1235
|
-
n[r] = e[r];
|
|
1236
|
-
return n;
|
|
1237
|
-
}
|
|
1238
|
-
var wn = function(t) {
|
|
1239
|
-
return this.map(function(r, n) {
|
|
1240
|
-
return t.apply(void 0, mn(r).concat([n]));
|
|
1241
|
-
});
|
|
1242
|
-
};
|
|
1243
|
-
function An(e, t) {
|
|
1244
|
-
return $n(e) || Sn(e, t) || On(e, t) || _n();
|
|
1245
|
-
}
|
|
1246
|
-
function _n() {
|
|
1247
|
-
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1248
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1249
|
-
}
|
|
1250
|
-
function On(e, t) {
|
|
1251
|
-
if (e) {
|
|
1252
|
-
if (typeof e == "string") return dt(e, t);
|
|
1253
|
-
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
1254
|
-
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
1255
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return dt(e, t);
|
|
1256
|
-
}
|
|
1257
|
-
}
|
|
1258
|
-
function dt(e, t) {
|
|
1259
|
-
(t == null || t > e.length) && (t = e.length);
|
|
1260
|
-
for (var r = 0, n = new Array(t); r < t; r++)
|
|
1261
|
-
n[r] = e[r];
|
|
1262
|
-
return n;
|
|
1263
|
-
}
|
|
1264
|
-
function Sn(e, t) {
|
|
1265
|
-
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1266
|
-
if (r != null) {
|
|
1267
|
-
var n = [], i = !0, s = !1, o, u;
|
|
1268
|
-
try {
|
|
1269
|
-
for (r = r.call(e); !(i = (o = r.next()).done) && (n.push(o.value), !(t && n.length === t)); i = !0)
|
|
1270
|
-
;
|
|
1271
|
-
} catch (a) {
|
|
1272
|
-
s = !0, u = a;
|
|
1273
|
-
} finally {
|
|
1274
|
-
try {
|
|
1275
|
-
!i && r.return != null && r.return();
|
|
1276
|
-
} finally {
|
|
1277
|
-
if (s) throw u;
|
|
1278
|
-
}
|
|
1279
|
-
}
|
|
1280
|
-
return n;
|
|
1281
|
-
}
|
|
1282
|
-
}
|
|
1283
|
-
function $n(e) {
|
|
1284
|
-
if (Array.isArray(e)) return e;
|
|
1285
|
-
}
|
|
1286
|
-
var jn = function(t) {
|
|
1287
|
-
var r = {};
|
|
1288
|
-
return this.items.forEach(function(n, i) {
|
|
1289
|
-
var s = t(n, i), o = An(s, 2), u = o[0], a = o[1];
|
|
1290
|
-
r[u] === void 0 ? r[u] = [a] : r[u].push(a);
|
|
1291
|
-
}), new this.constructor(r);
|
|
1292
|
-
}, En = function(t) {
|
|
1293
|
-
return this.map(function(r, n) {
|
|
1294
|
-
return new t(r, n);
|
|
1295
|
-
});
|
|
1296
|
-
};
|
|
1297
|
-
function In(e, t) {
|
|
1298
|
-
return Tn(e) || Fn(e, t) || Dn(e, t) || Cn();
|
|
1299
|
-
}
|
|
1300
|
-
function Cn() {
|
|
1301
|
-
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1302
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1303
|
-
}
|
|
1304
|
-
function Dn(e, t) {
|
|
1305
|
-
if (e) {
|
|
1306
|
-
if (typeof e == "string") return vt(e, t);
|
|
1307
|
-
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
1308
|
-
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
1309
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return vt(e, t);
|
|
1310
|
-
}
|
|
1311
|
-
}
|
|
1312
|
-
function vt(e, t) {
|
|
1313
|
-
(t == null || t > e.length) && (t = e.length);
|
|
1314
|
-
for (var r = 0, n = new Array(t); r < t; r++)
|
|
1315
|
-
n[r] = e[r];
|
|
1316
|
-
return n;
|
|
1317
|
-
}
|
|
1318
|
-
function Fn(e, t) {
|
|
1319
|
-
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1320
|
-
if (r != null) {
|
|
1321
|
-
var n = [], i = !0, s = !1, o, u;
|
|
1322
|
-
try {
|
|
1323
|
-
for (r = r.call(e); !(i = (o = r.next()).done) && (n.push(o.value), !(t && n.length === t)); i = !0)
|
|
1324
|
-
;
|
|
1325
|
-
} catch (a) {
|
|
1326
|
-
s = !0, u = a;
|
|
1327
|
-
} finally {
|
|
1328
|
-
try {
|
|
1329
|
-
!i && r.return != null && r.return();
|
|
1330
|
-
} finally {
|
|
1331
|
-
if (s) throw u;
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
return n;
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1337
|
-
function Tn(e) {
|
|
1338
|
-
if (Array.isArray(e)) return e;
|
|
1339
|
-
}
|
|
1340
|
-
var Pn = function(t) {
|
|
1341
|
-
var r = {};
|
|
1342
|
-
return this.items.forEach(function(n, i) {
|
|
1343
|
-
var s = t(n, i), o = In(s, 2), u = o[0], a = o[1];
|
|
1344
|
-
r[u] === void 0 ? r[u] = [a] : r[u].push(a);
|
|
1345
|
-
}), new this.constructor(r);
|
|
1346
|
-
};
|
|
1347
|
-
function bt(e, t) {
|
|
1348
|
-
return Un(e) || qn(e, t) || Bn(e, t) || Nn();
|
|
1349
|
-
}
|
|
1350
|
-
function Nn() {
|
|
1351
|
-
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1352
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1353
|
-
}
|
|
1354
|
-
function Bn(e, t) {
|
|
1355
|
-
if (e) {
|
|
1356
|
-
if (typeof e == "string") return gt(e, t);
|
|
1357
|
-
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
1358
|
-
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
1359
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return gt(e, t);
|
|
1360
|
-
}
|
|
1361
|
-
}
|
|
1362
|
-
function gt(e, t) {
|
|
1363
|
-
(t == null || t > e.length) && (t = e.length);
|
|
1364
|
-
for (var r = 0, n = new Array(t); r < t; r++)
|
|
1365
|
-
n[r] = e[r];
|
|
1366
|
-
return n;
|
|
1367
|
-
}
|
|
1368
|
-
function qn(e, t) {
|
|
1369
|
-
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1370
|
-
if (r != null) {
|
|
1371
|
-
var n = [], i = !0, s = !1, o, u;
|
|
1372
|
-
try {
|
|
1373
|
-
for (r = r.call(e); !(i = (o = r.next()).done) && (n.push(o.value), !(t && n.length === t)); i = !0)
|
|
1374
|
-
;
|
|
1375
|
-
} catch (a) {
|
|
1376
|
-
s = !0, u = a;
|
|
1377
|
-
} finally {
|
|
1378
|
-
try {
|
|
1379
|
-
!i && r.return != null && r.return();
|
|
1380
|
-
} finally {
|
|
1381
|
-
if (s) throw u;
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
return n;
|
|
1385
|
-
}
|
|
1386
|
-
}
|
|
1387
|
-
function Un(e) {
|
|
1388
|
-
if (Array.isArray(e)) return e;
|
|
1389
|
-
}
|
|
1390
|
-
var Mn = function(t) {
|
|
1391
|
-
var r = this, n = {};
|
|
1392
|
-
return Array.isArray(this.items) ? this.items.forEach(function(i, s) {
|
|
1393
|
-
var o = t(i, s), u = bt(o, 2), a = u[0], c = u[1];
|
|
1394
|
-
n[a] = c;
|
|
1395
|
-
}) : Object.keys(this.items).forEach(function(i) {
|
|
1396
|
-
var s = t(r.items[i], i), o = bt(s, 2), u = o[0], a = o[1];
|
|
1397
|
-
n[u] = a;
|
|
1398
|
-
}), new this.constructor(n);
|
|
1399
|
-
};
|
|
1400
|
-
function wt(e) {
|
|
1401
|
-
return Jn(e) || Wn(e) || Kn(e) || Rn();
|
|
1402
|
-
}
|
|
1403
|
-
function Rn() {
|
|
1404
|
-
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1405
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1406
|
-
}
|
|
1407
|
-
function Kn(e, t) {
|
|
1408
|
-
if (e) {
|
|
1409
|
-
if (typeof e == "string") return nt(e, t);
|
|
1410
|
-
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
1411
|
-
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
1412
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return nt(e, t);
|
|
1413
|
-
}
|
|
1414
|
-
}
|
|
1415
|
-
function Wn(e) {
|
|
1416
|
-
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
1417
|
-
}
|
|
1418
|
-
function Jn(e) {
|
|
1419
|
-
if (Array.isArray(e)) return nt(e);
|
|
1420
|
-
}
|
|
1421
|
-
function nt(e, t) {
|
|
1422
|
-
(t == null || t > e.length) && (t = e.length);
|
|
1423
|
-
for (var r = 0, n = new Array(t); r < t; r++)
|
|
1424
|
-
n[r] = e[r];
|
|
1425
|
-
return n;
|
|
1426
|
-
}
|
|
1427
|
-
var Vn = function(t) {
|
|
1428
|
-
if (typeof t == "string") {
|
|
1429
|
-
var r = this.items.filter(function(n) {
|
|
1430
|
-
return n[t] !== void 0;
|
|
1431
|
-
});
|
|
1432
|
-
return Math.max.apply(Math, wt(r.map(function(n) {
|
|
1433
|
-
return n[t];
|
|
1434
|
-
})));
|
|
1435
|
-
}
|
|
1436
|
-
return Math.max.apply(Math, wt(this.items));
|
|
1437
|
-
}, Ln = function(t) {
|
|
1438
|
-
var r = this.items.length;
|
|
1439
|
-
return t === void 0 ? r % 2 === 0 ? (this.items[r / 2 - 1] + this.items[r / 2]) / 2 : this.items[Math.floor(r / 2)] : r % 2 === 0 ? (this.items[r / 2 - 1][t] + this.items[r / 2][t]) / 2 : this.items[Math.floor(r / 2)][t];
|
|
1440
|
-
}, Hn = function(t) {
|
|
1441
|
-
var r = t;
|
|
1442
|
-
if (typeof r == "string" && (r = [r]), Array.isArray(this.items) && Array.isArray(r))
|
|
1443
|
-
return new this.constructor(this.items.concat(r));
|
|
1444
|
-
var n = JSON.parse(JSON.stringify(this.items));
|
|
1445
|
-
return Object.keys(r).forEach(function(i) {
|
|
1446
|
-
n[i] = r[i];
|
|
1447
|
-
}), new this.constructor(n);
|
|
1448
|
-
};
|
|
1449
|
-
function M(e) {
|
|
1450
|
-
"@babel/helpers - typeof";
|
|
1451
|
-
return M = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1452
|
-
return typeof t;
|
|
1453
|
-
} : function(t) {
|
|
1454
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1455
|
-
}, M(e);
|
|
1456
|
-
}
|
|
1457
|
-
function At(e, t) {
|
|
1458
|
-
var r = Object.keys(e);
|
|
1459
|
-
if (Object.getOwnPropertySymbols) {
|
|
1460
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
1461
|
-
t && (n = n.filter(function(i) {
|
|
1462
|
-
return Object.getOwnPropertyDescriptor(e, i).enumerable;
|
|
1463
|
-
})), r.push.apply(r, n);
|
|
1464
|
-
}
|
|
1465
|
-
return r;
|
|
1466
|
-
}
|
|
1467
|
-
function _t(e) {
|
|
1468
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
1469
|
-
var r = arguments[t] != null ? arguments[t] : {};
|
|
1470
|
-
t % 2 ? At(Object(r), !0).forEach(function(n) {
|
|
1471
|
-
xn(e, n, r[n]);
|
|
1472
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : At(Object(r)).forEach(function(n) {
|
|
1473
|
-
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1474
|
-
});
|
|
1475
|
-
}
|
|
1476
|
-
return e;
|
|
1477
|
-
}
|
|
1478
|
-
function xn(e, t, r) {
|
|
1479
|
-
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1480
|
-
}
|
|
1481
|
-
var Gn = function(t) {
|
|
1482
|
-
var r = function n(i, s) {
|
|
1483
|
-
var o = {}, u = Object.keys(_t(_t({}, i), s));
|
|
1484
|
-
return u.forEach(function(a) {
|
|
1485
|
-
i[a] === void 0 && s[a] !== void 0 ? o[a] = s[a] : i[a] !== void 0 && s[a] === void 0 ? o[a] = i[a] : i[a] !== void 0 && s[a] !== void 0 && (i[a] === s[a] ? o[a] = i[a] : !Array.isArray(i[a]) && M(i[a]) === "object" && !Array.isArray(s[a]) && M(s[a]) === "object" ? o[a] = n(i[a], s[a]) : o[a] = [].concat(i[a], s[a]));
|
|
1486
|
-
}), o;
|
|
1487
|
-
};
|
|
1488
|
-
return t ? t.constructor.name === "Collection" ? new this.constructor(r(this.items, t.all())) : new this.constructor(r(this.items, t)) : this;
|
|
1489
|
-
};
|
|
1490
|
-
function Ot(e) {
|
|
1491
|
-
return Yn(e) || Xn(e) || zn(e) || Qn();
|
|
1492
|
-
}
|
|
1493
|
-
function Qn() {
|
|
1494
|
-
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1495
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1496
|
-
}
|
|
1497
|
-
function zn(e, t) {
|
|
1498
|
-
if (e) {
|
|
1499
|
-
if (typeof e == "string") return it(e, t);
|
|
1500
|
-
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
1501
|
-
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
1502
|
-
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return it(e, t);
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
function Xn(e) {
|
|
1506
|
-
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
1507
|
-
}
|
|
1508
|
-
function Yn(e) {
|
|
1509
|
-
if (Array.isArray(e)) return it(e);
|
|
1510
|
-
}
|
|
1511
|
-
function it(e, t) {
|
|
1512
|
-
(t == null || t > e.length) && (t = e.length);
|
|
1513
|
-
for (var r = 0, n = new Array(t); r < t; r++)
|
|
1514
|
-
n[r] = e[r];
|
|
1515
|
-
return n;
|
|
1516
|
-
}
|
|
1517
|
-
var Zn = function(t) {
|
|
1518
|
-
if (t !== void 0) {
|
|
1519
|
-
var r = this.items.filter(function(n) {
|
|
1520
|
-
return n[t] !== void 0;
|
|
1521
|
-
});
|
|
1522
|
-
return Math.min.apply(Math, Ot(r.map(function(n) {
|
|
1523
|
-
return n[t];
|
|
1524
|
-
})));
|
|
1525
|
-
}
|
|
1526
|
-
return Math.min.apply(Math, Ot(this.items));
|
|
1527
|
-
}, kn = function(t) {
|
|
1528
|
-
var r = [], n = 1;
|
|
1529
|
-
return this.items.length ? (this.items.forEach(function(i) {
|
|
1530
|
-
var s = r.filter(function(u) {
|
|
1531
|
-
return t !== void 0 ? u.key === i[t] : u.key === i;
|
|
1532
|
-
});
|
|
1533
|
-
if (!s.length)
|
|
1534
|
-
t !== void 0 ? r.push({
|
|
1535
|
-
key: i[t],
|
|
1536
|
-
count: 1
|
|
1537
|
-
}) : r.push({
|
|
1538
|
-
key: i,
|
|
1539
|
-
count: 1
|
|
1540
|
-
});
|
|
1541
|
-
else {
|
|
1542
|
-
s[0].count += 1;
|
|
1543
|
-
var o = s[0].count;
|
|
1544
|
-
o > n && (n = o);
|
|
1545
|
-
}
|
|
1546
|
-
}), r.filter(function(i) {
|
|
1547
|
-
return i.count === n;
|
|
1548
|
-
}).map(function(i) {
|
|
1549
|
-
return i.key;
|
|
1550
|
-
})) : null;
|
|
1551
|
-
}, ti = $, ri = function(t) {
|
|
1552
|
-
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = ti(this.items), i = n.slice(r).filter(function(s, o) {
|
|
1553
|
-
return o % t === 0;
|
|
1554
|
-
});
|
|
1555
|
-
return new this.constructor(i);
|
|
1556
|
-
}, ei = R, ni = function() {
|
|
1557
|
-
for (var t = this, r = arguments.length, n = new Array(r), i = 0; i < r; i++)
|
|
1558
|
-
n[i] = arguments[i];
|
|
1559
|
-
var s = ei(n);
|
|
1560
|
-
if (Array.isArray(this.items)) {
|
|
1561
|
-
var o = this.items.filter(function(a) {
|
|
1562
|
-
return s.indexOf(a) !== -1;
|
|
1563
|
-
});
|
|
1564
|
-
return new this.constructor(o);
|
|
1565
|
-
}
|
|
1566
|
-
var u = {};
|
|
1567
|
-
return Object.keys(this.items).forEach(function(a) {
|
|
1568
|
-
s.indexOf(a) !== -1 && (u[a] = t.items[a]);
|
|
1569
|
-
}), new this.constructor(u);
|
|
1570
|
-
}, ii = Kt, si = function(t, r) {
|
|
1571
|
-
var n = Math.abs(t), i = this.count();
|
|
1572
|
-
if (n <= i)
|
|
1573
|
-
return this;
|
|
1574
|
-
for (var s = n - i, o = ii(this.items), u = Array.isArray(this.items), a = t < 0, c = 0; c < s; )
|
|
1575
|
-
u ? a ? o.unshift(r) : o.push(r) : o[c] !== void 0 ? s += 1 : o[c] = r, c += 1;
|
|
1576
|
-
return new this.constructor(o);
|
|
1577
|
-
}, oi = function(t) {
|
|
1578
|
-
var r = this, n;
|
|
1579
|
-
return Array.isArray(this.items) ? (n = [new this.constructor([]), new this.constructor([])], this.items.forEach(function(i) {
|
|
1580
|
-
t(i) === !0 ? n[0].push(i) : n[1].push(i);
|
|
1581
|
-
})) : (n = [new this.constructor({}), new this.constructor({})], Object.keys(this.items).forEach(function(i) {
|
|
1582
|
-
var s = r.items[i];
|
|
1583
|
-
t(s) === !0 ? n[0].put(i, s) : n[1].put(i, s);
|
|
1584
|
-
})), new this.constructor(n);
|
|
1585
|
-
}, ai = function(t) {
|
|
1586
|
-
return t(this);
|
|
1587
|
-
}, Lt = d, ui = Lt.isArray, ci = Lt.isObject, T = j, fi = function(t) {
|
|
1588
|
-
var r = {};
|
|
1589
|
-
return t.forEach(function(n, i) {
|
|
1590
|
-
function s(o, u) {
|
|
1591
|
-
ci(o) ? Object.keys(o).forEach(function(a) {
|
|
1592
|
-
s(o[a], "".concat(u, ".").concat(a));
|
|
1593
|
-
}) : ui(o) && o.forEach(function(a, c) {
|
|
1594
|
-
s(a, "".concat(u, ".").concat(c));
|
|
1595
|
-
}), r[u] = o;
|
|
1596
|
-
}
|
|
1597
|
-
s(n, i);
|
|
1598
|
-
}), r;
|
|
1599
|
-
}, li = function(t, r) {
|
|
1600
|
-
if (t.indexOf("*") !== -1) {
|
|
1601
|
-
var n = fi(this.items), i = [];
|
|
1602
|
-
if (r !== void 0) {
|
|
1603
|
-
var s = new RegExp("0.".concat(r), "g"), o = "0.".concat(r).split(".").length;
|
|
1604
|
-
Object.keys(n).forEach(function(l) {
|
|
1605
|
-
var m = l.match(s);
|
|
1606
|
-
if (m) {
|
|
1607
|
-
var w = m[0];
|
|
1608
|
-
w.split(".").length === o && i.push(n[w]);
|
|
1609
|
-
}
|
|
1610
|
-
});
|
|
1611
|
-
}
|
|
1612
|
-
var u = [], a = new RegExp("0.".concat(t), "g"), c = "0.".concat(t).split(".").length;
|
|
1613
|
-
if (Object.keys(n).forEach(function(l) {
|
|
1614
|
-
var m = l.match(a);
|
|
1615
|
-
if (m) {
|
|
1616
|
-
var w = m[0];
|
|
1617
|
-
w.split(".").length === c && u.push(n[w]);
|
|
1618
|
-
}
|
|
1619
|
-
}), r !== void 0) {
|
|
1620
|
-
var h = {};
|
|
1621
|
-
return this.items.forEach(function(l, m) {
|
|
1622
|
-
h[i[m] || ""] = u;
|
|
1623
|
-
}), new this.constructor(h);
|
|
1624
|
-
}
|
|
1625
|
-
return new this.constructor([u]);
|
|
1626
|
-
}
|
|
1627
|
-
if (r !== void 0) {
|
|
1628
|
-
var v = {};
|
|
1629
|
-
return this.items.forEach(function(l) {
|
|
1630
|
-
T(l, t) !== void 0 ? v[l[r] || ""] = T(l, t) : v[l[r] || ""] = null;
|
|
1631
|
-
}), new this.constructor(v);
|
|
1632
|
-
}
|
|
1633
|
-
return this.map(function(l) {
|
|
1634
|
-
return T(l, t) !== void 0 ? T(l, t) : null;
|
|
1635
|
-
});
|
|
1636
|
-
}, pi = R, Ht = function(t) {
|
|
1637
|
-
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
|
|
1638
|
-
n[i - 1] = arguments[i];
|
|
1639
|
-
pi(n).forEach(function(s) {
|
|
1640
|
-
delete t[s];
|
|
1641
|
-
});
|
|
1642
|
-
}, xt = d, hi = xt.isArray, yi = xt.isObject, St = Ht, mi = function() {
|
|
1643
|
-
var t = this, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
|
|
1644
|
-
if (this.isEmpty())
|
|
1645
|
-
return null;
|
|
1646
|
-
if (hi(this.items))
|
|
1647
|
-
return r === 1 ? this.items.pop() : new this.constructor(this.items.splice(-r));
|
|
1648
|
-
if (yi(this.items)) {
|
|
1649
|
-
var n = Object.keys(this.items);
|
|
1650
|
-
if (r === 1) {
|
|
1651
|
-
var i = n[n.length - 1], s = this.items[i];
|
|
1652
|
-
return St(this.items, i), s;
|
|
1653
|
-
}
|
|
1654
|
-
var o = n.slice(-r), u = o.reduce(function(a, c) {
|
|
1655
|
-
return a[c] = t.items[c], a;
|
|
1656
|
-
}, {});
|
|
1657
|
-
return St(this.items, o), new this.constructor(u);
|
|
1658
|
-
}
|
|
1659
|
-
return null;
|
|
1660
|
-
}, di = function(t, r) {
|
|
1661
|
-
return r !== void 0 ? this.put(r, t) : (this.items.unshift(t), this);
|
|
1662
|
-
}, vi = d, bi = vi.isFunction, gi = function(t, r) {
|
|
1663
|
-
var n = this.items[t] || null;
|
|
1664
|
-
return !n && r !== void 0 && (bi(r) ? n = r() : n = r), delete this.items[t], n;
|
|
1665
|
-
}, wi = function() {
|
|
1666
|
-
var t;
|
|
1667
|
-
return (t = this.items).push.apply(t, arguments), this;
|
|
1668
|
-
}, Ai = function(t, r) {
|
|
1669
|
-
return this.items[t] = r, this;
|
|
1670
|
-
}, _i = $, Oi = function() {
|
|
1671
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null, r = _i(this.items), n = new this.constructor(r).shuffle();
|
|
1672
|
-
return t !== parseInt(t, 10) ? n.first() : n.take(t);
|
|
1673
|
-
}, Si = function(t, r) {
|
|
1674
|
-
var n = this, i = null;
|
|
1675
|
-
return r !== void 0 && (i = r), Array.isArray(this.items) ? this.items.forEach(function(s) {
|
|
1676
|
-
i = t(i, s);
|
|
1677
|
-
}) : Object.keys(this.items).forEach(function(s) {
|
|
1678
|
-
i = t(i, n.items[s], s);
|
|
1679
|
-
}), i;
|
|
1680
|
-
}, $i = function(t) {
|
|
1681
|
-
return new this.constructor(this.items).filter(function(r) {
|
|
1682
|
-
return !t(r);
|
|
1683
|
-
});
|
|
1684
|
-
};
|
|
1685
|
-
function $t(e, t) {
|
|
1686
|
-
var r = Object.keys(e);
|
|
1687
|
-
if (Object.getOwnPropertySymbols) {
|
|
1688
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
1689
|
-
t && (n = n.filter(function(i) {
|
|
1690
|
-
return Object.getOwnPropertyDescriptor(e, i).enumerable;
|
|
1691
|
-
})), r.push.apply(r, n);
|
|
1692
|
-
}
|
|
1693
|
-
return r;
|
|
1694
|
-
}
|
|
1695
|
-
function P(e) {
|
|
1696
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
1697
|
-
var r = arguments[t] != null ? arguments[t] : {};
|
|
1698
|
-
t % 2 ? $t(Object(r), !0).forEach(function(n) {
|
|
1699
|
-
ji(e, n, r[n]);
|
|
1700
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : $t(Object(r)).forEach(function(n) {
|
|
1701
|
-
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1702
|
-
});
|
|
1703
|
-
}
|
|
1704
|
-
return e;
|
|
1705
|
-
}
|
|
1706
|
-
function ji(e, t, r) {
|
|
1707
|
-
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1708
|
-
}
|
|
1709
|
-
var Ei = function(t) {
|
|
1710
|
-
if (!t)
|
|
1711
|
-
return this;
|
|
1712
|
-
if (Array.isArray(t)) {
|
|
1713
|
-
var r = this.items.map(function(s, o) {
|
|
1714
|
-
return t[o] || s;
|
|
1715
|
-
});
|
|
1716
|
-
return new this.constructor(r);
|
|
1717
|
-
}
|
|
1718
|
-
if (t.constructor.name === "Collection") {
|
|
1719
|
-
var n = P(P({}, this.items), t.all());
|
|
1720
|
-
return new this.constructor(n);
|
|
1721
|
-
}
|
|
1722
|
-
var i = P(P({}, this.items), t);
|
|
1723
|
-
return new this.constructor(i);
|
|
1724
|
-
};
|
|
1725
|
-
function I(e) {
|
|
1726
|
-
"@babel/helpers - typeof";
|
|
1727
|
-
return I = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1728
|
-
return typeof t;
|
|
1729
|
-
} : function(t) {
|
|
1730
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1731
|
-
}, I(e);
|
|
1732
|
-
}
|
|
1733
|
-
function jt(e, t) {
|
|
1734
|
-
var r = Object.keys(e);
|
|
1735
|
-
if (Object.getOwnPropertySymbols) {
|
|
1736
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
1737
|
-
t && (n = n.filter(function(i) {
|
|
1738
|
-
return Object.getOwnPropertyDescriptor(e, i).enumerable;
|
|
1739
|
-
})), r.push.apply(r, n);
|
|
1740
|
-
}
|
|
1741
|
-
return r;
|
|
1742
|
-
}
|
|
1743
|
-
function D(e) {
|
|
1744
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
1745
|
-
var r = arguments[t] != null ? arguments[t] : {};
|
|
1746
|
-
t % 2 ? jt(Object(r), !0).forEach(function(n) {
|
|
1747
|
-
Ii(e, n, r[n]);
|
|
1748
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : jt(Object(r)).forEach(function(n) {
|
|
1749
|
-
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1750
|
-
});
|
|
1751
|
-
}
|
|
1752
|
-
return e;
|
|
1753
|
-
}
|
|
1754
|
-
function Ii(e, t, r) {
|
|
1755
|
-
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1756
|
-
}
|
|
1757
|
-
var Ci = function(t) {
|
|
1758
|
-
var r = function n(i, s) {
|
|
1759
|
-
var o = D({}, i), u = Object.keys(D(D({}, i), s));
|
|
1760
|
-
return u.forEach(function(a) {
|
|
1761
|
-
!Array.isArray(s[a]) && I(s[a]) === "object" ? o[a] = n(i[a], s[a]) : i[a] === void 0 && s[a] !== void 0 ? I(i[a]) === "object" ? o[a] = D({}, s[a]) : o[a] = s[a] : i[a] !== void 0 && s[a] === void 0 ? I(i[a]) === "object" ? o[a] = D({}, i[a]) : o[a] = i[a] : i[a] !== void 0 && s[a] !== void 0 && (I(s[a]) === "object" ? o[a] = D({}, s[a]) : o[a] = s[a]);
|
|
1762
|
-
}), o;
|
|
1763
|
-
};
|
|
1764
|
-
return t ? !Array.isArray(t) && I(t) !== "object" ? new this.constructor(r(this.items, [t])) : t.constructor.name === "Collection" ? new this.constructor(r(this.items, t.all())) : new this.constructor(r(this.items, t)) : this;
|
|
1765
|
-
}, Di = function() {
|
|
1766
|
-
var t = [].concat(this.items).reverse();
|
|
1767
|
-
return new this.constructor(t);
|
|
1768
|
-
}, ut = d, Fi = ut.isArray, Ti = ut.isObject, Pi = ut.isFunction, Ni = function(t, r) {
|
|
1769
|
-
var n = this, i, s = function(u, a) {
|
|
1770
|
-
return Pi(t) ? t(n.items[a], a) : r ? n.items[a] === t : n.items[a] == t;
|
|
1771
|
-
};
|
|
1772
|
-
return Fi(this.items) ? i = this.items.findIndex(s) : Ti(this.items) && (i = Object.keys(this.items).find(function(o) {
|
|
1773
|
-
return s(n.items[o], o);
|
|
1774
|
-
})), i === void 0 || i < 0 ? !1 : i;
|
|
1775
|
-
}, Gt = d, Bi = Gt.isArray, qi = Gt.isObject, Ui = Ht, Mi = function() {
|
|
1776
|
-
var t = this, r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
|
|
1777
|
-
if (this.isEmpty())
|
|
1778
|
-
return null;
|
|
1779
|
-
if (Bi(this.items))
|
|
1780
|
-
return r === 1 ? this.items.shift() : new this.constructor(this.items.splice(0, r));
|
|
1781
|
-
if (qi(this.items)) {
|
|
1782
|
-
if (r === 1) {
|
|
1783
|
-
var n = Object.keys(this.items)[0], i = this.items[n];
|
|
1784
|
-
return delete this.items[n], i;
|
|
1785
|
-
}
|
|
1786
|
-
var s = Object.keys(this.items), o = s.slice(0, r), u = o.reduce(function(a, c) {
|
|
1787
|
-
return a[c] = t.items[c], a;
|
|
1788
|
-
}, {});
|
|
1789
|
-
return Ui(this.items, o), new this.constructor(u);
|
|
1790
|
-
}
|
|
1791
|
-
return null;
|
|
1792
|
-
}, Ri = $, Ki = function() {
|
|
1793
|
-
var t = Ri(this.items), r, n, i;
|
|
1794
|
-
for (i = t.length; i; i -= 1)
|
|
1795
|
-
r = Math.floor(Math.random() * i), n = t[i - 1], t[i - 1] = t[r], t[r] = n;
|
|
1796
|
-
return this.items = t, this;
|
|
1797
|
-
}, Wi = d, Ji = Wi.isObject, Vi = function(t) {
|
|
1798
|
-
var r = this;
|
|
1799
|
-
return Ji(this.items) ? new this.constructor(Object.keys(this.items).reduce(function(n, i, s) {
|
|
1800
|
-
return s + 1 > t && (n[i] = r.items[i]), n;
|
|
1801
|
-
}, {})) : new this.constructor(this.items.slice(t));
|
|
1802
|
-
}, ct = d, Li = ct.isArray, Hi = ct.isObject, xi = ct.isFunction, Gi = function(t) {
|
|
1803
|
-
var r = this, n = null, i, s = function(u) {
|
|
1804
|
-
return u === t;
|
|
1805
|
-
};
|
|
1806
|
-
return xi(t) && (s = t), Li(this.items) && (i = this.items.filter(function(o) {
|
|
1807
|
-
return n !== !0 && (n = s(o)), n;
|
|
1808
|
-
})), Hi(this.items) && (i = Object.keys(this.items).reduce(function(o, u) {
|
|
1809
|
-
return n !== !0 && (n = s(r.items[u])), n !== !1 && (o[u] = r.items[u]), o;
|
|
1810
|
-
}, {})), new this.constructor(i);
|
|
1811
|
-
}, ft = d, Qi = ft.isArray, zi = ft.isObject, Xi = ft.isFunction, Yi = function(t) {
|
|
1812
|
-
var r = this, n = null, i, s = function(u) {
|
|
1813
|
-
return u === t;
|
|
1814
|
-
};
|
|
1815
|
-
return Xi(t) && (s = t), Qi(this.items) && (i = this.items.filter(function(o) {
|
|
1816
|
-
return n !== !0 && (n = !s(o)), n;
|
|
1817
|
-
})), zi(this.items) && (i = Object.keys(this.items).reduce(function(o, u) {
|
|
1818
|
-
return n !== !0 && (n = !s(r.items[u])), n !== !1 && (o[u] = r.items[u]), o;
|
|
1819
|
-
}, {})), new this.constructor(i);
|
|
1820
|
-
}, Zi = function(t, r) {
|
|
1821
|
-
var n = this.items.slice(t);
|
|
1822
|
-
return r !== void 0 && (n = n.slice(0, r)), new this.constructor(n);
|
|
1823
|
-
}, ki = d, ts = ki.isFunction, rs = function(t, r, n) {
|
|
1824
|
-
var i;
|
|
1825
|
-
if (ts(t) ? i = this.filter(t) : i = this.where(t, r, n), i.isEmpty())
|
|
1826
|
-
throw new Error("Item not found.");
|
|
1827
|
-
if (i.count() > 1)
|
|
1828
|
-
throw new Error("Multiple items found.");
|
|
1829
|
-
return i.first();
|
|
1830
|
-
}, es = Wt, ns = es, is = function(t) {
|
|
1831
|
-
var r = [].concat(this.items);
|
|
1832
|
-
return t === void 0 ? this.every(function(n) {
|
|
1833
|
-
return typeof n == "number";
|
|
1834
|
-
}) ? r.sort(function(n, i) {
|
|
1835
|
-
return n - i;
|
|
1836
|
-
}) : r.sort() : r.sort(t), new this.constructor(r);
|
|
1837
|
-
}, ss = function() {
|
|
1838
|
-
return this.sort().reverse();
|
|
1839
|
-
}, os = j, as = d, us = as.isFunction, cs = function(t) {
|
|
1840
|
-
var r = [].concat(this.items), n = function(s) {
|
|
1841
|
-
return us(t) ? t(s) : os(s, t);
|
|
1842
|
-
};
|
|
1843
|
-
return r.sort(function(i, s) {
|
|
1844
|
-
var o = n(i), u = n(s);
|
|
1845
|
-
return o == null ? 1 : u == null || o < u ? -1 : o > u ? 1 : 0;
|
|
1846
|
-
}), new this.constructor(r);
|
|
1847
|
-
}, fs = function(t) {
|
|
1848
|
-
return this.sortBy(t).reverse();
|
|
1849
|
-
}, ls = function() {
|
|
1850
|
-
var t = this, r = {};
|
|
1851
|
-
return Object.keys(this.items).sort().forEach(function(n) {
|
|
1852
|
-
r[n] = t.items[n];
|
|
1853
|
-
}), new this.constructor(r);
|
|
1854
|
-
}, ps = function() {
|
|
1855
|
-
var t = this, r = {};
|
|
1856
|
-
return Object.keys(this.items).sort().reverse().forEach(function(n) {
|
|
1857
|
-
r[n] = t.items[n];
|
|
1858
|
-
}), new this.constructor(r);
|
|
1859
|
-
}, hs = function(t, r, n) {
|
|
1860
|
-
var i = this.slice(t, r);
|
|
1861
|
-
if (this.items = this.diff(i.all()).all(), Array.isArray(n))
|
|
1862
|
-
for (var s = 0, o = n.length; s < o; s += 1)
|
|
1863
|
-
this.items.splice(t + s, 0, n[s]);
|
|
1864
|
-
return i;
|
|
1865
|
-
}, ys = function(t) {
|
|
1866
|
-
for (var r = Math.round(this.items.length / t), n = JSON.parse(JSON.stringify(this.items)), i = [], s = 0; s < t; s += 1)
|
|
1867
|
-
i.push(new this.constructor(n.splice(0, r)));
|
|
1868
|
-
return new this.constructor(i);
|
|
1869
|
-
}, ms = $, ds = d, vs = ds.isFunction, bs = function(t) {
|
|
1870
|
-
var r = ms(this.items), n = 0;
|
|
1871
|
-
if (t === void 0)
|
|
1872
|
-
for (var i = 0, s = r.length; i < s; i += 1)
|
|
1873
|
-
n += parseFloat(r[i]);
|
|
1874
|
-
else if (vs(t))
|
|
1875
|
-
for (var o = 0, u = r.length; o < u; o += 1)
|
|
1876
|
-
n += parseFloat(t(r[o]));
|
|
1877
|
-
else
|
|
1878
|
-
for (var a = 0, c = r.length; a < c; a += 1)
|
|
1879
|
-
n += parseFloat(r[a][t]);
|
|
1880
|
-
return parseFloat(n.toPrecision(12));
|
|
1881
|
-
};
|
|
1882
|
-
function st(e) {
|
|
1883
|
-
"@babel/helpers - typeof";
|
|
1884
|
-
return st = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1885
|
-
return typeof t;
|
|
1886
|
-
} : function(t) {
|
|
1887
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1888
|
-
}, st(e);
|
|
1889
|
-
}
|
|
1890
|
-
var gs = function(t) {
|
|
1891
|
-
var r = this;
|
|
1892
|
-
if (!Array.isArray(this.items) && st(this.items) === "object") {
|
|
1893
|
-
var n = Object.keys(this.items), i;
|
|
1894
|
-
t < 0 ? i = n.slice(t) : i = n.slice(0, t);
|
|
1895
|
-
var s = {};
|
|
1896
|
-
return n.forEach(function(o) {
|
|
1897
|
-
i.indexOf(o) !== -1 && (s[o] = r.items[o]);
|
|
1898
|
-
}), new this.constructor(s);
|
|
1899
|
-
}
|
|
1900
|
-
return t < 0 ? new this.constructor(this.items.slice(t)) : new this.constructor(this.items.slice(0, t));
|
|
1901
|
-
}, lt = d, ws = lt.isArray, As = lt.isObject, _s = lt.isFunction, Os = function(t) {
|
|
1902
|
-
var r = this, n = null, i, s = function(u) {
|
|
1903
|
-
return u === t;
|
|
1904
|
-
};
|
|
1905
|
-
return _s(t) && (s = t), ws(this.items) && (i = this.items.filter(function(o) {
|
|
1906
|
-
return n !== !1 && (n = !s(o)), n;
|
|
1907
|
-
})), As(this.items) && (i = Object.keys(this.items).reduce(function(o, u) {
|
|
1908
|
-
return n !== !1 && (n = !s(r.items[u])), n !== !1 && (o[u] = r.items[u]), o;
|
|
1909
|
-
}, {})), new this.constructor(i);
|
|
1910
|
-
}, pt = d, Ss = pt.isArray, $s = pt.isObject, js = pt.isFunction, Es = function(t) {
|
|
1911
|
-
var r = this, n = null, i, s = function(u) {
|
|
1912
|
-
return u === t;
|
|
1913
|
-
};
|
|
1914
|
-
return js(t) && (s = t), Ss(this.items) && (i = this.items.filter(function(o) {
|
|
1915
|
-
return n !== !1 && (n = s(o)), n;
|
|
1916
|
-
})), $s(this.items) && (i = Object.keys(this.items).reduce(function(o, u) {
|
|
1917
|
-
return n !== !1 && (n = s(r.items[u])), n !== !1 && (o[u] = r.items[u]), o;
|
|
1918
|
-
}, {})), new this.constructor(i);
|
|
1919
|
-
}, Is = function(t) {
|
|
1920
|
-
return t(this), this;
|
|
1921
|
-
}, Cs = function(t, r) {
|
|
1922
|
-
for (var n = 1; n <= t; n += 1)
|
|
1923
|
-
this.items.push(r(n));
|
|
1924
|
-
return this;
|
|
1925
|
-
}, Ds = function() {
|
|
1926
|
-
var t = this.constructor;
|
|
1927
|
-
function r(i, s) {
|
|
1928
|
-
var o = [];
|
|
1929
|
-
i instanceof t ? (i.items.forEach(function(u) {
|
|
1930
|
-
return r(u, o);
|
|
1931
|
-
}), s.push(o)) : Array.isArray(i) ? (i.forEach(function(u) {
|
|
1932
|
-
return r(u, o);
|
|
1933
|
-
}), s.push(o)) : s.push(i);
|
|
1934
|
-
}
|
|
1935
|
-
if (Array.isArray(this.items)) {
|
|
1936
|
-
var n = [];
|
|
1937
|
-
return this.items.forEach(function(i) {
|
|
1938
|
-
r(i, n);
|
|
1939
|
-
}), n;
|
|
1940
|
-
}
|
|
1941
|
-
return this.values().all();
|
|
1942
|
-
};
|
|
1943
|
-
function ot(e) {
|
|
1944
|
-
"@babel/helpers - typeof";
|
|
1945
|
-
return ot = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
1946
|
-
return typeof t;
|
|
1947
|
-
} : function(t) {
|
|
1948
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
1949
|
-
}, ot(e);
|
|
1950
|
-
}
|
|
1951
|
-
var Fs = function() {
|
|
1952
|
-
return ot(this.items) === "object" && !Array.isArray(this.items) ? JSON.stringify(this.all()) : JSON.stringify(this.toArray());
|
|
1953
|
-
}, Ts = function(t) {
|
|
1954
|
-
var r = this;
|
|
1955
|
-
if (Array.isArray(this.items))
|
|
1956
|
-
this.items = this.items.map(t);
|
|
1957
|
-
else {
|
|
1958
|
-
var n = {};
|
|
1959
|
-
Object.keys(this.items).forEach(function(i) {
|
|
1960
|
-
n[i] = t(r.items[i], i);
|
|
1961
|
-
}), this.items = n;
|
|
1962
|
-
}
|
|
1963
|
-
return this;
|
|
1964
|
-
};
|
|
1965
|
-
function Et(e, t) {
|
|
1966
|
-
var r = Object.keys(e);
|
|
1967
|
-
if (Object.getOwnPropertySymbols) {
|
|
1968
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
1969
|
-
t && (n = n.filter(function(i) {
|
|
1970
|
-
return Object.getOwnPropertyDescriptor(e, i).enumerable;
|
|
1971
|
-
})), r.push.apply(r, n);
|
|
1972
|
-
}
|
|
1973
|
-
return r;
|
|
1974
|
-
}
|
|
1975
|
-
function It(e) {
|
|
1976
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
1977
|
-
var r = arguments[t] != null ? arguments[t] : {};
|
|
1978
|
-
t % 2 ? Et(Object(r), !0).forEach(function(n) {
|
|
1979
|
-
Ps(e, n, r[n]);
|
|
1980
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Et(Object(r)).forEach(function(n) {
|
|
1981
|
-
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1982
|
-
});
|
|
1983
|
-
}
|
|
1984
|
-
return e;
|
|
1985
|
-
}
|
|
1986
|
-
function Ps(e, t, r) {
|
|
1987
|
-
return t in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
1988
|
-
}
|
|
1989
|
-
var Ns = function() {
|
|
1990
|
-
var t = this;
|
|
1991
|
-
if (Array.isArray(this.items))
|
|
1992
|
-
return this;
|
|
1993
|
-
var r = {};
|
|
1994
|
-
return Object.keys(this.items).forEach(function(n) {
|
|
1995
|
-
if (n.indexOf(".") !== -1) {
|
|
1996
|
-
var i = r;
|
|
1997
|
-
n.split(".").reduce(function(s, o, u, a) {
|
|
1998
|
-
return s[o] || (s[o] = {}), u === a.length - 1 && (s[o] = t.items[n]), s[o];
|
|
1999
|
-
}, i), r = It(It({}, r), i);
|
|
2000
|
-
} else
|
|
2001
|
-
r[n] = t.items[n];
|
|
2002
|
-
}), new this.constructor(r);
|
|
2003
|
-
}, Bs = function(t, r, n) {
|
|
2004
|
-
t ? n(this) : r(this);
|
|
2005
|
-
}, Ct = function(t, r) {
|
|
2006
|
-
if (Array.isArray(this.items) && this.items.length)
|
|
2007
|
-
return t(this);
|
|
2008
|
-
if (Object.keys(this.items).length)
|
|
2009
|
-
return t(this);
|
|
2010
|
-
if (r !== void 0) {
|
|
2011
|
-
if (Array.isArray(this.items) && !this.items.length)
|
|
2012
|
-
return r(this);
|
|
2013
|
-
if (!Object.keys(this.items).length)
|
|
2014
|
-
return r(this);
|
|
2015
|
-
}
|
|
2016
|
-
return this;
|
|
2017
|
-
}, Dt = function(t, r) {
|
|
2018
|
-
if (Array.isArray(this.items) && !this.items.length)
|
|
2019
|
-
return t(this);
|
|
2020
|
-
if (!Object.keys(this.items).length)
|
|
2021
|
-
return t(this);
|
|
2022
|
-
if (r !== void 0) {
|
|
2023
|
-
if (Array.isArray(this.items) && this.items.length)
|
|
2024
|
-
return r(this);
|
|
2025
|
-
if (Object.keys(this.items).length)
|
|
2026
|
-
return r(this);
|
|
2027
|
-
}
|
|
2028
|
-
return this;
|
|
2029
|
-
}, qs = function(t) {
|
|
2030
|
-
var r = this, n = JSON.parse(JSON.stringify(this.items));
|
|
2031
|
-
return Object.keys(t).forEach(function(i) {
|
|
2032
|
-
r.items[i] === void 0 && (n[i] = t[i]);
|
|
2033
|
-
}), new this.constructor(n);
|
|
2034
|
-
}, Us = d, Ms = Us.isFunction, Rs = function(t) {
|
|
2035
|
-
var r;
|
|
2036
|
-
if (t === void 0)
|
|
2037
|
-
r = this.items.filter(function(u, a, c) {
|
|
2038
|
-
return c.indexOf(u) === a;
|
|
2039
|
-
});
|
|
2040
|
-
else {
|
|
2041
|
-
r = [];
|
|
2042
|
-
for (var n = [], i = 0, s = this.items.length; i < s; i += 1) {
|
|
2043
|
-
var o = void 0;
|
|
2044
|
-
Ms(t) ? o = t(this.items[i]) : o = this.items[i][t], n.indexOf(o) === -1 && (r.push(this.items[i]), n.push(o));
|
|
2045
|
-
}
|
|
2046
|
-
}
|
|
2047
|
-
return new this.constructor(r);
|
|
2048
|
-
}, Ks = function(t) {
|
|
2049
|
-
return t instanceof this.constructor ? t.all() : t;
|
|
2050
|
-
}, Ws = $, Js = function() {
|
|
2051
|
-
return new this.constructor(Ws(this.items));
|
|
2052
|
-
}, Vs = function(t, r, n) {
|
|
2053
|
-
return t ? r(this, t) : n ? n(this, t) : this;
|
|
2054
|
-
}, Ls = $, S = j, Hs = function(t, r, n) {
|
|
2055
|
-
var i = r, s = n, o = Ls(this.items);
|
|
2056
|
-
if (r === void 0 || r === !0)
|
|
2057
|
-
return new this.constructor(o.filter(function(a) {
|
|
2058
|
-
return S(a, t);
|
|
2059
|
-
}));
|
|
2060
|
-
if (r === !1)
|
|
2061
|
-
return new this.constructor(o.filter(function(a) {
|
|
2062
|
-
return !S(a, t);
|
|
2063
|
-
}));
|
|
2064
|
-
n === void 0 && (s = r, i = "===");
|
|
2065
|
-
var u = o.filter(function(a) {
|
|
2066
|
-
switch (i) {
|
|
2067
|
-
case "==":
|
|
2068
|
-
return S(a, t) === Number(s) || S(a, t) === s.toString();
|
|
2069
|
-
default:
|
|
2070
|
-
case "===":
|
|
2071
|
-
return S(a, t) === s;
|
|
2072
|
-
case "!=":
|
|
2073
|
-
case "<>":
|
|
2074
|
-
return S(a, t) !== Number(s) && S(a, t) !== s.toString();
|
|
2075
|
-
case "!==":
|
|
2076
|
-
return S(a, t) !== s;
|
|
2077
|
-
case "<":
|
|
2078
|
-
return S(a, t) < s;
|
|
2079
|
-
case "<=":
|
|
2080
|
-
return S(a, t) <= s;
|
|
2081
|
-
case ">":
|
|
2082
|
-
return S(a, t) > s;
|
|
2083
|
-
case ">=":
|
|
2084
|
-
return S(a, t) >= s;
|
|
2085
|
-
}
|
|
2086
|
-
});
|
|
2087
|
-
return new this.constructor(u);
|
|
2088
|
-
}, xs = function(t, r) {
|
|
2089
|
-
return this.where(t, ">=", r[0]).where(t, "<=", r[r.length - 1]);
|
|
2090
|
-
}, Gs = $, Qs = j, zs = function(t, r) {
|
|
2091
|
-
var n = Gs(r), i = this.items.filter(function(s) {
|
|
2092
|
-
return n.indexOf(Qs(s, t)) !== -1;
|
|
2093
|
-
});
|
|
2094
|
-
return new this.constructor(i);
|
|
2095
|
-
}, Xs = function(t) {
|
|
2096
|
-
return this.filter(function(r) {
|
|
2097
|
-
return r instanceof t;
|
|
2098
|
-
});
|
|
2099
|
-
}, Ft = j, Ys = function(t, r) {
|
|
2100
|
-
return this.filter(function(n) {
|
|
2101
|
-
return Ft(n, t) < r[0] || Ft(n, t) > r[r.length - 1];
|
|
2102
|
-
});
|
|
2103
|
-
}, Zs = $, ks = j, to = function(t, r) {
|
|
2104
|
-
var n = Zs(r), i = this.items.filter(function(s) {
|
|
2105
|
-
return n.indexOf(ks(s, t)) === -1;
|
|
2106
|
-
});
|
|
2107
|
-
return new this.constructor(i);
|
|
2108
|
-
}, ro = function() {
|
|
2109
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
2110
|
-
return this.where(t, "===", null);
|
|
2111
|
-
}, eo = function() {
|
|
2112
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
2113
|
-
return this.where(t, "!==", null);
|
|
2114
|
-
};
|
|
2115
|
-
function at(e) {
|
|
2116
|
-
"@babel/helpers - typeof";
|
|
2117
|
-
return at = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
|
|
2118
|
-
return typeof t;
|
|
2119
|
-
} : function(t) {
|
|
2120
|
-
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
2121
|
-
}, at(e);
|
|
2122
|
-
}
|
|
2123
|
-
var no = function(t) {
|
|
2124
|
-
return t instanceof this.constructor ? t : at(t) === "object" ? new this.constructor(t) : new this.constructor([t]);
|
|
2125
|
-
}, io = function(t) {
|
|
2126
|
-
var r = this, n = t;
|
|
2127
|
-
n instanceof this.constructor && (n = n.all());
|
|
2128
|
-
var i = this.items.map(function(s, o) {
|
|
2129
|
-
return new r.constructor([s, n[o]]);
|
|
2130
|
-
});
|
|
2131
|
-
return new this.constructor(i);
|
|
2132
|
-
};
|
|
2133
|
-
(function(e) {
|
|
2134
|
-
function t(s) {
|
|
2135
|
-
"@babel/helpers - typeof";
|
|
2136
|
-
return t = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(o) {
|
|
2137
|
-
return typeof o;
|
|
2138
|
-
} : function(o) {
|
|
2139
|
-
return o && typeof Symbol == "function" && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
2140
|
-
}, t(s);
|
|
2141
|
-
}
|
|
2142
|
-
function r(s) {
|
|
2143
|
-
s !== void 0 && !Array.isArray(s) && t(s) !== "object" ? this.items = [s] : s instanceof this.constructor ? this.items = s.all() : this.items = s || [];
|
|
2144
|
-
}
|
|
2145
|
-
var n = Or;
|
|
2146
|
-
typeof Symbol < "u" && (r.prototype[Symbol.iterator] = n), r.prototype.toJSON = function() {
|
|
2147
|
-
return this.items;
|
|
2148
|
-
}, r.prototype.all = Sr, r.prototype.average = Rt, r.prototype.avg = Ir, r.prototype.chunk = Cr, r.prototype.collapse = Br, r.prototype.combine = Wr, r.prototype.concat = Qr, r.prototype.contains = Wt, r.prototype.containsOneItem = ae, r.prototype.count = ue, r.prototype.countBy = ce, r.prototype.crossJoin = fe, r.prototype.dd = le, r.prototype.diff = pe, r.prototype.diffAssoc = he, r.prototype.diffKeys = ye, r.prototype.diffUsing = me, r.prototype.doesntContain = de, r.prototype.dump = ve, r.prototype.duplicates = be, r.prototype.each = ge, r.prototype.eachSpread = $e, r.prototype.every = Ee, r.prototype.except = Ce, r.prototype.filter = Te, r.prototype.first = Ne, r.prototype.firstOrFail = Ue, r.prototype.firstWhere = Me, r.prototype.flatMap = Re, r.prototype.flatten = Ke, r.prototype.flip = We, r.prototype.forPage = Je, r.prototype.forget = Ve, r.prototype.get = xe, r.prototype.groupBy = ze, r.prototype.has = Ye, r.prototype.implode = Ze, r.prototype.intersect = ke, r.prototype.intersectByKeys = tn, r.prototype.isEmpty = rn, r.prototype.isNotEmpty = en, r.prototype.join = nn, r.prototype.keyBy = un, r.prototype.keys = cn, r.prototype.last = ln, r.prototype.macro = pn, r.prototype.make = hn, r.prototype.map = yn, r.prototype.mapSpread = wn, r.prototype.mapToDictionary = jn, r.prototype.mapInto = En, r.prototype.mapToGroups = Pn, r.prototype.mapWithKeys = Mn, r.prototype.max = Vn, r.prototype.median = Ln, r.prototype.merge = Hn, r.prototype.mergeRecursive = Gn, r.prototype.min = Zn, r.prototype.mode = kn, r.prototype.nth = ri, r.prototype.only = ni, r.prototype.pad = si, r.prototype.partition = oi, r.prototype.pipe = ai, r.prototype.pluck = li, r.prototype.pop = mi, r.prototype.prepend = di, r.prototype.pull = gi, r.prototype.push = wi, r.prototype.put = Ai, r.prototype.random = Oi, r.prototype.reduce = Si, r.prototype.reject = $i, r.prototype.replace = Ei, r.prototype.replaceRecursive = Ci, r.prototype.reverse = Di, r.prototype.search = Ni, r.prototype.shift = Mi, r.prototype.shuffle = Ki, r.prototype.skip = Vi, r.prototype.skipUntil = Gi, r.prototype.skipWhile = Yi, r.prototype.slice = Zi, r.prototype.sole = rs, r.prototype.some = ns, r.prototype.sort = is, r.prototype.sortDesc = ss, r.prototype.sortBy = cs, r.prototype.sortByDesc = fs, r.prototype.sortKeys = ls, r.prototype.sortKeysDesc = ps, r.prototype.splice = hs, r.prototype.split = ys, r.prototype.sum = bs, r.prototype.take = gs, r.prototype.takeUntil = Os, r.prototype.takeWhile = Es, r.prototype.tap = Is, r.prototype.times = Cs, r.prototype.toArray = Ds, r.prototype.toJson = Fs, r.prototype.transform = Ts, r.prototype.undot = Ns, r.prototype.unless = Bs, r.prototype.unlessEmpty = Ct, r.prototype.unlessNotEmpty = Dt, r.prototype.union = qs, r.prototype.unique = Rs, r.prototype.unwrap = Ks, r.prototype.values = Js, r.prototype.when = Vs, r.prototype.whenEmpty = Dt, r.prototype.whenNotEmpty = Ct, r.prototype.where = Hs, r.prototype.whereBetween = xs, r.prototype.whereIn = zs, r.prototype.whereInstanceOf = Xs, r.prototype.whereNotBetween = Ys, r.prototype.whereNotIn = to, r.prototype.whereNull = ro, r.prototype.whereNotNull = eo, r.prototype.wrap = no, r.prototype.zip = io;
|
|
2149
|
-
var i = function(o) {
|
|
2150
|
-
return new r(o);
|
|
2151
|
-
};
|
|
2152
|
-
e.exports = i, e.exports.collect = i, e.exports.default = i, e.exports.Collection = r;
|
|
2153
|
-
})(Mt);
|
|
2154
|
-
var so = Mt.exports;
|
|
2155
|
-
const Qt = /* @__PURE__ */ _r(so), zt = [
|
|
576
|
+
}), J = [
|
|
2156
577
|
"flatMap",
|
|
2157
578
|
"chunk",
|
|
2158
579
|
"shuffle",
|
|
@@ -2177,7 +598,7 @@ const Qt = /* @__PURE__ */ _r(so), zt = [
|
|
|
2177
598
|
"pad",
|
|
2178
599
|
"slice",
|
|
2179
600
|
"tap"
|
|
2180
|
-
],
|
|
601
|
+
], fe = ["forPage", "sortByDesc", "sortBy", "skip", "take", "splice", "whereBetween", "whereIn", "whereNotBetween", "whereNotIn", "first", "where", "whereContains"], pe = [
|
|
2181
602
|
"avg",
|
|
2182
603
|
"count",
|
|
2183
604
|
"countBy",
|
|
@@ -2235,7 +656,7 @@ g.prototype.clone = function() {
|
|
|
2235
656
|
const e = Object.create(this);
|
|
2236
657
|
return e.steps = [...this.steps], e;
|
|
2237
658
|
};
|
|
2238
|
-
|
|
659
|
+
k().macro("whereContains", function(e, t) {
|
|
2239
660
|
return this.filter((r) => r[e].toLowerCase().includes(t.toLowerCase()));
|
|
2240
661
|
});
|
|
2241
662
|
g.prototype.fetchData = async function() {
|
|
@@ -2248,23 +669,23 @@ g.prototype.fetchData = async function() {
|
|
|
2248
669
|
};
|
|
2249
670
|
e.__args = this.buildArgs(), e.data = this.fields, this.already_limit && (e.data.__args = e.data.__args || {}, e.data.__args.limit = this.limit), this.already_offset && (e.data.__args = e.data.__args || {}, e.data.__args.offset = this.offset);
|
|
2250
671
|
const t = this.data_path.split(".");
|
|
2251
|
-
let r = {},
|
|
2252
|
-
for (const
|
|
2253
|
-
if (
|
|
2254
|
-
|
|
672
|
+
let r = {}, s = r, n = t[t.length - 1];
|
|
673
|
+
for (const l of t) {
|
|
674
|
+
if (l === n) {
|
|
675
|
+
s[l] = e;
|
|
2255
676
|
break;
|
|
2256
677
|
}
|
|
2257
|
-
|
|
678
|
+
s[l] = {}, s = s[l];
|
|
2258
679
|
}
|
|
2259
|
-
let
|
|
2260
|
-
for (const
|
|
2261
|
-
|
|
2262
|
-
return this.meta =
|
|
680
|
+
let u = await y(this.axios, r);
|
|
681
|
+
for (const l of t)
|
|
682
|
+
u = u[l];
|
|
683
|
+
return this.meta = u.meta, k(u.data);
|
|
2263
684
|
};
|
|
2264
685
|
g.prototype.processData = async function() {
|
|
2265
686
|
let e = null;
|
|
2266
687
|
for (const t of this.steps) {
|
|
2267
|
-
if (
|
|
688
|
+
if (J.includes(t.type)) {
|
|
2268
689
|
e || (e = await this.fetchData()), e = e[t.type](...t.args);
|
|
2269
690
|
continue;
|
|
2270
691
|
}
|
|
@@ -2273,8 +694,8 @@ g.prototype.processData = async function() {
|
|
|
2273
694
|
e = e.where(...t.args);
|
|
2274
695
|
else {
|
|
2275
696
|
const r = t.args[0];
|
|
2276
|
-
let
|
|
2277
|
-
t.args.length == 2 && (
|
|
697
|
+
let s = "==", n = null;
|
|
698
|
+
t.args.length == 2 && (n = t.args[1]), t.args.length == 3 && (s = t.args[1], n = t.args[2]), s === "==" && (this.filters[r] = n), s === "<" && (this.filters[r] = { lt: n }), s === "<=" && (this.filters[r] = { lte: n }), s === ">" && (this.filters[r] = { gt: n }), s === ">=" && (this.filters[r] = { gte: n }), s === "!==" && (this.filters[r] = { ne: n });
|
|
2278
699
|
}
|
|
2279
700
|
t.type === "whereContains" && (e ? e = e.whereContains(...t.args) : this.filters[t.args[0]] = { contains: t.args[1] }), t.type === "whereIn" && (e ? e = e.whereIn(...t.args) : this.filters[t.args[0]] = { in: t.args[1] }), t.type === "whereNotBetween" && (e ? e = e.whereNotBetween(...t.args) : this.filters[t.args[0]] = { notBetween: t.args[1] }), t.type === "whereNotIn" && (e ? e = e.whereNotIn(...t.args) : this.filters[t.args[0]] = { notIn: t.args[1] }), t.type == "whereBetween" && (e ? e = e.whereBetween(...t.args) : this.filters[t.args[0]] = { between: t.args[1] }), t.type === "sortByDesc" && (e ? e = e.sortByDesc(t.args[0]) : this.already_limit || this.already_offset ? (e = await this.fetchData(), e = e.sortByDesc(t.args[0])) : (this._sort = t.args[0], this._sortDesc = !0)), t.type === "sortBy" && (e ? e = e.sortBy(t.args[0]) : this.already_limit || this.already_offset ? (e = await this.fetchData(), e = e.sortBy(t.args[0])) : this._sort = t.args[0]), t.type === "skip" && (e ? e = e.skip(t.args[0]) : this.already_offset || this.already_limit ? (e = await this.fetchData(), e = e.skip(t.args[0])) : this.offset = t.args[0], this.already_offset = !0), t.type === "take" && (e ? e = e.take(...t.args) : this.already_offset || this.already_limit ? (e = await this.fetchData(), e = e.take(t.args[0])) : this.limit = t.args[0], this.already_limit = !0), t.type === "splice" && (e ? e = e.splice(...t.args) : (this.offset = t.args[0], this.limit = t.args[1]), this.already_limit = !0, this.already_offset = !0), t.type === "pop" && (e ? e = e.pop(...t.args) : (e = await this.fetchData(), e.pop(...t.args))), t.type === "prepend" && (e ? e = e.prepend(...t.args) : (e = await this.fetchData(), e.prepend(...t.args)));
|
|
2280
701
|
}
|
|
@@ -2283,12 +704,12 @@ g.prototype.processData = async function() {
|
|
|
2283
704
|
g.prototype.all = async function() {
|
|
2284
705
|
return (await this.processData()).all();
|
|
2285
706
|
};
|
|
2286
|
-
for (const e of [...
|
|
707
|
+
for (const e of [...J, ...fe])
|
|
2287
708
|
g.prototype[e] = function(...t) {
|
|
2288
709
|
const r = this.clone();
|
|
2289
710
|
return r.steps.push({ type: e, args: t }), r;
|
|
2290
711
|
};
|
|
2291
|
-
for (const e of
|
|
712
|
+
for (const e of pe)
|
|
2292
713
|
g.prototype[e] = async function(...t) {
|
|
2293
714
|
return (await this.clone().processData())[e](...t);
|
|
2294
715
|
};
|
|
@@ -2313,11 +734,11 @@ g.prototype.shift = async function(...e) {
|
|
|
2313
734
|
g.prototype.transform = function(...e) {
|
|
2314
735
|
return this.steps.push({ type: "transform", args: e }), this;
|
|
2315
736
|
};
|
|
2316
|
-
const
|
|
2317
|
-
const
|
|
2318
|
-
return
|
|
2319
|
-
},
|
|
2320
|
-
uploadTempFile: (r) =>
|
|
737
|
+
const T = (e, t, r) => {
|
|
738
|
+
const s = new g(r, t);
|
|
739
|
+
return s.data_path = "list" + e, s;
|
|
740
|
+
}, he = (e, t) => ({
|
|
741
|
+
uploadTempFile: (r) => o(t, "lightDriveUploadTempFile", {
|
|
2321
742
|
index: e,
|
|
2322
743
|
file: r
|
|
2323
744
|
}, {
|
|
@@ -2327,10 +748,10 @@ const Xt = (e, t, r) => {
|
|
|
2327
748
|
mime: !0
|
|
2328
749
|
}),
|
|
2329
750
|
folders: {
|
|
2330
|
-
list: async (r,
|
|
751
|
+
list: async (r, s = {
|
|
2331
752
|
name: !0,
|
|
2332
753
|
path: !0
|
|
2333
|
-
}) => (await
|
|
754
|
+
}) => (await y(t, {
|
|
2334
755
|
app: {
|
|
2335
756
|
drive: {
|
|
2336
757
|
__args: {
|
|
@@ -2340,23 +761,23 @@ const Xt = (e, t, r) => {
|
|
|
2340
761
|
__args: {
|
|
2341
762
|
path: r
|
|
2342
763
|
},
|
|
2343
|
-
...
|
|
764
|
+
...s
|
|
2344
765
|
}
|
|
2345
766
|
}
|
|
2346
767
|
}
|
|
2347
768
|
})).app.drive.folders,
|
|
2348
|
-
create: (r) =>
|
|
2349
|
-
delete: (r) =>
|
|
2350
|
-
rename: (r,
|
|
769
|
+
create: (r) => o(t, "lightDriveCreateFolder", { index: e, path: r }),
|
|
770
|
+
delete: (r) => o(t, "lightDriveDeleteFolder", { index: e, path: r }),
|
|
771
|
+
rename: (r, s) => o(t, "lightDriveRenameFolder", { index: e, path: r, name: s })
|
|
2351
772
|
},
|
|
2352
773
|
files: {
|
|
2353
|
-
list: async (r,
|
|
774
|
+
list: async (r, s = {
|
|
2354
775
|
name: !0,
|
|
2355
776
|
path: !0,
|
|
2356
777
|
size: !0,
|
|
2357
778
|
mime: !0,
|
|
2358
779
|
url: !0
|
|
2359
|
-
}) => (await
|
|
780
|
+
}) => (await y(t, {
|
|
2360
781
|
app: {
|
|
2361
782
|
drive: {
|
|
2362
783
|
__args: {
|
|
@@ -2366,18 +787,18 @@ const Xt = (e, t, r) => {
|
|
|
2366
787
|
__args: {
|
|
2367
788
|
path: r
|
|
2368
789
|
},
|
|
2369
|
-
...
|
|
790
|
+
...s
|
|
2370
791
|
}
|
|
2371
792
|
}
|
|
2372
793
|
}
|
|
2373
794
|
})).app.drive.files,
|
|
2374
|
-
get: async (r,
|
|
795
|
+
get: async (r, s = {
|
|
2375
796
|
name: !0,
|
|
2376
797
|
path: !0,
|
|
2377
798
|
size: !0,
|
|
2378
799
|
mime: !0,
|
|
2379
800
|
url: !0
|
|
2380
|
-
}) => (await
|
|
801
|
+
}) => (await y(t, {
|
|
2381
802
|
app: {
|
|
2382
803
|
drive: {
|
|
2383
804
|
__args: {
|
|
@@ -2387,13 +808,13 @@ const Xt = (e, t, r) => {
|
|
|
2387
808
|
__args: {
|
|
2388
809
|
path: r
|
|
2389
810
|
},
|
|
2390
|
-
...
|
|
811
|
+
...s
|
|
2391
812
|
}
|
|
2392
813
|
}
|
|
2393
814
|
}
|
|
2394
815
|
})).app.drive.file,
|
|
2395
816
|
read: async (r) => {
|
|
2396
|
-
let
|
|
817
|
+
let s = await y(t, {
|
|
2397
818
|
app: {
|
|
2398
819
|
drive: {
|
|
2399
820
|
__args: {
|
|
@@ -2408,48 +829,48 @@ const Xt = (e, t, r) => {
|
|
|
2408
829
|
}
|
|
2409
830
|
}
|
|
2410
831
|
});
|
|
2411
|
-
return window.atob(
|
|
832
|
+
return window.atob(s.app.drive.file.base64Content);
|
|
2412
833
|
},
|
|
2413
|
-
write: (r,
|
|
2414
|
-
delete: (r) =>
|
|
2415
|
-
rename: (r,
|
|
2416
|
-
move: (r,
|
|
834
|
+
write: (r, s) => o(t, "lightDriveWriteFile", { index: e, path: r, content: s }),
|
|
835
|
+
delete: (r) => o(t, "lightDriveDeleteFile", { index: e, path: r }),
|
|
836
|
+
rename: (r, s) => o(t, "lightDriveRenameFile", { index: e, path: r, name: s }),
|
|
837
|
+
move: (r, s) => o(t, "lightDriveMoveFile", { index: e, source: r, destination: s })
|
|
2417
838
|
}
|
|
2418
|
-
}),
|
|
2419
|
-
const t =
|
|
839
|
+
}), we = (e) => {
|
|
840
|
+
const t = W.create({
|
|
2420
841
|
baseURL: e,
|
|
2421
842
|
withCredentials: !0
|
|
2422
|
-
}), r = (
|
|
843
|
+
}), r = (a, u = null, l = []) => o(t, a, u, l), s = (a) => y(t, a), n = ue(t);
|
|
2423
844
|
return {
|
|
2424
845
|
baseURL: e,
|
|
2425
846
|
axios: t,
|
|
2426
|
-
auth:
|
|
847
|
+
auth: ee(t),
|
|
2427
848
|
mutation: r,
|
|
2428
|
-
query:
|
|
2429
|
-
config:
|
|
2430
|
-
mail:
|
|
2431
|
-
users:
|
|
2432
|
-
fs:
|
|
2433
|
-
models:
|
|
2434
|
-
model(
|
|
2435
|
-
return
|
|
849
|
+
query: s,
|
|
850
|
+
config: ie(s),
|
|
851
|
+
mail: oe(t),
|
|
852
|
+
users: le(t),
|
|
853
|
+
fs: ae(t),
|
|
854
|
+
models: n,
|
|
855
|
+
model(a) {
|
|
856
|
+
return n.get(a);
|
|
2436
857
|
},
|
|
2437
|
-
roles:
|
|
2438
|
-
collect: (
|
|
2439
|
-
const
|
|
2440
|
-
return
|
|
858
|
+
roles: ce(t),
|
|
859
|
+
collect: (a, u) => {
|
|
860
|
+
const l = T(a, t, u);
|
|
861
|
+
return l.data_path = n.get(a).getDataPath(), l;
|
|
2441
862
|
},
|
|
2442
|
-
drive(
|
|
2443
|
-
return
|
|
863
|
+
drive(a) {
|
|
864
|
+
return he(a, t);
|
|
2444
865
|
}
|
|
2445
866
|
};
|
|
2446
867
|
};
|
|
2447
868
|
export {
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
869
|
+
me as File,
|
|
870
|
+
we as createClient,
|
|
871
|
+
T as createCollection,
|
|
872
|
+
B as file,
|
|
873
|
+
o as mutation,
|
|
874
|
+
y as query,
|
|
875
|
+
O as toQuery
|
|
2455
876
|
};
|