photos/js/photos-src_mixins_FetchFile...

1 line
22 KiB
XML

{"version":3,"file":"photos-src_mixins_FetchFilesMixin_js-src_mixins_FilesByMonthMixin_js-node_modules_vue-material-desig-ab9ff7.js?v=6b039821627ae8ce4bf1","mappings":";+xCA0Ce,aAAf,gFAAe,kIAAeA,EAAf,+BAAsB,GAAIC,EAA1B,+BAAoC,CAAC,EAEnDA,EAAU,EAAH,CACNC,YAAa,EACbC,UAAW,IACXC,UAAWC,EAAAA,GACXC,WAAW,EACXC,eAAe,GACZN,GAGEO,EAXQ,kBAWeC,EAAAA,EAAAA,MAAiBC,KAIxCC,EAASV,EAAQG,UAAUQ,QAAO,SAACC,EAAKC,GAAN,gBAAkBD,EAAlB,wGAKzBC,EALyB,mCAOrC,IAEGC,EAAcd,EAAQM,cAAR,yHAOjB,GAEGD,EAAYL,EAAQK,UAAR,gBACNU,MAAM,IAAIC,KAAK,GACxBC,KAAI,SAACC,EAAGC,GACR,IAAMC,EAAQC,IAAOC,KAAKC,OAAOC,QAAQ,OAAOC,SAAS,EAAG,KAAKA,SAASN,EAAQ,EAAG,KAC/EO,EAAML,IAAOC,KAAKC,OAAOI,MAAM,OAAOC,IAAI,EAAG,KAAKH,SAASN,EAAQ,EAAG,KAC5E,MAAO,6HAAP,OAKcC,EAAMS,OAAOR,IAAAA,kBAL3B,2JAWcK,EAAIG,OAAOR,IAAAA,kBAXzB,gDAcA,IAAES,KAAK,MAnBQ,WAoBf,GAEH9B,EAAU+B,OAAOC,OAAO,CACvBC,OAAQ,SACRC,QAAS,CACR,eAAgB,YAEjBC,KAAM,4XAAF,OASGC,EAAAA,EATH,4HAcW7B,EAdX,YAcyBR,EAdzB,8LAqBIW,EArBJ,kDAuBGI,EAvBH,2BAwBGT,EAxBH,wRAkCcL,EAAQE,UAlCtB,sDAmCkBF,EAAQC,YAnC1B,+FAuCJoC,MAAM,EACNC,SAAS,GACPtC,GArGW,UAuGSuC,EAAAA,EAAAA,qBAA4B,GAAIvC,GAvGzC,eA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OT,EAAIW,QAAO,GAAO,CAACR,EAAG,MAAM,CAACG,YAAY,4BAA4BC,MAAM,CAAC,KAAOP,EAAIJ,UAAU,MAAQI,EAAIF,KAAK,OAASE,EAAIF,KAAK,QAAU,cAAc,CAACK,EAAG,OAAO,CAACI,MAAM,CAAC,EAAI,8CAA8C,CAAEP,EAAS,MAAEG,EAAG,QAAQ,CAACH,EAAIY,GAAGZ,EAAIa,GAAGb,EAAIP,UAAUO,EAAIc,UAAU,GAC/jB,IDUpB,EACA,KACA,KACA,MAI8B","sources":["webpack:///photos/src/services/PhotoSearch.js","webpack:///photos/src/mixins/FetchFilesMixin.js","webpack:///photos/src/mixins/FilesByMonthMixin.js","webpack:///photos/node_modules/vue-material-design-icons/Delete.vue","webpack:///photos/node_modules/vue-material-design-icons/Delete.vue?vue&type=script&lang=js&","webpack://photos/./node_modules/vue-material-design-icons/Delete.vue?92e1","webpack:///photos/node_modules/vue-material-design-icons/Delete.vue?vue&type=template&id=458c7ecb&","webpack:///photos/node_modules/vue-material-design-icons/Download.vue","webpack:///photos/node_modules/vue-material-design-icons/Download.vue?vue&type=script&lang=js&","webpack://photos/./node_modules/vue-material-design-icons/Download.vue?b226","webpack:///photos/node_modules/vue-material-design-icons/Download.vue?vue&type=template&id=67aea606&"],"sourcesContent":["/**\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 */\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/**\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 */\nexport default async function(path = '', options = {}) {\n\t// default function options\n\toptions = {\n\t\tfirstResult: 0,\n\t\tnbResults: 200,\n\t\tmimesType: allMimes,\n\t\tonThisDay: false,\n\t\tonlyFavorites: false,\n\t\t...options,\n\t}\n\n\tconst prefixPath = `/files/${getCurrentUser().uid}`\n\n\t// generating the search or condition\n\t// based on the allowed mimetypes\n\tconst 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\n\tconst eqFavorites = options.onlyFavorites\n\t\t? `<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\t\t: ''\n\n\tconst onThisDay = options.onThisDay\n\t\t? `<d:or>${Array(20).fill(1)\n\t\t\t.map((_, years) => {\n\t\t\t\tconst start = moment(Date.now()).startOf('day').subtract(3, 'd').subtract(years + 1, 'y')\n\t\t\t\tconst end = moment(Date.now()).endOf('day').add(3, 'd').subtract(years + 1, 'y')\n\t\t\t\treturn `<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\t\t\t}).join('\\n')}</d:or>`\n\t\t: ''\n\n\toptions = Object.assign({\n\t\tmethod: 'SEARCH',\n\t\theaders: {\n\t\t\t'content-Type': 'text/xml',\n\t\t},\n\t\tdata: `<?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\t\tdeep: true,\n\t\tdetails: true,\n\t}, options)\n\n\tconst response = await client.getDirectoryContents('', options)\n\n\treturn response.data\n\t\t.map(data => genFileInfo(data))\n\t\t// remove prefix path from full file path\n\t\t.map(data => ({ ...data, filename: data.filename.replace(prefixPath, '') }))\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\nimport logger from '../services/logger.js'\nimport getPhotos from '../services/PhotoSearch.js'\nimport SemaphoreWithPriority from '../utils/semaphoreWithPriority.js'\nimport AbortControllerMixin from './AbortControllerMixin.js'\n\nexport default {\n\tname: 'FetchFilesMixin',\n\n\tmixins: [\n\t\tAbortControllerMixin,\n\t],\n\n\tdata() {\n\t\treturn {\n\t\t\terrorFetchingFiles: null,\n\t\t\tloadingFiles: false,\n\t\t\tdoneFetchingFiles: false,\n\t\t\tsemaphore: new SemaphoreWithPriority(30),\n\t\t\tfetchSemaphore: new SemaphoreWithPriority(1),\n\t\t\tsemaphoreSymbol: null,\n\t\t\tfetchedFileIds: [],\n\t\t}\n\t},\n\n\twatch: {\n\t\t$route() {\n\t\t\tthis.resetFetchFilesState()\n\t\t},\n\t},\n\n\tmethods: {\n\t\t/**\n\t\t * @param {string} path - Path to pass to getPhotos.\n\t\t * @param {object} options - Options to pass to getPhotos.\n\t\t * @param {string[]} [blacklist=[]] - Array of ids to filter out.\n\t\t * @return {Promise<string[]>} - The next batch of data depending on global offset.\n\t\t */\n\t\tasync fetchFiles(path = '', options = {}, blacklist = []) {\n\t\t\tif (this.doneFetchingFiles || this.loadingFiles) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\tconst semaphoreSymbol = await this.semaphore.acquire(() => 0, 'fetchFiles')\n\t\t\tconst fetchSemaphoreSymbol = await this.fetchSemaphore.acquire()\n\n\t\t\ttry {\n\t\t\t\tthis.errorFetchingFiles = null\n\t\t\t\tthis.loadingFiles = true\n\t\t\t\tthis.semaphoreSymbol = semaphoreSymbol\n\n\t\t\t\tconst numberOfImagesPerBatch = 200\n\n\t\t\t\t// Load next batch of images\n\t\t\t\tconst fetchedFiles = await getPhotos(path, {\n\t\t\t\t\tfirstResult: this.fetchedFileIds.length,\n\t\t\t\t\tnbResults: numberOfImagesPerBatch,\n\t\t\t\t\t...options,\n\t\t\t\t\tsignal: this.abortController.signal,\n\t\t\t\t})\n\n\t\t\t\t// If we get less files than requested that means we got to the end\n\t\t\t\tif (fetchedFiles.length !== numberOfImagesPerBatch) {\n\t\t\t\t\tthis.doneFetchingFiles = true\n\t\t\t\t}\n\n\t\t\t\tconst fileIds = fetchedFiles\n\t\t\t\t\t.map(file => file.fileid)\n\t\t\t\t\t.filter(fileId => !this.fetchedFileIds.includes(fileId)) // Filter to prevent duplicate fileIds.\n\n\t\t\t\tthis.fetchedFileIds.push(\n\t\t\t\t\t...fileIds\n\t\t\t\t\t\t.map((fileId) => fileId.toString())\n\t\t\t\t\t\t.filter((fileId) => !blacklist.includes(fileId))\n\t\t\t\t)\n\n\t\t\t\tthis.$store.dispatch('appendFiles', fetchedFiles)\n\n\t\t\t\tlogger.debug(`[FetchFilesMixin] Fetched ${fileIds.length} new files: `, fileIds)\n\n\t\t\t\treturn fileIds\n\t\t\t} catch (error) {\n\t\t\t\tif (error.response?.status === 404) {\n\t\t\t\t\tthis.errorFetchingFiles = 404\n\t\t\t\t} else if (error.code === 'ERR_CANCELED') {\n\t\t\t\t\treturn []\n\t\t\t\t} else {\n\t\t\t\t\tthis.errorFetchingFiles = error\n\t\t\t\t}\n\n\t\t\t\t// cancelled request, moving on...\n\t\t\t\tlogger.error('Error fetching files', error)\n\t\t\t\tconsole.error(error)\n\t\t\t} finally {\n\t\t\t\tthis.loadingFiles = false\n\t\t\t\tthis.semaphore.release(semaphoreSymbol)\n\t\t\t\tthis.fetchSemaphore.release(fetchSemaphoreSymbol)\n\t\t\t}\n\n\t\t\treturn []\n\t\t},\n\n\t\tresetFetchFilesState() {\n\t\t\tthis.doneFetchingFiles = false\n\t\t\tthis.errorFetchingFiles = null\n\t\t\tthis.loadingFiles = false\n\t\t\tthis.fetchedFileIds = []\n\t\t},\n\t},\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\nexport default {\n\tname: 'FilesByMonthMixin',\n\n\tcomputed: {\n\t\t/**\n\t\t * @return {object<String, []>}\n\t\t */\n\t\tfileIdsByMonth() {\n\t\t\tconst filesByMonth = {}\n\t\t\tfor (const fileId of this.fetchedFileIds) {\n\t\t\t\tconst file = this.files[fileId]\n\t\t\t\tfilesByMonth[file.month] = filesByMonth[file.month] ?? []\n\t\t\t\tfilesByMonth[file.month].push(file.fileid)\n\t\t\t}\n\n\t\t\t// Sort files in sections.\n\t\t\tObject.keys(filesByMonth)\n\t\t\t\t.forEach(month => filesByMonth[month].sort(this.sortFilesByTimestamp))\n\n\t\t\treturn filesByMonth\n\t\t},\n\n\t\t/**\n\t\t * @return {string[]}\n\t\t */\n\t\tmonthsList() {\n\t\t\treturn Object\n\t\t\t\t.keys(this.fileIdsByMonth)\n\t\t\t\t.sort((month1, month2) => month1 > month2 ? -1 : 1)\n\t\t},\n\t},\n}\n","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon delete-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"DeleteIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./Delete.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Delete.vue?vue&type=template&id=458c7ecb&\"\nimport script from \"./Delete.vue?vue&type=script&lang=js&\"\nexport * from \"./Delete.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',_vm._b({staticClass:\"material-design-icon delete-icon\",attrs:{\"aria-hidden\":!_vm.title,\"aria-label\":_vm.title,\"role\":\"img\"},on:{\"click\":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('svg',{staticClass:\"material-design-icon__svg\",attrs:{\"fill\":_vm.fillColor,\"width\":_vm.size,\"height\":_vm.size,\"viewBox\":\"0 0 24 24\"}},[_c('path',{attrs:{\"d\":\"M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon download-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"DownloadIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./Download.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./Download.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Download.vue?vue&type=template&id=67aea606&\"\nimport script from \"./Download.vue?vue&type=script&lang=js&\"\nexport * from \"./Download.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',_vm._b({staticClass:\"material-design-icon download-icon\",attrs:{\"aria-hidden\":!_vm.title,\"aria-label\":_vm.title,\"role\":\"img\"},on:{\"click\":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('svg',{staticClass:\"material-design-icon__svg\",attrs:{\"fill\":_vm.fillColor,\"width\":_vm.size,\"height\":_vm.size,\"viewBox\":\"0 0 24 24\"}},[_c('path',{attrs:{\"d\":\"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }"],"names":["path","options","firstResult","nbResults","mimesType","allMimes","onThisDay","onlyFavorites","prefixPath","getCurrentUser","uid","orMime","reduce","str","mime","eqFavorites","Array","fill","map","_","years","start","moment","Date","now","startOf","subtract","end","endOf","add","format","join","Object","assign","method","headers","data","props","deep","details","client","response","genFileInfo","filename","replace","name","mixins","AbortControllerMixin","errorFetchingFiles","loadingFiles","doneFetchingFiles","semaphore","SemaphoreWithPriority","fetchSemaphore","semaphoreSymbol","fetchedFileIds","watch","$route","this","resetFetchFilesState","methods","fetchFiles","blacklist","acquire","fetchSemaphoreSymbol","numberOfImagesPerBatch","getPhotos","length","signal","abortController","fetchedFiles","fileIds","file","fileid","filter","fileId","includes","push","toString","$store","dispatch","logger","status","code","console","error","release","computed","fileIdsByMonth","filesByMonth","files","month","keys","forEach","sort","sortFilesByTimestamp","monthsList","month1","month2","emits","title","type","String","fillColor","default","size","Number","_vm","_h","$createElement","_c","_self","_b","staticClass","attrs","on","$event","$emit","$attrs","_v","_s","_e"],"sourceRoot":""}