@opencloud-eu/web-client 4.0.0 → 4.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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index-DAa_DzDf.cjs");const r=require("../index-YVg9jNP5.cjs"),e=require("../functions-DP8s29Wg.cjs");exports.webdav=r.webdav;exports.DavMethod=e.DavMethod;exports.DavPermission=e.DavPermission;exports.DavProperties=e.DavProperties;exports.DavProperty=e.DavProperty;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../index-w54SVXTg.cjs");const r=require("../index-CAp89HBO.cjs"),e=require("../functions-Bp-DjU7_.cjs");exports.webdav=r.webdav;exports.DavMethod=e.DavMethod;exports.DavPermission=e.DavPermission;exports.DavProperties=e.DavProperties;exports.DavProperty=e.DavProperty;
@@ -1,6 +1,6 @@
1
- import "../index-BIL0cW_q.js";
2
- import { w as e } from "../index-bmR3iLuG.js";
3
- import { J as t, K as p, H as v, I as i } from "../functions-DnZZKUk0.js";
1
+ import "../index-2zDycGQj.js";
2
+ import { w as e } from "../index-BZHg3VRz.js";
3
+ import { K as t, L as p, I as v, J as i } from "../functions-DK4H9weO.js";
4
4
  export {
5
5
  t as DavMethod,
6
6
  p as DavPermission,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-CcmRJ1qB.cjs"),n=require("./web-client/ocs.cjs"),o=require("./index-YVg9jNP5.cjs"),e=require("./functions-DP8s29Wg.cjs"),S=require("./toString-CgHWCW2N.cjs"),l=function*(a){return yield a},h=({message:a,statusCode:t,xReqId:s})=>{const c=new Response(void 0,{headers:{"x-request-id":s},status:t});return new o.HttpError(a,c,t)};class d{static Read=1;static Update=2;static Create=4;static Delete=8;static Share=16}const b=({axiosClient:a,baseURI:t})=>{const s=()=>{const c=a.defaults?.headers?.Authorization,i=a.defaults?.headers?.["Accept-Language"],u=a.defaults?.headers?.["Initiator-ID"];return{...c&&{Authorization:c.toString()},...i&&{"Accept-Language":i.toString()},...u&&{"Initiator-ID":u.toString()}}};return{graph:r.graph(t,a),ocs:n.ocs(t,a),webdav:o.webdav(t,s)}};exports.buildCollaboratorShare=r.buildCollaboratorShare;exports.buildIncomingShareResource=r.buildIncomingShareResource;exports.buildLinkShare=r.buildLinkShare;exports.buildOutgoingShareResource=r.buildOutgoingShareResource;exports.getShareResourcePermissions=r.getShareResourcePermissions;exports.getShareResourceRoles=r.getShareResourceRoles;exports.graph=r.graph;exports.isCollaboratorShare=r.isCollaboratorShare;exports.isIncomingShareResource=r.isIncomingShareResource;exports.isLinkShare=r.isLinkShare;exports.isOutgoingShareResource=r.isOutgoingShareResource;exports.isShareResource=r.isShareResource;exports.ocs=n.ocs;exports.DavHttpError=o.DavHttpError;exports.HttpError=o.HttpError;exports.encodePath=o.encodePath;exports.webdav=o.webdav;exports.GraphSharePermission=e.GraphSharePermission;exports.OCM_PROVIDER_ID=e.OCM_PROVIDER_ID;exports.SHARE_JAIL_ID=e.SHARE_JAIL_ID;exports.ShareType=e.ShareType;exports.ShareTypes=e.ShareTypes;exports.buildDeletedResource=e.buildDeletedResource;exports.buildPublicSpaceResource=e.buildPublicSpaceResource;exports.buildResource=e.buildResource;exports.buildShareSpaceResource=e.buildShareSpaceResource;exports.buildSpace=e.buildSpace;exports.buildSpaceImageResource=e.buildSpaceImageResource;exports.buildWebDavOcmPath=e.buildWebDavOcmPath;exports.buildWebDavPublicPath=e.buildWebDavPublicPath;exports.buildWebDavSpacesPath=e.buildWebDavSpacesPath;exports.buildWebDavSpacesTrashPath=e.buildWebDavSpacesTrashPath;exports.extractDomSelector=e.extractDomSelector;exports.extractExtensionFromFile=e.extractExtensionFromFile;exports.extractNameWithoutExtension=e.extractNameWithoutExtension;exports.extractNodeId=e.extractNodeId;exports.extractParentFolderName=e.extractParentFolderName;exports.extractStorageId=e.extractStorageId;exports.getRelativeSpecialFolderSpacePath=e.getRelativeSpecialFolderSpacePath;exports.isManager=e.isManager;exports.isMountPointSpaceResource=e.isMountPointSpaceResource;exports.isPersonalSpaceResource=e.isPersonalSpaceResource;exports.isProjectSpaceResource=e.isProjectSpaceResource;exports.isPublicSpaceResource=e.isPublicSpaceResource;exports.isSearchResource=e.isSearchResource;exports.isShareRoot=e.isShareRoot;exports.isShareSpaceResource=e.isShareSpaceResource;exports.isSpaceResource=e.isSpaceResource;exports.isTrashResource=e.isTrashResource;exports.urlJoin=S.urlJoin;exports.SharePermissionBit=d;exports.call=l;exports.client=b;exports.createHttpError=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-B21Ll1ii.cjs"),n=require("./web-client/ocs.cjs"),o=require("./index-CAp89HBO.cjs"),e=require("./functions-Bp-DjU7_.cjs"),S=require("./toString-CgHWCW2N.cjs"),l=function*(a){return yield a},h=({message:a,statusCode:t,xReqId:s})=>{const c=new Response(void 0,{headers:{"x-request-id":s},status:t});return new o.HttpError(a,c,t)};class d{static Read=1;static Update=2;static Create=4;static Delete=8;static Share=16}const b=({axiosClient:a,baseURI:t})=>{const s=()=>{const c=a.defaults?.headers?.Authorization,i=a.defaults?.headers?.["Accept-Language"],u=a.defaults?.headers?.["Initiator-ID"];return{...c&&{Authorization:c.toString()},...i&&{"Accept-Language":i.toString()},...u&&{"Initiator-ID":u.toString()}}};return{graph:r.graph(t,a),ocs:n.ocs(t,a),webdav:o.webdav(t,s)}};exports.buildCollaboratorShare=r.buildCollaboratorShare;exports.buildIncomingShareResource=r.buildIncomingShareResource;exports.buildLinkShare=r.buildLinkShare;exports.buildOutgoingShareResource=r.buildOutgoingShareResource;exports.getShareResourcePermissions=r.getShareResourcePermissions;exports.getShareResourceRoles=r.getShareResourceRoles;exports.graph=r.graph;exports.isCollaboratorShare=r.isCollaboratorShare;exports.isIncomingShareResource=r.isIncomingShareResource;exports.isLinkShare=r.isLinkShare;exports.isOutgoingShareResource=r.isOutgoingShareResource;exports.isShareResource=r.isShareResource;exports.ocs=n.ocs;exports.DavHttpError=o.DavHttpError;exports.HttpError=o.HttpError;exports.encodePath=o.encodePath;exports.webdav=o.webdav;exports.GraphSharePermission=e.GraphSharePermission;exports.OCM_PROVIDER_ID=e.OCM_PROVIDER_ID;exports.SHARE_JAIL_ID=e.SHARE_JAIL_ID;exports.ShareType=e.ShareType;exports.ShareTypes=e.ShareTypes;exports.buildDeletedResource=e.buildDeletedResource;exports.buildPublicSpaceResource=e.buildPublicSpaceResource;exports.buildResource=e.buildResource;exports.buildShareSpaceResource=e.buildShareSpaceResource;exports.buildSpace=e.buildSpace;exports.buildSpaceImageResource=e.buildSpaceImageResource;exports.buildWebDavOcmPath=e.buildWebDavOcmPath;exports.buildWebDavPublicPath=e.buildWebDavPublicPath;exports.buildWebDavSpacesPath=e.buildWebDavSpacesPath;exports.buildWebDavSpacesTrashPath=e.buildWebDavSpacesTrashPath;exports.extractDomSelector=e.extractDomSelector;exports.extractExtensionFromFile=e.extractExtensionFromFile;exports.extractNameWithoutExtension=e.extractNameWithoutExtension;exports.extractNodeId=e.extractNodeId;exports.extractParentFolderName=e.extractParentFolderName;exports.extractStorageId=e.extractStorageId;exports.getRelativeSpecialFolderSpacePath=e.getRelativeSpecialFolderSpacePath;exports.getSpaceManagers=e.getSpaceManagers;exports.isManager=e.isManager;exports.isMountPointSpaceResource=e.isMountPointSpaceResource;exports.isPersonalSpaceResource=e.isPersonalSpaceResource;exports.isProjectSpaceResource=e.isProjectSpaceResource;exports.isPublicSpaceResource=e.isPublicSpaceResource;exports.isSearchResource=e.isSearchResource;exports.isShareRoot=e.isShareRoot;exports.isShareSpaceResource=e.isShareSpaceResource;exports.isSpaceResource=e.isSpaceResource;exports.isTrashResource=e.isTrashResource;exports.urlJoin=S.urlJoin;exports.SharePermissionBit=d;exports.call=l;exports.client=b;exports.createHttpError=h;
