From b6e1c9531dd4a3c1c367bd2acbc2caafd8f352de Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 3 Aug 2024 06:36:09 +0000 Subject: build(deps): bump @nextcloud/paths from 2.2.0 to 2.2.1 Bumps [@nextcloud/paths](https://github.com/nextcloud-libraries/nextcloud-paths) from 2.2.0 to 2.2.1. - [Release notes](https://github.com/nextcloud-libraries/nextcloud-paths/releases) - [Changelog](https://github.com/nextcloud-libraries/nextcloud-paths/blob/main/CHANGELOG.md) - [Commits](https://github.com/nextcloud-libraries/nextcloud-paths/compare/v2.2.0...v2.2.1) --- updated-dependencies: - dependency-name: "@nextcloud/paths" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- dist/files_sharing-init.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dist/files_sharing-init.js') diff --git a/dist/files_sharing-init.js b/dist/files_sharing-init.js index dd8d924d018..55d99ec7acd 100644 --- a/dist/files_sharing-init.js +++ b/dist/files_sharing-init.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e,t,i,n={9165:(e,t,i)=>{i.d(t,{Krx:()=>n,NZC:()=>r,ZL5:()=>o,fEr:()=>s});var n="M16 17V19H2V17S2 13 9 13 16 17 16 17M12.5 7.5A3.5 3.5 0 1 0 9 11A3.5 3.5 0 0 0 12.5 7.5M15.94 13A5.32 5.32 0 0 1 18 17V19H22V17S22 13.37 15.94 13M15 4A3.39 3.39 0 0 0 13.07 4.59A5 5 0 0 1 13.07 10.41A3.39 3.39 0 0 0 15 11A3.5 3.5 0 0 0 15 4Z",r="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M16.2,16.2L11,13V7H12.5V12.2L17,14.9L16.2,16.2Z",s="M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z",o="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z"},37886:(e,t,i)=>{var n=i(35810),r=i(85471),s=i(53334),o=i(9165),a=i(13073),l=i(24764),d=i(89257),u=i(80114);const c=(0,r.pM)({__name:"FileListFilter",props:{isActive:{type:Boolean},filterName:null},emits:["reset-filter"],setup:e=>({__sfc:!0,t:s.t,NcActions:l.A,NcActionButton:d.A,NcActionSeparator:u.A})});var h=i(85072),p=i.n(h),f=i(97825),g=i.n(f),m=i(77659),v=i.n(m),w=i(55056),E=i.n(w),b=i(10540),y=i.n(b),A=i(41113),_=i.n(A),N=i(69409),x={};x.styleTagTransform=_(),x.setAttributes=E(),x.insert=v().bind(null,"head"),x.domAPI=g(),x.insertStyleElement=y(),p()(N.A,x),N.A&&N.A.locals&&N.A.locals;var I=i(14486);const C=(0,I.A)(c,(function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t(i.NcActions,{attrs:{"force-menu":"",type:e.isActive?"secondary":"tertiary","menu-name":e.filterName},scopedSlots:e._u([{key:"icon",fn:function(){return[e._t("icon")]},proxy:!0}],null,!0)},[e._v(" "),e._t("default"),e._v(" "),e.isActive?[t(i.NcActionSeparator),e._v(" "),t(i.NcActionButton,{staticClass:"files-list-filter__clear-button",attrs:{"close-after-click":""},on:{click:function(t){return e.$emit("reset-filter")}}},[e._v("\n\t\t\t"+e._s(i.t("files","Clear filter"))+"\n\t\t")])]:e._e()],2)}),[],!1,null,"5c37f334",null).exports;var T=i(44131),O=i(41944),L=i(6695),S=i(77905);const R=(0,r.pM)({__name:"FileListFilterAccount",emits:["update:accounts"],setup(e,t){let{expose:i,emit:l}=t;const{currentView:u}=function(){const e=(0,n.bh)(),t=(0,r.IJ)(e.views),i=(0,r.IJ)(e.active);function s(e){i.value=e.detail}function o(){t.value=e.views,(0,r.mu)(t)}return(0,r.sV)((()=>{e.addEventListener("update",o),e.addEventListener("updateActive",s)})),(0,r.hi)((()=>{e.removeEventListener("update",o),e.removeEventListener("updateActive",s)})),{currentView:i,views:t}}(),c=(0,a.ZDG)(),h=(0,r.KR)(""),p=(0,r.KR)([]),f=(0,r.KR)([]),g=(0,r.EW)((()=>{if(!h.value)return p.value;const e=h.value.toLocaleLowerCase().trim().split(" ");return p.value.filter((t=>e.every((e=>t.user.toLocaleLowerCase().includes(e)||t.displayName.toLocaleLowerCase().includes(e)))))}));function m(e){const t=p.value.find((t=>{let{id:i}=t;return i===e}));t&&f.value.includes(t)?f.value=f.value.filter((t=>{let{id:i}=t;return i!==e})):t&&(f.value=[...f.value,t])}async function v(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";if(p.value=[],!u.value)return;const{contents:t}=await u.value.getContents(e),i=new Map;for(const e of t){var n,r;const t=null!==(n=e.owner)&&void 0!==n?n:e.attributes["owner-id"];var s;t&&!i.has(t)&&i.set(t,{id:t,user:t,displayName:null!==(s=e.attributes["owner-display-name"])&&void 0!==s?s:e.owner});const o=null===(r=e.attributes.sharees)||void 0===r?void 0:r.sharee;if(o)for(const e of[o].flat())""!==e.id&&(e.type!==S.I.User&&e.type!==S.I.Remote||i.has(e.id)||i.set(e.id,{id:e.id,user:e.id,displayName:e["display-name"]}))}p.value=[...i.values()]}function w(){f.value=[],h.value=""}return(0,r.wB)(f,(()=>{const e=f.value.map((e=>{let{id:t,displayName:i}=e;return{uid:t,displayName:i}}));l("update:accounts",e)})),i({resetFilter:w,toggleAccount:m}),(0,r.wB)([u,c],(()=>{if(u.value){var e,t;const i=null===(e=(null!==(t=c.value.search)&&void 0!==t?t:"?dir=/").match(/(?<=&|\?)dir=([^&#]+)/))||void 0===e?void 0:e[1];w(),v(decodeURIComponent(null!=i?i:"/"))}}),{immediate:!0}),{__sfc:!0,emit:l,currentView:u,currentLocation:c,accountFilter:h,availableAccounts:p,selectedAccounts:f,shownAccounts:g,toggleAccount:m,updateAvailableAccounts:v,resetFilter:w,t:s.Tl,mdiAccountMultiple:o.Krx,FileListFilter:C,NcActionButton:d.A,NcActionInput:T.A,NcAvatar:O.A,NcIconSvgWrapper:L.A}}});var D=i(59921),P={};P.styleTagTransform=_(),P.setAttributes=E(),P.insert=v().bind(null,"head"),P.domAPI=g(),P.insertStyleElement=y(),p()(D.A,P),D.A&&D.A.locals&&D.A.locals;const $=(0,I.A)(R,(function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t(i.FileListFilter,{staticClass:"file-list-filter-accounts",attrs:{"is-active":i.selectedAccounts.length>0,"filter-name":i.t("files","People")},on:{"reset-filter":i.resetFilter},scopedSlots:e._u([{key:"icon",fn:function(){return[t(i.NcIconSvgWrapper,{attrs:{path:i.mdiAccountMultiple}})]},proxy:!0}])},[e._v(" "),i.availableAccounts.length>1?t(i.NcActionInput,{attrs:{label:i.t("files_sharing","Filter accounts"),"label-outside":!1,"show-trailing-button":!1,type:"search",value:i.accountFilter},on:{"update:value":function(e){i.accountFilter=e}}}):e._e(),e._v(" "),e._l(i.shownAccounts,(function(n){return t(i.NcActionButton,{key:n.id,staticClass:"file-list-filter-accounts__item",attrs:{type:"radio","model-value":i.selectedAccounts.includes(n),value:n.id},on:{click:function(e){return i.toggleAccount(n.id)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t(i.NcAvatar,e._b({staticClass:"file-list-filter-accounts__avatar",attrs:{size:24,"disable-menu":"","show-user-status":!1}},"NcAvatar",n,!1))]},proxy:!0}],null,!0)},[e._v("\n\t\t"+e._s(n.displayName)+"\n\t")])}))],2)}),[],!1,null,"5f4e919c",null).exports;function F(e,t,i){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class M extends n.L3{constructor(){super("files_sharing:account",100),F(this,"currentInstance",void 0),F(this,"filterAccounts",void 0)}mount(e){this.currentInstance&&this.currentInstance.$destroy();const t=r.Ay.extend($);this.currentInstance=new t({el:e}).$on("update:accounts",this.setAccounts.bind(this)).$mount()}filter(e){if(!this.filterAccounts||0===this.filterAccounts.length)return e;const t=this.filterAccounts.map((e=>{let{uid:t}=e;return t}));return e.filter((e=>{var i;const n=null===(i=e.attributes.sharees)||void 0===i?void 0:i.sharee;return!e.owner&&!n||!(!e.owner||!t.includes(e.owner))||!(!n||![n].flat().some((e=>{let{id:i}=e;return t.includes(i)})))}))}setAccounts(e){this.filterAccounts=e;let t=[];this.filterAccounts&&this.filterAccounts.length>0&&(t=this.filterAccounts.map((e=>{let{displayName:t,uid:i}=e;return{text:t,user:i,onclick:()=>{var e;return null===(e=this.currentInstance)||void 0===e?void 0:e.toggleAccount(i)}}}))),this.updateChips(t),this.filterUpdated()}}var V=i(85168);const k='',j=new(i(7145).A),B=(0,r.$V)((()=>Promise.all([i.e(4208),i.e(9725)]).then(i.bind(i,39725)))),G={id:"file-request",displayName:(0,s.Tl)("files_sharing","Create file request"),iconSvgInline:k,order:10,enabled:()=>j.isPublicShareAllowed,async handler(e,t){(0,V.Ss)(B,{context:e,content:t})}},H='',X='',U='';var q=i(18709);const z="shareoverview",Z="sharingin",K="sharingout",Y="sharinglinks",W="deletedshares",J="pendingshares";var Q=i(61338),ee=i(63814),te=i(65043),ie=i(65659);const ne=new n.hY({id:"accept-share",displayName:e=>(0,s.zw)("files_sharing","Accept share","Accept shares",e.length),iconSvgInline:()=>ie,enabled:(e,t)=>e.length>0&&t.id===J,async exec(e){try{const t=!!e.attributes.remote,i=(0,ee.KT)("apps/files_sharing/api/v1/{shareBase}/pending/{id}",{shareBase:t?"remote_shares":"shares",id:e.attributes.id});return await te.Ay.post(i),(0,Q.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)(ne);const re=new n.hY({id:"open-in-files",displayName:()=>(0,s.Tl)("files_sharing","Open in Files"),iconSvgInline:()=>"",enabled:(e,t)=>[z,Z,K,Y].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)(re);const se=new n.hY({id:"reject-share",displayName:e=>(0,s.zw)("files_sharing","Reject share","Reject shares",e.length),iconSvgInline:()=>'',enabled:(e,t)=>t.id===J&&0!==e.length&&!e.some((e=>e.attributes.remote_id&&e.attributes.share_type===S.I.RemoteGroup)),async exec(e){try{const t=!!e.attributes.remote,i=(0,ee.KT)("apps/files_sharing/api/v1/{shareBase}/{id}",{shareBase:t?"remote_shares":"shares",id:e.attributes.id});return await te.Ay.delete(i),(0,Q.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)(se);const oe=new n.hY({id:"restore-share",displayName:e=>(0,s.zw)("files_sharing","Restore share","Restore shares",e.length),iconSvgInline:()=>'',enabled:(e,t)=>e.length>0&&t.id===W,async exec(e){try{const t=(0,ee.KT)("apps/files_sharing/api/v1/deletedshares/{id}",{id:e.attributes.id});return await te.Ay.post(t),(0,Q.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)(oe);var ae=i(21777),le=i(49981);const de=(0,i(35947).YK)().setApp("files").detectUser().build(),ue=new n.hY({id:"details",displayName:()=>(0,s.Tl)("files","Open details"),iconSvgInline:()=>le,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:String(e.fileid)},{...window.OCP.Files.Router.query,dir:i},!0),null}catch(e){return de.error("Error while opening sidebar",{error:e}),!1}},order:-50});var ce,he;const pe=!0===(null===(ce=window)||void 0===ce||null===(he=ce.matchMedia)||void 0===he||null===(he=he.call(ce,"(prefers-color-scheme: dark)"))||void 0===he?void 0:he.matches)||null!==document.querySelector("[data-themes*=dark]");var fe=i(8132),ge={};ge.styleTagTransform=_(),ge.setAttributes=E(),ge.insert=v().bind(null,"head"),ge.domAPI=g(),ge.insertStyleElement=y(),p()(fe.A,ge),fe.A&&fe.A.locals&&fe.A.locals;const me=e=>void 0!==e.attributes.remote_id,ve=new n.hY({id:"sharing-status",displayName(e){var t,i,n;const r=e[0],o=Object.values((null==r||null===(t=r.attributes)||void 0===t?void 0:t["share-types"])||{}).flat(),a=null==r||null===(i=r.attributes)||void 0===i?void 0:i["owner-id"];return o.length>0||a!==(null===(n=(0,ae.HW)())||void 0===n?void 0:n.uid)||me(r)?(0,s.Tl)("files_sharing","Shared"):""},title(e){var t,i,n,r,o;const a=e[0],l=null==a||null===(t=a.attributes)||void 0===t?void 0:t["owner-id"],d=null==a||null===(i=a.attributes)||void 0===i?void 0:i["owner-display-name"];return Array.isArray(null===(n=a.attributes)||void 0===n?void 0:n["share-types"])&&(null===(r=a.attributes)||void 0===r?void 0:r["share-types"].length)>1?(0,s.Tl)("files_sharing","Shared multiple times with different people"):l&&(l!==(null===(o=(0,ae.HW)())||void 0===o?void 0:o.uid)||me(a))?(0,s.Tl)("files_sharing","Shared by {ownerDisplayName}",{ownerDisplayName:d}):(0,s.Tl)("files_sharing","Show sharing options")},iconSvgInline(e){var t,i,n,r,s;const o=e[0],a=Object.values((null==o||null===(t=o.attributes)||void 0===t?void 0:t["share-types"])||{}).flat();if(Array.isArray(null===(i=o.attributes)||void 0===i?void 0:i["share-types"])&&(null===(n=o.attributes)||void 0===n?void 0:n["share-types"].length)>1)return X;if(a.includes(S.I.Link)||a.includes(S.I.Email))return U;if(a.includes(S.I.Grup)||a.includes(S.I.RemoteGroup))return H;if(a.includes(S.I.Team))return'';const l=null==o||null===(r=o.attributes)||void 0===r?void 0:r["owner-id"];return l&&(l!==(null===(s=(0,ae.HW)())||void 0===s?void 0:s.uid)||me(o))?function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=pe?"/avatar/{userId}/32/dark":"/avatar/{userId}/32",n=(0,ee.Jv)(t?i:i+"?guestFallback=true",{userId:e});return'\n\t\t\n\t')}(l,me(o)):X},enabled(e){var t,i,r;if(1!==e.length)return!1;const s=e[0],o=null==s||null===(t=s.attributes)||void 0===t?void 0:t["owner-id"],a=null===(i=s.attributes)||void 0===i?void 0:i["share-types"];return!!(Array.isArray(a)&&a.length>0)||!(!o||o===(null===(r=(0,ae.HW)())||void 0===r?void 0:r.uid)&&!me(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"),ue.exec(e,t,i)):null},inline:()=>!0});(0,n.Gg)(ve),(()=>{const e=(0,n.bh)();e.register(new n.Ss({id:z,name:(0,s.Tl)("files_sharing","Shares"),caption:(0,s.Tl)("files_sharing","Overview of shared files."),emptyTitle:(0,s.Tl)("files_sharing","No shares"),emptyCaption:(0,s.Tl)("files_sharing","Files and folders you shared or have been shared with you will show up here"),icon:X,order:20,columns:[],getContents:()=>(0,q.hE)()})),e.register(new n.Ss({id:Z,name:(0,s.Tl)("files_sharing","Shared with you"),caption:(0,s.Tl)("files_sharing","List of files that are shared with you."),emptyTitle:(0,s.Tl)("files_sharing","Nothing shared with you yet"),emptyCaption:(0,s.Tl)("files_sharing","Files and folders others shared with you will show up here"),icon:'',order:1,parent:z,columns:[],getContents:()=>(0,q.hE)(!0,!1,!1,!1)})),e.register(new n.Ss({id:K,name:(0,s.Tl)("files_sharing","Shared with others"),caption:(0,s.Tl)("files_sharing","List of files that you shared with others."),emptyTitle:(0,s.Tl)("files_sharing","Nothing shared yet"),emptyCaption:(0,s.Tl)("files_sharing","Files and folders you shared will show up here"),icon:H,order:2,parent:z,columns:[],getContents:()=>(0,q.hE)(!1,!0,!1,!1)})),e.register(new n.Ss({id:Y,name:(0,s.Tl)("files_sharing","Shared by link"),caption:(0,s.Tl)("files_sharing","List of files that are shared by link."),emptyTitle:(0,s.Tl)("files_sharing","No shared links"),emptyCaption:(0,s.Tl)("files_sharing","Files and folders you shared by link will show up here"),icon:U,order:3,parent:z,columns:[],getContents:()=>(0,q.hE)(!1,!0,!1,!1,[S.I.Link])})),e.register(new n.Ss({id:"filerequest",name:(0,s.Tl)("files_sharing","File requests"),caption:(0,s.Tl)("files_sharing","List of file requests."),emptyTitle:(0,s.Tl)("files_sharing","No file requests"),emptyCaption:(0,s.Tl)("files_sharing","File requests you have created will show up here"),icon:k,order:4,parent:z,columns:[],getContents:()=>(0,q.hE)(!1,!0,!1,!1,[S.I.Link,S.I.Email]).then((e=>{let{folder:t,contents:i}=e;return{folder:t,contents:i.filter((e=>{var t;return(0,q.CK)((null===(t=e.attributes)||void 0===t?void 0:t["share-attributes"])||[])}))}}))})),e.register(new n.Ss({id:W,name:(0,s.Tl)("files_sharing","Deleted shares"),caption:(0,s.Tl)("files_sharing","List of shares you left."),emptyTitle:(0,s.Tl)("files_sharing","No deleted shares"),emptyCaption:(0,s.Tl)("files_sharing","Shares you have left will show up here"),icon:'',order:5,parent:z,columns:[],getContents:()=>(0,q.hE)(!1,!1,!1,!0)})),e.register(new n.Ss({id:J,name:(0,s.Tl)("files_sharing","Pending shares"),caption:(0,s.Tl)("files_sharing","List of unapproved shares."),emptyTitle:(0,s.Tl)("files_sharing","No pending shares"),emptyCaption:(0,s.Tl)("files_sharing","Shares you have received but not approved will show up here"),icon:'',order:6,parent:z,columns:[],getContents:()=>(0,q.hE)(!1,!1,!0,!1)}))})(),(0,n.zj)(G),(0,n.Yc)("nc:note",{nc:"http://nextcloud.org/ns"}),(0,n.Yc)("nc:sharees",{nc:"http://nextcloud.org/ns"}),(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"}),(0,n.cZ)(new M),function(){let e,t;(0,n.Up)(new n.Y9({id:"note-to-recipient",order:0,enabled:e=>Boolean(e.attributes.note),updated:e=>{t.updateFolder(e)},render:async(n,s)=>{if(void 0===e){const{default:t}=await Promise.all([i.e(4208),i.e(5804)]).then(i.bind(i,75804));e=r.Ay.extend(t)}t=(new e).$mount(n),t.updateFolder(s)}}))}()},7145:(e,t,i)=>{i.d(t,{A:()=>r});var n=i(87485);class r{constructor(){var e,t,i;e=this,i=void 0,(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t="_capabilities"))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,this._capabilities=(0,n.F)()}get defaultPermissions(){var e;return null===(e=this._capabilities.files_sharing)||void 0===e?void 0:e.default_permissions}get isPublicUploadEnabled(){var e;return!0===(null===(e=this._capabilities.files_sharing)||void 0===e||null===(e=e.public)||void 0===e?void 0:e.upload)}get federatedShareDocLink(){return window.OC.appConfig.core.federatedCloudShareDoc}get defaultExpirationDate(){return this.isDefaultExpireDateEnabled&&null!==this.defaultExpireDate?new Date((new Date).setDate((new Date).getDate()+this.defaultExpireDate)):null}get defaultInternalExpirationDate(){return this.isDefaultInternalExpireDateEnabled&&null!==this.defaultInternalExpireDate?new Date((new Date).setDate((new Date).getDate()+this.defaultInternalExpireDate)):null}get defaultRemoteExpirationDateString(){return this.isDefaultRemoteExpireDateEnabled&&null!==this.defaultRemoteExpireDate?new Date((new Date).setDate((new Date).getDate()+this.defaultRemoteExpireDate)):null}get enforcePasswordForPublicLink(){return!0===window.OC.appConfig.core.enforcePasswordForPublicLink}get enableLinkPasswordByDefault(){return!0===window.OC.appConfig.core.enableLinkPasswordByDefault}get isDefaultExpireDateEnforced(){return!0===window.OC.appConfig.core.defaultExpireDateEnforced}get isDefaultExpireDateEnabled(){return!0===window.OC.appConfig.core.defaultExpireDateEnabled}get isDefaultInternalExpireDateEnforced(){return!0===window.OC.appConfig.core.defaultInternalExpireDateEnforced}get isDefaultInternalExpireDateEnabled(){return!0===window.OC.appConfig.core.defaultInternalExpireDateEnabled}get isDefaultRemoteExpireDateEnforced(){return!0===window.OC.appConfig.core.defaultRemoteExpireDateEnforced}get isDefaultRemoteExpireDateEnabled(){return!0===window.OC.appConfig.core.defaultRemoteExpireDateEnabled}get isRemoteShareAllowed(){return!0===window.OC.appConfig.core.remoteShareAllowed}get isPublicShareAllowed(){var e;return!0===(null===(e=this._capabilities)||void 0===e||null===(e=e.files_sharing)||void 0===e||null===(e=e.public)||void 0===e?void 0:e.enabled)}get isMailShareAllowed(){var e;return!0===(null===(e=this._capabilities)||void 0===e||null===(e=e.files_sharing)||void 0===e||null===(e=e.sharebymail)||void 0===e?void 0:e.enabled)&&!0===this.isPublicShareAllowed}get defaultExpireDate(){return window.OC.appConfig.core.defaultExpireDate}get defaultInternalExpireDate(){return window.OC.appConfig.core.defaultInternalExpireDate}get defaultRemoteExpireDate(){return window.OC.appConfig.core.defaultRemoteExpireDate}get isResharingAllowed(){return!0===window.OC.appConfig.core.resharingAllowed}get isPasswordForMailSharesRequired(){var e;return!0===(null===(e=this._capabilities.files_sharing)||void 0===e||null===(e=e.sharebymail)||void 0===e||null===(e=e.password)||void 0===e?void 0:e.enforced)}get shouldAlwaysShowUnique(){var e;return!0===(null===(e=this._capabilities.files_sharing)||void 0===e||null===(e=e.sharee)||void 0===e?void 0:e.always_show_unique)}get allowGroupSharing(){return!0===window.OC.appConfig.core.allowGroupSharing}get maxAutocompleteResults(){return parseInt(window.OC.config["sharing.maxAutocompleteResults"],10)||25}get minSearchStringLength(){return parseInt(window.OC.config["sharing.minSearchStringLength"],10)||0}get passwordPolicy(){var e;return(null===(e=this._capabilities)||void 0===e?void 0:e.password_policy)||{}}}},18709:(e,t,i)=>{i.d(t,{CK:()=>p,hE:()=>f});var n,r=i(35810),s=i(63814),o=i(21777),a=i(65043),l=i(62746);const d="/files/".concat(null===(n=(0,o.HW)())||void 0===n?void 0:n.uid),u={"Content-Type":"application/json"},c=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,33238))).default;e.mimetype=t.getType(e.name),e.item_type=e.mimetype?"file":"folder",e.item_permissions=r.aX.NONE,e.permissions=r.aX.NONE,e.uid_owner=e.owner,e.displayname_owner=e.owner}const n="folder"===(null==e?void 0:e.item_type),o=!0===(null==e?void 0:e.has_preview),a=n?r.vd:r.ZH,l=e.file_source||e.id,u=(null==e?void 0:e.path)||e.file_target||e.name,c=(0,s.dC)("dav/".concat(d,"/").concat(u).replaceAll(/\/\//gm,"/"));let h=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)&&(h=new Date(1e3*e.stime)),new a({id:l,source:c,owner:null==e?void 0:e.uid_owner,mime:(null==e?void 0:e.mimetype)||"application/octet-stream",mtime:h,size:null==e?void 0:e.item_size,permissions:(null==e?void 0:e.item_permissions)||(null==e?void 0:e.permissions),root:d,attributes:{...e,"has-preview":o,"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 l.A.error("Error while parsing OCS entry",{error:e}),null}},h=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=(0,s.KT)("apps/files_sharing/api/v1/shares");return a.Ay.get(t,{headers:u,params:{shared_with_me:e,include_tags:!0}})},p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[]";const t=e=>"fileRequest"===e.scope&&"enabled"===e.key&&!0===e.value;try{return JSON.parse(e).some(t)}catch(e){return l.A.error("Error while parsing share attributes",{error:e}),!1}},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],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];const p=[];(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&p.push(h(!0),function(){const e=(0,s.KT)("apps/files_sharing/api/v1/remote_shares");return a.Ay.get(e,{headers:u,params:{include_tags:!0}})}()),t&&p.push(h()),i&&p.push(function(){const e=(0,s.KT)("apps/files_sharing/api/v1/shares/pending");return a.Ay.get(e,{headers:u,params:{include_tags:!0}})}(),function(){const e=(0,s.KT)("apps/files_sharing/api/v1/remote_shares/pending");return a.Ay.get(e,{headers:u,params:{include_tags:!0}})}()),n&&p.push(function(){const e=(0,s.KT)("apps/files_sharing/api/v1/deletedshares");return a.Ay.get(e,{headers:u,params:{include_tags:!0}})}());const f=(await Promise.all(p)).map((e=>e.data.ocs.data)).flat();let g=(await Promise.all(f.map(c))).filter((e=>null!==e));var m,v;return l.length>0&&(g=g.filter((e=>{var t;return l.includes(null===(t=e.attributes)||void 0===t?void 0:t.share_type)}))),g=(m=g,v="source",Object.values(m.reduce((function(e,t){return(e[t[v]]=e[t[v]]||[]).push(t),e}),{}))).map((e=>{const t=e[0];return t.attributes["share-types"]=e.map((e=>e.attributes["share-types"])),t})),{folder:new r.vd({id:0,source:(0,s.dC)("dav"+d),owner:(null===(e=(0,o.HW)())||void 0===e?void 0:e.uid)||null}),contents:g}}},62746:(e,t,i)=>{i.d(t,{A:()=>n});const n=(0,i(35947).YK)().setApp("files_sharing").detectUser().build()},8132:(e,t,i)=>{i.d(t,{A:()=>a});var n=i(71354),r=i.n(n),s=i(76314),o=i.n(s)()(r());o.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:"AAKA,qDAEC,aAAA,CAEG,0BAAA,CAGJ,2BACC,sBAAA,CACA,qBAAA,CACA,0BAAA,CACA,yBAAA,CACA,kBAAA,CACA,eAAA",sourcesContent:["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\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 a=o},59921:(e,t,i)=>{i.d(t,{A:()=>a});var n=i(71354),r=i.n(n),s=i(76314),o=i.n(s)()(r());o.push([e.id,".file-list-filter-accounts__item[data-v-5f4e919c]{min-width:250px}.file-list-filter-accounts__avatar[data-v-5f4e919c]{margin:calc((var(--default-clickable-area) - 24px)/2)}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/FileListFilterAccount.vue"],names:[],mappings:"AAEC,kDACC,eAAA,CAGD,oDAEC,qDAAA",sourcesContent:["\n.file-list-filter-accounts {\n\t&__item {\n\t\tmin-width: 250px;\n\t}\n\n\t&__avatar {\n\t\t// 24px is the avatar size\n\t\tmargin: calc((var(--default-clickable-area) - 24px) / 2)\n\t}\n}\n"],sourceRoot:""}]);const a=o},69409:(e,t,i)=>{i.d(t,{A:()=>a});var n=i(71354),r=i.n(n),s=i(76314),o=i.n(s)()(r());o.push([e.id,"\n.files-list-filter__clear-button[data-v-5c37f334] .action-button__text {\n\tcolor: var(--color-error-text);\n}\n[data-v-5c37f334] .button-vue {\n\tfont-weight: normal !important;\n*[data-v-5c37f334] {\n\t\tfont-weight: normal !important;\n}\n}\n","",{version:3,sources:["webpack://./apps/files/src/components/FileListFilter/FileListFilter.vue"],names:[],mappings:";AAyCA;CACA,8BAAA;AACA;AAEA;CACA,8BAAA;AAEA;EACA,8BAAA;AACA;AACA",sourcesContent:["\x3c!--\n - SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n--\x3e\n\n\n