@opencloud-eu/web-client 7.1.2 → 7.2.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/axios-Dwm7CNmg.js +1964 -0
- package/dist/{dist-DXLl1XQj.js → dist-B2vdwwII.js} +2 -2
- package/dist/{generated-Dr-mKneP.js → generated-CDEuOcXT.js} +260 -230
- package/dist/{graph-C_btwMni.js → graph-D6GY6HvL.js} +72 -72
- package/dist/{helpers-B_uB5urn.js → helpers-BMMUdKkY.js} +296 -311
- package/dist/{ocs-VeFt8RO1.js → ocs-BwWCZeaA.js} +1155 -302
- package/dist/ox-S6JjEpPN.js +3046 -0
- package/dist/src/graph/generated/api.d.ts +70 -4
- package/dist/src/helpers/resource/types.d.ts +4 -0
- package/dist/src/helpers/share/type.d.ts +1 -0
- package/dist/src/helpers/space/functions.d.ts +3 -2
- package/dist/src/helpers/space/types.d.ts +0 -3
- package/dist/src/index.d.ts +2 -1
- package/dist/src/ox/index.d.ts +27 -0
- package/dist/src/ox/types.d.ts +29 -0
- package/dist/src/sse/index.d.ts +1 -0
- package/dist/{toString-DIrlTUQN.js → toString-BCd-H1lr.js} +92 -112
- package/dist/urlJoin-_pUL1TUx.js +24 -0
- package/dist/web-client/graph/generated.js +2 -2
- package/dist/web-client/graph.js +1 -1
- package/dist/web-client/ocs.js +1 -1
- package/dist/web-client/ox.js +2 -0
- package/dist/web-client/sse.js +1 -1
- package/dist/web-client/webdav.js +3 -3
- package/dist/web-client.js +21 -6
- package/dist/{webdav-uHUUUQAP.js → webdav-Di0erpeX.js} +89 -76
- package/package.json +7 -3
- package/dist/axios-idnwLrbl.js +0 -1862
|
@@ -1,34 +1,16 @@
|
|
|
1
|
-
import { a as e, i as t, n, r } from "./axios-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
var f = function* (e) {
|
|
5
|
-
return yield e;
|
|
6
|
-
}, p = class extends Error {
|
|
7
|
-
response;
|
|
8
|
-
statusCode;
|
|
9
|
-
constructor(e, t, n = null) {
|
|
10
|
-
super(e), this.response = t, this.statusCode = n;
|
|
11
|
-
}
|
|
12
|
-
}, m = class extends p {
|
|
13
|
-
errorCode;
|
|
14
|
-
constructor(e, t, n, r = null) {
|
|
15
|
-
super(e, n, r), this.errorCode = t;
|
|
16
|
-
}
|
|
17
|
-
}, h = ({ message: e, statusCode: t, xReqId: n }) => new p(e, new Response(void 0, {
|
|
18
|
-
headers: { "x-request-id": n },
|
|
19
|
-
status: t
|
|
20
|
-
}), t);
|
|
21
|
-
//#endregion
|
|
1
|
+
import { a as e, i as t, n, r } from "./axios-Dwm7CNmg.js";
|
|
2
|
+
import { t as i } from "./urlJoin-_pUL1TUx.js";
|
|
3
|
+
import { c as a, i as o, l as s, n as c, o as l, r as u, t as d } from "./toString-BCd-H1lr.js";
|
|
22
4
|
//#region src/helpers/publicLink/functions.ts
|
|
23
|
-
function
|
|
5
|
+
function f(e, t = "") {
|
|
24
6
|
return `/public-files/${e}/${t}`.split("/").filter(Boolean).join("/");
|
|
25
7
|
}
|
|
26
|
-
function
|
|
8
|
+
function p(e, t = "") {
|
|
27
9
|
return `/ocm/${e}/${t}`.split("/").filter(Boolean).join("/");
|
|
28
10
|
}
|
|
29
11
|
//#endregion
|
|
30
12
|
//#region src/webdav/constants/dav.ts
|
|
31
|
-
var
|
|
13
|
+
var m = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
32
14
|
n();
|
|
33
15
|
function i(e) {
|
|
34
16
|
if (typeof e != "string") throw TypeError("Path must be a string. Received " + JSON.stringify(e));
|
|
@@ -196,7 +178,7 @@ var v = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
196
178
|
posix: null
|
|
197
179
|
};
|
|
198
180
|
s.posix = s, t.exports = s;
|
|
199
|
-
})))(), 1),
|
|
181
|
+
})))(), 1), h = class {
|
|
200
182
|
static Shared = "S";
|
|
201
183
|
static Shareable = "R";
|
|
202
184
|
static Mounted = "M";
|
|
@@ -208,24 +190,24 @@ var v = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
208
190
|
static FolderCreateable = "CK";
|
|
209
191
|
static Deny = "Z";
|
|
210
192
|
static SecureView = "X";
|
|
211
|
-
},
|
|
193
|
+
}, g = /* @__PURE__ */ function(e) {
|
|
212
194
|
return e.copy = "COPY", e.delete = "DELETE", e.lock = "LOCK", e.mkcol = "MKCOL", e.move = "MOVE", e.propfind = "PROPFIND", e.proppatch = "PROPPATCH", e.put = "PUT", e.report = "REPORT", e.unlock = "UNLOCK", e;
|
|
213
|
-
}({}),
|
|
195
|
+
}({}), _ = (e) => ({
|
|
214
196
|
value: e,
|
|
215
197
|
type: null
|
|
216
|
-
}),
|
|
217
|
-
Permissions:
|
|
218
|
-
IsFavorite:
|
|
219
|
-
FileId:
|
|
220
|
-
FileParent:
|
|
221
|
-
Name:
|
|
222
|
-
OwnerId:
|
|
223
|
-
OwnerDisplayName:
|
|
224
|
-
PrivateLink:
|
|
225
|
-
ContentLength:
|
|
226
|
-
ContentSize:
|
|
227
|
-
LastModifiedDate:
|
|
228
|
-
Tags:
|
|
198
|
+
}), ee = (e) => _(e), v = (e) => _(e), y = (e) => _(e), te = {
|
|
199
|
+
Permissions: v("permissions"),
|
|
200
|
+
IsFavorite: y("favorite"),
|
|
201
|
+
FileId: v("fileid"),
|
|
202
|
+
FileParent: v("file-parent"),
|
|
203
|
+
Name: v("name"),
|
|
204
|
+
OwnerId: v("owner-id"),
|
|
205
|
+
OwnerDisplayName: v("owner-display-name"),
|
|
206
|
+
PrivateLink: v("privatelink"),
|
|
207
|
+
ContentLength: y("getcontentlength"),
|
|
208
|
+
ContentSize: y("size"),
|
|
209
|
+
LastModifiedDate: v("getlastmodified"),
|
|
210
|
+
Tags: ee("tags"),
|
|
229
211
|
Audio: {
|
|
230
212
|
value: "audio",
|
|
231
213
|
type: null
|
|
@@ -242,96 +224,96 @@ var v = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
|
242
224
|
value: "photo",
|
|
243
225
|
type: null
|
|
244
226
|
},
|
|
245
|
-
ETag:
|
|
246
|
-
MimeType:
|
|
247
|
-
ResourceType: ((e) =>
|
|
227
|
+
ETag: v("getetag"),
|
|
228
|
+
MimeType: v("getcontenttype"),
|
|
229
|
+
ResourceType: ((e) => _(e))("resourcetype"),
|
|
248
230
|
LockDiscovery: {
|
|
249
231
|
value: "lockdiscovery",
|
|
250
232
|
type: null
|
|
251
233
|
},
|
|
252
|
-
LockOwner:
|
|
253
|
-
LockTime:
|
|
234
|
+
LockOwner: v("owner"),
|
|
235
|
+
LockTime: v("locktime"),
|
|
254
236
|
ActiveLock: {
|
|
255
237
|
value: "activelock",
|
|
256
238
|
type: null
|
|
257
239
|
},
|
|
258
|
-
DownloadURL:
|
|
259
|
-
Highlights:
|
|
260
|
-
MetaPathForUser:
|
|
261
|
-
RemoteItemId:
|
|
262
|
-
HasPreview:
|
|
263
|
-
ShareId:
|
|
264
|
-
ShareRoot:
|
|
240
|
+
DownloadURL: v("downloadURL"),
|
|
241
|
+
Highlights: v("highlights"),
|
|
242
|
+
MetaPathForUser: v("meta-path-for-user"),
|
|
243
|
+
RemoteItemId: v("remote-item-id"),
|
|
244
|
+
HasPreview: y("has-preview"),
|
|
245
|
+
ShareId: v("shareid"),
|
|
246
|
+
ShareRoot: v("shareroot"),
|
|
265
247
|
ShareTypes: {
|
|
266
248
|
value: "share-types",
|
|
267
249
|
type: null
|
|
268
250
|
},
|
|
269
|
-
SharePermissions:
|
|
270
|
-
TrashbinOriginalFilename:
|
|
271
|
-
TrashbinOriginalLocation:
|
|
272
|
-
TrashbinDeletedDate:
|
|
273
|
-
PublicLinkItemType:
|
|
274
|
-
PublicLinkPermission:
|
|
275
|
-
PublicLinkExpiration:
|
|
276
|
-
PublicLinkShareDate:
|
|
277
|
-
PublicLinkShareOwner:
|
|
278
|
-
},
|
|
251
|
+
SharePermissions: v("share-permissions"),
|
|
252
|
+
TrashbinOriginalFilename: v("trashbin-original-filename"),
|
|
253
|
+
TrashbinOriginalLocation: v("trashbin-original-location"),
|
|
254
|
+
TrashbinDeletedDate: v("trashbin-delete-datetime"),
|
|
255
|
+
PublicLinkItemType: v("public-link-item-type"),
|
|
256
|
+
PublicLinkPermission: v("public-link-permission"),
|
|
257
|
+
PublicLinkExpiration: v("public-link-expiration"),
|
|
258
|
+
PublicLinkShareDate: v("public-link-share-datetime"),
|
|
259
|
+
PublicLinkShareOwner: v("public-link-share-owner")
|
|
260
|
+
}, b = Object.fromEntries(Object.entries(te).map(([e, t]) => [e, t.value])), ne = class e {
|
|
279
261
|
static Default = [
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
262
|
+
b.Permissions,
|
|
263
|
+
b.IsFavorite,
|
|
264
|
+
b.FileId,
|
|
265
|
+
b.FileParent,
|
|
266
|
+
b.Name,
|
|
267
|
+
b.LockDiscovery,
|
|
268
|
+
b.ActiveLock,
|
|
269
|
+
b.OwnerId,
|
|
270
|
+
b.OwnerDisplayName,
|
|
271
|
+
b.RemoteItemId,
|
|
272
|
+
b.ShareRoot,
|
|
273
|
+
b.ShareTypes,
|
|
274
|
+
b.PrivateLink,
|
|
275
|
+
b.ContentLength,
|
|
276
|
+
b.ContentSize,
|
|
277
|
+
b.LastModifiedDate,
|
|
278
|
+
b.ETag,
|
|
279
|
+
b.MimeType,
|
|
280
|
+
b.ResourceType,
|
|
281
|
+
b.Tags,
|
|
282
|
+
b.Audio,
|
|
283
|
+
b.Location,
|
|
284
|
+
b.Image,
|
|
285
|
+
b.Photo,
|
|
286
|
+
b.HasPreview
|
|
305
287
|
];
|
|
306
288
|
static PublicLink = e.Default.concat([
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
289
|
+
b.PublicLinkItemType,
|
|
290
|
+
b.PublicLinkPermission,
|
|
291
|
+
b.PublicLinkExpiration,
|
|
292
|
+
b.PublicLinkShareDate,
|
|
293
|
+
b.PublicLinkShareOwner
|
|
312
294
|
]);
|
|
313
295
|
static Trashbin = [
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
296
|
+
b.ContentLength,
|
|
297
|
+
b.ResourceType,
|
|
298
|
+
b.TrashbinOriginalLocation,
|
|
299
|
+
b.TrashbinOriginalFilename,
|
|
300
|
+
b.TrashbinDeletedDate,
|
|
301
|
+
b.Permissions,
|
|
302
|
+
b.FileParent
|
|
321
303
|
];
|
|
322
304
|
static DavNamespace = [
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
305
|
+
b.ContentLength,
|
|
306
|
+
b.LastModifiedDate,
|
|
307
|
+
b.ETag,
|
|
308
|
+
b.MimeType,
|
|
309
|
+
b.ResourceType,
|
|
310
|
+
b.LockDiscovery,
|
|
311
|
+
b.ActiveLock
|
|
330
312
|
];
|
|
331
313
|
};
|
|
332
314
|
//#endregion
|
|
333
315
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/identity.js
|
|
334
|
-
function
|
|
316
|
+
function re(e) {
|
|
335
317
|
return e;
|
|
336
318
|
}
|
|
337
319
|
//#endregion
|
|
@@ -372,7 +354,7 @@ function ue(e) {
|
|
|
372
354
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js
|
|
373
355
|
var de = function() {
|
|
374
356
|
try {
|
|
375
|
-
var e =
|
|
357
|
+
var e = u(Object, "defineProperty");
|
|
376
358
|
return e({}, "", {}), e;
|
|
377
359
|
} catch {}
|
|
378
360
|
}(), fe = le(de ? function(e, t) {
|
|
@@ -382,7 +364,7 @@ var de = function() {
|
|
|
382
364
|
value: ue(t),
|
|
383
365
|
writable: !0
|
|
384
366
|
});
|
|
385
|
-
} :
|
|
367
|
+
} : re);
|
|
386
368
|
//#endregion
|
|
387
369
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseFindIndex.js
|
|
388
370
|
function pe(e, t, n, r) {
|
|
@@ -424,7 +406,7 @@ function ye(e, t, n) {
|
|
|
424
406
|
//#endregion
|
|
425
407
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js
|
|
426
408
|
function be(e, t) {
|
|
427
|
-
return fe(ye(e, t,
|
|
409
|
+
return fe(ye(e, t, re), e + "");
|
|
428
410
|
}
|
|
429
411
|
//#endregion
|
|
430
412
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isLength.js
|
|
@@ -435,7 +417,7 @@ function Se(e) {
|
|
|
435
417
|
//#endregion
|
|
436
418
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js
|
|
437
419
|
function Ce(e) {
|
|
438
|
-
return e != null && Se(e.length) && !
|
|
420
|
+
return e != null && Se(e.length) && !o(e);
|
|
439
421
|
}
|
|
440
422
|
//#endregion
|
|
441
423
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js
|
|
@@ -471,59 +453,59 @@ function ke(e) {
|
|
|
471
453
|
}
|
|
472
454
|
//#endregion
|
|
473
455
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_unicodeToArray.js
|
|
474
|
-
var Ae = "\\ud800-\\udfff", je = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", Me = "\\ufe0e\\ufe0f", Ne = "[" + Ae + "]",
|
|
456
|
+
var Ae = "\\ud800-\\udfff", je = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", Me = "\\ufe0e\\ufe0f", Ne = "[" + Ae + "]", x = "[" + je + "]", S = "\\ud83c[\\udffb-\\udfff]", Pe = "(?:" + x + "|" + S + ")", C = "[^" + Ae + "]", Fe = "(?:\\ud83c[\\udde6-\\uddff]){2}", w = "[\\ud800-\\udbff][\\udc00-\\udfff]", Ie = "\\u200d", T = Pe + "?", E = "[" + Me + "]?", Le = "(?:" + Ie + "(?:" + [
|
|
457
|
+
C,
|
|
475
458
|
Fe,
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
Le,
|
|
459
|
+
w
|
|
460
|
+
].join("|") + ")" + E + T + ")*", Re = E + T + Le, ze = "(?:" + [
|
|
461
|
+
C + x + "?",
|
|
462
|
+
x,
|
|
463
|
+
Fe,
|
|
464
|
+
w,
|
|
483
465
|
Ne
|
|
484
|
-
].join("|") + ")",
|
|
485
|
-
function
|
|
486
|
-
return e.match(
|
|
466
|
+
].join("|") + ")", Be = RegExp(S + "(?=" + S + ")|" + ze + Re, "g");
|
|
467
|
+
function Ve(e) {
|
|
468
|
+
return e.match(Be) || [];
|
|
487
469
|
}
|
|
488
470
|
//#endregion
|
|
489
471
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stringToArray.js
|
|
490
|
-
function
|
|
491
|
-
return Oe(e) ?
|
|
472
|
+
function He(e) {
|
|
473
|
+
return Oe(e) ? Ve(e) : ke(e);
|
|
492
474
|
}
|
|
493
475
|
//#endregion
|
|
494
476
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_createCaseFirst.js
|
|
495
|
-
function
|
|
477
|
+
function Ue(e) {
|
|
496
478
|
return function(t) {
|
|
497
|
-
t =
|
|
498
|
-
var n = Oe(t) ?
|
|
479
|
+
t = d(t);
|
|
480
|
+
var n = Oe(t) ? He(t) : void 0, r = n ? n[0] : t.charAt(0), i = n ? Ee(n, 1).join("") : t.slice(1);
|
|
499
481
|
return r[e]() + i;
|
|
500
482
|
};
|
|
501
483
|
}
|
|
502
484
|
//#endregion
|
|
503
485
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/upperFirst.js
|
|
504
|
-
var
|
|
486
|
+
var We = Ue("toUpperCase");
|
|
505
487
|
//#endregion
|
|
506
488
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/capitalize.js
|
|
507
|
-
function
|
|
508
|
-
return
|
|
489
|
+
function Ge(e) {
|
|
490
|
+
return We(d(e).toLowerCase());
|
|
509
491
|
}
|
|
510
492
|
//#endregion
|
|
511
493
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayReduce.js
|
|
512
|
-
function
|
|
494
|
+
function Ke(e, t, n, r) {
|
|
513
495
|
var i = -1, a = e == null ? 0 : e.length;
|
|
514
496
|
for (r && a && (n = e[++i]); ++i < a;) n = t(n, e[i], i, e);
|
|
515
497
|
return n;
|
|
516
498
|
}
|
|
517
499
|
//#endregion
|
|
518
500
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_basePropertyOf.js
|
|
519
|
-
function
|
|
501
|
+
function qe(e) {
|
|
520
502
|
return function(t) {
|
|
521
503
|
return e?.[t];
|
|
522
504
|
};
|
|
523
505
|
}
|
|
524
506
|
//#endregion
|
|
525
507
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_deburrLetter.js
|
|
526
|
-
var
|
|
508
|
+
var Je = qe({
|
|
527
509
|
À: "A",
|
|
528
510
|
Á: "A",
|
|
529
511
|
Â: "A",
|
|
@@ -714,86 +696,86 @@ var Qe = Ze({
|
|
|
714
696
|
œ: "oe",
|
|
715
697
|
ʼn: "'n",
|
|
716
698
|
ſ: "s"
|
|
717
|
-
}),
|
|
718
|
-
function
|
|
719
|
-
return e =
|
|
699
|
+
}), Ye = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, Xe = RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]", "g");
|
|
700
|
+
function Ze(e) {
|
|
701
|
+
return e = d(e), e && e.replace(Ye, Je).replace(Xe, "");
|
|
720
702
|
}
|
|
721
703
|
//#endregion
|
|
722
704
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_asciiWords.js
|
|
723
|
-
var
|
|
724
|
-
function
|
|
725
|
-
return e.match(
|
|
705
|
+
var Qe = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
706
|
+
function $e(e) {
|
|
707
|
+
return e.match(Qe) || [];
|
|
726
708
|
}
|
|
727
709
|
//#endregion
|
|
728
710
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hasUnicodeWord.js
|
|
729
|
-
var
|
|
730
|
-
function
|
|
731
|
-
return
|
|
711
|
+
var et = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
712
|
+
function tt(e) {
|
|
713
|
+
return et.test(e);
|
|
732
714
|
}
|
|
733
715
|
//#endregion
|
|
734
716
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_unicodeWords.js
|
|
735
|
-
var
|
|
736
|
-
|
|
717
|
+
var D = "\\ud800-\\udfff", nt = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", rt = "\\u2700-\\u27bf", it = "a-z\\xdf-\\xf6\\xf8-\\xff", at = "\\xac\\xb1\\xd7\\xf7", ot = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", st = "\\u2000-\\u206f", ct = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", lt = "A-Z\\xc0-\\xd6\\xd8-\\xde", ut = "\\ufe0e\\ufe0f", dt = at + ot + st + ct, ft = "['’]", pt = "[" + dt + "]", mt = "[" + nt + "]", ht = "\\d+", gt = "[" + rt + "]", _t = "[" + it + "]", vt = "[^" + D + dt + ht + rt + it + lt + "]", yt = "(?:" + mt + "|\\ud83c[\\udffb-\\udfff])", bt = "[^" + D + "]", O = "(?:\\ud83c[\\udde6-\\uddff]){2}", k = "[\\ud800-\\udbff][\\udc00-\\udfff]", A = "[" + lt + "]", xt = "\\u200d", j = "(?:" + _t + "|" + vt + ")", St = "(?:" + A + "|" + vt + ")", M = "(?:" + ft + "(?:d|ll|m|re|s|t|ve))?", N = "(?:" + ft + "(?:D|LL|M|RE|S|T|VE))?", P = yt + "?", F = "[" + ut + "]?", Ct = "(?:" + xt + "(?:" + [
|
|
718
|
+
bt,
|
|
737
719
|
O,
|
|
738
720
|
k
|
|
739
|
-
].join("|") + ")" + F + P + ")*",
|
|
740
|
-
|
|
721
|
+
].join("|") + ")" + F + P + ")*", wt = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", Tt = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", Et = F + P + Ct, Dt = "(?:" + [
|
|
722
|
+
gt,
|
|
741
723
|
O,
|
|
742
724
|
k
|
|
743
|
-
].join("|") + ")" +
|
|
744
|
-
A + "?" +
|
|
745
|
-
|
|
725
|
+
].join("|") + ")" + Et, Ot = RegExp([
|
|
726
|
+
A + "?" + _t + "+" + M + "(?=" + [
|
|
727
|
+
pt,
|
|
746
728
|
A,
|
|
747
729
|
"$"
|
|
748
730
|
].join("|") + ")",
|
|
749
|
-
|
|
750
|
-
|
|
731
|
+
St + "+" + N + "(?=" + [
|
|
732
|
+
pt,
|
|
751
733
|
A + j,
|
|
752
734
|
"$"
|
|
753
735
|
].join("|") + ")",
|
|
754
736
|
A + "?" + j + "+" + M,
|
|
755
737
|
A + "+" + N,
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
738
|
+
Tt,
|
|
739
|
+
wt,
|
|
740
|
+
ht,
|
|
741
|
+
Dt
|
|
760
742
|
].join("|"), "g");
|
|
761
|
-
function
|
|
762
|
-
return e.match(
|
|
743
|
+
function kt(e) {
|
|
744
|
+
return e.match(Ot) || [];
|
|
763
745
|
}
|
|
764
746
|
//#endregion
|
|
765
747
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/words.js
|
|
766
|
-
function
|
|
767
|
-
return e =
|
|
748
|
+
function At(e, t, n) {
|
|
749
|
+
return e = d(e), t = n ? void 0 : t, t === void 0 ? tt(e) ? kt(e) : $e(e) : e.match(t) || [];
|
|
768
750
|
}
|
|
769
751
|
//#endregion
|
|
770
752
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_createCompounder.js
|
|
771
|
-
var
|
|
772
|
-
function
|
|
753
|
+
var jt = RegExp("['’]", "g");
|
|
754
|
+
function Mt(e) {
|
|
773
755
|
return function(t) {
|
|
774
|
-
return
|
|
756
|
+
return Ke(At(Ze(t).replace(jt, "")), e, "");
|
|
775
757
|
};
|
|
776
758
|
}
|
|
777
759
|
//#endregion
|
|
778
760
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/camelCase.js
|
|
779
|
-
var
|
|
780
|
-
return t = t.toLowerCase(), e + (n ?
|
|
781
|
-
}), I =
|
|
782
|
-
function
|
|
783
|
-
return this.__data__.set(e,
|
|
761
|
+
var Nt = Mt(function(e, t, n) {
|
|
762
|
+
return t = t.toLowerCase(), e + (n ? Ge(t) : t);
|
|
763
|
+
}), I = u(s, "Set"), Pt = "__lodash_hash_undefined__";
|
|
764
|
+
function Ft(e) {
|
|
765
|
+
return this.__data__.set(e, Pt), this;
|
|
784
766
|
}
|
|
785
767
|
//#endregion
|
|
786
768
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_setCacheHas.js
|
|
787
|
-
function
|
|
769
|
+
function It(e) {
|
|
788
770
|
return this.__data__.has(e);
|
|
789
771
|
}
|
|
790
772
|
//#endregion
|
|
791
773
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_SetCache.js
|
|
792
774
|
function L(e) {
|
|
793
775
|
var t = -1, n = e == null ? 0 : e.length;
|
|
794
|
-
for (this.__data__ = new
|
|
776
|
+
for (this.__data__ = new c(); ++t < n;) this.add(e[t]);
|
|
795
777
|
}
|
|
796
|
-
L.prototype.add = L.prototype.push =
|
|
778
|
+
L.prototype.add = L.prototype.push = Ft, L.prototype.has = It;
|
|
797
779
|
//#endregion
|
|
798
780
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cacheHas.js
|
|
799
781
|
function R(e, t) {
|
|
@@ -809,26 +791,26 @@ function z(e) {
|
|
|
809
791
|
}
|
|
810
792
|
//#endregion
|
|
811
793
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isArrayLikeObject.js
|
|
812
|
-
function
|
|
813
|
-
return
|
|
794
|
+
function Lt(e) {
|
|
795
|
+
return a(e) && Ce(e);
|
|
814
796
|
}
|
|
815
797
|
//#endregion
|
|
816
798
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_arrayIncludesWith.js
|
|
817
|
-
function
|
|
799
|
+
function Rt(e, t, n) {
|
|
818
800
|
for (var r = -1, i = e == null ? 0 : e.length; ++r < i;) if (n(t, e[r])) return !0;
|
|
819
801
|
return !1;
|
|
820
802
|
}
|
|
821
803
|
//#endregion
|
|
822
804
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIntersection.js
|
|
823
|
-
var
|
|
824
|
-
function
|
|
825
|
-
for (var r = n ?
|
|
805
|
+
var zt = Math.min;
|
|
806
|
+
function Bt(e, t, n) {
|
|
807
|
+
for (var r = n ? Rt : _e, i = e[0].length, a = e.length, o = a, s = Array(a), c = Infinity, u = []; o--;) {
|
|
826
808
|
var d = e[o];
|
|
827
|
-
o && t && (d =
|
|
809
|
+
o && t && (d = l(d, we(t))), c = zt(d.length, c), s[o] = !n && (t || i >= 120 && d.length >= 120) ? new L(o && d) : void 0;
|
|
828
810
|
}
|
|
829
811
|
d = e[0];
|
|
830
812
|
var f = -1, p = s[0];
|
|
831
|
-
outer: for (; ++f < i && u.length <
|
|
813
|
+
outer: for (; ++f < i && u.length < c;) {
|
|
832
814
|
var m = d[f], h = t ? t(m) : m;
|
|
833
815
|
if (m = n || m !== 0 ? m : 0, !(p ? R(p, h) : r(u, h, n))) {
|
|
834
816
|
for (o = a; --o;) {
|
|
@@ -842,22 +824,22 @@ function Wt(e, t, n) {
|
|
|
842
824
|
}
|
|
843
825
|
//#endregion
|
|
844
826
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_castArrayLikeObject.js
|
|
845
|
-
function
|
|
846
|
-
return
|
|
827
|
+
function Vt(e) {
|
|
828
|
+
return Lt(e) ? e : [];
|
|
847
829
|
}
|
|
848
830
|
//#endregion
|
|
849
831
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/intersection.js
|
|
850
|
-
var
|
|
851
|
-
var t =
|
|
852
|
-
return t.length && t[0] === e[0] ?
|
|
853
|
-
}),
|
|
832
|
+
var Ht = be(function(e) {
|
|
833
|
+
var t = l(e, Vt);
|
|
834
|
+
return t.length && t[0] === e[0] ? Bt(t) : [];
|
|
835
|
+
}), Ut = I && 1 / z(new I([, -0]))[1] == Infinity ? function(e) {
|
|
854
836
|
return new I(e);
|
|
855
|
-
} : ae,
|
|
856
|
-
function
|
|
837
|
+
} : ae, Wt = 200;
|
|
838
|
+
function Gt(e, t, n) {
|
|
857
839
|
var r = -1, i = _e, a = e.length, o = !0, s = [], c = s;
|
|
858
|
-
if (n) o = !1, i =
|
|
859
|
-
else if (a >=
|
|
860
|
-
var l = t ? null :
|
|
840
|
+
if (n) o = !1, i = Rt;
|
|
841
|
+
else if (a >= Wt) {
|
|
842
|
+
var l = t ? null : Ut(e);
|
|
861
843
|
if (l) return z(l);
|
|
862
844
|
o = !1, i = R, c = new L();
|
|
863
845
|
} else c = t ? [] : s;
|
|
@@ -872,16 +854,16 @@ function Yt(e, t, n) {
|
|
|
872
854
|
}
|
|
873
855
|
//#endregion
|
|
874
856
|
//#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/uniq.js
|
|
875
|
-
function
|
|
876
|
-
return e && e.length ?
|
|
857
|
+
function Kt(e) {
|
|
858
|
+
return e && e.length ? Gt(e) : [];
|
|
877
859
|
}
|
|
878
860
|
//#endregion
|
|
879
861
|
//#region src/helpers/resource/functions.ts
|
|
880
|
-
var
|
|
862
|
+
var qt = { complex: [
|
|
881
863
|
"tar.bz2",
|
|
882
864
|
"tar.gz",
|
|
883
865
|
"tar.xz"
|
|
884
|
-
] },
|
|
866
|
+
] }, Jt = (e) => Object.hasOwn(e, "ddate"), Yt = (e) => Object.hasOwn(e, "highlights"), B = (e) => e.replace(/[^A-Za-z0-9\-_]/g, ""), Xt = (e, t) => !e || typeof e != "string" ? "" : e.indexOf("!") >= 0 ? e.split("!")[t] : "", V = (e) => Xt(e, 0), H = (e) => Xt(e, 1), Zt = (e) => {
|
|
885
867
|
let t = e.extension || "", n = e.name || "";
|
|
886
868
|
if (!t.length) return n;
|
|
887
869
|
let r = n.lastIndexOf(`.${t}`);
|
|
@@ -890,28 +872,28 @@ var Zt = { complex: [
|
|
|
890
872
|
let t = e.name.split(".");
|
|
891
873
|
if (t.length > 2) for (let e = 0; e < t.length; e++) {
|
|
892
874
|
let n = t.slice(e, t.length).join(".");
|
|
893
|
-
if (
|
|
875
|
+
if (qt.complex.includes(n)) return n;
|
|
894
876
|
}
|
|
895
877
|
return t.length < 2 ? "" : t[t.length - 1];
|
|
896
|
-
},
|
|
878
|
+
}, Qt = (e) => (0, m.basename)((0, m.dirname)(e.path)) || null, $t = (e) => typeof e.isShareRoot == "function" && e.isShareRoot(), W = (e) => {
|
|
897
879
|
if (!e) return e;
|
|
898
880
|
let t = {};
|
|
899
881
|
return Object.keys(e).forEach((n) => {
|
|
900
|
-
t[
|
|
882
|
+
t[Nt(n)] = e[n];
|
|
901
883
|
}), t;
|
|
902
884
|
};
|
|
903
|
-
function
|
|
904
|
-
let n = e.props[
|
|
885
|
+
function en(e, t = []) {
|
|
886
|
+
let n = e.props[b.Name]?.toString() || (0, m.basename)(e.filename), r = e.props[b.FileId], i = e.type === "directory", a;
|
|
905
887
|
a = e.filename.startsWith("/files") || e.filename.startsWith("/space") ? e.filename.split("/").slice(3).join("/") : e.filename, a.startsWith("/") || (a = `/${a}`);
|
|
906
888
|
let o = U({
|
|
907
889
|
...e,
|
|
908
890
|
id: r,
|
|
909
891
|
name: n,
|
|
910
892
|
path: a
|
|
911
|
-
}), s = e.props[
|
|
912
|
-
s && (c = s[
|
|
893
|
+
}), s = e.props[b.LockDiscovery], c, l, u;
|
|
894
|
+
s && (c = s[b.ActiveLock], l = c[b.LockOwner], u = c[b.LockTime]);
|
|
913
895
|
let d = [];
|
|
914
|
-
e.props[
|
|
896
|
+
e.props[b.ShareTypes] && (d = e.props[b.ShareTypes]["share-type"], Array.isArray(d) || (d = [d]));
|
|
915
897
|
let f = {};
|
|
916
898
|
for (let n of t || []) {
|
|
917
899
|
let t = n.split(":").pop();
|
|
@@ -921,8 +903,8 @@ function an(e, t = []) {
|
|
|
921
903
|
id: r,
|
|
922
904
|
fileId: r,
|
|
923
905
|
storageId: V(r),
|
|
924
|
-
parentFolderId: e.props[
|
|
925
|
-
mimeType: e.props[
|
|
906
|
+
parentFolderId: e.props[b.FileParent],
|
|
907
|
+
mimeType: e.props[b.MimeType],
|
|
926
908
|
name: n,
|
|
927
909
|
extension: o,
|
|
928
910
|
path: a,
|
|
@@ -933,56 +915,60 @@ function an(e, t = []) {
|
|
|
933
915
|
lockOwner: l,
|
|
934
916
|
lockTime: u,
|
|
935
917
|
processing: e.processing || !1,
|
|
936
|
-
mdate: e.props[
|
|
937
|
-
size: i ? e.props[
|
|
938
|
-
permissions: e.props[
|
|
939
|
-
|
|
940
|
-
|
|
918
|
+
mdate: e.props[b.LastModifiedDate],
|
|
919
|
+
size: i ? e.props[b.ContentSize]?.toString() || "0" : e.props[b.ContentLength]?.toString() || "0",
|
|
920
|
+
permissions: e.props[b.Permissions] || "",
|
|
921
|
+
isInVault: !1,
|
|
922
|
+
starred: e.props[b.IsFavorite] === 1,
|
|
923
|
+
etag: e.props[b.ETag],
|
|
941
924
|
shareTypes: d,
|
|
942
|
-
privateLink: e.props[
|
|
943
|
-
downloadURL: e.props[
|
|
944
|
-
remoteItemId: e.props[
|
|
945
|
-
remoteItemPath: e.props[
|
|
925
|
+
privateLink: e.props[b.PrivateLink],
|
|
926
|
+
downloadURL: e.props[b.DownloadURL],
|
|
927
|
+
remoteItemId: e.props[b.RemoteItemId],
|
|
928
|
+
remoteItemPath: e.props[b.ShareRoot],
|
|
946
929
|
owner: {
|
|
947
|
-
id: e.props[
|
|
948
|
-
displayName: e.props[
|
|
930
|
+
id: e.props[b.OwnerId],
|
|
931
|
+
displayName: e.props[b.OwnerDisplayName]
|
|
949
932
|
},
|
|
950
|
-
tags: (e.props[
|
|
951
|
-
audio: W(e.props[
|
|
952
|
-
location: W(e.props[
|
|
953
|
-
image: W(e.props[
|
|
954
|
-
photo: W(e.props[
|
|
933
|
+
tags: (e.props[b.Tags] || "").toString().split(",").filter(Boolean),
|
|
934
|
+
audio: W(e.props[b.Audio]),
|
|
935
|
+
location: W(e.props[b.Location]),
|
|
936
|
+
image: W(e.props[b.Image]),
|
|
937
|
+
photo: W(e.props[b.Photo]),
|
|
955
938
|
extraProps: f,
|
|
956
|
-
hasPreview: () => e.props[
|
|
939
|
+
hasPreview: () => e.props[b.HasPreview] === 1,
|
|
957
940
|
canUpload: function() {
|
|
958
|
-
return this.permissions.indexOf(
|
|
941
|
+
return this.permissions.indexOf(h.FolderCreateable) >= 0;
|
|
959
942
|
},
|
|
960
943
|
canDownload: function() {
|
|
961
|
-
return this.permissions.indexOf(
|
|
944
|
+
return this.permissions.indexOf(h.SecureView) === -1;
|
|
962
945
|
},
|
|
963
946
|
canBeDeleted: function() {
|
|
964
|
-
return this.permissions.indexOf(
|
|
947
|
+
return this.permissions.indexOf(h.Deletable) >= 0;
|
|
965
948
|
},
|
|
966
949
|
canRename: function() {
|
|
967
|
-
return this.permissions.indexOf(
|
|
950
|
+
return this.permissions.indexOf(h.Renameable) >= 0;
|
|
968
951
|
},
|
|
969
952
|
canShare: function({ ability: e }) {
|
|
970
|
-
return e.can("create-all", "Share") && this.permissions.indexOf(
|
|
953
|
+
return e.can("create-all", "Share") && this.permissions.indexOf(h.Shareable) >= 0;
|
|
971
954
|
},
|
|
972
955
|
canCreate: function() {
|
|
973
|
-
return this.permissions.indexOf(
|
|
956
|
+
return this.permissions.indexOf(h.FolderCreateable) >= 0;
|
|
974
957
|
},
|
|
975
958
|
canEditTags: function() {
|
|
976
|
-
return this.permissions.indexOf(
|
|
959
|
+
return this.permissions.indexOf(h.Updateable) >= 0 || this.permissions.indexOf(h.FileUpdateable) >= 0 || this.permissions.indexOf(h.FolderCreateable) >= 0;
|
|
960
|
+
},
|
|
961
|
+
canListVersions: function() {
|
|
962
|
+
return !this.isFolder;
|
|
977
963
|
},
|
|
978
964
|
isMounted: function() {
|
|
979
|
-
return this.permissions.indexOf(
|
|
965
|
+
return this.permissions.indexOf(h.Mounted) >= 0;
|
|
980
966
|
},
|
|
981
967
|
isReceivedShare: function() {
|
|
982
|
-
return this.permissions.indexOf(
|
|
968
|
+
return this.permissions.indexOf(h.Shared) >= 0;
|
|
983
969
|
},
|
|
984
970
|
isShareRoot() {
|
|
985
|
-
return e.props[
|
|
971
|
+
return e.props[b.ShareRoot] ? e.filename.split("/").length === 3 : !1;
|
|
986
972
|
},
|
|
987
973
|
getDomSelector: () => B(r)
|
|
988
974
|
};
|
|
@@ -990,20 +976,20 @@ function an(e, t = []) {
|
|
|
990
976
|
return H(this.id);
|
|
991
977
|
} }), p;
|
|
992
978
|
}
|
|
993
|
-
function
|
|
994
|
-
let t = e.type === "directory", n = e.props[
|
|
979
|
+
function tn(e) {
|
|
980
|
+
let t = e.type === "directory", n = e.props[b.TrashbinOriginalFilename]?.toString(), r = U({
|
|
995
981
|
name: n,
|
|
996
982
|
type: e.type
|
|
997
|
-
}),
|
|
983
|
+
}), a = m.default.basename(e.filename);
|
|
998
984
|
return {
|
|
999
985
|
type: t ? "folder" : e.type,
|
|
1000
986
|
isFolder: t,
|
|
1001
|
-
ddate: e.props[
|
|
1002
|
-
name:
|
|
987
|
+
ddate: e.props[b.TrashbinDeletedDate],
|
|
988
|
+
name: m.default.basename(n),
|
|
1003
989
|
extension: r,
|
|
1004
|
-
path:
|
|
1005
|
-
id:
|
|
1006
|
-
parentFolderId: e.props[
|
|
990
|
+
path: i(e.props[b.TrashbinOriginalLocation], { leadingSlash: !0 }),
|
|
991
|
+
id: a,
|
|
992
|
+
parentFolderId: e.props[b.FileParent],
|
|
1007
993
|
webDavPath: "",
|
|
1008
994
|
canUpload: () => !1,
|
|
1009
995
|
canDownload: () => !1,
|
|
@@ -1018,18 +1004,13 @@ function on(e) {
|
|
|
1018
1004
|
isReceivedShare: () => !1,
|
|
1019
1005
|
hasPreview: () => !1,
|
|
1020
1006
|
isShareRoot: () => !1,
|
|
1021
|
-
|
|
1007
|
+
canListVersions: () => !1,
|
|
1008
|
+
getDomSelector: () => B(a)
|
|
1022
1009
|
};
|
|
1023
1010
|
}
|
|
1024
1011
|
//#endregion
|
|
1025
|
-
//#region src/helpers/share/
|
|
1026
|
-
var
|
|
1027
|
-
static Read = 1;
|
|
1028
|
-
static Update = 2;
|
|
1029
|
-
static Create = 4;
|
|
1030
|
-
static Delete = 8;
|
|
1031
|
-
static Share = 16;
|
|
1032
|
-
}, G = /* @__PURE__ */ function(e) {
|
|
1012
|
+
//#region src/helpers/share/types.ts
|
|
1013
|
+
var G = /* @__PURE__ */ function(e) {
|
|
1033
1014
|
return e.createUpload = "libre.graph/driveItem/upload/create", e.createPermissions = "libre.graph/driveItem/permissions/create", e.createChildren = "libre.graph/driveItem/children/create", e.readBasic = "libre.graph/driveItem/basic/read", e.readPath = "libre.graph/driveItem/path/read", e.readQuota = "libre.graph/driveItem/quota/read", e.readContent = "libre.graph/driveItem/content/read", e.readChildren = "libre.graph/driveItem/children/read", e.readDeleted = "libre.graph/driveItem/deleted/read", e.readPermissions = "libre.graph/driveItem/permissions/read", e.readVersions = "libre.graph/driveItem/versions/read", e.updatePath = "libre.graph/driveItem/path/update", e.updateDeleted = "libre.graph/driveItem/deleted/update", e.updatePermissions = "libre.graph/driveItem/permissions/update", e.updateVersions = "libre.graph/driveItem/versions/update", e.deleteStandard = "libre.graph/driveItem/standard/delete", e.deleteDeleted = "libre.graph/driveItem/deleted/delete", e.deletePermissions = "libre.graph/driveItem/permissions/delete", e;
|
|
1034
1015
|
}({}), K = (e) => e, q = class {
|
|
1035
1016
|
_key;
|
|
@@ -1057,6 +1038,7 @@ var sn = class {
|
|
|
1057
1038
|
static link = new q("link", 3, K("Link"), "link");
|
|
1058
1039
|
static guest = new q("guest", 4, K("Guest"), "global");
|
|
1059
1040
|
static remote = new q("remote", 6, K("External"), "earth");
|
|
1041
|
+
static contact = new q("contact", 100, K("Contact"), "global");
|
|
1060
1042
|
static individuals = [
|
|
1061
1043
|
this.user,
|
|
1062
1044
|
this.guest,
|
|
@@ -1075,7 +1057,8 @@ var sn = class {
|
|
|
1075
1057
|
this.group,
|
|
1076
1058
|
this.link,
|
|
1077
1059
|
this.guest,
|
|
1078
|
-
this.remote
|
|
1060
|
+
this.remote,
|
|
1061
|
+
this.contact
|
|
1079
1062
|
];
|
|
1080
1063
|
static isIndividual(e) {
|
|
1081
1064
|
return this.individuals.includes(e);
|
|
@@ -1102,18 +1085,18 @@ var sn = class {
|
|
|
1102
1085
|
return e.map((e) => e.value);
|
|
1103
1086
|
}
|
|
1104
1087
|
static containsAnyValue(e, t) {
|
|
1105
|
-
return
|
|
1088
|
+
return Ht(this.getValues(e), t).length > 0;
|
|
1106
1089
|
}
|
|
1107
|
-
},
|
|
1090
|
+
}, nn = "a0ca6a90-a365-4782-871e-d44447bbc668", rn = "89f37a33-858b-45fa-8890-a1f2b27d90e1", an = (e) => e?.type === "space", Y = (e) => e?.driveType === "personal", on = (e) => e?.driveType === "project", sn = (e) => e?.driveType === "share", cn = (e) => e?.driveType === "mountpoint", ln = (e) => e?.driveType === "public";
|
|
1108
1091
|
//#endregion
|
|
1109
1092
|
//#region src/helpers/space/functions.ts
|
|
1110
1093
|
function X(e, t) {
|
|
1111
|
-
return
|
|
1094
|
+
return i("spaces", e, t, { leadingSlash: !0 });
|
|
1112
1095
|
}
|
|
1113
|
-
function
|
|
1114
|
-
return
|
|
1096
|
+
function un(e, t = "") {
|
|
1097
|
+
return i("spaces", "trash-bin", e, t, { leadingSlash: !0 });
|
|
1115
1098
|
}
|
|
1116
|
-
function
|
|
1099
|
+
function dn(e, t) {
|
|
1117
1100
|
let n = e[{
|
|
1118
1101
|
image: "spaceImageData",
|
|
1119
1102
|
readme: "spaceReadmeData"
|
|
@@ -1122,18 +1105,18 @@ function gn(e, t) {
|
|
|
1122
1105
|
let r = decodeURI(n.webDavUrl).split("/"), i = r.find((t) => t.startsWith(e.id));
|
|
1123
1106
|
return i ? r.slice(r.indexOf(i) + 1).join("/") : "";
|
|
1124
1107
|
}
|
|
1125
|
-
function
|
|
1108
|
+
function fn(e) {
|
|
1126
1109
|
return e.permissions.includes(G.deletePermissions);
|
|
1127
1110
|
}
|
|
1128
|
-
var
|
|
1111
|
+
var pn = (e, t) => e.root.permissions?.filter((e) => {
|
|
1129
1112
|
let n = [];
|
|
1130
1113
|
e["@libre.graph.permissions.actions"] && (n = e["@libre.graph.permissions.actions"]);
|
|
1131
1114
|
let r = t[e.roles?.[0]];
|
|
1132
1115
|
return r && !n.length && (n = r.rolePermissions.find(({ condition: e }) => e === "exists @Resource.Root")?.allowedResourceActions || []), n.includes(G.deletePermissions);
|
|
1133
1116
|
});
|
|
1134
|
-
function
|
|
1135
|
-
let t = e.publicLinkPassword, n = e.props?.[
|
|
1136
|
-
return c === "ocm" ? (l = `ocm/${e.id}`, u =
|
|
1117
|
+
function mn(e) {
|
|
1118
|
+
let t = e.publicLinkPassword, n = e.props?.[b.FileId], r = e.props?.[b.PublicLinkItemType], i = e.props?.[b.PublicLinkPermission], a = e.props?.[b.PublicLinkExpiration], o = e.props?.[b.PublicLinkShareDate], s = e.props?.[b.PublicLinkShareOwner], c = e.publicLinkType, l, u;
|
|
1119
|
+
return c === "ocm" ? (l = `ocm/${e.id}`, u = p(e.id)) : (l = `public/${e.id}`, u = f(e.id)), Object.assign(Z({
|
|
1137
1120
|
...e,
|
|
1138
1121
|
driveType: "public",
|
|
1139
1122
|
driveAlias: l,
|
|
@@ -1149,22 +1132,22 @@ function yn(e) {
|
|
|
1149
1132
|
publicLinkType: c
|
|
1150
1133
|
});
|
|
1151
1134
|
}
|
|
1152
|
-
function
|
|
1153
|
-
let
|
|
1135
|
+
function hn({ driveAliasPrefix: e, id: t, shareName: n, serverUrl: r, graphPermissions: i }) {
|
|
1136
|
+
let a = Z({
|
|
1154
1137
|
id: t,
|
|
1155
1138
|
driveAlias: `${e}/${n}`,
|
|
1156
1139
|
driveType: "share",
|
|
1157
1140
|
name: n,
|
|
1158
1141
|
serverUrl: r
|
|
1159
1142
|
});
|
|
1160
|
-
return
|
|
1161
|
-
|
|
1162
|
-
}, i;
|
|
1143
|
+
return a.rename = (t) => {
|
|
1144
|
+
a.driveAlias = `${e}/${t}`, a.name = t;
|
|
1145
|
+
}, i && (a.graphPermissions = i), a;
|
|
1163
1146
|
}
|
|
1164
1147
|
function Z(e) {
|
|
1165
1148
|
let t, n;
|
|
1166
1149
|
e.special && (t = e.special.find((e) => e.specialFolder.name === "image"), n = e.special.find((e) => e.specialFolder.name === "readme"), t && (t.webDavUrl = decodeURI(t.webDavUrl)), n && (n.webDavUrl = decodeURI(n.webDavUrl)));
|
|
1167
|
-
let r = e.root?.deleted?.state === "trashed",
|
|
1150
|
+
let r = e.root?.deleted?.state === "trashed", a = i(e.webDavPath || X(e.id), { leadingSlash: !0 }), o = i(e.serverUrl, "dav", a), s = i(e.webDavTrashPath || un(e.id), { leadingSlash: !0 }), c = i(e.serverUrl, "dav", s), l = {
|
|
1168
1151
|
id: e.id,
|
|
1169
1152
|
fileId: e.id,
|
|
1170
1153
|
storageId: e.id,
|
|
@@ -1173,8 +1156,8 @@ function Z(e) {
|
|
|
1173
1156
|
description: e.description,
|
|
1174
1157
|
extension: "",
|
|
1175
1158
|
path: "/",
|
|
1176
|
-
webDavPath:
|
|
1177
|
-
webDavTrashPath:
|
|
1159
|
+
webDavPath: a,
|
|
1160
|
+
webDavTrashPath: s,
|
|
1178
1161
|
driveAlias: e.driveAlias,
|
|
1179
1162
|
driveType: e.driveType,
|
|
1180
1163
|
type: "space",
|
|
@@ -1221,10 +1204,10 @@ function Z(e) {
|
|
|
1221
1204
|
return this.graphPermissions?.includes(G.createPermissions);
|
|
1222
1205
|
},
|
|
1223
1206
|
canEditImage: function() {
|
|
1224
|
-
return this.disabled
|
|
1207
|
+
return !this.disabled && this.graphPermissions?.includes(G.deletePermissions);
|
|
1225
1208
|
},
|
|
1226
1209
|
canEditReadme: function() {
|
|
1227
|
-
return this.disabled
|
|
1210
|
+
return !this.disabled && this.graphPermissions?.includes(G.deletePermissions);
|
|
1228
1211
|
},
|
|
1229
1212
|
canRestoreFromTrashbin: function() {
|
|
1230
1213
|
return this.graphPermissions?.includes(G.updateDeleted);
|
|
@@ -1232,8 +1215,8 @@ function Z(e) {
|
|
|
1232
1215
|
canDeleteFromTrashBin: function({ user: e } = {}) {
|
|
1233
1216
|
return Y(this) && this.isOwner(e) ? !0 : this.graphPermissions?.includes(G.deletePermissions);
|
|
1234
1217
|
},
|
|
1235
|
-
canListVersions: function(
|
|
1236
|
-
return
|
|
1218
|
+
canListVersions: function() {
|
|
1219
|
+
return !1;
|
|
1237
1220
|
},
|
|
1238
1221
|
canCreate: function() {
|
|
1239
1222
|
return !0;
|
|
@@ -1256,23 +1239,23 @@ function Z(e) {
|
|
|
1256
1239
|
},
|
|
1257
1240
|
getDomSelector: () => B(e.id),
|
|
1258
1241
|
getDriveAliasAndItem({ path: e }) {
|
|
1259
|
-
return
|
|
1242
|
+
return i(this.driveAlias, e, { leadingSlash: !1 });
|
|
1260
1243
|
},
|
|
1261
1244
|
getWebDavUrl({ path: e }) {
|
|
1262
|
-
return
|
|
1245
|
+
return i(o, e);
|
|
1263
1246
|
},
|
|
1264
1247
|
getWebDavTrashUrl({ path: e }) {
|
|
1265
|
-
return
|
|
1248
|
+
return i(c, e);
|
|
1266
1249
|
},
|
|
1267
1250
|
isOwner(e) {
|
|
1268
1251
|
return e?.id === this.owner?.id;
|
|
1269
1252
|
}
|
|
1270
1253
|
};
|
|
1271
|
-
return Object.defineProperty(
|
|
1254
|
+
return Object.defineProperty(l, "nodeId", { get() {
|
|
1272
1255
|
return H(this.id);
|
|
1273
|
-
} }),
|
|
1256
|
+
} }), l;
|
|
1274
1257
|
}
|
|
1275
|
-
function
|
|
1258
|
+
function gn(e) {
|
|
1276
1259
|
return {
|
|
1277
1260
|
id: e.spaceImageData.id,
|
|
1278
1261
|
name: e.spaceImageData.name,
|
|
@@ -1280,17 +1263,17 @@ function xn(e) {
|
|
|
1280
1263
|
extension: U({ name: e.spaceImageData.name }),
|
|
1281
1264
|
mimeType: e.spaceImageData.file.mimeType,
|
|
1282
1265
|
type: "file",
|
|
1283
|
-
webDavPath:
|
|
1266
|
+
webDavPath: i(e.webDavPath, ".space", e.spaceImageData.name),
|
|
1284
1267
|
hasPreview: () => !0,
|
|
1285
1268
|
canDownload: () => !0
|
|
1286
1269
|
};
|
|
1287
1270
|
}
|
|
1288
1271
|
//#endregion
|
|
1289
1272
|
//#region src/helpers/share/functions.ts
|
|
1290
|
-
var Q = (e) => Object.hasOwn(e, "sharedWith"),
|
|
1273
|
+
var Q = (e) => Object.hasOwn(e, "sharedWith"), _n = (e) => Q(e) && e.outgoing, vn = (e) => Q(e) && !e.outgoing, yn = (e) => Object.hasOwn(e, "role"), bn = (e) => !Object.hasOwn(e, "role"), xn = ({ driveItem: e, graphRoles: t }) => e.remoteItem?.permissions.reduce((e, n) => (n.roles?.forEach((n) => {
|
|
1291
1274
|
let r = t[n];
|
|
1292
1275
|
r && !e.some(({ id: e }) => e === r.id) && e.push(r);
|
|
1293
|
-
}), e), []),
|
|
1276
|
+
}), e), []), Sn = ({ driveItem: e, shareRoles: t }) => {
|
|
1294
1277
|
if (!t.length) {
|
|
1295
1278
|
let t = e.remoteItem?.permissions.reduce((e, t) => {
|
|
1296
1279
|
let n = t["@libre.graph.permissions.actions"];
|
|
@@ -1303,25 +1286,25 @@ var Q = (e) => Object.hasOwn(e, "sharedWith"), Sn = (e) => Q(e) && e.outgoing, C
|
|
|
1303
1286
|
}), e), []);
|
|
1304
1287
|
return [...new Set(n)];
|
|
1305
1288
|
};
|
|
1306
|
-
function
|
|
1307
|
-
let r = e.name || e.remoteItem.name,
|
|
1289
|
+
function Cn({ driveItem: e, graphRoles: t, serverUrl: n }) {
|
|
1290
|
+
let r = e.name || e.remoteItem.name, a = V(e.remoteItem.id), o = e.remoteItem.permissions.map((e) => {
|
|
1308
1291
|
let { grantedToV2: t } = e;
|
|
1309
1292
|
return {
|
|
1310
1293
|
...t.group || t.user,
|
|
1311
1294
|
shareType: $(e)
|
|
1312
1295
|
};
|
|
1313
|
-
}),
|
|
1296
|
+
}), s = e.remoteItem.permissions.reduce((e, t) => {
|
|
1314
1297
|
let n = t.invitation.invitedBy.user;
|
|
1315
1298
|
return e.some(({ id: e }) => e === n.id) || e.push(n), e;
|
|
1316
|
-
}, []),
|
|
1317
|
-
|
|
1318
|
-
let
|
|
1299
|
+
}, []), c = Kt(e.remoteItem.permissions.map($));
|
|
1300
|
+
s.some((e) => e["@libre.graph.userType"] === "Federated") && (c = [J.remote.value]);
|
|
1301
|
+
let l = xn({
|
|
1319
1302
|
driveItem: e,
|
|
1320
1303
|
graphRoles: t
|
|
1321
|
-
}),
|
|
1304
|
+
}), u = Sn({
|
|
1322
1305
|
driveItem: e,
|
|
1323
|
-
shareRoles:
|
|
1324
|
-
}),
|
|
1306
|
+
shareRoles: l
|
|
1307
|
+
}), d = {
|
|
1325
1308
|
id: e.id,
|
|
1326
1309
|
remoteItemId: e.remoteItem.id,
|
|
1327
1310
|
driveId: e.parentReference?.driveId,
|
|
@@ -1329,45 +1312,46 @@ function On({ driveItem: e, graphRoles: t, serverUrl: n }) {
|
|
|
1329
1312
|
name: r,
|
|
1330
1313
|
fileId: e.remoteItem.id,
|
|
1331
1314
|
size: e.size,
|
|
1332
|
-
storageId:
|
|
1315
|
+
storageId: a,
|
|
1333
1316
|
parentFolderId: e.parentReference?.id,
|
|
1334
1317
|
sdate: e.remoteItem.permissions[0].createdDateTime,
|
|
1335
1318
|
tags: [],
|
|
1336
1319
|
webDavPath: X(e.remoteItem.id, "/"),
|
|
1337
|
-
sharedBy:
|
|
1320
|
+
sharedBy: s,
|
|
1338
1321
|
owner: e.remoteItem.createdBy?.user,
|
|
1339
|
-
sharedWith:
|
|
1340
|
-
shareTypes:
|
|
1322
|
+
sharedWith: o,
|
|
1323
|
+
shareTypes: c,
|
|
1341
1324
|
isFolder: !!e.folder,
|
|
1342
1325
|
type: e.folder ? "folder" : "file",
|
|
1343
1326
|
mimeType: e.file?.mimeType || "httpd/unix-directory",
|
|
1344
1327
|
mdate: e.lastModifiedDateTime ? new Date(e.lastModifiedDateTime).toUTCString() : void 0,
|
|
1345
1328
|
syncEnabled: e["@client.synchronize"],
|
|
1346
1329
|
hidden: e["@UI.Hidden"],
|
|
1347
|
-
shareRoles:
|
|
1348
|
-
sharePermissions:
|
|
1330
|
+
shareRoles: l,
|
|
1331
|
+
sharePermissions: u,
|
|
1349
1332
|
outgoing: !1,
|
|
1350
|
-
privateLink:
|
|
1333
|
+
privateLink: i(n, "f", e.remoteItem.id),
|
|
1351
1334
|
hasPreview: () => !!e.thumbnails,
|
|
1352
1335
|
canRename: () => e["@client.synchronize"],
|
|
1353
|
-
canDownload: () =>
|
|
1354
|
-
canUpload: () =>
|
|
1355
|
-
canCreate: () =>
|
|
1356
|
-
canBeDeleted: () =>
|
|
1357
|
-
canEditTags: () =>
|
|
1336
|
+
canDownload: () => u.includes(G.readContent),
|
|
1337
|
+
canUpload: () => u.includes(G.createUpload),
|
|
1338
|
+
canCreate: () => u.includes(G.createChildren),
|
|
1339
|
+
canBeDeleted: () => u.includes(G.deleteStandard),
|
|
1340
|
+
canEditTags: () => u.includes(G.createUpload),
|
|
1341
|
+
canListVersions: () => !e.folder && u.includes(G.readVersions),
|
|
1358
1342
|
isMounted: () => !1,
|
|
1359
1343
|
isReceivedShare: () => !0,
|
|
1360
1344
|
canShare: () => !1,
|
|
1361
1345
|
isShareRoot: () => !0,
|
|
1362
1346
|
getDomSelector: () => B(e.id)
|
|
1363
1347
|
};
|
|
1364
|
-
return
|
|
1348
|
+
return d.extension = U(d), d;
|
|
1365
1349
|
}
|
|
1366
|
-
function
|
|
1367
|
-
let r = V(e.id),
|
|
1350
|
+
function wn({ driveItem: e, user: t, serverUrl: n }) {
|
|
1351
|
+
let r = V(e.id), a = i(e.parentReference.path, e.name), o = {
|
|
1368
1352
|
id: e.id,
|
|
1369
1353
|
driveId: e.parentReference?.driveId,
|
|
1370
|
-
path:
|
|
1354
|
+
path: a,
|
|
1371
1355
|
name: e.name,
|
|
1372
1356
|
fileId: e.id,
|
|
1373
1357
|
size: e.size,
|
|
@@ -1375,7 +1359,7 @@ function kn({ driveItem: e, user: t, serverUrl: n }) {
|
|
|
1375
1359
|
parentFolderId: e.parentReference?.id,
|
|
1376
1360
|
sdate: e.permissions[0].createdDateTime,
|
|
1377
1361
|
tags: [],
|
|
1378
|
-
webDavPath: X(r,
|
|
1362
|
+
webDavPath: X(r, a),
|
|
1379
1363
|
sharedBy: [{
|
|
1380
1364
|
id: t.id,
|
|
1381
1365
|
displayName: t.displayName
|
|
@@ -1401,7 +1385,7 @@ function kn({ driveItem: e, user: t, serverUrl: n }) {
|
|
|
1401
1385
|
type: e.folder ? "folder" : "file",
|
|
1402
1386
|
mimeType: e.file?.mimeType || "httpd/unix-directory",
|
|
1403
1387
|
outgoing: !0,
|
|
1404
|
-
privateLink:
|
|
1388
|
+
privateLink: i(n, "f", e.id),
|
|
1405
1389
|
hasPreview: () => !!e.thumbnails,
|
|
1406
1390
|
canRename: () => !0,
|
|
1407
1391
|
canDownload: () => !0,
|
|
@@ -1409,15 +1393,16 @@ function kn({ driveItem: e, user: t, serverUrl: n }) {
|
|
|
1409
1393
|
canCreate: () => !0,
|
|
1410
1394
|
canBeDeleted: () => !0,
|
|
1411
1395
|
canEditTags: () => !0,
|
|
1396
|
+
canListVersions: () => !e.folder,
|
|
1412
1397
|
isMounted: () => !1,
|
|
1413
1398
|
isShareRoot: () => !1,
|
|
1414
1399
|
isReceivedShare: () => !0,
|
|
1415
1400
|
canShare: () => !0,
|
|
1416
1401
|
getDomSelector: () => B(e.id)
|
|
1417
1402
|
};
|
|
1418
|
-
return
|
|
1403
|
+
return o.extension = U(o), o;
|
|
1419
1404
|
}
|
|
1420
|
-
function
|
|
1405
|
+
function Tn({ graphPermission: e, graphRoles: t, resourceId: n, indirect: r = !1 }) {
|
|
1421
1406
|
let i = t[e.roles?.[0]], a = e.invitation?.invitedBy?.user;
|
|
1422
1407
|
return {
|
|
1423
1408
|
id: e.id,
|
|
@@ -1435,7 +1420,7 @@ function An({ graphPermission: e, graphRoles: t, resourceId: n, indirect: r = !1
|
|
|
1435
1420
|
expirationDateTime: e.expirationDateTime
|
|
1436
1421
|
};
|
|
1437
1422
|
}
|
|
1438
|
-
function
|
|
1423
|
+
function En({ graphPermission: e, resourceId: t, indirect: n = !1 }) {
|
|
1439
1424
|
let r = e.invitation?.invitedBy?.user;
|
|
1440
1425
|
return {
|
|
1441
1426
|
id: e.id,
|
|
@@ -1460,4 +1445,4 @@ function $({ link: e, grantedToV2: t }) {
|
|
|
1460
1445
|
return e ? J.link.value : t?.group ? J.group.value : t?.user?.["@libre.graph.userType"] === "Federated" ? J.remote.value : J.user.value;
|
|
1461
1446
|
}
|
|
1462
1447
|
//#endregion
|
|
1463
|
-
export {
|
|
1448
|
+
export { J as A, Yt as B, cn as C, sn as D, ln as E, U as F, ne as G, Jt as H, Zt as I, f as J, b as K, H as L, tn as M, en as N, an as O, B as P, Qt as R, nn as S, on as T, g as U, $t as V, h as W, un as _, Sn as a, fn as b, vn as c, Q as d, mn as f, X as g, gn as h, wn as i, G as j, q as k, bn as l, Z as m, Cn as n, xn as o, hn as p, p as q, En as r, yn as s, Tn as t, _n as u, dn as v, Y as w, rn as x, pn as y, V as z };
|