photos/js/photos-src_services_Albums_...

1 line
30 KiB
XML

{"version":3,"file":"photos-src_services_Albums_js-src_components_HeaderNavigation_vue.js?v=4c4c954aadbb37346175","mappings":";qRA6CA,SAASA,IACR,MAAO,6XAAPC,OADgCC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,GAYnB,2CAGjB,CAUOG,eAAeC,EAAWC,EAAMC,GAAkD,IAAzCC,EAAUP,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,GAAIQ,EAAMR,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAGS,EAAAA,GACzE,IACC,MAAMC,QAAiBF,EAAOG,KAAKN,EAAM,CACxCO,KAAMd,EAAcS,GACpBM,SAAS,KACNP,IAKJ,OAFAQ,EAAAA,EAAAA,MAAa,8BAA+B,CAAEF,KAAMF,EAASE,OAEtDG,EAAYL,EAASE,KAC7B,CAAE,MAAOI,GACR,GAAmB,iBAAfA,EAAMC,KACT,OAAO,KAGR,MAAMD,CACP,CACD,CAUOb,eAAee,EAAYb,EAAMC,GAAkD,IAAzCC,EAAUP,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,GAAIQ,EAAMR,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAGS,EAAAA,GAC1E,IACC,MAAMC,QAAiBF,EAAOW,qBAAqBd,EAAM,CACxDO,KAAMd,EAAcS,GACpBM,SAAS,KACNP,IAKJ,OAFAQ,EAAAA,EAAAA,MAAa,oBAADf,OAAqBW,EAASE,KAAKX,OAAM,aAAa,CAAEW,KAAMF,EAASE,OAE5EF,EAASE,KACdQ,QAAOC,GAASA,EAAMC,WAAajB,IACnCkB,IAAIR,EACP,CAAE,MAAOC,GACR,GAAmB,iBAAfA,EAAMC,KACT,MAAO,GAGR,MAAMD,CACP,CACD,CAOA,SAASD,EAAYM,GAAO,IAAAG,EAAAC,EAEO,KAA9BJ,EAAM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AO,MAAK,EAAM,cAAuBb,EAAIc,GAAG,KAAKZ,EAAG,MAAM,CAACE,YAAY,4BAA4B,CAACF,EAAG,KAAK,CAACE,YAAY,iCAAiCI,GAAG,CAAC,MAAQR,EAAIb,UAAU,CAACa,EAAIc,GAAG,WAAWd,EAAIe,GAAGf,EAAIpD,MAAM,YAAYoD,EAAIc,GAAG,KAAKZ,EAAG,MAAM,CAACE,YAAY,kCAAkCJ,EAAIc,GAAG,KAAKd,EAAIgB,GAAG,aAAa,GAAGhB,EAAIc,GAAG,KAAMd,EAAIiB,OAAO5D,QAAS6C,EAAG,MAAM,CAACE,YAAY,8BAA8B,CAACJ,EAAIgB,GAAG,YAAY,GAAGhB,EAAIO,KAAKP,EAAIc,GAAG,KAAKZ,EAAG,gBAAgB,CAACgB,WAAW,CAAC,CAACtE,KAAK,OAAOuE,QAAQ,SAASC,MAAOpB,EAAI9C,QAASmE,WAAW,YAAYjB,YAAY,8BAA8BJ,EAAIc,GAAG,KAAKZ,EAAG,MAAM,CAACE,YAAY,oCAAoC,CAACJ,EAAIgB,GAAG,UAAU,IAAI,EAC9kC,GACsB,IKWpB,EACA,KACA,WACA,MAI8B","sources":["webpack:///photos/src/services/Albums.js","webpack:///photos/src/components/HeaderNavigation.vue?vue&type=style&index=0&id=809e621a&prod&lang=scss","webpack:///photos/src/components/HeaderNavigation.vue?vue&type=style&index=1&id=809e621a&prod&lang=scss&scoped=true","webpack://photos/./src/components/HeaderNavigation.vue?6d2b","webpack:///photos/src/components/HeaderNavigation.vue","webpack:///photos/src/components/HeaderNavigation.vue?vue&type=script&lang=js","webpack://photos/./src/components/HeaderNavigation.vue?6964","webpack://photos/./src/components/HeaderNavigation.vue?beaf","webpack://photos/./src/components/HeaderNavigation.vue?6702"],"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 moment from '@nextcloud/moment'\nimport { translate } from '@nextcloud/l10n'\n\nimport defaultClient from '../services/DavClient.js'\nimport logger from '../services/logger.js'\nimport DavRequest from '../services/DavRequest.js'\nimport { genFileInfo } from '../utils/fileUtils.js'\n\n/**\n * @typedef {object} Album\n * @property {string} id - The id of the album.\n * @property {string} name - The name of the album.\n * @property {number} creationDate - The creation date of the album.\n * @property {string} isShared - Whether the current user as shared the album.\n * @property {string} isCollaborative - Whether the album can be edited by other users.\n * @property {number} itemCount - The number of item in the album.\n * @property {number} cover - The cover of the album.\n */\n\n/**\n * @param {string} extraProps - Extra properties to add to the DAV request.\n * @return {string}\n */\nfunction getDavRequest(extraProps = '') {\n\treturn `<?xml version=\"1.0\"?>\n\t\t\t<d:propfind 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:ocs=\"http://open-collaboration-services.org/ns\">\n\t\t\t\t<d:prop>\n\t\t\t\t\t<nc:last-photo />\n\t\t\t\t\t<nc:nbItems />\n\t\t\t\t\t<nc:location />\n\t\t\t\t\t<nc:dateRange />\n\t\t\t\t\t<nc:collaborators />\n\t\t\t\t\t${extraProps}\n\t\t\t\t</d:prop>\n\t\t\t</d:propfind>`\n}\n\n/**\n *\n * @param {string} path - Albums' root path.\n * @param {import('webdav').StatOptions} options - Options to forward to the webdav client.\n * @param {string} extraProps - Extra properties to add to the DAV request.\n * @param {import('webdav').WebDAVClient} client - The DAV client to use.\n * @return {Promise<Album|null>}\n */\nexport async function fetchAlbum(path, options, extraProps = '', client = defaultClient) {\n\ttry {\n\t\tconst response = await client.stat(path, {\n\t\t\tdata: getDavRequest(extraProps),\n\t\t\tdetails: true,\n\t\t\t...options,\n\t\t})\n\n\t\tlogger.debug('[Albums] Fetched an album: ', { data: response.data })\n\n\t\treturn formatAlbum(response.data)\n\t} catch (error) {\n\t\tif (error.code === 'ERR_CANCELED') {\n\t\t\treturn null\n\t\t}\n\n\t\tthrow error\n\t}\n}\n\n/**\n *\n * @param {string} path - Albums' root path.\n * @param {import('webdav').StatOptions} options - Options to forward to the webdav client.\n * @param {string} extraProps - Extra properties to add to the DAV request.\n * @param {import('webdav').WebDAVClient} client - The DAV client to use.\n * @return {Promise<Album[]>}\n */\nexport async function fetchAlbums(path, options, extraProps = '', client = defaultClient) {\n\ttry {\n\t\tconst response = await client.getDirectoryContents(path, {\n\t\t\tdata: getDavRequest(extraProps),\n\t\t\tdetails: true,\n\t\t\t...options,\n\t\t})\n\n\t\tlogger.debug(`[Albums] Fetched ${response.data.length} albums: `, { data: response.data })\n\n\t\treturn response.data\n\t\t\t.filter(album => album.filename !== path)\n\t\t\t.map(formatAlbum)\n\t} catch (error) {\n\t\tif (error.code === 'ERR_CANCELED') {\n\t\t\treturn []\n\t\t}\n\n\t\tthrow error\n\t}\n}\n\n/**\n *\n * @param {object} album - An album received from a webdav request.\n * @return {Album}\n */\nfunction formatAlbum(album) {\n\t// Ensure that we have a proper collaborators array.\n\tif (album.props.collaborators === '') {\n\t\talbum.props.collaborators = []\n\t} else if (typeof album.props.collaborators.collaborator === 'object') {\n\t\tif (Array.isArray(album.props.collaborators.collaborator)) {\n\t\t\talbum.props.collaborators = album.props.collaborators.collaborator\n\t\t} else {\n\t\t\talbum.props.collaborators = [album.props.collaborators.collaborator]\n\t\t}\n\t}\n\n\t// Extract custom props.\n\talbum = genFileInfo(album)\n\n\t// Compute date range label.\n\tconst dateRange = JSON.parse(album.dateRange?.replace(/&quot;/g, '\"') ?? '{}')\n\tif (dateRange.start === null) {\n\t\tdateRange.start = moment().unix()\n\t\tdateRange.end = moment().unix()\n\t}\n\tconst dateRangeFormatted = {\n\t\tstartDate: moment.unix(dateRange.start).format('MMMM YYYY'),\n\t\tendDate: moment.unix(dateRange.end).format('MMMM YYYY'),\n\t}\n\tif (dateRangeFormatted.startDate === dateRangeFormatted.endDate) {\n\t\talbum.date = dateRangeFormatted.startDate\n\t} else {\n\t\talbum.date = translate('photos', '{startDate} to {endDate}', dateRangeFormatted)\n\t}\n\n\treturn album\n}\n\n/**\n *\n * @param {string} path - Albums' root path.\n * @param {import('webdav').StatOptions} options - Options to forward to the webdav client.\n * @param {import('webdav').WebDAVClient} client - The DAV client to use.\n * @return {Promise<Array>}\n */\nexport async function fetchAlbumContent(path, options, client = defaultClient) {\n\ttry {\n\t\tconst response = await client.getDirectoryContents(path, {\n\t\t\tdata: DavRequest,\n\t\t\tdetails: true,\n\t\t\t...options,\n\t\t})\n\n\t\tconst fetchedFiles = response.data\n\t\t\t.map(file => genFileInfo(file))\n\t\t\t.filter(file => file.fileid)\n\n\t\tlogger.debug(`[Albums] Fetched ${fetchedFiles.length} new files: `, fetchedFiles)\n\n\t\treturn fetchedFiles\n\t} catch (error) {\n\t\tif (error.code === 'ERR_CANCELED') {\n\t\t\treturn []\n\t\t}\n\n\t\tlogger.error('Error fetching album files', { error })\n\t\tconsole.error(error)\n\n\t\tthrow error\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, \":root{--photos-navigation-height: 64px;--photos-navigation-spacing: calc((var(--photos-navigation-height) - 44px) / 2)}button.app-navigation-toggle{top:0 !important;right:calc(var(--photos-navigation-height)*-1) !important;margin:var(--photos-navigation-spacing) !important}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/HeaderNavigation.vue\"],\"names\":[],\"mappings\":\"AAEA,MACC,gCAAA,CAEA,+EAAA,CAID,6BAEC,gBAAA,CACA,yDAAA,CACA,kDAAA\",\"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:root {\\n\\t--photos-navigation-height: 64px;\\n\\t// header height - button size\\n\\t--photos-navigation-spacing: calc((var(--photos-navigation-height) - 44px) / 2);\\n}\\n\\n// Properly position the navigation toggle button\\nbutton.app-navigation-toggle {\\n\\t// App-navigation have a 4px margin top\\n\\ttop: 0 !important;\\n\\tright: calc(var(--photos-navigation-height) * -1) !important;\\n\\tmargin: var(--photos-navigation-spacing) !important;\\n}\\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, \".photos-navigation[data-v-809e621a]{position:-webkit-sticky;position:sticky;z-index:20;top:0;display:flex;align-items:center;width:100%;min-height:var(--photos-navigation-height);padding:0 var(--photos-navigation-height);background:var(--color-main-background)}.photos-navigation__back[data-v-809e621a]{position:absolute !important;left:0;margin:var(--photos-navigation-spacing) !important}.photos-navigation__title[data-v-809e621a]{max-width:50%;margin-right:calc(2*var(--photos-navigation-spacing));display:flex;flex-direction:column}.photos-navigation__title__main[data-v-809e621a]{margin:0;cursor:pointer}.photos-navigation__title__main[data-v-809e621a],.photos-navigation__title__sub[data-v-809e621a]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.photos-navigation__loader[data-v-809e621a]{margin-left:32px}.photos-navigation__content-right[data-v-809e621a]{display:flex;align-items:center;justify-content:center;margin-left:auto}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/HeaderNavigation.vue\"],\"names\":[],\"mappings\":\"AAEA,oCACC,uBAAA,CAAA,eAAA,CACA,UAAA,CACA,KAAA,CACA,YAAA,CACA,kBAAA,CACA,UAAA,CACA,0CAAA,CACA,yCAAA,CACA,uCAAA,CAEA,0CAEC,4BAAA,CACA,MAAA,CACA,kDAAA,CAGD,2CACC,aAAA,CACA,qDAAA,CACA,YAAA,CACA,qBAAA,CAEA,iDACC,QAAA,CACA,cAAA,CAGD,iGACC,eAAA,CACA,kBAAA,CACA,sBAAA,CAIF,4CACC,gBAAA,CAGD,mDACC,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,gBAAA\",\"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.photos-navigation {\\n\\tposition: sticky;\\n\\tz-index: 20;\\n\\ttop: 0;\\n\\tdisplay: flex;\\n\\talign-items: center;\\n\\twidth: 100%;\\n\\tmin-height: var(--photos-navigation-height);\\n\\tpadding: 0 var(--photos-navigation-height);\\n\\tbackground: var(--color-main-background);\\n\\n\\t&__back {\\n\\t\\t// Above the navigation menu\\n\\t\\tposition: absolute !important;\\n\\t\\tleft: 0;\\n\\t\\tmargin: var(--photos-navigation-spacing) !important;\\n\\t}\\n\\n\\t&__title {\\n\\t\\tmax-width: 50%;\\n\\t\\tmargin-right: calc(2 * var(--photos-navigation-spacing));\\n\\t\\tdisplay: flex;\\n\\t\\tflex-direction: column;\\n\\n\\t\\t&__main {\\n\\t\\t\\tmargin: 0;\\n\\t\\t\\tcursor: pointer;\\n\\t\\t}\\n\\n\\t\\t&__main, &__sub {\\n\\t\\t\\toverflow: hidden;\\n\\t\\t\\twhite-space: nowrap;\\n\\t\\t\\ttext-overflow: ellipsis;\\n\\t\\t}\\n\\t}\\n\\n\\t&__loader {\\n\\t\\tmargin-left: 32px;\\n\\t}\\n\\n\\t&__content-right {\\n\\t\\tdisplay: flex;\\n\\t\\talign-items: center;\\n\\t\\tjustify-content: center;\\n\\t\\tmargin-left: auto;\\n\\t}\\n}\\n\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"photos-navigation\",class:{'photos-navigation--root': _vm.isRoot},attrs:{\"role\":\"toolbar\"}},[(!_vm.isRoot)?_c('NcButton',{staticClass:\"photos-navigation__back\",attrs:{\"type\":\"tertiary\"},on:{\"click\":_vm.folderUp},scopedSlots:_vm._u([{key:\"icon\",fn:function(){return [_c('ArrowLeft',{attrs:{\"size\":20}})]},proxy:true}],null,false,1821202730)}):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"photos-navigation__title\"},[_c('h2',{staticClass:\"photos-navigation__title__main\",on:{\"click\":_vm.refresh}},[_vm._v(\"\\n\\t\\t\\t\"+_vm._s(_vm.name)+\"\\n\\t\\t\")]),_vm._v(\" \"),_c('div',{staticClass:\"photos-navigation__title__sub\"}),_vm._v(\" \"),_vm._t(\"subtitle\")],2),_vm._v(\" \"),(_vm.$slots.default)?_c('div',{staticClass:\"photos-navigation__content\"},[_vm._t(\"default\")],2):_vm._e(),_vm._v(\" \"),_c('NcLoadingIcon',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.loading),expression:\"loading\"}],staticClass:\"photos-navigation__loader\"}),_vm._v(\" \"),_c('div',{staticClass:\"photos-navigation__content-right\"},[_vm._t(\"right\")],2)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\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\n<template>\n\t<div :class=\"{'photos-navigation--root': isRoot}\" class=\"photos-navigation\" role=\"toolbar\">\n\t\t<!-- Back navigation button -->\n\t\t<NcButton v-if=\"!isRoot\"\n\t\t\tclass=\"photos-navigation__back\"\n\t\t\ttype=\"tertiary\"\n\t\t\t@click=\"folderUp\">\n\t\t\t<template #icon>\n\t\t\t\t<ArrowLeft :size=\"20\" />\n\t\t\t</template>\n\t\t</NcButton>\n\n\t\t<!-- Main Navigation title -->\n\t\t<div class=\"photos-navigation__title\">\n\t\t\t<h2 class=\"photos-navigation__title__main\" @click=\"refresh\">\n\t\t\t\t{{ name }}\n\t\t\t</h2>\n\t\t\t<div class=\"photos-navigation__title__sub\" />\n\t\t\t<slot name=\"subtitle\" />\n\t\t</div>\n\n\t\t<!-- Main slot -->\n\t\t<div v-if=\"$slots.default\" class=\"photos-navigation__content\">\n\t\t\t<slot />\n\t\t</div>\n\n\t\t<NcLoadingIcon v-show=\"loading\" class=\"photos-navigation__loader\" />\n\n\t\t<div class=\"photos-navigation__content-right\">\n\t\t\t<slot name=\"right\" />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport ArrowLeft from 'vue-material-design-icons/ArrowLeft.vue'\n\nimport { NcButton, NcLoadingIcon } from '@nextcloud/vue'\n\nexport default {\n\tname: 'HeaderNavigation',\n\n\tcomponents: {\n\t\tArrowLeft,\n\t\tNcButton,\n\t\tNcLoadingIcon,\n\t},\n\n\tinheritAttrs: false,\n\n\tprops: {\n\t\tloading: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\t\tpath: {\n\t\t\ttype: String,\n\t\t\tdefault: '/',\n\t\t},\n\t\ttitle: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t},\n\t\trootTitle: {\n\t\t\ttype: String,\n\t\t\tdefault: t('photos', 'Photos'),\n\t\t},\n\t\t// The route params\n\t\tparams: {\n\t\t\ttype: Object,\n\t\t\tdefault: null,\n\t\t},\n\t},\n\n\tcomputed: {\n\t\tisRoot() {\n\t\t\tconst isRoot = this.path === '/'\n\t\t\tthis.toggleNavigationButton(!isRoot)\n\t\t\treturn isRoot\n\t\t},\n\n\t\tname() {\n\t\t\tif (this.isRoot) {\n\t\t\t\treturn this.rootTitle\n\t\t\t}\n\t\t\treturn this.title\n\t\t},\n\n\t\tparentPath() {\n\t\t\tconst path = this.path.split('/')\n\t\t\tpath.pop()\n\t\t\tconst parent = path.join('/')\n\t\t\treturn this.isRoot || parent.trim() === ''\n\t\t\t\t? '/'\n\t\t\t\t: path.join('/')\n\t\t},\n\n\t\tparentName() {\n\t\t\treturn this.parentPath && this.parentPath.split('/').pop()\n\t\t},\n\n\t\tbackToText() {\n\t\t\tif (this.parentPath === '/') {\n\t\t\t\treturn t('photos', 'Back to {folder}', { folder: this.rootTitle })\n\t\t\t}\n\t\t\treturn t('photos', 'Back to {folder}', { folder: this.parentName })\n\t\t},\n\n\t\t/**\n\t\t * We do not want encoded slashes when browsing by folder\n\t\t * so we generate a new valid route object, get the final url back\n\t\t * decode it and use it as a direct string, which vue-router\n\t\t * does not encode afterwards\n\t\t *\n\t\t * @return {string|object}\n\t\t */\n\t\tto() {\n\t\t\t// always remove first slash, the router\n\t\t\t// manage it automatically\n\t\t\tconst regex = /^\\/?(.*)/i\n\t\t\tconst path = regex.exec(this.parentPath)[1]\n\n\t\t\t// apply to current route\n\t\t\tconst { name, params } = Object.assign({}, this.$route, {\n\t\t\t\tparams: this.params || { path },\n\t\t\t})\n\n\t\t\t// return the full object as we don't care about\n\t\t\t// an empty path if this is route\n\t\t\tif (path === '') {\n\t\t\t\treturn { name }\n\t\t\t}\n\n\t\t\t// returning a string prevent vue-router to encode it again\n\t\t\treturn decodeURIComponent(this.$router.resolve({ name, params }).resolved.path)\n\t\t},\n\t},\n\n\tmethods: {\n\t\tfolderUp() {\n\t\t\tthis.$router.push(this.to)\n\t\t},\n\n\t\trefresh() {\n\t\t\tthis.$emit('refresh')\n\t\t},\n\n\t\ttoggleNavigationButton(hide) {\n\t\t\t// Hide the navigation toggle if the back button is shown\n\t\t\tconst navigationToggle = document.querySelector('button.app-navigation-toggle')\n\t\t\tif (navigationToggle !== null) {\n\t\t\t\tnavigationToggle.style.display = hide ? 'none' : null\n\t\t\t}\n\t\t},\n\t},\n}\n</script>\n\n<style lang=\"scss\">\n:root {\n\t--photos-navigation-height: 64px;\n\t// header height - button size\n\t--photos-navigation-spacing: calc((var(--photos-navigation-height) - 44px) / 2);\n}\n\n// Properly position the navigation toggle button\nbutton.app-navigation-toggle {\n\t// App-navigation have a 4px margin top\n\ttop: 0 !important;\n\tright: calc(var(--photos-navigation-height) * -1) !important;\n\tmargin: var(--photos-navigation-spacing) !important;\n}\n\n</style>\n\n<style lang=\"scss\" scoped>\n.photos-navigation {\n\tposition: sticky;\n\tz-index: 20;\n\ttop: 0;\n\tdisplay: flex;\n\talign-items: center;\n\twidth: 100%;\n\tmin-height: var(--photos-navigation-height);\n\tpadding: 0 var(--photos-navigation-height);\n\tbackground: var(--color-main-background);\n\n\t&__back {\n\t\t// Above the navigation menu\n\t\tposition: absolute !important;\n\t\tleft: 0;\n\t\tmargin: var(--photos-navigation-spacing) !important;\n\t}\n\n\t&__title {\n\t\tmax-width: 50%;\n\t\tmargin-right: calc(2 * var(--photos-navigation-spacing));\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\t&__main {\n\t\t\tmargin: 0;\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t&__main, &__sub {\n\t\t\toverflow: hidden;\n\t\t\twhite-space: nowrap;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\t}\n\n\t&__loader {\n\t\tmargin-left: 32px;\n\t}\n\n\t&__content-right {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\tmargin-left: auto;\n\t}\n}\n\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderNavigation.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!./HeaderNavigation.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.use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderNavigation.vue?vue&type=style&index=0&id=809e621a&prod&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.use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderNavigation.vue?vue&type=style&index=0&id=809e621a&prod&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.use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderNavigation.vue?vue&type=style&index=1&id=809e621a&prod&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.use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./HeaderNavigation.vue?vue&type=style&index=1&id=809e621a&prod&lang=scss&scoped=true\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./HeaderNavigation.vue?vue&type=template&id=809e621a&scoped=true\"\nimport script from \"./HeaderNavigation.vue?vue&type=script&lang=js\"\nexport * from \"./HeaderNavigation.vue?vue&type=script&lang=js\"\nimport style0 from \"./HeaderNavigation.vue?vue&type=style&index=0&id=809e621a&prod&lang=scss\"\nimport style1 from \"./HeaderNavigation.vue?vue&type=style&index=1&id=809e621a&prod&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 \"809e621a\",\n null\n \n)\n\nexport default component.exports"],"names":["getDavRequest","concat","arguments","length","undefined","async","fetchAlbum","path","options","extraProps","client","defaultClient","response","stat","data","details","logger","formatAlbum","error","code","fetchAlbums","getDirectoryContents","filter","album","filename","map","_album$dateRange$repl","_album$dateRange","props","collaborators","collaborator","Array","isArray","genFileInfo","dateRange","JSON","parse","replace","start","moment","unix","end","dateRangeFormatted","startDate","format","endDate","date","translate","fetchAlbumContent","fetchedFiles","DavRequest","file","fileid","console","___CSS_LOADER_EXPORT___","push","module","id","name","components","ArrowLeft","NcButton","NcLoadingIcon","inheritAttrs","loading","type","Boolean","default","String","title","required","rootTitle","t","params","Object","computed","isRoot","toggleNavigationButton","parentPath","split","pop","parent","join","trim","parentName","backToText","folder","to","exec","assign","$route","decodeURIComponent","$router","resolve","resolved","methods","folderUp","refresh","$emit","hide","navigationToggle","document","querySelector","style","display","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_vm","this","_c","_self","staticClass","class","attrs","_e","on","scopedSlots","_u","key","fn","proxy","_v","_s","_t","$slots","directives","rawName","value","expression"],"sourceRoot":""}