(()=>{"use strict";var e,o={54878:(e,o,n)=>{var r=n(38613),i=n(99498);window.OCA.Sharing=window.OCA.Sharing||{},window.OCA.Sharing.showAddExternalDialog=function(e,o,n){const r=e.remote,i=e.ownerDisplayName||e.owner,a=e.name,s=r.replace(/^https?:\/\//,"").replace(/\/$/,"");o?window.OC.dialogs.prompt(t("files_sharing","Do you want to add the remote share {name} from {owner}@{remote}?",{name:a,owner:i,remote:s}),t("files_sharing","Remote share"),(function(o,t){e.password=t,n(o,e)}),!0,t("files_sharing","Remote share password"),!0).then(this._adjustDialog):window.OC.dialogs.confirm(t("files_sharing","Do you want to add the remote share {name} from {owner}@{remote}?",{name:a,owner:i,remote:s}),t("files_sharing","Remote share"),(function(o){n(o,e)}),!0).then(this._adjustDialog)},window.OCA.Sharing._adjustDialog=function(){const e=$(".oc-dialog:visible"),o=e.find("button");e.find(".ui-icon").remove(),o.eq(1).text(t("core","Cancel")),o.eq(2).text(t("files_sharing","Add remote share"))};const a=function(){var e;null!==(e=window)&&void 0!==e&&null!==(e=e.OCP)&&void 0!==e&&null!==(e=e.Files)&&void 0!==e&&null!==(e=e.Router)&&void 0!==e&&e.goToRoute?window.OCP.Files.Router.goToRoute(null,{...window.OCP.Files.Router.params,fileid:void 0},{...window.OCP.Files.Router.query,dir:"/",openfile:void 0}):window.location.reload()};!function(){const e=window.OC.Util.History.parseUrlQuery();if(e.remote&&e.token&&e.name){const o=function(e,o){const n=o.password||"";e&&$.post((0,i.Jv)("apps/federatedfilesharing/askForFederatedShare"),{remote:o.remote,token:o.token,owner:o.owner,ownerDisplayName:o.ownerDisplayName||o.owner,name:o.name,password:n}).done((function(e){e.hasOwnProperty("legacyMount")?a():window.OC.Notification.showTemporary(e.message)})).fail((function(e){window.OC.Notification.showTemporary(JSON.parse(e.responseText).message)}))};location.hash="",e.passwordProtected=1===parseInt(e.protected,10),window.OCA.Sharing.showAddExternalDialog(e,e.passwordProtected,o)}}(),!0!==(0,r.C)("federatedfilesharing","notificationsEnabled",!0)&&$.get((0,i.Jv)("/apps/files_sharing/api/externalShares"),{},(function(e){let o;for(o=0;o{if(!n){var a=1/0;for(f=0;f=i)&&Object.keys(r.O).every((e=>r.O[e](n[l])))?n.splice(l--,1):(s=!1,i0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[n,t,i]},r.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return r.d(o,{a:o}),o},r.d=(e,o)=>{for(var n in o)r.o(o,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},r.e=()=>Promise.resolve(),r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.j=2299,(()=>{r.b=document.baseURI||self.location.href;var e={2299:0};r.O.j=o=>0===e[o];var o=(o,n)=>{var t,i,a=n[0],s=n[1],l=n[2],d=0;if(a.some((o=>0!==e[o]))){for(t in s)r.o(s,t)&&(r.m[t]=s[t]);if(l)var f=l(r)}for(o&&o(n);dr(54878)));i=r.O(i)})(); //# sourceMappingURL=federatedfilesharing-external.js.map?v=fc9004d02a7b951c172e