@@ -1,10 +1,10 @@
1
- import { g as c } from "./index-CiqYiARd.js";
2
- import { k as P, h as D, l as f, j as I, f as v, e as x, c as H, b as w, d as A, a as E, i as O } from "./index-CiqYiARd.js";
1
+ import { g as c } from "./index-BMRpHyp4.js";
2
+ import { k as P, h as D, l as f, j as I, f as v, e as x, c as H, b as w, d as A, a as E, i as O } from "./index-BMRpHyp4.js";
3
3
  import { ocs as i } from "./web-client/ocs.js";
4
- import { H as u, w as n } from "./index-bmR3iLuG.js";
5
- import { D as W, e as k } from "./index-bmR3iLuG.js";
6
- import { G as F, O as T, w as _, S as j, n as z, m as M, s as N, l as q, t as B, u as G, v as J, a as V, b as C, o as K, p as Q, e as X, h as Y, g as Z, f as $, j as U, d as ee, q as ae, r as se, B as re, y as te, z as oe, C as ce, c as ie, k as ue, A as ne, x as de, i as he } from "./functions-DnZZKUk0.js";
7
- import { u as le } from "./toString-XlfBosfh.js";
4
+ import { H as u, w as n } from "./index-BZHg3VRz.js";
5
+ import { D as W, e as k } from "./index-BZHg3VRz.js";
6
+ import { G as F, O as M, x as T, S as _, n as j, m as z, t as N, l as q, u as B, v as G, w as J, a as V, b as C, o as K, p as Q, e as X, h as Y, g as Z, f as $, j as U, d as ee, q as ae, s as se, r as re, C as te, z as oe, A as ce, D as ie, c as ue, k as ne, B as Se, y as de, i as he } from "./functions-DK4H9weO.js";
7
+ import { u as pe } from "./toString-XlfBosfh.js";
8
8
  const l = function* (e) {
9
9
  return yield e;
10
10
  }, p = ({
@@ -18,14 +18,14 @@ const l = function* (e) {
18
18
  });
19
19
  return new u(e, s, a);
20
20
  };
