{"version":3,"file":"photos-src_mixins_FilesByMonthMixin_js-src_components_Actions_ActionDownload_vue-src_components_Acti-14f64d.js?v=08a39e93c03bb9c904fc","mappings":";wuCAsBA,SACCA,KAAM,oBAENC,SAAU,CAITC,eAAc,WAAG,IAEwB,EAFxB,OACVC,EAAe,CAAC,EAAC,IACFC,KAAKC,gBAAc,IAAxC,IAAK,EAAL,qBAA0C,KAE/B,EAFAC,EAAM,QACVC,EAAOH,KAAKI,MAAMF,GACxB,GAAIC,EACHJ,EAAaI,EAAKE,OAAiC,QAA3B,EAAGN,EAAaI,EAAKE,cAAM,QAAI,GACvDN,EAAaI,EAAKE,OAAOC,KAAKH,EAAKI,OAErC,CAEA,+BAIA,OAHAC,OAAOC,KAAKV,GACVW,SAAQ,SAAAL,GAAK,OAAIN,EAAaM,GAAOM,KAAK,EAAKC,qBAAqB,IAE/Db,CACR,EAKAc,WAAU,WACT,OAAOL,OACLC,KAAKT,KAAKF,gBACVa,MAAK,SAACG,EAAQC,GAAM,OAAKD,EAASC,GAAU,EAAI,CAAC,GACpD,GAGDC,QAAS,CAMRJ,qBAAoB,SAACK,EAASC,GAC7B,OAAOlB,KAAKI,MAAMa,GAASE,UAAYnB,KAAKI,MAAMc,GAASC,WAAa,EAAI,CAC7E,sCChEF,itBCqCA,MCrCqL,EDqCrL,CACAvB,KAAAA,iBAEAwB,WAAAA,CACAC,sBAAAA,IAGAC,MAAAA,CACAC,MAAAA,CACAC,KAAAA,OACAC,UAAAA,GAGAC,gBAAAA,CACAF,KAAAA,MACAC,UAAAA,IAIA5B,SAAAA,EAAAA,EAAAA,CAAAA,GACA8B,EAAAA,EAAAA,IAAAA,CACA,WACA,IAEAC,YAAAA,WACA,0BACA,gFAGA,OAFAC,EAAAA,OAAAA,QAAAA,KAAAA,UAAAA,KAEA,4DACA,EAEAC,UAAAA,WAAA,WACA,0EACA,KErDA,SAXgB,cACd,GHRW,WAAkB,IAAIC,EAAI/B,KAAqB,OAAOgC,EAApBD,EAAIE,M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MD,GAAG,OAAQD,EAAIU,wBAAyBT,EAAG,iBAAiB,CAACE,MAAM,CAAC,qBAAoB,EAAK,aAAaH,EAAIgB,EAAE,SAAU,+BAA+BC,GAAG,CAAC,MAAQjB,EAAIY,oBAAoB,CAACZ,EAAII,GAAG,OAAOJ,EAAIK,GAAGL,EAAIgB,EAAE,SAAU,+BAA+B,QAAQf,EAAG,OAAO,CAACE,MAAM,CAAC,KAAO,QAAQe,KAAK,UAAU,GAAGjB,EAAG,iBAAiB,CAACE,MAAM,CAAC,qBAAoB,EAAK,aAAaH,EAAIgB,EAAE,SAAU,oCAAoCC,GAAG,CAAC,MAAQjB,EAAIe,sBAAsB,CAACf,EAAII,GAAG,OAAOJ,EAAIK,GAAGL,EAAIgB,EAAE,SAAU,oCAAoC,QAAQf,EAAG,OAAO,CAACE,MAAM,CAAC,KAAO,QAAQe,KAAK,UAAU,EACppB,GACsB,IGSpB,EACA,KACA,KACA,MAI8B","sources":["webpack:///photos/src/mixins/FilesByMonthMixin.js","webpack://photos/./src/components/Actions/ActionDownload.vue?5329","webpack:///photos/src/components/Actions/ActionDownload.vue","webpack:///photos/src/components/Actions/ActionDownload.vue?vue&type=script&lang=js&","webpack://photos/./src/components/Actions/ActionDownload.vue?3d40","webpack://photos/./src/components/Actions/ActionFavorite.vue?537d","webpack:///photos/src/components/Actions/ActionFavorite.vue","webpack:///photos/src/components/Actions/ActionFavorite.vue?vue&type=script&lang=js&","webpack://photos/./src/components/Actions/ActionFavorite.vue?4be4"],"sourcesContent":["/**\n * @copyright Copyright (c) 2022 Louis Chemineau \n *\n * @author Louis Chemineau \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 .\n *\n */\n\nexport default {\n\tname: 'FilesByMonthMixin',\n\n\tcomputed: {\n\t\t/**\n\t\t * @return {object}\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\tif (file) {\n\t\t\t\t\tfilesByMonth[file.month] = filesByMonth[file.month] ?? []\n\t\t\t\t\tfilesByMonth[file.month].push(file.fileid)\n\t\t\t\t}\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\tmethods: {\n\t\t/**\n\t\t * @param {string} fileId1 The first file ID\n\t\t * @param {string} fileId2 The second file ID\n\t\t * @return {-1 | 1}\n\t\t */\n\t\tsortFilesByTimestamp(fileId1, fileId2) {\n\t\t\treturn this.files[fileId1].timestamp > this.files[fileId2].timestamp ? -1 : 1\n\t\t},\n\t},\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('NcActionLink',{attrs:{\"close-after-click\":true,\"href\":_vm.downloadUrl,\"download\":_vm.downloadUrl,\"aria-label\":_vm.title}},[_vm._v(\"\\n\\t\"+_vm._s(_vm.title)+\"\\n\\t\"),_vm._t(\"icon\",null,{\"slot\":\"icon\"})],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ActionDownload.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!./ActionDownload.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ActionDownload.vue?vue&type=template&id=c26f867a&\"\nimport script from \"./ActionDownload.vue?vue&type=script&lang=js&\"\nexport * from \"./ActionDownload.vue?vue&type=script&lang=js&\"\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 null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.shouldFavoriteSelection)?_c('NcActionButton',{attrs:{\"close-after-click\":true,\"aria-label\":_vm.t('photos', 'Mark selection as favorite')},on:{\"click\":_vm.favoriteSelection}},[_vm._v(\"\\n\\t\"+_vm._s(_vm.t('photos', 'Add selection to favorites'))+\"\\n\\t\"),_c('Star',{attrs:{\"slot\":\"icon\"},slot:\"icon\"})],1):_c('NcActionButton',{attrs:{\"close-after-click\":true,\"aria-label\":_vm.t('photos', 'Remove selection from favorites')},on:{\"click\":_vm.unFavoriteSelection}},[_vm._v(\"\\n\\t\"+_vm._s(_vm.t('photos', 'Remove selection from favorites'))+\"\\n\\t\"),_c('Star',{attrs:{\"slot\":\"icon\"},slot:\"icon\"})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ActionFavorite.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!./ActionFavorite.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./ActionFavorite.vue?vue&type=template&id=16c16c0a&\"\nimport script from \"./ActionFavorite.vue?vue&type=script&lang=js&\"\nexport * from \"./ActionFavorite.vue?vue&type=script&lang=js&\"\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 null,\n null\n \n)\n\nexport default component.exports"],"names":["name","computed","fileIdsByMonth","filesByMonth","this","fetchedFileIds","fileId","file","files","month","push","fileid","Object","keys","forEach","sort","sortFilesByTimestamp","monthsList","month1","month2","methods","fileId1","fileId2","timestamp","components","NcActionLink","props","title","type","required","selectedFileIds","mapGetters","downloadUrl","params","fileNames","_vm","_c","_self","attrs","_v","_s","_t","i","Star","NcActionButton","shouldFavoriteSelection","mapActions","favoriteSelection","fileIds","favoriteState","unFavoriteSelection","t","on","slot"],"sourceRoot":""}