(()=>{var e,t,n,r={81382(e,t,n){"use strict";var r=n(35810),i=n(77815),s=n(65659),a=n(19051),o=n(61338),l=n(53334),c=n(63814);const d='',u='',p='',h='';var f=n(81222),m=n(40715),g=n(87543);const v="shareoverview",A="sharingin",w="sharingout",b="sharinglinks",y="deletedshares",_="pendingshares",C={id:"accept-share",displayName:({nodes:e})=>(0,l.zw)("files_sharing","Accept share","Accept shares",e.length),iconSvgInline:()=>s,enabled:({nodes:e,view:t})=>e.length>0&&t.id===_,async exec({nodes:e}){try{const t=e[0],n=!!t.attributes.remote,r=(0,c.KT)("apps/files_sharing/api/v1/{shareBase}/pending/{id}",{shareBase:n?"remote_shares":"shares",id:t.id});return await a.Ay.post(r),(0,o.Ic)("files:node:deleted",t),!0}catch{return!1}},async execBatch({nodes:e,view:t,folder:n,contents:r}){return Promise.all(e.map(e=>this.exec({nodes:[e],view:t,folder:n,contents:r})))},order:1,inline:()=>!0},x={id:"files_sharing:open-in-files",displayName:()=>(0,l.Tl)("files_sharing","Open in Files"),iconSvgInline:()=>"",enabled:({view:e})=>[v,A,w,b].includes(e.id),async exec({nodes:e}){const t=e[0].type===r.pt.Folder;return window.OCP.Files.Router.goToRoute(null,{view:"files",fileid:String(e[0].fileid)},{dir:t?e[0].path:e[0].dirname,openfile:t?void 0:"true"}),null},order:-1e3,default:r.m9.HIDDEN},E={id:"reject-share",displayName:({nodes:e})=>(0,l.zw)("files_sharing","Reject share","Reject shares",e.length),iconSvgInline:()=>'',enabled:({nodes:e,view:t})=>t.id===_&&0!==e.length&&!e.some(e=>e.attributes.remote_id&&e.attributes.share_type===m.I.RemoteGroup),async exec({nodes:e}){try{const t=e[0],n=t.attributes.remote?"remote_shares":"shares",r=t.id;let i;return i=0===t.attributes.accepted?(0,c.KT)("apps/files_sharing/api/v1/{shareBase}/pending/{id}",{shareBase:n,id:r}):(0,c.KT)("apps/files_sharing/api/v1/{shareBase}/{id}",{shareBase:n,id:r}),await a.Ay.delete(i),(0,o.Ic)("files:node:deleted",t),!0}catch{return!1}},async execBatch({nodes:e,view:t,folder:n,contents:r}){return Promise.all(e.map(e=>this.exec({nodes:[e],view:t,folder:n,contents:r})))},order:2,inline:()=>!0},D={id:"restore-share",displayName:({nodes:e})=>(0,l.zw)("files_sharing","Restore share","Restore shares",e.length),iconSvgInline:()=>'',enabled:({nodes:e,view:t})=>e.length>0&&t.id===y,async exec({nodes:e}){try{const t=e[0],n=(0,c.KT)("apps/files_sharing/api/v1/deletedshares/{id}",{id:t.id});return await a.Ay.post(n),(0,o.Ic)("files:node:deleted",t),!0}catch{return!1}},async execBatch({nodes:e,view:t,folder:n,contents:r}){return Promise.all(e.map(e=>this.exec({nodes:[e],view:t,folder:n,contents:r})))},order:1,inline:()=>!0};var S=n(21777),L=n(85168),N=n(32505);var T=n(85072),F=n.n(T),I=n(97825),H=n.n(I),P=n(77659),V=n.n(P),M=n(55056),O=n.n(M),k=n(10540),R=n.n(k),$=n(41113),B=n.n($),U=n(53168),j={};function q(e){return e.attributes?.["is-federated"]??!1}j.styleTagTransform=B(),j.setAttributes=O(),j.insert=V().bind(null,"head"),j.domAPI=H(),j.insertStyleElement=R(),F()(U.A,j),U.A&&U.A.locals&&U.A.locals;const z={id:"sharing-status",displayName({nodes:e}){const t=e[0];return Object.values(t?.attributes?.["share-types"]||{}).flat().length>0||t.owner!==(0,S.HW)()?.uid||q(t)?(0,l.Tl)("files_sharing","Shared"):""},title({nodes:e}){const t=e[0];if(t.owner&&(t.owner!==(0,S.HW)()?.uid||q(t))){const e=t?.attributes?.["owner-display-name"];return(0,l.Tl)("files_sharing","Shared by {ownerDisplayName}",{ownerDisplayName:e})}if(Object.values(t?.attributes?.["share-types"]||{}).flat().length>1)return(0,l.Tl)("files_sharing","Shared multiple times with different people");const n=t.attributes.sharees?.sharee;if(!n)return(0,l.Tl)("files_sharing","Sharing options");const r=[n].flat()[0];switch(r?.type){case m.I.User:return(0,l.Tl)("files_sharing","Shared with {user}",{user:r["display-name"]});case m.I.Group:return(0,l.Tl)("files_sharing","Shared with group {group}",{group:r["display-name"]??r.id});default:return(0,l.Tl)("files_sharing","Shared with others")}},iconSvgInline({nodes:e}){const t=e[0],n=Object.values(t?.attributes?.["share-types"]||{}).flat();return Array.isArray(t.attributes?.["share-types"])&&t.attributes?.["share-types"].length>1?u:n.includes(m.I.Link)||n.includes(m.I.Email)?h:n.includes(m.I.Group)||n.includes(m.I.RemoteGroup)?d:n.includes(m.I.Team)?'':t.owner&&(t.owner!==(0,S.HW)()?.uid||q(t))?function(e,t=!1){const n=`${t?`/avatar/guest/${e}`:`/avatar/${e}`}/32${!0===window?.matchMedia?.("(prefers-color-scheme: dark)")?.matches||null!==document.querySelector("[data-themes*=dark]")?"/dark":""}${t?"":"?guestFallback=true"}`;return`\n\t\t\n\t`}(t.owner,q(t)):u},enabled({nodes:e}){if(1!==e.length)return!1;if((0,N.f)())return!1;const t=e[0],n=t.attributes?.["share-types"];return!!(Array.isArray(n)&&n.length>0)||!(t.owner===(0,S.HW)()?.uid&&!q(t))||0!==(t.permissions&r.aX.SHARE)&&0!==(t.permissions&r.aX.READ)},async exec({nodes:e}){const t=e[0];return 0!==(t.permissions&r.aX.READ)?((0,r.dC)().open(t,"sharing"),null):((0,L.Qg)((0,l.Tl)("files_sharing","You do not have enough permissions to share this file.")),null)},inline:()=>!0};var G=n(26422),W=n(85471),K=n(41944),Y=n(74095),Z=n(82182);const X=document.getElementsByTagName("head")[0].getAttribute("data-user"),J=(document.getElementsByTagName("head")[0].getAttribute("data-user-displayname"),void 0!==X&&X),Q=(0,W.pM)({__name:"FileListFilterAccount",props:{filter:null},setup(e){const t=e,n=J,r=(0,W.KR)(""),i=(0,W.KR)([]),s=(0,W.KR)([]);(0,W.wB)(s,()=>{const e=s.value.map(({id:e,displayName:t})=>({uid:e,displayName:t}));t.filter.setAccounts(e.length>0?e:void 0)}),(0,W.sV)(()=>{u(t.filter.availableAccounts),s.value=i.value.filter(({id:e})=>t.filter.filterAccounts?.some(({uid:t})=>t===e))??[],t.filter.addEventListener("accounts-updated",u),t.filter.addEventListener("reset",d),t.filter.addEventListener("deselect",c)}),(0,W.hi)(()=>{t.filter.removeEventListener("accounts-updated",u),t.filter.removeEventListener("reset",d),t.filter.removeEventListener("deselect",c)});const a=(0,W.EW)(()=>{if(!r.value)return[...i.value].sort(o);const e=r.value.toLocaleLowerCase().trim().split(" ");return i.value.filter(t=>e.every(e=>t.user.toLocaleLowerCase().includes(e)||t.displayName.toLocaleLowerCase().includes(e))).sort(o)});function o(e,t){return e.id===n?-1:t.id===n?1:e.displayName.localeCompare(t.displayName)}function c(e){const t=e.detail;s.value=s.value.filter(({id:e})=>e!==t)}function d(){s.value=[],r.value=""}function u(e){e instanceof CustomEvent&&(e=e.detail),i.value=e.map(({uid:e,displayName:t})=>({displayName:t,id:e,user:e}))}return{__sfc:!0,props:t,currentUserId:n,accountFilter:r,availableAccounts:i,selectedAccounts:s,shownAccounts:a,sortAccounts:o,toggleAccount:function(e,t){if(s.value=s.value.filter(({id:t})=>t!==e),t){const t=i.value.find(({id:t})=>t===e);t&&(s.value=[...s.value,t])}},deselect:c,resetFilter:d,setAvailableAccounts:u,t:l.t,NcAvatar:K.A,NcButton:Y.A,NcTextField:Z.A}}});var ee=n(15914),te={};te.styleTagTransform=B(),te.setAttributes=O(),te.insert=V().bind(null,"head"),te.domAPI=H(),te.insertStyleElement=R(),F()(ee.A,te);const ne=ee.A&&ee.A.locals?ee.A.locals:void 0,re=(0,n(14486).A)(Q,function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{class:e.$style.fileListFilterAccount},[n.availableAccounts.length>1?t(n.NcTextField,{attrs:{type:"search",label:n.t("files_sharing","Filter accounts")},model:{value:n.accountFilter,callback:function(e){n.accountFilter=e},expression:"accountFilter"}}):e._e(),e._v(" "),e._l(n.shownAccounts,function(r){return t(n.NcButton,{key:r.id,attrs:{alignment:"start",pressed:n.selectedAccounts.includes(r),variant:"tertiary",wide:""},on:{"update:pressed":function(e){return n.toggleAccount(r.id,e)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t(n.NcAvatar,e._b({class:e.$style.fileListFilterAccount__avatar,attrs:{size:24,"disable-menu":"","hide-status":""}},"NcAvatar",r,!1))]},proxy:!0}],null,!0)},[e._v("\n\t\t"+e._s(r.displayName)+"\n\t\t"),r.id===n.currentUserId?t("span",{class:e.$style.fileListFilterAccount__currentUser},[e._v("\n\t\t\t("+e._s(n.t("files","you"))+")\n\t\t")]):e._e()])})],2)},[],!1,function(e){this.$style=ne.locals||ne},null,null).exports;function ie(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.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:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function se(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function ae(e,t){return e.get(le(e,t))}function oe(e,t,n){return e.set(le(e,t),n),n}function le(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const ce="files_sharing-file-list-filter-account";var de=new WeakMap,ue=new WeakMap;class pe extends r.L3{constructor(){super("files_sharing:account",100),se(this,de,void 0),se(this,ue,void 0),ie(this,"displayName",(0,l.t)("files_sharing","People")),ie(this,"iconSvgInline",''),ie(this,"tagName",ce),oe(de,this,[]),(0,o.B1)("files:list:updated",({contents:e})=>{this.updateAvailableAccounts(e)})}get availableAccounts(){return ae(de,this)}get filterAccounts(){return ae(ue,this)}filter(e){if(!ae(ue,this)||0===ae(ue,this).length)return e;const t=ae(ue,this).map(({uid:e})=>e);return e.filter(e=>{if("trashbin"===window.OCP.Files.Router.params.view){const n=e.attributes?.["trashbin-deleted-by-id"];return!(!n||!t.includes(n))}if(e.owner&&t.includes(e.owner))return!0;const n=e.attributes.sharees?.sharee;return!(!n||![n].flat().some(({id:e})=>t.includes(e)))||!e.owner&&!n})}reset(){this.dispatchEvent(new CustomEvent("reset"))}setAccounts(e){oe(ue,this,e);let t=[];ae(ue,this)&&ae(ue,this).length>0&&(t=ae(ue,this).map(({displayName:e,uid:t})=>({text:e,user:t,onclick:()=>this.dispatchEvent(new CustomEvent("deselect",{detail:t}))}))),this.updateChips(t),this.filterUpdated()}updateAvailableAccounts(e){const t=new Map;for(const n of e){const e=n.owner;e&&!t.has(e)&&t.set(e,{uid:e,displayName:n.attributes["owner-display-name"]??n.owner});const r=[n.attributes.sharees?.sharee].flat().filter(Boolean);for(const e of[r].flat())""!==e.id&&(e.type!==m.I.User&&e.type!==m.I.Remote||t.has(e.id)||t.set(e.id,{uid:e.id,displayName:e["display-name"]}));const i=n.attributes?.["trashbin-deleted-by-id"];i&&t.set(i,{uid:i,displayName:n.attributes?.["trashbin-deleted-by-display-name"]||i})}oe(de,this,[...t.values()]),this.dispatchEvent(new CustomEvent("accounts-updated"))}}var he=n(98469);const fe=new(n(87771).A),me=(0,W.$V)(()=>Promise.all([n.e(4208),n.e(1598)]).then(n.bind(n,11598))),ge={id:"file-request",displayName:(0,l.t)("files_sharing","Create file request"),iconSvgInline:p,order:10,enabled:()=>!(0,N.f)()&&!!fe.isPublicUploadEnabled&&fe.isPublicShareAllowed,async handler(e,t){(0,he.S)(me,{context:e,content:t})}};(()=>{const e=(0,r.bh)();e.register(new r.Ss({id:v,name:(0,l.t)("files_sharing","Shares"),caption:(0,l.t)("files_sharing","Overview of shared files."),emptyTitle:(0,l.t)("files_sharing","No shares"),emptyCaption:(0,l.t)("files_sharing","Files and folders you shared or have been shared with you will show up here"),icon:u,order:20,columns:[],getContents:()=>(0,g.h)()})),e.register(new r.Ss({id:A,name:(0,l.t)("files_sharing","Shared with you"),caption:(0,l.t)("files_sharing","List of files that are shared with you."),emptyTitle:(0,l.t)("files_sharing","Nothing shared with you yet"),emptyCaption:(0,l.t)("files_sharing","Files and folders others shared with you will show up here"),icon:'',order:1,parent:v,columns:[],getContents:()=>(0,g.h)(!0,!1,!1,!1)})),0!==(0,f.C)("files","storageStats",{quota:-1}).quota&&e.register(new r.Ss({id:w,name:(0,l.t)("files_sharing","Shared with others"),caption:(0,l.t)("files_sharing","List of files that you shared with others."),emptyTitle:(0,l.t)("files_sharing","Nothing shared yet"),emptyCaption:(0,l.t)("files_sharing","Files and folders you shared will show up here"),icon:d,order:2,parent:v,columns:[],getContents:()=>(0,g.h)(!1,!0,!1,!1)})),e.register(new r.Ss({id:b,name:(0,l.t)("files_sharing","Shared by link"),caption:(0,l.t)("files_sharing","List of files that are shared by link."),emptyTitle:(0,l.t)("files_sharing","No shared links"),emptyCaption:(0,l.t)("files_sharing","Files and folders you shared by link will show up here"),icon:h,order:3,parent:v,columns:[],getContents:()=>(0,g.h)(!1,!0,!1,!1,[m.I.Link])})),e.register(new r.Ss({id:"filerequest",name:(0,l.t)("files_sharing","File requests"),caption:(0,l.t)("files_sharing","List of file requests."),emptyTitle:(0,l.t)("files_sharing","No file requests"),emptyCaption:(0,l.t)("files_sharing","File requests you have created will show up here"),icon:p,order:4,parent:v,columns:[],getContents:()=>(0,g.h)(!1,!0,!1,!1,[m.I.Link,m.I.Email]).then(({folder:e,contents:t})=>({folder:e,contents:t.filter(e=>(0,g.C)(e.attributes?.["share-attributes"]||[]))}))})),e.register(new r.Ss({id:y,name:(0,l.t)("files_sharing","Deleted shares"),caption:(0,l.t)("files_sharing","List of shares you left."),emptyTitle:(0,l.t)("files_sharing","No deleted shares"),emptyCaption:(0,l.t)("files_sharing","Shares you have left will show up here"),icon:'',order:5,parent:v,columns:[],getContents:()=>(0,g.h)(!1,!1,!1,!0)})),e.register(new r.Ss({id:_,name:(0,l.t)("files_sharing","Pending shares"),caption:(0,l.t)("files_sharing","List of unapproved shares."),emptyTitle:(0,l.t)("files_sharing","No pending shares"),emptyCaption:(0,l.t)("files_sharing","Shares you have received but not approved will show up here"),icon:'',order:6,parent:v,columns:[],getContents:()=>(0,g.h)(!1,!1,!0,!1)}))})(),(0,r.zj)(ge),(0,i.Yc)("nc:note",{nc:"http://nextcloud.org/ns"}),(0,i.Yc)("nc:sharees",{nc:"http://nextcloud.org/ns"}),(0,i.Yc)("nc:hide-download",{nc:"http://nextcloud.org/ns"}),(0,i.Yc)("nc:share-attributes",{nc:"http://nextcloud.org/ns"}),(0,i.Yc)("oc:share-types",{oc:"http://owncloud.org/ns"}),(0,i.Yc)("ocs:share-permissions",{ocs:"http://open-collaboration-services.org/ns"}),(0,r.Gg)(C),(0,r.Gg)(x),(0,r.Gg)(E),(0,r.Gg)(D),(0,r.Gg)(z),function(){if((0,N.f)())return;const e=(0,G.A)(W.Ay,re);Object.defineProperty(e.prototype,"attachShadow",{value(){return this}}),Object.defineProperty(e.prototype,"shadowRoot",{get(){return this}}),customElements.define(ce,e),(0,r.cZ)(new pe)}(),function(){let e,t;(0,r.pJ)({id:"note-to-recipient",order:0,enabled:e=>Boolean(e.attributes.note),updated:e=>{t&&t.updateFolder(e)},render:async(r,i)=>{if(void 0===e){const{default:t}=await Promise.all([n.e(4208),n.e(1404)]).then(n.bind(n,41404));e=W.Ay.extend(t)}t=(new e).$mount(r),t.updateFolder(i)}})}()},87771(e,t,n){"use strict";n.d(t,{A:()=>s});var r=n(87485),i=n(81222);class s{constructor(){var e,t,n;e=this,n=void 0,(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.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:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,this._capabilities=(0,r.F)()}get defaultPermissions(){return this._capabilities.files_sharing?.default_permissions}get excludeReshareFromEdit(){return!0===this._capabilities.files_sharing?.exclude_reshare_from_edit}get isPublicUploadEnabled(){return!0===this._capabilities.files_sharing?.public?.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 isFederationEnabled(){return!0===this._capabilities?.files_sharing?.federation?.outgoing}get isPublicShareAllowed(){return!0===this._capabilities?.files_sharing?.public?.enabled}get isMailShareAllowed(){return!0===this._capabilities?.files_sharing?.sharebymail?.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(){return!0===this._capabilities.files_sharing?.sharebymail?.password?.enforced}get shouldAlwaysShowUnique(){return!0===this._capabilities.files_sharing?.sharee?.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(){return this._capabilities?.password_policy||{}}get allowCustomTokens(){return this._capabilities?.files_sharing?.public?.custom_tokens}get showFederatedSharesAsInternal(){return(0,i.C)("files_sharing","showFederatedSharesAsInternal",!1)}get showFederatedSharesToTrustedServersAsInternal(){return(0,i.C)("files_sharing","showFederatedSharesToTrustedServersAsInternal",!1)}get showExternalSharing(){return(0,i.C)("files_sharing","showExternalSharing",!0)}}},87543(e,t,n){"use strict";n.d(t,{C:()=>p,h:()=>h});var r=n(21777),i=n(19051),s=n(35810),a=n(77815),o=n(63814),l=n(48564);const c={"Content-Type":"application/json"};async function d(e){try{if(void 0!==e?.remote_id){if(!e.mimetype){const t=(await n.e(857).then(n.bind(n,10857))).default;e.mimetype=t.getType(e.name)}const t="dir"===e.type?"folder":e.type;e.item_type=t||(e.mimetype?"file":"folder"),e.item_mtime=e.mtime,e.file_target=e.file_target||e.mountpoint,e.file_target.includes("TemporaryMountPointName")&&(e.file_target=e.name),e.accepted||(e.item_permissions=s.aX.NONE,e.permissions=s.aX.NONE),e.uid_owner=e.owner,e.displayname_owner=e.owner}const t="folder"===e?.item_type,r=!0===e?.has_preview,i=t?s.vd:s.ZH,o=e.file_source||e.file_id||e.id,l=e.path||e.file_target||e.name,c=`${(0,a.EY)()}${(0,a.ei)()}/${l.replace(/^\/+/,"")}`;let d,u=e.item_mtime?new Date(1e3*e.item_mtime):void 0;return e?.stime>(e?.item_mtime||0)&&(u=new Date(1e3*e.stime)),"share_with"in e&&(d={sharee:{id:e.share_with,"display-name":e.share_with_displayname||e.share_with,type:e.share_type}}),new i({id:o,source:c,owner:e?.uid_owner,mime:e?.mimetype||"application/octet-stream",mtime:u,size:e?.item_size,permissions:e?.item_permissions||e?.permissions,root:(0,a.ei)(),attributes:{...e,"has-preview":r,"hide-download":1===e?.hide_download,"owner-id":e?.uid_owner,"owner-display-name":e?.displayname_owner,"share-types":e?.share_type,"share-attributes":e?.attributes||"[]",sharees:d,favorite:e?.tags?.includes(window.OC.TAG_FAVORITE)?1:0}})}catch(e){return l.A.error("Error while parsing OCS entry",{error:e}),null}}function u(e=!1){const t=(0,o.KT)("apps/files_sharing/api/v1/shares");return i.Ay.get(t,{headers:c,params:{shared_with_me:e,include_tags:!0}})}function p(e="[]"){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}}async function h(e=!0,t=!0,n=!1,l=!1,p=[]){const h=[];e&&h.push(u(!0),function(){const e=(0,o.KT)("apps/files_sharing/api/v1/remote_shares");return i.Ay.get(e,{headers:c,params:{include_tags:!0}})}()),t&&h.push(u()),n&&h.push(function(){const e=(0,o.KT)("apps/files_sharing/api/v1/shares/pending");return i.Ay.get(e,{headers:c,params:{include_tags:!0}})}(),function(){const e=(0,o.KT)("apps/files_sharing/api/v1/remote_shares/pending");return i.Ay.get(e,{headers:c,params:{include_tags:!0}})}()),l&&h.push(function(){const e=(0,o.KT)("apps/files_sharing/api/v1/deletedshares");return i.Ay.get(e,{headers:c,params:{include_tags:!0}})}());const f=(await Promise.all(h)).map(e=>e.data.ocs.data).flat();let m=(await Promise.all(f.map(d))).filter(e=>null!==e);var g,v;return p.length>0&&(m=m.filter(e=>p.includes(e.attributes?.share_type))),m=(g=m,v="source",Object.values(g.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 s.vd({id:0,source:`${(0,a.EY)()}${(0,a.ei)()}`,owner:(0,r.HW)()?.uid||null,root:(0,a.ei)()}),contents:m}}},48564(e,t,n){"use strict";n.d(t,{A:()=>r});const r=(0,n(35947).YK)().setApp("files_sharing").detectUser().build()},53168(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(71354),i=n.n(r),s=n(76314),a=n.n(s)()(i());a.push([e.id,".action-items>.files-list__row-action-sharing-status{padding-inline:0 !important}.action-items>.files-list__row-action-sharing-status .button-vue__wrapper{flex-direction:row-reverse;gap:var(--default-grid-baseline)}svg.sharing-status__avatar{height:var(--button-inner-size, 32px) !important;width:var(--button-inner-size, 32px) !important;max-height:var(--button-inner-size, 32px) !important;max-width:var(--button-inner-size, 32px) !important;border-radius:var(--button-inner-size, 32px);overflow:hidden}.files-list__row-action-sharing-status .button-vue__text{color:var(--color-primary-element)}.files-list__row-action-sharing-status .button-vue__icon{color:var(--color-primary-element)}","",{version:3,sources:["webpack://./apps/files_sharing/src/files_actions/sharingStatusAction.scss"],names:[],mappings:"AAMA,qDAEC,2BAAA,CAEA,0EAEC,0BAAA,CACA,gCAAA,CAIF,2BACC,gDAAA,CACA,+CAAA,CACA,oDAAA,CACA,mDAAA,CACA,4CAAA,CACA,eAAA,CAIA,yDACC,kCAAA,CAED,yDACC,kCAAA",sourcesContent:["/*\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\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// align icons with text-less inline actions\n\tpadding-inline: 0 !important;\n\n\t.button-vue__wrapper {\n\t\t// put icon at the end of the button\n\t\tflex-direction: row-reverse;\n\t\tgap: var(--default-grid-baseline);\n\t}\n}\n\nsvg.sharing-status__avatar {\n\theight: var(--button-inner-size, 32px) !important;\n\twidth: var(--button-inner-size, 32px) !important;\n\tmax-height: var(--button-inner-size, 32px) !important;\n\tmax-width: var(--button-inner-size, 32px) !important;\n\tborder-radius: var(--button-inner-size, 32px);\n\toverflow: hidden;\n}\n\n.files-list__row-action-sharing-status {\n\t.button-vue__text {\n\t\tcolor: var(--color-primary-element);\n\t}\n\t.button-vue__icon {\n\t\tcolor: var(--color-primary-element);\n\t}\n}\n"],sourceRoot:""}]);const o=a},15914(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(71354),i=n.n(r),s=n(76314),a=n.n(s)()(i());a.push([e.id,"\n._fileListFilterAccount_ZW91g {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--default-grid-baseline);\n}\n._fileListFilterAccount__avatar_V0YuN {\n\t/* 24px is the avatar size */\n\tmargin: calc((var(--default-clickable-area) - 24px) / 2);\n}\n._fileListFilterAccount__currentUser_PqQfx {\n\tfont-weight: normal !important;\n}\n","",{version:3,sources:["webpack://./apps/files_sharing/src/components/FileListFilterAccount.vue"],names:[],mappings:";AA4JA;CACA,aAAA;CACA,sBAAA;CACA,iCAAA;AACA;AAEA;CACA,4BAAA;CACA,wDAAA;AACA;AAEA;CACA,8BAAA;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