21
- class b {
21
+ class g {
22
22
  static Read = 1;
23
23
  static Update = 2;
24
24
  static Create = 4;
25
25
  static Delete = 8;
26
26
  static Share = 16;
27
27
  }
28
- const R = ({ axiosClient: e, baseURI: a }) => {
28
+ const b = ({ axiosClient: e, baseURI: a }) => {
29
29
  const r = () => {
30
30
  const s = e.defaults?.headers?.Authorization, t = e.defaults?.headers?.["Accept-Language"], o = e.defaults?.headers?.["Initiator-ID"];
31
31
  return {
@@ -44,13 +44,13 @@ export {
44
44
  W as DavHttpError,
45
45
  F as GraphSharePermission,
46
46
  u as HttpError,
47
- T as OCM_PROVIDER_ID,
48
- _ as SHARE_JAIL_ID,
49
- b as SharePermissionBit,
50
- j as ShareType,
51
- z as ShareTypes,
47
+ M as OCM_PROVIDER_ID,
48
+ T as SHARE_JAIL_ID,
49
+ g as SharePermissionBit,
50
+ _ as ShareType,
51
+ j as ShareTypes,
52
52
  P as buildCollaboratorShare,
53
- M as buildDeletedResource,
53
+ z as buildDeletedResource,
54
54
  D as buildIncomingShareResource,
55
55
  f as buildLinkShare,
56
56
  I as buildOutgoingShareResource,
@@ -64,7 +64,7 @@ export {
64
64
  K as buildWebDavSpacesPath,
65
65
  Q as buildWebDavSpacesTrashPath,
66
66
  l as call,
67
- R as client,
67
+ b as client,
68
68
  p as createHttpError,
69
69
  k as encodePath,
70
70
  X as extractDomSelector,
@@ -76,23 +76,24 @@ export {
76
76
  ae as getRelativeSpecialFolderSpacePath,
77
77
  v as getShareResourcePermissions,
78
78
  x as getShareResourceRoles,
79
+ se as getSpaceManagers,
79
80
  c as graph,
80
81
  H as isCollaboratorShare,
81
82
  w as isIncomingShareResource,
82
83
  A as isLinkShare,
83
- se as isManager,
84
- re as isMountPointSpaceResource,
84
+ re as isManager,
85
+ te as isMountPointSpaceResource,
85
86
  E as isOutgoingShareResource,
86
- te as isPersonalSpaceResource,
87
- oe as isProjectSpaceResource,
88
- ce as isPublicSpaceResource,
89
- ie as isSearchResource,
87
+ oe as isPersonalSpaceResource,
88
+ ce as isProjectSpaceResource,
89
+ ie as isPublicSpaceResource,
90
+ ue as isSearchResource,
90
91
  O as isShareResource,
91
- ue as isShareRoot,
92
- ne as isShareSpaceResource,
92
+ ne as isShareRoot,
93
+ Se as isShareSpaceResource,
93
94
  de as isSpaceResource,
94
95
  he as isTrashResource,
95
96
  i as ocs,
96
- le as urlJoin,
97
+ pe as urlJoin,
97
98
  n as webdav
98
99
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencloud-eu/web-client",
3
- "version": "4.0.0",
3
+ "version": "4.2.0",
4
4
  "description": "OpenCloud web client",
5
5
  "license": "AGPL-3.0",
6
6
  "private": false,
@@ -1 +0,0 @@
1
- "use strict";const b=require("./toString-CgHWCW2N.cjs"),Ie=require("./index-D_NPkUGY.cjs");function K(e,r=""){return`/public-files/${e}/${r}`.split("/").filter(Boolean).join("/")}function Y(e,r=""){return`/ocm/${e}/${r}`.split("/").filter(Boolean).join("/")}var U,z;function we(){if(z)return U;z=1;function e(s){if(typeof s!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(s))}function r(s,t){for(var n="",l=0,c=-1,o=0,u,f=0;f<=s.length;++f){if(f<s.length)u=s.charCodeAt(f);else{if(u===47)break;u=47}if(u===47){if(!(c===f-1||o===1))if(c!==f-1&&o===2){if(n.length<2||l!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var p=n.lastIndexOf("/");if(p!==n.length-1){p===-1?(n="",l=0):(n=n.slice(0,p),l=n.length-1-n.lastIndexOf("/")),c=f,o=0;continue}}else if(n.length===2||n.length===1){n="",l=0,c=f,o=0;continue}}t&&(n.length>0?n+="/..":n="..",l=2)}else n.length>0?n+="/"+s.slice(c+1,f):n=s.slice(c+1,f),l=f-c-1;c=f,o=0}else u===46&&o!==-1?++o:o=-1}return n}function i(s,t){var n=t.dir||t.root,l=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+l:n+s+l:l}var d={resolve:function(){for(var t="",n=!1,l,c=arguments.length-1;c>=-1&&!n;c--){var o;c>=0?o=arguments[c]:(l===void 0&&(l=Ie.process$1.cwd()),o=l),e(o),o.length!==0&&(t=o+"/"+t,n=o.charCodeAt(0)===47)}return t=r(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(t){if(e(t),t.length===0)return".";var n=t.charCodeAt(0)===47,l=t.charCodeAt(t.length-1)===47;return t=r(t,!n),t.length===0&&!n&&(t="."),t.length>0&&l&&(t+="/"),n?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&t.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var t,n=0;n<arguments.length;++n){var l=arguments[n];e(l),l.length>0&&(t===void 0?t=l:t+="/"+l)}return t===void 0?".":d.normalize(t)},relative:function(t,n){if(e(t),e(n),t===n||(t=d.resolve(t),n=d.resolve(n),t===n))return"";for(var l=1;l<t.length&&t.charCodeAt(l)===47;++l);for(var c=t.length,o=c-l,u=1;u<n.length&&n.charCodeAt(u)===47;++u);for(var f=n.length,p=f-u,v=o<p?o:p,g=-1,h=0;h<=v;++h){if(h===v){if(p>v){if(n.charCodeAt(u+h)===47)return n.slice(u+h+1);if(h===0)return n.slice(u+h)}else o>v&&(t.charCodeAt(l+h)===47?g=h:h===0&&(g=0));break}var j=t.charCodeAt(l+h),De=n.charCodeAt(u+h);if(j!==De)break;j===47&&(g=h)}var P="";for(h=l+g+1;h<=c;++h)(h===c||t.charCodeAt(h)===47)&&(P.length===0?P+="..":P+="/..");return P.length>0?P+n.slice(u+g):(u+=g,n.charCodeAt(u)===47&&++u,n.slice(u))},_makeLong:function(t){return t},dirname:function(t){if(e(t),t.length===0)return".";for(var n=t.charCodeAt(0),l=n===47,c=-1,o=!0,u=t.length-1;u>=1;--u)if(n=t.charCodeAt(u),n===47){if(!o){c=u;break}}else o=!1;return c===-1?l?"/":".":l&&c===1?"//":t.slice(0,c)},basename:function(t,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');e(t);var l=0,c=-1,o=!0,u;if(n!==void 0&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var f=n.length-1,p=-1;for(u=t.length-1;u>=0;--u){var v=t.charCodeAt(u);if(v===47){if(!o){l=u+1;break}}else p===-1&&(o=!1,p=u+1),f>=0&&(v===n.charCodeAt(f)?--f===-1&&(c=u):(f=-1,c=p))}return l===c?c=p:c===-1&&(c=t.length),t.slice(l,c)}else{for(u=t.length-1;u>=0;--u)if(t.charCodeAt(u)===47){if(!o){l=u+1;break}}else c===-1&&(o=!1,c=u+1);return c===-1?"":t.slice(l,c)}},extname:function(t){e(t);for(var n=-1,l=0,c=-1,o=!0,u=0,f=t.length-1;f>=0;--f){var p=t.charCodeAt(f);if(p===47){if(!o){l=f+1;break}continue}c===-1&&(o=!1,c=f+1),p===46?n===-1?n=f:u!==1&&(u=1):n!==-1&&(u=-1)}return n===-1||c===-1||u===0||u===1&&n===c-1&&n===l+1?"":t.slice(n,c)},format:function(t){if(t===null||typeof t!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return i("/",t)},parse:function(t){e(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return n;var l=t.charCodeAt(0),c=l===47,o;c?(n.root="/",o=1):o=0;for(var u=-1,f=0,p=-1,v=!0,g=t.length-1,h=0;g>=o;--g){if(l=t.charCodeAt(g),l===47){if(!v){f=g+1;break}continue}p===-1&&(v=!1,p=g+1),l===46?u===-1?u=g:h!==1&&(h=1):u!==-1&&(h=-1)}return u===-1||p===-1||h===0||h===1&&u===p-1&&u===f+1?p!==-1&&(f===0&&c?n.base=n.name=t.slice(1,p):n.base=n.name=t.slice(f,p)):(f===0&&c?(n.name=t.slice(1,u),n.base=t.slice(1,p)):(n.name=t.slice(f,u),n.base=t.slice(f,p)),n.ext=t.slice(u,p)),f>0?n.dir=t.slice(0,f-1):c&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};return d.posix=d,U=d,U}var T=we();const W=b.getDefaultExportFromCjs(T);class y{static Shared="S";static Shareable="R";static Mounted="M";static Deletable="D";static Renameable="N";static Moveable="V";static Updateable="NV";static FileUpdateable="W";static FolderCreateable="CK";static Deny="Z";static SecureView="X"}var Q=(e=>(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))(Q||{});const C=e=>({value:e,type:null}),Le=e=>C(e),m=e=>C(e),w=e=>C(e),ke=e=>C(e),Te={Permissions:m("permissions"),IsFavorite:w("favorite"),FileId:m("fileid"),FileParent:m("file-parent"),Name:m("name"),OwnerId:m("owner-id"),OwnerDisplayName:m("owner-display-name"),PrivateLink:m("privatelink"),ContentLength:w("getcontentlength"),ContentSize:w("size"),LastModifiedDate:m("getlastmodified"),Tags:Le("tags"),Audio:{value:"audio",type:null},Location:{value:"location",type:null},Image:{value:"image",type:null},Photo:{value:"photo",type:null},ETag:m("getetag"),MimeType:m("getcontenttype"),ResourceType:ke("resourcetype"),LockDiscovery:{value:"lockdiscovery",type:null},LockOwner:m("owner"),LockTime:m("locktime"),ActiveLock:{value:"activelock",type:null},DownloadURL:m("downloadURL"),Highlights:m("highlights"),MetaPathForUser:m("meta-path-for-user"),RemoteItemId:m("remote-item-id"),HasPreview:w("has-preview"),ShareId:m("shareid"),ShareRoot:m("shareroot"),ShareTypes:{value:"share-types",type:null},SharePermissions:m("share-permissions"),TrashbinOriginalFilename:m("trashbin-original-filename"),TrashbinOriginalLocation:m("trashbin-original-location"),TrashbinDeletedDate:m("trashbin-delete-datetime"),PublicLinkItemType:m("public-link-item-type"),PublicLinkPermission:m("public-link-permission"),PublicLinkExpiration:m("public-link-expiration"),PublicLinkShareDate:m("public-link-share-datetime"),PublicLinkShareOwner:m("public-link-share-owner")},a=Object.fromEntries(Object.entries(Te).map(([e,r])=>[e,r.value]));class ${static Default=[a.Permissions,a.IsFavorite,a.FileId,a.FileParent,a.Name,a.LockDiscovery,a.ActiveLock,a.OwnerId,a.OwnerDisplayName,a.RemoteItemId,a.ShareRoot,a.ShareTypes,a.PrivateLink,a.ContentLength,a.ContentSize,a.LastModifiedDate,a.ETag,a.MimeType,a.ResourceType,a.DownloadURL,a.Tags,a.Audio,a.Location,a.Image,a.Photo,a.HasPreview];static PublicLink=$.Default.concat([a.PublicLinkItemType,a.PublicLinkPermission,a.PublicLinkExpiration,a.PublicLinkShareDate,a.PublicLinkShareOwner]);static Trashbin=[a.ContentLength,a.ResourceType,a.TrashbinOriginalLocation,a.TrashbinOriginalFilename,a.TrashbinDeletedDate,a.Permissions,a.FileParent];static DavNamespace=[a.ContentLength,a.LastModifiedDate,a.ETag,a.MimeType,a.ResourceType,a.LockDiscovery,a.ActiveLock]}function X(e){return e}function Ce(e,r,i){switch(i.length){case 0:return e.call(r);case 1:return e.call(r,i[0]);case 2:return e.call(r,i[0],i[1]);case 3:return e.call(r,i[0],i[1],i[2])}return e.apply(r,i)}var Ae=800,Oe=16,Ue=Date.now;function Ee(e){var r=0,i=0;return function(){var d=Ue(),s=Oe-(d-i);if(i=d,s>0){if(++r>=Ae)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}function Fe(e){return function(){return e}}var H=(function(){try{var e=b.getNative(Object,"defineProperty");return e({},"",{}),e}catch{}})(),_e=H?function(e,r){return H(e,"toString",{configurable:!0,enumerable:!1,value:Fe(r),writable:!0})}:X,$e=Ee(_e);function Me(e,r,i,d){for(var s=e.length,t=i+-1;++t<s;)if(r(e[t],t,e))return t;return-1}function Ne(e){return e!==e}function je(e,r,i){for(var d=i-1,s=e.length;++d<s;)if(e[d]===r)return d;return-1}function ze(e,r,i){return r===r?je(e,r,i):Me(e,Ne,i)}function G(e,r){var i=e==null?0:e.length;return!!i&&ze(e,r,0)>-1}var V=Math.max;function We(e,r,i){return r=V(r===void 0?e.length-1:r,0),function(){for(var d=arguments,s=-1,t=V(d.length-r,0),n=Array(t);++s<t;)n[s]=d[r+s];s=-1;for(var l=Array(r+1);++s<r;)l[s]=d[s];return l[r]=i(n),Ce(e,this,l)}}function He(e,r){return $e(We(e,r,X),e+"")}var Ve=9007199254740991;function Je(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ve}function Be(e){return e!=null&&Je(e.length)&&!b.isFunction(e)}function Ze(e,r,i){var d=-1,s=e.length;r<0&&(r=-r>s?0:s+r),i=i>s?s:i,i<0&&(i+=s),s=r>i?0:i-r>>>0,r>>>=0;for(var t=Array(s);++d<s;)t[d]=e[d+r];return t}function qe(e,r,i){var d=e.length;return i=i===void 0?d:i,!r&&i>=d?e:Ze(e,r,i)}var Ke="\\ud800-\\udfff",Ye="\\u0300-\\u036f",Qe="\\ufe20-\\ufe2f",Xe="\\u20d0-\\u20ff",Ge=Ye+Qe+Xe,er="\\ufe0e\\ufe0f",rr="\\u200d",tr=RegExp("["+rr+Ke+Ge+er+"]");function ee(e){return tr.test(e)}function nr(e){return e.split("")}var re="\\ud800-\\udfff",ir="\\u0300-\\u036f",ar="\\ufe20-\\ufe2f",sr="\\u20d0-\\u20ff",or=ir+ar+sr,ur="\\ufe0e\\ufe0f",lr="["+re+"]",E="["+or+"]",F="\\ud83c[\\udffb-\\udfff]",cr="(?:"+E+"|"+F+")",te="[^"+re+"]",ne="(?:\\ud83c[\\udde6-\\uddff]){2}",ie="[\\ud800-\\udbff][\\udc00-\\udfff]",dr="\\u200d",ae=cr+"?",se="["+ur+"]?",fr="(?:"+dr+"(?:"+[te,ne,ie].join("|")+")"+se+ae+")*",pr=se+ae+fr,hr="(?:"+[te+E+"?",E,ne,ie,lr].join("|")+")",mr=RegExp(F+"(?="+F+")|"+hr+pr,"g");function gr(e){return e.match(mr)||[]}function br(e){return ee(e)?gr(e):nr(e)}function vr(e){return function(r){r=b.toString(r);var i=ee(r)?br(r):void 0,d=i?i[0]:r.charAt(0),s=i?qe(i,1).join(""):r.slice(1);return d[e]()+s}}var xr=vr("toUpperCase");function yr(e){return xr(b.toString(e).toLowerCase())}function Rr(e,r,i,d){for(var s=-1,t=e==null?0:e.length;++s<t;)i=r(i,e[s],s,e);return i}function Sr(e){return function(r){return e?.[r]}}var Pr={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Dr=Sr(Pr),Ir=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,wr="\\u0300-\\u036f",Lr="\\ufe20-\\ufe2f",kr="\\u20d0-\\u20ff",Tr=wr+Lr+kr,Cr="["+Tr+"]",Ar=RegExp(Cr,"g");function Or(e){return e=b.toString(e),e&&e.replace(Ir,Dr).replace(Ar,"")}var Ur=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Er(e){return e.match(Ur)||[]}var Fr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function _r(e){return Fr.test(e)}var oe="\\ud800-\\udfff",$r="\\u0300-\\u036f",Mr="\\ufe20-\\ufe2f",Nr="\\u20d0-\\u20ff",jr=$r+Mr+Nr,ue="\\u2700-\\u27bf",le="a-z\\xdf-\\xf6\\xf8-\\xff",zr="\\xac\\xb1\\xd7\\xf7",Wr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Hr="\\u2000-\\u206f",Vr=" \\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",ce="A-Z\\xc0-\\xd6\\xd8-\\xde",Jr="\\ufe0e\\ufe0f",de=zr+Wr+Hr+Vr,fe="['’]",J="["+de+"]",Br="["+jr+"]",pe="\\d+",Zr="["+ue+"]",he="["+le+"]",me="[^"+oe+de+pe+ue+le+ce+"]",qr="\\ud83c[\\udffb-\\udfff]",Kr="(?:"+Br+"|"+qr+")",Yr="[^"+oe+"]",ge="(?:\\ud83c[\\udde6-\\uddff]){2}",be="[\\ud800-\\udbff][\\udc00-\\udfff]",R="["+ce+"]",Qr="\\u200d",B="(?:"+he+"|"+me+")",Xr="(?:"+R+"|"+me+")",Z="(?:"+fe+"(?:d|ll|m|re|s|t|ve))?",q="(?:"+fe+"(?:D|LL|M|RE|S|T|VE))?",ve=Kr+"?",xe="["+Jr+"]?",Gr="(?:"+Qr+"(?:"+[Yr,ge,be].join("|")+")"+xe+ve+")*",et="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rt="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",tt=xe+ve+Gr,nt="(?:"+[Zr,ge,be].join("|")+")"+tt,it=RegExp([R+"?"+he+"+"+Z+"(?="+[J,R,"$"].join("|")+")",Xr+"+"+q+"(?="+[J,R+B,"$"].join("|")+")",R+"?"+B+"+"+Z,R+"+"+q,rt,et,pe,nt].join("|"),"g");function at(e){return e.match(it)||[]}function st(e,r,i){return e=b.toString(e),r=r,r===void 0?_r(e)?at(e):Er(e):e.match(r)||[]}var ot="['’]",ut=RegExp(ot,"g");function lt(e){return function(r){return Rr(st(Or(r).replace(ut,"")),e,"")}}var ct=lt(function(e,r,i){return r=r.toLowerCase(),e+(i?yr(r):r)}),dt="__lodash_hash_undefined__";function ft(e){return this.__data__.set(e,dt),this}function pt(e){return this.__data__.has(e)}function I(e){var r=-1,i=e==null?0:e.length;for(this.__data__=new b.MapCache;++r<i;)this.add(e[r])}I.prototype.add=I.prototype.push=ft;I.prototype.has=pt;function _(e,r){return e.has(r)}function ht(e){return b.isObjectLike(e)&&Be(e)}var mt=Math.min;function gt(e,r,i){for(var d=G,s=e[0].length,t=e.length,n=t,l=Array(t),c=1/0,o=[];n--;){var u=e[n];c=mt(u.length,c),l[n]=s>=120&&u.length>=120?new I(n&&u):void 0}u=e[0];var f=-1,p=l[0];e:for(;++f<s&&o.length<c;){var v=u[f],g=v;if(v=v!==0?v:0,!(p?_(p,g):d(o,g))){for(n=t;--n;){var h=l[n];if(!(h?_(h,g):d(e[n],g)))continue e}p&&p.push(g),o.push(v)}}return o}function bt(e){return ht(e)?e:[]}var vt=He(function(e){var r=b.arrayMap(e,bt);return r.length&&r[0]===e[0]?gt(r):[]});const xt={complex:["tar.bz2","tar.gz","tar.xz"]},yt=e=>Object.hasOwn(e,"ddate"),Rt=e=>Object.hasOwn(e,"highlights"),A=e=>e.replace(/[^A-Za-z0-9\-_]/g,""),ye=(e,r)=>!e||typeof e!="string"?"":e.indexOf("!")>=0?e.split("!")[r]:"",Re=e=>ye(e,0),M=e=>ye(e,1),St=e=>{const r=e.extension||"",i=e.name||"";if(!r.length)return i;const d=i.lastIndexOf(`.${r}`);return i.substring(0,d)},O=e=>{const r=e.name;if(e.type==="directory"||e.isFolder)return"";const i=r.split(".");if(i.length>2)for(let d=0;d<i.length;d++){const s=i.slice(d,i.length).join(".");if(xt.complex.includes(s))return s}return i.length<2?"":i[i.length-1]},Pt=e=>T.basename(T.dirname(e.path))||null,Dt=e=>typeof e.isShareRoot=="function"&&e.isShareRoot(),L=e=>{if(!e)return e;const r={};return Object.keys(e).forEach(i=>{r[ct(i)]=e[i]}),r};function It(e,r=[]){const i=e.props[a.Name]?.toString()||T.basename(e.filename),d=e.props[a.FileId],s=e.type==="directory";let t;e.filename.startsWith("/files")||e.filename.startsWith("/space")?t=e.filename.split("/").slice(3).join("/"):t=e.filename,t.startsWith("/")||(t=`/${t}`);const n=O({...e,name:i}),l=e.props[a.LockDiscovery];let c,o,u;l&&(c=l[a.ActiveLock],o=c[a.LockOwner],u=c[a.LockTime]);let f=[];e.props[a.ShareTypes]&&(f=e.props[a.ShareTypes]["share-type"],Array.isArray(f)||(f=[f]));const p={};for(const g of r||[]){const h=g.split(":").pop();e.props[h]&&(p[g]=e.props[h])}const v={id:d,fileId:d,storageId:Re(d),parentFolderId:e.props[a.FileParent],mimeType:e.props[a.MimeType],name:i,extension:s?"":n,path:t,webDavPath:e.filename,type:s?"folder":e.type,isFolder:s,locked:!!c,lockOwner:o,lockTime:u,processing:e.processing||!1,mdate:e.props[a.LastModifiedDate],size:s?e.props[a.ContentSize]?.toString()||"0":e.props[a.ContentLength]?.toString()||"0",permissions:e.props[a.Permissions]||"",starred:e.props[a.IsFavorite]!==0,etag:e.props[a.ETag],shareTypes:f,privateLink:e.props[a.PrivateLink],downloadURL:e.props[a.DownloadURL],remoteItemId:e.props[a.RemoteItemId],remoteItemPath:e.props[a.ShareRoot],owner:{id:e.props[a.OwnerId],displayName:e.props[a.OwnerDisplayName]},tags:(e.props[a.Tags]||"").toString().split(",").filter(Boolean),audio:L(e.props[a.Audio]),location:L(e.props[a.Location]),image:L(e.props[a.Image]),photo:L(e.props[a.Photo]),extraProps:p,hasPreview:()=>e.props[a.HasPreview]===1,canUpload:function(){return this.permissions.indexOf(y.FolderCreateable)>=0},canDownload:function(){return this.permissions.indexOf(y.SecureView)===-1},canBeDeleted:function(){return this.permissions.indexOf(y.Deletable)>=0},canRename:function(){return this.permissions.indexOf(y.Renameable)>=0},canShare:function({ability:g}){return g.can("create-all","Share")&&this.permissions.indexOf(y.Shareable)>=0},canCreate:function(){return this.permissions.indexOf(y.FolderCreateable)>=0},canEditTags:function(){return this.permissions.indexOf(y.Updateable)>=0||this.permissions.indexOf(y.FileUpdateable)>=0},isMounted:function(){return this.permissions.indexOf(y.Mounted)>=0},isReceivedShare:function(){return this.permissions.indexOf(y.Shared)>=0},isShareRoot(){return e.props[a.ShareRoot]?e.filename.split("/").length===3:!1},canDeny:function(){return this.permissions.indexOf(y.Deny)>=0},getDomSelector:()=>A(d)};return Object.defineProperty(v,"nodeId",{get(){return M(this.id)}}),v}function wt(e){const r=e.type==="directory",i=e.props[a.TrashbinOriginalFilename]?.toString(),d=O({name:i,type:e.type}),s=W.basename(e.filename);return{type:r?"folder":e.type,isFolder:r,ddate:e.props[a.TrashbinDeletedDate],name:W.basename(i),extension:d,path:b.urlJoin(e.props[a.TrashbinOriginalLocation],{leadingSlash:!0}),id:s,parentFolderId:e.props[a.FileParent],webDavPath:"",canUpload:()=>!1,canDownload:()=>!1,canBeDeleted:()=>!0,canBeRestored:function(){return!0},canRename:()=>!1,canShare:()=>!1,canCreate:()=>!1,isMounted:()=>!1,isReceivedShare:()=>!1,getDomSelector:()=>A(s)}}var x=(e=>(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))(x||{});const D=e=>e;class S{_key;_value;_label;_icon;constructor(r,i,d,s){this._key=r,this._value=i,this._label=d,this._icon=s}get key(){return this._key}get value(){return this._value}get label(){return this._label}get icon(){return this._icon}}class Lt{static user=new S("user",0,D("User"),"user");static group=new S("group",1,D("Group"),"group");static link=new S("link",3,D("Link"),"link");static guest=new S("guest",4,D("Guest"),"global");static remote=new S("remote",6,D("External"),"earth");static individuals=[this.user,this.guest,this.remote];static collectives=[this.group];static unauthenticated=[this.link];static authenticated=[this.user,this.group,this.guest,this.remote];static all=[this.user,this.group,this.link,this.guest,this.remote];static isIndividual(r){return this.individuals.includes(r)}static isCollective(r){return this.collectives.includes(r)}static isUnauthenticated(r){return this.unauthenticated.includes(r)}static isAuthenticated(r){return this.authenticated.includes(r)}static getByValue(r){return this.all.find(i=>i.value===r)}static getByValues(r){return r.map(i=>this.getByValue(i))}static getByKeys(r){return r.map(i=>this.all.find(d=>d.key===i))}static getValues(r){return r.map(i=>i.value)}static containsAnyValue(r,i){return vt(this.getValues(r),i).length>0}}const kt="a0ca6a90-a365-4782-871e-d44447bbc668",Tt="89f37a33-858b-45fa-8890-a1f2b27d90e1",Ct=e=>e?.type==="space",k=e=>e?.driveType==="personal",At=e=>e?.driveType==="project",Ot=e=>e?.driveType==="share",Ut=e=>e?.driveType==="mountpoint",Et=e=>e?.driveType==="public";function Se(e,r){return b.urlJoin("spaces",e,r,{leadingSlash:!0})}function Pe(e,r=""){return b.urlJoin("spaces","trash-bin",e,r,{leadingSlash:!0})}function Ft(e,r){const d=e[{image:"spaceImageData",readme:"spaceReadmeData"}[r]];if(!d)return"";const s=decodeURI(d.webDavUrl).split("/"),t=s.find(n=>n.startsWith(e.id));return t?s.slice(s.indexOf(t)+1).join("/"):""}function _t(e){return e.permissions.includes(x.deletePermissions)}function $t(e){const r=e.publicLinkPassword,i=e.props?.[a.FileId],d=e.props?.[a.PublicLinkItemType],s=e.props?.[a.PublicLinkPermission],t=e.props?.[a.PublicLinkExpiration],n=e.props?.[a.PublicLinkShareDate],l=e.props?.[a.PublicLinkShareOwner],c=e.publicLinkType;let o,u;return c==="ocm"?(o=`ocm/${e.id}`,u=Y(e.id)):(o=`public/${e.id}`,u=K(e.id)),Object.assign(N({...e,driveType:"public",driveAlias:o,webDavPath:u}),{...i&&{fileId:i},...r&&{publicLinkPassword:r},...d&&{publicLinkItemType:d},...s&&{publicLinkPermission:parseInt(s)},...t&&{publicLinkExpiration:t},...n&&{publicLinkShareDate:n},...l&&{publicLinkShareOwner:l},publicLinkType:c})}function Mt({driveAliasPrefix:e,id:r,shareName:i,serverUrl:d}){const s=N({id:r,driveAlias:`${e}/${i}`,driveType:"share",name:i,serverUrl:d});return s.rename=t=>{s.driveAlias=`${e}/${t}`,s.name=t},s}function N(e){let r,i;e.special&&(r=e.special.find(o=>o.specialFolder.name==="image"),i=e.special.find(o=>o.specialFolder.name==="readme"),r&&(r.webDavUrl=decodeURI(r.webDavUrl)),i&&(i.webDavUrl=decodeURI(i.webDavUrl)));const d=e.root?.deleted?.state==="trashed",s=b.urlJoin(e.webDavPath||Se(e.id),{leadingSlash:!0}),t=b.urlJoin(e.serverUrl,"remote.php/dav",s),n=b.urlJoin(e.webDavTrashPath||Pe(e.id),{leadingSlash:!0}),l=b.urlJoin(e.serverUrl,"remote.php/dav",n),c={id:e.id,fileId:e.id,storageId:e.id,mimeType:"",name:e.name,description:e.description,extension:"",path:"/",webDavPath:s,webDavTrashPath:n,driveAlias:e.driveAlias,driveType:e.driveType,type:"space",isFolder:!0,mdate:e.lastModifiedDateTime,size:e.quota?.used||0,tags:[],permissions:"",starred:!1,etag:"",shareTypes:[],privateLink:e.webUrl,downloadURL:"",owner:e.owner?.user,disabled:d,root:e.root,spaceQuota:e.quota,spaceImageData:r,spaceReadmeData:i,hasTrashedItems:e["@libre.graph.hasTrashedItems"]||!1,graphPermissions:void 0,canUpload:function({user:o}={}){return k(this)&&this.isOwner(o)?!0:this.graphPermissions?.includes(x.createUpload)},canDownload:function(){return!0},canBeDeleted:function({ability:o}={}){return this.disabled?o?.can("delete-all","Drive")?!0:this.graphPermissions?.includes(x.deletePermissions):!1},canRename:function({ability:o}={}){return o?.can("update-all","Drive")?!0:this.graphPermissions?.includes(x.deletePermissions)},canEditDescription:function({ability:o}={}){return o?.can("update-all","Drive")?!0:this.graphPermissions?.includes(x.deletePermissions)},canRestore:function({ability:o}={}){return this.disabled?o?.can("update-all","Drive")?!0:this.graphPermissions?.includes(x.deletePermissions):!1},canDisable:function({ability:o}={}){return this.disabled?!1:o?.can("delete-all","Drive")?!0:this.graphPermissions?.includes(x.deletePermissions)},canShare:function(){return this.graphPermissions?.includes(x.createPermissions)},canEditImage:function(){return this.disabled?!1:this.graphPermissions?.includes(x.deletePermissions)},canEditReadme:function(){return this.disabled?!1:this.graphPermissions?.includes(x.deletePermissions)},canRestoreFromTrashbin:function(){return this.graphPermissions?.includes(x.updateDeleted)},canDeleteFromTrashBin:function({user:o}={}){return k(this)&&this.isOwner(o)?!0:this.graphPermissions?.includes(x.deletePermissions)},canListVersions:function({user:o}={}){return k(this)&&this.isOwner(o)?!0:this.graphPermissions?.includes(x.readVersions)},canCreate:function(){return!0},canEditTags:function(){return!1},isMounted:function(){return!0},isReceivedShare:function(){return!1},isShareRoot:function(){return["share","mountpoint","public"].includes(e.driveType)},canDeny:()=>!1,getDomSelector:()=>A(e.id),getDriveAliasAndItem({path:o}){return b.urlJoin(this.driveAlias,o,{leadingSlash:!1})},getWebDavUrl({path:o}){return b.urlJoin(t,o)},getWebDavTrashUrl({path:o}){return b.urlJoin(l,o)},isOwner(o){return o?.id===this.owner?.id}};return Object.defineProperty(c,"nodeId",{get(){return M(this.id)}}),c}function Nt(e){return{id:e.spaceImageData.id,name:e.spaceImageData.name,etag:e.spaceImageData.eTag,extension:O({name:e.spaceImageData.name}),mimeType:e.spaceImageData.file.mimeType,type:"file",webDavPath:b.urlJoin(e.webDavPath,".space",e.spaceImageData.name),hasPreview:()=>!0,canDownload:()=>!0}}exports.DavMethod=Q;exports.DavPermission=y;exports.DavProperties=$;exports.DavProperty=a;exports.GraphSharePermission=x;exports.OCM_PROVIDER_ID=Tt;exports.SHARE_JAIL_ID=kt;exports.SetCache=I;exports.ShareType=S;exports.ShareTypes=Lt;exports.arrayIncludes=G;exports.buildDeletedResource=wt;exports.buildPublicSpaceResource=$t;exports.buildResource=It;exports.buildShareSpaceResource=Mt;exports.buildSpace=N;exports.buildSpaceImageResource=Nt;exports.buildWebDavOcmPath=Y;exports.buildWebDavPublicPath=K;exports.buildWebDavSpacesPath=Se;exports.buildWebDavSpacesTrashPath=Pe;exports.cacheHas=_;exports.extractDomSelector=A;exports.extractExtensionFromFile=O;exports.extractNameWithoutExtension=St;exports.extractNodeId=M;exports.extractParentFolderName=Pt;exports.extractStorageId=Re;exports.getRelativeSpecialFolderSpacePath=Ft;exports.isManager=_t;exports.isMountPointSpaceResource=Ut;exports.isPersonalSpaceResource=k;exports.isProjectSpaceResource=At;exports.isPublicSpaceResource=Et;exports.isSearchResource=Rt;exports.isShareRoot=Dt;exports.isShareSpaceResource=Ot;exports.isSpaceResource=Ct;exports.isTrashResource=yt;
@@ -1 +0,0 @@
1
- "use strict";const h=require("./web-client/graph/generated.cjs"),g=require("./toString-CgHWCW2N.cjs"),d=require("./functions-DP8s29Wg.cjs"),k=({axiosClient:e,config:s})=>{const o=h.UserApiFactory(s,s.basePath,e),c=h.UsersApiFactory(s,s.basePath,e),i=h.MeUserApiFactory(s,s.basePath,e),a=h.MeChangepasswordApiFactory(s,s.basePath,e),t=h.UserAppRoleAssignmentApiFactory(s,s.basePath,e);return{async getUser(r,n,u){const{data:l}=await o.getUser(r,n?.select?new Set([...n.select]):null,n?.expand?new Set([...n.expand]):new Set(["drive","memberOf","appRoleAssignments"]),u);return l},async createUser(r,n){const{data:u}=await c.createUser(r,n);return u},async editUser(r,n,u){const{data:l}=await o.updateUser(r,n,u);return l},async deleteUser(r,n,u){await o.deleteUser(r,n,u)},async listUsers(r,n){const{data:{value:u}}=await c.listUsers(r?.search,r?.filter,r?.orderBy?new Set([...r.orderBy]):null,r?.select?new Set([...r.select]):null,r?.expand?new Set([...r.expand]):null,n);return u},async getMe(r,n){const{data:u}=await i.getOwnUser(r?.expand?new Set([...r.expand]):new Set(["memberOf"]),n);return u},async editMe(r,n){const{data:u}=await i.updateOwnUser(r,n);return u},async changeOwnPassword(r,n){await a.changeOwnPassword(r,n)},async exportPersonalData(r,n,u){await o.exportPersonalData(r,n,u)},async createUserAppRoleAssignment(r,n,u){const{data:l}=await t.userCreateAppRoleAssignments(r,n,u);return l}}},B=({axiosClient:e,config:s})=>{const o=h.GroupApiFactory(s,s.basePath,e),c=h.GroupsApiFactory(s,s.basePath,e);return{async getGroup(i,a,t){const{data:r}=await o.getGroup(i,a?.select?new Set([...a.select]):null,a?.expand?new Set([...a.expand]):new Set(["members"]),t);return r},async createGroup(i,a){const{data:t}=await c.createGroup(i,a);return t},async editGroup(i,a,t){const{data:r}=await o.updateGroup(i,a,t);return r},async deleteGroup(i,a,t){await o.deleteGroup(i,a,t)},async listGroups(i,a){const{data:{value:t}}=await c.listGroups(i?.search,i?.orderBy?new Set([...i.orderBy]):null,i?.select?new Set([...i.select]):null,i?.expand?new Set([...i.expand]):null,a);return t},async addMember(i,a,t){await o.addMember(i,{"@odata.id":g.urlJoin(s.basePath,"v1.0","users",a)},t)},async deleteMember(i,a,t,r){await o.deleteMember(i,a,t,r)}}},M=({axiosClient:e,config:s})=>{const o=h.ApplicationsApiFactory(s,s.basePath,e);return{async getApplication(c,i){const{data:a}=await o.getApplication(c,i);return a},async listApplications(c){const{data:{value:i}}=await o.listApplications(c);return i||[]}}};function G(){}var F=g.getNative(g.root,"Set");function T(e){var s=-1,o=Array(e.size);return e.forEach(function(c){o[++s]=c}),o}var N=1/0,x=F&&1/T(new F([,-0]))[1]==N?function(e){return new F(e)}:G,L=200;function E(e,s,o){var c=-1,i=d.arrayIncludes,a=e.length,t=!0,r=[],n=r;if(a>=L){var u=x(e);if(u)return T(u);t=!1,i=d.cacheHas,n=new d.SetCache}else n=r;e:for(;++c<a;){var l=e[c],p=l;if(l=l!==0?l:0,t&&p===p){for(var y=n.length;y--;)if(n[y]===p)continue e;r.push(l)}else i(n,p,o)||(n!==r&&n.push(p),r.push(l))}return r}function O(e){return e&&e.length?E(e):[]}const v=e=>Object.hasOwn(e,"sharedWith"),W=e=>v(e)&&e.outgoing,z=e=>v(e)&&!e.outgoing,V=e=>Object.hasOwn(e,"role"),j=e=>!Object.hasOwn(e,"role"),f=({driveItem:e,graphRoles:s})=>e.remoteItem?.permissions.reduce((o,c)=>(c.roles?.forEach(i=>{const a=s[i];a&&!o.some(({id:t})=>t===a.id)&&o.push(a)}),o),[]),U=({driveItem:e,shareRoles:s})=>{if(!s.length){const c=e.remoteItem?.permissions.reduce((i,a)=>{const t=a["@libre.graph.permissions.actions"];return t&&i.push(...t),i},[]);return[...new Set(c)]}const o=s.reduce((c,i)=>(i.rolePermissions.forEach(a=>{c.push(...a.allowedResourceActions)}),c),[]);return[...new Set(o)]};function J({driveItem:e,graphRoles:s,serverUrl:o}){const c=e.name||e.remoteItem.name,i=d.extractStorageId(e.remoteItem.id),a=e.remoteItem.permissions.map(y=>{const{grantedToV2:m}=y;return{...m.group||m.user,shareType:D(y)}}),t=e.remoteItem.permissions.reduce((y,m)=>{const b=m.invitation.invitedBy.user;return y.some(({id:R})=>R===b.id)||y.push(b),y},[]);let r=O(e.remoteItem.permissions.map(D));t.some(y=>y["@libre.graph.userType"]==="Federated")&&(r=[d.ShareTypes.remote.value]);const u=f({driveItem:e,graphRoles:s}),l=U({driveItem:e,shareRoles:u}),p={id:e.id,remoteItemId:e.remoteItem.id,driveId:e.parentReference?.driveId,path:"/",name:c,fileId:e.remoteItem.id,size:e.size,storageId:i,parentFolderId:e.parentReference?.id,sdate:e.remoteItem.permissions[0].createdDateTime,tags:[],webDavPath:d.buildWebDavSpacesPath(e.remoteItem.id,"/"),sharedBy:t,owner:e.remoteItem.createdBy?.user,sharedWith:a,shareTypes:r,isFolder:!!e.folder,type:e.folder?"folder":"file",mimeType:e.file?.mimeType||"httpd/unix-directory",mdate:e.lastModifiedDateTime?new Date(e.lastModifiedDateTime).toUTCString():void 0,syncEnabled:e["@client.synchronize"],hidden:e["@UI.Hidden"],shareRoles:u,sharePermissions:l,outgoing:!1,privateLink:g.urlJoin(o,"f",e.remoteItem.id),hasPreview:()=>!!e.thumbnails,canRename:()=>e["@client.synchronize"],canDownload:()=>l.includes(d.GraphSharePermission.readContent),canUpload:()=>l.includes(d.GraphSharePermission.createUpload),canCreate:()=>l.includes(d.GraphSharePermission.createChildren),canBeDeleted:()=>l.includes(d.GraphSharePermission.deleteStandard),canEditTags:()=>l.includes(d.GraphSharePermission.createChildren),isMounted:()=>!1,isReceivedShare:()=>!0,canShare:()=>!1,canDeny:()=>!1,getDomSelector:()=>d.extractDomSelector(e.id)};return p.extension=d.extractExtensionFromFile(p),p}function _({driveItem:e,user:s,serverUrl:o}){const c=d.extractStorageId(e.id),i=g.urlJoin(e.parentReference.path,e.name),a={id:e.id,driveId:e.parentReference?.driveId,path:i,name:e.name,fileId:e.id,size:e.size,storageId:c,parentFolderId:e.parentReference?.id,sdate:e.permissions[0].createdDateTime,tags:[],webDavPath:d.buildWebDavSpacesPath(c,i),sharedBy:[{id:s.id,displayName:s.displayName}],owner:{id:s.id,displayName:s.displayName},sharedWith:e.permissions.map(t=>{if(t.link)return{id:t.id,displayName:t.link["@libre.graph.displayName"],shareType:d.ShareTypes.link.value};const r=D(t);return{...t.grantedToV2.user||t.grantedToV2.group,shareType:r}}),shareTypes:e.permissions.map(D),isFolder:!!e.folder,type:e.folder?"folder":"file",mimeType:e.file?.mimeType||"httpd/unix-directory",outgoing:!0,privateLink:g.urlJoin(o,"f",e.id),hasPreview:()=>!!e.thumbnails,canRename:()=>!0,canDownload:()=>!0,canUpload:()=>!0,canCreate:()=>!0,canBeDeleted:()=>!0,canEditTags:()=>!0,isMounted:()=>!1,isReceivedShare:()=>!0,canShare:()=>!0,canDeny:()=>!0,getDomSelector:()=>d.extractDomSelector(e.id)};return a.extension=d.extractExtensionFromFile(a),a}function A({graphPermission:e,graphRoles:s,resourceId:o,indirect:c=!1}){const i=s[e.roles?.[0]],a=e.invitation?.invitedBy?.user;return{id:e.id,resourceId:o,indirect:c,shareType:D(e),role:i,sharedBy:{id:a?.id,displayName:a?.displayName},sharedWith:e.grantedToV2.user||e.grantedToV2.group,permissions:e["@libre.graph.permissions.actions"]?e["@libre.graph.permissions.actions"]:i.rolePermissions.flatMap(t=>t.allowedResourceActions),createdDateTime:e.createdDateTime,expirationDateTime:e.expirationDateTime}}function S({graphPermission:e,resourceId:s,indirect:o=!1}){const c=e.invitation?.invitedBy?.user;return{id:e.id,resourceId:s,indirect:o,shareType:d.ShareTypes.link.value,sharedBy:{id:c?.id,displayName:c?.displayName},hasPassword:e.hasPassword,createdDateTime:e.createdDateTime,expirationDateTime:e.expirationDateTime,displayName:e.link["@libre.graph.displayName"],isQuickLink:e.link["@libre.graph.quickLink"],type:e.link.type,webUrl:e.link.webUrl,preventsDownload:e.link.preventsDownload}}function D({link:e,grantedToV2:s}){return e?d.ShareTypes.link.value:s?.group?d.ShareTypes.group.value:s?.user?.["@libre.graph.userType"]==="Federated"?d.ShareTypes.remote.value:d.ShareTypes.user.value}const P=e=>new URL(e.webUrl).origin,H=({axiosClient:e,config:s})=>{const o=h.DrivesApiFactory(s,s.basePath,e),c=new h.MeDrivesApi(s,s.basePath,e),i=new h.DrivesGetDrivesApi(s,s.basePath,e);return{async getDrive(a,t,r){const{data:n}=await o.getDrive(a,t?.select?new Set([...t.select]):null,r);return d.buildSpace({...n,serverUrl:P(n)})},async createDrive(a,t){const{data:r}=await o.createDrive(a,t);return d.buildSpace({...r,serverUrl:P(r)})},async updateDrive(a,t,r){const{data:n}=await o.updateDrive(a,t,r);return d.buildSpace({...n,serverUrl:P(n)})},async disableDrive(a,t,r){await o.deleteDrive(a,t,r)},async deleteDrive(a,t,r){await o.deleteDrive(a,t,{headers:{...r?.headers&&r.headers||{},Purge:"T"},...r&&{requestOptions:r}||{}})},async listMyDrives(a,t){const{data:{value:r}}=await c.listMyDrivesBeta(a?.orderBy,a?.filter,a?.expand,a?.select?new Set([...a.select]):null,t);return r.map(n=>d.buildSpace({...n,serverUrl:P(n)}))},async listAllDrives(a,t){const{data:{value:r}}=await i.listAllDrivesBeta(a?.orderBy,a?.filter,a?.expand,a?.select?new Set([...a.select]):null,t);return r.map(n=>d.buildSpace({...n,serverUrl:P(n)}))}}},Y=({axiosClient:e,config:s})=>{const o=h.DriveItemApiFactory(s,s.basePath,e),c=h.DrivesRootApiFactory(s,s.basePath,e),i=h.MeDriveApiFactory(s,s.basePath,e);return{async getDriveItem(a,t,r){const{data:n}=await o.getDriveItem(a,t,r);return n},async createDriveItem(a,t,r){const{data:n}=await c.createDriveItem(a,t,r);return n},async updateDriveItem(a,t,r,n){const{data:u}=await o.updateDriveItem(a,t,r,n);return u},async deleteDriveItem(a,t,r){await o.deleteDriveItem(a,t,r)},async listSharedByMe(a,t){const{data:r}=await i.listSharedByMe(a?.expand,t);return r?.value||[]},async listSharedWithMe(a,t){const{data:r}=await i.listSharedWithMe(a?.expand,t);return r?.value||[]}}},Q=({axiosClient:e,config:s})=>{const o=h.TagsApiFactory(s,s.basePath,e);return{async listTags(c){const{data:{value:i}}=await o.getTags(c);return i||[]},async assignTags(c,i){await o.assignTags(c,i)},async unassignTags(c,i){await o.unassignTags(c,i)}}},Z=({axiosClient:e,config:s})=>{const o=h.ActivitiesApiFactory(s,s.basePath,e);return{async listActivities(c,i){const{data:{value:a}}=await o.getActivities(c,i);return a||[]}}},$=({axiosClient:e,config:s})=>{const o=h.DrivesRootApiFactory(s,s.basePath,e),c=h.RoleManagementApiFactory(s,s.basePath,e),i=h.DrivesPermissionsApiFactory(s,s.basePath,e);return{async getPermission(a,t,r,n,u){const{data:l}=await i.getPermission(a,t,r,u);return l.link?S({graphPermission:l,resourceId:t}):A({graphPermission:l,resourceId:t,graphRoles:n||{}})},async listPermissions(a,t,r,n,u){let l;if(a===t){const{data:w}=await o.listPermissionsSpaceRoot(a,n?.filter,n?.select?new Set([...n.select]):null,n?.count,n?.top||0,u);l=w}else{const{data:w}=await i.listPermissions(a,t,n?.filter,n?.select?new Set([...n.select]):null,n?.count,n?.top||0,u);l=w}const p=l.value||[],y=l["@libre.graph.permissions.actions.allowedValues"],m=l["@libre.graph.permissions.roles.allowedValues"],b=l["@odata.count"];return{shares:p.map(w=>w.link?S({graphPermission:w,resourceId:t}):A({graphPermission:w,resourceId:t,graphRoles:r||{}})),allowedActions:y,allowedRoles:m,count:b}},async updatePermission(a,t,r,n,u,l){let p;if(a===t){const{data:y}=await o.updatePermissionSpaceRoot(a,r,n,l);p=y}else{const{data:y}=await i.updatePermission(a,t,r,n,l);p=y}return p.link?S({graphPermission:p,resourceId:t}):A({graphPermission:p,resourceId:t,graphRoles:u||{}})},async deletePermission(a,t,r,n){if(a===t){await o.deletePermissionSpaceRoot(a,r,n);return}await i.deletePermission(a,t,r,n)},async createInvite(a,t,r,n,u){let l;if(a===t){const{data:p}=await o.inviteSpaceRoot(a,r,u);l=p.value?.[0]}else{const{data:p}=await i.invite(a,t,r,u);l=p.value?.[0]}if(!l)throw new Error("no permission returned");return A({graphPermission:l,resourceId:t,graphRoles:n||{}})},async createLink(a,t,r,n){let u;if(a===t){const{data:l}=await o.createLinkSpaceRoot(a,r,n);u=l}else{const{data:l}=await i.createLink(a,t,r,n);u=l}return S({graphPermission:u,resourceId:t})},async setPermissionPassword(a,t,r,n,u){let l;if(a===t){const{data:p}=await o.setPermissionPasswordSpaceRoot(a,r,n,u);l=p}else{const{data:p}=await i.setPermissionPassword(a,t,r,n,u);l=p}return S({graphPermission:l,resourceId:t})},async listRoleDefinitions(a){const{data:t}=await c.listPermissionRoleDefinitions(a);return t}}},K=({axiosClient:e,config:s})=>{const o=h.MePhotoApiFactory(s,s.basePath,e),c=h.UserPhotoApiFactory(s,s.basePath,e);return{async getOwnUserPhoto(i){const{data:a}=await o.getOwnUserPhoto(i);return a},async deleteOwnUserPhoto(i){const{data:a}=await o.deleteOwnUserPhoto(i);return a},async updateOwnUserPhotoPatch(i,a){const{data:t}=await o.updateOwnUserPhotoPatch(i,a);return t},async getUserPhoto(i,a){const{data:t}=await c.getUserPhoto(i,a);return t}}},X=(e,s)=>{const o=new URL(e);o.pathname=[...o.pathname.split("/"),"graph"].filter(Boolean).join("/");const c=new h.Configuration({basePath:o.href});return{activities:Z({axiosClient:s,config:c}),applications:M({axiosClient:s,config:c}),tags:Q({axiosClient:s,config:c}),drives:H({axiosClient:s,config:c}),driveItems:Y({axiosClient:s,config:c}),users:k({axiosClient:s,config:c}),groups:B({axiosClient:s,config:c}),permissions:$({axiosClient:s,config:c}),photos:K({axiosClient:s,config:c})}};exports.buildCollaboratorShare=A;exports.buildIncomingShareResource=J;exports.buildLinkShare=S;exports.buildOutgoingShareResource=_;exports.getShareResourcePermissions=U;exports.getShareResourceRoles=f;exports.graph=X;exports.isCollaboratorShare=V;exports.isIncomingShareResource=z;exports.isLinkShare=j;exports.isOutgoingShareResource=W;exports.isShareResource=v;