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