nextcloud/dist/9429-9429.js
Ferdinand Thiessen b4b5986be9 chore: compile assets
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-01-27 23:52:40 +01:00

2 lines
No EOL
146 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(globalThis.webpackChunknextcloud_ui_legacy=globalThis.webpackChunknextcloud_ui_legacy||[]).push([[9429],{5016(e,t,i){"use strict";i.d(t,{A:()=>o});var s=i(71354),a=i.n(s),n=i(76314),r=i.n(n)()(a());r.push([e.id,".share-expiry-time[data-v-c9199db0]{display:inline-flex;align-items:center;justify-content:center}.share-expiry-time .hint-icon[data-v-c9199db0]{padding:0;margin:0;width:24px;height:24px}.hint-heading[data-v-c9199db0]{text-align:center;font-size:1rem;margin-top:8px;padding-bottom:8px;margin-bottom:0;border-bottom:1px solid var(--color-border)}.hint-body[data-v-c9199db0]{padding:var(--border-radius-element);max-width:300px}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/ShareExpiryTime.vue"],names:[],mappings:"AACA,oCACI,mBAAA,CACA,kBAAA,CACA,sBAAA,CAEA,+CACI,SAAA,CACA,QAAA,CACA,UAAA,CACA,WAAA,CAIR,+BACI,iBAAA,CACA,cAAA,CACA,cAAA,CACA,kBAAA,CACA,eAAA,CACA,2CAAA,CAGJ,4BACI,oCAAA,CACA,eAAA",sourcesContent:["\n.share-expiry-time {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n\n .hint-icon {\n padding: 0;\n margin: 0;\n width: 24px;\n height: 24px;\n }\n}\n\n.hint-heading {\n text-align: center;\n font-size: 1rem;\n margin-top: 8px;\n padding-bottom: 8px;\n margin-bottom: 0;\n border-bottom: 1px solid var(--color-border);\n}\n\n.hint-body {\n padding: var(--border-radius-element);\n max-width: 300px;\n}\n"],sourceRoot:""}]);const o=r},10322(e,t,i){"use strict";i.d(t,{A:()=>o});var s=i(71354),a=i.n(s),n=i(76314),r=i.n(n)()(a());r.push([e.id,".sharing-entry[data-v-469e5e80]{display:flex;align-items:center;height:44px}.sharing-entry__summary[data-v-469e5e80]{padding:8px;padding-inline-start:10px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;flex:1 0;min-width:0}.sharing-entry__summary__desc[data-v-469e5e80]{display:inline-block;padding-bottom:0;line-height:1.2em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sharing-entry__summary__desc p[data-v-469e5e80],.sharing-entry__summary__desc small[data-v-469e5e80]{color:var(--color-text-maxcontrast)}.sharing-entry__summary__desc-unique[data-v-469e5e80]{color:var(--color-text-maxcontrast)}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntry.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,WAAA,CACA,yCACC,WAAA,CACA,yBAAA,CACA,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,sBAAA,CACA,QAAA,CACA,WAAA,CAEA,+CACC,oBAAA,CACA,gBAAA,CACA,iBAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CAEA,sGAEC,mCAAA,CAGD,sDACC,mCAAA",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\theight: 44px;\n\t&__summary {\n\t\tpadding: 8px;\n\t\tpadding-inline-start: 10px;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: center;\n\t\talign-items: flex-start;\n\t\tflex: 1 0;\n\t\tmin-width: 0;\n\n\t\t&__desc {\n\t\t\tdisplay: inline-block;\n\t\t\tpadding-bottom: 0;\n\t\t\tline-height: 1.2em;\n\t\t\twhite-space: nowrap;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\n\t\t\tp,\n\t\t\tsmall {\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t}\n\n\t\t\t&-unique {\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t}\n\t\t}\n\t}\n\n}\n"],sourceRoot:""}]);const o=r},12231(e,t,i){"use strict";i.d(t,{A:()=>o});var s=i(71354),a=i.n(s),n=i(76314),r=i.n(n)()(a());r.push([e.id,".sharing-entry[data-v-4ca4172c]{display:flex;align-items:center;min-height:44px}.sharing-entry__summary[data-v-4ca4172c]{padding:8px;padding-inline-start:10px;display:flex;justify-content:space-between;flex:1 0;min-width:0}.sharing-entry__desc[data-v-4ca4172c]{display:flex;flex-direction:column;line-height:1.2em}.sharing-entry__desc p[data-v-4ca4172c]{color:var(--color-text-maxcontrast)}.sharing-entry__desc__title[data-v-4ca4172c]{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.sharing-entry__actions[data-v-4ca4172c]{display:flex;align-items:center;margin-inline-start:auto}.sharing-entry:not(.sharing-entry--share) .sharing-entry__actions .new-share-link[data-v-4ca4172c]{border-top:1px solid var(--color-border)}.sharing-entry[data-v-4ca4172c] .avatar-link-share{background-color:var(--color-primary-element)}.sharing-entry .sharing-entry__action--public-upload[data-v-4ca4172c]{border-bottom:1px solid var(--color-border)}.sharing-entry__loading[data-v-4ca4172c]{width:44px;height:44px;margin:0;padding:14px;margin-inline-start:auto}.sharing-entry .action-item~.action-item[data-v-4ca4172c],.sharing-entry .action-item~.sharing-entry__loading[data-v-4ca4172c]{margin-inline-start:0}.sharing-entry__copy-icon--success[data-v-4ca4172c]{color:var(--color-border-success)}.qr-code-dialog[data-v-4ca4172c]{display:flex;width:100%;justify-content:center}.qr-code-dialog__img[data-v-4ca4172c]{width:100%;height:auto}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryLink.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,eAAA,CAEA,yCACC,WAAA,CACA,yBAAA,CACA,YAAA,CACA,6BAAA,CACA,QAAA,CACA,WAAA,CAGA,sCACC,YAAA,CACA,qBAAA,CACA,iBAAA,CAEA,wCACC,mCAAA,CAGD,6CACC,sBAAA,CACA,eAAA,CACA,kBAAA,CAIF,yCACC,YAAA,CACA,kBAAA,CACA,wBAAA,CAID,mGACC,wCAAA,CAIF,mDACC,6CAAA,CAGD,sEACC,2CAAA,CAGD,yCACC,UAAA,CACA,WAAA,CACA,QAAA,CACA,YAAA,CACA,wBAAA,CAOA,+HAEC,qBAAA,CAIF,oDACC,iCAAA,CAKF,iCACC,YAAA,CACA,UAAA,CACA,sBAAA,CAEA,sCACC,UAAA,CACA,WAAA",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\tmin-height: 44px;\n\n\t&__summary {\n\t\tpadding: 8px;\n\t\tpadding-inline-start: 10px;\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\tflex: 1 0;\n\t\tmin-width: 0;\n\t}\n\n\t\t&__desc {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t\tline-height: 1.2em;\n\n\t\t\tp {\n\t\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t\t}\n\n\t\t\t&__title {\n\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\toverflow: hidden;\n\t\t\t\twhite-space: nowrap;\n\t\t\t}\n\t\t}\n\n\t\t&__actions {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tmargin-inline-start: auto;\n\t\t}\n\n\t&:not(.sharing-entry--share) &__actions {\n\t\t.new-share-link {\n\t\t\tborder-top: 1px solid var(--color-border);\n\t\t}\n\t}\n\n\t:deep(.avatar-link-share) {\n\t\tbackground-color: var(--color-primary-element);\n\t}\n\n\t.sharing-entry__action--public-upload {\n\t\tborder-bottom: 1px solid var(--color-border);\n\t}\n\n\t&__loading {\n\t\twidth: 44px;\n\t\theight: 44px;\n\t\tmargin: 0;\n\t\tpadding: 14px;\n\t\tmargin-inline-start: auto;\n\t}\n\n\t// put menus to the left\n\t// but only the first one\n\t.action-item {\n\n\t\t~.action-item,\n\t\t~.sharing-entry__loading {\n\t\t\tmargin-inline-start: 0;\n\t\t}\n\t}\n\n\t&__copy-icon--success {\n\t\tcolor: var(--color-border-success);\n\t}\n}\n\n// styling for the qr-code container\n.qr-code-dialog {\n\tdisplay: flex;\n\twidth: 100%;\n\tjustify-content: center;\n\n\t&__img {\n\t\twidth: 100%;\n\t\theight: auto;\n\t}\n}\n"],sourceRoot:""}]);const o=r},15667(e,t,i){"use strict";i.d(t,{A:()=>o});var s=i(71354),a=i.n(s),n=i(76314),r=i.n(n)()(a());r.push([e.id,".emptyContentWithSections[data-v-7cacff60]{margin:1rem auto}.sharingTab[data-v-7cacff60]{position:relative;height:100%}.sharingTab__content[data-v-7cacff60]{padding:0 6px}.sharingTab__content section[data-v-7cacff60]{padding-bottom:16px}.sharingTab__content section .section-header[data-v-7cacff60]{margin-top:2px;margin-bottom:2px;display:flex;align-items:center;padding-bottom:4px}.sharingTab__content section .section-header h4[data-v-7cacff60]{margin:0;font-size:16px}.sharingTab__content section .section-header .visually-hidden[data-v-7cacff60]{display:none}.sharingTab__content section .section-header .hint-icon[data-v-7cacff60]{color:var(--color-primary-element)}.sharingTab__content>section[data-v-7cacff60]:not(:last-child){border-bottom:2px solid var(--color-border)}.sharingTab__additionalContent[data-v-7cacff60]{margin:var(--default-clickable-area) 0}.hint-body[data-v-7cacff60]{max-width:300px;padding:var(--border-radius-element)}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/SharingTab.vue"],names:[],mappings:"AACA,2CACC,gBAAA,CAGD,6BACC,iBAAA,CACA,WAAA,CAEA,sCACC,aAAA,CAEA,8CACC,mBAAA,CAEA,8DACC,cAAA,CACA,iBAAA,CACA,YAAA,CACA,kBAAA,CACA,kBAAA,CAEA,iEACC,QAAA,CACA,cAAA,CAGD,+EACC,YAAA,CAGD,yEACC,kCAAA,CAOH,+DACC,2CAAA,CAKF,gDACC,sCAAA,CAIF,4BACC,eAAA,CACA,oCAAA",sourcesContent:["\n.emptyContentWithSections {\n\tmargin: 1rem auto;\n}\n\n.sharingTab {\n\tposition: relative;\n\theight: 100%;\n\n\t&__content {\n\t\tpadding: 0 6px;\n\n\t\tsection {\n\t\t\tpadding-bottom: 16px;\n\n\t\t\t.section-header {\n\t\t\t\tmargin-top: 2px;\n\t\t\t\tmargin-bottom: 2px;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tpadding-bottom: 4px;\n\n\t\t\t\th4 {\n\t\t\t\t\tmargin: 0;\n\t\t\t\t\tfont-size: 16px;\n\t\t\t\t}\n\n\t\t\t\t.visually-hidden {\n\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n\t\t\t\t.hint-icon {\n\t\t\t\t\tcolor: var(--color-primary-element);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t& > section:not(:last-child) {\n\t\t\tborder-bottom: 2px solid var(--color-border);\n\t\t}\n\n\t}\n\n\t&__additionalContent {\n\t\tmargin: var(--default-clickable-area) 0;\n\t}\n}\n\n.hint-body {\n\tmax-width: 300px;\n\tpadding: var(--border-radius-element);\n}\n"],sourceRoot:""}]);const o=r},18999(e,t,i){"use strict";i.d(t,{A:()=>o});var s=i(71354),a=i.n(s),n=i(76314),r=i.n(n)()(a());r.push([e.id,".sharing-entry[data-v-13d4a0bb]{display:flex;align-items:center;min-height:44px}.sharing-entry__desc[data-v-13d4a0bb]{padding:8px;padding-inline-start:10px;line-height:1.2em;position:relative;flex:1 1;min-width:0}.sharing-entry__desc p[data-v-13d4a0bb]{color:var(--color-text-maxcontrast)}.sharing-entry__title[data-v-13d4a0bb]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;max-width:inherit}.sharing-entry__actions[data-v-13d4a0bb]{margin-inline-start:auto !important}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntrySimple.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,eAAA,CACA,sCACC,WAAA,CACA,yBAAA,CACA,iBAAA,CACA,iBAAA,CACA,QAAA,CACA,WAAA,CACA,wCACC,mCAAA,CAGF,uCACC,kBAAA,CACA,sBAAA,CACA,eAAA,CACA,iBAAA,CAED,yCACC,mCAAA",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\tmin-height: 44px;\n\t&__desc {\n\t\tpadding: 8px;\n\t\tpadding-inline-start: 10px;\n\t\tline-height: 1.2em;\n\t\tposition: relative;\n\t\tflex: 1 1;\n\t\tmin-width: 0;\n\t\tp {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\t&__title {\n\t\twhite-space: nowrap;\n\t\ttext-overflow: ellipsis;\n\t\toverflow: hidden;\n\t\tmax-width: inherit;\n\t}\n\t&__actions {\n\t\tmargin-inline-start: auto !important;\n\t}\n}\n"],sourceRoot:""}]);const o=r},24708(e,t,i){"use strict";i.d(t,{A:()=>o});var s=i(71354),a=i.n(s),n=i(76314),r=i.n(n)()(a());r.push([e.id,".share-select[data-v-11ecc4a6]{display:block}.share-select[data-v-11ecc4a6] .action-item__menutoggle{color:var(--color-primary-element) !important;font-size:12.5px !important;height:auto !important;min-height:auto !important}.share-select[data-v-11ecc4a6] .action-item__menutoggle .button-vue__text{font-weight:normal !important}.share-select[data-v-11ecc4a6] .action-item__menutoggle .button-vue__icon{height:24px !important;min-height:24px !important;width:24px !important;min-width:24px !important}.share-select[data-v-11ecc4a6] .action-item__menutoggle .button-vue__wrapper{flex-direction:row-reverse !important}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryQuickShareSelect.vue"],names:[],mappings:"AACA,+BACC,aAAA,CAIA,wDACC,6CAAA,CACA,2BAAA,CACA,sBAAA,CACA,0BAAA,CAEA,0EACC,6BAAA,CAGD,0EACC,sBAAA,CACA,0BAAA,CACA,qBAAA,CACA,yBAAA,CAGD,6EAEC,qCAAA",sourcesContent:["\n.share-select {\n\tdisplay: block;\n\n\t// TODO: NcActions should have a slot for custom trigger button like NcPopover\n\t// Overrider NcActionms button to make it small\n\t:deep(.action-item__menutoggle) {\n\t\tcolor: var(--color-primary-element) !important;\n\t\tfont-size: 12.5px !important;\n\t\theight: auto !important;\n\t\tmin-height: auto !important;\n\n\t\t.button-vue__text {\n\t\t\tfont-weight: normal !important;\n\t\t}\n\n\t\t.button-vue__icon {\n\t\t\theight: 24px !important;\n\t\t\tmin-height: 24px !important;\n\t\t\twidth: 24px !important;\n\t\t\tmin-width: 24px !important;\n\t\t}\n\n\t\t.button-vue__wrapper {\n\t\t\t// Emulate NcButton's alignment=center-reverse\n\t\t\tflex-direction: row-reverse !important;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const o=r},27920(e,t,i){"use strict";i.d(t,{A:()=>o});var s=i(71354),a=i.n(s),n=i(76314),r=i.n(n)()(a());r.push([e.id,".sharing-entry__inherited .avatar-shared[data-v-cedf3238]{width:32px;height:32px;line-height:32px;font-size:18px;background-color:var(--color-text-maxcontrast);border-radius:50%;flex-shrink:0}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/SharingInherited.vue"],names:[],mappings:"AAEC,0DACC,UAAA,CACA,WAAA,CACA,gBAAA,CACA,cAAA,CACA,8CAAA,CACA,iBAAA,CACA,aAAA",sourcesContent:["\n.sharing-entry__inherited {\n\t.avatar-shared {\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tline-height: 32px;\n\t\tfont-size: 18px;\n\t\tbackground-color: var(--color-text-maxcontrast);\n\t\tborder-radius: 50%;\n\t\tflex-shrink: 0;\n\t}\n}\n"],sourceRoot:""}]);const o=r},48318(){!function(e){"use strict";var t,i=function(){try{if(e.URLSearchParams&&"bar"===new e.URLSearchParams("foo=bar").get("foo"))return e.URLSearchParams}catch(e){}return null}(),s=i&&"a=1"===new i({a:1}).toString(),a=i&&"+"===new i("s=%2B").get("s"),n=i&&"size"in i.prototype,r="__URLSearchParams__",o=!i||((t=new i).append("s"," &"),"s=+%26"===t.toString()),l=p.prototype,h=!(!e.Symbol||!e.Symbol.iterator);if(!(i&&s&&a&&o&&n)){l.append=function(e,t){_(this[r],e,t)},l.delete=function(e){delete this[r][e]},l.get=function(e){var t=this[r];return this.has(e)?t[e][0]:null},l.getAll=function(e){var t=this[r];return this.has(e)?t[e].slice(0):[]},l.has=function(e){return w(this[r],e)},l.set=function(e,t){this[r][e]=[""+t]},l.toString=function(){var e,t,i,s,a=this[r],n=[];for(t in a)for(i=g(t),e=0,s=a[t];e<s.length;e++)n.push(i+"="+g(s[e]));return n.join("&")};var c,d=e.Proxy&&i&&(!a||!o||!s||!n);d?(c=new Proxy(i,{construct:function(e,t){return new e(new p(t[0]).toString())}})).toString=Function.prototype.toString.bind(p):c=p,Object.defineProperty(e,"URLSearchParams",{value:c});var u=e.URLSearchParams.prototype;u.polyfill=!0,!d&&e.Symbol&&(u[e.Symbol.toStringTag]="URLSearchParams"),"forEach"in u||(u.forEach=function(e,t){var i=m(this.toString());Object.getOwnPropertyNames(i).forEach(function(s){i[s].forEach(function(i){e.call(t,i,s,this)},this)},this)}),"sort"in u||(u.sort=function(){var e,t,i,s=m(this.toString()),a=[];for(e in s)a.push(e);for(a.sort(),t=0;t<a.length;t++)this.delete(a[t]);for(t=0;t<a.length;t++){var n=a[t],r=s[n];for(i=0;i<r.length;i++)this.append(n,r[i])}}),"keys"in u||(u.keys=function(){var e=[];return this.forEach(function(t,i){e.push(i)}),A(e)}),"values"in u||(u.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),A(e)}),"entries"in u||(u.entries=function(){var e=[];return this.forEach(function(t,i){e.push([i,t])}),A(e)}),h&&(u[e.Symbol.iterator]=u[e.Symbol.iterator]||u.entries),"size"in u||Object.defineProperty(u,"size",{get:function(){var e=m(this.toString());if(u===this)throw new TypeError("Illegal invocation at URLSearchParams.invokeGetter");return Object.keys(e).reduce(function(t,i){return t+e[i].length},0)}})}function p(e){((e=e||"")instanceof URLSearchParams||e instanceof p)&&(e=e.toString()),this[r]=m(e)}function g(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,function(e){return t[e]})}function f(e){return e.replace(/[ +]/g,"%20").replace(/(%[a-f0-9]{2})+/gi,function(e){return decodeURIComponent(e)})}function A(t){var i={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return h&&(i[e.Symbol.iterator]=function(){return i}),i}function m(e){var t={};if("object"==typeof e)if(y(e))for(var i=0;i<e.length;i++){var s=e[i];if(!y(s)||2!==s.length)throw new TypeError("Failed to construct 'URLSearchParams': Sequence initializer must only contain pair elements");_(t,s[0],s[1])}else for(var a in e)e.hasOwnProperty(a)&&_(t,a,e[a]);else{0===e.indexOf("?")&&(e=e.slice(1));for(var n=e.split("&"),r=0;r<n.length;r++){var o=n[r],l=o.indexOf("=");-1<l?_(t,f(o.slice(0,l)),f(o.slice(l+1))):o&&_(t,f(o),"")}}return t}function _(e,t,i){var s="string"==typeof i?i:null!=i&&"function"==typeof i.toString?i.toString():JSON.stringify(i);w(e,t)?e[t].push(s):e[t]=[s]}function y(e){return!!e&&"[object Array]"===Object.prototype.toString.call(e)}function w(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this)},50618(e,t,i){"use strict";i.d(t,{A:()=>o});var s=i(71354),a=i.n(s),n=i(76314),r=i.n(n)()(a());r.push([e.id,".sharing-entry[data-v-731a9650]{display:flex;align-items:center;height:44px}.sharing-entry__desc[data-v-731a9650]{display:flex;flex-direction:column;justify-content:space-between;padding:8px;padding-inline-start:10px;line-height:1.2em}.sharing-entry__desc p[data-v-731a9650]{color:var(--color-text-maxcontrast)}.sharing-entry__actions[data-v-731a9650]{margin-inline-start:auto}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryInherited.vue"],names:[],mappings:"AACA,gCACC,YAAA,CACA,kBAAA,CACA,WAAA,CACA,sCACC,YAAA,CACA,qBAAA,CACA,6BAAA,CACA,WAAA,CACA,yBAAA,CACA,iBAAA,CACA,wCACC,mCAAA,CAGF,yCACC,wBAAA",sourcesContent:["\n.sharing-entry {\n\tdisplay: flex;\n\talign-items: center;\n\theight: 44px;\n\t&__desc {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tjustify-content: space-between;\n\t\tpadding: 8px;\n\t\tpadding-inline-start: 10px;\n\t\tline-height: 1.2em;\n\t\tp {\n\t\t\tcolor: var(--color-text-maxcontrast);\n\t\t}\n\t}\n\t&__actions {\n\t\tmargin-inline-start: auto;\n\t}\n}\n"],sourceRoot:""}]);const o=r},59429(e,i,s){"use strict";s.d(i,{default:()=>Pi});var a=s(85471),n=s(21777),r=s(19051),o=s(87485),l=s(35810),h=s(81222),c=s(51651),d=s(63814),u=s(40715),p=s(41944),g=s(74095),f=s(90116),A=s(54562),m=s(41423),_=s(85168),y=s(57505),w=s(54373);const C={name:"ContentCopyIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var v=s(14486);const b=(0,v.A)(C,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon content-copy-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports;var x=s(24764);const S={name:"SharingEntrySimple",components:{NcActions:x.A},props:{title:{type:String,required:!0},subtitle:{type:String,default:""},isUnique:{type:Boolean,default:!0},ariaExpanded:{type:Boolean,default:null}},computed:{ariaExpandedValue(){return null===this.ariaExpanded?this.ariaExpanded:this.ariaExpanded?"true":"false"}}};var k=s(85072),E=s.n(k),D=s(97825),I=s.n(D),P=s(77659),T=s.n(P),N=s(55056),L=s.n(N),R=s(10540),B=s.n(R),V=s(41113),O=s.n(V),F=s(18999),q={};q.styleTagTransform=O(),q.setAttributes=L(),q.insert=T().bind(null,"head"),q.domAPI=I(),q.insertStyleElement=B(),E()(F.A,q),F.A&&F.A.locals&&F.A.locals;const M=(0,v.A)(S,function(){var e=this,t=e._self._c;return t("li",{staticClass:"sharing-entry"},[e._t("avatar"),e._v(" "),t("div",{staticClass:"sharing-entry__desc"},[t("span",{staticClass:"sharing-entry__title"},[e._v(e._s(e.title))]),e._v(" "),e.subtitle?t("p",[e._v("\n\t\t\t"+e._s(e.subtitle)+"\n\t\t")]):e._e()]),e._v(" "),e.$slots.default?t("NcActions",{ref:"actionsComponent",staticClass:"sharing-entry__actions",attrs:{"menu-align":"right","aria-expanded":e.ariaExpandedValue}},[e._t("default")],2):e._e()],2)},[],!1,null,"13d4a0bb",null).exports;var H=s(48564);function $(e){const t=(0,d.$_)(),{globalscale:i}=(0,o.F)();return i?.token?(0,d.Jv)("/gf/{token}/{fileid}",{token:i.token,fileid:e},{baseURL:t}):(0,d.Jv)("/f/{fileid}",{fileid:e},{baseURL:t})}const U={name:"SharingEntryInternal",components:{NcActionButton:y.A,SharingEntrySimple:M,CheckIcon:w.A,ClipboardIcon:b},props:{fileInfo:{type:Object,required:!0}},data:()=>({copied:!1,copySuccess:!1}),computed:{internalLink(){return $(this.fileInfo.id)},copyLinkTooltip(){return this.copied?this.copySuccess?"":t("files_sharing","Cannot copy, please copy the link manually"):t("files_sharing","Copy internal link")},internalLinkSubtitle:()=>t("files_sharing","For people who already have access")},methods:{async copyLink(){try{await navigator.clipboard.writeText(this.internalLink),(0,_.Te)(t("files_sharing","Link copied")),this.$refs.shareEntrySimple.$refs.actionsComponent.$el.focus(),this.copySuccess=!0,this.copied=!0}catch(e){this.copySuccess=!1,this.copied=!0,H.A.error(e)}finally{setTimeout(()=>{this.copySuccess=!1,this.copied=!1},4e3)}}}};var W=s(84388),z={};z.styleTagTransform=O(),z.setAttributes=L(),z.insert=T().bind(null,"head"),z.domAPI=I(),z.insertStyleElement=B(),E()(W.A,z),W.A&&W.A.locals&&W.A.locals;const j=(0,v.A)(U,function(){var e=this,t=e._self._c;return t("ul",[t("SharingEntrySimple",{ref:"shareEntrySimple",staticClass:"sharing-entry__internal",attrs:{title:e.t("files_sharing","Internal link"),subtitle:e.internalLinkSubtitle},scopedSlots:e._u([{key:"avatar",fn:function(){return[t("div",{staticClass:"avatar-external icon-external-white"})]},proxy:!0}])},[e._v(" "),t("NcActionButton",{attrs:{title:e.copyLinkTooltip,"aria-label":e.copyLinkTooltip},on:{click:e.copyLink},scopedSlots:e._u([{key:"icon",fn:function(){return[e.copied&&e.copySuccess?t("CheckIcon",{staticClass:"icon-checkmark-color",attrs:{size:20}}):t("ClipboardIcon",{attrs:{size:20}})]},proxy:!0}])})],1)],1)},[],!1,null,"6c4cb23b",null).exports;var G=s(46855),Q=s(67607);const Y=1,Z=2,J=4,K=8,X=16,ee={READ_ONLY:Y,UPLOAD_AND_UPDATE:12|(Y|Z),FILE_DROP:4,ALL:4|Z|Y|8,ALL_FILE:Z|Y};var te=s(32505),ie=s(44719),se=s(36520);const ae=["d:getcontentlength","d:getcontenttype","d:getetag","d:getlastmodified","d:creationdate","d:displayname","d:quota-available-bytes","d:resourcetype","nc:has-preview","nc:is-encrypted","nc:mount-type","oc:comments-unread","oc:favorite","oc:fileid","oc:owner-display-name","oc:owner-id","oc:permissions","oc:size"],ne={d:"DAV:",nc:"http://nextcloud.org/ns",oc:"http://owncloud.org/ns",ocs:"http://open-collaboration-services.org/ns"};function re(){return(0,te.f)()?`/files/${(0,te.G)()}`:`/files/${(0,n.HW)()?.uid}`}const oe=re(),le=function(){const e=(0,d.dC)("dav");return(0,te.f)()?e.replace("remote.php","public.php"):e}();class he{constructor(e){if(function(e,t,i){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=typeof i)return i;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}(this,"_share",void 0),e.ocs&&e.ocs.data&&e.ocs.data[0]&&(e=e.ocs.data[0]),"string"==typeof e.id&&(e.id=Number.parseInt(e.id)),e.hide_download=!!e.hide_download,e.mail_send=!!e.mail_send,e.attributes&&"string"==typeof e.attributes)try{e.attributes=JSON.parse(e.attributes)}catch{H.A.warn("Could not parse share attributes returned by server",e.attributes)}e.attributes=e.attributes??[],this._share=e}get state(){return this._share}get id(){return this._share.id}get type(){return this._share.share_type}get permissions(){return this._share.permissions}get attributes(){return this._share.attributes||[]}set permissions(e){this._share.permissions=e}get owner(){return this._share.uid_owner}get ownerDisplayName(){return this._share.displayname_owner}get shareWith(){return this._share.share_with}get shareWithDisplayName(){return this._share.share_with_displayname||this._share.share_with}get shareWithDisplayNameUnique(){return this._share.share_with_displayname_unique||this._share.share_with}get shareWithLink(){return this._share.share_with_link}get shareWithAvatar(){return this._share.share_with_avatar}get uidFileOwner(){return this._share.uid_file_owner}get displaynameFileOwner(){return this._share.displayname_file_owner||this._share.uid_file_owner}get createdTime(){return this._share.stime}get expireDate(){return this._share.expiration}set expireDate(e){this._share.expiration=e}get token(){return this._share.token}set token(e){this._share.token=e}get note(){return this._share.note}set note(e){this._share.note=e}get label(){return this._share.label??""}set label(e){this._share.label=e}get mailSend(){return!0===this._share.mail_send}get hideDownload(){return!0===this._share.hide_download||void 0!==this.attributes.find?.(({scope:e,key:t,value:i})=>"permissions"===e&&"download"===t&&!i)}set hideDownload(e){if(!e){const e=this.attributes.find(({key:e,scope:t})=>"download"===e&&"permissions"===t);e&&(e.value=!0)}this._share.hide_download=!0===e}get password(){return this._share.password}set password(e){this._share.password=e}get passwordExpirationTime(){return this._share.password_expiration_time}set passwordExpirationTime(e){this._share.password_expiration_time=e}get sendPasswordByTalk(){return this._share.send_password_by_talk}set sendPasswordByTalk(e){this._share.send_password_by_talk=e}get path(){return this._share.path}get itemType(){return this._share.item_type}get mimetype(){return this._share.mimetype}get fileSource(){return this._share.file_source}get fileTarget(){return this._share.file_target}get fileParent(){return this._share.file_parent}get hasReadPermission(){return!!(this.permissions&window.OC.PERMISSION_READ)}get hasCreatePermission(){return!!(this.permissions&window.OC.PERMISSION_CREATE)}get hasDeletePermission(){return!!(this.permissions&window.OC.PERMISSION_DELETE)}get hasUpdatePermission(){return!!(this.permissions&window.OC.PERMISSION_UPDATE)}get hasSharePermission(){return!!(this.permissions&window.OC.PERMISSION_SHARE)}get hasDownloadPermission(){return this.attributes.some(e=>"permissions"===e.scope&&"download"===e.key&&!1===e.value)}get isFileRequest(){return function(e="[]"){const t=e=>"fileRequest"===e.scope&&"enabled"===e.key&&!0===e.value;try{return JSON.parse(e).some(t)}catch(e){return H.A.error("Error while parsing share attributes",{error:e}),!1}}(JSON.stringify(this.attributes))}set hasDownloadPermission(e){this.setAttribute("permissions","download",!!e)}setAttribute(e,t,i){const s={scope:e,key:t,value:i};for(const e in this._share.attributes){const t=this._share.attributes[e];if(t.scope===s.scope&&t.key===s.key)return void this._share.attributes.splice(e,1,s)}this._share.attributes.push(s)}get canEdit(){return!0===this._share.can_edit}get canDelete(){return!0===this._share.can_delete}get viaFileid(){return this._share.via_fileid}get viaPath(){return this._share.via_path}get parent(){return this._share.parent}get storageId(){return this._share.storage_id}get storage(){return this._share.storage}get itemSource(){return this._share.item_source}get status(){return this._share.status}get isTrustedServer(){return!!this._share.is_trusted_server}}class ce{constructor(){(function(e,t,i){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=typeof i)return i;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})(this,"_capabilities",void 0),this._capabilities=(0,o.F)()}get defaultPermissions(){return this._capabilities.files_sharing?.default_permissions}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,h.C)("files_sharing","showFederatedSharesAsInternal",!1)}get showFederatedSharesToTrustedServersAsInternal(){return(0,h.C)("files_sharing","showFederatedSharesToTrustedServersAsInternal",!1)}get showExternalSharing(){return(0,h.C)("files_sharing","showExternalSharing",!0)}}const de={methods:{async openSharingDetails(e){let t={};if(e.handler){const i={};this.suggestions&&(i.suggestions=this.suggestions,i.fileInfo=this.fileInfo,i.query=this.query);const s=await e.handler(i);t=this.mapShareRequestToShareObject(s)}else t=this.mapShareRequestToShareObject(e);if("dir"!==this.fileInfo.type){const e=t.permissions,i=-5&e&-9;e!==i&&(H.A.debug("Removed create/delete permissions from file share (only valid for folders)"),t.permissions=i)}const i={fileInfo:this.fileInfo,share:t};this.$emit("open-sharing-details",i)},openShareDetailsForCustomSettings(e){e.setCustomPermissions=!0,this.openSharingDetails(e)},mapShareRequestToShareObject(e){if(e.id)return e;const t={attributes:[{value:!0,key:"download",scope:"permissions"}],hideDownload:!1,share_type:e.shareType,share_with:e.shareWith,is_no_user:e.isNoUser,user:e.shareWith,share_with_displayname:e.displayName,subtitle:e.subtitle,permissions:e.permissions??(new ce).defaultPermissions,expiration:""};return new he(t)}}};var ue=s(61338);s(48318);const pe=(0,d.KT)("apps/files_sharing/api/v1/shares"),ge={methods:{async createShare({path:e,permissions:i,shareType:s,shareWith:a,publicUpload:n,password:o,sendPasswordByTalk:l,expireDate:h,label:c,note:d,attributes:u}){try{const t=await r.Ay.post(pe,{path:e,permissions:i,shareType:s,shareWith:a,publicUpload:n,password:o,sendPasswordByTalk:l,expireDate:h,label:c,note:d,attributes:u});if(!t?.data?.ocs)throw t;const p=new he(t.data.ocs.data);return(0,ue.Ic)("files_sharing:share:created",{share:p}),p}catch(e){H.A.error("Error while creating share",{error:e});const i=e?.response?.data?.ocs?.meta?.message;throw(0,_.Qg)(i?t("files_sharing","Error creating the share: {errorMessage}",{errorMessage:i}):t("files_sharing","Error creating the share"),{type:"error"}),e}},async deleteShare(e){try{const t=await r.Ay.delete(pe+`/${e}`);if(!t?.data?.ocs)throw t;return(0,ue.Ic)("files_sharing:share:deleted",{id:e}),!0}catch(e){H.A.error("Error while deleting share",{error:e});const i=e?.response?.data?.ocs?.meta?.message;throw OC.Notification.showTemporary(i?t("files_sharing","Error deleting the share: {errorMessage}",{errorMessage:i}):t("files_sharing","Error deleting the share"),{type:"error"}),e}},async updateShare(e,i){try{const t=await r.Ay.put(pe+`/${e}`,i);if((0,ue.Ic)("files_sharing:share:updated",{id:e}),t?.data?.ocs)return t.data.ocs.data;throw t}catch(e){if(H.A.error("Error while updating share",{error:e}),400!==e.response.status){const i=e?.response?.data?.ocs?.meta?.message;OC.Notification.showTemporary(i?t("files_sharing","Error updating the share: {errorMessage}",{errorMessage:i}):t("files_sharing","Error updating the share"),{type:"error"})}const i=e.response.data.ocs.meta.message;throw new Error(i)}}}},fe={name:"SharingInput",components:{NcSelect:Q.default},mixins:[ge,de],props:{shares:{type:Array,required:!0},linkShares:{type:Array,required:!0},fileInfo:{type:Object,required:!0},reshare:{type:he,default:null},canReshare:{type:Boolean,required:!0},isExternal:{type:Boolean,default:!1},placeholder:{type:String,default:""}},setup:()=>({shareInputId:`share-input-${Math.random().toString(36).slice(2,7)}`}),data:()=>({config:new ce,loading:!1,query:"",recommendations:[],ShareSearch:OCA.Sharing.ShareSearch.state,suggestions:[],value:null}),computed:{externalResults(){return this.ShareSearch.results},inputPlaceholder(){const e=this.config.isRemoteShareAllowed;return this.canReshare?this.placeholder?this.placeholder:e?t("files_sharing","Name, email, or Federated Cloud ID …"):t("files_sharing","Name or email …"):t("files_sharing","Resharing is not allowed")},isValidQuery(){return this.query&&""!==this.query.trim()&&this.query.length>this.config.minSearchStringLength},options(){return this.isValidQuery?this.suggestions:this.recommendations},noResultText(){return this.loading?t("files_sharing","Searching …"):t("files_sharing","No elements found.")}},mounted(){this.isExternal||this.getRecommendations()},methods:{onSelected(e){this.value=null,this.openSharingDetails(e)},async asyncFind(e){this.query=e.trim(),this.isValidQuery&&(this.loading=!0,await this.debounceGetSuggestions(e))},async getSuggestions(e,i=!1){this.loading=!0,!0===(0,o.F)().files_sharing.sharee.query_lookup_default&&(i=!0);const s=[u.I.Remote,u.I.RemoteGroup],a=[],n=this.config.showFederatedSharesAsInternal||this.config.showFederatedSharesToTrustedServersAsInternal,l=!this.isExternal&&n||this.isExternal&&!n||this.isExternal&&this.config.showFederatedSharesToTrustedServersAsInternal;this.isExternal?!0===(0,o.F)().files_sharing.public.enabled&&a.push(u.I.Email):a.push(u.I.User,u.I.Group,u.I.Team,u.I.Room,u.I.Guest,u.I.Deck,u.I.ScienceMesh),l&&a.push(...s);let h=null;try{h=await r.Ay.get((0,d.KT)("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"dir"===this.fileInfo.type?"folder":"file",search:e,lookup:i,perPage:this.config.maxAutocompleteResults,shareType:a}})}catch(e){return void H.A.error("Error fetching suggestions",{error:e})}const{exact:c,...p}=h.data.ocs.data,g=Object.values(c).flat(),f=Object.values(p).flat(),A=this.filterOutExistingShares(g).filter(e=>this.filterByTrustedServer(e)).map(e=>this.formatForMultiselect(e)).sort((e,t)=>e.shareType-t.shareType),m=this.filterOutExistingShares(f).filter(e=>this.filterByTrustedServer(e)).map(e=>this.formatForMultiselect(e)).sort((e,t)=>e.shareType-t.shareType),_=[];p.lookupEnabled&&!i&&_.push({id:"global-lookup",isNoUser:!0,displayName:t("files_sharing","Search everywhere"),lookup:!0});const y=this.externalResults.filter(e=>!e.condition||e.condition(this)),w=A.concat(m).concat(y).concat(_),C=w.reduce((e,t)=>t.displayName?(e[t.displayName]||(e[t.displayName]=0),e[t.displayName]++,e):e,{});this.suggestions=w.map(e=>C[e.displayName]>1&&!e.desc?{...e,desc:e.shareWithDisplayNameUnique}:e),this.loading=!1,H.A.debug("sharing suggestions",{suggestions:this.suggestions})},debounceGetSuggestions:(0,G.A)(function(...e){this.getSuggestions(...e)},300),async getRecommendations(){this.loading=!0;let e=null;try{e=await r.Ay.get((0,d.KT)("apps/files_sharing/api/v1/sharees_recommended"),{params:{format:"json",itemType:this.fileInfo.type}})}catch(e){return void H.A.error("Error fetching recommendations",{error:e})}const t=this.externalResults.filter(e=>!e.condition||e.condition(this)),i=Object.values(e.data.ocs.data.exact).reduce((e,t)=>e.concat(t),[]);this.recommendations=this.filterOutExistingShares(i).filter(e=>this.filterByTrustedServer(e)).map(e=>this.formatForMultiselect(e)).concat(t),this.loading=!1,H.A.debug("sharing recommendations",{recommendations:this.recommendations})},filterOutExistingShares(e){return e.reduce((e,t)=>{if("object"!=typeof t)return e;try{if(t.value.shareType===u.I.User){if(t.value.shareWith===(0,n.HW)().uid)return e;if(this.reshare&&t.value.shareWith===this.reshare.owner)return e}if(t.value.shareType===u.I.Email){if(!this.isExternal)return e;if(-1!==this.linkShares.map(e=>e.shareWith).indexOf(t.value.shareWith.trim()))return e}else{const i=this.shares.reduce((e,t)=>(e[t.shareWith]=t.type,e),{}),s=t.value.shareWith.trim();if(s in i&&i[s]===t.value.shareType)return e}e.push(t)}catch{return e}return e},[])},shareTypeToIcon(e){switch(e){case u.I.Guest:return{icon:"icon-user",iconTitle:t("files_sharing","Guest")};case u.I.RemoteGroup:case u.I.Group:return{icon:"icon-group",iconTitle:t("files_sharing","Group")};case u.I.Email:return{icon:"icon-mail",iconTitle:t("files_sharing","Email")};case u.I.Team:return{icon:"icon-teams",iconTitle:t("files_sharing","Team")};case u.I.Room:return{icon:"icon-room",iconTitle:t("files_sharing","Talk conversation")};case u.I.Deck:return{icon:"icon-deck",iconTitle:t("files_sharing","Deck board")};case u.I.Sciencemesh:return{icon:"icon-sciencemesh",iconTitle:t("files_sharing","ScienceMesh")};default:return{}}},filterByTrustedServer(e){return!((e.value.shareType===u.I.Remote||e.value.shareType===u.I.RemoteGroup)&&this.config.showFederatedSharesToTrustedServersAsInternal&&!this.isExternal)||!0===e.value.isTrustedServer},formatForMultiselect(e){let i,s=e.name||e.label;return e.value.shareType===u.I.User&&this.config.shouldAlwaysShowUnique?i=e.shareWithDisplayNameUnique??"":e.value.shareType===u.I.Email?i=e.value.shareWith:e.value.shareType===u.I.Remote||e.value.shareType===u.I.RemoteGroup?this.config.showFederatedSharesAsInternal?(i=e.extra?.email?.value??"",s=e.extra?.name?.value??s):e.value.server&&(i=t("files_sharing","on {server}",{server:e.value.server})):i=e.shareWithDescription??"",{shareWith:e.value.shareWith,shareType:e.value.shareType,user:e.uuid||e.value.shareWith,isNoUser:e.value.shareType!==u.I.User,displayName:s,subname:i,shareWithDisplayNameUnique:e.shareWithDisplayNameUnique||"",...this.shareTypeToIcon(e.value.shareType)}}}};var Ae=s(77127),me={};me.styleTagTransform=O(),me.setAttributes=L(),me.insert=T().bind(null,"head"),me.domAPI=I(),me.insertStyleElement=B(),E()(Ae.A,me),Ae.A&&Ae.A.locals&&Ae.A.locals;const _e=(0,v.A)(fe,function(){var e=this,t=e._self._c;return t("div",{staticClass:"sharing-search"},[t("label",{staticClass:"hidden-visually",attrs:{for:e.shareInputId}},[e._v("\n\t\t"+e._s(e.isExternal?e.t("files_sharing","Enter external recipients"):e.t("files_sharing","Search for internal recipients"))+"\n\t")]),e._v(" "),t("NcSelect",{ref:"select",staticClass:"sharing-search__input",attrs:{"input-id":e.shareInputId,disabled:!e.canReshare,loading:e.loading,filterable:!1,placeholder:e.inputPlaceholder,"clear-search-on-blur":()=>!1,"user-select":!0,options:e.options,"label-outside":!0},on:{search:e.asyncFind,"option:selected":e.onSelected},scopedSlots:e._u([{key:"no-options",fn:function({search:t}){return[e._v("\n\t\t\t"+e._s(t?e.noResultText:e.placeholder)+"\n\t\t")]}}]),model:{value:e.value,callback:function(t){e.value=t},expression:"value"}})],1)},[],!1,null,null,null).exports,ye=(0,a.pM)({__name:"SidebarTabExternalSection",props:{node:{type:Object,required:!0},section:{type:Object,required:!0}},setup(e){const t=e,i=(0,a.KR)();return(0,a.nT)(()=>{i.value&&(i.value.node=t.node)}),{__sfc:!0,props:t,sectionElement:i}}}),we=(0,v.A)(ye,function(){var e=this,t=e._self._c;return e._self._setupProxy,t(e.section.element,{ref:"sectionElement",tag:"component",domProps:{node:e.node}})},[],!1,null,null,null).exports,Ce=(0,a.pM)({__name:"SidebarTabExternalSectionLegacy",props:{fileInfo:{type:Object,required:!0},sectionCallback:{type:Function,required:!0}},setup(e){const t=e,i=(0,a.EW)(()=>t.sectionCallback(void 0,t.fileInfo));return{__sfc:!0,props:t,component:i}}});var ve=s(70544),be={};be.styleTagTransform=O(),be.setAttributes=L(),be.insert=T().bind(null,"head"),be.domAPI=I(),be.insertStyleElement=B(),E()(ve.A,be),ve.A&&ve.A.locals&&ve.A.locals;const xe=(0,v.A)(Ce,function(){var e=this,t=e._self._c;return t("div",{staticClass:"sharing-tab-external-section-legacy"},[t(e._self._setupProxy.component,{tag:"component",attrs:{"file-info":e.fileInfo}})],1)},[],!1,null,"3e4e67d2",null).exports;var Se=s(53334),ke=s(32073),Ee=s(48198),De=s(16879),Ie=s(88289),Pe=s(16044),Te=s(177);const Ne={name:"AccountCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Le=(0,v.A)(Ne,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon account-circle-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"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,2M7.07,18.28C7.5,17.38 10.12,16.5 12,16.5C13.88,16.5 16.5,17.38 16.93,18.28C15.57,19.36 13.86,20 12,20C10.14,20 8.43,19.36 7.07,18.28M18.36,16.83C16.93,15.09 13.46,14.5 12,14.5C10.54,14.5 7.07,15.09 5.64,16.83C4.62,15.5 4,13.82 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,13.82 19.38,15.5 18.36,16.83M12,6C10.06,6 8.5,7.56 8.5,9.5C8.5,11.44 10.06,13 12,13C13.94,13 15.5,11.44 15.5,9.5C15.5,7.56 13.94,6 12,6M12,11A1.5,1.5 0 0,1 10.5,9.5A1.5,1.5 0 0,1 12,8A1.5,1.5 0 0,1 13.5,9.5A1.5,1.5 0 0,1 12,11Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,Re={name:"AccountGroupIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Be=(0,v.A)(Re,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon account-group-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,5.5A3.5,3.5 0 0,1 15.5,9A3.5,3.5 0 0,1 12,12.5A3.5,3.5 0 0,1 8.5,9A3.5,3.5 0 0,1 12,5.5M5,8C5.56,8 6.08,8.15 6.53,8.42C6.38,9.85 6.8,11.27 7.66,12.38C7.16,13.34 6.16,14 5,14A3,3 0 0,1 2,11A3,3 0 0,1 5,8M19,8A3,3 0 0,1 22,11A3,3 0 0,1 19,14C17.84,14 16.84,13.34 16.34,12.38C17.2,11.27 17.62,9.85 17.47,8.42C17.92,8.15 18.44,8 19,8M5.5,18.25C5.5,16.18 8.41,14.5 12,14.5C15.59,14.5 18.5,16.18 18.5,18.25V20H5.5V18.25M0,20V18.5C0,17.11 1.89,15.94 4.45,15.6C3.86,16.28 3.5,17.22 3.5,18.25V20H0M24,20H20.5V18.25C20.5,17.22 20.14,16.28 19.55,15.6C22.11,15.94 24,17.11 24,18.5V20Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,Ve={name:"CircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Oe=(0,v.A)(Ve,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon circle-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports;var Fe=s(66001),qe=s(26690);const Me={name:"EmailIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},He=(0,v.A)(Me,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon email-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M20,8L12,13L4,8V6L12,11L20,6M20,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6C22,4.89 21.1,4 20,4Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,$e={name:"EyeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ue=(0,v.A)($e,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon eye-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports;var We=s(36600),ze=s(25384),je=s(33388),Ge=s(16502),Qe=s(83239);const Ye={name:"ShareCircleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ze=(0,v.A)(Ye,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon share-circle-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M14 16V13C10.39 13 7.81 14.43 6 17C6.72 13.33 8.94 9.73 14 9V6L19 11L14 16Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,Je={name:"TrayArrowUpIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ke=(0,v.A)(Je,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon tray-arrow-up-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M2 12H4V17H20V12H22V17C22 18.11 21.11 19 20 19H4C2.9 19 2 18.11 2 17V12M12 2L6.46 7.46L7.88 8.88L11 5.75V15H13V5.75L16.13 8.88L17.55 7.45L12 2Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,Xe=(0,a.pM)({__name:"SidebarTabExternalAction",props:{action:{type:Object,required:!0},node:{type:Object,required:!0},share:{type:Object,required:!0}},setup(e,{expose:t}){const i=e;t({save:r});const s=(0,a.KR)(),n=(0,a.KR)();async function r(){await(n.value?.())}function o(e){n.value=e}return(0,a.nT)(()=>{s.value&&(s.value.node=(0,a.ux)(i.node),s.value.onSave=o,s.value.share=(0,a.ux)(i.share))}),{__sfc:!0,props:i,actionElement:s,savingCallback:n,save:r,onSave:o}}}),et=(0,v.A)(Xe,function(){var e=this,t=e._self._c,i=e._self._setupProxy;return t(e.action.element,{key:e.action.id,ref:"actionElement",tag:"component",domProps:{share:e.share,node:e.node,onSave:i.onSave}})},[],!1,null,null,null).exports,tt={name:"SidebarTabExternalActionLegacy",props:{id:{type:String,required:!0},action:{type:Object,default:()=>({})},fileInfo:{type:Object,required:!0},share:{type:he,default:null}},computed:{data(){return this.action.data(this)}}},it=(0,v.A)(tt,function(){var e=this;return(0,e._self._c)(e.data.is,e._g(e._b({tag:"component"},"component",e.data,!1),e.action.handlers),[e._v("\n\t"+e._s(e.data.text)+"\n")])},[],!1,null,null,null).exports;var st=s(39177);const at=function(e=le,t={}){const i=(0,ie.UU)(e,{headers:t});function s(e){i.setHeaders({...t,"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})}return(0,n.zo)(s),s((0,n.do)()),(0,ie.Gu)().patch("fetch",(e,t)=>{const i=t.headers;return i?.method&&(t.method=i.method,delete i.method),fetch(e,t)}),i}();async function nt(e){const t=`<?xml version="1.0"?>\n\t\t<d:propfind ${void 0===window._nc_dav_namespaces&&(window._nc_dav_namespaces={...ne}),Object.keys(window._nc_dav_namespaces).map(e=>`xmlns:${e}="${window._nc_dav_namespaces?.[e]}"`).join(" ")}>\n\t\t\t<d:prop>\n\t\t\t\t${void 0===window._nc_dav_properties&&(window._nc_dav_properties=[...ae]),window._nc_dav_properties.map(e=>`<${e} />`).join(" ")}\n\t\t\t</d:prop>\n\t\t</d:propfind>`;return function(e,t=oe,i=le){let s=(0,n.HW)()?.uid;if((0,te.f)())s=s??"anonymous";else if(!s)throw new Error("No user id found");const a=e.props,r=function(e=""){let t=se.P.NONE;return e?(e.includes("G")&&(t|=se.P.READ),e.includes("W")&&(t|=se.P.WRITE),e.includes("CK")&&(t|=se.P.CREATE),e.includes("NV")&&(t|=se.P.UPDATE),e.includes("D")&&(t|=se.P.DELETE),e.includes("R")&&(t|=se.P.SHARE),t):t}(a?.permissions),o=String(a?.["owner-id"]||s),l=a.fileid||0,h=new Date(Date.parse(e.lastmod)),c=new Date(Date.parse(a.creationdate)),d={id:l,source:`${i}${e.filename}`,mtime:isNaN(h.getTime())||0===h.getTime()?void 0:h,crtime:isNaN(c.getTime())||0===c.getTime()?void 0:c,mime:e.mime||"application/octet-stream",displayname:void 0!==a.displayname?String(a.displayname):void 0,size:a?.size||Number.parseInt(a.getcontentlength||"0"),status:l<0?se.c.FAILED:void 0,permissions:r,owner:o,root:t,attributes:{...e,...a,hasPreview:a?.["has-preview"]}};return delete d.attributes?.props,"file"===e.type?new se.a(d):new se.b(d)}((await at.stat(`${re()}${e}`,{details:!0,data:t})).data)}const rt=new ce;async function ot(e=!1){if(rt.passwordPolicy.api&&rt.passwordPolicy.api.generate)try{const t=await r.Ay.get(rt.passwordPolicy.api.generate);if(t.data.ocs.data.password)return e&&(0,_.Te)((0,Se.t)("files_sharing","Password created successfully")),t.data.ocs.data.password}catch(t){H.A.info("Error generating password from password_policy",{error:t}),e&&(0,_.Qg)((0,Se.t)("files_sharing","Error generating password from password policy"))}const t=new Uint8Array(10),i=52/255;!function(e){if(self?.crypto?.getRandomValues)return void self.crypto.getRandomValues(e);let t=e.length;for(;t--;)e[t]=Math.floor(256*Math.random())}(t);let s="";for(let e=0;e<t.length;e++)s+="abcdefgijkmnopqrstwxyzABCDEFGHJKLMNPQRSTWXYZ23456789".charAt(t[e]*i);return s}const lt={mixins:[ge],props:{fileInfo:{type:Object,default:()=>{},required:!0},share:{type:he,default:null},isUnique:{type:Boolean,default:!0}},data(){return{config:new ce,node:null,ShareType:u.I,errors:{},loading:!1,saving:!1,open:!1,passwordProtectedState:void 0,updateQueue:new st.A({concurrency:1}),reactiveState:this.share?.state}},computed:{path(){return(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/")},hasNote:{get(){return""!==this.share.note},set(e){this.share.note=e?null:""}},dateTomorrow:()=>new Date((new Date).setDate((new Date).getDate()+1)),lang(){const e=window.dayNamesShort?window.dayNamesShort:["Sun.","Mon.","Tue.","Wed.","Thu.","Fri.","Sat."],t=window.monthNamesShort?window.monthNamesShort:["Jan.","Feb.","Mar.","Apr.","May.","Jun.","Jul.","Aug.","Sep.","Oct.","Nov.","Dec."];return{formatLocale:{firstDayOfWeek:window.firstDay?window.firstDay:0,monthsShort:t,weekdaysMin:e,weekdaysShort:e},monthFormat:"MMM"}},isNewShare(){return!this.share.id},isFolder(){return"dir"===this.fileInfo.type},isPublicShare(){const e=this.share.shareType??this.share.type;return[u.I.Link,u.I.Email].includes(e)},isRemoteShare(){return this.share.type===u.I.RemoteGroup||this.share.type===u.I.Remote},isShareOwner(){return this.share&&this.share.owner===(0,n.HW)().uid},isExpiryDateEnforced(){return this.isPublicShare?this.config.isDefaultExpireDateEnforced:this.isRemoteShare?this.config.isDefaultRemoteExpireDateEnforced:this.config.isDefaultInternalExpireDateEnforced},hasCustomPermissions(){const e=[ee.ALL,ee.ALL_FILE,ee.READ_ONLY,ee.FILE_DROP],t=-17&this.share.permissions;return!e.includes(t)},maxExpirationDateEnforced(){return this.isExpiryDateEnforced?this.isPublicShare?this.config.defaultExpirationDate:this.isRemoteShare?this.config.defaultRemoteExpirationDateString:this.config.defaultInternalExpirationDate:null},isPasswordProtected:{get(){return!!this.config.enforcePasswordForPublicLink||(void 0!==this.passwordProtectedState?this.passwordProtectedState:"string"==typeof this.share.newPassword||"string"==typeof this.share.password)},async set(e){e?(this.passwordProtectedState=!0,this.$set(this.share,"newPassword",await ot(!0))):(this.passwordProtectedState=!1,this.$set(this.share,"newPassword",""))}}},methods:{async getNode(){const e={path:this.path};try{this.node=await nt(e.path),H.A.info("Fetched node:",{node:this.node})}catch(e){H.A.error("Error:",e)}},checkShare:e=>(!e.password||"string"==typeof e.password&&""!==e.password.trim())&&((!e.newPassword||"string"==typeof e.newPassword)&&!(e.expirationDate&&!e.expirationDate.isValid())),formatDateToString:e=>new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())).toISOString().split("T")[0],onExpirationChange(e){if(!e)return this.share.expireDate=null,void this.$set(this.share,"expireDate",null);const t=e instanceof Date?e:new Date(e);this.share.expireDate=this.formatDateToString(t)},onNoteChange(e){this.$set(this.share,"newNote",e.trim())},onNoteSubmit(){this.share.newNote&&(this.share.note=this.share.newNote,this.$delete(this.share,"newNote"),this.queueUpdate("note"))},async onDelete(){try{this.loading=!0,this.open=!1,await this.deleteShare(this.share.id),H.A.debug("Share deleted",{shareId:this.share.id});const e="file"===this.share.itemType?t("files_sharing",'File "{path}" has been unshared',{path:this.share.path}):t("files_sharing",'Folder "{path}" has been unshared',{path:this.share.path});(0,_.Te)(e),this.$emit("remove:share",this.share),await this.getNode(),(0,ue.Ic)("files:node:updated",this.node)}catch{this.open=!0}finally{this.loading=!1}},queueUpdate(...e){if(0!==e.length){if(this.share.id){const i={};for(const t of e)"password"!==t?null===this.share[t]||void 0===this.share[t]?i[t]="":"object"==typeof this.share[t]?i[t]=JSON.stringify(this.share[t]):i[t]=this.share[t].toString():void 0!==this.share.newPassword&&(i[t]=this.share.newPassword);return this.updateQueue.add(async()=>{this.saving=!0,this.errors={};try{const t=await this.updateShare(this.share.id,i);e.includes("password")&&(this.share.password=this.share.newPassword||void 0,this.$delete(this.share,"newPassword"),this.share.passwordExpirationTime=t.password_expiration_time);for(const t of e)this.$delete(this.errors,t);(0,_.Te)(this.updateSuccessMessage(e))}catch(i){H.A.error("Could not update share",{error:i,share:this.share,propertyNames:e});const{message:s}=i;if(s&&""!==s){for(const t of e)this.onSyncError(t,s);(0,_.Qg)(s)}else(0,_.Qg)(t("files_sharing","Could not update share"))}finally{this.saving=!1}})}H.A.debug("Updated local share",{share:this.share})}},updateSuccessMessage(e){if(1!==e.length)return t("files_sharing","Share saved");switch(e[0]){case"expireDate":return t("files_sharing","Share expiry date saved");case"hideDownload":return t("files_sharing","Share hide-download state saved");case"label":return t("files_sharing","Share label saved");case"note":return t("files_sharing","Share note for recipient saved");case"password":return t("files_sharing","Share password saved");case"permissions":return t("files_sharing","Share permissions saved");default:return t("files_sharing","Share saved")}},onSyncError(e,t){switch("password"===e&&void 0!==this.share.newPassword&&(this.share.newPassword===this.share.password&&(this.share.password=""),this.$delete(this.share,"newPassword")),this.open=!0,e){case"password":case"pending":case"expireDate":case"label":case"note":{this.$set(this.errors,e,t);let i=this.$refs[e];if(i){i.$el&&(i=i.$el);const e=i.querySelector(".focusable");e&&e.focus()}break}case"sendPasswordByTalk":this.$set(this.errors,e,t),this.share.sendPasswordByTalk=!this.share.sendPasswordByTalk}},debounceQueueUpdate:(0,G.A)(function(e){this.queueUpdate(e)},500)}},ht={name:"SharingDetailsTab",components:{NcAvatar:p.A,NcButton:g.A,NcCheckboxRadioSwitch:ke.A,NcDateTimePickerNative:Ee.A,NcInputField:De.A,NcLoadingIcon:Ie.A,NcPasswordField:Pe.A,NcTextArea:Te.A,CloseIcon:Fe.A,CircleIcon:Oe,EditIcon:Ge.A,LinkIcon:We.A,GroupIcon:Be,ShareIcon:Ze,UserIcon:Le,UploadIcon:Ke,ViewIcon:Ue,MenuDownIcon:ze.A,MenuUpIcon:je.A,DotsHorizontalIcon:qe.A,Refresh:Qe.A,SidebarTabExternalAction:et,SidebarTabExternalActionLegacy:it},mixins:[ge,lt],props:{shareRequestValue:{type:Object,required:!1},fileInfo:{type:Object,required:!0},share:{type:Object,required:!0}},data(){return{writeNoteToRecipientIsChecked:!1,sharingPermission:ee.ALL.toString(),revertSharingPermission:ee.ALL.toString(),setCustomPermissions:!1,passwordError:!1,advancedSectionAccordionExpanded:!1,bundledPermissions:ee,isFirstComponentLoad:!0,test:!1,creating:!1,initialToken:this.share.token,loadingToken:!1,externalShareActions:[...window._nc_files_sharing_sidebar_actions?.values()??[]],ExternalShareActions:OCA.Sharing.ExternalShareActions.state}},computed:{title(){switch(this.share.type){case u.I.User:return t("files_sharing","Share with {user}",{user:this.share.shareWithDisplayName});case u.I.Email:return t("files_sharing","Share with email {email}",{email:this.share.shareWith});case u.I.Link:return t("files_sharing","Share link");case u.I.Group:return t("files_sharing","Share with group");case u.I.Room:return t("files_sharing","Share in conversation");case u.I.Remote:{const[e,i]=this.share.shareWith.split("@");return this.config.showFederatedSharesAsInternal?t("files_sharing","Share with {user}",{user:e}):t("files_sharing","Share with {user} on remote server {server}",{user:e,server:i})}case u.I.RemoteGroup:return t("files_sharing","Share with remote group");case u.I.Guest:return t("files_sharing","Share with guest");default:return this.share.id?t("files_sharing","Update share"):t("files_sharing","Create share")}},allPermissions(){return this.isFolder?this.bundledPermissions.ALL.toString():this.bundledPermissions.ALL_FILE.toString()},canEdit:{get(){return this.share.hasUpdatePermission},set(e){this.updateAtomicPermissions({isEditChecked:e})}},canCreate:{get(){return this.share.hasCreatePermission},set(e){this.updateAtomicPermissions({isCreateChecked:e})}},canDelete:{get(){return this.share.hasDeletePermission},set(e){this.updateAtomicPermissions({isDeleteChecked:e})}},canReshare:{get(){return this.share.hasSharePermission},set(e){this.updateAtomicPermissions({isReshareChecked:e})}},showInGridView:{get(){return this.getShareAttribute("config","grid_view",!1)},set(e){this.setShareAttribute("config","grid_view",e)}},canDownload:{get(){return this.getShareAttribute("permissions","download",!0)},set(e){this.setShareAttribute("permissions","download",e)}},hasRead:{get(){return this.share.hasReadPermission},set(e){this.updateAtomicPermissions({isReadChecked:e})}},hasExpirationDate:{get(){return this.isValidShareAttribute(this.share.expireDate)},set(e){this.share.expireDate=e?this.formatDateToString(this.defaultExpiryDate):""}},isFolder(){return"dir"===this.fileInfo.type},isSetDownloadButtonVisible(){return this.isFolder||["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation"].includes(this.fileInfo.mimetype)},isPasswordEnforced(){return this.isPublicShare&&this.config.enforcePasswordForPublicLink},defaultExpiryDate(){return(this.isGroupShare||this.isUserShare)&&this.config.isDefaultInternalExpireDateEnabled?new Date(this.config.defaultInternalExpirationDate):this.isRemoteShare&&this.config.isDefaultRemoteExpireDateEnabled?new Date(this.config.defaultRemoteExpireDateEnabled):this.isPublicShare&&this.config.isDefaultExpireDateEnabled?new Date(this.config.defaultExpirationDate):new Date((new Date).setDate((new Date).getDate()+1))},isUserShare(){return this.share.type===u.I.User},isGroupShare(){return this.share.type===u.I.Group},allowsFileDrop(){return!(!this.isFolder||!this.config.isPublicUploadEnabled||this.share.type!==u.I.Link&&this.share.type!==u.I.Email)},hasFileDropPermissions(){return this.share.permissions===this.bundledPermissions.FILE_DROP},shareButtonText(){return this.isNewShare?t("files_sharing","Save share"):t("files_sharing","Update share")},resharingIsPossible(){return this.config.isResharingAllowed&&this.share.type!==u.I.Link&&this.share.type!==u.I.Email},canSetEdit(){return this.fileInfo.sharePermissions&OC.PERMISSION_UPDATE||this.canEdit},canSetCreate(){return this.fileInfo.sharePermissions&OC.PERMISSION_CREATE||this.canCreate},canSetDelete(){return this.fileInfo.sharePermissions&OC.PERMISSION_DELETE||this.canDelete},canSetReshare(){return this.fileInfo.sharePermissions&OC.PERMISSION_SHARE||this.canReshare},canSetDownload(){return this.fileInfo.canDownload()||this.canDownload},canRemoveReadPermission(){return this.allowsFileDrop&&(this.share.type===u.I.Link||this.share.type===u.I.Email)},hasUnsavedPassword(){return void 0!==this.share.newPassword},passwordExpirationTime(){if(!this.isValidShareAttribute(this.share.passwordExpirationTime))return null;const e=(0,c.A)(this.share.passwordExpirationTime);return!(e.diff((0,c.A)())<0)&&e.fromNow()},isTalkEnabled:()=>void 0!==OC.appswebroots.spreed,isPasswordProtectedByTalkAvailable(){return this.isPasswordProtected&&this.isTalkEnabled},isPasswordProtectedByTalk:{get(){return this.share.sendPasswordByTalk},async set(e){this.share.sendPasswordByTalk=e}},isEmailShareType(){return!!this.share&&this.share.type===u.I.Email},canTogglePasswordProtectedByTalkAvailable(){return!(!this.isPublicShare||!this.isPasswordProtected||this.isEmailShareType&&!this.hasUnsavedPassword||void 0===OC.appswebroots.spreed)},canChangeHideDownload(){return this.fileInfo.shareAttributes.some(e=>"download"===e.key&&"permissions"===e.scope&&!1===e.value)},customPermissionsList(){const e={[Y]:this.t("files_sharing","Read"),[J]:this.t("files_sharing","Create"),[Z]:this.t("files_sharing","Edit"),[X]:this.t("files_sharing","Share"),[K]:this.t("files_sharing","Delete")};return[Y,...this.isFolder?[4]:[],Z,...this.resharingIsPossible?[X]:[],...this.isFolder?[8]:[]].filter(e=>{return t=this.share.permissions,i=e,0!==t&&(t&i)===i;var t,i}).map((t,i)=>0===i?e[t]:e[t].toLocaleLowerCase((0,Se.Z0)())).join(", ")},advancedControlExpandedValue(){return this.advancedSectionAccordionExpanded?"true":"false"},errorPasswordLabel(){if(this.passwordError)return t("files_sharing","Password field cannot be empty")},passwordHint(){if(!this.isNewShare&&!this.hasUnsavedPassword)return t("files_sharing","Replace current password")},sortedExternalShareActions(){return this.externalShareActions.filter(e=>e.enabled((0,a.ux)(this.share),(0,a.ux)(this.fileInfo.node))).sort((e,t)=>e.order-t.order)},externalLegacyShareActions(){return H.A.debug("legacy details tab",{ExternalShareActions:this.ExternalShareActions}),this.ExternalShareActions.actions.filter(e=>(e.shareType.includes(u.I.Link)||e.shareType.includes(u.I.Email))&&e.advanced)}},watch:{setCustomPermissions(e){this.sharingPermission=e?"custom":this.revertSharingPermission}},beforeMount(){this.initializePermissions(),this.initializeAttributes(),H.A.debug("Share object received",{share:this.share}),H.A.debug("Configuration object received",{config:this.config})},mounted(){this.$refs.quickPermissions?.querySelector("input:checked")?.focus()},methods:{setShareAttribute(e,t,i){this.share.attributes||this.$set(this.share,"attributes",[]);const s=this.share.attributes.find(i=>i.scope===e||i.key===t);s?s.value=i:this.share.attributes.push({scope:e,key:t,value:i})},getShareAttribute(e,t,i=void 0){const s=this.share.attributes?.find(i=>i.scope===e&&i.key===t);return s?.value??i},async generateNewToken(){if(!this.loadingToken){this.loadingToken=!0;try{this.share.token=await async function(){const{data:e}=await r.Ay.get((0,d.KT)("/apps/files_sharing/api/v1/token"));return e.ocs.data.token}()}catch{(0,_.Qg)(t("files_sharing","Failed to generate a new token"))}this.loadingToken=!1}},cancel(){this.share.token=this.initialToken,this.$emit("close-sharing-details")},updateAtomicPermissions({isReadChecked:e=this.hasRead,isEditChecked:t=this.canEdit,isCreateChecked:i=this.canCreate,isDeleteChecked:s=this.canDelete,isReshareChecked:a=this.canReshare}={}){this.isFolder||!i&&!s||(H.A.debug("Ignoring create/delete permissions for file share — only available for folders"),i=!1,s=!1);const n=0|(e?Y:0)|(i?4:0)|(s?8:0)|(t?Z:0)|(a?X:0);this.share.permissions=n},expandCustomPermissions(){this.advancedSectionAccordionExpanded||(this.advancedSectionAccordionExpanded=!0),this.toggleCustomPermissions()},toggleCustomPermissions(e){const t="custom"===this.sharingPermission;this.revertSharingPermission=t?"custom":e,this.setCustomPermissions=t},async initializeAttributes(){if(this.isNewShare)return(this.config.enableLinkPasswordByDefault||this.isPasswordEnforced)&&this.isPublicShare&&(this.$set(this.share,"newPassword",await ot(!0)),this.advancedSectionAccordionExpanded=!0),this.isPublicShare&&this.config.isDefaultExpireDateEnabled?this.share.expireDate=this.config.defaultExpirationDate.toDateString():this.isRemoteShare&&this.config.isDefaultRemoteExpireDateEnabled?this.share.expireDate=this.config.defaultRemoteExpirationDateString.toDateString():this.config.isDefaultInternalExpireDateEnabled&&(this.share.expireDate=this.config.defaultInternalExpirationDate.toDateString()),void(this.isValidShareAttribute(this.share.expireDate)&&(this.advancedSectionAccordionExpanded=!0));!this.isValidShareAttribute(this.share.expireDate)&&this.isExpiryDateEnforced&&(this.hasExpirationDate=!0),(this.isValidShareAttribute(this.share.password)||this.isValidShareAttribute(this.share.expireDate)||this.isValidShareAttribute(this.share.label))&&(this.advancedSectionAccordionExpanded=!0),this.isValidShareAttribute(this.share.note)&&(this.writeNoteToRecipientIsChecked=!0,this.advancedSectionAccordionExpanded=!0)},handleShareType(){"shareType"in this.share?this.share.type=this.share.shareType:this.share.share_type&&(this.share.type=this.share.share_type)},handleDefaultPermissions(){if(this.isNewShare){const e=this.config.defaultPermissions,t=-17&e;t===ee.READ_ONLY||t===ee.ALL||t===ee.ALL_FILE?this.sharingPermission=t.toString():(this.sharingPermission="custom",this.share.permissions=e,this.advancedSectionAccordionExpanded=!0,this.setCustomPermissions=!0)}this.canRemoveReadPermission||(this.hasRead=!0)},handleCustomPermissions(){this.isNewShare||!this.hasCustomPermissions&&!this.share.setCustomPermissions?this.share.permissions&&(this.sharingPermission=this.share.permissions.toString()):(this.sharingPermission="custom",this.advancedSectionAccordionExpanded=!0,this.setCustomPermissions=!0)},initializePermissions(){this.handleShareType(),this.handleDefaultPermissions(),this.handleCustomPermissions()},async saveShare(){const e=["permissions","attributes","note","expireDate"],t=["label","hideDownload"];this.hasUnsavedPassword&&t.push("password"),this.config.allowCustomTokens&&t.push("token"),this.isPublicShare&&e.push(...t);const i=parseInt(this.sharingPermission);if(this.setCustomPermissions?this.updateAtomicPermissions():this.share.permissions=i,this.isFolder||this.share.permissions!==ee.ALL||(this.share.permissions=ee.ALL_FILE),this.writeNoteToRecipientIsChecked||(this.share.note=""),this.isPasswordProtected?this.isPasswordEnforced&&this.isNewShare&&!this.isValidShareAttribute(this.share.newPassword)&&(this.passwordError=!0):this.share.password="",this.hasExpirationDate||(this.share.expireDate=""),this.isNewShare){const t={permissions:this.share.permissions,shareType:this.share.type,shareWith:this.share.shareWith,attributes:this.share.attributes,note:this.share.note,fileInfo:this.fileInfo};let i;t.expireDate=this.hasExpirationDate?this.share.expireDate:"",this.isPasswordProtected&&(t.password=this.share.newPassword);try{this.creating=!0,i=await this.addShare(t)}catch{return void(this.creating=!1)}this.share._share.id=i.id,await this.queueUpdate(...e);for(const t of e)if(t in i&&t in this.share)try{i[t]=this.share[t]}catch{i._share[t]=this.share[t]}this.share=i,this.creating=!1,this.$emit("add:share",this.share)}else await this.queueUpdate(...e),this.$emit("update:share",this.share);if(await this.getNode(),(0,ue.Ic)("files:node:updated",this.node),this.$refs.externalShareActions?.length>0){const e=this.$refs.externalShareActions;await Promise.allSettled(e.map(e=>e.save()))}this.$refs.externalLinkActions?.length>0&&await Promise.allSettled(this.$refs.externalLinkActions.map(e=>"function"!=typeof e.$children.at(0)?.onSave?Promise.resolve():e.$children.at(0)?.onSave?.())),this.$emit("close-sharing-details")},async addShare(e){H.A.debug("Adding a new share from the input for",{share:e});const t=this.path;try{return await this.createShare({path:t,shareType:e.shareType,shareWith:e.shareWith,permissions:e.permissions,expireDate:e.expireDate,attributes:JSON.stringify(e.attributes),...e.note?{note:e.note}:{},...e.password?{password:e.password}:{}})}catch(e){throw H.A.error("Error while adding new share",{error:e}),e}},async removeShare(){await this.onDelete(),await this.getNode(),(0,ue.Ic)("files:node:updated",this.node),this.$emit("close-sharing-details")},onPasswordChange(e){if(""===e)return this.$delete(this.share,"newPassword"),void(this.passwordError=this.isNewShare&&this.isPasswordEnforced);this.passwordError=!this.isValidShareAttribute(e),this.$set(this.share,"newPassword",e)},onPasswordProtectedByTalkChange(){this.isEmailShareType||this.hasUnsavedPassword?this.queueUpdate("sendPasswordByTalk","password"):this.queueUpdate("sendPasswordByTalk")},isValidShareAttribute:e=>![null,void 0].includes(e)&&e.trim().length>0,getShareTypeIcon(e){switch(e){case u.I.Link:return We.A;case u.I.Guest:return Le;case u.I.RemoteGroup:case u.I.Group:return Be;case u.I.Email:return He;case u.I.Team:return Oe;case u.I.Room:case u.I.Deck:case u.I.ScienceMesh:return Ze;default:return null}}}};var ct=s(81771),dt={};dt.styleTagTransform=O(),dt.setAttributes=L(),dt.insert=T().bind(null,"head"),dt.domAPI=I(),dt.insertStyleElement=B(),E()(ct.A,dt),ct.A&&ct.A.locals&&ct.A.locals;var ut=(0,v.A)(ht,function(){var e=this,t=e._self._c;return t("div",{staticClass:"sharingTabDetailsView"},[t("div",{staticClass:"sharingTabDetailsView__header"},[t("span",[e.isUserShare?t("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":e.share.shareType!==e.ShareType.User,user:e.share.shareWith,"display-name":e.share.shareWithDisplayName,"menu-position":"left",url:e.share.shareWithAvatar}}):e._e(),e._v(" "),t(e.getShareTypeIcon(e.share.type),{tag:"component",attrs:{size:32}})],1),e._v(" "),t("span",[t("h1",[e._v(e._s(e.title))])])]),e._v(" "),t("div",{staticClass:"sharingTabDetailsView__wrapper"},[t("div",{ref:"quickPermissions",staticClass:"sharingTabDetailsView__quick-permissions"},[t("div",[t("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,"data-cy-files-sharing-share-permissions-bundle":"read-only",value:e.bundledPermissions.READ_ONLY.toString(),name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:modelValue":e.toggleCustomPermissions},scopedSlots:e._u([{key:"icon",fn:function(){return[t("ViewIcon",{attrs:{size:20}})]},proxy:!0}]),model:{value:e.sharingPermission,callback:function(t){e.sharingPermission=t},expression:"sharingPermission"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","View only"))+"\n\t\t\t\t\t")]),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,"data-cy-files-sharing-share-permissions-bundle":"upload-edit",value:e.allPermissions,name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:modelValue":e.toggleCustomPermissions},scopedSlots:e._u([{key:"icon",fn:function(){return[t("EditIcon",{attrs:{size:20}})]},proxy:!0}]),model:{value:e.sharingPermission,callback:function(t){e.sharingPermission=t},expression:"sharingPermission"}},[e.allowsFileDrop?[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Allow upload and editing"))+"\n\t\t\t\t\t")]:[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Allow editing"))+"\n\t\t\t\t\t")]],2),e._v(" "),e.allowsFileDrop?t("NcCheckboxRadioSwitch",{attrs:{"data-cy-files-sharing-share-permissions-bundle":"file-drop","button-variant":!0,value:e.bundledPermissions.FILE_DROP.toString(),name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:modelValue":e.toggleCustomPermissions},scopedSlots:e._u([{key:"icon",fn:function(){return[t("UploadIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,1083194048),model:{value:e.sharingPermission,callback:function(t){e.sharingPermission=t},expression:"sharingPermission"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","File request"))+"\n\t\t\t\t\t"),t("small",{staticClass:"subline"},[e._v(e._s(e.t("files_sharing","Upload only")))])]):e._e(),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{"button-variant":!0,"data-cy-files-sharing-share-permissions-bundle":"custom",value:"custom",name:"sharing_permission_radio",type:"radio","button-variant-grouped":"vertical"},on:{"update:modelValue":e.expandCustomPermissions},scopedSlots:e._u([{key:"icon",fn:function(){return[t("DotsHorizontalIcon",{attrs:{size:20}})]},proxy:!0}]),model:{value:e.sharingPermission,callback:function(t){e.sharingPermission=t},expression:"sharingPermission"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Custom permissions"))+"\n\t\t\t\t\t"),t("small",{staticClass:"subline"},[e._v(e._s(e.customPermissionsList))])])],1)]),e._v(" "),t("div",{staticClass:"sharingTabDetailsView__advanced-control"},[t("NcButton",{attrs:{id:"advancedSectionAccordionAdvancedControl",variant:"tertiary",alignment:"end-reverse","aria-controls":"advancedSectionAccordionAdvanced","aria-expanded":e.advancedControlExpandedValue},on:{click:function(t){e.advancedSectionAccordionExpanded=!e.advancedSectionAccordionExpanded}},scopedSlots:e._u([{key:"icon",fn:function(){return[e.advancedSectionAccordionExpanded?t("MenuUpIcon"):t("MenuDownIcon")]},proxy:!0}])},[e._v("\n\t\t\t\t"+e._s(e.t("files_sharing","Advanced settings"))+"\n\t\t\t\t")])],1),e._v(" "),e.advancedSectionAccordionExpanded?t("div",{staticClass:"sharingTabDetailsView__advanced",attrs:{id:"advancedSectionAccordionAdvanced","aria-labelledby":"advancedSectionAccordionAdvancedControl",role:"region"}},[t("section",[e.isPublicShare?t("NcInputField",{staticClass:"sharingTabDetailsView__label",attrs:{autocomplete:"off",label:e.t("files_sharing","Share label")},model:{value:e.share.label,callback:function(t){e.$set(e.share,"label",t)},expression:"share.label"}}):e._e(),e._v(" "),e.config.allowCustomTokens&&e.isPublicShare&&!e.isNewShare?t("NcInputField",{attrs:{autocomplete:"off",label:e.t("files_sharing","Share link token"),"helper-text":e.t("files_sharing","Set the public share link token to something easy to remember or generate a new token. It is not recommended to use a guessable token for shares which contain sensitive information."),"show-trailing-button":"","trailing-button-label":e.loadingToken?e.t("files_sharing","Generating…"):e.t("files_sharing","Generate new token")},on:{"trailing-button-click":e.generateNewToken},scopedSlots:e._u([{key:"trailing-button-icon",fn:function(){return[e.loadingToken?t("NcLoadingIcon"):t("Refresh",{attrs:{size:20}})]},proxy:!0}],null,!1,4228062821),model:{value:e.share.token,callback:function(t){e.$set(e.share,"token",t)},expression:"share.token"}}):e._e(),e._v(" "),e.isPublicShare?[t("NcCheckboxRadioSwitch",{attrs:{disabled:e.isPasswordEnforced},model:{value:e.isPasswordProtected,callback:function(t){e.isPasswordProtected=t},expression:"isPasswordProtected"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Set password"))+"\n\t\t\t\t\t")]),e._v(" "),e.isPasswordProtected?t("NcPasswordField",{attrs:{autocomplete:"new-password","model-value":e.share.newPassword??"",error:e.passwordError,"helper-text":e.errorPasswordLabel||e.passwordHint,required:e.isPasswordEnforced&&e.isNewShare,label:e.t("files_sharing","Password")},on:{"update:value":e.onPasswordChange}}):e._e(),e._v(" "),e.isEmailShareType&&e.passwordExpirationTime?t("span",{attrs:{icon:"icon-info"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Password expires {passwordExpirationTime}",{passwordExpirationTime:e.passwordExpirationTime}))+"\n\t\t\t\t\t")]):e.isEmailShareType&&null!==e.passwordExpirationTime?t("span",{attrs:{icon:"icon-error"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Password expired"))+"\n\t\t\t\t\t")]):e._e()]:e._e(),e._v(" "),e.canTogglePasswordProtectedByTalkAvailable?t("NcCheckboxRadioSwitch",{on:{"update:modelValue":e.onPasswordProtectedByTalkChange},model:{value:e.isPasswordProtectedByTalk,callback:function(t){e.isPasswordProtectedByTalk=t},expression:"isPasswordProtectedByTalk"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Video verification"))+"\n\t\t\t\t")]):e._e(),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{disabled:e.isExpiryDateEnforced},model:{value:e.hasExpirationDate,callback:function(t){e.hasExpirationDate=t},expression:"hasExpirationDate"}},[e._v("\n\t\t\t\t\t"+e._s(e.isExpiryDateEnforced?e.t("files_sharing","Expiration date (enforced)"):e.t("files_sharing","Set expiration date"))+"\n\t\t\t\t")]),e._v(" "),e.hasExpirationDate?t("NcDateTimePickerNative",{attrs:{id:"share-date-picker","model-value":new Date(e.share.expireDate??e.dateTomorrow),min:e.dateTomorrow,max:e.maxExpirationDateEnforced,"hide-label":"",label:e.t("files_sharing","Expiration date"),placeholder:e.t("files_sharing","Expiration date"),type:"date"},on:{input:e.onExpirationChange}}):e._e(),e._v(" "),e.isPublicShare?t("NcCheckboxRadioSwitch",{attrs:{disabled:e.canChangeHideDownload},on:{"update:modelValue":function(t){return e.queueUpdate("hideDownload")}},model:{value:e.share.hideDownload,callback:function(t){e.$set(e.share,"hideDownload",t)},expression:"share.hideDownload"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Hide download"))+"\n\t\t\t\t")]):t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetDownload,"data-cy-files-sharing-share-permissions-checkbox":"download"},model:{value:e.canDownload,callback:function(t){e.canDownload=t},expression:"canDownload"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Allow download and sync"))+"\n\t\t\t\t")]),e._v(" "),t("NcCheckboxRadioSwitch",{model:{value:e.writeNoteToRecipientIsChecked,callback:function(t){e.writeNoteToRecipientIsChecked=t},expression:"writeNoteToRecipientIsChecked"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Note to recipient"))+"\n\t\t\t\t")]),e._v(" "),e.writeNoteToRecipientIsChecked?[t("NcTextArea",{attrs:{label:e.t("files_sharing","Note to recipient"),placeholder:e.t("files_sharing","Enter a note for the share recipient")},model:{value:e.share.note,callback:function(t){e.$set(e.share,"note",t)},expression:"share.note"}})]:e._e(),e._v(" "),e.isPublicShare&&e.isFolder?t("NcCheckboxRadioSwitch",{model:{value:e.showInGridView,callback:function(t){e.showInGridView=t},expression:"showInGridView"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Show files in grid view"))+"\n\t\t\t\t")]):e._e(),e._v(" "),e._l(e.sortedExternalShareActions,function(i){return t("SidebarTabExternalAction",{key:i.id,ref:"externalShareActions",refInFor:!0,attrs:{action:i,node:e.fileInfo.node,share:e.share}})}),e._v(" "),e._l(e.externalLegacyShareActions,function(i){return t("SidebarTabExternalActionLegacy",{key:i.id,ref:"externalLinkActions",refInFor:!0,attrs:{id:i.id,action:i,"file-info":e.fileInfo,share:e.share}})}),e._v(" "),t("NcCheckboxRadioSwitch",{model:{value:e.setCustomPermissions,callback:function(t){e.setCustomPermissions=t},expression:"setCustomPermissions"}},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Custom permissions"))+"\n\t\t\t\t")]),e._v(" "),e.setCustomPermissions?t("section",{staticClass:"custom-permissions-group"},[t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canRemoveReadPermission,"data-cy-files-sharing-share-permissions-checkbox":"read"},model:{value:e.hasRead,callback:function(t){e.hasRead=t},expression:"hasRead"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Read"))+"\n\t\t\t\t\t")]),e._v(" "),e.isFolder?t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetCreate,"data-cy-files-sharing-share-permissions-checkbox":"create"},model:{value:e.canCreate,callback:function(t){e.canCreate=t},expression:"canCreate"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Create"))+"\n\t\t\t\t\t")]):e._e(),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetEdit,"data-cy-files-sharing-share-permissions-checkbox":"update"},model:{value:e.canEdit,callback:function(t){e.canEdit=t},expression:"canEdit"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Edit"))+"\n\t\t\t\t\t")]),e._v(" "),e.resharingIsPossible?t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetReshare,"data-cy-files-sharing-share-permissions-checkbox":"share"},model:{value:e.canReshare,callback:function(t){e.canReshare=t},expression:"canReshare"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Share"))+"\n\t\t\t\t\t")]):e._e(),e._v(" "),t("NcCheckboxRadioSwitch",{attrs:{disabled:!e.canSetDelete,"data-cy-files-sharing-share-permissions-checkbox":"delete"},model:{value:e.canDelete,callback:function(t){e.canDelete=t},expression:"canDelete"}},[e._v("\n\t\t\t\t\t\t"+e._s(e.t("files_sharing","Delete"))+"\n\t\t\t\t\t")])],1):e._e()],2)]):e._e()]),e._v(" "),t("div",{staticClass:"sharingTabDetailsView__footer"},[t("div",{staticClass:"button-group"},[t("NcButton",{attrs:{"data-cy-files-sharing-share-editor-action":"cancel"},on:{click:e.cancel}},[e._v("\n\t\t\t\t"+e._s(e.t("files_sharing","Cancel"))+"\n\t\t\t")]),e._v(" "),t("div",{staticClass:"sharingTabDetailsView__delete"},[e.isNewShare?e._e():t("NcButton",{attrs:{"aria-label":e.t("files_sharing","Delete share"),disabled:!1,readonly:!1,variant:"tertiary"},on:{click:function(t){return t.preventDefault(),e.removeShare.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("CloseIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2428343285)},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Delete share"))+"\n\t\t\t\t")])],1),e._v(" "),t("NcButton",{attrs:{variant:"primary","data-cy-files-sharing-share-editor-action":"save",disabled:e.creating},on:{click:e.saveShare},scopedSlots:e._u([e.creating?{key:"icon",fn:function(){return[t("NcLoadingIcon")]},proxy:!0}:null],null,!0)},[e._v("\n\t\t\t\t"+e._s(e.shareButtonText)+"\n\t\t\t\t")])],1)])])},[],!1,null,"34db2cbd",null);const pt=ut.exports;var gt=s(71225),ft=s(57908),At=s(71711);const mt={name:"SharingEntryInherited",components:{NcActionButton:y.A,NcActionLink:ft.A,NcActionText:At.A,NcAvatar:p.A,SharingEntrySimple:M},mixins:[lt],props:{share:{type:he,required:!0}},computed:{viaFileTargetUrl(){return $(this.share.viaFileid)},viaFolderName(){return(0,gt.P8)(this.share.viaPath)}}};var _t=s(50618),yt={};yt.styleTagTransform=O(),yt.setAttributes=L(),yt.insert=T().bind(null,"head"),yt.domAPI=I(),yt.insertStyleElement=B(),E()(_t.A,yt),_t.A&&_t.A.locals&&_t.A.locals;var wt=(0,v.A)(mt,function(){var e=this,t=e._self._c;return t("SharingEntrySimple",{key:e.share.id,staticClass:"sharing-entry__inherited",attrs:{title:e.share.shareWithDisplayName},scopedSlots:e._u([{key:"avatar",fn:function(){return[t("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{user:e.share.shareWith,"display-name":e.share.shareWithDisplayName}})]},proxy:!0}])},[e._v(" "),t("NcActionText",{attrs:{icon:"icon-user"}},[e._v("\n\t\t"+e._s(e.t("files_sharing","Added by {initiator}",{initiator:e.share.ownerDisplayName}))+"\n\t")]),e._v(" "),e.share.viaPath&&e.share.viaFileid?t("NcActionLink",{attrs:{icon:"icon-folder",href:e.viaFileTargetUrl}},[e._v("\n\t\t"+e._s(e.t("files_sharing","Via “{folder}”",{folder:e.viaFolderName}))+"\n\t")]):e._e(),e._v(" "),e.share.canDelete?t("NcActionButton",{attrs:{icon:"icon-close"},on:{click:function(t){return t.preventDefault(),e.onDelete.apply(null,arguments)}}},[e._v("\n\t\t"+e._s(e.t("files_sharing","Unshare"))+"\n\t")]):e._e()],1)},[],!1,null,"731a9650",null);const Ct=wt.exports,vt={name:"SharingInherited",components:{NcActionButton:y.A,SharingEntryInherited:Ct,SharingEntrySimple:M},props:{fileInfo:{type:Object,required:!0}},data:()=>({loaded:!1,loading:!1,showInheritedShares:!1,shares:[]}),computed:{showInheritedSharesIcon(){return this.loading?"icon-loading-small":this.showInheritedShares?"icon-triangle-n":"icon-triangle-s"},mainTitle:()=>t("files_sharing","Others with access"),subTitle(){return this.showInheritedShares&&0===this.shares.length?t("files_sharing","No other accounts with access found"):""},toggleTooltip(){return"dir"===this.fileInfo.type?t("files_sharing","Toggle list of others with access to this directory"):t("files_sharing","Toggle list of others with access to this file")},fullPath(){return`${this.fileInfo.path}/${this.fileInfo.name}`.replace("//","/")}},watch:{fileInfo(){this.resetState()}},methods:{toggleInheritedShares(){this.showInheritedShares=!this.showInheritedShares,this.showInheritedShares?this.fetchInheritedShares():this.resetState()},async fetchInheritedShares(){this.loading=!0;try{const e=(0,d.KT)("apps/files_sharing/api/v1/shares/inherited?format=json&path={path}",{path:this.fullPath}),t=await r.Ay.get(e);this.shares=t.data.ocs.data.map(e=>new he(e)).sort((e,t)=>t.createdTime-e.createdTime),this.loaded=!0}catch{OC.Notification.showTemporary(t("files_sharing","Unable to fetch inherited shares"),{type:"error"})}finally{this.loading=!1}},resetState(){this.loaded=!1,this.loading=!1,this.showInheritedShares=!1,this.shares=[]},removeShare(e){const t=this.shares.findIndex(t=>t===e);this.shares.splice(t,1)}}};var bt=s(27920),xt={};xt.styleTagTransform=O(),xt.setAttributes=L(),xt.insert=T().bind(null,"head"),xt.domAPI=I(),xt.insertStyleElement=B(),E()(bt.A,xt),bt.A&&bt.A.locals&&bt.A.locals;var St=(0,v.A)(vt,function(){var e=this,t=e._self._c;return t("ul",{attrs:{id:"sharing-inherited-shares"}},[t("SharingEntrySimple",{staticClass:"sharing-entry__inherited",attrs:{title:e.mainTitle,subtitle:e.subTitle,"aria-expanded":e.showInheritedShares},scopedSlots:e._u([{key:"avatar",fn:function(){return[t("div",{staticClass:"avatar-shared icon-more-white"})]},proxy:!0}])},[e._v(" "),t("NcActionButton",{attrs:{icon:e.showInheritedSharesIcon,"aria-label":e.toggleTooltip,title:e.toggleTooltip},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.toggleInheritedShares.apply(null,arguments)}}})],1),e._v(" "),e._l(e.shares,function(i){return t("SharingEntryInherited",{key:i.id,attrs:{"file-info":e.fileInfo,share:i},on:{"remove:share":e.removeShare}})})],2)},[],!1,null,"cedf3238",null);const kt=St.exports;var Et=s(17816),Dt=s.n(Et),It=s(9165),Pt=s(78928),Tt=s(44131),Nt=s(15502),Lt=s(94219),Rt=s(6695);const Bt={name:"CalendarBlankOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Vt=(0,v.A)(Bt,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon calendar-blank-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19 3H18V1H16V3H8V1H6V3H5C3.89 3 3 3.9 3 5V19C3 20.11 3.9 21 5 21H19C20.11 21 21 20.11 21 19V5C21 3.9 20.11 3 19 3M19 19H5V9H19V19M19 7H5V5H19V7Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,Ot={name:"CheckBoldIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Ft=(0,v.A)(Ot,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon check-bold-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,qt={name:"ExclamationIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Mt=(0,v.A)(qt,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon exclamation-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M 11,4L 13,4L 13,15L 11,15L 11,4 Z M 13,18L 13,20L 11,20L 11,18L 13,18 Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,Ht={name:"LockOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},$t=(0,v.A)(Ht,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon lock-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,17C10.89,17 10,16.1 10,15C10,13.89 10.89,13 12,13A2,2 0 0,1 14,15A2,2 0 0,1 12,17M18,20V10H6V20H18M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6C4.89,22 4,21.1 4,20V10C4,8.89 4.89,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,Ut={name:"PlusIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Wt=(0,v.A)(Ut,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon plus-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,zt={name:"QrcodeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},jt=(0,v.A)(zt,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon qrcode-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,11H5V13H3V11M11,5H13V9H11V5M9,11H13V15H11V13H9V11M15,11H17V13H19V11H21V13H19V15H21V19H19V21H17V19H13V21H11V17H15V15H17V13H15V11M19,19V15H17V19H19M15,3H21V9H15V3M17,5V7H19V5H17M3,3H9V9H3V3M5,5V7H7V5H5M3,15H9V21H3V15M5,17V19H7V17H5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,Gt={name:"TuneIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Qt=(0,v.A)(Gt,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon tune-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports;var Yt=s(4604);const Zt={name:"ClockOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Jt=(0,v.A)(Zt,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon clock-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,Kt={name:"ShareExpiryTime",components:{NcButton:g.A,NcPopover:A.A,NcDateTime:Yt.A,ClockIcon:Jt},props:{share:{type:Object,required:!0}},computed:{expiryTime(){return this.share?.expireDate?new Date(this.share.expireDate).getTime():null},timeFormat:()=>({dateStyle:"full",timeStyle:"short"})}};var Xt=s(5016),ei={};ei.styleTagTransform=O(),ei.setAttributes=L(),ei.insert=T().bind(null,"head"),ei.domAPI=I(),ei.insertStyleElement=B(),E()(Xt.A,ei),Xt.A&&Xt.A.locals&&Xt.A.locals;const ti=(0,v.A)(Kt,function(){var e=this,t=e._self._c;return t("div",{staticClass:"share-expiry-time"},[t("NcPopover",{attrs:{"popup-role":"dialog"},scopedSlots:e._u([{key:"trigger",fn:function(){return[e.expiryTime?t("NcButton",{staticClass:"hint-icon",attrs:{variant:"tertiary","aria-label":e.t("files_sharing","Share expiration: {date}",{date:new Date(e.expiryTime).toLocaleString()})},scopedSlots:e._u([{key:"icon",fn:function(){return[t("ClockIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,3754271979)}):e._e()]},proxy:!0}])},[e._v(" "),t("h3",{staticClass:"hint-heading"},[e._v("\n\t\t\t"+e._s(e.t("files_sharing","Share Expiration"))+"\n\t\t")]),e._v(" "),e.expiryTime?t("p",{staticClass:"hint-body"},[t("NcDateTime",{attrs:{timestamp:e.expiryTime,format:e.timeFormat,"relative-time":!1}}),e._v(" ("),t("NcDateTime",{attrs:{timestamp:e.expiryTime}}),e._v(")\n\t\t")],1):e._e()])],1)},[],!1,null,"c9199db0",null).exports,ii={name:"EyeOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},si=(0,v.A)(ii,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon eye-outline-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,ai={name:"TriangleSmallDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},ni={name:"SharingEntryQuickShareSelect",components:{DropdownIcon:(0,v.A)(ai,function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon triangle-small-down-icon",attrs:{"aria-hidden":e.title?null:"true","aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M8 9H16L12 16"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])},[],!1,null,null,null).exports,NcActions:x.A,NcActionButton:y.A},mixins:[lt,de],props:{share:{type:Object,required:!0}},emits:["open-sharing-details"],data:()=>({selectedOption:""}),computed:{ariaLabel(){return t("files_sharing",'Quick share options, the current selected is "{selectedOption}"',{selectedOption:this.selectedOption})},canViewText:()=>t("files_sharing","View only"),canEditText:()=>t("files_sharing","Can edit"),fileDropText:()=>t("files_sharing","File request"),customPermissionsText:()=>t("files_sharing","Custom permissions"),preSelectedOption(){const e=-17&this.share.permissions;return e===ee.READ_ONLY?this.canViewText:e===ee.ALL||e===ee.ALL_FILE?this.canEditText:e===ee.FILE_DROP?this.fileDropText:this.customPermissionsText},options(){const e=[{label:this.canViewText,icon:si},{label:this.canEditText,icon:Ge.A}];return this.supportsFileDrop&&e.push({label:this.fileDropText,icon:Ke}),e.push({label:this.customPermissionsText,icon:Qt}),e},supportsFileDrop(){if(this.isFolder&&this.config.isPublicUploadEnabled){const e=this.share.type??this.share.shareType;return[u.I.Link,u.I.Email].includes(e)}return!1},dropDownPermissionValue(){switch(this.selectedOption){case this.canEditText:return this.isFolder?ee.ALL:ee.ALL_FILE;case this.fileDropText:return ee.FILE_DROP;case this.customPermissionsText:return"custom";case this.canViewText:default:return ee.READ_ONLY}}},created(){this.selectedOption=this.preSelectedOption},mounted(){(0,ue.B1)("update:share",e=>{e.id===this.share.id&&(this.share.permissions=e.permissions,this.selectedOption=this.preSelectedOption)})},unmounted(){(0,ue.al)("update:share")},methods:{selectOption(e){this.selectedOption=e,e===this.customPermissionsText?this.$emit("open-sharing-details"):(this.share.permissions=this.dropDownPermissionValue,this.queueUpdate("permissions"),this.$refs.quickShareActions.$refs.menuButton.$el.focus())}}},ri=ni;var oi=s(24708),li={};li.styleTagTransform=O(),li.setAttributes=L(),li.insert=T().bind(null,"head"),li.domAPI=I(),li.insertStyleElement=B(),E()(oi.A,li),oi.A&&oi.A.locals&&oi.A.locals;const hi=(0,v.A)(ri,function(){var e=this,t=e._self._c;return t("NcActions",{ref:"quickShareActions",staticClass:"share-select",attrs:{"menu-name":e.selectedOption,"aria-label":e.ariaLabel,variant:"tertiary-no-background",disabled:!e.share.canEdit,"force-name":""},scopedSlots:e._u([{key:"icon",fn:function(){return[t("DropdownIcon",{attrs:{size:15}})]},proxy:!0}])},[e._v(" "),e._l(e.options,function(i){return t("NcActionButton",{key:i.label,attrs:{type:"radio","model-value":i.label===e.selectedOption,"close-after-click":""},on:{click:function(t){return e.selectOption(i.label)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t(i.icon,{tag:"component"})]},proxy:!0}],null,!0)},[e._v("\n\t\t"+e._s(i.label)+"\n\t")])})],2)},[],!1,null,"11ecc4a6",null).exports,ci={name:"SharingEntryLink",components:{NcActions:x.A,NcActionButton:y.A,NcActionCheckbox:Pt.N,NcActionInput:Tt.A,NcActionText:At.A,NcActionSeparator:Nt.A,NcAvatar:p.A,NcDialog:Lt.A,NcIconSvgWrapper:Rt.A,NcLoadingIcon:Ie.A,VueQrcode:Dt(),Tune:Qt,IconCalendarBlank:Vt,IconQr:jt,ErrorIcon:Mt,LockIcon:$t,CheckIcon:Ft,CloseIcon:Fe.A,PlusIcon:Wt,SharingEntryQuickShareSelect:hi,ShareExpiryTime:ti,SidebarTabExternalActionLegacy:it},mixins:[lt,de],props:{canReshare:{type:Boolean,default:!0},index:{type:Number,default:null}},setup:()=>({mdiCheck:It.Tfj,mdiContentCopy:It.$BT}),data:()=>({shareCreationComplete:!1,copySuccess:!1,defaultExpirationDateEnabled:!1,pending:!1,ExternalShareActions:OCA.Sharing.ExternalShareActions.state,externalShareActions:[...window._nc_files_sharing_sidebar_inline_actions?.values()??[]],showQRCode:!1}),computed:{title(){const e={escape:!1};if(this.share&&this.share.id){if(!this.isShareOwner&&this.share.ownerDisplayName)return this.isEmailShareType?(0,Se.t)("files_sharing","{shareWith} by {initiator}",{shareWith:this.share.shareWith,initiator:this.share.ownerDisplayName},e):(0,Se.t)("files_sharing","Shared via link by {initiator}",{initiator:this.share.ownerDisplayName},e);if(this.share.label&&""!==this.share.label.trim())return this.isEmailShareType?this.isFileRequest?(0,Se.t)("files_sharing","File request ({label})",{label:this.share.label.trim()},e):(0,Se.t)("files_sharing","Mail share ({label})",{label:this.share.label.trim()},e):(0,Se.t)("files_sharing","Share link ({label})",{label:this.share.label.trim()},e);if(this.isEmailShareType)return this.share.shareWith&&""!==this.share.shareWith.trim()?this.share.shareWith:this.isFileRequest?(0,Se.t)("files_sharing","File request"):(0,Se.t)("files_sharing","Mail share");if(null===this.index)return(0,Se.t)("files_sharing","Share link")}return this.index>=1?(0,Se.t)("files_sharing","Share link ({index})",{index:this.index}):(0,Se.t)("files_sharing","Create public link")},subtitle(){return this.isEmailShareType&&this.title!==this.share.shareWith?this.share.shareWith:null},passwordExpirationTime(){if(null===this.share.passwordExpirationTime)return null;const e=(0,c.A)(this.share.passwordExpirationTime);return!(e.diff((0,c.A)())<0)&&e.fromNow()},isTalkEnabled:()=>void 0!==OC.appswebroots.spreed,isPasswordProtectedByTalkAvailable(){return this.isPasswordProtected&&this.isTalkEnabled},isPasswordProtectedByTalk:{get(){return this.share.sendPasswordByTalk},async set(e){this.share.sendPasswordByTalk=e}},isEmailShareType(){return!!this.share&&this.share.type===u.I.Email},canTogglePasswordProtectedByTalkAvailable(){return!(!this.isPasswordProtected||this.isEmailShareType&&!this.hasUnsavedPassword)},pendingDataIsMissing(){return this.pendingPassword||this.pendingEnforcedPassword||this.pendingDefaultExpirationDate||this.pendingEnforcedExpirationDate},pendingPassword(){return this.config.enableLinkPasswordByDefault&&this.isPendingShare},pendingEnforcedPassword(){return this.config.enforcePasswordForPublicLink&&this.isPendingShare},pendingEnforcedExpirationDate(){return this.config.isDefaultExpireDateEnforced&&this.isPendingShare},pendingDefaultExpirationDate(){return(this.config.defaultExpirationDate instanceof Date||!isNaN(new Date(this.config.defaultExpirationDate).getTime()))&&this.isPendingShare},isPendingShare(){return!(!this.share||this.share.id)},sharePolicyHasEnforcedProperties(){return this.config.enforcePasswordForPublicLink||this.config.isDefaultExpireDateEnforced},enforcedPropertiesMissing(){if(!this.sharePolicyHasEnforcedProperties)return!1;if(!this.share)return!0;if(this.share.id)return!0;const e=this.config.enforcePasswordForPublicLink&&!this.share.newPassword,t=this.config.isDefaultExpireDateEnforced&&!this.share.expireDate;return e||t},hasUnsavedPassword(){return void 0!==this.share.newPassword},shareLink(){return(0,d.Jv)("/s/{token}",{token:this.share.token},{baseURL:(0,d.$_)()})},actionsTooltip(){return(0,Se.t)("files_sharing",'Actions for "{title}"',{title:this.title})},copyLinkLabel(){return(0,Se.t)("files_sharing",'Copy public link of "{title}"',{title:this.title})},externalLegacyShareActions(){return H.A.error("external legacy actions",{ExternalShareActions:this.ExternalShareActions}),this.ExternalShareActions.actions.filter(e=>(e.shareType.includes(u.I.Link)||e.shareType.includes(u.I.Email))&&!e.advanced)},sortedExternalShareActions(){return this.externalShareActions.filter(e=>e.enabled((0,a.ux)(this.share),(0,a.ux)(this.fileInfo.node))).sort((e,t)=>e.order-t.order)},isPasswordPolicyEnabled(){return"object"==typeof this.config.passwordPolicy},canChangeHideDownload(){return this.fileInfo.shareAttributes.some(e=>"permissions"===e.scope&&"download"===e.key&&!1===e.value)},isFileRequest(){return this.share.isFileRequest}},mounted(){this.defaultExpirationDateEnabled=this.config.defaultExpirationDate instanceof Date,this.share&&this.isNewShare&&(this.share.expireDate=this.defaultExpirationDateEnabled?this.formatDateToString(this.config.defaultExpirationDate):"")},methods:{shareRequiresReview(e){return!e&&(this.defaultExpirationDateEnabled||this.config.enableLinkPasswordByDefault)},async onNewLinkShare(e=!1){if(H.A.debug("onNewLinkShare called (with this.share)",this.share),this.loading)return;const t={share_type:u.I.Link};if(this.config.isDefaultExpireDateEnforced&&(t.expiration=this.formatDateToString(this.config.defaultExpirationDate)),H.A.debug("Missing required properties?",this.enforcedPropertiesMissing),this.sharePolicyHasEnforcedProperties&&this.enforcedPropertiesMissing||this.shareRequiresReview(!0===e)){this.pending=!0,this.shareCreationComplete=!1,H.A.info("Share policy requires a review or has mandated properties (password, expirationDate)...");const e=new he(t);(this.config.enableLinkPasswordByDefault||this.config.enforcePasswordForPublicLink)&&this.$set(e,"newPassword",await ot(!0));const i=await new Promise(t=>{this.$emit("add:share",e,t)});this.open=!1,this.pending=!1,i.open=!0}else{if(this.share&&!this.share.id){if(this.checkShare(this.share)){try{H.A.info("Sending existing share to server",this.share),await this.pushNewLinkShare(this.share,!0),this.shareCreationComplete=!0,H.A.info("Share created on server",this.share)}catch(e){return this.pending=!1,H.A.error("Error creating share",e),!1}return!0}return this.open=!0,(0,_.Qg)((0,Se.t)("files_sharing","Error, please enter proper password and/or expiration date")),!1}const e=new he(t);await this.pushNewLinkShare(e),this.shareCreationComplete=!0}},async pushNewLinkShare(e,t){try{if(this.loading)return!0;this.loading=!0,this.errors={};const i={path:(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/"),shareType:u.I.Link,password:e.newPassword,expireDate:e.expireDate??"",attributes:JSON.stringify(this.fileInfo.shareAttributes)};H.A.debug("Creating link share with options",{options:i});const s=await this.createShare(i);let a;this.open=!1,this.shareCreationComplete=!0,H.A.debug("Link share created",{newShare:s}),a=t?await new Promise(e=>{this.$emit("update:share",s,e)}):await new Promise(e=>{this.$emit("add:share",s,e)}),await this.getNode(),(0,ue.Ic)("files:node:updated",this.node),this.config.enforcePasswordForPublicLink||a.copyLink(),(0,_.Te)((0,Se.t)("files_sharing","Link share created"))}catch(e){const t=e?.response?.data?.ocs?.meta?.message;if(!t)return(0,_.Qg)((0,Se.t)("files_sharing","Error while creating the share")),void H.A.error("Error while creating the share",{error:e});throw t.match(/password/i)?this.onSyncError("password",t):t.match(/date/i)?this.onSyncError("expireDate",t):this.onSyncError("pending",t),e}finally{this.loading=!1,this.shareCreationComplete=!0}},async copyLink(){try{await navigator.clipboard.writeText(this.shareLink),(0,_.Te)((0,Se.t)("files_sharing","Link copied")),this.$refs.copyButton.$el.focus()}catch(e){H.A.debug("Failed to automatically copy share link",{error:e}),window.prompt((0,Se.t)("files_sharing","Your browser does not support copying, please copy the link manually:"),this.shareLink)}finally{this.copySuccess=!0,setTimeout(()=>{this.copySuccess=!1},4e3)}},onPasswordChange(e){this.$set(this.share,"newPassword",e)},onPasswordDisable(){this.$set(this.share,"newPassword",""),this.share.id&&this.queueUpdate("password")},onPasswordSubmit(){this.hasUnsavedPassword&&(this.share.newPassword=this.share.newPassword.trim(),this.queueUpdate("password"))},onPasswordProtectedByTalkChange(){this.hasUnsavedPassword&&(this.share.newPassword=this.share.newPassword.trim()),this.queueUpdate("sendPasswordByTalk","password")},onMenuClose(){this.onPasswordSubmit(),this.onNoteSubmit()},onExpirationDateToggleUpdate(e){this.share.expireDate=e?this.formatDateToString(this.config.defaultExpirationDate):""},expirationDateChanged(e){const t=e?.target?.value,i=!!t&&!isNaN(new Date(t).getTime());this.defaultExpirationDateEnabled=i},onCancel(){this.shareCreationComplete||this.$emit("remove:share",this.share)}}},di=ci;var ui=s(12231),pi={};pi.styleTagTransform=O(),pi.setAttributes=L(),pi.insert=T().bind(null,"head"),pi.domAPI=I(),pi.insertStyleElement=B(),E()(ui.A,pi),ui.A&&ui.A.locals&&ui.A.locals;var gi=(0,v.A)(di,function(){var e=this,t=e._self._c;return t("li",{staticClass:"sharing-entry sharing-entry__link",class:{"sharing-entry--share":e.share}},[t("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":!0,"icon-class":e.isEmailShareType?"avatar-link-share icon-mail-white":"avatar-link-share icon-public-white"}}),e._v(" "),t("div",{staticClass:"sharing-entry__summary"},[t("div",{staticClass:"sharing-entry__desc"},[t("span",{staticClass:"sharing-entry__title",attrs:{title:e.title}},[e._v("\n\t\t\t\t"+e._s(e.title)+"\n\t\t\t")]),e._v(" "),e.subtitle?t("p",[e._v("\n\t\t\t\t"+e._s(e.subtitle)+"\n\t\t\t")]):e._e(),e._v(" "),e.share&&void 0!==e.share.permissions?t("SharingEntryQuickShareSelect",{attrs:{share:e.share,"file-info":e.fileInfo},on:{"open-sharing-details":function(t){return e.openShareDetailsForCustomSettings(e.share)}}}):e._e()],1),e._v(" "),t("div",{staticClass:"sharing-entry__actions"},[e.share&&e.share.expireDate?t("ShareExpiryTime",{attrs:{share:e.share}}):e._e(),e._v(" "),t("div",[e.share&&(!e.isEmailShareType||e.isFileRequest)&&e.share.token?t("NcActions",{ref:"copyButton",staticClass:"sharing-entry__copy"},[t("NcActionButton",{attrs:{"aria-label":e.copyLinkLabel,title:e.copySuccess?e.t("files_sharing","Successfully copied public link"):void 0,href:e.shareLink},on:{click:function(t){return t.preventDefault(),e.copyLink.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("NcIconSvgWrapper",{staticClass:"sharing-entry__copy-icon",class:{"sharing-entry__copy-icon--success":e.copySuccess},attrs:{path:e.copySuccess?e.mdiCheck:e.mdiContentCopy}})]},proxy:!0}],null,!1,1728815133)})],1):e._e()],1)],1)]),e._v(" "),!e.pending&&e.pendingDataIsMissing?t("NcActions",{staticClass:"sharing-entry__actions",attrs:{"aria-label":e.actionsTooltip,"menu-align":"right",open:e.open},on:{"update:open":function(t){e.open=t},close:e.onCancel}},[e.errors.pending?t("NcActionText",{staticClass:"error",scopedSlots:e._u([{key:"icon",fn:function(){return[t("ErrorIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,1966124155)},[e._v("\n\t\t\t"+e._s(e.errors.pending)+"\n\t\t")]):t("NcActionText",{attrs:{icon:"icon-info"}},[e._v("\n\t\t\t"+e._s(e.t("files_sharing","Please enter the following required information before creating the share"))+"\n\t\t")]),e._v(" "),e.pendingPassword?t("NcActionCheckbox",{staticClass:"share-link-password-checkbox",attrs:{disabled:e.config.enforcePasswordForPublicLink||e.saving},on:{uncheck:e.onPasswordDisable},model:{value:e.isPasswordProtected,callback:function(t){e.isPasswordProtected=t},expression:"isPasswordProtected"}},[e._v("\n\t\t\t"+e._s(e.config.enforcePasswordForPublicLink?e.t("files_sharing","Password protection (enforced)"):e.t("files_sharing","Password protection"))+"\n\t\t")]):e._e(),e._v(" "),e.pendingEnforcedPassword||e.isPasswordProtected?t("NcActionInput",{staticClass:"share-link-password",attrs:{label:e.t("files_sharing","Enter a password"),disabled:e.saving,required:e.config.enableLinkPasswordByDefault||e.config.enforcePasswordForPublicLink,minlength:e.isPasswordPolicyEnabled&&e.config.passwordPolicy.minLength,autocomplete:"new-password"},on:{submit:function(t){return e.onNewLinkShare(!0)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("LockIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2056568168),model:{value:e.share.newPassword,callback:function(t){e.$set(e.share,"newPassword",t)},expression:"share.newPassword"}}):e._e(),e._v(" "),e.pendingDefaultExpirationDate?t("NcActionCheckbox",{staticClass:"share-link-expiration-date-checkbox",attrs:{disabled:e.pendingEnforcedExpirationDate||e.saving},on:{"update:model-value":e.onExpirationDateToggleUpdate},model:{value:e.defaultExpirationDateEnabled,callback:function(t){e.defaultExpirationDateEnabled=t},expression:"defaultExpirationDateEnabled"}},[e._v("\n\t\t\t"+e._s(e.config.isDefaultExpireDateEnforced?e.t("files_sharing","Enable link expiration (enforced)"):e.t("files_sharing","Enable link expiration"))+"\n\t\t")]):e._e(),e._v(" "),(e.pendingDefaultExpirationDate||e.pendingEnforcedExpirationDate)&&e.defaultExpirationDateEnabled?t("NcActionInput",{staticClass:"share-link-expire-date",attrs:{"data-cy-files-sharing-expiration-date-input":"",label:e.pendingEnforcedExpirationDate?e.t("files_sharing","Enter expiration date (enforced)"):e.t("files_sharing","Enter expiration date"),disabled:e.saving,"is-native-picker":!0,"hide-label":!0,"model-value":new Date(e.share.expireDate),type:"date",min:e.dateTomorrow,max:e.maxExpirationDateEnforced},on:{"update:model-value":e.onExpirationChange,change:e.expirationDateChanged},scopedSlots:e._u([{key:"icon",fn:function(){return[t("IconCalendarBlank",{attrs:{size:20}})]},proxy:!0}],null,!1,3418578971)}):e._e(),e._v(" "),t("NcActionButton",{attrs:{disabled:e.pendingEnforcedPassword&&!e.share.newPassword},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.onNewLinkShare(!0)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("CheckIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2630571749)},[e._v("\n\t\t\t"+e._s(e.t("files_sharing","Create share"))+"\n\t\t")]),e._v(" "),t("NcActionButton",{on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.onCancel.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("CloseIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2428343285)},[e._v("\n\t\t\t"+e._s(e.t("files_sharing","Cancel"))+"\n\t\t")])],1):e.loading?t("NcLoadingIcon",{staticClass:"sharing-entry__loading"}):t("NcActions",{staticClass:"sharing-entry__actions",attrs:{"aria-label":e.actionsTooltip,"menu-align":"right",open:e.open},on:{"update:open":function(t){e.open=t},close:e.onMenuClose}},[e.share?[e.share.canEdit&&e.canReshare?[t("NcActionButton",{attrs:{disabled:e.saving,"close-after-click":!0},on:{click:function(t){return t.preventDefault(),e.openSharingDetails.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Tune",{attrs:{size:20}})]},proxy:!0}],null,!1,1300586850)},[e._v("\n\t\t\t\t\t"+e._s(e.t("files_sharing","Customize link"))+"\n\t\t\t\t")])]:e._e(),e._v(" "),t("NcActionButton",{attrs:{"close-after-click":!0},on:{click:function(t){t.preventDefault(),e.showQRCode=!0}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("IconQr",{attrs:{size:20}})]},proxy:!0}],null,!1,1082198240)},[e._v("\n\t\t\t\t"+e._s(e.t("files_sharing","Generate QR code"))+"\n\t\t\t")]),e._v(" "),t("NcActionSeparator"),e._v(" "),e._l(e.sortedExternalShareActions,function(i){return t("NcActionButton",{key:i.id,on:{click:function(t){return i.exec(e.share,e.fileInfo.node)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("NcIconSvgWrapper",{attrs:{svg:i.iconSvg}})]},proxy:!0}],null,!0)},[e._v("\n\t\t\t\t"+e._s(i.label(e.share,e.fileInfo.node))+"\n\t\t\t")])}),e._v(" "),e._l(e.externalLegacyShareActions,function(i){return t("SidebarTabExternalActionLegacy",{key:i.id,attrs:{id:i.id,action:i,"file-info":e.fileInfo,share:e.share}})}),e._v(" "),!e.isEmailShareType&&e.canReshare?t("NcActionButton",{staticClass:"new-share-link",on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.onNewLinkShare.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("PlusIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2953566425)},[e._v("\n\t\t\t\t"+e._s(e.t("files_sharing","Add another link"))+"\n\t\t\t")]):e._e(),e._v(" "),e.share.canDelete?t("NcActionButton",{attrs:{disabled:e.saving},on:{click:function(t){return t.preventDefault(),e.onDelete.apply(null,arguments)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("CloseIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,2428343285)},[e._v("\n\t\t\t\t"+e._s(e.t("files_sharing","Unshare"))+"\n\t\t\t")]):e._e()]:e.canReshare?t("NcActionButton",{staticClass:"new-share-link",attrs:{title:e.t("files_sharing","Create a new share link"),"aria-label":e.t("files_sharing","Create a new share link"),icon:e.loading?"icon-loading-small":"icon-add"},on:{click:function(t){return t.preventDefault(),t.stopPropagation(),e.onNewLinkShare.apply(null,arguments)}}}):e._e()],2),e._v(" "),e.showQRCode?t("NcDialog",{attrs:{size:"normal",open:e.showQRCode,name:e.title,"close-on-click-outside":!0},on:{"update:open":function(t){e.showQRCode=t},close:function(t){e.showQRCode=!1}}},[t("div",{staticClass:"qr-code-dialog"},[t("VueQrcode",{staticClass:"qr-code-dialog__img",attrs:{tag:"img",value:e.shareLink}})],1)]):e._e()],1)},[],!1,null,"4ca4172c",null);const fi={name:"SharingLinkList",components:{SharingEntryLink:gi.exports},mixins:[de],props:{fileInfo:{type:Object,required:!0},shares:{type:Array,required:!0},canReshare:{type:Boolean,required:!0}},data:()=>({canLinkShare:(0,o.F)().files_sharing.public.enabled}),computed:{hasLinkShares(){return this.shares.filter(e=>e.type===u.I.Link).length>0},hasShares(){return this.shares.length>0}},methods:{t:Se.t,addShare(e,t){this.shares.push(e),this.awaitForShare(e,t)},awaitForShare(e,t){this.$nextTick(()=>{const i=this.$children.find(t=>t.share===e);i&&t(i)})},removeShare(e){const t=this.shares.findIndex(t=>t===e);this.shares.splice(t,1)}}};var Ai=(0,v.A)(fi,function(){var e=this,t=e._self._c;return e.canLinkShare?t("ul",{staticClass:"sharing-link-list",attrs:{"aria-label":e.t("files_sharing","Link shares")}},[e.hasShares?e._l(e.shares,function(i,s){return t("SharingEntryLink",{key:i.id,attrs:{index:e.shares.length>1?s+1:null,"can-reshare":e.canReshare,share:e.shares[s],"file-info":e.fileInfo},on:{"update:share":[function(t){return e.$set(e.shares,s,t)},function(t){return e.awaitForShare(...arguments)}],"add:share":function(t){return e.addShare(...arguments)},"remove:share":e.removeShare,"open-sharing-details":function(t){return e.openSharingDetails(i)}}})}):e._e(),e._v(" "),!e.hasLinkShares&&e.canReshare?t("SharingEntryLink",{attrs:{"can-reshare":e.canReshare,"file-info":e.fileInfo},on:{"add:share":e.addShare}}):e._e()],2):e._e()},[],!1,null,null,null);const mi=Ai.exports,_i={name:"SharingEntry",components:{NcButton:g.A,NcAvatar:p.A,DotsHorizontalIcon:qe.A,NcSelect:Q.default,ShareExpiryTime:ti,SharingEntryQuickShareSelect:hi},mixins:[lt,de],computed:{title(){let e=this.share.shareWithDisplayName;const i=this.config.showFederatedSharesAsInternal||this.share.isTrustedServer&&this.config.showFederatedSharesToTrustedServersAsInternal;return this.share.type===u.I.Group||this.share.type===u.I.RemoteGroup&&i?e+=` (${t("files_sharing","group")})`:this.share.type===u.I.Room?e+=` (${t("files_sharing","conversation")})`:this.share.type!==u.I.Remote||i?this.share.type===u.I.RemoteGroup?e+=` (${t("files_sharing","remote group")})`:this.share.type===u.I.Guest&&(e+=` (${t("files_sharing","guest")})`):e+=` (${t("files_sharing","remote")})`,!this.isShareOwner&&this.share.ownerDisplayName&&(e+=" "+t("files_sharing","by {initiator}",{initiator:this.share.ownerDisplayName})),e},tooltip(){if(this.share.owner!==this.share.uidFileOwner){const e={user:this.share.shareWithDisplayName,owner:this.share.ownerDisplayName};return this.share.type===u.I.Group?t("files_sharing","Shared with the group {user} by {owner}",e):this.share.type===u.I.Room?t("files_sharing","Shared with the conversation {user} by {owner}",e):t("files_sharing","Shared with {user} by {owner}",e)}return null},hasStatus(){return this.share.type===u.I.User&&"object"==typeof this.share.status&&!Array.isArray(this.share.status)}},methods:{onMenuClose(){this.onNoteSubmit()}}};var yi=s(10322),wi={};wi.styleTagTransform=O(),wi.setAttributes=L(),wi.insert=T().bind(null,"head"),wi.domAPI=I(),wi.insertStyleElement=B(),E()(yi.A,wi),yi.A&&yi.A.locals&&yi.A.locals;const Ci={name:"SharingList",components:{SharingEntry:(0,v.A)(_i,function(){var e=this,t=e._self._c;return t("li",{staticClass:"sharing-entry"},[t("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{"is-no-user":e.share.type!==e.ShareType.User,user:e.share.shareWith,"display-name":e.share.shareWithDisplayName,"menu-position":"left",url:e.share.shareWithAvatar}}),e._v(" "),t("div",{staticClass:"sharing-entry__summary"},[t(e.share.shareWithLink?"a":"div",{tag:"component",staticClass:"sharing-entry__summary__desc",attrs:{title:e.tooltip,"aria-label":e.tooltip,href:e.share.shareWithLink}},[t("span",[e._v(e._s(e.title)+"\n\t\t\t\t"),e.isUnique?e._e():t("span",{staticClass:"sharing-entry__summary__desc-unique"},[e._v("\n\t\t\t\t\t("+e._s(e.share.shareWithDisplayNameUnique)+")\n\t\t\t\t")]),e._v(" "),e.hasStatus&&e.share.status.message?t("small",[e._v("("+e._s(e.share.status.message)+")")]):e._e()])]),e._v(" "),t("SharingEntryQuickShareSelect",{attrs:{share:e.share,"file-info":e.fileInfo},on:{"open-sharing-details":function(t){return e.openShareDetailsForCustomSettings(e.share)}}})],1),e._v(" "),e.share&&e.share.expireDate?t("ShareExpiryTime",{attrs:{share:e.share}}):e._e(),e._v(" "),e.share.canEdit?t("NcButton",{staticClass:"sharing-entry__action",attrs:{"data-cy-files-sharing-share-actions":"","aria-label":e.t("files_sharing","Open Sharing Details"),variant:"tertiary"},on:{click:function(t){return e.openSharingDetails(e.share)}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("DotsHorizontalIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,1700783217)}):e._e()],1)},[],!1,null,"469e5e80",null).exports},mixins:[de],props:{fileInfo:{type:Object,required:!0},shares:{type:Array,required:!0}},setup:()=>({t:Se.t}),computed:{hasShares(){return 0===this.shares.length},isUnique(){return e=>[...this.shares].filter(t=>e.type===u.I.User&&e.shareWithDisplayName===t.shareWithDisplayName).length<=1}}},vi=(0,v.A)(Ci,function(){var e=this,t=e._self._c;return t("ul",{staticClass:"sharing-sharee-list",attrs:{"aria-label":e.t("files_sharing","Shares")}},e._l(e.shares,function(i){return t("SharingEntry",{key:i.id,attrs:{"file-info":e.fileInfo,share:i,"is-unique":e.isUnique(i)},on:{"open-sharing-details":function(t){return e.openSharingDetails(i)}}})}),1)},[],!1,null,null,null).exports,bi=window.OC.theme.productName,xi={name:"SharingTab",components:{InfoIcon:m.A,NcAvatar:p.A,NcButton:g.A,NcCollectionList:f.N,NcPopover:A.A,SharingEntryInternal:j,SharingEntrySimple:M,SharingInherited:kt,SharingInput:_e,SharingLinkList:mi,SharingList:vi,SharingDetailsTab:pt,SidebarTabExternalSection:we,SidebarTabExternalSectionLegacy:xe},mixins:[de],props:{fileInfo:{type:Object,required:!0}},data:()=>({config:new ce,deleteEvent:null,error:"",expirationInterval:null,loading:!0,reshare:null,sharedWithMe:{},shares:[],linkShares:[],externalShares:[],legacySections:OCA.Sharing.ShareTabSections.getSections(),sections:[...window._nc_files_sharing_sidebar_sections?.values()??[]],projectsEnabled:(0,h.C)("core","projects_enabled",!1),showSharingDetailsView:!1,shareDetailsData:{},returnFocusElement:null,internalSharesHelpText:t("files_sharing","Share files within your organization. Recipients who can already view the file can also use this link for easy access."),externalSharesHelpText:t("files_sharing","Share files with others outside your organization via public links and email addresses. You can also share to {productName} accounts on other instances using their federated cloud ID.",{productName:bi}),additionalSharesHelpText:t("files_sharing","Shares from apps or other sources which are not included in internal or external shares.")}),computed:{hasExternalSections(){return this.sections.length>0||this.legacySections.length>0},sortedExternalSections(){return this.sections.filter(e=>e.enabled(this.fileInfo.node)).sort((e,t)=>e.order-t.order)},isSharedWithMe(){return!!this.sharedWithMe?.user},isLinkSharingAllowed(){if(!(0,n.HW)())return!1;const e=(0,o.F)();return!0===(e.files_sharing?.public||{}).enabled},canReshare(){return!!(this.fileInfo.permissions&OC.PERMISSION_SHARE)||!!(this.reshare&&this.reshare.hasSharePermission&&this.config.isResharingAllowed)},internalShareInputPlaceholder(){return this.config.showFederatedSharesAsInternal&&this.config.isFederationEnabled?t("files_sharing","Type names, teams, federated cloud IDs"):t("files_sharing","Type names or teams")},externalShareInputPlaceholder(){return this.isLinkSharingAllowed?this.config.showFederatedSharesAsInternal||this.config.isFederationEnabled?t("files_sharing","Type an email or federated cloud ID"):t("files_sharing","Type an email"):this.config.isFederationEnabled?t("files_sharing","Type a federated cloud ID"):""}},watch:{fileInfo:{immediate:!0,handler(e,t){void 0!==t?.id&&t?.id===e?.id||(this.resetState(),this.getShares())}}},methods:{async getShares(){try{this.loading=!0;const e=(0,d.KT)("apps/files_sharing/api/v1/shares"),t="json",i=(this.fileInfo.path+"/"+this.fileInfo.name).replace("//","/"),s=r.Ay.get(e,{params:{format:t,path:i,reshares:!0}}),a=r.Ay.get(e,{params:{format:t,path:i,shared_with_me:!0}}),[n,o]=await Promise.all([s,a]);this.loading=!1,this.processSharedWithMe(o),this.processShares(n)}catch(e){this.error=e?.response?.data?.ocs?.meta?.message?e.response.data.ocs.meta.message:t("files_sharing","Unable to load the shares list"),this.loading=!1,H.A.error("Error loading the shares list",e)}},resetState(){clearInterval(this.expirationInterval),this.loading=!0,this.error="",this.sharedWithMe={},this.shares=[],this.linkShares=[],this.externalShares=[],this.showSharingDetailsView=!1,this.shareDetailsData={}},updateExpirationSubtitle(e){const i=(0,c.A)(e.expireDate).unix();this.$set(this.sharedWithMe,"subtitle",t("files_sharing","Expires {relativetime}",{relativetime:(0,c.A)(1e3*i).fromNow()})),(0,c.A)().unix()>i&&(clearInterval(this.expirationInterval),this.$set(this.sharedWithMe,"subtitle",t("files_sharing","this share just expired.")))},processShares({data:e}){if(e.ocs&&e.ocs.data&&e.ocs.data.length>0){const t=(0,l.My)(e.ocs.data.map(e=>new he(e)),[e=>e.shareWithDisplayName,e=>e.label,e=>e.createdTime]);for(const e of t)[u.I.Link,u.I.Email].includes(e.type)?this.linkShares.push(e):[u.I.Remote,u.I.RemoteGroup].includes(e.type)?this.config.showFederatedSharesToTrustedServersAsInternal?e.isTrustedServer?this.shares.push(e):this.externalShares.push(e):this.config.showFederatedSharesAsInternal?this.shares.push(e):this.externalShares.push(e):this.shares.push(e);H.A.debug(`Processed ${this.linkShares.length} link share(s)`),H.A.debug(`Processed ${this.shares.length} share(s)`),H.A.debug(`Processed ${this.externalShares.length} external share(s)`)}},processSharedWithMe({data:e}){if(e.ocs&&e.ocs.data&&e.ocs.data[0]){const i=new he(e),s=function(e){return e.type===u.I.Group?t("files_sharing","Shared with you and the group {group} by {owner}",{group:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):e.type===u.I.Team?t("files_sharing","Shared with you and {circle} by {owner}",{circle:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):e.type===u.I.Room?e.shareWithDisplayName?t("files_sharing","Shared with you and the conversation {conversation} by {owner}",{conversation:e.shareWithDisplayName,owner:e.ownerDisplayName},void 0,{escape:!1}):t("files_sharing","Shared with you in a conversation by {owner}",{owner:e.ownerDisplayName},void 0,{escape:!1}):t("files_sharing","Shared with you by {owner}",{owner:e.ownerDisplayName},void 0,{escape:!1})}(i),a=i.ownerDisplayName,n=i.owner;this.sharedWithMe={displayName:a,title:s,user:n},this.reshare=i,i.expireDate&&(0,c.A)(i.expireDate).unix()>(0,c.A)().unix()&&(this.updateExpirationSubtitle(i),this.expirationInterval=setInterval(this.updateExpirationSubtitle,1e4,i))}else this.fileInfo&&void 0!==this.fileInfo.shareOwnerId&&this.fileInfo.shareOwnerId!==(0,n.HW)().uid&&(this.sharedWithMe={displayName:this.fileInfo.shareOwner,title:t("files_sharing","Shared with you by {owner}",{owner:this.fileInfo.shareOwner},void 0,{escape:!1}),user:this.fileInfo.shareOwnerId})},addShare(e,t=()=>{}){e.type===u.I.Email?this.linkShares.unshift(e):[u.I.Remote,u.I.RemoteGroup].includes(e.type)?(this.config.showFederatedSharesAsInternal&&this.shares.unshift(e),this.config.showFederatedSharesToTrustedServersAsInternal?e.isTrustedServer&&this.shares.unshift(e):this.externalShares.unshift(e)):this.shares.unshift(e),this.awaitForShare(e,t)},removeShare(e){const t=e.type===u.I.Email||e.type===u.I.Link?this.linkShares:this.shares,i=t.findIndex(t=>t.id===e.id);-1!==i&&t.splice(i,1)},awaitForShare(e,t){this.$nextTick(()=>{let i=this.$refs.shareList;e.type===u.I.Email&&(i=this.$refs.linkShareList);const s=i.$children.find(t=>t.share===e);s&&t(s)})},toggleShareDetailsView(e){if(!this.showSharingDetailsView)if(Array.from(document.activeElement.classList).some(e=>e.startsWith("action-"))){const e=document.activeElement.closest('[role="menu"]')?.id;this.returnFocusElement=document.querySelector(`[aria-controls="${e}"]`)}else this.returnFocusElement=document.activeElement;e&&(this.shareDetailsData=e),this.showSharingDetailsView=!this.showSharingDetailsView,this.showSharingDetailsView||this.$nextTick(()=>{this.returnFocusElement?.focus(),this.returnFocusElement=null})}}},Si=xi;var ki=s(15667),Ei={};Ei.styleTagTransform=O(),Ei.setAttributes=L(),Ei.insert=T().bind(null,"head"),Ei.domAPI=I(),Ei.insertStyleElement=B(),E()(ki.A,Ei),ki.A&&ki.A.locals&&ki.A.locals;const Di=(0,v.A)(Si,function(){var e=this,t=e._self._c;return t("div",{staticClass:"sharingTab",class:{"icon-loading":e.loading}},[e.error?t("div",{staticClass:"emptycontent",class:{emptyContentWithSections:e.hasExternalSections}},[t("div",{staticClass:"icon icon-error"}),e._v(" "),t("h2",[e._v(e._s(e.error))])]):e._e(),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.showSharingDetailsView,expression:"!showSharingDetailsView"}],staticClass:"sharingTab__content"},[e.isSharedWithMe?t("ul",[t("SharingEntrySimple",e._b({staticClass:"sharing-entry__reshare",scopedSlots:e._u([{key:"avatar",fn:function(){return[t("NcAvatar",{staticClass:"sharing-entry__avatar",attrs:{user:e.sharedWithMe.user,"display-name":e.sharedWithMe.displayName}})]},proxy:!0}],null,!1,3197855346)},"SharingEntrySimple",e.sharedWithMe,!1))],1):e._e(),e._v(" "),t("section",[t("div",{staticClass:"section-header"},[t("h4",[e._v(e._s(e.t("files_sharing","Internal shares")))]),e._v(" "),t("NcPopover",{attrs:{"popup-role":"dialog"},scopedSlots:e._u([{key:"trigger",fn:function(){return[t("NcButton",{staticClass:"hint-icon",attrs:{variant:"tertiary-no-background","aria-label":e.t("files_sharing","Internal shares explanation")},scopedSlots:e._u([{key:"icon",fn:function(){return[t("InfoIcon",{attrs:{size:20}})]},proxy:!0}])})]},proxy:!0}])},[e._v(" "),t("p",{staticClass:"hint-body"},[e._v("\n\t\t\t\t\t\t"+e._s(e.internalSharesHelpText)+"\n\t\t\t\t\t")])])],1),e._v(" "),e.loading?e._e():t("SharingInput",{attrs:{"can-reshare":e.canReshare,"file-info":e.fileInfo,"link-shares":e.linkShares,reshare:e.reshare,shares:e.shares,placeholder:e.internalShareInputPlaceholder},on:{"open-sharing-details":e.toggleShareDetailsView}}),e._v(" "),e.loading?e._e():t("SharingList",{ref:"shareList",attrs:{shares:e.shares,"file-info":e.fileInfo},on:{"open-sharing-details":e.toggleShareDetailsView}}),e._v(" "),e.canReshare&&!e.loading?t("SharingInherited",{attrs:{"file-info":e.fileInfo}}):e._e(),e._v(" "),t("SharingEntryInternal",{attrs:{"file-info":e.fileInfo}})],1),e._v(" "),e.config.showExternalSharing?t("section",[t("div",{staticClass:"section-header"},[t("h4",[e._v(e._s(e.t("files_sharing","External shares")))]),e._v(" "),t("NcPopover",{attrs:{"popup-role":"dialog"},scopedSlots:e._u([{key:"trigger",fn:function(){return[t("NcButton",{staticClass:"hint-icon",attrs:{variant:"tertiary-no-background","aria-label":e.t("files_sharing","External shares explanation")},scopedSlots:e._u([{key:"icon",fn:function(){return[t("InfoIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,915383693)})]},proxy:!0}],null,!1,4045083138)},[e._v(" "),t("p",{staticClass:"hint-body"},[e._v("\n\t\t\t\t\t\t"+e._s(e.externalSharesHelpText)+"\n\t\t\t\t\t")])])],1),e._v(" "),e.loading?e._e():t("SharingInput",{attrs:{"can-reshare":e.canReshare,"file-info":e.fileInfo,"link-shares":e.linkShares,"is-external":!0,placeholder:e.externalShareInputPlaceholder,reshare:e.reshare,shares:e.shares},on:{"open-sharing-details":e.toggleShareDetailsView}}),e._v(" "),e.loading?e._e():t("SharingList",{attrs:{shares:e.externalShares,"file-info":e.fileInfo},on:{"open-sharing-details":e.toggleShareDetailsView}}),e._v(" "),!e.loading&&e.isLinkSharingAllowed?t("SharingLinkList",{ref:"linkShareList",attrs:{"can-reshare":e.canReshare,"file-info":e.fileInfo,shares:e.linkShares},on:{"open-sharing-details":e.toggleShareDetailsView}}):e._e()],1):e._e(),e._v(" "),e.hasExternalSections&&!e.showSharingDetailsView?t("section",[t("div",{staticClass:"section-header"},[t("h4",[e._v(e._s(e.t("files_sharing","Additional shares")))]),e._v(" "),t("NcPopover",{attrs:{"popup-role":"dialog"},scopedSlots:e._u([{key:"trigger",fn:function(){return[t("NcButton",{staticClass:"hint-icon",attrs:{variant:"tertiary-no-background","aria-label":e.t("files_sharing","Additional shares explanation")},scopedSlots:e._u([{key:"icon",fn:function(){return[t("InfoIcon",{attrs:{size:20}})]},proxy:!0}],null,!1,915383693)})]},proxy:!0}],null,!1,880248230)},[e._v(" "),t("p",{staticClass:"hint-body"},[e._v("\n\t\t\t\t\t\t"+e._s(e.additionalSharesHelpText)+"\n\t\t\t\t\t")])])],1),e._v(" "),e._l(e.sortedExternalSections,function(i){return t("SidebarTabExternalSection",{key:i.id,staticClass:"sharingTab__additionalContent",attrs:{section:i,node:e.fileInfo.node}})}),e._v(" "),e._l(e.legacySections,function(i,s){return t("SidebarTabExternalSectionLegacy",{key:s,staticClass:"sharingTab__additionalContent",attrs:{"file-info":e.fileInfo,"section-callback":i}})}),e._v(" "),e.projectsEnabled?t("div",{directives:[{name:"show",rawName:"v-show",value:!e.showSharingDetailsView&&e.fileInfo,expression:"!showSharingDetailsView && fileInfo"}],staticClass:"sharingTab__additionalContent"},[t("NcCollectionList",{attrs:{id:`${e.fileInfo.id}`,type:"file",name:e.fileInfo.name}})],1):e._e()],2):e._e()]),e._v(" "),e.showSharingDetailsView?t("SharingDetailsTab",{attrs:{"file-info":e.shareDetailsData.fileInfo,share:e.shareDetailsData.share},on:{"close-sharing-details":e.toggleShareDetailsView,"add:share":e.addShare,"remove:share":e.removeShare}}):e._e()],1)},[],!1,null,"7cacff60",null).exports,Ii=(0,a.pM)({__name:"FilesSidebarTab",props:{node:null,active:{type:Boolean},folder:null,view:null},setup(e){const t=e,i=(0,a.EW)(()=>t.node&&function(e){const t={id:e.fileid,path:e.dirname,name:e.basename,mtime:e.mtime?.getTime(),etag:e.attributes.etag,size:e.size,hasPreview:e.attributes.hasPreview,isEncrypted:1===e.attributes.isEncrypted,isFavourited:1===e.attributes.favorite,mimetype:e.mime,permissions:e.permissions,mountType:e.attributes["mount-type"],sharePermissions:e.attributes["share-permissions"],shareAttributes:JSON.parse(e.attributes["share-attributes"]||"[]"),type:"file"===e.type?"file":"dir",attributes:e.attributes},i=new OC.Files.FileInfo(t);return i.get=e=>i[e],i.isDirectory=()=>"httpd/unix-directory"===i.mimetype,i.canEdit=()=>Boolean(i.permissions&OC.PERMISSION_UPDATE),i.node=e,i}(t.node));return{__sfc:!0,props:t,fileInfo:i,SharingTab:Di}}}),Pi=(0,v.A)(Ii,function(){var e=this,t=e._self._c,i=e._self._setupProxy;return i.fileInfo?t(i.SharingTab,{attrs:{"file-info":i.fileInfo}}):e._e()},[],!1,null,null,null).exports},70544(e,t,i){"use strict";i.d(t,{A:()=>o});var s=i(71354),a=i.n(s),n=i(76314),r=i.n(n)()(a());r.push([e.id,"\n.sharing-tab-external-section-legacy[data-v-3e4e67d2] {\n\twidth: 100%;\n}\n","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SidebarTabExternal/SidebarTabExternalSectionLegacy.vue"],names:[],mappings:";AAkCA;CACA,WAAA;AACA",sourcesContent:['\x3c!--\n - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n - SPDX-License-Identifier: AGPL-3.0-or-later\n--\x3e\n\n<template>\n\t<div class="sharing-tab-external-section-legacy">\n\t\t<component :is="component" :file-info="fileInfo" />\n\t</div>\n</template>\n\n<script lang="ts" setup>\nimport {\n\ttype Component,\n\ttype PropType,\n\n\tcomputed,\n} from \'vue\'\n\nconst props = defineProps({\n\tfileInfo: {\n\t\ttype: Object,\n\t\trequired: true,\n\t},\n\tsectionCallback: {\n\t\ttype: Function as PropType<(el: HTMLElement | undefined, fileInfo: unknown) => Component>,\n\t\trequired: true,\n\t},\n})\n\nconst component = computed(() => props.sectionCallback(undefined, props.fileInfo))\n<\/script>\n\n<style scoped>\n.sharing-tab-external-section-legacy {\n\twidth: 100%;\n}\n</style>\n'],sourceRoot:""}]);const o=r},77127(e,t,i){"use strict";i.d(t,{A:()=>o});var s=i(71354),a=i.n(s),n=i(76314),r=i.n(n)()(a());r.push([e.id,".sharing-search{display:flex;flex-direction:column;margin-bottom:4px}.sharing-search label[for=sharing-search-input]{margin-bottom:2px}.sharing-search__input{width:100%;margin:10px 0}.vs__dropdown-menu span[lookup] .avatardiv{background-image:var(--icon-search-white);background-repeat:no-repeat;background-position:center;background-color:var(--color-text-maxcontrast) !important}.vs__dropdown-menu span[lookup] .avatardiv .avatardiv__initials-wrapper{display:none}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingInput.vue"],names:[],mappings:"AACA,gBACC,YAAA,CACA,qBAAA,CACA,iBAAA,CAEA,gDACC,iBAAA,CAGD,uBACC,UAAA,CACA,aAAA,CAOA,2CACC,yCAAA,CACA,2BAAA,CACA,0BAAA,CACA,yDAAA,CACA,wEACC,YAAA",sourcesContent:['\n.sharing-search {\n\tdisplay: flex;\n\tflex-direction: column;\n\tmargin-bottom: 4px;\n\n\tlabel[for="sharing-search-input"] {\n\t\tmargin-bottom: 2px;\n\t}\n\n\t&__input {\n\t\twidth: 100%;\n\t\tmargin: 10px 0;\n\t}\n}\n\n.vs__dropdown-menu {\n\t// properly style the lookup entry\n\tspan[lookup] {\n\t\t.avatardiv {\n\t\t\tbackground-image: var(--icon-search-white);\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-position: center;\n\t\t\tbackground-color: var(--color-text-maxcontrast) !important;\n\t\t\t.avatardiv__initials-wrapper {\n\t\t\t\tdisplay: none;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const o=r},81771(e,t,i){"use strict";i.d(t,{A:()=>o});var s=i(71354),a=i.n(s),n=i(76314),r=i.n(n)()(a());r.push([e.id,".sharingTabDetailsView[data-v-34db2cbd]{display:flex;flex-direction:column;width:100%;margin:0 auto;position:relative;height:100%;overflow:hidden}.sharingTabDetailsView__header[data-v-34db2cbd]{display:flex;align-items:center;box-sizing:border-box;margin:.2em}.sharingTabDetailsView__header span[data-v-34db2cbd]{display:flex;align-items:center}.sharingTabDetailsView__header span h1[data-v-34db2cbd]{font-size:15px;padding-inline-start:.3em}.sharingTabDetailsView__wrapper[data-v-34db2cbd]{position:relative;overflow:scroll;flex-shrink:1;padding:4px;padding-inline-end:12px}.sharingTabDetailsView__quick-permissions[data-v-34db2cbd]{display:flex;justify-content:center;width:100%;margin:0 auto;border-radius:0}.sharingTabDetailsView__quick-permissions div[data-v-34db2cbd]{width:100%}.sharingTabDetailsView__quick-permissions div span[data-v-34db2cbd]{width:100%}.sharingTabDetailsView__quick-permissions div span span[data-v-34db2cbd]:nth-child(1){align-items:center;justify-content:center;padding:.1em}.sharingTabDetailsView__quick-permissions div span[data-v-34db2cbd] label span{display:flex;flex-direction:column}.sharingTabDetailsView__quick-permissions div span[data-v-34db2cbd] span.checkbox-content__text.checkbox-radio-switch__text{flex-wrap:wrap}.sharingTabDetailsView__quick-permissions div span[data-v-34db2cbd] span.checkbox-content__text.checkbox-radio-switch__text .subline{display:block;flex-basis:100%}.sharingTabDetailsView__advanced-control[data-v-34db2cbd]{width:100%}.sharingTabDetailsView__advanced-control button[data-v-34db2cbd]{margin-top:.5em}.sharingTabDetailsView__advanced[data-v-34db2cbd]{width:100%;margin-bottom:.5em;text-align:start;padding-inline-start:0}.sharingTabDetailsView__advanced section textarea[data-v-34db2cbd],.sharingTabDetailsView__advanced section div.mx-datepicker[data-v-34db2cbd]{width:100%}.sharingTabDetailsView__advanced section textarea[data-v-34db2cbd]{height:80px;margin:0}.sharingTabDetailsView__advanced section span[data-v-34db2cbd] label{padding-inline-start:0 !important;background-color:initial !important;border:none !important}.sharingTabDetailsView__advanced section section.custom-permissions-group[data-v-34db2cbd]{padding-inline-start:1.5em}.sharingTabDetailsView__label[data-v-34db2cbd]{padding-block-end:6px}.sharingTabDetailsView__delete>button[data-v-34db2cbd]:first-child{color:#df0707}.sharingTabDetailsView__footer[data-v-34db2cbd]{width:100%;display:flex;position:sticky;bottom:0;flex-direction:column;justify-content:space-between;align-items:flex-start;background:linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background))}.sharingTabDetailsView__footer .button-group[data-v-34db2cbd]{display:flex;justify-content:space-between;width:100%;margin-top:16px}.sharingTabDetailsView__footer .button-group button[data-v-34db2cbd]{margin-inline-start:16px}.sharingTabDetailsView__footer .button-group button[data-v-34db2cbd]:first-child{margin-inline-start:0}","",{version:3,sources:["webpack://./apps/files_sharing/src/views/SharingDetailsTab.vue"],names:[],mappings:"AACA,wCACC,YAAA,CACA,qBAAA,CACA,UAAA,CACA,aAAA,CACA,iBAAA,CACA,WAAA,CACA,eAAA,CAEA,gDACC,YAAA,CACA,kBAAA,CACA,qBAAA,CACA,WAAA,CAEA,qDACC,YAAA,CACA,kBAAA,CAEA,wDACC,cAAA,CACA,yBAAA,CAMH,iDACC,iBAAA,CACA,eAAA,CACA,aAAA,CACA,WAAA,CACA,uBAAA,CAGD,2DACC,YAAA,CACA,sBAAA,CACA,UAAA,CACA,aAAA,CACA,eAAA,CAEA,+DACC,UAAA,CAEA,oEACC,UAAA,CAEA,sFACC,kBAAA,CACA,sBAAA,CACA,YAAA,CAGD,+EACC,YAAA,CACA,qBAAA,CAID,4HACC,cAAA,CAEA,qIACC,aAAA,CACA,eAAA,CAQL,0DACC,UAAA,CAEA,iEACC,eAAA,CAKF,kDACC,UAAA,CACA,kBAAA,CACA,gBAAA,CACA,sBAAA,CAIC,+IAEC,UAAA,CAGD,mEACC,WAAA,CACA,QAAA,CAYD,qEACC,iCAAA,CACA,mCAAA,CACA,sBAAA,CAGD,2FACC,0BAAA,CAKH,+CACC,qBAAA,CAIA,mEACC,aAAA,CAIF,gDACC,UAAA,CACA,YAAA,CACA,eAAA,CACA,QAAA,CACA,qBAAA,CACA,6BAAA,CACA,sBAAA,CACA,2FAAA,CAEA,8DACC,YAAA,CACA,6BAAA,CACA,UAAA,CACA,eAAA,CAEA,qEACC,wBAAA,CAEA,iFACC,qBAAA",sourcesContent:["\n.sharingTabDetailsView {\n\tdisplay: flex;\n\tflex-direction: column;\n\twidth: 100%;\n\tmargin: 0 auto;\n\tposition: relative;\n\theight: 100%;\n\toverflow: hidden;\n\n\t&__header {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tbox-sizing: border-box;\n\t\tmargin: 0.2em;\n\n\t\tspan {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\n\t\t\th1 {\n\t\t\t\tfont-size: 15px;\n\t\t\t\tpadding-inline-start: 0.3em;\n\t\t\t}\n\n\t\t}\n\t}\n\n\t&__wrapper {\n\t\tposition: relative;\n\t\toverflow: scroll;\n\t\tflex-shrink: 1;\n\t\tpadding: 4px;\n\t\tpadding-inline-end: 12px;\n\t}\n\n\t&__quick-permissions {\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\t\twidth: 100%;\n\t\tmargin: 0 auto;\n\t\tborder-radius: 0;\n\n\t\tdiv {\n\t\t\twidth: 100%;\n\n\t\t\tspan {\n\t\t\t\twidth: 100%;\n\n\t\t\t\tspan:nth-child(1) {\n\t\t\t\t\talign-items: center;\n\t\t\t\t\tjustify-content: center;\n\t\t\t\t\tpadding: 0.1em;\n\t\t\t\t}\n\n\t\t\t\t:deep(label span) {\n\t\t\t\t\tdisplay: flex;\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t}\n\n\t\t\t\t/* Target component based style in NcCheckboxRadioSwitch slot content*/\n\t\t\t\t:deep(span.checkbox-content__text.checkbox-radio-switch__text) {\n\t\t\t\t\tflex-wrap: wrap;\n\n\t\t\t\t\t.subline {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tflex-basis: 100%;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}\n\n\t&__advanced-control {\n\t\twidth: 100%;\n\n\t\tbutton {\n\t\t\tmargin-top: 0.5em;\n\t\t}\n\n\t}\n\n\t&__advanced {\n\t\twidth: 100%;\n\t\tmargin-bottom: 0.5em;\n\t\ttext-align: start;\n\t\tpadding-inline-start: 0;\n\n\t\tsection {\n\n\t\t\ttextarea,\n\t\t\tdiv.mx-datepicker {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\ttextarea {\n\t\t\t\theight: 80px;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t The following style is applied out of the component's scope\n\t\t\t to remove padding from the label.checkbox-radio-switch__label,\n\t\t\t which is used to group radio checkbox items. The use of ::v-deep\n\t\t\t ensures that the padding is modified without being affected by\n\t\t\t the component's scoping.\n\t\t\t Without this achieving left alignment for the checkboxes would not\n\t\t\t be possible.\n\t\t\t*/\n\t\t\tspan :deep(label) {\n\t\t\t\tpadding-inline-start: 0 !important;\n\t\t\t\tbackground-color: initial !important;\n\t\t\t\tborder: none !important;\n\t\t\t}\n\n\t\t\tsection.custom-permissions-group {\n\t\t\t\tpadding-inline-start: 1.5em;\n\t\t\t}\n\t\t}\n\t}\n\n\t&__label {\n\t\tpadding-block-end: 6px;\n\t}\n\n\t&__delete {\n\t\t> button:first-child {\n\t\t\tcolor: rgb(223, 7, 7);\n\t\t}\n\t}\n\n\t&__footer {\n\t\twidth: 100%;\n\t\tdisplay: flex;\n\t\tposition: sticky;\n\t\tbottom: 0;\n\t\tflex-direction: column;\n\t\tjustify-content: space-between;\n\t\talign-items: flex-start;\n\t\tbackground: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--color-main-background));\n\n\t\t.button-group {\n\t\t\tdisplay: flex;\n\t\t\tjustify-content: space-between;\n\t\t\twidth: 100%;\n\t\t\tmargin-top: 16px;\n\n\t\t\tbutton {\n\t\t\t\tmargin-inline-start: 16px;\n\n\t\t\t\t&:first-child {\n\t\t\t\t\tmargin-inline-start: 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const o=r},84388(e,t,i){"use strict";i.d(t,{A:()=>o});var s=i(71354),a=i.n(s),n=i(76314),r=i.n(n)()(a());r.push([e.id,".sharing-entry__internal .avatar-external[data-v-6c4cb23b]{width:32px;height:32px;line-height:32px;font-size:18px;background-color:var(--color-text-maxcontrast);border-radius:50%;flex-shrink:0}.sharing-entry__internal .icon-checkmark-color[data-v-6c4cb23b]{opacity:1;color:var(--color-border-success)}","",{version:3,sources:["webpack://./apps/files_sharing/src/components/SharingEntryInternal.vue"],names:[],mappings:"AAEC,2DACC,UAAA,CACA,WAAA,CACA,gBAAA,CACA,cAAA,CACA,8CAAA,CACA,iBAAA,CACA,aAAA,CAED,gEACC,SAAA,CACA,iCAAA",sourcesContent:["\n.sharing-entry__internal {\n\t.avatar-external {\n\t\twidth: 32px;\n\t\theight: 32px;\n\t\tline-height: 32px;\n\t\tfont-size: 18px;\n\t\tbackground-color: var(--color-text-maxcontrast);\n\t\tborder-radius: 50%;\n\t\tflex-shrink: 0;\n\t}\n\t.icon-checkmark-color {\n\t\topacity: 1;\n\t\tcolor: var(--color-border-success);\n\t}\n}\n"],sourceRoot:""}]);const o=r}}]);
//# sourceMappingURL=9429-9429.js.map?v=54d3c23010eaeddfa70b