photos/js/photos-src_mixins_FetchFile...

1 line
44 KiB
XML

{"version":3,"file":"photos-src_mixins_FetchFilesMixin_js-src_components_FilesListViewer_vue.js?v=aa5758430faaa17a274b","mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AClMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AACA;;;;;;;;;;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AACA;;;;;;;;;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AACA;;;;;;;;;;;;;;;ACtCA;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack:///photos/src/components/FilesListViewer.vue?vue&type=script&lang=js&","webpack:///photos/src/components/TiledLayout.vue?vue&type=script&lang=js&","webpack:///photos/src/mixins/FetchFilesMixin.js","webpack:///photos/src/services/PhotoSearch.js","webpack:///photos/src/services/TiledLayout.js","webpack:///photos/src/components/FilesListViewer.vue?vue&type=style&index=0&id=3ebf26b2&lang=scss&scoped=true&","webpack:///photos/src/components/TiledLayout.vue?vue&type=style&index=0&id=aaf5cf80&scoped=true&lang=scss&","webpack:///photos/src/components/TiledRows.vue?vue&type=style&index=0&id=332876ef&lang=scss&scoped=true&","webpack://photos/./src/components/FilesListViewer.vue?9de2","webpack://photos/./src/components/TiledLayout.vue?f1f1","webpack://photos/./src/components/TiledRows.vue?bc7e","webpack:///photos/src/components/FilesListViewer.vue","webpack:///photos/src/components/TiledLayout.vue","webpack:///photos/src/components/TiledRows.vue","webpack://photos/./src/components/FilesListViewer.vue?6af5","webpack://photos/./src/components/TiledLayout.vue?ba00","webpack:///photos/src/components/FilesListViewer.vue?vue&type=template&id=3ebf26b2&scoped=true&","webpack:///photos/src/components/TiledLayout.vue?vue&type=template&id=aaf5cf80&scoped=true&","webpack:///photos/src/components/TiledRows.vue?vue&type=template&id=332876ef&scoped=true&functional=true&"],"sourcesContent":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport { mapGetters } from 'vuex';\nimport { EmptyContent } from '@nextcloud/vue';\nimport TiledLayout from '../components/TiledLayout.vue';\nimport VirtualScrolling from '../components/VirtualScrolling.vue';\nimport Loader from '../components/Loader.vue';\nimport EmptyBox from '../assets/Illustrations/empty.svg';\nexport default {\n name: 'FilesListViewer',\n components: {\n EmptyContent,\n TiledLayout,\n VirtualScrolling,\n Loader\n },\n props: {\n // Array of file ids that should be rendered.\n fileIds: {\n type: Array,\n default: undefined\n },\n // An object mapping a list of section to a list of fileIds.\n fileIdsBySection: {\n type: Object,\n default: undefined\n },\n // The list of sorted sections.\n sections: {\n type: Array,\n default: undefined\n },\n // Whether we should display a loading indicator.\n loading: {\n type: Boolean,\n required: true\n },\n // Message to display when there is no files.\n emptyMessage: {\n type: String,\n default: ''\n },\n // The base height to forward to TileLayout.\n baseHeight: {\n type: Number,\n default: 200\n },\n // The height to use for section headers.\n sectionHeaderHeight: {\n type: Number,\n default: 75\n },\n // Instruct VirtualScrolling to scroll to the given section id.\n scrollToSection: {\n type: String,\n default: ''\n },\n // The containerElement props to forward to TileLayout.\n containerElement: {\n type: HTMLElement,\n default: null\n },\n // The useWindow props to forward to TileLayout.\n useWindow: {\n type: Boolean,\n default: false\n }\n },\n\n data() {\n return {\n EmptyBox\n };\n },\n\n computed: { ...mapGetters(['files']),\n\n /**\n * @return {object[]} The list of items to pass to TiledLayout.\n */\n fileIdsToItems() {\n if (this.fileIds === undefined) {\n return [];\n }\n\n return this.fileIds.map(this.mapFileToItem);\n },\n\n /**\n * @return {object[]} The list of items separated by sections to pass to TiledLayout.\n */\n sectionsToItems() {\n if (this.sections === undefined) {\n return [];\n }\n\n return this.sections.flatMap(sectionId => {\n return [{\n id: sectionId,\n sectionHeader: true,\n height: this.sectionHeaderHeight\n }, ...this.fileIdsBySection[sectionId].map(this.mapFileToItem)];\n });\n },\n\n /**\n * @return {object[]} The list of items to pass to TiledLayout.\n */\n items() {\n if (this.fileIds !== undefined) {\n return this.fileIdsToItems;\n }\n\n if (this.sections !== undefined) {\n return this.sectionsToItems;\n }\n\n return [];\n }\n\n },\n methods: {\n // Ask the parent for more content.\n needContent() {\n this.$emit('need-content');\n },\n\n mapFileToItem(fileId) {\n const file = this.files[fileId];\n return {\n id: file.fileid,\n width: file.fileMetadataSizeParsed.width,\n height: file.fileMetadataSizeParsed.height,\n ratio: file.fileMetadataSizeParsed.width / file.fileMetadataSizeParsed.height\n };\n }\n\n }\n};","//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport logger from '../services/logger.js';\nimport { splitItemsInRows } from '../services/TiledLayout.js';\nimport TiledRows from './TiledRows.vue';\nexport default {\n name: 'TiledLayout',\n components: {\n TiledRows\n },\n props: {\n items: {\n type: Array,\n required: true\n },\n baseHeight: {\n type: Number,\n default: 200\n }\n },\n\n data() {\n return {\n containerWidth: 0,\n\n /** @type {ResizeObserver} */\n resizeObserver: null\n };\n },\n\n computed: {\n /** @return {import('../services/TiledLayout.js').TiledRow[]} */\n rows() {\n logger.debug('[TiledLayout] Computing rows', this.items);\n return splitItemsInRows(this.items, this.containerWidth, this.baseHeight);\n }\n\n },\n\n mounted() {\n this.resizeObserver = new ResizeObserver(entries => {\n for (const entry of entries) {\n const cr = entry.contentRect;\n\n if (entry.target.classList.contains('tiled-container')) {\n this.containerWidth = cr.width;\n }\n }\n });\n this.resizeObserver.observe(this.$refs.tiledLayoutContainer);\n },\n\n beforeDestroy() {\n this.resizeObserver.disconnect();\n }\n\n};","/**\n * @copyright Copyright (c) 2022 Louis Chemineau <louis@chmn.me>\n *\n * @author Louis Chemineau <louis@chmn.me>\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 '../services/logger.js';\nimport getPhotos from '../services/PhotoSearch.js';\nimport cancelableRequest from '../utils/CancelableRequest.js';\nimport SemaphoreWithPriority from '../utils/semaphoreWithPriority.js';\nexport default {\n name: 'FetchFilesMixin',\n\n data() {\n return {\n errorFetchingFiles: null,\n loadingFiles: false,\n doneFetchingFiles: false,\n cancelFilesRequest: () => {},\n semaphore: new SemaphoreWithPriority(30),\n fetchSemaphore: new SemaphoreWithPriority(1),\n semaphoreSymbol: null,\n fetchedFileIds: []\n };\n },\n\n beforeDestroy() {\n if (this.cancelFilesRequest) {\n this.cancelFilesRequest('Changed view');\n }\n },\n\n beforeRouteLeave(from, to, next) {\n if (this.cancelFilesRequest) {\n this.cancelFilesRequest('Changed view');\n }\n\n return next();\n },\n\n watch: {\n $route() {\n this.resetFetchFilesState();\n }\n\n },\n methods: {\n /**\n * @param {string} path - Path to pass to getPhotos.\n * @param {object} options - Options to pass to getPhotos.\n * @param {string[]} [blacklist=[]] - Array of ids to filter out.\n * @return {Promise<string[]>} - The next batch of data depending on global offset.\n */\n async fetchFiles() {\n let path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let blacklist = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n\n if (this.doneFetchingFiles || this.loadingFiles) {\n return [];\n }\n\n const semaphoreSymbol = await this.semaphore.acquire(() => 0, 'fetchFiles');\n const fetchSemaphoreSymbol = await this.fetchSemaphore.acquire();\n\n try {\n this.errorFetchingFiles = null;\n this.loadingFiles = true;\n this.semaphoreSymbol = semaphoreSymbol;\n const {\n request,\n cancel\n } = cancelableRequest(getPhotos);\n this.cancelFilesRequest = cancel;\n const numberOfImagesPerBatch = 1000; // Load next batch of images\n\n const fetchedFiles = await request(path, {\n firstResult: this.fetchedFileIds.length,\n nbResults: numberOfImagesPerBatch,\n ...options\n }); // If we get less files than requested that means we got to the end\n\n if (fetchedFiles.length !== numberOfImagesPerBatch) {\n this.doneFetchingFiles = true;\n }\n\n const fileIds = fetchedFiles.map(file => file.fileid).filter(fileId => !this.fetchedFileIds.includes(fileId)); // Filter to prevent duplicate fileIds.\n\n this.fetchedFileIds.push(...fileIds.map(fileId => fileId.toString()).filter(fileId => !blacklist.includes(fileId)));\n this.$store.dispatch('appendFiles', fetchedFiles);\n logger.debug(`[FetchFilesMixin] Fetched ${fileIds.length} new files: `, fileIds);\n return fileIds;\n } catch (error) {\n if (error.response?.status === 404) {\n this.errorFetchingFiles = 404;\n } else if (error.code === 'ERR_CANCELED') {\n return [];\n } else {\n this.errorFetchingFiles = error;\n } // cancelled request, moving on...\n\n\n logger.error('Error fetching files', error);\n } finally {\n this.loadingFiles = false;\n\n this.cancelFilesRequest = () => {};\n\n this.semaphore.release(semaphoreSymbol);\n this.fetchSemaphore.release(fetchSemaphoreSymbol);\n }\n\n return [];\n },\n\n resetFetchFilesState() {\n this.doneFetchingFiles = false;\n this.errorFetchingFiles = null;\n this.loadingFiles = false;\n this.fetchedFileIds = [];\n\n this.cancelFilesRequest = () => {};\n }\n\n }\n};","/**\n * @copyright Copyright (c) 2019 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 { genFileInfo } from '../utils/fileUtils.js';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { allMimes } from './AllowedMimes.js';\nimport client from './DavClient.js';\nimport { props } from './DavRequest.js';\nimport moment from '@nextcloud/moment';\n/**\n * List files from a folder and filter out unwanted mimes\n *\n * @param {object} path the lookup path\n * @param {object} [options] used for the cancellable requests\n * @param {number} [options.firstResult=0] Index of the first result that we want (starts at 0)\n * @param {number} [options.nbResults=200] The number of file to fetch\n * @param {string[]} [options.mimesType=allMimes] Mime type of the files\n * @param {boolean} [options.full=false] get full data of the files\n * @param {boolean} [options.onThisDay=false] get only items from this day of year\n * @param {boolean} [options.onlyFavorites=false] get only favorite items\n * @return {Promise<object[]>} the file list\n */\n\nexport default async function () {\n let path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n // default function options\n options = {\n firstResult: 0,\n nbResults: 200,\n mimesType: allMimes,\n onThisDay: false,\n onlyFavorites: false,\n ...options\n };\n const prefixPath = `/files/${getCurrentUser().uid}`; // generating the search or condition\n // based on the allowed mimetypes\n\n const orMime = options.mimesType.reduce((str, mime) => `${str}\n\t\t<d:eq>\n\t\t\t<d:prop>\n\t\t\t\t<d:getcontenttype/>\n\t\t\t</d:prop>\n\t\t\t<d:literal>${mime}</d:literal>\n\t\t</d:eq>\n\t`, '');\n const eqFavorites = options.onlyFavorites ? `<d:eq>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:favorite/>\n\t\t\t\t</d:prop>\n\t\t\t\t<d:literal>1</d:literal>\n\t\t\t</d:eq>` : '';\n const onThisDay = options.onThisDay ? `<d:or>${Array(20).fill(1).map((_, years) => {\n const start = moment(Date.now()).startOf('day').subtract(3, 'd').subtract(years + 1, 'y');\n const end = moment(Date.now()).endOf('day').add(3, 'd').subtract(years + 1, 'y');\n return `<d:and>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified />\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${start.format(moment.defaultFormatUtc)}</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t\t<d:lt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified />\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>${end.format(moment.defaultFormatUtc)}</d:literal>\n\t\t\t\t</d:lt>\n\t\t\t</d:and>`;\n }).join('\\n')}</d:or>` : '';\n options = Object.assign({\n method: 'SEARCH',\n headers: {\n 'content-Type': 'text/xml'\n },\n data: `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\t\t\t<d:searchrequest xmlns:d=\"DAV:\"\n\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\txmlns:ns=\"https://github.com/icewind1991/SearchDAV/ns\"\n\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t<d:basicsearch>\n\t\t\t\t\t<d:select>\n\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t${props}\n\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t</d:select>\n\t\t\t\t\t<d:from>\n\t\t\t\t\t\t<d:scope>\n\t\t\t\t\t\t\t<d:href>${prefixPath}/${path}</d:href>\n\t\t\t\t\t\t\t<d:depth>infinity</d:depth>\n\t\t\t\t\t\t</d:scope>\n\t\t\t\t\t</d:from>\n\t\t\t\t\t<d:where>\n\t\t\t\t\t\t<d:and>\n\t\t\t\t\t\t\t<d:or>\n\t\t\t\t\t\t\t\t${orMime}\n\t\t\t\t\t\t\t</d:or>\n\t\t\t\t\t\t\t${eqFavorites}\n\t\t\t\t\t\t\t${onThisDay}\n\t\t\t\t\t\t</d:and>\n\t\t\t\t\t</d:where>\n\t\t\t\t\t<d:orderby>\n\t\t\t\t\t\t<d:order>\n\t\t\t\t\t\t\t<d:prop><d:getlastmodified/></d:prop>\n\t\t\t\t\t\t\t<d:descending/>\n\t\t\t\t\t\t</d:order>\n\t\t\t\t\t</d:orderby>\n\t\t\t\t\t<d:limit>\n\t\t\t\t\t\t<d:nresults>${options.nbResults}</d:nresults>\n\t\t\t\t\t\t<ns:firstresult>${options.firstResult}</ns:firstresult>\n\t\t\t\t\t</d:limit>\n\t\t\t\t</d:basicsearch>\n\t\t\t</d:searchrequest>`,\n deep: true,\n details: true\n }, options);\n const response = await client.getDirectoryContents('', options);\n return response.data.map(data => genFileInfo(data)) // remove prefix path from full file path\n .map(data => ({ ...data,\n filename: data.filename.replace(prefixPath, '')\n }));\n}","/**\n * @copyright Copyright (c) 2022 Louis Chemineau <louis@chmn.me>\n *\n * @author Louis Chemineau <louis@chmn.me>\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/**\n * @typedef {object} TiledItem\n * @property {string} id\n * @property {number} [width] Real width of the item.\n * @property {number} height Real height of the item.\n * @property {number} [ratio] The aspect ratio of the item.\n * @property {boolean} [sectionHeader] Whether this row is a section header.\n */\n\n/**\n * @typedef {object} TiledRow\n * @property {TiledItem[]} items -\n * @property {number} height -\n * @property {string} key -\n */\n\n/**\n * Split items in rows of equal width.\n * The last row will not be forced to match containerWidth.\n *\n * @param {TiledItem[]} items The list of item to split in row of equal width.\n * @param {number} containerWidth The width of a row.\n * @param {number} baseHeight The base height of the rows.\n * @return {TiledRow[]}\n */\nexport function splitItemsInRows(items, containerWidth) {\n let baseHeight = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 200;\n\n if (containerWidth === 0) {\n return [];\n }\n\n const rows = [];\n let rowNumber = 0;\n let currentItem = 0;\n\n while (currentItem < items.length) {\n /** @type { TiledItem[] } */\n const rowItems = []; // Fill the row with new items as long as the width is less than containerWidth.\n\n do {\n // @ts-ignore - We know that items.shift() is not undefined as we always check that items.length > 0.\n rowItems.push(items[currentItem++]);\n } while (currentItem < items.length && !items[currentItem - 1].sectionHeader && !items[currentItem].sectionHeader && computeRowWidth([...rowItems, items[currentItem]], baseHeight) <= containerWidth);\n\n rows[rowNumber] = {\n items: rowItems,\n height: computeRowHeight(rowItems, containerWidth, items.length === currentItem || items[currentItem].sectionHeader === true, baseHeight),\n // Key to help vue to keep track of the row in VirtualScrolling.\n key: rowItems.map(item => item.id).join('-')\n };\n rowNumber += 1;\n }\n\n return rows;\n}\n/**\n *\n * @param {TiledItem[]} items The list of items in the row.\n * @param {number} baseHeight The base height of the rows.\n * @return {number} The width of the row\n */\n\nfunction computeRowWidth(items, baseHeight) {\n return items.map(item => baseHeight * item.ratio).reduce((sum, itemWidth) => sum + itemWidth);\n}\n/**\n * Compute the row height based on its items and on the container's width.\n *\n * Math time !\n * With Rn the aspect ratio of item n\n * Wn the width of item n\n * Hn the height of item n\n * Wc the width of the container\n * Hr the height of the row\n * For n items we want: Wc = W1 + W2 + ... + Wn\n * We know Rn = Wn / Hn\n * So Wn = Rn * Hn\n * So Wc = (R1 * H1) + (R2 * H2) + ... + (Rn * Hn)\n * But we also want Hr === H1 === H2 === ... === Hn\n * So Wc = (R1 * Hr) + (R2 * Hr) + ... + (Rn * Hr)\n * So Wc = Hr * (R1 + R2 + ... + Rn)\n * So Hr = Wc / (R1 + R2 + ... + Rn)\n *\n * @param {TiledItem[]} items The list of items in the row.\n * @param {number} containerWidth The width of the row.\n * @param {boolean} isLastRow Whether we are computing the height for the last row.\n * @param {number} baseHeight The base height of the rows.\n * @return {number} The height of the row\n */\n\n\nfunction computeRowHeight(items, containerWidth, isLastRow, baseHeight) {\n // Exception 1: there is only one item and its width it is a sectionHeader, meaning take the full width.\n if (items.length === 1 && items[0].sectionHeader) {\n return items[0].height;\n }\n\n const sumOfItemsRatio = items.map(item => item.ratio).reduce((sum, itemRatio) => sum + itemRatio);\n let rowHeight = containerWidth / sumOfItemsRatio; // Exception 2: there is only one item which is larger than containerWidth.\n // Limit its height so that itemWidth === containerWidth\n\n if (items.length === 1 && items[0].width > containerWidth) {\n rowHeight = containerWidth / items[0].ratio;\n } // Exception 3: we reached the last row.\n // Force the items width to match containerWidth, and limit their heigh to baseHeight + 20.\n\n\n if (isLastRow) {\n rowHeight = Math.min(baseHeight + 20, rowHeight);\n }\n\n return rowHeight;\n}","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.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_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".files-list-viewer[data-v-3ebf26b2] {\\n height: 100%;\\n position: relative;\\n}\\n.files-list-viewer[data-v-3ebf26b2] .empty-content__icon {\\n width: 200px;\\n height: 200px;\\n}\\n.files-list-viewer[data-v-3ebf26b2] .empty-content__icon .empty-content-illustration svg {\\n width: 200px;\\n height: 200px;\\n}\\n.files-list-viewer .tiled-row[data-v-3ebf26b2] {\\n display: flex;\\n}\\n.files-list-viewer__section-header[data-v-3ebf26b2] {\\n position: sticky;\\n top: 0;\\n z-index: 3;\\n background: var(--color-main-background);\\n}\\n.files-list-viewer__loader[data-v-3ebf26b2] {\\n margin: 50px 0;\\n}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.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_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".tiled-container[data-v-aaf5cf80] {\\n height: 100%;\\n}\\n.tiled-container .tiled-row[data-v-aaf5cf80] {\\n display: flex;\\n}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.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_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".tiled-row[data-v-332876ef] {\\n display: flex;\\n}\", \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\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/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FilesListViewer.vue?vue&type=style&index=0&id=3ebf26b2&lang=scss&scoped=true&\";\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/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FilesListViewer.vue?vue&type=style&index=0&id=3ebf26b2&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\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/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TiledLayout.vue?vue&type=style&index=0&id=aaf5cf80&scoped=true&lang=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/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TiledLayout.vue?vue&type=style&index=0&id=aaf5cf80&scoped=true&lang=scss&\";\n export default content && content.locals ? content.locals : undefined;\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/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TiledRows.vue?vue&type=style&index=0&id=332876ef&lang=scss&scoped=true&\";\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/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TiledRows.vue?vue&type=style&index=0&id=332876ef&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./FilesListViewer.vue?vue&type=template&id=3ebf26b2&scoped=true&\"\nimport script from \"./FilesListViewer.vue?vue&type=script&lang=js&\"\nexport * from \"./FilesListViewer.vue?vue&type=script&lang=js&\"\nimport style0 from \"./FilesListViewer.vue?vue&type=style&index=0&id=3ebf26b2&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"3ebf26b2\",\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/home/louis/workspace/nextcloud/apps/photos/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('3ebf26b2')) {\n api.createRecord('3ebf26b2', component.options)\n } else {\n api.reload('3ebf26b2', component.options)\n }\n module.hot.accept(\"./FilesListViewer.vue?vue&type=template&id=3ebf26b2&scoped=true&\", function () {\n api.rerender('3ebf26b2', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/FilesListViewer.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./TiledLayout.vue?vue&type=template&id=aaf5cf80&scoped=true&\"\nimport script from \"./TiledLayout.vue?vue&type=script&lang=js&\"\nexport * from \"./TiledLayout.vue?vue&type=script&lang=js&\"\nimport style0 from \"./TiledLayout.vue?vue&type=style&index=0&id=aaf5cf80&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"aaf5cf80\",\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/home/louis/workspace/nextcloud/apps/photos/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('aaf5cf80')) {\n api.createRecord('aaf5cf80', component.options)\n } else {\n api.reload('aaf5cf80', component.options)\n }\n module.hot.accept(\"./TiledLayout.vue?vue&type=template&id=aaf5cf80&scoped=true&\", function () {\n api.rerender('aaf5cf80', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/TiledLayout.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./TiledRows.vue?vue&type=template&id=332876ef&scoped=true&functional=true&\"\nvar script = {}\nimport style0 from \"./TiledRows.vue?vue&type=style&index=0&id=332876ef&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n true,\n null,\n \"332876ef\",\n null\n \n)\n\n/* hot reload */\nif (module.hot) {\n var api = require(\"/home/louis/workspace/nextcloud/apps/photos/node_modules/vue-hot-reload-api/dist/index.js\")\n api.install(require('vue'))\n if (api.compatible) {\n module.hot.accept()\n if (!api.isRecorded('332876ef')) {\n api.createRecord('332876ef', component.options)\n } else {\n api.rerender('332876ef', component.options)\n }\n module.hot.accept(\"./TiledRows.vue?vue&type=template&id=332876ef&scoped=true&functional=true&\", function () {\n api.rerender('332876ef', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/TiledRows.vue\"\nexport default component.exports","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FilesListViewer.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FilesListViewer.vue?vue&type=script&lang=js&\"","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TiledLayout.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TiledLayout.vue?vue&type=script&lang=js&\"","var render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"files-list-viewer\" },\n [\n _vm.emptyMessage !== \"\" && _vm.items.length === 0 && !_vm.loading\n ? _c(\n \"EmptyContent\",\n {\n key: \"emptycontent\",\n scopedSlots: _vm._u(\n [\n {\n key: \"icon\",\n fn: function () {\n return [\n _c(\"span\", {\n staticClass: \"empty-content-illustration\",\n domProps: { innerHTML: _vm._s(_vm.EmptyBox) },\n }),\n ]\n },\n proxy: true,\n },\n ],\n null,\n false,\n 3410044941\n ),\n },\n [_vm._v(\"\\n\\t\\t\" + _vm._s(_vm.emptyMessage) + \"\\n\\t\")]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"TiledLayout\", {\n attrs: { \"base-height\": _vm.baseHeight, items: _vm.items },\n scopedSlots: _vm._u([\n {\n key: \"default\",\n fn: function (ref) {\n var rows = ref.rows\n return _c(\"VirtualScrolling\", {\n attrs: {\n \"use-window\": _vm.useWindow,\n rows: rows,\n \"scroll-to-key\": _vm.scrollToSection,\n },\n on: { \"need-content\": _vm.needContent },\n scopedSlots: _vm._u(\n [\n {\n key: \"default\",\n fn: function (ref) {\n var renderedRows = ref.renderedRows\n return _c(\n \"ul\",\n {},\n _vm._l(renderedRows, function (row) {\n return _c(\n \"div\",\n {\n key: row.key,\n staticClass: \"tiled-row\",\n class: {\n \"files-list-viewer__section-header\":\n row.items[0].sectionHeader,\n },\n style: { height: row.height + \"px\" },\n },\n _vm._l(row.items, function (item) {\n return _c(\n \"li\",\n {\n key: item.id,\n style: {\n width: item.ratio\n ? row.height * item.ratio + \"px\"\n : \"100%\",\n height: row.height + \"px\",\n },\n },\n [\n _vm._t(\"default\", null, {\n file: item,\n visibility: row.visibility,\n }),\n ],\n 2\n )\n }),\n 0\n )\n }),\n 0\n )\n },\n },\n _vm.loading\n ? {\n key: \"loader\",\n fn: function () {\n return [\n _c(\"Loader\", {\n staticClass: \"files-list-viewer__loader\",\n }),\n ]\n },\n proxy: true,\n }\n : null,\n ],\n null,\n true\n ),\n })\n },\n },\n ]),\n }),\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","var render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { ref: \"tiledLayoutContainer\", staticClass: \"tiled-container\" },\n [\n _vm._t(\n \"default\",\n function () {\n return [_c(\"TiledRows\", { attrs: { rows: _vm.rows } })]\n },\n { rows: _vm.rows }\n ),\n ],\n 2\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","var render = function (_h, _vm) {\n var _c = _vm._c\n return _c(\n \"ul\",\n _vm._l(_vm.props.rows, function (row) {\n return _c(\n \"div\",\n {\n key: row.key,\n staticClass: \"tiled-row\",\n style: { height: row.height + \"px\" },\n },\n _vm._l(row.items, function (item) {\n return _c(\n \"li\",\n {\n key: item.id,\n style: {\n width: item.ratio ? row.height * item.ratio + \"px\" : \"100%\",\n height: row.height + \"px\",\n },\n },\n [_vm._t(\"default\", null, { row: row, item: item })],\n 2\n )\n }),\n 0\n )\n }),\n 0\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }"],"names":[],"sourceRoot":""}