photos/js/photos-src_mixins_FetchAlbu...

1 line
45 KiB
XML

{"version":3,"file":"photos-src_mixins_FetchAlbumsMixin_js-node_modules_vue-material-design-icons_Plus_vue-src_components-4c933a.js?v=8b6bc46e1fb163d29c23","mappings":";2yCAiCA,SACCA,KAAM,mBAENC,KAHc,WAIb,MAAO,CACNC,oBAAqB,KACrBC,eAAe,EACfC,oBAAqB,eAIjBC,YAXQ,WAWM,0IACnB,EAAKC,cADc,8CAIpBC,cAfc,WAgBbC,KAAKJ,oBAAoB,iBAG1BK,SAAU,EAAF,IACJC,EAAAA,EAAAA,IAAW,CACb,YAIFC,QAAS,CACFL,YADE,WACY,gKACf,EAAKH,cADU,iEAMlB,EAAKA,eAAgB,EACrB,EAAKD,oBAAsB,KAPT,GASUU,EAAAA,EAAAA,GAAkBC,EAAAA,EAAAA,sBAAtCC,EATU,EASVA,QAASC,EATC,EASDA,OACjB,EAAKX,oBAAsBW,EAVT,SAYKD,EAAQ,WAAD,kBAAYE,EAAAA,EAAAA,yBAAZ,aAAY,EAAkBC,IAA9B,WAA4C,CACzEhB,KAAM,idAYNiB,SAAS,IAzBQ,OAYZC,EAZY,OA4BZC,EAASD,EAASlB,KACtBoB,QAAO,SAAAC,GAAK,MAAuB,yBAAnBA,EAAMC,YACtBC,KAAI,SAAAF,GAAK,OAAIG,EAAAA,EAAAA,IAAYH,MACzBE,KAAI,SAAAF,GAAS,QACPI,EAAYC,KAAKC,MAAL,oBAAWN,EAAMI,iBAAjB,aAAW,EAAiBG,QAAQ,UAAW,YAA/C,QAAuD,MAEjD,OAApBH,EAAUI,QACbJ,EAAUI,MAAQC,GAAAA,GAASC,OAC3BN,EAAUO,IAAMF,GAAAA,GAASC,QAG1B,IAAME,EAAoB,CACzBC,UAAWJ,IAAAA,KAAYL,EAAUI,OAAOM,OAAO,aAC/CC,QAASN,IAAAA,KAAYL,EAAUO,KAAKG,OAAO,cAG5C,OACC,OAAYd,GAAZ,GADGY,EAAkBC,YAAcD,EAAkBG,QAC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AIpB,EAAE,SAAU,QAAUoB,EAAIpB,EAAE,SAAU,iBAAiB,eAAe,SAG1hE,IaSpB,EACA,KACA,WACA,MAI8B","sources":["webpack:///photos/src/mixins/FetchAlbumsMixin.js","webpack:///photos/src/components/AlbumForm.vue?vue&type=style&index=0&id=5969a6f9&lang=scss&scoped=true&","webpack:///photos/src/components/CollaboratorsSelectionForm.vue?vue&type=style&index=0&id=0631f95e&lang=scss&scoped=true&","webpack:///photos/node_modules/vue-material-design-icons/Plus.vue","webpack:///photos/node_modules/vue-material-design-icons/Plus.vue?vue&type=script&lang=js&","webpack://photos/./node_modules/vue-material-design-icons/Plus.vue?80b4","webpack:///photos/node_modules/vue-material-design-icons/Plus.vue?vue&type=template&id=39b67473&","webpack:///photos/src/components/AlbumForm.vue?vue&type=template&id=5969a6f9&scoped=true&","webpack:///photos/node_modules/vue-material-design-icons/Magnify.vue","webpack:///photos/node_modules/vue-material-design-icons/Magnify.vue?vue&type=script&lang=js&","webpack://photos/./node_modules/vue-material-design-icons/Magnify.vue?0775","webpack:///photos/src/components/CollaboratorsSelectionForm.vue?vue&type=script&lang=js&","webpack:///photos/src/components/CollaboratorsSelectionForm.vue","webpack:///photos/node_modules/vue-material-design-icons/Magnify.vue?vue&type=template&id=373864b1&","webpack://photos/./src/components/CollaboratorsSelectionForm.vue?eaea","webpack://photos/./src/components/CollaboratorsSelectionForm.vue?507a","webpack:///photos/src/components/CollaboratorsSelectionForm.vue?vue&type=template&id=0631f95e&scoped=true&","webpack:///photos/src/components/AlbumForm.vue","webpack:///photos/src/components/AlbumForm.vue?vue&type=script&lang=js&","webpack://photos/./src/components/AlbumForm.vue?3580","webpack://photos/./src/components/AlbumForm.vue?b1d3"],"sourcesContent":["/**\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 { mapGetters } from 'vuex'\n\nimport moment from '@nextcloud/moment'\nimport { showError } from '@nextcloud/dialogs'\nimport { getCurrentUser } from '@nextcloud/auth'\n\nimport client from '../services/DavClient.js'\nimport logger from '../services/logger.js'\nimport cancelableRequest from '../utils/CancelableRequest.js'\nimport { genFileInfo } from '../utils/fileUtils.js'\n\nexport default {\n\tname: 'FetchAlbumsMixin',\n\n\tdata() {\n\t\treturn {\n\t\t\terrorFetchingAlbums: null,\n\t\t\tloadingAlbums: false,\n\t\t\tcancelAlbumsRequest: () => { },\n\t\t}\n\t},\n\n\tasync beforeMount() {\n\t\tthis.fetchAlbums()\n\t},\n\n\tbeforeDestroy() {\n\t\tthis.cancelAlbumsRequest('Changed view')\n\t},\n\n\tcomputed: {\n\t\t...mapGetters([\n\t\t\t'albums',\n\t\t]),\n\t},\n\n\tmethods: {\n\t\tasync fetchAlbums() {\n\t\t\tif (this.loadingAlbums) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tthis.loadingAlbums = true\n\t\t\t\tthis.errorFetchingAlbums = null\n\n\t\t\t\tconst { request, cancel } = cancelableRequest(client.getDirectoryContents)\n\t\t\t\tthis.cancelAlbumsRequest = cancel\n\n\t\t\t\tconst response = await request(`/photos/${getCurrentUser()?.uid}/albums`, {\n\t\t\t\t\tdata: `<?xml version=\"1.0\"?>\n\t\t\t\t\t\t\t<d:propfind xmlns:d=\"DAV:\"\n\t\t\t\t\t\t\t\txmlns:oc=\"http://owncloud.org/ns\"\n\t\t\t\t\t\t\t\txmlns:nc=\"http://nextcloud.org/ns\"\n\t\t\t\t\t\t\t\txmlns:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t\t<nc:last-photo />\n\t\t\t\t\t\t\t\t\t<nc:nbItems />\n\t\t\t\t\t\t\t\t\t<nc:location />\n\t\t\t\t\t\t\t\t\t<nc:dateRange />\n\t\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t</d:propfind>`,\n\t\t\t\t\tdetails: true,\n\n\t\t\t\t})\n\t\t\t\tconst albums = response.data\n\t\t\t\t\t.filter(album => album.filename !== '/photos/admin/albums')\n\t\t\t\t\t.map(album => genFileInfo(album))\n\t\t\t\t\t.map(album => {\n\t\t\t\t\t\tconst dateRange = JSON.parse(album.dateRange?.replace(/&quot;/g, '\"') ?? '{}')\n\n\t\t\t\t\t\tif (dateRange.start === null) {\n\t\t\t\t\t\t\tdateRange.start = moment().unix()\n\t\t\t\t\t\t\tdateRange.end = moment().unix()\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst dateRangeFormated = {\n\t\t\t\t\t\t\tstartDate: moment.unix(dateRange.start).format('MMMM YYYY'),\n\t\t\t\t\t\t\tendDate: moment.unix(dateRange.end).format('MMMM YYYY'),\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (dateRangeFormated.startDate === dateRangeFormated.endDate) {\n\t\t\t\t\t\t\treturn { ...album, date: this.t('photos', '{startDate}', dateRangeFormated) }\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn { ...album, date: this.t('photos', '{startDate} to {endDate}', dateRangeFormated) }\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\n\t\t\t\tthis.$store.dispatch('addAlbums', { albums })\n\t\t\t\tlogger.debug(`[FetchAlbumsMixin] Fetched ${albums.length} new files: `, albums)\n\t\t\t} catch (error) {\n\t\t\t\tif (error.response?.status === 404) {\n\t\t\t\t\tthis.errorFetchingAlbums = 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.errorFetchingAlbums = error\n\t\t\t\t}\n\t\t\t\tlogger.error(t('photos', 'Failed to fetch albums list.'), error)\n\t\t\t\tshowError(t('photos', 'Failed to fetch albums list.'))\n\t\t\t} finally {\n\t\t\t\tthis.cancelAlbumsRequest = () => { }\n\t\t\t\tthis.loadingAlbums = false\n\t\t\t}\n\t\t},\n\t},\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".album-form[data-v-5969a6f9]{display:flex;flex-direction:column;height:350px;padding:16px}.album-form .form-title[data-v-5969a6f9]{font-weight:bold}.album-form .form-subtitle[data-v-5969a6f9]{color:var(--color-text-lighter)}.album-form .form-inputs[data-v-5969a6f9]{flex-grow:1;justify-items:flex-end}.album-form .form-inputs input[data-v-5969a6f9]{width:100%}.album-form .form-inputs label[data-v-5969a6f9]{display:flex;margin-top:16px}.album-form .form-inputs label[data-v-5969a6f9] svg{margin-right:12px}.album-form .form-buttons[data-v-5969a6f9]{display:flex;justify-content:space-between}.album-form .form-buttons .left-buttons[data-v-5969a6f9],.album-form .form-buttons .right-buttons[data-v-5969a6f9]{display:flex}.album-form .form-buttons .right-buttons[data-v-5969a6f9]{justify-content:flex-end}.album-form .form-buttons button[data-v-5969a6f9]{margin-right:16px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/AlbumForm.vue\"],\"names\":[],\"mappings\":\"AA4NA,6BACC,YAAA,CACA,qBAAA,CACA,YAAA,CACA,YAAA,CAEA,yCACC,gBAAA,CAGD,4CACC,+BAAA,CAGD,0CACC,WAAA,CACA,sBAAA,CAEA,gDACC,UAAA,CAGD,gDACC,YAAA,CACA,eAAA,CAEA,qDACC,iBAAA,CAKH,2CACC,YAAA,CACA,6BAAA,CAEA,mHACC,YAAA,CAGD,0DACC,wBAAA,CAGD,kDACC,iBAAA\",\"sourcesContent\":[\"$sizes: (\\\"400\\\": (\\\"count\\\": 3, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"700\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"1024\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1280\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1440\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"1600\\\": (\\\"count\\\": 6, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2048\\\": (\\\"count\\\": 7, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2560\\\": (\\\"count\\\": 8, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"3440\\\": (\\\"count\\\": 9, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"max\\\": (\\\"count\\\": 10, \\\"marginTop\\\": 88, \\\"marginW\\\": 88));\\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\\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\\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\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n.album-form {\\n\\tdisplay: flex;\\n\\tflex-direction: column;\\n\\theight: 350px;\\n\\tpadding: 16px;\\n\\n\\t.form-title {\\n\\t\\tfont-weight: bold;\\n\\t}\\n\\n\\t.form-subtitle {\\n\\t\\tcolor: var(--color-text-lighter);\\n\\t}\\n\\n\\t.form-inputs {\\n\\t\\tflex-grow: 1;\\n\\t\\tjustify-items: flex-end;\\n\\n\\t\\tinput {\\n\\t\\t\\twidth: 100%;\\n\\t\\t}\\n\\n\\t\\tlabel {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tmargin-top: 16px;\\n\\n\\t\\t\\t::v-deep svg {\\n\\t\\t\\t\\tmargin-right: 12px;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t.form-buttons {\\n\\t\\tdisplay: flex;\\n\\t\\tjustify-content: space-between;\\n\\n\\t\\t.left-buttons, .right-buttons {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t}\\n\\n\\t\\t.right-buttons {\\n\\t\\t\\tjustify-content: flex-end;\\n\\t\\t}\\n\\n\\t\\tbutton {\\n\\t\\t\\tmargin-right: 16px;\\n\\t\\t}\\n\\t}\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".add-collaborators-form[data-v-0631f95e]{display:flex;flex-direction:column;height:500px;padding:16px}.add-collaborators-form .form-title[data-v-0631f95e]{font-weight:bold}.add-collaborators-form .form-subtitle[data-v-0631f95e]{color:var(--color-text-lighter)}.add-collaborators-form .form-inputs[data-v-0631f95e]{flex-grow:1;justify-items:flex-end}.add-collaborators-form .form-inputs input[data-v-0631f95e]{width:100%}.add-collaborators-form .form-inputs label[data-v-0631f95e]{display:flex;margin-top:16px}.add-collaborators-form .form-inputs label[data-v-0631f95e] svg{margin-right:12px}.add-collaborators-form .form-buttons[data-v-0631f95e]{display:flex;justify-content:space-between}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/CollaboratorsSelectionForm.vue\"],\"names\":[],\"mappings\":\"AA2DA,yCACC,YAAA,CACA,qBAAA,CACA,YAAA,CACA,YAAA,CAEA,qDACC,gBAAA,CAGD,wDACC,+BAAA,CAGD,sDACC,WAAA,CACA,sBAAA,CAEA,4DACC,UAAA,CAGD,4DACC,YAAA,CACA,eAAA,CAEA,iEACC,iBAAA,CAKH,uDACC,YAAA,CACA,6BAAA\",\"sourcesContent\":[\"$sizes: (\\\"400\\\": (\\\"count\\\": 3, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"700\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"1024\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1280\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1440\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"1600\\\": (\\\"count\\\": 6, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2048\\\": (\\\"count\\\": 7, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2560\\\": (\\\"count\\\": 8, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"3440\\\": (\\\"count\\\": 9, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"max\\\": (\\\"count\\\": 10, \\\"marginTop\\\": 88, \\\"marginW\\\": 88));\\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.add-collaborators-form {\\n\\tdisplay: flex;\\n\\tflex-direction: column;\\n\\theight: 500px;\\n\\tpadding: 16px;\\n\\n\\t.form-title {\\n\\t\\tfont-weight: bold;\\n\\t}\\n\\n\\t.form-subtitle {\\n\\t\\tcolor: var(--color-text-lighter);\\n\\t}\\n\\n\\t.form-inputs {\\n\\t\\tflex-grow: 1;\\n\\t\\tjustify-items: flex-end;\\n\\n\\t\\tinput {\\n\\t\\t\\twidth: 100%;\\n\\t\\t}\\n\\n\\t\\tlabel {\\n\\t\\t\\tdisplay: flex;\\n\\t\\t\\tmargin-top: 16px;\\n\\n\\t\\t\\t::v-deep svg {\\n\\t\\t\\t\\tmargin-right: 12px;\\n\\t\\t\\t}\\n\\t\\t}\\n\\t}\\n\\n\\t.form-buttons {\\n\\t\\tdisplay: flex;\\n\\t\\tjustify-content: space-between;\\n\\t}\\n\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","<template>\n <span :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon plus-icon\"\n role=\"img\"\n v-bind=\"$attrs\"\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,13H13V19H11V13H5V11H11V5H13V11H19V13Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"PlusIcon\",\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!./Plus.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./Plus.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Plus.vue?vue&type=template&id=39b67473&\"\nimport script from \"./Plus.vue?vue&type=script&lang=js&\"\nexport * from \"./Plus.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 plus-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,13H13V19H11V13H5V11H11V5H13V11H19V13Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.showCollaboratorView)?_c('form',{staticClass:\"album-form\",on:{\"submit\":function($event){$event.preventDefault();return _vm.submit.apply(null, arguments)}}},[_c('div',{staticClass:\"form-inputs\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model.trim\",value:(_vm.albumName),expression:\"albumName\",modifiers:{\"trim\":true}}],ref:\"nameInput\",attrs:{\"type\":\"text\",\"name\":\"name\",\"required\":\"\",\"autofocus\":\"true\",\"placeholder\":_vm.t('photos', 'Name of the album')},domProps:{\"value\":(_vm.albumName)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.albumName=$event.target.value.trim()},\"blur\":function($event){return _vm.$forceUpdate()}}}),_vm._v(\" \"),_c('label',[_c('MapMarker'),_c('input',{directives:[{name:\"model\",rawName:\"v-model.trim\",value:(_vm.albumLocation),expression:\"albumLocation\",modifiers:{\"trim\":true}}],attrs:{\"name\":\"location\",\"type\":\"text\",\"placeholder\":_vm.t('photos', 'Location of the album')},domProps:{\"value\":(_vm.albumLocation)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.albumLocation=$event.target.value.trim()},\"blur\":function($event){return _vm.$forceUpdate()}}})],1)]),_vm._v(\" \"),_c('div',{staticClass:\"form-buttons\"},[_c('span',{staticClass:\"left-buttons\"},[(_vm.displayBackButton)?_c('Button',{attrs:{\"aria-label\":_vm.t('photos', 'Go back to the previous view'),\"type\":\"tertiary\"},on:{\"click\":_vm.back}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'Back'))+\"\\n\\t\\t\\t\")]):_vm._e()],1),_vm._v(\" \"),_c('span',{staticClass:\"right-buttons\"},[_c('Button',{attrs:{\"aria-label\":_vm.editMode ? _vm.t('photos', 'Save.') : _vm.t('photos', 'Create the album.'),\"type\":\"primary\",\"disabled\":_vm.albumName === '' || _vm.loading},on:{\"click\":function($event){return _vm.submit()}},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [(_vm.loading)?_c('Loader'):_c('Send')]},proxy:true}],null,false,862849841)},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.editMode ? _vm.t('photos', 'Save') : _vm.t('photos', 'Create album'))+\"\\n\\t\\t\\t\")])],1)])]):_c('CollaboratorsSelectionForm',{staticClass:\"add-collaborators-form\",on:{\"cancel\":function($event){_vm.showCollaboratorView = true}},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar collaborators = ref.collaborators;\nreturn [_c('span',{staticClass:\"left-buttons\"},[_c('Button',{attrs:{\"aria-label\":_vm.t('photos', 'Back to the new album form.'),\"type\":\"tertiary\"},on:{\"click\":function($event){_vm.showCollaboratorView = false}}},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.t('photos', 'Back'))+\"\\n\\t\\t\\t\")])],1),_vm._v(\" \"),_c('span',{staticClass:\"right-buttons\"},[_c('Button',{attrs:{\"aria-label\":_vm.editMode ? _vm.t('photos', 'Save.') : _vm.t('photos', 'Create the album.'),\"type\":\"primary\",\"disabled\":_vm.albumName.trim() === '' || _vm.loading},on:{\"click\":function($event){return _vm.submit(collaborators)}},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [(_vm.loading)?_c('Loader'):_c('Send')]},proxy:true}],null,true)},[_vm._v(\"\\n\\t\\t\\t\\t\"+_vm._s(_vm.editMode ? _vm.t('photos', 'Save') : _vm.t('photos', 'Create album'))+\"\\n\\t\\t\\t\")])],1)]}}])})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n <span :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon magnify-icon\"\n role=\"img\"\n v-bind=\"$attrs\"\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=\"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"MagnifyIcon\",\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!./Magnify.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./Magnify.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Magnify.vue?vue&type=template&id=373864b1&\"\nimport script from \"./Magnify.vue?vue&type=script&lang=js&\"\nexport * from \"./Magnify.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","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CollaboratorsSelectionForm.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!./CollaboratorsSelectionForm.vue?vue&type=script&lang=js&\"","<!--\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<template>\n\t<form class=\"add-collaborators-form\" @submit.prevent>\n\t\t<h2 class=\"form-title\">\n\t\t\t{{ t('photos', 'Add collaborators') }}\n\t\t</h2>\n\t\t<div class=\"form-subtitle\">\n\t\t\t{{ t('photos', 'Add users who can edit your album') }}\n\t\t</div>\n\t\t<div class=\"form-subtitle\">\n\t\t\t{{ t('photos', 'Share this album via link') }}\n\t\t</div>\n\t\t<div class=\"form-inputs\">\n\t\t\t<Magnify /><input type=\"text\" name=\"search\" :placeholder=\"t('photos', 'Search users, email or federated cloud ID')\">\n\t\t</div>\n\t\t<div class=\"form-buttons\">\n\t\t\t<slot collaborators=\"collaborators\" />\n\t\t</div>\n\t</form>\n</template>\n<script>\nimport Magnify from 'vue-material-design-icons/Magnify'\n\nexport default {\n\tname: 'CollaboratorsSelectionForm',\n\n\tcomponents: {\n\t\tMagnify,\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tloading: false,\n\t\t}\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.add-collaborators-form {\n\tdisplay: flex;\n\tflex-direction: column;\n\theight: 500px;\n\tpadding: 16px;\n\n\t.form-title {\n\t\tfont-weight: bold;\n\t}\n\n\t.form-subtitle {\n\t\tcolor: var(--color-text-lighter);\n\t}\n\n\t.form-inputs {\n\t\tflex-grow: 1;\n\t\tjustify-items: flex-end;\n\n\t\tinput {\n\t\t\twidth: 100%;\n\t\t}\n\n\t\tlabel {\n\t\t\tdisplay: flex;\n\t\t\tmargin-top: 16px;\n\n\t\t\t::v-deep svg {\n\t\t\t\tmargin-right: 12px;\n\t\t\t}\n\t\t}\n\t}\n\n\t.form-buttons {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t}\n\n}\n</style>\n","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 magnify-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\":\"M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\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!./CollaboratorsSelectionForm.vue?vue&type=style&index=0&id=0631f95e&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!./CollaboratorsSelectionForm.vue?vue&type=style&index=0&id=0631f95e&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./CollaboratorsSelectionForm.vue?vue&type=template&id=0631f95e&scoped=true&\"\nimport script from \"./CollaboratorsSelectionForm.vue?vue&type=script&lang=js&\"\nexport * from \"./CollaboratorsSelectionForm.vue?vue&type=script&lang=js&\"\nimport style0 from \"./CollaboratorsSelectionForm.vue?vue&type=style&index=0&id=0631f95e&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 \"0631f95e\",\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('form',{staticClass:\"add-collaborators-form\",on:{\"submit\":function($event){$event.preventDefault();}}},[_c('h2',{staticClass:\"form-title\"},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('photos', 'Add collaborators'))+\"\\n\\t\")]),_vm._v(\" \"),_c('div',{staticClass:\"form-subtitle\"},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('photos', 'Add users who can edit your album'))+\"\\n\\t\")]),_vm._v(\" \"),_c('div',{staticClass:\"form-subtitle\"},[_vm._v(\"\\n\\t\\t\"+_vm._s(_vm.t('photos', 'Share this album via link'))+\"\\n\\t\")]),_vm._v(\" \"),_c('div',{staticClass:\"form-inputs\"},[_c('Magnify'),_c('input',{attrs:{\"type\":\"text\",\"name\":\"search\",\"placeholder\":_vm.t('photos', 'Search users, email or federated cloud ID')}})],1),_vm._v(\" \"),_c('div',{staticClass:\"form-buttons\"},[_vm._t(\"default\",null,{\"collaborators\":\"collaborators\"})],2)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\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<template>\n\t<form v-if=\"!showCollaboratorView\" class=\"album-form\" @submit.prevent=\"submit\">\n\t\t<div class=\"form-inputs\">\n\t\t\t<input ref=\"nameInput\"\n\t\t\t\tv-model.trim=\"albumName\"\n\t\t\t\ttype=\"text\"\n\t\t\t\tname=\"name\"\n\t\t\t\trequired\n\t\t\t\tautofocus=\"true\"\n\t\t\t\t:placeholder=\"t('photos', 'Name of the album')\">\n\t\t\t<label>\n\t\t\t\t<MapMarker /><input v-model.trim=\"albumLocation\"\n\t\t\t\t\tname=\"location\"\n\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t:placeholder=\"t('photos', 'Location of the album')\">\n\t\t\t</label>\n\t\t</div>\n\t\t<div class=\"form-buttons\">\n\t\t\t<span class=\"left-buttons\">\n\t\t\t\t<Button v-if=\"displayBackButton\"\n\t\t\t\t\t:aria-label=\"t('photos', 'Go back to the previous view')\"\n\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\t@click=\"back\">\n\t\t\t\t\t{{ t('photos', 'Back') }}\n\t\t\t\t</Button>\n\t\t\t</span>\n\t\t\t<span class=\"right-buttons\">\n\t\t\t\t<!-- <Button v-if=\"!editMode\"\n\t\t\t\t\t:aria-label=\"t('photos', 'Go to the add collaborators view.')\"\n\t\t\t\t\ttype=\"secondary\"\n\t\t\t\t\t:disabled=\"albumName.trim() === '' || loading\"\n\t\t\t\t\t@click=\"showCollaboratorView = true\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<AccountMultiplePlus />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ t('photos', 'Add collaborators') }}\n\t\t\t\t</Button> -->\n\t\t\t\t<Button :aria-label=\"editMode ? t('photos', 'Save.') : t('photos', 'Create the album.')\"\n\t\t\t\t\ttype=\"primary\"\n\t\t\t\t\t:disabled=\"albumName === '' || loading\"\n\t\t\t\t\t@click=\"submit()\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Loader v-if=\"loading\" />\n\t\t\t\t\t\t<Send v-else />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ editMode ? t('photos', 'Save') : t('photos', 'Create album') }}\n\t\t\t\t</Button>\n\t\t\t</span>\n\t\t</div>\n\t</form>\n\t<CollaboratorsSelectionForm v-else\n\t\tclass=\"add-collaborators-form\"\n\t\t@cancel=\"showCollaboratorView = true\">\n\t\t<template slot-scope=\"{collaborators}\">\n\t\t\t<span class=\"left-buttons\">\n\t\t\t\t<Button :aria-label=\"t('photos', 'Back to the new album form.')\"\n\t\t\t\t\ttype=\"tertiary\"\n\t\t\t\t\t@click=\"showCollaboratorView = false\">\n\t\t\t\t\t{{ t('photos', 'Back') }}\n\t\t\t\t</Button>\n\t\t\t</span>\n\t\t\t<span class=\"right-buttons\">\n\t\t\t\t<Button :aria-label=\"editMode ? t('photos', 'Save.') : t('photos', 'Create the album.')\"\n\t\t\t\t\ttype=\"primary\"\n\t\t\t\t\t:disabled=\"albumName.trim() === '' || loading\"\n\t\t\t\t\t@click=\"submit(collaborators)\">\n\t\t\t\t\t<template #icon>\n\t\t\t\t\t\t<Loader v-if=\"loading\" />\n\t\t\t\t\t\t<Send v-else />\n\t\t\t\t\t</template>\n\t\t\t\t\t{{ editMode ? t('photos', 'Save') : t('photos', 'Create album') }}\n\t\t\t\t</Button>\n\t\t\t</span>\n\t\t</template>\n\t</CollaboratorsSelectionForm>\n</template>\n<script>\nimport { mapActions } from 'vuex'\n// import MapMarker from 'vue-material-design-icons/MapMarker'\n// import AccountMultiplePlus from 'vue-material-design-icons/AccountMultiplePlus'\nimport Send from 'vue-material-design-icons/Send'\n\nimport { Button } from '@nextcloud/vue'\nimport moment from '@nextcloud/moment'\n\nimport Loader from './Loader.vue'\nimport CollaboratorsSelectionForm from './CollaboratorsSelectionForm.vue'\n\nexport default {\n\tname: 'AlbumForm',\n\n\tcomponents: {\n\t\tButton,\n\t\t// MapMarker,\n\t\t// AccountMultiplePlus,\n\t\tSend,\n\t\tLoader,\n\t\tCollaboratorsSelectionForm,\n\t},\n\n\tprops: {\n\t\talbum: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t\tdisplayBackButton: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tshowCollaboratorView: false,\n\t\t\talbumName: '',\n\t\t\talbumLocation: '',\n\t\t\tloading: false,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\teditMode() {\n\t\t\treturn this.album !== null\n\t\t},\n\t},\n\n\tmounted() {\n\t\tif (this.editMode) {\n\t\t\tthis.albumName = this.album.basename\n\t\t\tthis.albumLocation = this.album.location\n\t\t}\n\n\t\tthis.$nextTick(() => {\n\t\t\tthis.$refs.nameInput.focus()\n\t\t})\n\t},\n\n\tmethods: {\n\t\t...mapActions(['createAlbum', 'renameAlbum', 'updateAlbumLocation']),\n\n\t\tsubmit(collaborators = []) {\n\t\t\tif (this.albumName === '' || this.loading) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tif (this.editMode) {\n\t\t\t\tthis.handleUpdateAlbum(collaborators)\n\t\t\t} else {\n\t\t\t\tthis.handleCreateAlbum(collaborators)\n\t\t\t}\n\t\t},\n\n\t\tasync handleCreateAlbum(collaborators = []) {\n\t\t\ttry {\n\t\t\t\tthis.loading = true\n\t\t\t\tconst album = await this.createAlbum({\n\t\t\t\t\talbum: {\n\t\t\t\t\t\tbasename: this.albumName,\n\t\t\t\t\t\tnbItems: 0,\n\t\t\t\t\t\tlocation: this.albumLocation,\n\t\t\t\t\t\tlastPhoto: '',\n\t\t\t\t\t\tdate: moment().format('MMMM YYYY'),\n\t\t\t\t\t\tcollaborators,\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\tthis.$emit('done', { album })\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\tasync handleUpdateAlbum(collaborators = []) {\n\t\t\ttry {\n\t\t\t\tthis.loading = true\n\n\t\t\t\tlet album = { ...this.album }\n\n\t\t\t\tif (this.album.basename !== this.albumName) {\n\t\t\t\t\talbum = await this.renameAlbum({ currentAlbumName: this.album.basename, newAlbumName: this.albumName })\n\t\t\t\t}\n\n\t\t\t\tif (this.album.location !== this.albumLocation) {\n\t\t\t\t\talbum.location = await this.updateAlbumLocation({ albumName: this.albumName, newLocation: this.albumLocation })\n\t\t\t\t}\n\n\t\t\t\tthis.$emit('done', { album })\n\t\t\t} finally {\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\tback() {\n\t\t\tthis.$emit('back')\n\t\t},\n\t},\n}\n</script>\n<style lang=\"scss\" scoped>\n.album-form {\n\tdisplay: flex;\n\tflex-direction: column;\n\theight: 350px;\n\tpadding: 16px;\n\n\t.form-title {\n\t\tfont-weight: bold;\n\t}\n\n\t.form-subtitle {\n\t\tcolor: var(--color-text-lighter);\n\t}\n\n\t.form-inputs {\n\t\tflex-grow: 1;\n\t\tjustify-items: flex-end;\n\n\t\tinput {\n\t\t\twidth: 100%;\n\t\t}\n\n\t\tlabel {\n\t\t\tdisplay: flex;\n\t\t\tmargin-top: 16px;\n\n\t\t\t::v-deep svg {\n\t\t\t\tmargin-right: 12px;\n\t\t\t}\n\t\t}\n\t}\n\n\t.form-buttons {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\n\t\t.left-buttons, .right-buttons {\n\t\t\tdisplay: flex;\n\t\t}\n\n\t\t.right-buttons {\n\t\t\tjustify-content: flex-end;\n\t\t}\n\n\t\tbutton {\n\t\t\tmargin-right: 16px;\n\t\t}\n\t}\n}\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AlbumForm.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!./AlbumForm.vue?vue&type=script&lang=js&\"","\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!./AlbumForm.vue?vue&type=style&index=0&id=5969a6f9&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!./AlbumForm.vue?vue&type=style&index=0&id=5969a6f9&lang=scss&scoped=true&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./AlbumForm.vue?vue&type=template&id=5969a6f9&scoped=true&\"\nimport script from \"./AlbumForm.vue?vue&type=script&lang=js&\"\nexport * from \"./AlbumForm.vue?vue&type=script&lang=js&\"\nimport style0 from \"./AlbumForm.vue?vue&type=style&index=0&id=5969a6f9&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 \"5969a6f9\",\n null\n \n)\n\nexport default component.exports"],"names":["name","data","errorFetchingAlbums","loadingAlbums","cancelAlbumsRequest","beforeMount","fetchAlbums","beforeDestroy","this","computed","mapGetters","methods","cancelableRequest","client","request","cancel","getCurrentUser","uid","details","response","albums","filter","album","filename","map","genFileInfo","dateRange","JSON","parse","replace","start","moment","unix","end","dateRangeFormated","startDate","format","endDate","date","t","$store","dispatch","logger","length","status","code","showError","___CSS_LOADER_EXPORT___","push","module","id","props","title","type","String","fillColor","default","size","Number","_vm","_h","$createElement","_c","_self","_b","staticClass","attrs","on","$event","$emit","$attrs","_v","_s","_e","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","preventDefault","_t","showCollaboratorView","scopedSlots","_u","key","fn","ref","collaborators","editMode","albumName","trim","loading","submit","proxy","apply","arguments","directives","rawName","value","expression","modifiers","domProps","target","composing","$forceUpdate","albumLocation","back"],"sourceRoot":""}