diff --git a/apps/files_sharing/src/services/SharingService.spec.ts b/apps/files_sharing/src/services/SharingService.spec.ts index ce603e670a4ce..edfa10483f123 100644 --- a/apps/files_sharing/src/services/SharingService.spec.ts +++ b/apps/files_sharing/src/services/SharingService.spec.ts @@ -21,12 +21,12 @@ */ import type { OCSResponse } from '@nextcloud/typings/ocs' import { expect } from '@jest/globals' -import { Type } from '@nextcloud/sharing' +import { File, Folder } from '@nextcloud/files' +import { ShareType } from '@nextcloud/sharing' import * as auth from '@nextcloud/auth' import axios from '@nextcloud/axios' import { getContents } from './SharingService' -import { File, Folder } from '@nextcloud/files' import logger from './logger' global.window.OC = { @@ -158,7 +158,7 @@ describe('SharingService filtering', () => { data: [ { id: '62', - share_type: Type.SHARE_TYPE_USER, + share_type: ShareType.User, uid_owner: 'test', displayname_owner: 'test', permissions: 31, @@ -189,7 +189,7 @@ describe('SharingService filtering', () => { }) test('Shared with others filtering', async () => { - const shares = await getContents(false, true, false, false, [Type.SHARE_TYPE_USER]) + const shares = await getContents(false, true, false, false, [ShareType.User]) expect(axios.get).toHaveBeenCalledTimes(1) expect(shares.contents).toHaveLength(1) @@ -198,7 +198,7 @@ describe('SharingService filtering', () => { }) test('Shared with others filtering empty', async () => { - const shares = await getContents(false, true, false, false, [Type.SHARE_TYPE_LINK]) + const shares = await getContents(false, true, false, false, [ShareType.Link]) expect(axios.get).toHaveBeenCalledTimes(1) expect(shares.contents).toHaveLength(0) @@ -294,6 +294,25 @@ describe('SharingService share to Node mapping', () => { tags: [window.OC.TAG_FAVORITE], } + const remoteFile = { + mimetype: 'text/markdown', + mtime: 1688721600, + permissions: 19, + type: 'file', + file_id: 1234, + id: 4, + share_type: ShareType.User, + parent: null, + remote: 'http://exampe.com', + remote_id: '12345', + share_token: 'share-token', + name: '/test.md', + mountpoint: '/shares/test.md', + owner: 'owner-uid', + user: 'sharee-uid', + accepted: true, + } + test('File', async () => { jest.spyOn(axios, 'get').mockReturnValueOnce(Promise.resolve({ data: { @@ -353,6 +372,35 @@ describe('SharingService share to Node mapping', () => { expect(folder.attributes.favorite).toBe(1) }) + test('Remote file', async () => { + jest.spyOn(axios, 'get').mockReturnValueOnce(Promise.resolve({ + data: { + ocs: { + data: [remoteFile], + }, + }, + })) + + const shares = await getContents(false, true, false, false) + + expect(axios.get).toHaveBeenCalledTimes(1) + expect(shares.contents).toHaveLength(1) + + const file = shares.contents[0] as File + expect(file).toBeInstanceOf(File) + expect(file.fileid).toBe(1234) + expect(file.source).toBe('http://localhost/remote.php/dav/files/test/shares/test.md') + expect(file.owner).toBe('owner-uid') + expect(file.mime).toBe('text/markdown') + expect(file.mtime?.getTime()).toBe(remoteFile.mtime * 1000) + // not available for remote shares + expect(file.size).toBe(undefined) + expect(file.permissions).toBe(0) + expect(file.root).toBe('/files/test') + expect(file.attributes).toBeInstanceOf(Object) + expect(file.attributes.favorite).toBe(0) + }) + test('Empty', async () => { jest.spyOn(logger, 'error').mockImplementationOnce(() => {}) jest.spyOn(axios, 'get').mockReturnValueOnce(Promise.resolve({ diff --git a/apps/files_sharing/src/services/SharingService.ts b/apps/files_sharing/src/services/SharingService.ts index 7841b71a634b1..043ea9821f9d4 100644 --- a/apps/files_sharing/src/services/SharingService.ts +++ b/apps/files_sharing/src/services/SharingService.ts @@ -19,8 +19,7 @@ * along with this program. If not, see . * */ -/* eslint-disable camelcase, n/no-extraneous-import */ -import type { AxiosPromise } from 'axios' +import type { AxiosPromise } from '@nextcloud/axios' import type { OCSResponse } from '@nextcloud/typings/ocs' import { Folder, File, type ContentsWithRoot, Permission } from '@nextcloud/files' @@ -40,10 +39,16 @@ const ocsEntryToNode = async function(ocsEntry: any): Promise (ocsEntry?.item_mtime || 0)) { mtime = new Date((ocsEntry.stime) * 1000) } @@ -88,7 +94,8 @@ const ocsEntryToNode = async function(ocsEntry: any): Promise> { /** * Group an array of objects (here Nodes) by a key * and return an array of arrays of them. + * @param nodes Nodes to group + * @param key The attribute to group by */ const groupBy = function(nodes: (Folder | File)[], key: string) { return Object.values(nodes.reduce(function(acc, curr) { @@ -168,7 +177,7 @@ const groupBy = function(nodes: (Folder | File)[], key: string) { } export const getContents = async (sharedWithYou = true, sharedWithOthers = true, pendingShares = false, deletedshares = false, filterTypes: number[] = []): Promise => { - const promises = [] as AxiosPromise>[] + const promises = [] as AxiosPromise>[] if (sharedWithYou) { promises.push(getSharedWithYou(), getRemoteShares()) diff --git a/dist/files_sharing-init.js b/dist/files_sharing-init.js index 7865d7838d618..8c899f75297d9 100644 --- a/dist/files_sharing-init.js +++ b/dist/files_sharing-init.js @@ -1,3 +1,3 @@ /*! For license information please see files_sharing-init.js.LICENSE.txt */ -(()=>{"use strict";var e,t,i,n={67597:(e,t,i)=>{var n=i(31346),r=i(53334);const s='',a='',o='';var l=i(63814),d=i(21777),h=i(65043),u=i(35947);const c=(0,u.YK)().setApp("files_sharing").detectUser().build();var p;const v="/files/".concat(null===(p=(0,d.HW)())||void 0===p?void 0:p.uid),g={"Content-Type":"application/json"},m=async function(e){try{var t;if(void 0!==(null==e?void 0:e.remote_id)){const t=(await i.e(857).then(i.bind(i,10857))).default;e.mimetype=t.getType(e.name),e.item_type=e.mimetype?"file":"folder",e.item_permissions=n.aX.NONE,e.permissions=n.aX.NONE,e.uid_owner=e.owner,e.displayname_owner=e.owner}const r="folder"===(null==e?void 0:e.item_type),s=!0===(null==e?void 0:e.has_preview),a=r?n.vd:n.ZH,o=e.file_source||e.id,d=(null==e?void 0:e.path)||e.file_target||e.name,h=(0,l.dC)("dav/".concat(v,"/").concat(d).replaceAll(/\/\//gm,"/"));let u=null!=e&&e.item_mtime?new Date(1e3*e.item_mtime):void 0;return(null==e?void 0:e.stime)>((null==e?void 0:e.item_mtime)||0)&&(u=new Date(1e3*e.stime)),new a({id:o,source:h,owner:null==e?void 0:e.uid_owner,mime:(null==e?void 0:e.mimetype)||"application/octet-stream",mtime:u,size:null==e?void 0:e.item_size,permissions:(null==e?void 0:e.item_permissions)||(null==e?void 0:e.permissions),root:v,attributes:{...e,"has-preview":s,"owner-id":null==e?void 0:e.uid_owner,"owner-display-name":null==e?void 0:e.displayname_owner,"share-types":null==e?void 0:e.share_type,favorite:null!=e&&null!==(t=e.tags)&&void 0!==t&&t.includes(window.OC.TAG_FAVORITE)?1:0}})}catch(e){return c.error("Error while parsing OCS entry",{error:e}),null}},w=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=(0,l.KT)("apps/files_sharing/api/v1/shares");return h.Ay.get(t,{headers:g,params:{shared_with_me:e,include_tags:!0}})},f=async function(){var e;let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=[];(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&a.push(w(!0),function(){const e=(0,l.KT)("apps/files_sharing/api/v1/remote_shares");return h.Ay.get(e,{headers:g,params:{include_tags:!0}})}()),t&&a.push(w()),i&&a.push(function(){const e=(0,l.KT)("apps/files_sharing/api/v1/shares/pending");return h.Ay.get(e,{headers:g,params:{include_tags:!0}})}(),function(){const e=(0,l.KT)("apps/files_sharing/api/v1/remote_shares/pending");return h.Ay.get(e,{headers:g,params:{include_tags:!0}})}()),r&&a.push(function(){const e=(0,l.KT)("apps/files_sharing/api/v1/deletedshares");return h.Ay.get(e,{headers:g,params:{include_tags:!0}})}());const o=(await Promise.all(a)).map((e=>e.data.ocs.data)).flat();let u=(await Promise.all(o.map(m))).filter((e=>null!==e));var c,p;return s.length>0&&(u=u.filter((e=>{var t;return s.includes(null===(t=e.attributes)||void 0===t?void 0:t.share_type)}))),u=(c=u,p="source",Object.values(c.reduce((function(e,t){return(e[t[p]]=e[t[p]]||[]).push(t),e}),{}))).map((e=>{const t=e[0];return t.attributes["share-types"]=e.map((e=>e.attributes["share-types"])),t})),{folder:new n.vd({id:0,source:(0,l.dC)("dav"+v),owner:(null===(e=(0,d.HW)())||void 0===e?void 0:e.uid)||null}),contents:u}},A="shareoverview",y="sharingin",_="sharingout",C="sharinglinks",b="deletedshares",T="pendingshares";var x=i(61338),S=i(65659);const H=new n.hY({id:"accept-share",displayName:e=>(0,r.zw)("files_sharing","Accept share","Accept shares",e.length),iconSvgInline:()=>S,enabled:(e,t)=>e.length>0&&t.id===T,async exec(e){try{const t=!!e.attributes.remote,i=(0,l.KT)("apps/files_sharing/api/v1/{shareBase}/pending/{id}",{shareBase:t?"remote_shares":"shares",id:e.attributes.id});return await h.Ay.post(i),(0,x.Ic)("files:node:deleted",e),!0}catch(e){return!1}},async execBatch(e,t,i){return Promise.all(e.map((e=>this.exec(e,t,i))))},order:1,inline:()=>!0});(0,n.Gg)(H);const E=new n.hY({id:"open-in-files",displayName:()=>(0,r.Tl)("files","Open in Files"),iconSvgInline:()=>"",enabled:(e,t)=>[A,y,_,C].includes(t.id),async exec(e){const t=e.type===n.pt.Folder;return window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:String(e.fileid)},{dir:t?e.path:e.dirname,openfile:t?void 0:"true"}),null},order:-1e3,default:n.m9.HIDDEN});(0,n.Gg)(E);const O=new n.hY({id:"reject-share",displayName:e=>(0,r.zw)("files_sharing","Reject share","Reject shares",e.length),iconSvgInline:()=>'',enabled:(e,t)=>t.id===T&&0!==e.length&&!e.some((e=>e.attributes.remote_id&&e.attributes.share_type===window.OC.Share.SHARE_TYPE_REMOTE_GROUP)),async exec(e){try{const t=!!e.attributes.remote,i=(0,l.KT)("apps/files_sharing/api/v1/{shareBase}/{id}",{shareBase:t?"remote_shares":"shares",id:e.attributes.id});return await h.Ay.delete(i),(0,x.Ic)("files:node:deleted",e),!0}catch(e){return!1}},async execBatch(e,t,i){return Promise.all(e.map((e=>this.exec(e,t,i))))},order:2,inline:()=>!0});(0,n.Gg)(O);const L=new n.hY({id:"restore-share",displayName:e=>(0,r.zw)("files_sharing","Restore share","Restore shares",e.length),iconSvgInline:()=>'',enabled:(e,t)=>e.length>0&&t.id===b,async exec(e){try{const t=(0,l.KT)("apps/files_sharing/api/v1/deletedshares/{id}",{id:e.attributes.id});return await h.Ay.post(t),(0,x.Ic)("files:node:deleted",e),!0}catch(e){return!1}},async execBatch(e,t,i){return Promise.all(e.map((e=>this.exec(e,t,i))))},order:1,inline:()=>!0});(0,n.Gg)(L);var M=i(77905),V=i(49981);const N=(0,u.YK)().setApp("files").detectUser().build(),P=new n.hY({id:"details",displayName:()=>(0,r.Tl)("files","Open details"),iconSvgInline:()=>V,enabled:e=>{var t,i,r;return 1===e.length&&!!e[0]&&!(null===(t=window)||void 0===t||null===(t=t.OCA)||void 0===t||null===(t=t.Files)||void 0===t||!t.Sidebar)&&null!==(i=(null===(r=e[0].root)||void 0===r?void 0:r.startsWith("/files/"))&&e[0].permissions!==n.aX.NONE)&&void 0!==i&&i},async exec(e,t,i){try{return await window.OCA.Files.Sidebar.open(e.path),window.OCP.Files.Router.goToRoute(null,{view:t.id,fileid:e.fileid},{...window.OCP.Files.Router.query,dir:i},!0),null}catch(e){return N.error("Error while opening sidebar",{error:e}),!1}},order:-50});var R,k,B=i(85072),I=i.n(B),Y=i(97825),j=i.n(Y),F=i(77659),G=i.n(F),Z=i(55056),K=i.n(Z),U=i(10540),D=i.n(U),W=i(41113),q=i.n(W),z=i(8132),X={};X.styleTagTransform=q(),X.setAttributes=K(),X.insert=G().bind(null,"head"),X.domAPI=j(),X.insertStyleElement=D(),I()(z.A,X),z.A&&z.A.locals&&z.A.locals;const J=!0===(null===(R=window)||void 0===R||null===(k=R.matchMedia)||void 0===k||null===(k=k.call(R,"(prefers-color-scheme: dark)"))||void 0===k?void 0:k.matches)||null!==document.querySelector("[data-themes*=dark]"),$=e=>void 0!==e.attributes.remote_id,Q=new n.hY({id:"sharing-status",displayName(e){var t,i,n;const s=e[0],a=Object.values((null==s||null===(t=s.attributes)||void 0===t?void 0:t["share-types"])||{}).flat(),o=null==s||null===(i=s.attributes)||void 0===i?void 0:i["owner-id"];return a.length>0||o!==(null===(n=(0,d.HW)())||void 0===n?void 0:n.uid)||$(s)?(0,r.Tl)("files_sharing","Shared"):""},title(e){var t,i,n,s,a;const o=e[0],l=null==o||null===(t=o.attributes)||void 0===t?void 0:t["owner-id"],h=null==o||null===(i=o.attributes)||void 0===i?void 0:i["owner-display-name"];return Array.isArray(null===(n=o.attributes)||void 0===n?void 0:n["share-types"])&&(null===(s=o.attributes)||void 0===s?void 0:s["share-types"].length)>1?(0,r.Tl)("files_sharing","Shared multiple times with different people"):l&&(l!==(null===(a=(0,d.HW)())||void 0===a?void 0:a.uid)||$(o))?(0,r.Tl)("files_sharing","Shared by {ownerDisplayName}",{ownerDisplayName:h}):(0,r.Tl)("files_sharing","Show sharing options")},iconSvgInline(e){var t,i,n,r,h;const u=e[0],c=Object.values((null==u||null===(t=u.attributes)||void 0===t?void 0:t["share-types"])||{}).flat();if(Array.isArray(null===(i=u.attributes)||void 0===i?void 0:i["share-types"])&&(null===(n=u.attributes)||void 0===n?void 0:n["share-types"].length)>1)return a;if(c.includes(M.Z.SHARE_TYPE_LINK)||c.includes(M.Z.SHARE_TYPE_EMAIL))return o;if(c.includes(M.Z.SHARE_TYPE_GROUP)||c.includes(M.Z.SHARE_TYPE_REMOTE_GROUP))return s;if(c.includes(M.Z.SHARE_TYPE_CIRCLE))return'';const p=null==u||null===(r=u.attributes)||void 0===r?void 0:r["owner-id"];return p&&(p!==(null===(h=(0,d.HW)())||void 0===h?void 0:h.uid)||$(u))?function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=J?"/avatar/{userId}/32/dark":"/avatar/{userId}/32",n=(0,l.Jv)(t?i:i+"?guestFallback=true",{userId:e});return'')}(p,$(u)):a},enabled(e){var t,i,r;if(1!==e.length)return!1;const s=e[0],a=null==s||null===(t=s.attributes)||void 0===t?void 0:t["owner-id"];return!!Array.isArray(null===(i=s.attributes)||void 0===i?void 0:i["share-types"])||!(!a||a===(null===(r=(0,d.HW)())||void 0===r?void 0:r.uid)&&!$(s))||0!=(s.permissions&n.aX.SHARE)},async exec(e,t,i){var r,s;return 0!=(e.permissions&n.aX.READ)?(null===(r=window.OCA)||void 0===r||null===(r=r.Files)||void 0===r||null===(r=r.Sidebar)||void 0===r||null===(s=r.setActiveTab)||void 0===s||s.call(r,"sharing"),P.exec(e,t,i)):null},inline:()=>!0});(0,n.Gg)(Q),(()=>{const e=(0,n.bh)();e.register(new n.Ss({id:A,name:(0,r.Tl)("files_sharing","Shares"),caption:(0,r.Tl)("files_sharing","Overview of shared files."),emptyTitle:(0,r.Tl)("files_sharing","No shares"),emptyCaption:(0,r.Tl)("files_sharing","Files and folders you shared or have been shared with you will show up here"),icon:a,order:20,columns:[],getContents:()=>f()})),e.register(new n.Ss({id:y,name:(0,r.Tl)("files_sharing","Shared with you"),caption:(0,r.Tl)("files_sharing","List of files that are shared with you."),emptyTitle:(0,r.Tl)("files_sharing","Nothing shared with you yet"),emptyCaption:(0,r.Tl)("files_sharing","Files and folders others shared with you will show up here"),icon:'',order:1,parent:A,columns:[],getContents:()=>f(!0,!1,!1,!1)})),e.register(new n.Ss({id:_,name:(0,r.Tl)("files_sharing","Shared with others"),caption:(0,r.Tl)("files_sharing","List of files that you shared with others."),emptyTitle:(0,r.Tl)("files_sharing","Nothing shared yet"),emptyCaption:(0,r.Tl)("files_sharing","Files and folders you shared will show up here"),icon:s,order:2,parent:A,columns:[],getContents:()=>f(!1,!0,!1,!1)})),e.register(new n.Ss({id:C,name:(0,r.Tl)("files_sharing","Shared by link"),caption:(0,r.Tl)("files_sharing","List of files that are shared by link."),emptyTitle:(0,r.Tl)("files_sharing","No shared links"),emptyCaption:(0,r.Tl)("files_sharing","Files and folders you shared by link will show up here"),icon:o,order:3,parent:A,columns:[],getContents:()=>f(!1,!0,!1,!1,[window.OC.Share.SHARE_TYPE_LINK])})),e.register(new n.Ss({id:b,name:(0,r.Tl)("files_sharing","Deleted shares"),caption:(0,r.Tl)("files_sharing","List of shares you left."),emptyTitle:(0,r.Tl)("files_sharing","No deleted shares"),emptyCaption:(0,r.Tl)("files_sharing","Shares you have left will show up here"),icon:'',order:4,parent:A,columns:[],getContents:()=>f(!1,!1,!1,!0)})),e.register(new n.Ss({id:T,name:(0,r.Tl)("files_sharing","Pending shares"),caption:(0,r.Tl)("files_sharing","List of unapproved shares."),emptyTitle:(0,r.Tl)("files_sharing","No pending shares"),emptyCaption:(0,r.Tl)("files_sharing","Shares you have received but not approved will show up here"),icon:'',order:5,parent:A,columns:[],getContents:()=>f(!1,!1,!0,!1)}))})(),(0,n.Yc)("nc:share-attributes",{nc:"http://nextcloud.org/ns"}),(0,n.Yc)("oc:share-types",{oc:"http://owncloud.org/ns"}),(0,n.Yc)("ocs:share-permissions",{ocs:"http://open-collaboration-services.org/ns"})},8132:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(71354),r=i.n(n),s=i(76314),a=i.n(s)()(r());a.push([e.id,".action-items>.files-list__row-action-sharing-status{direction:rtl;padding-right:0 !important}svg.sharing-status__avatar{height:32px !important;width:32px !important;max-height:32px !important;max-width:32px !important;border-radius:32px;overflow:hidden}","",{version:3,sources:["webpack://./apps/files_sharing/src/actions/sharingStatusAction.scss"],names:[],mappings:"AAsBA,qDAEC,aAAA,CAEG,0BAAA,CAGJ,2BACC,sBAAA,CACA,qBAAA,CACA,0BAAA,CACA,yBAAA,CACA,kBAAA,CACA,eAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\n // Only when rendered inline, when not enough space, this is put in the menu\n.action-items > .files-list__row-action-sharing-status {\n\t// put icon at the end of the button\n\tdirection: rtl;\n\t// align icons with textless inline actions\n padding-right: 0 !important;\n}\n\nsvg.sharing-status__avatar {\n\theight: 32px !important;\n\twidth: 32px !important;\n\tmax-height: 32px !important;\n\tmax-width: 32px !important;\n\tborder-radius: 32px;\n\toverflow: hidden;\n}\n"],sourceRoot:""}]);const o=a}},r={};function s(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(i.exports,i,i.exports,s),i.loaded=!0,i.exports}s.m=n,e=[],s.O=(t,i,n,r)=>{if(!i){var a=1/0;for(h=0;h=r)&&Object.keys(s.O).every((e=>s.O[e](i[l])))?i.splice(l--,1):(o=!1,r0&&e[h-1][2]>r;h--)e[h]=e[h-1];e[h]=[i,n,r]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,i)=>(s.f[i](e,t),t)),[])),s.u=e=>e+"-"+e+".js?v=6797210df0f1d53f94c4",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},i="nextcloud:",s.l=(e,n,r,a)=>{if(t[e])t[e].push(n);else{var o,l;if(void 0!==r)for(var d=document.getElementsByTagName("script"),h=0;h{o.onerror=o.onload=null,clearTimeout(p);var r=t[e];if(delete t[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach((e=>e(n))),i)return i(n)},p=setTimeout(c.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=c.bind(null,o.onerror),o.onload=c.bind(null,o.onload),l&&document.head.appendChild(o)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.j=5928,(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var n=i.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=i[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),(()=>{s.b=document.baseURI||self.location.href;var e={5928:0};s.f.j=(t,i)=>{var n=s.o(e,t)?e[t]:void 0;if(0!==n)if(n)i.push(n[2]);else{var r=new Promise(((i,r)=>n=e[t]=[i,r]));i.push(n[2]=r);var a=s.p+s.u(t),o=new Error;s.l(a,(i=>{if(s.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var r=i&&("load"===i.type?"missing":i.type),a=i&&i.target&&i.target.src;o.message="Loading chunk "+t+" failed.\n("+r+": "+a+")",o.name="ChunkLoadError",o.type=r,o.request=a,n[1](o)}}),"chunk-"+t,t)}},s.O.j=t=>0===e[t];var t=(t,i)=>{var n,r,a=i[0],o=i[1],l=i[2],d=0;if(a.some((t=>0!==e[t]))){for(n in o)s.o(o,n)&&(s.m[n]=o[n]);if(l)var h=l(s)}for(t&&t(i);ds(67597)));a=s.O(a)})(); -//# sourceMappingURL=files_sharing-init.js.map?v=e8ebd4d69d5c9f326b57 \ No newline at end of file +(()=>{"use strict";var e,t,i,n={67597:(e,t,i)=>{var n=i(31346),r=i(53334);const s='',a='',o='';var l=i(63814),d=i(21777),h=i(65043),u=i(35947);const c=(0,u.YK)().setApp("files_sharing").detectUser().build();var p;const v="/files/".concat(null===(p=(0,d.HW)())||void 0===p?void 0:p.uid),g={"Content-Type":"application/json"},m=async function(e){try{var t;if(void 0!==(null==e?void 0:e.remote_id)){if(!e.mimetype){const t=(await i.e(857).then(i.bind(i,10857))).default;e.mimetype=t.getType(e.name)}e.item_type=e.type||(e.mimetype?"file":"folder"),e.item_mtime=e.mtime,e.file_target=e.file_target||e.mountpoint,e.item_permissions=n.aX.NONE,e.permissions=n.aX.NONE,e.uid_owner=e.owner,e.displayname_owner=e.owner}const r="folder"===(null==e?void 0:e.item_type),s=!0===(null==e?void 0:e.has_preview),a=r?n.vd:n.ZH,o=e.file_source||e.file_id||e.id,d=e.path||e.file_target||e.name,h=(0,l.dC)("dav/".concat(v,"/").concat(d).replaceAll(/\/\//gm,"/"));let u=e.item_mtime?new Date(1e3*e.item_mtime):void 0;return(null==e?void 0:e.stime)>((null==e?void 0:e.item_mtime)||0)&&(u=new Date(1e3*e.stime)),new a({id:o,source:h,owner:null==e?void 0:e.uid_owner,mime:(null==e?void 0:e.mimetype)||"application/octet-stream",mtime:u,size:null==e?void 0:e.item_size,permissions:(null==e?void 0:e.item_permissions)||(null==e?void 0:e.permissions),root:v,attributes:{...e,"has-preview":s,"owner-id":null==e?void 0:e.uid_owner,"owner-display-name":null==e?void 0:e.displayname_owner,"share-types":null==e?void 0:e.share_type,"share-attributes":(null==e?void 0:e.attributes)||"[]",favorite:null!=e&&null!==(t=e.tags)&&void 0!==t&&t.includes(window.OC.TAG_FAVORITE)?1:0}})}catch(e){return c.error("Error while parsing OCS entry",{error:e}),null}},w=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=(0,l.KT)("apps/files_sharing/api/v1/shares");return h.Ay.get(t,{headers:g,params:{shared_with_me:e,include_tags:!0}})},f=async function(){var e;let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const a=[];(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&a.push(w(!0),function(){const e=(0,l.KT)("apps/files_sharing/api/v1/remote_shares");return h.Ay.get(e,{headers:g,params:{include_tags:!0}})}()),t&&a.push(w()),i&&a.push(function(){const e=(0,l.KT)("apps/files_sharing/api/v1/shares/pending");return h.Ay.get(e,{headers:g,params:{include_tags:!0}})}(),function(){const e=(0,l.KT)("apps/files_sharing/api/v1/remote_shares/pending");return h.Ay.get(e,{headers:g,params:{include_tags:!0}})}()),r&&a.push(function(){const e=(0,l.KT)("apps/files_sharing/api/v1/deletedshares");return h.Ay.get(e,{headers:g,params:{include_tags:!0}})}());const o=(await Promise.all(a)).map((e=>e.data.ocs.data)).flat();let u=(await Promise.all(o.map(m))).filter((e=>null!==e));var c,p;return s.length>0&&(u=u.filter((e=>{var t;return s.includes(null===(t=e.attributes)||void 0===t?void 0:t.share_type)}))),u=(c=u,p="source",Object.values(c.reduce((function(e,t){return(e[t[p]]=e[t[p]]||[]).push(t),e}),{}))).map((e=>{const t=e[0];return t.attributes["share-types"]=e.map((e=>e.attributes["share-types"])),t})),{folder:new n.vd({id:0,source:(0,l.dC)("dav"+v),owner:(null===(e=(0,d.HW)())||void 0===e?void 0:e.uid)||null}),contents:u}},A="shareoverview",y="sharingin",_="sharingout",b="sharinglinks",C="deletedshares",T="pendingshares";var x=i(61338),S=i(65659);const H=new n.hY({id:"accept-share",displayName:e=>(0,r.zw)("files_sharing","Accept share","Accept shares",e.length),iconSvgInline:()=>S,enabled:(e,t)=>e.length>0&&t.id===T,async exec(e){try{const t=!!e.attributes.remote,i=(0,l.KT)("apps/files_sharing/api/v1/{shareBase}/pending/{id}",{shareBase:t?"remote_shares":"shares",id:e.attributes.id});return await h.Ay.post(i),(0,x.Ic)("files:node:deleted",e),!0}catch(e){return!1}},async execBatch(e,t,i){return Promise.all(e.map((e=>this.exec(e,t,i))))},order:1,inline:()=>!0});(0,n.Gg)(H);const E=new n.hY({id:"open-in-files",displayName:()=>(0,r.Tl)("files","Open in Files"),iconSvgInline:()=>"",enabled:(e,t)=>[A,y,_,b].includes(t.id),async exec(e){const t=e.type===n.pt.Folder;return window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:String(e.fileid)},{dir:t?e.path:e.dirname,openfile:t?void 0:"true"}),null},order:-1e3,default:n.m9.HIDDEN});(0,n.Gg)(E);const O=new n.hY({id:"reject-share",displayName:e=>(0,r.zw)("files_sharing","Reject share","Reject shares",e.length),iconSvgInline:()=>'',enabled:(e,t)=>t.id===T&&0!==e.length&&!e.some((e=>e.attributes.remote_id&&e.attributes.share_type===window.OC.Share.SHARE_TYPE_REMOTE_GROUP)),async exec(e){try{const t=!!e.attributes.remote,i=(0,l.KT)("apps/files_sharing/api/v1/{shareBase}/{id}",{shareBase:t?"remote_shares":"shares",id:e.attributes.id});return await h.Ay.delete(i),(0,x.Ic)("files:node:deleted",e),!0}catch(e){return!1}},async execBatch(e,t,i){return Promise.all(e.map((e=>this.exec(e,t,i))))},order:2,inline:()=>!0});(0,n.Gg)(O);const L=new n.hY({id:"restore-share",displayName:e=>(0,r.zw)("files_sharing","Restore share","Restore shares",e.length),iconSvgInline:()=>'',enabled:(e,t)=>e.length>0&&t.id===C,async exec(e){try{const t=(0,l.KT)("apps/files_sharing/api/v1/deletedshares/{id}",{id:e.attributes.id});return await h.Ay.post(t),(0,x.Ic)("files:node:deleted",e),!0}catch(e){return!1}},async execBatch(e,t,i){return Promise.all(e.map((e=>this.exec(e,t,i))))},order:1,inline:()=>!0});(0,n.Gg)(L);var M=i(77905),V=i(49981);const N=(0,u.YK)().setApp("files").detectUser().build(),P=new n.hY({id:"details",displayName:()=>(0,r.Tl)("files","Open details"),iconSvgInline:()=>V,enabled:e=>{var t,i,r;return 1===e.length&&!!e[0]&&!(null===(t=window)||void 0===t||null===(t=t.OCA)||void 0===t||null===(t=t.Files)||void 0===t||!t.Sidebar)&&null!==(i=(null===(r=e[0].root)||void 0===r?void 0:r.startsWith("/files/"))&&e[0].permissions!==n.aX.NONE)&&void 0!==i&&i},async exec(e,t,i){try{return await window.OCA.Files.Sidebar.open(e.path),window.OCP.Files.Router.goToRoute(null,{view:t.id,fileid:e.fileid},{...window.OCP.Files.Router.query,dir:i},!0),null}catch(e){return N.error("Error while opening sidebar",{error:e}),!1}},order:-50});var R,k,B=i(85072),I=i.n(B),Y=i(97825),j=i.n(Y),F=i(77659),G=i.n(F),Z=i(55056),K=i.n(Z),U=i(10540),D=i.n(U),W=i(41113),q=i.n(W),z=i(8132),X={};X.styleTagTransform=q(),X.setAttributes=K(),X.insert=G().bind(null,"head"),X.domAPI=j(),X.insertStyleElement=D(),I()(z.A,X),z.A&&z.A.locals&&z.A.locals;const J=!0===(null===(R=window)||void 0===R||null===(k=R.matchMedia)||void 0===k||null===(k=k.call(R,"(prefers-color-scheme: dark)"))||void 0===k?void 0:k.matches)||null!==document.querySelector("[data-themes*=dark]"),$=e=>void 0!==e.attributes.remote_id,Q=new n.hY({id:"sharing-status",displayName(e){var t,i,n;const s=e[0],a=Object.values((null==s||null===(t=s.attributes)||void 0===t?void 0:t["share-types"])||{}).flat(),o=null==s||null===(i=s.attributes)||void 0===i?void 0:i["owner-id"];return a.length>0||o!==(null===(n=(0,d.HW)())||void 0===n?void 0:n.uid)||$(s)?(0,r.Tl)("files_sharing","Shared"):""},title(e){var t,i,n,s,a;const o=e[0],l=null==o||null===(t=o.attributes)||void 0===t?void 0:t["owner-id"],h=null==o||null===(i=o.attributes)||void 0===i?void 0:i["owner-display-name"];return Array.isArray(null===(n=o.attributes)||void 0===n?void 0:n["share-types"])&&(null===(s=o.attributes)||void 0===s?void 0:s["share-types"].length)>1?(0,r.Tl)("files_sharing","Shared multiple times with different people"):l&&(l!==(null===(a=(0,d.HW)())||void 0===a?void 0:a.uid)||$(o))?(0,r.Tl)("files_sharing","Shared by {ownerDisplayName}",{ownerDisplayName:h}):(0,r.Tl)("files_sharing","Show sharing options")},iconSvgInline(e){var t,i,n,r,h;const u=e[0],c=Object.values((null==u||null===(t=u.attributes)||void 0===t?void 0:t["share-types"])||{}).flat();if(Array.isArray(null===(i=u.attributes)||void 0===i?void 0:i["share-types"])&&(null===(n=u.attributes)||void 0===n?void 0:n["share-types"].length)>1)return a;if(c.includes(M.Z.SHARE_TYPE_LINK)||c.includes(M.Z.SHARE_TYPE_EMAIL))return o;if(c.includes(M.Z.SHARE_TYPE_GROUP)||c.includes(M.Z.SHARE_TYPE_REMOTE_GROUP))return s;if(c.includes(M.Z.SHARE_TYPE_CIRCLE))return'';const p=null==u||null===(r=u.attributes)||void 0===r?void 0:r["owner-id"];return p&&(p!==(null===(h=(0,d.HW)())||void 0===h?void 0:h.uid)||$(u))?function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=J?"/avatar/{userId}/32/dark":"/avatar/{userId}/32",n=(0,l.Jv)(t?i:i+"?guestFallback=true",{userId:e});return'')}(p,$(u)):a},enabled(e){var t,i,r;if(1!==e.length)return!1;const s=e[0],a=null==s||null===(t=s.attributes)||void 0===t?void 0:t["owner-id"];return!!Array.isArray(null===(i=s.attributes)||void 0===i?void 0:i["share-types"])||!(!a||a===(null===(r=(0,d.HW)())||void 0===r?void 0:r.uid)&&!$(s))||0!=(s.permissions&n.aX.SHARE)},async exec(e,t,i){var r,s;return 0!=(e.permissions&n.aX.READ)?(null===(r=window.OCA)||void 0===r||null===(r=r.Files)||void 0===r||null===(r=r.Sidebar)||void 0===r||null===(s=r.setActiveTab)||void 0===s||s.call(r,"sharing"),P.exec(e,t,i)):null},inline:()=>!0});(0,n.Gg)(Q),(()=>{const e=(0,n.bh)();e.register(new n.Ss({id:A,name:(0,r.Tl)("files_sharing","Shares"),caption:(0,r.Tl)("files_sharing","Overview of shared files."),emptyTitle:(0,r.Tl)("files_sharing","No shares"),emptyCaption:(0,r.Tl)("files_sharing","Files and folders you shared or have been shared with you will show up here"),icon:a,order:20,columns:[],getContents:()=>f()})),e.register(new n.Ss({id:y,name:(0,r.Tl)("files_sharing","Shared with you"),caption:(0,r.Tl)("files_sharing","List of files that are shared with you."),emptyTitle:(0,r.Tl)("files_sharing","Nothing shared with you yet"),emptyCaption:(0,r.Tl)("files_sharing","Files and folders others shared with you will show up here"),icon:'',order:1,parent:A,columns:[],getContents:()=>f(!0,!1,!1,!1)})),e.register(new n.Ss({id:_,name:(0,r.Tl)("files_sharing","Shared with others"),caption:(0,r.Tl)("files_sharing","List of files that you shared with others."),emptyTitle:(0,r.Tl)("files_sharing","Nothing shared yet"),emptyCaption:(0,r.Tl)("files_sharing","Files and folders you shared will show up here"),icon:s,order:2,parent:A,columns:[],getContents:()=>f(!1,!0,!1,!1)})),e.register(new n.Ss({id:b,name:(0,r.Tl)("files_sharing","Shared by link"),caption:(0,r.Tl)("files_sharing","List of files that are shared by link."),emptyTitle:(0,r.Tl)("files_sharing","No shared links"),emptyCaption:(0,r.Tl)("files_sharing","Files and folders you shared by link will show up here"),icon:o,order:3,parent:A,columns:[],getContents:()=>f(!1,!0,!1,!1,[window.OC.Share.SHARE_TYPE_LINK])})),e.register(new n.Ss({id:C,name:(0,r.Tl)("files_sharing","Deleted shares"),caption:(0,r.Tl)("files_sharing","List of shares you left."),emptyTitle:(0,r.Tl)("files_sharing","No deleted shares"),emptyCaption:(0,r.Tl)("files_sharing","Shares you have left will show up here"),icon:'',order:4,parent:A,columns:[],getContents:()=>f(!1,!1,!1,!0)})),e.register(new n.Ss({id:T,name:(0,r.Tl)("files_sharing","Pending shares"),caption:(0,r.Tl)("files_sharing","List of unapproved shares."),emptyTitle:(0,r.Tl)("files_sharing","No pending shares"),emptyCaption:(0,r.Tl)("files_sharing","Shares you have received but not approved will show up here"),icon:'',order:5,parent:A,columns:[],getContents:()=>f(!1,!1,!0,!1)}))})(),(0,n.Yc)("nc:share-attributes",{nc:"http://nextcloud.org/ns"}),(0,n.Yc)("oc:share-types",{oc:"http://owncloud.org/ns"}),(0,n.Yc)("ocs:share-permissions",{ocs:"http://open-collaboration-services.org/ns"})},8132:(e,t,i)=>{i.d(t,{A:()=>o});var n=i(71354),r=i.n(n),s=i(76314),a=i.n(s)()(r());a.push([e.id,".action-items>.files-list__row-action-sharing-status{direction:rtl;padding-right:0 !important}svg.sharing-status__avatar{height:32px !important;width:32px !important;max-height:32px !important;max-width:32px !important;border-radius:32px;overflow:hidden}","",{version:3,sources:["webpack://./apps/files_sharing/src/actions/sharingStatusAction.scss"],names:[],mappings:"AAsBA,qDAEC,aAAA,CAEG,0BAAA,CAGJ,2BACC,sBAAA,CACA,qBAAA,CACA,0BAAA,CACA,yBAAA,CACA,kBAAA,CACA,eAAA",sourcesContent:["/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\n // Only when rendered inline, when not enough space, this is put in the menu\n.action-items > .files-list__row-action-sharing-status {\n\t// put icon at the end of the button\n\tdirection: rtl;\n\t// align icons with textless inline actions\n padding-right: 0 !important;\n}\n\nsvg.sharing-status__avatar {\n\theight: 32px !important;\n\twidth: 32px !important;\n\tmax-height: 32px !important;\n\tmax-width: 32px !important;\n\tborder-radius: 32px;\n\toverflow: hidden;\n}\n"],sourceRoot:""}]);const o=a}},r={};function s(e){var t=r[e];if(void 0!==t)return t.exports;var i=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(i.exports,i,i.exports,s),i.loaded=!0,i.exports}s.m=n,e=[],s.O=(t,i,n,r)=>{if(!i){var a=1/0;for(h=0;h=r)&&Object.keys(s.O).every((e=>s.O[e](i[l])))?i.splice(l--,1):(o=!1,r0&&e[h-1][2]>r;h--)e[h]=e[h-1];e[h]=[i,n,r]},s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var i in t)s.o(t,i)&&!s.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,i)=>(s.f[i](e,t),t)),[])),s.u=e=>e+"-"+e+".js?v=6797210df0f1d53f94c4",s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),t={},i="nextcloud:",s.l=(e,n,r,a)=>{if(t[e])t[e].push(n);else{var o,l;if(void 0!==r)for(var d=document.getElementsByTagName("script"),h=0;h{o.onerror=o.onload=null,clearTimeout(p);var r=t[e];if(delete t[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach((e=>e(n))),i)return i(n)},p=setTimeout(c.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=c.bind(null,o.onerror),o.onload=c.bind(null,o.onload),l&&document.head.appendChild(o)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),s.j=5928,(()=>{var e;s.g.importScripts&&(e=s.g.location+"");var t=s.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var n=i.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=i[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),s.p=e})(),(()=>{s.b=document.baseURI||self.location.href;var e={5928:0};s.f.j=(t,i)=>{var n=s.o(e,t)?e[t]:void 0;if(0!==n)if(n)i.push(n[2]);else{var r=new Promise(((i,r)=>n=e[t]=[i,r]));i.push(n[2]=r);var a=s.p+s.u(t),o=new Error;s.l(a,(i=>{if(s.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var r=i&&("load"===i.type?"missing":i.type),a=i&&i.target&&i.target.src;o.message="Loading chunk "+t+" failed.\n("+r+": "+a+")",o.name="ChunkLoadError",o.type=r,o.request=a,n[1](o)}}),"chunk-"+t,t)}},s.O.j=t=>0===e[t];var t=(t,i)=>{var n,r,a=i[0],o=i[1],l=i[2],d=0;if(a.some((t=>0!==e[t]))){for(n in o)s.o(o,n)&&(s.m[n]=o[n]);if(l)var h=l(s)}for(t&&t(i);ds(67597)));a=s.O(a)})(); +//# sourceMappingURL=files_sharing-init.js.map?v=c3ea8ac49b16856db482 \ No newline at end of file diff --git a/dist/files_sharing-init.js.map b/dist/files_sharing-init.js.map index 79b7c8c90576f..74221f3e98cd5 100644 --- a/dist/files_sharing-init.js.map +++ b/dist/files_sharing-init.js.map @@ -1 +1 @@ -{"version":3,"file":"files_sharing-init.js?v=e8ebd4d69d5c9f326b57","mappings":";uBAAIA,ECAAC,EACAC,02CCqBJ,SAAeC,EAAAA,EAAAA,MACVC,OAAO,iBACPC,aACAC,cCpBE,MAAMC,EAAW,UAAHC,OAA6B,QAA7BC,GAAaC,EAAAA,EAAAA,aAAgB,IAAAD,OAAA,EAAhBA,EAAkBE,KAC9CC,EAAU,CACZ,eAAgB,oBAEdC,EAAiBC,eAAgBC,GACnC,IAAI,IAAAC,EAEA,QAA4BC,KAAxBF,aAAQ,EAARA,EAAUG,WAAyB,CACnC,MAAMC,SAAc,gCAAgBC,QAEpCL,EAASM,SAAWF,EAAKG,QAAQP,EAASQ,MAC1CR,EAASS,UAAYT,EAASM,SAAW,OAAS,SAElDN,EAASU,iBAAmBC,EAAAA,GAAWC,KACvCZ,EAASa,YAAcF,EAAAA,GAAWC,KAClCZ,EAASc,UAAYd,EAASe,MAE9Bf,EAASgB,kBAAoBhB,EAASe,KAC1C,CACA,MAAME,EAAmC,YAAxBjB,aAAQ,EAARA,EAAUS,WACrBS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EAAK,GACnB8O,EAAU9O,EAAK,GAGI0J,EAAI,EAC3B,GAAGL,EAAS5F,MAAMtG,GAAgC,IAAxB+Q,EAAgB/Q,KAAa,CACtD,IAAI0L,KAAYgG,EACZjG,EAAoB0B,EAAEuE,EAAahG,KACrCD,EAAoBM,EAAEL,GAAYgG,EAAYhG,IAGhD,GAAGiG,EAAS,IAAI1F,EAAS0F,EAAQlG,EAClC,CAEA,IADGgG,GAA4BA,EAA2B5O,GACrD0J,EAAIL,EAASxK,OAAQ6K,IACzBiB,EAAUtB,EAASK,GAChBd,EAAoB0B,EAAE4D,EAAiBvD,IAAYuD,EAAgBvD,IACrEuD,EAAgBvD,GAAS,KAE1BuD,EAAgBvD,GAAW,EAE5B,OAAO/B,EAAoBO,EAAEC,EAAO,EAGjC2F,EAAqBf,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1Fe,EAAmBrC,QAAQiC,EAAqB/B,KAAK,KAAM,IAC3DmC,EAAmBpP,KAAOgP,EAAqB/B,KAAK,KAAMmC,EAAmBpP,KAAKiN,KAAKmC,QCvFvFnG,EAAoBL,QAAK3M,ECGzB,IAAIoT,EAAsBpG,EAAoBO,OAAEvN,EAAW,CAAC,OAAO,IAAOgN,EAAoB,SAC9FoG,EAAsBpG,EAAoBO,EAAE6F","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/files_sharing/src/services/logger.ts","webpack:///nextcloud/apps/files_sharing/src/services/SharingService.ts","webpack:///nextcloud/apps/files_sharing/src/views/shares.ts","webpack:///nextcloud/apps/files_sharing/src/actions/acceptShareAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/openInFilesAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/rejectShareAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/restoreShareAction.ts","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files/src/actions/sidebarAction.ts","webpack://nextcloud/./apps/files_sharing/src/actions/sharingStatusAction.scss?3ea7","webpack:///nextcloud/apps/files_sharing/src/actions/sharingStatusAction.ts","webpack:///nextcloud/apps/files_sharing/src/init.ts","webpack:///nextcloud/apps/files_sharing/src/actions/sharingStatusAction.scss","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger';\nexport default getLoggerBuilder()\n .setApp('files_sharing')\n .detectUser()\n .build();\n","import { Folder, File, Permission } from '@nextcloud/files';\nimport { generateOcsUrl, generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport axios from '@nextcloud/axios';\nimport logger from './logger';\nexport const rootPath = `/files/${getCurrentUser()?.uid}`;\nconst headers = {\n 'Content-Type': 'application/json',\n};\nconst ocsEntryToNode = async function (ocsEntry) {\n try {\n // Federated share handling\n if (ocsEntry?.remote_id !== undefined) {\n const mime = (await import('mime')).default;\n // This won't catch files without an extension, but this is the best we can do\n ocsEntry.mimetype = mime.getType(ocsEntry.name);\n ocsEntry.item_type = ocsEntry.mimetype ? 'file' : 'folder';\n // Need to set permissions to NONE for federated shares\n ocsEntry.item_permissions = Permission.NONE;\n ocsEntry.permissions = Permission.NONE;\n ocsEntry.uid_owner = ocsEntry.owner;\n // TODO: have the real display name stored somewhere\n ocsEntry.displayname_owner = ocsEntry.owner;\n }\n const isFolder = ocsEntry?.item_type === 'folder';\n const hasPreview = ocsEntry?.has_preview === true;\n const Node = isFolder ? Folder : File;\n // If this is an external share that is not yet accepted,\n // we don't have an id. We can fallback to the row id temporarily\n const fileid = ocsEntry.file_source || ocsEntry.id;\n // Generate path and strip double slashes\n const path = ocsEntry?.path || ocsEntry.file_target || ocsEntry.name;\n const source = generateRemoteUrl(`dav/${rootPath}/${path}`.replaceAll(/\\/\\//gm, '/'));\n // Prefer share time if more recent than item mtime\n let mtime = ocsEntry?.item_mtime ? new Date((ocsEntry.item_mtime) * 1000) : undefined;\n if (ocsEntry?.stime > (ocsEntry?.item_mtime || 0)) {\n mtime = new Date((ocsEntry.stime) * 1000);\n }\n return new Node({\n id: fileid,\n source,\n owner: ocsEntry?.uid_owner,\n mime: ocsEntry?.mimetype || 'application/octet-stream',\n mtime,\n size: ocsEntry?.item_size,\n permissions: ocsEntry?.item_permissions || ocsEntry?.permissions,\n root: rootPath,\n attributes: {\n ...ocsEntry,\n 'has-preview': hasPreview,\n // Also check the sharingStatusAction.ts code\n 'owner-id': ocsEntry?.uid_owner,\n 'owner-display-name': ocsEntry?.displayname_owner,\n 'share-types': ocsEntry?.share_type,\n favorite: ocsEntry?.tags?.includes(window.OC.TAG_FAVORITE) ? 1 : 0,\n },\n });\n }\n catch (error) {\n logger.error('Error while parsing OCS entry', { error });\n return null;\n }\n};\nconst getShares = function (shared_with_me = false) {\n const url = generateOcsUrl('apps/files_sharing/api/v1/shares');\n return axios.get(url, {\n headers,\n params: {\n shared_with_me,\n include_tags: true,\n },\n });\n};\nconst getSharedWithYou = function () {\n return getShares(true);\n};\nconst getSharedWithOthers = function () {\n return getShares();\n};\nconst getRemoteShares = function () {\n const url = generateOcsUrl('apps/files_sharing/api/v1/remote_shares');\n return axios.get(url, {\n headers,\n params: {\n include_tags: true,\n },\n });\n};\nconst getPendingShares = function () {\n const url = generateOcsUrl('apps/files_sharing/api/v1/shares/pending');\n return axios.get(url, {\n headers,\n params: {\n include_tags: true,\n },\n });\n};\nconst getRemotePendingShares = function () {\n const url = generateOcsUrl('apps/files_sharing/api/v1/remote_shares/pending');\n return axios.get(url, {\n headers,\n params: {\n include_tags: true,\n },\n });\n};\nconst getDeletedShares = function () {\n const url = generateOcsUrl('apps/files_sharing/api/v1/deletedshares');\n return axios.get(url, {\n headers,\n params: {\n include_tags: true,\n },\n });\n};\n/**\n * Group an array of objects (here Nodes) by a key\n * and return an array of arrays of them.\n */\nconst groupBy = function (nodes, key) {\n return Object.values(nodes.reduce(function (acc, curr) {\n (acc[curr[key]] = acc[curr[key]] || []).push(curr);\n return acc;\n }, {}));\n};\nexport const getContents = async (sharedWithYou = true, sharedWithOthers = true, pendingShares = false, deletedshares = false, filterTypes = []) => {\n const promises = [];\n if (sharedWithYou) {\n promises.push(getSharedWithYou(), getRemoteShares());\n }\n if (sharedWithOthers) {\n promises.push(getSharedWithOthers());\n }\n if (pendingShares) {\n promises.push(getPendingShares(), getRemotePendingShares());\n }\n if (deletedshares) {\n promises.push(getDeletedShares());\n }\n const responses = await Promise.all(promises);\n const data = responses.map((response) => response.data.ocs.data).flat();\n let contents = (await Promise.all(data.map(ocsEntryToNode)))\n .filter((node) => node !== null);\n if (filterTypes.length > 0) {\n contents = contents.filter((node) => filterTypes.includes(node.attributes?.share_type));\n }\n // Merge duplicate shares and group their attributes\n // Also check the sharingStatusAction.ts code\n contents = groupBy(contents, 'source').map((nodes) => {\n const node = nodes[0];\n node.attributes['share-types'] = nodes.map(node => node.attributes['share-types']);\n return node;\n });\n return {\n folder: new Folder({\n id: 0,\n source: generateRemoteUrl('dav' + rootPath),\n owner: getCurrentUser()?.uid || null,\n }),\n contents,\n };\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport { View, getNavigation } from '@nextcloud/files';\nimport AccountClockSvg from '@mdi/svg/svg/account-clock.svg?raw';\nimport AccountGroupSvg from '@mdi/svg/svg/account-group.svg?raw';\nimport AccountPlusSvg from '@mdi/svg/svg/account-plus.svg?raw';\nimport AccountSvg from '@mdi/svg/svg/account.svg?raw';\nimport DeleteSvg from '@mdi/svg/svg/delete.svg?raw';\nimport LinkSvg from '@mdi/svg/svg/link.svg?raw';\nimport { getContents } from '../services/SharingService';\nexport const sharesViewId = 'shareoverview';\nexport const sharedWithYouViewId = 'sharingin';\nexport const sharedWithOthersViewId = 'sharingout';\nexport const sharingByLinksViewId = 'sharinglinks';\nexport const deletedSharesViewId = 'deletedshares';\nexport const pendingSharesViewId = 'pendingshares';\nexport default () => {\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: sharesViewId,\n name: t('files_sharing', 'Shares'),\n caption: t('files_sharing', 'Overview of shared files.'),\n emptyTitle: t('files_sharing', 'No shares'),\n emptyCaption: t('files_sharing', 'Files and folders you shared or have been shared with you will show up here'),\n icon: AccountPlusSvg,\n order: 20,\n columns: [],\n getContents: () => getContents(),\n }));\n Navigation.register(new View({\n id: sharedWithYouViewId,\n name: t('files_sharing', 'Shared with you'),\n caption: t('files_sharing', 'List of files that are shared with you.'),\n emptyTitle: t('files_sharing', 'Nothing shared with you yet'),\n emptyCaption: t('files_sharing', 'Files and folders others shared with you will show up here'),\n icon: AccountSvg,\n order: 1,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(true, false, false, false),\n }));\n Navigation.register(new View({\n id: sharedWithOthersViewId,\n name: t('files_sharing', 'Shared with others'),\n caption: t('files_sharing', 'List of files that you shared with others.'),\n emptyTitle: t('files_sharing', 'Nothing shared yet'),\n emptyCaption: t('files_sharing', 'Files and folders you shared will show up here'),\n icon: AccountGroupSvg,\n order: 2,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(false, true, false, false),\n }));\n Navigation.register(new View({\n id: sharingByLinksViewId,\n name: t('files_sharing', 'Shared by link'),\n caption: t('files_sharing', 'List of files that are shared by link.'),\n emptyTitle: t('files_sharing', 'No shared links'),\n emptyCaption: t('files_sharing', 'Files and folders you shared by link will show up here'),\n icon: LinkSvg,\n order: 3,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(false, true, false, false, [window.OC.Share.SHARE_TYPE_LINK]),\n }));\n Navigation.register(new View({\n id: deletedSharesViewId,\n name: t('files_sharing', 'Deleted shares'),\n caption: t('files_sharing', 'List of shares you left.'),\n emptyTitle: t('files_sharing', 'No deleted shares'),\n emptyCaption: t('files_sharing', 'Shares you have left will show up here'),\n icon: DeleteSvg,\n order: 4,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(false, false, false, true),\n }));\n Navigation.register(new View({\n id: pendingSharesViewId,\n name: t('files_sharing', 'Pending shares'),\n caption: t('files_sharing', 'List of unapproved shares.'),\n emptyTitle: t('files_sharing', 'No pending shares'),\n emptyCaption: t('files_sharing', 'Shares you have received but not approved will show up here'),\n icon: AccountClockSvg,\n order: 5,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(false, false, true, false),\n }));\n};\n","import { emit } from '@nextcloud/event-bus';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { registerFileAction, FileAction } from '@nextcloud/files';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport CheckSvg from '@mdi/svg/svg/check.svg?raw';\nimport { pendingSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n id: 'accept-share',\n displayName: (nodes) => n('files_sharing', 'Accept share', 'Accept shares', nodes.length),\n iconSvgInline: () => CheckSvg,\n enabled: (nodes, view) => nodes.length > 0 && view.id === pendingSharesViewId,\n async exec(node) {\n try {\n const isRemote = !!node.attributes.remote;\n const url = generateOcsUrl('apps/files_sharing/api/v1/{shareBase}/pending/{id}', {\n shareBase: isRemote ? 'remote_shares' : 'shares',\n id: node.attributes.id,\n });\n await axios.post(url);\n // Remove from current view\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n async execBatch(nodes, view, dir) {\n return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n },\n order: 1,\n inline: () => true,\n});\nregisterFileAction(action);\n","import { registerFileAction, FileAction, DefaultType, FileType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport { sharesViewId, sharedWithYouViewId, sharedWithOthersViewId, sharingByLinksViewId } from '../views/shares';\nexport const action = new FileAction({\n id: 'open-in-files',\n displayName: () => t('files', 'Open in Files'),\n iconSvgInline: () => '',\n enabled: (nodes, view) => [\n sharesViewId,\n sharedWithYouViewId,\n sharedWithOthersViewId,\n sharingByLinksViewId,\n // Deleted and pending shares are not\n // accessible in the files app.\n ].includes(view.id),\n async exec(node) {\n const isFolder = node.type === FileType.Folder;\n window.OCP.Files.Router.goToRoute(null, // use default route\n {\n view: 'files',\n fileid: String(node.fileid),\n }, {\n // If this node is a folder open the folder in files\n dir: isFolder ? node.path : node.dirname,\n // otherwise if this is a file, we should open it\n openfile: isFolder ? undefined : 'true',\n });\n return null;\n },\n // Before openFolderAction\n order: -1000,\n default: DefaultType.HIDDEN,\n});\nregisterFileAction(action);\n","import { emit } from '@nextcloud/event-bus';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { registerFileAction, FileAction } from '@nextcloud/files';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport CloseSvg from '@mdi/svg/svg/close.svg?raw';\nimport { pendingSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n id: 'reject-share',\n displayName: (nodes) => n('files_sharing', 'Reject share', 'Reject shares', nodes.length),\n iconSvgInline: () => CloseSvg,\n enabled: (nodes, view) => {\n if (view.id !== pendingSharesViewId) {\n return false;\n }\n if (nodes.length === 0) {\n return false;\n }\n // disable rejecting group shares from the pending list because they anyway\n // land back into that same list after rejecting them\n if (nodes.some(node => node.attributes.remote_id\n && node.attributes.share_type === window.OC.Share.SHARE_TYPE_REMOTE_GROUP)) {\n return false;\n }\n return true;\n },\n async exec(node) {\n try {\n const isRemote = !!node.attributes.remote;\n const url = generateOcsUrl('apps/files_sharing/api/v1/{shareBase}/{id}', {\n shareBase: isRemote ? 'remote_shares' : 'shares',\n id: node.attributes.id,\n });\n await axios.delete(url);\n // Remove from current view\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n async execBatch(nodes, view, dir) {\n return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n },\n order: 2,\n inline: () => true,\n});\nregisterFileAction(action);\n","import { emit } from '@nextcloud/event-bus';\nimport { FileAction, registerFileAction } from '@nextcloud/files';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport ArrowULeftTopSvg from '@mdi/svg/svg/arrow-u-left-top.svg?raw';\nimport axios from '@nextcloud/axios';\nimport { deletedSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n id: 'restore-share',\n displayName: (nodes) => n('files_sharing', 'Restore share', 'Restore shares', nodes.length),\n iconSvgInline: () => ArrowULeftTopSvg,\n enabled: (nodes, view) => nodes.length > 0 && view.id === deletedSharesViewId,\n async exec(node) {\n try {\n const url = generateOcsUrl('apps/files_sharing/api/v1/deletedshares/{id}', {\n id: node.attributes.id,\n });\n await axios.post(url);\n // Remove from current view\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n async execBatch(nodes, view, dir) {\n return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n },\n order: 1,\n inline: () => true,\n});\nregisterFileAction(action);\n","/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { Permission, View, FileAction, FileType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport InformationSvg from '@mdi/svg/svg/information-variant.svg?raw';\nimport logger from '../logger.js';\nexport const ACTION_DETAILS = 'details';\nexport const action = new FileAction({\n id: ACTION_DETAILS,\n displayName: () => t('files', 'Open details'),\n iconSvgInline: () => InformationSvg,\n // Sidebar currently supports user folder only, /files/USER\n enabled: (nodes) => {\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n if (!nodes[0]) {\n return false;\n }\n // Only work if the sidebar is available\n if (!window?.OCA?.Files?.Sidebar) {\n return false;\n }\n return (nodes[0].root?.startsWith('/files/') && nodes[0].permissions !== Permission.NONE) ?? false;\n },\n async exec(node, view, dir) {\n try {\n // TODO: migrate Sidebar to use a Node instead\n await window.OCA.Files.Sidebar.open(node.path);\n // Silently update current fileid\n window.OCP.Files.Router.goToRoute(null, { view: view.id, fileid: node.fileid }, { ...window.OCP.Files.Router.query, dir }, true);\n return null;\n }\n catch (error) {\n logger.error('Error while opening sidebar', { error });\n return false;\n }\n },\n order: -50,\n});\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./sharingStatusAction.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./sharingStatusAction.scss\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { Node, View, registerFileAction, FileAction, Permission } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport { Type } from '@nextcloud/sharing';\nimport AccountGroupSvg from '@mdi/svg/svg/account-group.svg?raw';\nimport AccountPlusSvg from '@mdi/svg/svg/account-plus.svg?raw';\nimport LinkSvg from '@mdi/svg/svg/link.svg?raw';\nimport CircleSvg from '../../../../core/img/apps/circles.svg?raw';\nimport { action as sidebarAction } from '../../../files/src/actions/sidebarAction';\nimport { generateUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport './sharingStatusAction.scss';\nconst isDarkMode = window?.matchMedia?.('(prefers-color-scheme: dark)')?.matches === true\n || document.querySelector('[data-themes*=dark]') !== null;\nconst generateAvatarSvg = (userId, isGuest = false) => {\n const url = isDarkMode ? '/avatar/{userId}/32/dark' : '/avatar/{userId}/32';\n const avatarUrl = generateUrl(isGuest ? url : url + '?guestFallback=true', { userId });\n return `\n\t\t\n\t`;\n};\nconst isExternal = (node) => {\n return node.attributes.remote_id !== undefined;\n};\nexport const action = new FileAction({\n id: 'sharing-status',\n displayName(nodes) {\n const node = nodes[0];\n const shareTypes = Object.values(node?.attributes?.['share-types'] || {}).flat();\n const ownerId = node?.attributes?.['owner-id'];\n if (shareTypes.length > 0\n || (ownerId !== getCurrentUser()?.uid || isExternal(node))) {\n return t('files_sharing', 'Shared');\n }\n return '';\n },\n title(nodes) {\n const node = nodes[0];\n const ownerId = node?.attributes?.['owner-id'];\n const ownerDisplayName = node?.attributes?.['owner-display-name'];\n // Mixed share types\n if (Array.isArray(node.attributes?.['share-types']) && node.attributes?.['share-types'].length > 1) {\n return t('files_sharing', 'Shared multiple times with different people');\n }\n if (ownerId && (ownerId !== getCurrentUser()?.uid || isExternal(node))) {\n return t('files_sharing', 'Shared by {ownerDisplayName}', { ownerDisplayName });\n }\n return t('files_sharing', 'Show sharing options');\n },\n iconSvgInline(nodes) {\n const node = nodes[0];\n const shareTypes = Object.values(node?.attributes?.['share-types'] || {}).flat();\n // Mixed share types\n if (Array.isArray(node.attributes?.['share-types']) && node.attributes?.['share-types'].length > 1) {\n return AccountPlusSvg;\n }\n // Link shares\n if (shareTypes.includes(Type.SHARE_TYPE_LINK)\n || shareTypes.includes(Type.SHARE_TYPE_EMAIL)) {\n return LinkSvg;\n }\n // Group shares\n if (shareTypes.includes(Type.SHARE_TYPE_GROUP)\n || shareTypes.includes(Type.SHARE_TYPE_REMOTE_GROUP)) {\n return AccountGroupSvg;\n }\n // Circle shares\n if (shareTypes.includes(Type.SHARE_TYPE_CIRCLE)) {\n return CircleSvg;\n }\n const ownerId = node?.attributes?.['owner-id'];\n if (ownerId && (ownerId !== getCurrentUser()?.uid || isExternal(node))) {\n return generateAvatarSvg(ownerId, isExternal(node));\n }\n return AccountPlusSvg;\n },\n enabled(nodes) {\n if (nodes.length !== 1) {\n return false;\n }\n const node = nodes[0];\n const ownerId = node?.attributes?.['owner-id'];\n const isMixed = Array.isArray(node.attributes?.['share-types']);\n // If the node is shared multiple times with\n // different share types to the current user\n if (isMixed) {\n return true;\n }\n // If the node is shared by someone else\n if (ownerId && (ownerId !== getCurrentUser()?.uid || isExternal(node))) {\n return true;\n }\n return (node.permissions & Permission.SHARE) !== 0;\n },\n async exec(node, view, dir) {\n // You need read permissions to see the sidebar\n if ((node.permissions & Permission.READ) !== 0) {\n window.OCA?.Files?.Sidebar?.setActiveTab?.('sharing');\n return sidebarAction.exec(node, view, dir);\n }\n return null;\n },\n inline: () => true,\n});\nregisterFileAction(action);\n","/**\n * @copyright Copyright (c) 2019 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Julius Härtl \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { registerDavProperty } from '@nextcloud/files';\nimport registerSharingViews from './views/shares';\nimport './actions/acceptShareAction';\nimport './actions/openInFilesAction';\nimport './actions/rejectShareAction';\nimport './actions/restoreShareAction';\nimport './actions/sharingStatusAction';\nregisterSharingViews();\nregisterDavProperty('nc:share-attributes', { nc: 'http://nextcloud.org/ns' });\nregisterDavProperty('oc:share-types', { oc: 'http://owncloud.org/ns' });\nregisterDavProperty('ocs:share-permissions', { ocs: 'http://open-collaboration-services.org/ns' });\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.action-items>.files-list__row-action-sharing-status{direction:rtl;padding-right:0 !important}svg.sharing-status__avatar{height:32px !important;width:32px !important;max-height:32px !important;max-width:32px !important;border-radius:32px;overflow:hidden}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files_sharing/src/actions/sharingStatusAction.scss\"],\"names\":[],\"mappings\":\"AAsBA,qDAEC,aAAA,CAEG,0BAAA,CAGJ,2BACC,sBAAA,CACA,qBAAA,CACA,0BAAA,CACA,yBAAA,CACA,kBAAA,CACA,eAAA\",\"sourcesContent\":[\"/**\\n * @copyright Copyright (c) 2023 John Molakvoæ \\n *\\n * @author John Molakvoæ \\n *\\n * @license AGPL-3.0-or-later\\n *\\n * This program is free software: you can redistribute it and/or modify\\n * it under the terms of the GNU Affero General Public License as\\n * published by the Free Software Foundation, either version 3 of the\\n * License, or (at your option) any later version.\\n *\\n * This program is distributed in the hope that it will be useful,\\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n * GNU Affero General Public License for more details.\\n *\\n * You should have received a copy of the GNU Affero General Public License\\n * along with this program. If not, see .\\n *\\n */\\n // Only when rendered inline, when not enough space, this is put in the menu\\n.action-items > .files-list__row-action-sharing-status {\\n\\t// put icon at the end of the button\\n\\tdirection: rtl;\\n\\t// align icons with textless inline actions\\n padding-right: 0 !important;\\n}\\n\\nsvg.sharing-status__avatar {\\n\\theight: 32px !important;\\n\\twidth: 32px !important;\\n\\tmax-height: 32px !important;\\n\\tmax-width: 32px !important;\\n\\tborder-radius: 32px;\\n\\toverflow: hidden;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + \"6797210df0f1d53f94c4\" + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 5928;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t5928: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4208], () => (__webpack_require__(67597)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","getLoggerBuilder","setApp","detectUser","build","rootPath","concat","_getCurrentUser","getCurrentUser","uid","headers","ocsEntryToNode","async","ocsEntry","_ocsEntry$tags","undefined","remote_id","mime","default","mimetype","getType","name","item_type","item_permissions","Permission","NONE","permissions","uid_owner","owner","displayname_owner","isFolder","hasPreview","has_preview","Node","Folder","File","fileid","file_source","id","path","file_target","source","generateRemoteUrl","replaceAll","mtime","item_mtime","Date","stime","size","item_size","root","attributes","share_type","favorite","tags","includes","window","OC","TAG_FAVORITE","error","logger","getShares","shared_with_me","arguments","length","url","generateOcsUrl","axios","get","params","include_tags","getContents","_getCurrentUser2","sharedWithOthers","pendingShares","deletedshares","filterTypes","promises","push","getRemoteShares","getPendingShares","getRemotePendingShares","getDeletedShares","data","Promise","all","map","response","ocs","flat","contents","filter","node","nodes","key","_node$attributes","Object","values","reduce","acc","curr","folder","sharesViewId","sharedWithYouViewId","sharedWithOthersViewId","sharingByLinksViewId","deletedSharesViewId","pendingSharesViewId","action","FileAction","displayName","n","iconSvgInline","CheckSvg","enabled","view","exec","isRemote","remote","shareBase","post","emit","execBatch","dir","this","order","inline","registerFileAction","t","type","FileType","OCP","Files","Router","goToRoute","String","dirname","openfile","DefaultType","HIDDEN","some","Share","SHARE_TYPE_REMOTE_GROUP","delete","InformationSvg","_window","_ref","_nodes$0$root","OCA","Sidebar","startsWith","open","query","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","isDarkMode","_window$matchMedia","matchMedia","call","matches","document","querySelector","isExternal","_node$attributes2","shareTypes","ownerId","title","_node$attributes3","_node$attributes4","_node$attributes5","_node$attributes6","ownerDisplayName","Array","isArray","_node$attributes7","_node$attributes8","_node$attributes9","_node$attributes10","_getCurrentUser3","AccountPlusSvg","Type","SHARE_TYPE_LINK","SHARE_TYPE_EMAIL","LinkSvg","SHARE_TYPE_GROUP","AccountGroupSvg","SHARE_TYPE_CIRCLE","userId","isGuest","avatarUrl","generateUrl","generateAvatarSvg","_node$attributes11","_node$attributes12","_getCurrentUser4","SHARE","_window$OCA","_window$OCA$setActive","READ","setActiveTab","sidebarAction","Navigation","getNavigation","register","View","caption","emptyTitle","emptyCaption","icon","columns","parent","registerSharingViews","registerDavProperty","nc","oc","___CSS_LOADER_EXPORT___","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","keys","every","splice","r","getter","__esModule","d","a","definition","o","defineProperty","enumerable","f","e","chunkId","u","g","globalThis","Function","obj","prop","prototype","hasOwnProperty","l","done","script","needAttach","scripts","getElementsByTagName","s","getAttribute","createElement","charset","timeout","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","forEach","setTimeout","bind","target","head","appendChild","Symbol","toStringTag","value","nmd","paths","children","scriptUrl","importScripts","location","currentScript","test","Error","replace","p","b","baseURI","self","href","installedChunks","installedChunkData","promise","resolve","reject","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"files_sharing-init.js?v=c3ea8ac49b16856db482","mappings":";uBAAIA,ECAAC,EACAC,02CCqBJ,SAAeC,EAAAA,EAAAA,MACVC,OAAO,iBACPC,aACAC,cCpBE,MAAMC,EAAW,UAAHC,OAA6B,QAA7BC,GAAaC,EAAAA,EAAAA,aAAgB,IAAAD,OAAA,EAAhBA,EAAkBE,KAC9CC,EAAU,CACZ,eAAgB,oBAEdC,EAAiBC,eAAgBC,GACnC,IAAI,IAAAC,EAEA,QAA4BC,KAAxBF,aAAQ,EAARA,EAAUG,WAAyB,CACnC,IAAKH,EAASI,SAAU,CACpB,MAAMC,SAAc,gCAAgBC,QAEpCN,EAASI,SAAWC,EAAKE,QAAQP,EAASQ,KAC9C,CACAR,EAASS,UAAYT,EAASU,OAASV,EAASI,SAAW,OAAS,UAEpEJ,EAASW,WAAaX,EAASY,MAC/BZ,EAASa,YAAcb,EAASa,aAAeb,EAASc,WAExDd,EAASe,iBAAmBC,EAAAA,GAAWC,KACvCjB,EAASkB,YAAcF,EAAAA,GAAWC,KAClCjB,EAASmB,UAAYnB,EAASoB,MAE9BpB,EAASqB,kBAAoBrB,EAASoB,KAC1C,CACA,MAAME,E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uB,CAACC,EAA4B3O,KACvD,IAKI4I,EAAU8B,EALVtB,EAAWpJ,EAAK,GAChB4O,EAAc5O,EAAK,GACnB6O,EAAU7O,EAAK,GAGIyJ,EAAI,EAC3B,GAAGL,EAAS5F,MAAMlG,GAAgC,IAAxB2Q,EAAgB3Q,KAAa,CACtD,IAAIsL,KAAYgG,EACZjG,EAAoB0B,EAAEuE,EAAahG,KACrCD,EAAoBM,EAAEL,GAAYgG,EAAYhG,IAGhD,GAAGiG,EAAS,IAAI1F,EAAS0F,EAAQlG,EAClC,CAEA,IADGgG,GAA4BA,EAA2B3O,GACrDyJ,EAAIL,EAASvK,OAAQ4K,IACzBiB,EAAUtB,EAASK,GAChBd,EAAoB0B,EAAE4D,EAAiBvD,IAAYuD,EAAgBvD,IACrEuD,EAAgBvD,GAAS,KAE1BuD,EAAgBvD,GAAW,EAE5B,OAAO/B,EAAoBO,EAAEC,EAAO,EAGjC2F,EAAqBf,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1Fe,EAAmBrC,QAAQiC,EAAqB/B,KAAK,KAAM,IAC3DmC,EAAmBnP,KAAO+O,EAAqB/B,KAAK,KAAMmC,EAAmBnP,KAAKgN,KAAKmC,QCvFvFnG,EAAoBL,QAAK7M,ECGzB,IAAIsT,EAAsBpG,EAAoBO,OAAEzN,EAAW,CAAC,OAAO,IAAOkN,EAAoB,SAC9FoG,EAAsBpG,EAAoBO,EAAE6F","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/files_sharing/src/services/logger.ts","webpack:///nextcloud/apps/files_sharing/src/services/SharingService.ts","webpack:///nextcloud/apps/files_sharing/src/views/shares.ts","webpack:///nextcloud/apps/files_sharing/src/actions/acceptShareAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/openInFilesAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/rejectShareAction.ts","webpack:///nextcloud/apps/files_sharing/src/actions/restoreShareAction.ts","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files/src/actions/sidebarAction.ts","webpack://nextcloud/./apps/files_sharing/src/actions/sharingStatusAction.scss?3ea7","webpack:///nextcloud/apps/files_sharing/src/actions/sharingStatusAction.ts","webpack:///nextcloud/apps/files_sharing/src/init.ts","webpack:///nextcloud/apps/files_sharing/src/actions/sharingStatusAction.scss","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger';\nexport default getLoggerBuilder()\n .setApp('files_sharing')\n .detectUser()\n .build();\n","import { Folder, File, Permission } from '@nextcloud/files';\nimport { generateOcsUrl, generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport axios from '@nextcloud/axios';\nimport logger from './logger';\nexport const rootPath = `/files/${getCurrentUser()?.uid}`;\nconst headers = {\n 'Content-Type': 'application/json',\n};\nconst ocsEntryToNode = async function (ocsEntry) {\n try {\n // Federated share handling\n if (ocsEntry?.remote_id !== undefined) {\n if (!ocsEntry.mimetype) {\n const mime = (await import('mime')).default;\n // This won't catch files without an extension, but this is the best we can do\n ocsEntry.mimetype = mime.getType(ocsEntry.name);\n }\n ocsEntry.item_type = ocsEntry.type || (ocsEntry.mimetype ? 'file' : 'folder');\n // different naming for remote shares\n ocsEntry.item_mtime = ocsEntry.mtime;\n ocsEntry.file_target = ocsEntry.file_target || ocsEntry.mountpoint;\n // Need to set permissions to NONE for federated shares\n ocsEntry.item_permissions = Permission.NONE;\n ocsEntry.permissions = Permission.NONE;\n ocsEntry.uid_owner = ocsEntry.owner;\n // TODO: have the real display name stored somewhere\n ocsEntry.displayname_owner = ocsEntry.owner;\n }\n const isFolder = ocsEntry?.item_type === 'folder';\n const hasPreview = ocsEntry?.has_preview === true;\n const Node = isFolder ? Folder : File;\n // If this is an external share that is not yet accepted,\n // we don't have an id. We can fallback to the row id temporarily\n // local shares (this server) use `file_source`, but remote shares (federated) use `file_id`\n const fileid = ocsEntry.file_source || ocsEntry.file_id || ocsEntry.id;\n // Generate path and strip double slashes\n const path = ocsEntry.path || ocsEntry.file_target || ocsEntry.name;\n const source = generateRemoteUrl(`dav/${rootPath}/${path}`.replaceAll(/\\/\\//gm, '/'));\n let mtime = ocsEntry.item_mtime ? new Date((ocsEntry.item_mtime) * 1000) : undefined;\n // Prefer share time if more recent than item mtime\n if (ocsEntry?.stime > (ocsEntry?.item_mtime || 0)) {\n mtime = new Date((ocsEntry.stime) * 1000);\n }\n return new Node({\n id: fileid,\n source,\n owner: ocsEntry?.uid_owner,\n mime: ocsEntry?.mimetype || 'application/octet-stream',\n mtime,\n size: ocsEntry?.item_size,\n permissions: ocsEntry?.item_permissions || ocsEntry?.permissions,\n root: rootPath,\n attributes: {\n ...ocsEntry,\n 'has-preview': hasPreview,\n // Also check the sharingStatusAction.ts code\n 'owner-id': ocsEntry?.uid_owner,\n 'owner-display-name': ocsEntry?.displayname_owner,\n 'share-types': ocsEntry?.share_type,\n 'share-attributes': ocsEntry?.attributes || '[]',\n favorite: ocsEntry?.tags?.includes(window.OC.TAG_FAVORITE) ? 1 : 0,\n },\n });\n }\n catch (error) {\n logger.error('Error while parsing OCS entry', { error });\n return null;\n }\n};\nconst getShares = function (shared_with_me = false) {\n const url = generateOcsUrl('apps/files_sharing/api/v1/shares');\n return axios.get(url, {\n headers,\n params: {\n shared_with_me,\n include_tags: true,\n },\n });\n};\nconst getSharedWithYou = function () {\n return getShares(true);\n};\nconst getSharedWithOthers = function () {\n return getShares();\n};\nconst getRemoteShares = function () {\n const url = generateOcsUrl('apps/files_sharing/api/v1/remote_shares');\n return axios.get(url, {\n headers,\n params: {\n include_tags: true,\n },\n });\n};\nconst getPendingShares = function () {\n const url = generateOcsUrl('apps/files_sharing/api/v1/shares/pending');\n return axios.get(url, {\n headers,\n params: {\n include_tags: true,\n },\n });\n};\nconst getRemotePendingShares = function () {\n const url = generateOcsUrl('apps/files_sharing/api/v1/remote_shares/pending');\n return axios.get(url, {\n headers,\n params: {\n include_tags: true,\n },\n });\n};\nconst getDeletedShares = function () {\n const url = generateOcsUrl('apps/files_sharing/api/v1/deletedshares');\n return axios.get(url, {\n headers,\n params: {\n include_tags: true,\n },\n });\n};\n/**\n * Group an array of objects (here Nodes) by a key\n * and return an array of arrays of them.\n * @param nodes Nodes to group\n * @param key The attribute to group by\n */\nconst groupBy = function (nodes, key) {\n return Object.values(nodes.reduce(function (acc, curr) {\n (acc[curr[key]] = acc[curr[key]] || []).push(curr);\n return acc;\n }, {}));\n};\nexport const getContents = async (sharedWithYou = true, sharedWithOthers = true, pendingShares = false, deletedshares = false, filterTypes = []) => {\n const promises = [];\n if (sharedWithYou) {\n promises.push(getSharedWithYou(), getRemoteShares());\n }\n if (sharedWithOthers) {\n promises.push(getSharedWithOthers());\n }\n if (pendingShares) {\n promises.push(getPendingShares(), getRemotePendingShares());\n }\n if (deletedshares) {\n promises.push(getDeletedShares());\n }\n const responses = await Promise.all(promises);\n const data = responses.map((response) => response.data.ocs.data).flat();\n let contents = (await Promise.all(data.map(ocsEntryToNode)))\n .filter((node) => node !== null);\n if (filterTypes.length > 0) {\n contents = contents.filter((node) => filterTypes.includes(node.attributes?.share_type));\n }\n // Merge duplicate shares and group their attributes\n // Also check the sharingStatusAction.ts code\n contents = groupBy(contents, 'source').map((nodes) => {\n const node = nodes[0];\n node.attributes['share-types'] = nodes.map(node => node.attributes['share-types']);\n return node;\n });\n return {\n folder: new Folder({\n id: 0,\n source: generateRemoteUrl('dav' + rootPath),\n owner: getCurrentUser()?.uid || null,\n }),\n contents,\n };\n};\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { translate as t } from '@nextcloud/l10n';\nimport { View, getNavigation } from '@nextcloud/files';\nimport AccountClockSvg from '@mdi/svg/svg/account-clock.svg?raw';\nimport AccountGroupSvg from '@mdi/svg/svg/account-group.svg?raw';\nimport AccountPlusSvg from '@mdi/svg/svg/account-plus.svg?raw';\nimport AccountSvg from '@mdi/svg/svg/account.svg?raw';\nimport DeleteSvg from '@mdi/svg/svg/delete.svg?raw';\nimport LinkSvg from '@mdi/svg/svg/link.svg?raw';\nimport { getContents } from '../services/SharingService';\nexport const sharesViewId = 'shareoverview';\nexport const sharedWithYouViewId = 'sharingin';\nexport const sharedWithOthersViewId = 'sharingout';\nexport const sharingByLinksViewId = 'sharinglinks';\nexport const deletedSharesViewId = 'deletedshares';\nexport const pendingSharesViewId = 'pendingshares';\nexport default () => {\n const Navigation = getNavigation();\n Navigation.register(new View({\n id: sharesViewId,\n name: t('files_sharing', 'Shares'),\n caption: t('files_sharing', 'Overview of shared files.'),\n emptyTitle: t('files_sharing', 'No shares'),\n emptyCaption: t('files_sharing', 'Files and folders you shared or have been shared with you will show up here'),\n icon: AccountPlusSvg,\n order: 20,\n columns: [],\n getContents: () => getContents(),\n }));\n Navigation.register(new View({\n id: sharedWithYouViewId,\n name: t('files_sharing', 'Shared with you'),\n caption: t('files_sharing', 'List of files that are shared with you.'),\n emptyTitle: t('files_sharing', 'Nothing shared with you yet'),\n emptyCaption: t('files_sharing', 'Files and folders others shared with you will show up here'),\n icon: AccountSvg,\n order: 1,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(true, false, false, false),\n }));\n Navigation.register(new View({\n id: sharedWithOthersViewId,\n name: t('files_sharing', 'Shared with others'),\n caption: t('files_sharing', 'List of files that you shared with others.'),\n emptyTitle: t('files_sharing', 'Nothing shared yet'),\n emptyCaption: t('files_sharing', 'Files and folders you shared will show up here'),\n icon: AccountGroupSvg,\n order: 2,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(false, true, false, false),\n }));\n Navigation.register(new View({\n id: sharingByLinksViewId,\n name: t('files_sharing', 'Shared by link'),\n caption: t('files_sharing', 'List of files that are shared by link.'),\n emptyTitle: t('files_sharing', 'No shared links'),\n emptyCaption: t('files_sharing', 'Files and folders you shared by link will show up here'),\n icon: LinkSvg,\n order: 3,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(false, true, false, false, [window.OC.Share.SHARE_TYPE_LINK]),\n }));\n Navigation.register(new View({\n id: deletedSharesViewId,\n name: t('files_sharing', 'Deleted shares'),\n caption: t('files_sharing', 'List of shares you left.'),\n emptyTitle: t('files_sharing', 'No deleted shares'),\n emptyCaption: t('files_sharing', 'Shares you have left will show up here'),\n icon: DeleteSvg,\n order: 4,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(false, false, false, true),\n }));\n Navigation.register(new View({\n id: pendingSharesViewId,\n name: t('files_sharing', 'Pending shares'),\n caption: t('files_sharing', 'List of unapproved shares.'),\n emptyTitle: t('files_sharing', 'No pending shares'),\n emptyCaption: t('files_sharing', 'Shares you have received but not approved will show up here'),\n icon: AccountClockSvg,\n order: 5,\n parent: sharesViewId,\n columns: [],\n getContents: () => getContents(false, false, true, false),\n }));\n};\n","import { emit } from '@nextcloud/event-bus';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { registerFileAction, FileAction } from '@nextcloud/files';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport CheckSvg from '@mdi/svg/svg/check.svg?raw';\nimport { pendingSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n id: 'accept-share',\n displayName: (nodes) => n('files_sharing', 'Accept share', 'Accept shares', nodes.length),\n iconSvgInline: () => CheckSvg,\n enabled: (nodes, view) => nodes.length > 0 && view.id === pendingSharesViewId,\n async exec(node) {\n try {\n const isRemote = !!node.attributes.remote;\n const url = generateOcsUrl('apps/files_sharing/api/v1/{shareBase}/pending/{id}', {\n shareBase: isRemote ? 'remote_shares' : 'shares',\n id: node.attributes.id,\n });\n await axios.post(url);\n // Remove from current view\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n async execBatch(nodes, view, dir) {\n return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n },\n order: 1,\n inline: () => true,\n});\nregisterFileAction(action);\n","import { registerFileAction, FileAction, DefaultType, FileType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport { sharesViewId, sharedWithYouViewId, sharedWithOthersViewId, sharingByLinksViewId } from '../views/shares';\nexport const action = new FileAction({\n id: 'open-in-files',\n displayName: () => t('files', 'Open in Files'),\n iconSvgInline: () => '',\n enabled: (nodes, view) => [\n sharesViewId,\n sharedWithYouViewId,\n sharedWithOthersViewId,\n sharingByLinksViewId,\n // Deleted and pending shares are not\n // accessible in the files app.\n ].includes(view.id),\n async exec(node) {\n const isFolder = node.type === FileType.Folder;\n window.OCP.Files.Router.goToRoute(null, // use default route\n {\n view: 'files',\n fileid: String(node.fileid),\n }, {\n // If this node is a folder open the folder in files\n dir: isFolder ? node.path : node.dirname,\n // otherwise if this is a file, we should open it\n openfile: isFolder ? undefined : 'true',\n });\n return null;\n },\n // Before openFolderAction\n order: -1000,\n default: DefaultType.HIDDEN,\n});\nregisterFileAction(action);\n","import { emit } from '@nextcloud/event-bus';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { registerFileAction, FileAction } from '@nextcloud/files';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport CloseSvg from '@mdi/svg/svg/close.svg?raw';\nimport { pendingSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n id: 'reject-share',\n displayName: (nodes) => n('files_sharing', 'Reject share', 'Reject shares', nodes.length),\n iconSvgInline: () => CloseSvg,\n enabled: (nodes, view) => {\n if (view.id !== pendingSharesViewId) {\n return false;\n }\n if (nodes.length === 0) {\n return false;\n }\n // disable rejecting group shares from the pending list because they anyway\n // land back into that same list after rejecting them\n if (nodes.some(node => node.attributes.remote_id\n && node.attributes.share_type === window.OC.Share.SHARE_TYPE_REMOTE_GROUP)) {\n return false;\n }\n return true;\n },\n async exec(node) {\n try {\n const isRemote = !!node.attributes.remote;\n const url = generateOcsUrl('apps/files_sharing/api/v1/{shareBase}/{id}', {\n shareBase: isRemote ? 'remote_shares' : 'shares',\n id: node.attributes.id,\n });\n await axios.delete(url);\n // Remove from current view\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n async execBatch(nodes, view, dir) {\n return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n },\n order: 2,\n inline: () => true,\n});\nregisterFileAction(action);\n","import { emit } from '@nextcloud/event-bus';\nimport { FileAction, registerFileAction } from '@nextcloud/files';\nimport { generateOcsUrl } from '@nextcloud/router';\nimport { translatePlural as n } from '@nextcloud/l10n';\nimport ArrowULeftTopSvg from '@mdi/svg/svg/arrow-u-left-top.svg?raw';\nimport axios from '@nextcloud/axios';\nimport { deletedSharesViewId } from '../views/shares';\nexport const action = new FileAction({\n id: 'restore-share',\n displayName: (nodes) => n('files_sharing', 'Restore share', 'Restore shares', nodes.length),\n iconSvgInline: () => ArrowULeftTopSvg,\n enabled: (nodes, view) => nodes.length > 0 && view.id === deletedSharesViewId,\n async exec(node) {\n try {\n const url = generateOcsUrl('apps/files_sharing/api/v1/deletedshares/{id}', {\n id: node.attributes.id,\n });\n await axios.post(url);\n // Remove from current view\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\n return false;\n }\n },\n async execBatch(nodes, view, dir) {\n return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n },\n order: 1,\n inline: () => true,\n});\nregisterFileAction(action);\n","/**\n * @copyright Copyright (c) 2022 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { Permission, View, FileAction, FileType } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport InformationSvg from '@mdi/svg/svg/information-variant.svg?raw';\nimport logger from '../logger.js';\nexport const ACTION_DETAILS = 'details';\nexport const action = new FileAction({\n id: ACTION_DETAILS,\n displayName: () => t('files', 'Open details'),\n iconSvgInline: () => InformationSvg,\n // Sidebar currently supports user folder only, /files/USER\n enabled: (nodes) => {\n // Only works on single node\n if (nodes.length !== 1) {\n return false;\n }\n if (!nodes[0]) {\n return false;\n }\n // Only work if the sidebar is available\n if (!window?.OCA?.Files?.Sidebar) {\n return false;\n }\n return (nodes[0].root?.startsWith('/files/') && nodes[0].permissions !== Permission.NONE) ?? false;\n },\n async exec(node, view, dir) {\n try {\n // TODO: migrate Sidebar to use a Node instead\n await window.OCA.Files.Sidebar.open(node.path);\n // Silently update current fileid\n window.OCP.Files.Router.goToRoute(null, { view: view.id, fileid: node.fileid }, { ...window.OCP.Files.Router.query, dir }, true);\n return null;\n }\n catch (error) {\n logger.error('Error while opening sidebar', { error });\n return false;\n }\n },\n order: -50,\n});\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./sharingStatusAction.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./sharingStatusAction.scss\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ \n *\n * @author John Molakvoæ \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { Node, View, registerFileAction, FileAction, Permission } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport { Type } from '@nextcloud/sharing';\nimport AccountGroupSvg from '@mdi/svg/svg/account-group.svg?raw';\nimport AccountPlusSvg from '@mdi/svg/svg/account-plus.svg?raw';\nimport LinkSvg from '@mdi/svg/svg/link.svg?raw';\nimport CircleSvg from '../../../../core/img/apps/circles.svg?raw';\nimport { action as sidebarAction } from '../../../files/src/actions/sidebarAction';\nimport { generateUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport './sharingStatusAction.scss';\nconst isDarkMode = window?.matchMedia?.('(prefers-color-scheme: dark)')?.matches === true\n || document.querySelector('[data-themes*=dark]') !== null;\nconst generateAvatarSvg = (userId, isGuest = false) => {\n const url = isDarkMode ? '/avatar/{userId}/32/dark' : '/avatar/{userId}/32';\n const avatarUrl = generateUrl(isGuest ? url : url + '?guestFallback=true', { userId });\n return `\n\t\t\n\t`;\n};\nconst isExternal = (node) => {\n return node.attributes.remote_id !== undefined;\n};\nexport const action = new FileAction({\n id: 'sharing-status',\n displayName(nodes) {\n const node = nodes[0];\n const shareTypes = Object.values(node?.attributes?.['share-types'] || {}).flat();\n const ownerId = node?.attributes?.['owner-id'];\n if (shareTypes.length > 0\n || (ownerId !== getCurrentUser()?.uid || isExternal(node))) {\n return t('files_sharing', 'Shared');\n }\n return '';\n },\n title(nodes) {\n const node = nodes[0];\n const ownerId = node?.attributes?.['owner-id'];\n const ownerDisplayName = node?.attributes?.['owner-display-name'];\n // Mixed share types\n if (Array.isArray(node.attributes?.['share-types']) && node.attributes?.['share-types'].length > 1) {\n return t('files_sharing', 'Shared multiple times with different people');\n }\n if (ownerId && (ownerId !== getCurrentUser()?.uid || isExternal(node))) {\n return t('files_sharing', 'Shared by {ownerDisplayName}', { ownerDisplayName });\n }\n return t('files_sharing', 'Show sharing options');\n },\n iconSvgInline(nodes) {\n const node = nodes[0];\n const shareTypes = Object.values(node?.attributes?.['share-types'] || {}).flat();\n // Mixed share types\n if (Array.isArray(node.attributes?.['share-types']) && node.attributes?.['share-types'].length > 1) {\n return AccountPlusSvg;\n }\n // Link shares\n if (shareTypes.includes(Type.SHARE_TYPE_LINK)\n || shareTypes.includes(Type.SHARE_TYPE_EMAIL)) {\n return LinkSvg;\n }\n // Group shares\n if (shareTypes.includes(Type.SHARE_TYPE_GROUP)\n || shareTypes.includes(Type.SHARE_TYPE_REMOTE_GROUP)) {\n return AccountGroupSvg;\n }\n // Circle shares\n if (shareTypes.includes(Type.SHARE_TYPE_CIRCLE)) {\n return CircleSvg;\n }\n const ownerId = node?.attributes?.['owner-id'];\n if (ownerId && (ownerId !== getCurrentUser()?.uid || isExternal(node))) {\n return generateAvatarSvg(ownerId, isExternal(node));\n }\n return AccountPlusSvg;\n },\n enabled(nodes) {\n if (nodes.length !== 1) {\n return false;\n }\n const node = nodes[0];\n const ownerId = node?.attributes?.['owner-id'];\n const isMixed = Array.isArray(node.attributes?.['share-types']);\n // If the node is shared multiple times with\n // different share types to the current user\n if (isMixed) {\n return true;\n }\n // If the node is shared by someone else\n if (ownerId && (ownerId !== getCurrentUser()?.uid || isExternal(node))) {\n return true;\n }\n return (node.permissions & Permission.SHARE) !== 0;\n },\n async exec(node, view, dir) {\n // You need read permissions to see the sidebar\n if ((node.permissions & Permission.READ) !== 0) {\n window.OCA?.Files?.Sidebar?.setActiveTab?.('sharing');\n return sidebarAction.exec(node, view, dir);\n }\n return null;\n },\n inline: () => true,\n});\nregisterFileAction(action);\n","/**\n * @copyright Copyright (c) 2019 John Molakvoæ \n *\n * @author John Molakvoæ \n * @author Julius Härtl \n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n *\n */\nimport { registerDavProperty } from '@nextcloud/files';\nimport registerSharingViews from './views/shares';\nimport './actions/acceptShareAction';\nimport './actions/openInFilesAction';\nimport './actions/rejectShareAction';\nimport './actions/restoreShareAction';\nimport './actions/sharingStatusAction';\nregisterSharingViews();\nregisterDavProperty('nc:share-attributes', { nc: 'http://nextcloud.org/ns' });\nregisterDavProperty('oc:share-types', { oc: 'http://owncloud.org/ns' });\nregisterDavProperty('ocs:share-permissions', { ocs: 'http://open-collaboration-services.org/ns' });\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.action-items>.files-list__row-action-sharing-status{direction:rtl;padding-right:0 !important}svg.sharing-status__avatar{height:32px !important;width:32px !important;max-height:32px !important;max-width:32px !important;border-radius:32px;overflow:hidden}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files_sharing/src/actions/sharingStatusAction.scss\"],\"names\":[],\"mappings\":\"AAsBA,qDAEC,aAAA,CAEG,0BAAA,CAGJ,2BACC,sBAAA,CACA,qBAAA,CACA,0BAAA,CACA,yBAAA,CACA,kBAAA,CACA,eAAA\",\"sourcesContent\":[\"/**\\n * @copyright Copyright (c) 2023 John Molakvoæ \\n *\\n * @author John Molakvoæ \\n *\\n * @license AGPL-3.0-or-later\\n *\\n * This program is free software: you can redistribute it and/or modify\\n * it under the terms of the GNU Affero General Public License as\\n * published by the Free Software Foundation, either version 3 of the\\n * License, or (at your option) any later version.\\n *\\n * This program is distributed in the hope that it will be useful,\\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\\n * GNU Affero General Public License for more details.\\n *\\n * You should have received a copy of the GNU Affero General Public License\\n * along with this program. If not, see .\\n *\\n */\\n // Only when rendered inline, when not enough space, this is put in the menu\\n.action-items > .files-list__row-action-sharing-status {\\n\\t// put icon at the end of the button\\n\\tdirection: rtl;\\n\\t// align icons with textless inline actions\\n padding-right: 0 !important;\\n}\\n\\nsvg.sharing-status__avatar {\\n\\theight: 32px !important;\\n\\twidth: 32px !important;\\n\\tmax-height: 32px !important;\\n\\tmax-width: 32px !important;\\n\\tborder-radius: 32px;\\n\\toverflow: hidden;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + chunkId + \".js?v=\" + \"6797210df0f1d53f94c4\" + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 5928;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t5928: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4208], () => (__webpack_require__(67597)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","getLoggerBuilder","setApp","detectUser","build","rootPath","concat","_getCurrentUser","getCurrentUser","uid","headers","ocsEntryToNode","async","ocsEntry","_ocsEntry$tags","undefined","remote_id","mimetype","mime","default","getType","name","item_type","type","item_mtime","mtime","file_target","mountpoint","item_permissions","Permission","NONE","permissions","uid_owner","owner","displayname_owner","isFolder","hasPreview","has_preview","Node","Folder","File","fileid","file_source","file_id","id","path","source","generateRemoteUrl","replaceAll","Date","stime","size","item_size","root","attributes","share_type","favorite","tags","includes","window","OC","TAG_FAVORITE","error","logger","getShares","shared_with_me","arguments","length","url","generateOcsUrl","axios","get","params","include_tags","getContents","_getCurrentUser2","sharedWithOthers","pendingShares","deletedshares","filterTypes","promises","push","getRemoteShares","getPendingShares","getRemotePendingShares","getDeletedShares","data","Promise","all","map","response","ocs","flat","contents","filter","node","nodes","key","_node$attributes","Object","values","reduce","acc","curr","folder","sharesViewId","sharedWithYouViewId","sharedWithOthersViewId","sharingByLinksViewId","deletedSharesViewId","pendingSharesViewId","action","FileAction","displayName","n","iconSvgInline","CheckSvg","enabled","view","exec","isRemote","remote","shareBase","post","emit","execBatch","dir","this","order","inline","registerFileAction","t","FileType","OCP","Files","Router","goToRoute","String","dirname","openfile","DefaultType","HIDDEN","some","Share","SHARE_TYPE_REMOTE_GROUP","delete","InformationSvg","_window","_ref","_nodes$0$root","OCA","Sidebar","startsWith","open","query","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","isDarkMode","_window$matchMedia","matchMedia","call","matches","document","querySelector","isExternal","_node$attributes2","shareTypes","ownerId","title","_node$attributes3","_node$attributes4","_node$attributes5","_node$attributes6","ownerDisplayName","Array","isArray","_node$attributes7","_node$attributes8","_node$attributes9","_node$attributes10","_getCurrentUser3","AccountPlusSvg","Type","SHARE_TYPE_LINK","SHARE_TYPE_EMAIL","LinkSvg","SHARE_TYPE_GROUP","AccountGroupSvg","SHARE_TYPE_CIRCLE","userId","isGuest","avatarUrl","generateUrl","generateAvatarSvg","_node$attributes11","_node$attributes12","_getCurrentUser4","SHARE","_window$OCA","_window$OCA$setActive","READ","setActiveTab","sidebarAction","Navigation","getNavigation","register","View","caption","emptyTitle","emptyCaption","icon","columns","parent","registerSharingViews","registerDavProperty","nc","oc","___CSS_LOADER_EXPORT___","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","keys","every","splice","r","getter","__esModule","d","a","definition","o","defineProperty","enumerable","f","e","chunkId","u","g","globalThis","Function","obj","prop","prototype","hasOwnProperty","l","done","script","needAttach","scripts","getElementsByTagName","s","getAttribute","createElement","charset","timeout","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","forEach","setTimeout","bind","target","head","appendChild","Symbol","toStringTag","value","nmd","paths","children","scriptUrl","importScripts","location","currentScript","test","Error","replace","p","b","baseURI","self","href","installedChunks","installedChunkData","promise","resolve","reject","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file