photos/js/photos-src_mixins_FilesSele...

1 line
57 KiB
Plaintext

{"version":3,"file":"photos-src_mixins_FilesSelectionMixin_js-src_components_File_vue-src_components_FilesListViewer_vue.js?v=cd6c332ab4fe0f95b7fb","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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACvOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACnOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;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;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ASAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AClHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACnIA;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/File.vue?vue&type=script&lang=js&","webpack:///photos/src/components/FilesListViewer.vue?vue&type=script&lang=js&","webpack:///photos/src/components/TiledLayout/TiledLayout.vue?vue&type=script&lang=js&","webpack:///photos/src/mixins/FilesSelectionMixin.js","webpack:///photos/src/services/TiledLayout.js","webpack:///photos/src/components/File.vue?vue&type=style&index=0&id=ab80f8a8&lang=scss&scoped=true&","webpack:///photos/src/components/FilesListViewer.vue?vue&type=style&index=0&id=3ebf26b2&lang=scss&scoped=true&","webpack:///photos/src/components/TiledLayout/TiledLayout.vue?vue&type=style&index=0&id=d8ebab5e&scoped=true&lang=scss&","webpack:///photos/src/components/TiledLayout/TiledRows.vue?vue&type=style&index=0&id=20864d80&lang=scss&scoped=true&","webpack://photos/./src/components/File.vue?737e","webpack://photos/./src/components/FilesListViewer.vue?9de2","webpack://photos/./src/components/TiledLayout/TiledLayout.vue?2d58","webpack://photos/./src/components/TiledLayout/TiledRows.vue?80a9","webpack:///photos/src/components/File.vue","webpack:///photos/src/components/FilesListViewer.vue","webpack:///photos/src/components/TiledLayout/TiledLayout.vue","webpack:///photos/src/components/TiledLayout/TiledRows.vue","webpack://photos/./src/components/File.vue?5012","webpack://photos/./src/components/FilesListViewer.vue?6af5","webpack://photos/./src/components/TiledLayout/TiledLayout.vue?7e8d","webpack://photos/./src/components/File.vue?147a","webpack://photos/./src/components/FilesListViewer.vue?2e22","webpack://photos/./src/components/TiledLayout/TiledLayout.vue?76c8","webpack://photos/./src/components/TiledLayout/TiledRows.vue?a04f","webpack:///photos/src/components/File.vue?vue&type=template&id=ab80f8a8&scoped=true&","webpack:///photos/src/components/FilesListViewer.vue?vue&type=template&id=3ebf26b2&scoped=true&","webpack:///photos/src/components/TiledLayout/TiledLayout.vue?vue&type=template&id=d8ebab5e&scoped=true&","webpack:///photos/src/components/TiledLayout/TiledRows.vue?vue&type=template&id=20864d80&scoped=true&functional=true&","webpack://photos/./src/components/File.vue?87a8","webpack://photos/./src/components/FilesListViewer.vue?1df8","webpack://photos/./src/components/TiledLayout/TiledLayout.vue?dbe4","webpack://photos/./src/components/TiledLayout/TiledRows.vue?b79e"],"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport Star from 'vue-material-design-icons/Star';\nimport VideoIcon from 'vue-material-design-icons/Video.vue';\nimport { generateRemoteUrl, generateUrl } from '@nextcloud/router';\nimport { getCurrentUser } from '@nextcloud/auth';\nimport { NcCheckboxRadioSwitch } from '@nextcloud/vue';\nimport UserConfig from '../mixins/UserConfig.js';\nimport Semaphore from '../utils/semaphoreWithPriority.js';\nexport default {\n name: 'File',\n components: {\n NcCheckboxRadioSwitch,\n Star,\n VideoIcon\n },\n mixins: [UserConfig],\n inheritAttrs: false,\n props: {\n file: {\n type: Object,\n required: true\n },\n selected: {\n type: Boolean,\n required: true\n },\n allowSelection: {\n type: Boolean,\n default: true\n },\n visibility: {\n type: String,\n required: true\n },\n semaphore: {\n type: Semaphore,\n required: true\n }\n },\n\n data() {\n return {\n loaded: false,\n error: false,\n canLoad: false,\n semaphoreSymbol: null,\n isDestroyed: false\n };\n },\n\n computed: {\n /** @return {string} */\n davPath() {\n return generateRemoteUrl(`dav/files/${getCurrentUser().uid}`) + this.file.filename;\n },\n\n /** @return {string} */\n ariaDescription() {\n return `image-description-${this.file.fileid}`;\n },\n\n /** @return {string} */\n ariaLabel() {\n return t('photos', 'Open the full size \"{name}\" image', {\n name: this.file.basename\n });\n },\n\n /** @return {boolean} */\n isImage() {\n return this.file.mime.startsWith('image');\n },\n\n /** @return {string} */\n decodedEtag() {\n return this.file.etag.replace('&quot;', '').replace('&quot;', '');\n },\n\n /** @return {string} */\n srcVisible() {\n return this.getItemURL(512);\n },\n\n /** @return {string} */\n srcNear() {\n return this.getItemURL(64);\n }\n\n },\n\n mounted() {\n // Don't render the component right away as it is useless if the user is only scrolling\n setTimeout(async () => {\n this.semaphoreSymbol = await this.semaphore.acquire(() => {\n switch (this.visibility) {\n case 'visible':\n return 1;\n\n case 'near':\n return 2;\n\n default:\n return 3;\n }\n }, this.file.fileid);\n this.canLoad = true;\n\n if (this.visibility === 'none' || this.isDestroyed) {\n this.releaseSemaphore();\n }\n }, 250);\n },\n\n beforeDestroy() {\n this.isDestroyed = true;\n this.releaseSemaphore(); // cancel any pending load\n\n if (this.$refs.imgNear !== undefined) {\n this.$refs.imgNear.src = '';\n }\n\n if (this.$refs.srcVisible !== undefined) {\n this.$refs.srcVisible.src = '';\n }\n },\n\n methods: {\n emitClick() {\n this.$emit('click', this.file.fileid);\n },\n\n /** When the image is fully loaded by browser we remove the placeholder */\n onLoad() {\n this.loaded = true;\n this.releaseSemaphore();\n },\n\n onError() {\n this.error = true;\n this.releaseSemaphore();\n },\n\n onToggle(value) {\n this.$emit('select-toggled', {\n id: this.file.fileid,\n value\n });\n },\n\n getItemURL(size) {\n return generateUrl(`/apps/photos/api/v1/preview/${this.file.fileid}?x=${size}&y=${size}`);\n },\n\n releaseSemaphore() {\n if (this.semaphoreSymbol === null) {\n return;\n }\n\n this.semaphore.release(this.semaphoreSymbol);\n this.semaphoreSymbol = null;\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//\n//\n//\n//\n//\n//\n//\nimport { mapGetters } from 'vuex';\nimport { NcEmptyContent, NcLoadingIcon } from '@nextcloud/vue';\nimport TiledLayout from '../components/TiledLayout/TiledLayout.vue';\nimport VirtualScrolling from '../components/VirtualScrolling.vue';\nimport EmptyBox from '../assets/Illustrations/empty.svg';\nexport default {\n name: 'FilesListViewer',\n components: {\n NcEmptyContent,\n NcLoadingIcon,\n TiledLayout,\n VirtualScrolling\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 default: false\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 placeholderFiles: Array(20).fill(0).map((_, index) => {\n const height = 200;\n const width = height * (1 + Math.random() * 2);\n return {\n id: index,\n width,\n height,\n ratio: width / height\n };\n })\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 {boolean} The list of items to pass to TiledLayout.\n */\n showPlaceholders() {\n return this.loading && (this.fileIds?.length === 0 || this.sections?.length === 0);\n },\n\n /**\n * @return {object[]} The list of items to pass to TiledLayout.\n */\n items() {\n if (this.fileIds !== undefined) {\n if (this.showPlaceholders) {\n return this.placeholderFiles;\n }\n\n return this.fileIdsToItems;\n }\n\n if (this.sections !== undefined) {\n if (this.showPlaceholders) {\n return [{\n height: 75,\n sectionHeader: true\n }, ...this.placeholderFiles];\n }\n\n return this.sectionsToItems;\n }\n\n return [];\n },\n\n showLoader() {\n return this.loading && (this.fileIds?.length !== 0 || this.sections?.length !== 0);\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) 2019 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 */\nexport default {\n name: 'FilesSelectionMixin',\n\n data() {\n return {\n /** @type {Object<string, boolean>} */\n selection: {}\n };\n },\n\n methods: {\n onFileSelectToggle(_ref) {\n let {\n id,\n value\n } = _ref;\n this.$set(this.selection, id, value);\n },\n\n /**\n * @param {string[]} filesIds - The ids of the files to uncheck.\n */\n onUncheckFiles(filesIds) {\n filesIds.forEach((\n /** @type {string} */\n filesId) => this.$set(this.selection, filesId, false));\n },\n\n resetSelection() {\n this.selection = {};\n }\n\n },\n computed: {\n /**\n * @return {string[]}\n */\n selectedFileIds() {\n return Object.keys(this.selection).filter(fileId => this.selection[fileId]);\n }\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 */\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, \".file-container[data-v-ab80f8a8] {\\n background: var(--color-primary-light);\\n position: relative;\\n height: 100%;\\n width: 100%;\\n border: 2px solid var(--color-main-background);\\n box-sizing: border-box;\\n}\\n.file-container.selected[data-v-ab80f8a8]::after, .file-container[data-v-ab80f8a8]:focus-within::after {\\n position: absolute;\\n top: 0;\\n left: 0;\\n z-index: 2;\\n width: 100%;\\n height: 100%;\\n content: \\\"\\\";\\n outline: var(--color-primary) solid 4px;\\n outline-offset: -4px;\\n pointer-events: none;\\n}\\n.file-container .file[data-v-ab80f8a8] {\\n width: 100%;\\n height: 100%;\\n box-sizing: border-box;\\n outline: none;\\n}\\n.file-container .file__images[data-v-ab80f8a8] {\\n display: contents;\\n}\\n.file-container .file__images .video-icon[data-v-ab80f8a8] {\\n position: absolute;\\n top: 0px;\\n right: 0px;\\n width: 100%;\\n height: 100%;\\n z-index: 1;\\n opacity: 0.8;\\n}\\n.file-container .file__images .video-icon[data-v-ab80f8a8] .material-design-icon__svg {\\n fill: var(--color-main-background);\\n}\\n.file-container .file__images img[data-v-ab80f8a8] {\\n width: 100%;\\n height: 100%;\\n object-fit: cover;\\n position: absolute;\\n color: transparent;\\n}\\n.file-container .file__images .loading-overlay[data-v-ab80f8a8] {\\n position: absolute;\\n height: 100%;\\n width: 100%;\\n display: flex;\\n align-content: center;\\n align-items: center;\\n justify-content: center;\\n}\\n.file-container .file__images .loading-overlay svg[data-v-ab80f8a8] {\\n width: 70%;\\n height: 70%;\\n}\\n.file-container .file__hidden-description[data-v-ab80f8a8] {\\n position: absolute;\\n left: -10000px;\\n top: -10000px;\\n width: 1px;\\n height: 1px;\\n overflow: hidden;\\n}\\n.file-container .file__hidden-description.show[data-v-ab80f8a8] {\\n position: initial;\\n width: fit-content;\\n height: fit-content;\\n}\\n.file-container:hover .selection-checkbox[data-v-ab80f8a8], .file-container.selected .selection-checkbox[data-v-ab80f8a8], .file-container:focus-within .selection-checkbox[data-v-ab80f8a8] {\\n display: flex;\\n}\\n.file-container:hover .favorite-state[data-v-ab80f8a8], .file-container.selected .favorite-state[data-v-ab80f8a8], .file-container:focus-within .favorite-state[data-v-ab80f8a8] {\\n display: none;\\n}\\n.file-container .selection-checkbox[data-v-ab80f8a8] {\\n display: none;\\n position: absolute;\\n top: 8px;\\n right: min(22px, 50% - 7px);\\n z-index: 1;\\n width: fit-content;\\n}\\n.file-container .selection-checkbox[data-v-ab80f8a8] .checkbox-radio-switch__label {\\n padding: 10px;\\n box-sizing: border-box;\\n}\\n.file-container .selection-checkbox[data-v-ab80f8a8] .checkbox-radio-switch__label::after {\\n content: \\\"\\\";\\n background: var(--color-primary-light);\\n width: 16px;\\n height: 16px;\\n position: absolute;\\n left: 14px;\\n z-index: -1;\\n}\\n.file-container .selection-checkbox[data-v-ab80f8a8] .checkbox-radio-switch__label .checkbox-radio-switch__icon {\\n margin: 0;\\n}\\n.file-container .selection-checkbox .input-label[data-v-ab80f8a8] {\\n position: fixed;\\n z-index: -1;\\n top: -5000px;\\n left: -5000px;\\n}\\n.file-container .favorite-state[data-v-ab80f8a8] {\\n position: absolute;\\n top: 2px;\\n right: min(2px, 50% - 7px);\\n}\\n.file-container .favorite-state[data-v-ab80f8a8] .material-design-icon__svg {\\n fill: #FC0;\\n}\\n.file-container .favorite-state[data-v-ab80f8a8] .material-design-icon__svg path {\\n stroke: var(--color-primary-light);\\n stroke-width: 1px;\\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, \".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__placeholder[data-v-3ebf26b2] {\\n background: var(--color-primary-light);\\n width: 100%;\\n height: 100%;\\n border: 2px solid var(--color-main-background);\\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-d8ebab5e] {\\n height: 100%;\\n}\\n.tiled-container .tiled-row[data-v-d8ebab5e] {\\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-20864d80] {\\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!./File.vue?vue&type=style&index=0&id=ab80f8a8&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!./File.vue?vue&type=style&index=0&id=ab80f8a8&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!./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=d8ebab5e&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=d8ebab5e&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=20864d80&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=20864d80&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./File.vue?vue&type=template&id=ab80f8a8&scoped=true&\"\nimport script from \"./File.vue?vue&type=script&lang=js&\"\nexport * from \"./File.vue?vue&type=script&lang=js&\"\nimport style0 from \"./File.vue?vue&type=style&index=0&id=ab80f8a8&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 \"ab80f8a8\",\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('ab80f8a8')) {\n api.createRecord('ab80f8a8', component.options)\n } else {\n api.reload('ab80f8a8', component.options)\n }\n module.hot.accept(\"./File.vue?vue&type=template&id=ab80f8a8&scoped=true&\", function () {\n api.rerender('ab80f8a8', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/File.vue\"\nexport default component.exports","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=d8ebab5e&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=d8ebab5e&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 \"d8ebab5e\",\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('d8ebab5e')) {\n api.createRecord('d8ebab5e', component.options)\n } else {\n api.reload('d8ebab5e', component.options)\n }\n module.hot.accept(\"./TiledLayout.vue?vue&type=template&id=d8ebab5e&scoped=true&\", function () {\n api.rerender('d8ebab5e', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/TiledLayout/TiledLayout.vue\"\nexport default component.exports","import { render, staticRenderFns } from \"./TiledRows.vue?vue&type=template&id=20864d80&scoped=true&functional=true&\"\nvar script = {}\nimport style0 from \"./TiledRows.vue?vue&type=style&index=0&id=20864d80&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 \"20864d80\",\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('20864d80')) {\n api.createRecord('20864d80', component.options)\n } else {\n api.rerender('20864d80', component.options)\n }\n module.hot.accept(\"./TiledRows.vue?vue&type=template&id=20864d80&scoped=true&functional=true&\", function () {\n api.rerender('20864d80', {\n render: render,\n staticRenderFns: staticRenderFns\n })\n })\n }\n}\ncomponent.options.__file = \"src/components/TiledLayout/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!./File.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!./File.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!./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&\"","export * from \"-!../../node_modules/style-loader/dist/cjs.js!../../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!./File.vue?vue&type=style&index=0&id=ab80f8a8&lang=scss&scoped=true&\"","export * from \"-!../../node_modules/style-loader/dist/cjs.js!../../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&\"","export * from \"-!../../../node_modules/style-loader/dist/cjs.js!../../../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=d8ebab5e&scoped=true&lang=scss&\"","export * from \"-!../../../node_modules/style-loader/dist/cjs.js!../../../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=20864d80&lang=scss&scoped=true&\"","export * from \"-!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./File.vue?vue&type=template&id=ab80f8a8&scoped=true&\"","export * from \"-!../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FilesListViewer.vue?vue&type=template&id=3ebf26b2&scoped=true&\"","export * from \"-!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TiledLayout.vue?vue&type=template&id=d8ebab5e&scoped=true&\"","export * from \"-!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TiledRows.vue?vue&type=template&id=20864d80&scoped=true&functional=true&\"","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 {\n staticClass: \"file-container\",\n class: { selected: _vm.selected },\n attrs: { \"data-test\": \"media\" },\n },\n [\n _c(\n \"a\",\n {\n staticClass: \"file\",\n attrs: { href: _vm.davPath, \"aria-label\": _vm.ariaLabel },\n on: {\n click: function ($event) {\n $event.stopPropagation()\n $event.preventDefault()\n return _vm.emitClick.apply(null, arguments)\n },\n },\n },\n [\n _c(\n \"div\",\n { staticClass: \"file__images\" },\n [\n _vm.file.mime.includes(\"video\")\n ? _c(\"VideoIcon\", {\n staticClass: \"video-icon\",\n attrs: { size: 64 },\n })\n : _vm._e(),\n _vm._v(\" \"),\n _vm.visibility !== \"none\" && _vm.canLoad && !_vm.error\n ? _c(\"img\", {\n key: _vm.file.basename + \"-near\",\n ref: \"imgNear\",\n attrs: {\n src: _vm.srcNear,\n alt: _vm.file.basename,\n \"aria-describedby\": _vm.ariaDescription,\n },\n on: { load: _vm.onLoad, error: _vm.onError },\n })\n : _vm._e(),\n _vm._v(\" \"),\n _vm.visibility === \"visible\" && _vm.canLoad && !_vm.error\n ? _c(\"img\", {\n key: _vm.file.basename + \"-visible\",\n ref: \"imgVisible\",\n attrs: {\n src: _vm.srcVisible,\n alt: _vm.file.basename,\n \"aria-describedby\": _vm.ariaDescription,\n },\n on: { load: _vm.onLoad, error: _vm.onError },\n })\n : _vm._e(),\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"p\",\n {\n staticClass: \"file__hidden-description\",\n class: { show: _vm.error },\n attrs: { id: _vm.ariaDescription },\n },\n [_vm._v(_vm._s(_vm.file.basename))]\n ),\n ]\n ),\n _vm._v(\" \"),\n _vm.allowSelection\n ? _c(\n \"NcCheckboxRadioSwitch\",\n {\n staticClass: \"selection-checkbox\",\n attrs: { checked: _vm.selected },\n on: { \"update:checked\": _vm.onToggle },\n },\n [\n _c(\"span\", { staticClass: \"input-label\" }, [\n _vm._v(\n _vm._s(\n _vm.t(\"photos\", \"Select image {imageName}\", {\n imageName: _vm.file.basename,\n })\n )\n ),\n ]),\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.file.favorite === 1\n ? _c(\"Star\", {\n staticClass: \"favorite-state\",\n attrs: {\n \"aria-label\": _vm.t(\"photos\", \"The file is in the favorites\"),\n },\n })\n : _vm._e(),\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 { staticClass: \"files-list-viewer\" },\n [\n _vm.emptyMessage !== \"\" && _vm.items.length === 0 && !_vm.loading\n ? _c(\n \"NcEmptyContent\",\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(\n \"VirtualScrolling\",\n {\n attrs: {\n \"use-window\": _vm.useWindow,\n \"container-element\": _vm.containerElement,\n rows: rows,\n \"scroll-to-key\": _vm.scrollToSection,\n },\n on: { \"need-content\": _vm.needContent },\n scopedSlots: _vm._u([\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.showPlaceholders\n ? _c(\"div\", {\n staticClass:\n \"files-list-viewer__placeholder\",\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 ]),\n },\n [\n _vm._v(\" \"),\n _vm.loading && !_vm.showPlaceholders\n ? _c(\"NcLoadingIcon\", {\n staticClass: \"files-list-viewer__loader\",\n attrs: { slot: \"loader\" },\n slot: \"loader\",\n })\n : _vm._e(),\n ],\n 1\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":""}