summaryrefslogtreecommitdiffstats
path: root/dist/files_external-main.js.map
blob: 632bbbba953c4d8d72ca9e3cf9cbbe030619614e (plain)
1
{"version":3,"file":"files_external-main.js?v=6f4dd0110e1f480e48ac","mappings":";uBAAIA,qGCuBJ,SAAeC,EAAAA,EAAAA,MACbC,OAAO,SACPC,aACAC,QCJK,IAAIC,GACX,SAAWA,GACPA,EAAqB,QAAI,UACzBA,EAAoB,OAAI,QAC3B,CAHD,CAGGA,IAAgBA,EAAc,CAAC,IAC3B,MAAMC,EAETC,YAAYC,eAAQ,oaAChBC,KAAKC,eAAeF,GACpBC,KAAKE,QAAUH,CACnB,CACII,SACA,OAAOH,KAAKE,QAAQC,EACxB,CACIC,kBACA,OAAOJ,KAAKE,QAAQE,WACxB,CACIC,oBACA,OAAOL,KAAKE,QAAQG,aACxB,CACIC,cACA,OAAON,KAAKE,QAAQI,OACxB,CACIC,WACA,OAAOP,KAAKE,QAAQK,IACxB,CACIC,gBACA,OAAOR,KAAKE,QAAQM,SACxB,CACIC,YACA,OAAOT,KAAKE,QAAQO,KACxB,CACIC,cACA,OAAOV,KAAKE,QAAQQ,OACxB,CACIC,aACA,OAAOX,KAAKE,QAAQS,MACxB,CACIC,mBACA,OAAOZ,KAAKE,QAAQU,YACxB,CACAX,eAAeF,GACX,IAAKA,EAAOI,IAA2B,iBAAdJ,EAAOI,GAC5B,MAAM,IAAIU,MAAM,cAEpB,IAAKd,EAAOK,aAA6C,mBAAvBL,EAAOK,YACrC,MAAM,IAAIS,MAAM,gCAEpB,IAAKd,EAAOM,eAAiD,mBAAzBN,EAAOM,cACvC,MAAM,IAAIQ,MAAM,kCAEpB,IAAKd,EAAOQ,MAA+B,mBAAhBR,EAAOQ,KAC9B,MAAM,IAAIM,MAAM,yBAGpB,GAAI,YAAad,GAAoC,mBAAnBA,EAAOO,QACrC,MAAM,IAAIO,MAAM,4BAEpB,GAAI,cAAed,GAAsC,mBAArBA,EAAOS,UACvC,MAAM,IAAIK,MAAM,8BAEp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W1J,EAAK,GAChBiM,EAAcjM,EAAK,GACnBkM,EAAUlM,EAAK,GAGI+J,EAAI,EAC3B,GAAGL,EAASyC,MAAM5O,GAAgC,IAAxBsO,EAAgBtO,KAAa,CACtD,IAAI0L,KAAYgD,EACZjD,EAAoB4B,EAAEqB,EAAahD,KACrCD,EAAoBO,EAAEN,GAAYgD,EAAYhD,IAGhD,GAAGiD,EAAS,IAAIzC,EAASyC,EAAQlD,EAClC,CAEA,IADGgD,GAA4BA,EAA2BhM,GACrD+J,EAAIL,EAASrH,OAAQ0H,IACzB+B,EAAUpC,EAASK,GAChBf,EAAoB4B,EAAEiB,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAO9C,EAAoBQ,EAAEC,EAAO,EAGjC2C,EAAqBR,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FQ,EAAmBC,QAAQN,EAAqBO,KAAK,KAAM,IAC3DF,EAAmBtN,KAAOiN,EAAqBO,KAAK,KAAMF,EAAmBtN,KAAKwN,KAAKF,QClDvFpD,EAAoBuD,QAAK/J,ECGzB,IAAIgK,EAAsBxD,EAAoBQ,OAAEhH,EAAW,CAAC,OAAO,IAAOwG,EAAoB,SAC9FwD,EAAsBxD,EAAoBQ,EAAEgD","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files/src/services/FileAction.ts","webpack:///nextcloud/apps/files_external/src/utils/credentialsUtils.ts","webpack:///nextcloud/node_modules/@nextcloud/files/dist/index.esm.js","webpack:///nextcloud/apps/files_external/src/utils/externalStorageUtils.ts","webpack:///nextcloud/apps/files_external/src/actions/enterCredentialsAction.ts","webpack://nextcloud/./apps/files_external/src/css/fileEntryStatus.scss?3c5c","webpack:///nextcloud/apps/files_external/src/services/externalStorage.ts","webpack:///nextcloud/apps/files_external/src/actions/inlineStorageCheckAction.ts","webpack:///nextcloud/apps/files_external/src/actions/openInFilesAction.ts","webpack:///nextcloud/apps/files_external/src/main.ts","webpack:///nextcloud/apps/files_external/src/css/fileEntryStatus.scss","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport logger from '../logger';\nexport var DefaultType;\n(function (DefaultType) {\n    DefaultType[\"DEFAULT\"] = \"default\";\n    DefaultType[\"HIDDEN\"] = \"hidden\";\n})(DefaultType || (DefaultType = {}));\nexport class FileAction {\n    _action;\n    constructor(action) {\n        this.validateAction(action);\n        this._action = action;\n    }\n    get id() {\n        return this._action.id;\n    }\n    get displayName() {\n        return this._action.displayName;\n    }\n    get iconSvgInline() {\n        return this._action.iconSvgInline;\n    }\n    get enabled() {\n        return this._action.enabled;\n    }\n    get exec() {\n        return this._action.exec;\n    }\n    get execBatch() {\n        return this._action.execBatch;\n    }\n    get order() {\n        return this._action.order;\n    }\n    get default() {\n        return this._action.default;\n    }\n    get inline() {\n        return this._action.inline;\n    }\n    get renderInline() {\n        return this._action.renderInline;\n    }\n    validateAction(action) {\n        if (!action.id || typeof action.id !== 'string') {\n            throw new Error('Invalid id');\n        }\n        if (!action.displayName || typeof action.displayName !== 'function') {\n            throw new Error('Invalid displayName function');\n        }\n        if (!action.iconSvgInline || typeof action.iconSvgInline !== 'function') {\n            throw new Error('Invalid iconSvgInline function');\n        }\n        if (!action.exec || typeof action.exec !== 'function') {\n            throw new Error('Invalid exec function');\n        }\n        // Optional properties --------------------------------------------\n        if ('enabled' in action && typeof action.enabled !== 'function') {\n            throw new Error('Invalid enabled function');\n        }\n        if ('execBatch' in action && typeof action.execBatch !== 'function') {\n            throw new Error('Invalid execBatch function');\n        }\n        if ('order' in action && typeof action.order !== 'number') {\n            throw new Error('Invalid order');\n        }\n        if (action.default && !Object.values(DefaultType).includes(action.default)) {\n            throw new Error('Invalid default');\n        }\n        if ('inline' in action && typeof action.inline !== 'function') {\n            throw new Error('Invalid inline function');\n        }\n        if ('renderInline' in action && typeof action.renderInline !== 'function') {\n            throw new Error('Invalid renderInline function');\n        }\n    }\n}\nexport const registerFileAction = function (action) {\n    if (typeof window._nc_fileactions === 'undefined') {\n        window._nc_fileactions = [];\n        logger.debug('FileActions initialized');\n    }\n    // Check duplicates\n    if (window._nc_fileactions.find(search => search.id === action.id)) {\n        logger.error(`FileAction ${action.id} already registered`, { action });\n        return;\n    }\n    window._nc_fileactions.push(action);\n};\nexport const getFileActions = function () {\n    return window._nc_fileactions || [];\n};\n","// @see https://github.com/nextcloud/server/blob/ac2bc2384efe3c15ff987b87a7432bc60d545c67/lib/public/Files/StorageNotAvailableException.php#L41\nexport var STORAGE_STATUS;\n(function (STORAGE_STATUS) {\n    STORAGE_STATUS[STORAGE_STATUS[\"SUCCESS\"] = 0] = \"SUCCESS\";\n    STORAGE_STATUS[STORAGE_STATUS[\"ERROR\"] = 1] = \"ERROR\";\n    STORAGE_STATUS[STORAGE_STATUS[\"INDETERMINATE\"] = 2] = \"INDETERMINATE\";\n    STORAGE_STATUS[STORAGE_STATUS[\"INCOMPLETE_CONF\"] = 3] = \"INCOMPLETE_CONF\";\n    STORAGE_STATUS[STORAGE_STATUS[\"UNAUTHORIZED\"] = 4] = \"UNAUTHORIZED\";\n    STORAGE_STATUS[STORAGE_STATUS[\"TIMEOUT\"] = 5] = \"TIMEOUT\";\n    STORAGE_STATUS[STORAGE_STATUS[\"NETWORK_ERROR\"] = 6] = \"NETWORK_ERROR\";\n})(STORAGE_STATUS || (STORAGE_STATUS = {}));\nexport const isMissingAuthConfig = function (config) {\n    // If we don't know the status, assume it is ok\n    if (!config.status || config.status === STORAGE_STATUS.SUCCESS) {\n        return false;\n    }\n    return config.userProvided || config.authMechanism === 'password::global::user';\n};\n","import { getCanonicalLocale } from '@nextcloud/l10n';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { getLoggerBuilder } from '@nextcloud/logger';\nimport { join, basename, extname, dirname } from 'path';\n\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst humanList = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'];\nconst humanListBinary = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB'];\n/**\n * Format a file size in a human-like format. e.g. 42GB\n *\n * @param size in bytes\n * @param skipSmallSizes avoid rendering tiny sizes and return '< 1 KB' instead\n */\nfunction formatFileSize(size, skipSmallSizes = false, binaryPrefixes = false) {\n    if (typeof size === 'string') {\n        size = Number(size);\n    }\n    /*\n    * @note This block previously used Log base 1024, per IEC 80000-13;\n    * however, the wrong prefix was used. Now we use decimal calculation\n    * with base 1000 per the SI. Base 1024 calculation with binary\n    * prefixes is optional, but has yet to be added to the UI.\n    */\n    // Calculate Log with base 1024 or 1000: size = base ** order\n    let order = size > 0 ? Math.floor(Math.log(size) / Math.log(binaryPrefixes ? 1024 : 1000)) : 0;\n    // Stay in range of the byte sizes that are defined\n    order = Math.min((binaryPrefixes ? humanListBinary.length : humanList.length) - 1, order);\n    const readableFormat = binaryPrefixes ? humanListBinary[order] : humanList[order];\n    let relativeSize = (size / Math.pow(binaryPrefixes ? 1024 : 1000, order)).toFixed(1);\n    if (skipSmallSizes === true && order === 0) {\n        return (relativeSize !== '0.0' ? '< 1 ' : '0 ') + (binaryPrefixes ? humanListBinary[1] : humanList[1]);\n    }\n    if (order < 2) {\n        relativeSize = parseFloat(relativeSize).toFixed(0);\n    }\n    else {\n        relativeSize = parseFloat(relativeSize).toLocaleString(getCanonicalLocale());\n    }\n    return relativeSize + ' ' + readableFormat;\n}\n\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst getLogger = user => {\n    if (user === null) {\n        return getLoggerBuilder()\n            .setApp('files')\n            .build();\n    }\n    return getLoggerBuilder()\n        .setApp('files')\n        .setUid(user.uid)\n        .build();\n};\nvar logger = getLogger(getCurrentUser());\n\n/**\n * @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass NewFileMenu {\n    _entries = [];\n    registerEntry(entry) {\n        this.validateEntry(entry);\n        this._entries.push(entry);\n    }\n    unregisterEntry(entry) {\n        const entryIndex = typeof entry === 'string'\n            ? this.getEntryIndex(entry)\n            : this.getEntryIndex(entry.id);\n        if (entryIndex === -1) {\n            logger.warn('Entry not found, nothing removed', { entry, entries: this.getEntries() });\n            return;\n        }\n        this._entries.splice(entryIndex, 1);\n    }\n    /**\n     * Get the list of registered entries\n     *\n     * @param {FileInfo} context the creation context. Usually the current folder FileInfo\n     */\n    getEntries(context) {\n        if (context) {\n            return this._entries\n                .filter(entry => typeof entry.if === 'function' ? entry.if(context) : true);\n        }\n        return this._entries;\n    }\n    getEntryIndex(id) {\n        return this._entries.findIndex(entry => entry.id === id);\n    }\n    validateEntry(entry) {\n        if (!entry.id || !entry.displayName || !(entry.iconSvgInline || entry.iconClass)) {\n            throw new Error('Invalid entry');\n        }\n        if (typeof entry.id !== 'string'\n            || typeof entry.displayName !== 'string') {\n            throw new Error('Invalid id or displayName property');\n        }\n        if ((entry.iconClass && typeof entry.iconClass !== 'string')\n            || (entry.iconSvgInline && typeof entry.iconSvgInline !== 'string')) {\n            throw new Error('Invalid icon provided');\n        }\n        if (entry.if !== undefined && typeof entry.if !== 'function') {\n            throw new Error('Invalid if property');\n        }\n        if (entry.templateName && typeof entry.templateName !== 'string') {\n            throw new Error('Invalid templateName property');\n        }\n        if (entry.handler && typeof entry.handler !== 'function') {\n            throw new Error('Invalid handler property');\n        }\n        if (!entry.templateName && !entry.handler) {\n            throw new Error('At least a templateName or a handler must be provided');\n        }\n        if (this.getEntryIndex(entry.id) !== -1) {\n            throw new Error('Duplicate entry');\n        }\n    }\n}\nconst getNewFileMenu = function () {\n    if (typeof window._nc_newfilemenu === 'undefined') {\n        window._nc_newfilemenu = new NewFileMenu();\n        logger.debug('NewFileMenu initialized');\n    }\n    return window._nc_newfilemenu;\n};\n\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar FileType;\n(function (FileType) {\n    FileType[\"Folder\"] = \"folder\";\n    FileType[\"File\"] = \"file\";\n})(FileType || (FileType = {}));\n\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nvar Permission;\n(function (Permission) {\n    Permission[Permission[\"NONE\"] = 0] = \"NONE\";\n    Permission[Permission[\"CREATE\"] = 4] = \"CREATE\";\n    Permission[Permission[\"READ\"] = 1] = \"READ\";\n    Permission[Permission[\"UPDATE\"] = 2] = \"UPDATE\";\n    Permission[Permission[\"DELETE\"] = 8] = \"DELETE\";\n    Permission[Permission[\"SHARE\"] = 16] = \"SHARE\";\n    Permission[Permission[\"ALL\"] = 31] = \"ALL\";\n})(Permission || (Permission = {}));\n/**\n * Parse the webdav permission string to a permission enum\n * @see https://github.com/nextcloud/server/blob/71f698649f578db19a22457cb9d420fb62c10382/lib/public/Files/DavUtil.php#L58-L88\n */\nconst parseWebdavPermissions = function (permString = '') {\n    let permissions = Permission.NONE;\n    if (!permString)\n        return permissions;\n    if (permString.includes('C') || permString.includes('K'))\n        permissions |= Permission.CREATE;\n    if (permString.includes('G'))\n        permissions |= Permission.READ;\n    if (permString.includes('W') || permString.includes('N') || permString.includes('V'))\n        permissions |= Permission.UPDATE;\n    if (permString.includes('D'))\n        permissions |= Permission.DELETE;\n    if (permString.includes('R'))\n        permissions |= Permission.SHARE;\n    return permissions;\n};\n\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nconst isDavRessource = function (source, davService) {\n    return source.match(davService) !== null;\n};\n/**\n * Validate Node construct data\n */\nconst validateData = (data, davService) => {\n    if ('id' in data && (typeof data.id !== 'number' || data.id < 0)) {\n        throw new Error('Invalid id type of value');\n    }\n    if (!data.source) {\n        throw new Error('Missing mandatory source');\n    }\n    try {\n        new URL(data.source);\n    }\n    catch (e) {\n        throw new Error('Invalid source format, source must be a valid URL');\n    }\n    if (!data.source.startsWith('http')) {\n        throw new Error('Invalid source format, only http(s) is supported');\n    }\n    if ('mtime' in data && !(data.mtime instanceof Date)) {\n        throw new Error('Invalid mtime type');\n    }\n    if ('crtime' in data && !(data.crtime instanceof Date)) {\n        throw new Error('Invalid crtime type');\n    }\n    if (!data.mime || typeof data.mime !== 'string'\n        || !data.mime.match(/^[-\\w.]+\\/[-+\\w.]+$/gi)) {\n        throw new Error('Missing or invalid mandatory mime');\n    }\n    if ('size' in data && typeof data.size !== 'number') {\n        throw new Error('Invalid size type');\n    }\n    if ('permissions' in data && !(typeof data.permissions === 'number'\n        && data.permissions >= Permission.NONE\n        && data.permissions <= Permission.ALL)) {\n        throw new Error('Invalid permissions');\n    }\n    if ('owner' in data\n        && data.owner !== null\n        && typeof data.owner !== 'string') {\n        throw new Error('Invalid owner type');\n    }\n    if ('attributes' in data && typeof data.attributes !== 'object') {\n        throw new Error('Invalid attributes format');\n    }\n    if ('root' in data && typeof data.root !== 'string') {\n        throw new Error('Invalid root format');\n    }\n    if (data.root && !data.root.startsWith('/')) {\n        throw new Error('Root must start with a leading slash');\n    }\n    if (data.root && !data.source.includes(data.root)) {\n        throw new Error('Root must be part of the source');\n    }\n    if (data.root && isDavRessource(data.source, davService)) {\n        const service = data.source.match(davService)[0];\n        if (!data.source.includes(join(service, data.root))) {\n            throw new Error('The root must be relative to the service. e.g /files/emma');\n        }\n    }\n};\n\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Node {\n    _data;\n    _attributes;\n    _knownDavService = /(remote|public)\\.php\\/(web)?dav/i;\n    constructor(data, davService) {\n        // Validate data\n        validateData(data, davService || this._knownDavService);\n        this._data = data;\n        const handler = {\n            set: (target, prop, value) => {\n                // Edit modification time\n                this._data['mtime'] = new Date();\n                // Apply original changes\n                return Reflect.set(target, prop, value);\n            },\n            deleteProperty: (target, prop) => {\n                // Edit modification time\n                this._data['mtime'] = new Date();\n                // Apply original changes\n                return Reflect.deleteProperty(target, prop);\n            },\n        };\n        // Proxy the attributes to update the mtime on change\n        this._attributes = new Proxy(data.attributes || {}, handler);\n        delete this._data.attributes;\n        if (davService) {\n            this._knownDavService = davService;\n        }\n    }\n    /**\n     * Get the source url to this object\n     */\n    get source() {\n        // strip any ending slash\n        return this._data.source.replace(/\\/$/i, '');\n    }\n    /**\n     * Get this object name\n     */\n    get basename() {\n        return basename(this.source);\n    }\n    /**\n     * Get this object's extension\n     */\n    get extension() {\n        return extname(this.source);\n    }\n    /**\n     * Get the directory path leading to this object\n     * Will use the relative path to root if available\n     */\n    get dirname() {\n        if (this.root) {\n            // Using replace would remove all part matching root\n            const firstMatch = this.source.indexOf(this.root);\n            return dirname(this.source.slice(firstMatch + this.root.length) || '/');\n        }\n        // This should always be a valid URL\n        // as this is tested in the constructor\n        const url = new URL(this.source);\n        return dirname(url.pathname);\n    }\n    /**\n     * Get the file mime\n     */\n    get mime() {\n        return this._data.mime;\n    }\n    /**\n     * Get the file modification time\n     */\n    get mtime() {\n        return this._data.mtime;\n    }\n    /**\n     * Get the file creation time\n     */\n    get crtime() {\n        return this._data.crtime;\n    }\n    /**\n     * Get the file size\n     */\n    get size() {\n        return this._data.size;\n    }\n    /**\n     * Get the file attribute\n     */\n    get attributes() {\n        return this._attributes;\n    }\n    /**\n     * Get the file permissions\n     */\n    get permissions() {\n        // If this is not a dav ressource, we can only read it\n        if (this.owner === null && !this.isDavRessource) {\n            return Permission.READ;\n        }\n        // If the permissions are not defined, we have none\n        return this._data.permissions !== undefined\n            ? this._data.permissions\n            : Permission.NONE;\n    }\n    /**\n     * Get the file owner\n     */\n    get owner() {\n        // Remote ressources have no owner\n        if (!this.isDavRessource) {\n            return null;\n        }\n        return this._data.owner;\n    }\n    /**\n     * Is this a dav-related ressource ?\n     */\n    get isDavRessource() {\n        return isDavRessource(this.source, this._knownDavService);\n    }\n    /**\n     * Get the dav root of this object\n     */\n    get root() {\n        // If provided (recommended), use the root and strip away the ending slash\n        if (this._data.root) {\n            return this._data.root.replace(/^(.+)\\/$/, '$1');\n        }\n        // Use the source to get the root from the dav service\n        if (this.isDavRessource) {\n            const root = dirname(this.source);\n            return root.split(this._knownDavService).pop() || null;\n        }\n        return null;\n    }\n    /**\n     * Get the absolute path of this object relative to the root\n     */\n    get path() {\n        if (this.root) {\n            // Using replace would remove all part matching root\n            const firstMatch = this.source.indexOf(this.root);\n            return this.source.slice(firstMatch + this.root.length) || '/';\n        }\n        return (this.dirname + '/' + this.basename).replace(/\\/\\//g, '/');\n    }\n    /**\n     * Get the node id if defined.\n     * Will look for the fileid in attributes if undefined.\n     */\n    get fileid() {\n        return this._data?.id || this.attributes?.fileid;\n    }\n    /**\n     * Move the node to a new destination\n     *\n     * @param {string} destination the new source.\n     * e.g. https://cloud.domain.com/remote.php/dav/files/emma/Photos/picture.jpg\n     */\n    move(destination) {\n        validateData({ ...this._data, source: destination }, this._knownDavService);\n        this._data.source = destination;\n        this._data.mtime = new Date();\n    }\n    /**\n     * Rename the node\n     * This aliases the move method for easier usage\n     */\n    rename(basename) {\n        if (basename.includes('/')) {\n            throw new Error('Invalid basename');\n        }\n        this.move(dirname(this.source) + '/' + basename);\n    }\n}\n\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass File extends Node {\n    get type() {\n        return FileType.File;\n    }\n}\n\n/**\n * @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass Folder extends Node {\n    constructor(data) {\n        // enforcing mimes\n        super({\n            ...data,\n            mime: 'httpd/unix-directory'\n        });\n    }\n    get type() {\n        return FileType.Folder;\n    }\n    get extension() {\n        return null;\n    }\n    get mime() {\n        return 'httpd/unix-directory';\n    }\n}\n\n/**\n * @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nclass FileAction {\n    _action;\n    constructor(action) {\n        this.validateAction(action);\n        this._action = action;\n    }\n    get id() {\n        return this._action.id;\n    }\n    get displayName() {\n        return this._action.displayName;\n    }\n    get iconSvgInline() {\n        return this._action.iconSvgInline;\n    }\n    get enabled() {\n        return this._action.enabled;\n    }\n    get exec() {\n        return this._action.exec;\n    }\n    get execBatch() {\n        return this._action.execBatch;\n    }\n    get order() {\n        return this._action.order;\n    }\n    get default() {\n        return this._action.default;\n    }\n    get inline() {\n        return this._action.inline;\n    }\n    get renderInline() {\n        return this._action.renderInline;\n    }\n    validateAction(action) {\n        if (!action.id || typeof action.id !== 'string') {\n            throw new Error('Invalid id');\n        }\n        if (!action.displayName || typeof action.displayName !== 'function') {\n            throw new Error('Invalid displayName function');\n        }\n        if (!action.iconSvgInline || typeof action.iconSvgInline !== 'function') {\n            throw new Error('Invalid iconSvgInline function');\n        }\n        if (!action.exec || typeof action.exec !== 'function') {\n            throw new Error('Invalid exec function');\n        }\n        // Optional properties --------------------------------------------\n        if ('enabled' in action && typeof action.enabled !== 'function') {\n            throw new Error('Invalid enabled function');\n        }\n        if ('execBatch' in action && typeof action.execBatch !== 'function') {\n            throw new Error('Invalid execBatch function');\n        }\n        if ('order' in action && typeof action.order !== 'number') {\n            throw new Error('Invalid order');\n        }\n        if ('default' in action && typeof action.default !== 'boolean') {\n            throw new Error('Invalid default');\n        }\n        if ('inline' in action && typeof action.inline !== 'function') {\n            throw new Error('Invalid inline function');\n        }\n        if ('renderInline' in action && typeof action.renderInline !== 'function') {\n            throw new Error('Invalid renderInline function');\n        }\n    }\n}\nconst registerFileAction = function (action) {\n    if (typeof window._nc_fileactions === 'undefined') {\n        window._nc_fileactions = [];\n        logger.debug('FileActions initialized');\n    }\n    // Check duplicates\n    if (window._nc_fileactions.find(search => search.id === action.id)) {\n        logger.error(`FileAction ${action.id} already registered`, { action });\n        return;\n    }\n    window._nc_fileactions.push(action);\n};\nconst getFileActions = function () {\n    return window._nc_fileactions || [];\n};\n\n/**\n * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n/**\n * Add a new menu entry to the upload manager menu\n */\nconst addNewFileMenuEntry = function (entry) {\n    const newFileMenu = getNewFileMenu();\n    return newFileMenu.registerEntry(entry);\n};\n/**\n * Remove a previously registered entry from the upload menu\n */\nconst removeNewFileMenuEntry = function (entry) {\n    const newFileMenu = getNewFileMenu();\n    return newFileMenu.unregisterEntry(entry);\n};\n/**\n * Get the list of registered entries from the upload menu\n *\n * @param {FileInfo} context the creation context. Usually the current folder FileInfo\n */\nconst getNewFileMenuEntries = function (context) {\n    const newFileMenu = getNewFileMenu();\n    return newFileMenu.getEntries(context);\n};\n\nexport { File, FileAction, FileType, Folder, Node, Permission, addNewFileMenuEntry, formatFileSize, getFileActions, getNewFileMenuEntries, parseWebdavPermissions, registerFileAction, removeNewFileMenuEntry };\n//# sourceMappingURL=index.esm.js.map\n","/**\n * @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\nimport { FileType, Node } from '@nextcloud/files';\nexport const isNodeExternalStorage = function (node) {\n    // Not a folder, not a storage\n    if (node.type === FileType.File) {\n        return false;\n    }\n    // No backend or scope, not a storage\n    const attributes = node.attributes;\n    if (!attributes.scope || !attributes.backend) {\n        return false;\n    }\n    // Specific markers that we're sure are ext storage only\n    return attributes.scope === 'personal' || attributes.scope === 'system';\n};\n","import { generateOcsUrl, generateUrl } from '@nextcloud/router';\nimport { showError, showSuccess } from '@nextcloud/dialogs';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport LoginSvg from '@mdi/svg/svg/login.svg?raw';\nimport Vue from 'vue';\nimport { registerFileAction, FileAction, DefaultType } from '../../../files/src/services/FileAction';\nimport { STORAGE_STATUS, isMissingAuthConfig } from '../utils/credentialsUtils';\nimport { isNodeExternalStorage } from '../utils/externalStorageUtils';\nexport const action = new FileAction({\n    id: 'credentials-external-storage',\n    displayName: () => t('files', 'Enter missing credentials'),\n    iconSvgInline: () => LoginSvg,\n    enabled: (nodes) => {\n        // Only works on single node\n        if (nodes.length !== 1) {\n            return false;\n        }\n        const node = nodes[0];\n        if (!isNodeExternalStorage(node)) {\n            return false;\n        }\n        const config = (node.attributes?.config || {});\n        if (isMissingAuthConfig(config)) {\n            return true;\n        }\n        return false;\n    },\n    async exec(node) {\n        // always resolve auth request, we'll process the data afterwards\n        const response = await axios.get(generateOcsUrl('/apps/files_external/api/v1/auth'), {\n            validateStatus: () => true,\n        });\n        const data = (response?.data || {});\n        if (data.ocs.data.user && data.ocs.data.password) {\n            const configResponse = await axios.put(generateUrl('apps/files_external/userglobalstorages/{id}', node.attributes), {\n                backendOptions: data.ocs.data,\n            });\n            const config = configResponse.data;\n            if (config.status !== STORAGE_STATUS.SUCCESS) {\n                showError(t('files_external', 'Unable to update this external storage config. {statusMessage}', {\n                    statusMessage: config?.statusMessage || '',\n                }));\n                return null;\n            }\n            // Success update config attribute\n            showSuccess(t('files_external', 'New configuration successfully saved'));\n            Vue.set(node.attributes, 'config', config);\n        }\n        return null;\n    },\n    // Before openFolderAction\n    order: -1000,\n    default: DefaultType.DEFAULT,\n    inline: () => true,\n});\nregisterFileAction(action);\n","\n      import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n      import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n      import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n      import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n      import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n      import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n      import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./fileEntryStatus.scss\";\n      \n      \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n      options.insert = insertFn.bind(null, \"head\");\n    \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/sass-loader/dist/cjs.js!./fileEntryStatus.scss\";\n       export default content && content.locals ? content.locals : undefined;\n","import { Folder, Permission } from '@nextcloud/files';\nimport { generateOcsUrl, generateRemoteUrl, generateUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport axios from '@nextcloud/axios';\nimport { STORAGE_STATUS } from '../utils/credentialsUtils';\nexport const rootPath = `/files/${getCurrentUser()?.uid}`;\nconst entryToFolder = (ocsEntry) => {\n    const path = (ocsEntry.path + '/' + ocsEntry.name).replace(/^\\//gm, '');\n    return new Folder({\n        id: ocsEntry.id,\n        source: generateRemoteUrl('dav' + rootPath + '/' + path),\n        root: rootPath,\n        owner: getCurrentUser()?.uid || null,\n        permissions: ocsEntry.config.status !== STORAGE_STATUS.SUCCESS\n            ? Permission.NONE\n            : ocsEntry?.permissions || Permission.READ,\n        attributes: {\n            displayName: path,\n            ...ocsEntry,\n        },\n    });\n};\nexport const getContents = async () => {\n    const response = await axios.get(generateOcsUrl('apps/files_external/api/v1/mounts'));\n    const contents = response.data.ocs.data.map(entryToFolder);\n    return {\n        folder: new Folder({\n            id: 0,\n            source: generateRemoteUrl('dav' + rootPath),\n            root: rootPath,\n            owner: getCurrentUser()?.uid || null,\n            permissions: Permission.READ,\n        }),\n        contents,\n    };\n};\nexport const getStatus = function (id, global = true) {\n    const type = global ? 'userglobalstorages' : 'userstorages';\n    return axios.get(generateUrl(`apps/files_external/${type}/${id}?testOnly=false`));\n};\n","import { showWarning } from '@nextcloud/dialogs';\nimport { translate as t } from '@nextcloud/l10n';\nimport AlertSvg from '@mdi/svg/svg/alert-circle.svg?raw';\nimport Vue from 'vue';\nimport '../css/fileEntryStatus.scss';\nimport { getStatus } from '../services/externalStorage';\nimport { isMissingAuthConfig, STORAGE_STATUS } from '../utils/credentialsUtils';\nimport { isNodeExternalStorage } from '../utils/externalStorageUtils';\nimport { registerFileAction, FileAction } from '../../../files/src/services/FileAction';\nexport const action = new FileAction({\n    id: 'check-external-storage',\n    displayName: () => '',\n    iconSvgInline: () => '',\n    enabled: (nodes) => {\n        return nodes.every(node => isNodeExternalStorage(node) === true);\n    },\n    exec: async () => null,\n    /**\n     * Use this function to check the storage availability\n     * We then update the node attributes directly.\n     */\n    async renderInline(node) {\n        let config = null;\n        try {\n            const response = await getStatus(node.attributes.id, node.attributes.scope === 'system');\n            config = response.data;\n            Vue.set(node.attributes, 'config', config);\n            if (config.status !== STORAGE_STATUS.SUCCESS) {\n                throw new Error(config?.statusMessage || t('files_external', 'There was an error with this external storage.'));\n            }\n            return null;\n        }\n        catch (error) {\n            // If axios failed or if something else prevented\n            // us from getting the config\n            if (error.response && !config) {\n                showWarning(t('files_external', 'We were unable to check the external storage {basename}', {\n                    basename: node.basename,\n                }));\n                return null;\n            }\n            // Checking if we really have an error\n            const isWarning = isMissingAuthConfig(config);\n            const overlay = document.createElement('span');\n            overlay.classList.add(`files-list__row-status--${isWarning ? 'warning' : 'error'}`);\n            const span = document.createElement('span');\n            span.className = 'files-list__row-status';\n            // Only show an icon for errors, warning like missing credentials\n            // have a dedicated inline action button\n            if (!isWarning) {\n                span.innerHTML = AlertSvg;\n                span.title = error.message;\n            }\n            span.prepend(overlay);\n            return span;\n        }\n    },\n    order: 10,\n});\nregisterFileAction(action);\n","import { generateUrl } from '@nextcloud/router';\nimport { translate as t } from '@nextcloud/l10n';\nimport { registerFileAction, FileAction, DefaultType } from '../../../files/src/services/FileAction';\nimport { STORAGE_STATUS } from '../utils/credentialsUtils';\nexport const action = new FileAction({\n    id: 'open-in-files-external-storage',\n    displayName: (nodes) => {\n        const config = nodes?.[0]?.attributes?.config || { status: STORAGE_STATUS.INDETERMINATE };\n        if (config.status !== STORAGE_STATUS.SUCCESS) {\n            return t('files_external', 'Examine this faulty external storage configuration');\n        }\n        return t('files', 'Open in files');\n    },\n    iconSvgInline: () => '',\n    enabled: (nodes, view) => view.id === 'extstoragemounts',\n    async exec(node) {\n        const config = node.attributes.config;\n        if (config?.status !== STORAGE_STATUS.SUCCESS) {\n            window.OC.dialogs.confirm(t('files_external', 'There was an error with this external storage. Do you want to review this mount point config in the settings page?'), t('files_external', 'External mount error'), (redirect) => {\n                if (redirect === true) {\n                    const scope = node.attributes.scope === 'personal' ? 'user' : 'admin';\n                    window.location.href = generateUrl(`/settings/${scope}/externalstorages`);\n                }\n            });\n            return null;\n        }\n        // Do not use fileid as we don't have that information\n        // from the external storage api\n        window.OCP.Files.Router.goToRoute(null, // use default route\n        { view: 'files' }, { dir: node.path });\n        return null;\n    },\n    // Before openFolderAction\n    order: -1000,\n    default: DefaultType.HIDDEN,\n});\nregisterFileAction(action);\n","import { translate as t } from '@nextcloud/l10n';\nimport { loadState } from '@nextcloud/initial-state';\nimport FolderNetworkSvg from '@mdi/svg/svg/folder-network.svg?raw';\nimport './actions/enterCredentialsAction';\nimport './actions/inlineStorageCheckAction';\nimport './actions/openInFilesAction';\nimport { getContents } from './services/externalStorage';\nconst allowUserMounting = loadState('files_external', 'allowUserMounting', false);\nconst Navigation = window.OCP.Files.Navigation;\nNavigation.register({\n    id: 'extstoragemounts',\n    name: t('files_external', 'External storage'),\n    caption: t('files_external', 'List of external storage.'),\n    emptyCaption: allowUserMounting\n        ? t('files_external', 'There is no external storage configured. You can configure them in your Personal settings.')\n        : t('files_external', 'There is no external storage configured and you don\\'t have the permission to configure them.'),\n    emptyTitle: t('files_external', 'No external storage'),\n    icon: FolderNetworkSvg,\n    order: 30,\n    columns: [\n        {\n            id: 'storage-type',\n            title: t('files_external', 'Storage type'),\n            render(node) {\n                const backend = node.attributes?.backend || t('files_external', 'Unknown');\n                const span = document.createElement('span');\n                span.textContent = backend;\n                return span;\n            },\n        },\n        {\n            id: 'scope',\n            title: t('files_external', 'Scope'),\n            render(node) {\n                const span = document.createElement('span');\n                let scope = t('files_external', 'Personal');\n                if (node.attributes?.scope === 'system') {\n                    scope = t('files_external', 'System');\n                }\n                span.textContent = scope;\n                return span;\n            },\n        },\n    ],\n    getContents,\n});\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.files-list__row-status{display:flex;width:44px;justify-content:center;align-items:center;height:100%}.files-list__row-status svg{width:24px;height:24px}.files-list__row-status svg path{fill:currentColor}.files-list__row-status--error,.files-list__row-status--warning{position:absolute;display:block;top:0;left:0;right:0;bottom:0;opacity:.1;z-index:-1}.files-list__row-status--error{background:var(--color-error)}.files-list__row-status--warning{background:var(--color-warning)}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files_external/src/css/fileEntryStatus.scss\"],\"names\":[],\"mappings\":\"AAAA,wBACC,YAAA,CACA,UAAA,CACA,sBAAA,CACA,kBAAA,CACA,WAAA,CAEA,4BACC,UAAA,CACA,WAAA,CAEA,iCACC,iBAAA,CAIF,gEAEC,iBAAA,CACA,aAAA,CACA,KAAA,CACA,MAAA,CACA,OAAA,CACA,QAAA,CACA,UAAA,CACA,UAAA,CAGD,+BACC,6BAAA,CAGD,iCACC,+BAAA\",\"sourcesContent\":[\".files-list__row-status {\\n\\tdisplay: flex;\\n\\twidth: 44px;\\n\\tjustify-content: center;\\n\\talign-items: center;\\n\\theight: 100%;\\n\\n\\tsvg {\\n\\t\\twidth: 24px;\\n\\t\\theight: 24px;\\n\\n\\t\\tpath {\\n\\t\\t\\tfill: currentColor;\\n\\t\\t}\\n\\t}\\n\\n\\t&--error,\\n\\t&--warning {\\n\\t\\tposition: absolute;\\n\\t\\tdisplay: block;\\n\\t\\ttop: 0;\\n\\t\\tleft: 0;\\n\\t\\tright: 0;\\n\\t\\tbottom: 0;\\n\\t\\topacity: .1;\\n\\t\\tz-index: -1;\\n\\t}\\n\\n\\t&--error {\\n\\t\\tbackground: var(--color-error);\\n\\t}\\n\\n\\t&--warning {\\n\\t\\tbackground: var(--color-warning);\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 4692;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t4692: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], () => (__webpack_require__(37935)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","getLoggerBuilder","setApp","detectUser","build","DefaultType","FileAction","constructor","action","this","validateAction","_action","id","displayName","iconSvgInline","enabled","exec","execBatch","order","default","inline","renderInline","Error","Object","values","includes","registerFileAction","window","_nc_fileactions","logger","debug","find","search","error","concat","push","STORAGE_STATUS","isMissingAuthConfig","config","status","SUCCESS","userProvided","authMechanism","user","FileType","Permission","setUid","uid","isDavRessource","source","davService","match","validateData","data","URL","e","startsWith","mtime","Date","crtime","mime","size","permissions","NONE","ALL","owner","attributes","root","service","join","Node","_data","_attributes","_knownDavService","handler","set","target","prop","value","Reflect","deleteProperty","Proxy","replace","basename","extension","extname","dirname","firstMatch","indexOf","slice","length","url","pathname","undefined","READ","split","pop","path","fileid","move","destination","rename","Folder","super","type","isNodeExternalStorage","node","File","scope","backend","t","nodes","_node$attributes","async","response","axios","get","generateOcsUrl","validateStatus","ocs","password","put","generateUrl","backendOptions","showError","statusMessage","showSuccess","Vue","DEFAULT","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","rootPath","_getCurrentUser","getCurrentUser","entryToFolder","ocsEntry","_getCurrentUser2","name","generateRemoteUrl","every","arguments","getStatus","_config","showWarning","isWarning","overlay","document","createElement","classList","add","span","className","innerHTML","title","message","prepend","_nodes$","_nodes$$attributes","INDETERMINATE","view","OC","dialogs","confirm","redirect","location","href","OCP","Files","Router","goToRoute","dir","HIDDEN","allowUserMounting","loadState","Navigation","register","caption","emptyCaption","emptyTitle","icon","columns","render","textContent","_node$attributes2","getContents","_getCurrentUser3","contents","map","folder","___CSS_LOADER_EXPORT___","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","call","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","keys","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","g","globalThis","Function","obj","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","children","b","baseURI","self","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","forEach","bind","nc","__webpack_exports__"],"sourceRoot":""}