(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{380:function(t,n,e){
/**
 * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
 *
 * @author John Molakvoæ <skjnldsv@protonmail.com>
 *
 * @license GNU AGPL version 3 or any later version
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 */
const s=e(450),i=s.prepareRequestOptions;s.prepareRequestOptions=function(t,n){n.cancelToken&&"object"==typeof n.cancelToken&&(t.cancelToken=n.cancelToken),i(t,n),n.method&&"string"==typeof n.method&&(t.method=n.method)},t.exports=s},405:function(t,n,e){"use strict";var s=e(449),i=e.n(s),a=e(79),r=e.n(a),o=e(440),d=e.n(o),c=e(13);i.a.getPatcher().patch("request",r.a);const p=Object(c.generateRemoteUrl)("dav"),l=i.a.createClient(p);d()(p).pathname;n.a=l},442:function(t,n,e){"use strict";e.d(n,"a",(function(){return s}));
/**
 * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
 *
 * @author John Molakvoæ <skjnldsv@protonmail.com>
 *
 * @license GNU AGPL version 3 or any later version
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 */
const s="\n\t<oc:fileid />\n\t<d:getlastmodified />\n\t<d:getetag />\n\t<d:getcontenttype />\n\t<d:getcontentlength />\n\t<nc:has-preview />\n\t<oc:favorite />\n\t<d:resourcetype />";'<?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'.concat(s,"\n\t\t\t\t</d:prop>\n\t\t\t</d:propfind>")},466:function(t,n){},467:function(t,n){},476:function(t,n){},477:function(t,n){},497:function(t,n){},499:function(t,n){},500:function(t,n){},503:function(t,n){},504:function(t,n){},509:function(t,n){},510:function(t,n){},518:function(t,n){},524:function(t,n){},527:function(t,n){},805:function(t,n,e){var s={"./af":532,"./af.js":532,"./ar":533,"./ar-dz":534,"./ar-dz.js":534,"./ar-kw":535,"./ar-kw.js":535,"./ar-ly":536,"./ar-ly.js":536,"./ar-ma":537,"./ar-ma.js":537,"./ar-sa":538,"./ar-sa.js":538,"./ar-tn":539,"./ar-tn.js":539,"./ar.js":533,"./az":540,"./az.js":540,"./be":541,"./be.js":541,"./bg":542,"./bg.js":542,"./bm":543,"./bm.js":543,"./bn":544,"./bn.js":544,"./bo":545,"./bo.js":545,"./br":546,"./br.js":546,"./bs":547,"./bs.js":547,"./ca":548,"./ca.js":548,"./cs":549,"./cs.js":549,"./cv":550,"./cv.js":550,"./cy":551,"./cy.js":551,"./da":552,"./da.js":552,"./de":553,"./de-at":554,"./de-at.js":554,"./de-ch":555,"./de-ch.js":555,"./de.js":553,"./dv":556,"./dv.js":556,"./el":557,"./el.js":557,"./en-SG":558,"./en-SG.js":558,"./en-au":559,"./en-au.js":559,"./en-ca":560,"./en-ca.js":560,"./en-gb":561,"./en-gb.js":561,"./en-ie":562,"./en-ie.js":562,"./en-il":563,"./en-il.js":563,"./en-nz":564,"./en-nz.js":564,"./eo":565,"./eo.js":565,"./es":566,"./es-do":567,"./es-do.js":567,"./es-us":568,"./es-us.js":568,"./es.js":566,"./et":569,"./et.js":569,"./eu":570,"./eu.js":570,"./fa":571,"./fa.js":571,"./fi":572,"./fi.js":572,"./fo":573,"./fo.js":573,"./fr":574,"./fr-ca":575,"./fr-ca.js":575,"./fr-ch":576,"./fr-ch.js":576,"./fr.js":574,"./fy":577,"./fy.js":577,"./ga":578,"./ga.js":578,"./gd":579,"./gd.js":579,"./gl":580,"./gl.js":580,"./gom-latn":581,"./gom-latn.js":581,"./gu":582,"./gu.js":582,"./he":583,"./he.js":583,"./hi":584,"./hi.js":584,"./hr":585,"./hr.js":585,"./hu":586,"./hu.js":586,"./hy-am":587,"./hy-am.js":587,"./id":588,"./id.js":588,"./is":589,"./is.js":589,"./it":590,"./it-ch":591,"./it-ch.js":591,"./it.js":590,"./ja":592,"./ja.js":592,"./jv":593,"./jv.js":593,"./ka":594,"./ka.js":594,"./kk":595,"./kk.js":595,"./km":596,"./km.js":596,"./kn":597,"./kn.js":597,"./ko":598,"./ko.js":598,"./ku":599,"./ku.js":599,"./ky":600,"./ky.js":600,"./lb":601,"./lb.js":601,"./lo":602,"./lo.js":602,"./lt":603,"./lt.js":603,"./lv":604,"./lv.js":604,"./me":605,"./me.js":605,"./mi":606,"./mi.js":606,"./mk":607,"./mk.js":607,"./ml":608,"./ml.js":608,"./mn":609,"./mn.js":609,"./mr":610,"./mr.js":610,"./ms":611,"./ms-my":612,"./ms-my.js":612,"./ms.js":611,"./mt":613,"./mt.js":613,"./my":614,"./my.js":614,"./nb":615,"./nb.js":615,"./ne":616,"./ne.js":616,"./nl":617,"./nl-be":618,"./nl-be.js":618,"./nl.js":617,"./nn":619,"./nn.js":619,"./pa-in":620,"./pa-in.js":620,"./pl":621,"./pl.js":621,"./pt":622,"./pt-br":623,"./pt-br.js":623,"./pt.js":622,"./ro":624,"./ro.js":624,"./ru":625,"./ru.js":625,"./sd":626,"./sd.js":626,"./se":627,"./se.js":627,"./si":628,"./si.js":628,"./sk":629,"./sk.js":629,"./sl":630,"./sl.js":630,"./sq":631,"./sq.js":631,"./sr":632,"./sr-cyrl":633,"./sr-cyrl.js":633,"./sr.js":632,"./ss":634,"./ss.js":634,"./sv":635,"./sv.js":635,"./sw":636,"./sw.js":636,"./ta":637,"./ta.js":637,"./te":638,"./te.js":638,"./tet":639,"./tet.js":639,"./tg":640,"./tg.js":640,"./th":641,"./th.js":641,"./tl-ph":642,"./tl-ph.js":642,"./tlh":643,"./tlh.js":643,"./tr":644,"./tr.js":644,"./tzl":645,"./tzl.js":645,"./tzm":646,"./tzm-latn":647,"./tzm-latn.js":647,"./tzm.js":646,"./ug-cn":648,"./ug-cn.js":648,"./uk":649,"./uk.js":649,"./ur":650,"./ur.js":650,"./uz":651,"./uz-latn":652,"./uz-latn.js":652,"./uz.js":651,"./vi":653,"./vi.js":653,"./x-pseudo":654,"./x-pseudo.js":654,"./yo":655,"./yo.js":655,"./zh-cn":656,"./zh-cn.js":656,"./zh-hk":657,"./zh-hk.js":657,"./zh-tw":658,"./zh-tw.js":658};function i(t){var n=a(t);return e(n)}function a(t){if(!e.o(s,t)){var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}return s[t]}i.keys=function(){return Object.keys(s)},i.resolve=a,t.exports=i,i.id=805},809:function(t,n,e){"use strict";var s=e(118),i=e.n(s)()(!0);i.push([t.i,".grid-title[data-v-3f8ebca0]{grid-column:1/8;padding:48px 0 12px 0;margin:0}.grid-title span[data-v-3f8ebca0]{font-weight:normal}.grid-title.first-title[data-v-3f8ebca0]{padding:0 0 12px 0}\n","",{version:3,sources:["webpack://src/components/SeparatorVirtualGrid.vue"],names:[],mappings:"AA6CA,6BACC,eAAgB,CAChB,qBAAsB,CACtB,QAAS,CAHV,kCAKE,kBAAmB,CALrB,yCAQE,kBAAmB",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.grid-title {\n\tgrid-column: 1/8;\n\tpadding: 48px 0 12px 0;\n\tmargin: 0;\n\tspan {\n\t\tfont-weight: normal;\n\t}\n\t&.first-title {\n\t\tpadding: 0 0 12px 0;\n\t}\n}\n"],sourceRoot:""}]),n.a=i},810:function(t,n,e){"use strict";var s=e(118),i=e.n(s)()(!0);i.push([t.i,".loader{display:grid;height:60px}\n","",{version:3,sources:["webpack://src/components/Loader.vue"],names:[],mappings:"AAqCA,QACC,YAAa,CACb,WAAY",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.loader {\n\tdisplay: grid;\n\theight: 60px;\n}\n"],sourceRoot:""}]),n.a=i},811:function(t,n,e){"use strict";var s=e(118),i=e.n(s)()(!0);i.push([t.i,"@media (min-width: 0px) and (max-width: 400px){.grid-container[data-v-12502472]{padding:0px 8px 256px 8px}}@media (min-width: 400px) and (max-width: 700px){.grid-container[data-v-12502472]{padding:0px 8px 256px 8px}}@media (min-width: 700px) and (max-width: 1024px){.grid-container[data-v-12502472]{padding:0px 44px 256px 44px}}@media (min-width: 1024px) and (max-width: 1280px){.grid-container[data-v-12502472]{padding:0px 44px 256px 44px}}@media (min-width: 1280px) and (max-width: 1440px){.grid-container[data-v-12502472]{padding:0px 66px 256px 66px}}@media (min-width: 1440px) and (max-width: 1600px){.grid-container[data-v-12502472]{padding:0px 66px 256px 66px}}@media (min-width: 1600px) and (max-width: 2048px){.grid-container[data-v-12502472]{padding:0px 66px 256px 66px}}@media (min-width: 2048px) and (max-width: 2560px){.grid-container[data-v-12502472]{padding:0px 88px 256px 88px}}@media (min-width: 2560px) and (max-width: 3440px){.grid-container[data-v-12502472]{padding:0px 88px 256px 88px}}@media (min-width: 3440px){.grid-container[data-v-12502472]{padding:0px 88px 256px 88px}}\n","",{version:3,sources:["webpack://src/views/Timeline.vue"],names:[],mappings:"AAkTC,+CACC,iCACC,yBAAkD,CAClD,CAHF,iDACC,iCACC,yBAAkD,CAClD,CAHF,kDACC,iCACC,2BAAkD,CAClD,CAHF,mDACC,iCACC,2BAAkD,CAClD,CAHF,mDACC,iCACC,2BAAkD,CAClD,CAHF,mDACC,iCACC,2BAAkD,CAClD,CAHF,mDACC,iCACC,2BAAkD,CAClD,CAHF,mDACC,iCACC,2BAAkD,CAClD,CAHF,mDACC,iCACC,2BAAkD,CAClD,CAHF,2BACC,iCACC,2BAAkD,CAClD",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n$previous: 0;\n@each $size, $config in get('sizes') {\n\t$marginTop: map-get($config, 'marginTop');\n\t$marginW: map-get($config, 'marginW');\n\t// if this is the last entry, only use min-width\n\t$rule: '(min-width: #{$previous}px) and (max-width: #{$size}px)';\n\t@if $size == 'max' {\n\t\t$rule: '(min-width: #{$previous}px)';\n\t}\n\t@media #{$rule} {\n\t\t.grid-container {\n\t\t\tpadding: 0px #{$marginW}px 256px #{$marginW}px;\n\t\t}\n\t}\n\t$previous: $size;\n}\n"],sourceRoot:""}]),n.a=i},815:function(t,n,e){"use strict";e.r(n);var s=e(804),i=e.n(s),a=e(80),r=e(40),o=e(25),d=e(119),c=e(405),p=e(442),l=e(448),m=async function(t=!1,n={}){n=Object.assign({},{page:0,perPage:10*l.sizes.max.count,mimesType:d.a},n);const e="/files/".concat(Object(o.getCurrentUser)().uid),s=n.mimesType.reduce((t,n)=>"".concat(t,"\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>").concat(n,"</d:literal>\n\t\t</d:eq>\n\t"),""),i=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=Object.assign({method:"SEARCH",headers:{"content-Type":"text/xml"},data:'<?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'.concat(p.a,"\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>").concat(e,"</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").concat(s,"\n\t\t\t\t\t\t\t</d:or>\n\t\t\t\t\t\t\t").concat(i,"\n\t\t\t\t\t\t\t<d:eq>\n\t\t\t\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t\t\t\t<oc:owner-id/>\n\t\t\t\t\t\t\t\t</d:prop>\n\t\t\t\t\t\t\t\t<d:literal>").concat(Object(o.getCurrentUser)().uid,"</d:literal>\n\t\t\t\t\t\t\t</d:eq>\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>").concat(n.perPage,"</d:nresults>\n\t\t\t\t\t\t<ns:firstresult>").concat(n.page*n.perPage,"</ns:firstresult>\n\t\t\t\t\t</d:limit>\n\t\t\t\t</d:basicsearch>\n\t\t\t</d:searchrequest>"),deep:!0,details:!0},n);return(await c.a.getDirectoryContents("",n)).data.map(t=>Object(r.b)(t)).map(t=>Object.assign({},t,{filename:t.filename.replace(e,"")}))},h=e(443),u=e(444),g={name:"SeparatorVirtualGrid",inheritAttrs:!1,props:{item:{type:Object,required:!0}}},j=e(117),C=e.n(j),f=e(809),x={insert:"head",singleton:!1},A=(C()(f.a,x),f.a.locals,e(51)),v=Object(A.a)(g,(function(){var t=this.$createElement,n=this._self._c||t;return n("h2",{staticClass:"grid-title",style:{height:this.item.height+"px"}},[this._v("\n\t"+this._s(this.item.injected.month)+"\n\t"),n("span",[this._v(this._s(this.item.injected.year))])])}),[],!1,null,"3f8ebca0",null).exports,y=e(414),b=e.n(y),w=e(445),k={name:"Loader"},D=e(810),$={insert:"head",singleton:!1},z=(C()(D.a,$),D.a.locals,Object(A.a)(k,(function(){var t=this.$createElement,n=this._self._c||t;return n("div",{staticClass:"loader"},[this._t("icon",[n("span",{staticClass:"icon-loading"})])],2)}),[],!1,null,null,null).exports),q=e(399),B=e(447),T={name:"Timeline",components:{EmptyContent:h.a,VirtualGrid:b.a,Navigation:w.a},mixins:[B.a],props:{loading:{type:Boolean,required:!0},onlyFavorites:{type:Boolean,default:!1},mimesType:{type:Array,default:()=>d.a},rootTitle:{type:String,required:!0},path:{type:String,default:""}},data:()=>({cancelRequest:null,done:!1,error:null,page:0,lastSection:"",loaderComponent:z}),computed:{...Object(a.c)(["files","timeline"]),fileList(){return this.timeline.map(t=>this.files[t])},contentList(){return this.fileList.flatMap((t,n)=>{const e=[],s=this.getFormatedDate(t.lastmod,"YYYY MMMM");return this.lastSection!==s&&(e.push({id:"title-".concat(n),injected:{year:this.getFormatedDate(t.lastmod,"YYYY"),month:this.getFormatedDate(t.lastmod,"MMMM")},height:90,columnSpan:0,newRow:!0,renderComponent:v}),this.lastSection=s),e.push({id:"img-".concat(t.fileid),injected:{...t,list:this.fileList,loadMore:this.getContent,canLoop:!1},width:256,height:256,columnSpan:1,renderComponent:u.a}),e})},isEmpty(){return 0===this.fileList.length}},watch:{async onlyFavorites(){this.resetState(),this.getContent()},async mimesType(){this.resetState(),this.getContent()}},beforeMount(){this.getContent()},beforeDestroy(){this.cancelRequest&&this.cancelRequest("Changed view"),this.resetState()},methods:{async getContent(t){if(this.done)return Promise.resolve(!0);this.cancelRequest&&this.cancelRequest("Changed view"),0===this.timeline.length&&this.$emit("update:loading",!0);const{request:n,cancel:e}=Object(q.a)(m);this.cancelRequest=e;const s=5*this.gridConfig.count;try{const e=await n(this.onlyFavorites,{page:this.page,perPage:s,mimesType:this.mimesType});return e.length!==s&&(this.done=!0),this.$store.dispatch("updateTimeline",e),this.$store.dispatch("appendFiles",e),this.page+=1,t?Promise.resolve(e):Promise.resolve(!1)}catch(t){return t.response&&t.response.status&&(404===t.response.status?(this.error=404,setTimeout(()=>{this.$router.push({name:this.$route.name})},3e3)):this.error=t),console.error("Error fetching timeline",t),Promise.resolve(!0)}finally{this.$emit("update:loading",!1),this.cancelRequest=null}},resetState(){this.$store.dispatch("resetTimeline"),this.done=!1,this.error=null,this.page=0,this.lastSection="",this.$emit("update:loading",!0),this.$refs.virtualgrid.resetGrid()},getFormatedDate:(t,n)=>i()(t).format(n)}},_=e(811),F={insert:"head",singleton:!1},O=(C()(_.a,F),_.a.locals,Object(A.a)(T,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return 404===t.error?e("EmptyContent",{attrs:{"illustration-name":"folder"}},[t._v("\n\t"+t._s(t.t("photos","This folder does not exist"))+"\n")]):t.error?e("EmptyContent",[t._v("\n\t"+t._s(t.t("photos","An error occurred"))+"\n")]):t.loading?t._e():e("div",[t.isEmpty?e("Navigation",{key:"navigation",attrs:{basename:t.path,filename:"/","root-title":t.rootTitle}}):t._e(),t._v(" "),t.isEmpty?e("EmptyContent",{attrs:{"illustration-name":"empty"}},[t._v("\n\t\t"+t._s(t.t("photos","No photos in here"))+"\n\t")]):t._e(),t._v(" "),e("div",{staticClass:"grid-container"},[e("VirtualGrid",{ref:"virtualgrid",attrs:{items:t.contentList,"update-function":t.getContent,"get-column-count":function(){return t.gridConfig.count},"get-grid-gap":function(){return t.gridConfig.gap},"update-trigger-margin":700,loader:t.loaderComponent}})],1)],1)}),[],!1,null,"12502472",null));n.default=O.exports}}]);
//# sourceMappingURL=photos-5.js.map?v=b635389fa32320c9b408