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SAAWC,KAAKC,SAASC,KAK1D,IAAIC,EAAkB,CACrB,KAAM,GAaPtD,EAAoBQ,EAAES,EAAKsC,GAA0C,IAA7BD,EAAgBC,GAGxD,IAAIC,EAAuB,CAACC,EAA4BzM,KACvD,IAKIiJ,EAAUsD,EALV7C,EAAW1J,EAAK,GAChB0M,EAAc1M,EAAK,GACnB2M,EAAU3M,EAAK,GAGI+J,EAAI,EAC3B,GAAGL,EAASkD,MAAM5L,GAAgC,IAAxBsL,EAAgBtL,KAAa,CACtD,IAAIiI,KAAYyD,EACZ1D,EAAoB6B,EAAE6B,EAAazD,KACrCD,EAAoBO,EAAEN,GAAYyD,EAAYzD,IAGhD,GAAG0D,EAAS,IAAIlD,EAASkD,EAAQ3D,EAClC,CAEA,IADGyD,GAA4BA,EAA2BzM,GACrD+J,EAAIL,EAAS1D,OAAQ+D,IACzBwC,EAAU7C,EAASK,GAChBf,EAAoB6B,EAAEyB,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOvD,EAAoBQ,EAAEC,EAAO,EAGjCoD,EAAqBV,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1FU,EAAmBC,QAAQN,EAAqBO,KAAK,KAAM,IAC3DF,EAAmBhE,KAAO2D,EAAqBO,KAAK,KAAMF,EAAmBhE,KAAKkE,KAAKF,G,KClDvF7D,EAAoBgE,QAAKhL,ECGzB,IAAIiL,EAAsBjE,EAAoBQ,OAAExH,EAAW,CAAC,OAAO,IAAOgH,EAAoB,SAC9FiE,EAAsBjE,EAAoBQ,EAAEyD,E","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack://nextcloud/./apps/files_trashbin/src/trashbin.scss?8b2e","webpack:///nextcloud/apps/files_trashbin/src/services/client.ts","webpack:///nextcloud/apps/files_trashbin/src/services/trashbin.ts","webpack:///nextcloud/apps/files_trashbin/src/columns.ts","webpack:///nextcloud/apps/files/src/logger.js","webpack:///nextcloud/apps/files_trashbin/src/actions/restoreAction.ts","webpack:///nextcloud/apps/files_trashbin/src/files-init.ts","webpack:///nextcloud/apps/files_trashbin/src/trashbin.scss","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","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 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!./trashbin.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!./trashbin.scss\";\n export default content && content.locals ? content.locals : undefined;\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { createClient } from 'webdav';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser, getRequestToken, onRequestTokenUpdate } from '@nextcloud/auth';\n// init webdav client\nexport const rootPath = `/trashbin/${getCurrentUser()?.uid}/trash`;\nexport const rootUrl = generateRemoteUrl('dav' + rootPath);\nconst client = createClient(rootUrl);\n// set CSRF token header\nconst setHeaders = (token) => {\n client.setHeaders({\n // Add this so the server knows it is an request from the browser\n 'X-Requested-With': 'XMLHttpRequest',\n // Inject user auth\n requesttoken: token ?? '',\n });\n};\n// refresh headers when request token changes\nonRequestTokenUpdate(setHeaders);\nsetHeaders(getRequestToken());\nexport default client;\n","import { File, Folder, davParsePermissions, getDavNameSpaces, getDavProperties } from '@nextcloud/files';\nimport { generateRemoteUrl, generateUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport client, { rootPath } from './client';\nconst data = `<?xml version=\"1.0\"?>\n<d:propfind ${getDavNameSpaces()}>\n\t<d:prop>\n\t\t<nc:trashbin-filename />\n\t\t<nc:trashbin-deletion-time />\n\t\t<nc:trashbin-original-location />\n\t\t<nc:trashbin-title />\n\t\t<nc:trashbin-deleted-by-id />\n\t\t<nc:trashbin-deleted-by-display-name />\n\t\t${getDavProperties()}\n\t</d:prop>\n</d:propfind>`;\nconst resultToNode = function (node) {\n const permissions = davParsePermissions(node.props?.permissions);\n const owner = getCurrentUser()?.uid;\n const previewUrl = generateUrl('/apps/files_trashbin/preview?fileId={fileid}&x=32&y=32', node.props);\n const nodeData = {\n id: node.props?.fileid || 0,\n source: generateRemoteUrl('dav' + rootPath + node.filename),\n // do not show the mtime column\n // mtime: new Date(node.lastmod),\n mime: node.mime,\n size: node.props?.size || 0,\n permissions,\n owner,\n root: rootPath,\n attributes: {\n ...node,\n ...node.props,\n // Override displayed name on the list\n displayName: node.props?.['trashbin-filename'],\n previewUrl,\n },\n };\n delete nodeData.attributes.props;\n return node.type === 'file'\n ? new File(nodeData)\n : new Folder(nodeData);\n};\nexport const getContents = async (path = '/') => {\n // TODO: use only one request when webdav-client supports it\n // @see https://github.com/perry-mitchell/webdav-client/pull/334\n const rootResponse = await client.stat(path, {\n details: true,\n data,\n });\n const contentsResponse = await client.getDirectoryContents(path, {\n details: true,\n data,\n });\n return {\n folder: resultToNode(rootResponse.data),\n contents: contentsResponse.data.map(resultToNode),\n };\n};\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport moment from '@nextcloud/moment';\nimport { Column, Node } from '@nextcloud/files';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { dirname } from '@nextcloud/paths';\nimport { translate as t } from '@nextcloud/l10n';\nimport Vue from 'vue';\nimport NcUserBubble from '@nextcloud/vue/dist/Components/NcUserBubble.js';\nconst parseOriginalLocation = (node) => {\n const path = node.attributes?.['trashbin-original-location'] !== undefined ? String(node.attributes?.['trashbin-original-location']) : null;\n if (!path) {\n return t('files_trashbin', 'Unknown');\n }\n const dir = dirname(path);\n if (dir === path) { // Node is in root folder\n return t('files_trashbin', 'All files');\n }\n return dir.replace(/^\\//, '');\n};\nconst generateLabel = (userId, displayName) => {\n const currentUserId = getCurrentUser()?.uid;\n if (userId === currentUserId) {\n return t('files_trashbin', 'You');\n }\n if (!userId && !displayName) {\n return t('files_trashbin', 'Unknown');\n }\n return null;\n};\nconst parseDeletedBy = (node) => {\n const userId = node.attributes?.['trashbin-deleted-by-id'] !== undefined ? String(node.attributes?.['trashbin-deleted-by-id']) : null;\n const displayName = node.attributes?.['trashbin-deleted-by-display-name'] !== undefined ? String(node.attributes?.['trashbin-deleted-by-display-name']) : null;\n const label = generateLabel(userId, displayName);\n return {\n userId,\n displayName,\n label,\n };\n};\nconst originalLocation = new Column({\n id: 'original-location',\n title: t('files_trashbin', 'Original location'),\n render(node) {\n const originalLocation = parseOriginalLocation(node);\n const span = document.createElement('span');\n span.title = originalLocation;\n span.textContent = originalLocation;\n return span;\n },\n sort(nodeA, nodeB) {\n const locationA = parseOriginalLocation(nodeA);\n const locationB = parseOriginalLocation(nodeB);\n return locationA.localeCompare(locationB);\n },\n});\nconst deletedBy = new Column({\n id: 'deleted-by',\n title: t('files_trashbin', 'Deleted by'),\n render(node) {\n const { userId, displayName, label } = parseDeletedBy(node);\n if (label) {\n const span = document.createElement('span');\n span.textContent = label;\n return span;\n }\n const UserBubble = Vue.extend(NcUserBubble);\n const propsData = {\n size: 32,\n user: userId ?? undefined,\n displayName: displayName ?? t('files_trashbin', 'Unknown'),\n };\n const userBubble = new UserBubble({ propsData }).$mount().$el;\n return userBubble;\n },\n sort(nodeA, nodeB) {\n const deletedByA = parseDeletedBy(nodeA).label ?? parseDeletedBy(nodeA).displayName ?? t('files_trashbin', 'Unknown');\n const deletedByB = parseDeletedBy(nodeB).label ?? parseDeletedBy(nodeB).displayName ?? t('files_trashbin', 'Unknown');\n return deletedByA.localeCompare(deletedByB);\n },\n});\nconst deleted = new Column({\n id: 'deleted',\n title: t('files_trashbin', 'Deleted'),\n render(node) {\n const deletionTime = node.attributes?.['trashbin-deletion-time'];\n const span = document.createElement('span');\n if (deletionTime) {\n span.title = moment.unix(deletionTime).format('LLL');\n span.textContent = moment.unix(deletionTime).fromNow();\n return span;\n }\n // Unknown deletion time\n span.textContent = t('files_trashbin', 'A long time ago');\n return span;\n },\n sort(nodeA, nodeB) {\n const deletionTimeA = nodeA.attributes?.['trashbin-deletion-time'] || nodeA?.mtime || 0;\n const deletionTimeB = nodeB.attributes?.['trashbin-deletion-time'] || nodeB?.mtime || 0;\n return deletionTimeB - deletionTimeA;\n },\n});\nexport const columns = [\n originalLocation,\n deletedBy,\n deleted,\n];\n","/**\n * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('files')\n\t.detectUser()\n\t.build()\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport { emit } from '@nextcloud/event-bus';\nimport { generateRemoteUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { Permission, Node, View, registerFileAction, FileAction } from '@nextcloud/files';\nimport { translate as t } from '@nextcloud/l10n';\nimport axios from '@nextcloud/axios';\nimport History from '@mdi/svg/svg/history.svg?raw';\nimport logger from '../../../files/src/logger.js';\nimport { encodePath } from '@nextcloud/paths';\nregisterFileAction(new FileAction({\n id: 'restore',\n displayName() {\n return t('files_trashbin', 'Restore');\n },\n iconSvgInline: () => History,\n enabled(nodes, view) {\n // Only available in the trashbin view\n if (view.id !== 'trashbin') {\n return false;\n }\n // Only available if all nodes have read permission\n return nodes.length > 0 && nodes\n .map(node => node.permissions)\n .every(permission => (permission & Permission.READ) !== 0);\n },\n async exec(node) {\n try {\n const destination = generateRemoteUrl(encodePath(`dav/trashbin/${getCurrentUser()?.uid}/restore/${node.basename}`));\n await axios({\n method: 'MOVE',\n url: node.encodedSource,\n headers: {\n destination,\n },\n });\n // Let's pretend the file is deleted since\n // we don't know the restored location\n emit('files:node:deleted', node);\n return true;\n }\n catch (error) {\n logger.error(error);\n return false;\n }\n },\n async execBatch(nodes, view, dir) {\n return Promise.all(nodes.map(node => this.exec(node, view, dir)));\n },\n order: 1,\n inline: () => true,\n}));\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport './trashbin.scss';\nimport { translate as t } from '@nextcloud/l10n';\nimport DeleteSvg from '@mdi/svg/svg/delete.svg?raw';\nimport { getContents } from './services/trashbin';\nimport { columns } from './columns.ts';\n// Register restore action\nimport './actions/restoreAction';\nimport { View, getNavigation } from '@nextcloud/files';\nconst Navigation = getNavigation();\nNavigation.register(new View({\n id: 'trashbin',\n name: t('files_trashbin', 'Deleted files'),\n caption: t('files_trashbin', 'List of files that have been deleted.'),\n emptyTitle: t('files_trashbin', 'No deleted files'),\n emptyCaption: t('files_trashbin', 'Files and folders you have deleted will show up here'),\n icon: DeleteSvg,\n order: 50,\n sticky: true,\n defaultSortKey: 'deleted',\n columns,\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, `/*!\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */.files-list__row-trashbin-original-location{width:150px !important}`, \"\",{\"version\":3,\"sources\":[\"webpack://./apps/files_trashbin/src/trashbin.scss\"],\"names\":[],\"mappings\":\"AAAA;;;EAAA,CAIA,4CACE,sBAAA\",\"sourcesContent\":[\"/*!\\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\\n * SPDX-License-Identifier: AGPL-3.0-or-later\\n */\\n.files-list__row-trashbin-original-location {\\n width: 150px !important;\\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};","// The chunk loading function for additional chunks\n// Since all referenced chunks are already included\n// in this file, this function is empty here.\n__webpack_require__.e = () => (Promise.resolve());","__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 = 2573;","__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\t2573: 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, [4208], () => (__webpack_require__(79462)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","rootPath","concat","_getCurrentUser","getCurrentUser","uid","rootUrl","generateRemoteUrl","client","createClient","setHeaders","token","requesttoken","onRequestTokenUpdate","getRequestToken","data","getDavNameSpaces","getDavProperties","resultToNode","node","_node$props","_node$props2","_node$props3","_node$props4","permissions","davParsePermissions","props","owner","previewUrl","generateUrl","nodeData","id","fileid","source","filename","mime","size","root","attributes","displayName","type","File","Folder","parseOriginalLocation","_node$attributes","_node$attributes2","path","undefined","String","t","dir","dirname","replace","parseDeletedBy","_node$attributes3","_node$attributes4","_node$attributes5","_node$attributes6","userId","label","generateLabel","originalLocation","Column","title","render","span","document","createElement","textContent","sort","nodeA","nodeB","locationA","locationB","localeCompare","deletedBy","Vue","extend","NcUserBubble","propsData","user","$mount","$el","_ref","_parseDeletedBy$label","_ref2","_parseDeletedBy$label2","deletedByA","deletedByB","deleted","_node$attributes7","deletionTime","moment","unix","format","fromNow","_nodeA$attributes","_nodeB$attributes","deletionTimeA","mtime","columns","getLoggerBuilder","setApp","detectUser","build","registerFileAction","FileAction","iconSvgInline","enabled","nodes","view","length","map","every","permission","Permission","READ","exec","destination","encodePath","basename","axios","method","url","encodedSource","headers","emit","error","logger","execBatch","Promise","all","this","order","inline","getNavigation","register","View","name","caption","emptyTitle","emptyCaption","icon","sticky","defaultSortKey","getContents","async","arguments","rootResponse","stat","details","contentsResponse","getDirectoryContents","folder","contents","___CSS_LOADER_EXPORT___","push","module","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","loaded","__webpack_modules__","call","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","Object","keys","key","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","get","e","resolve","g","globalThis","Function","window","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","value","nmd","paths","children","b","baseURI","self","location","href","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","forEach","bind","nc","__webpack_exports__"],"sourceRoot":""}