(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{246:function(t,e,n){function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)} /** * @copyright Copyright (c) 2019 John Molakvoæ * * @author John Molakvoæ * * @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 . * */var r=n(319),i=r.prepareRequestOptions;r.prepareRequestOptions=function(t,e){e.cancelToken&&"object"===o(e.cancelToken)&&(t.cancelToken=e.cancelToken),i(t,e),e.method&&"string"==typeof e.method&&(t.method=e.method)},t.exports=r},267:function(t,e,n){"use strict";var o=n(318),r=n.n(o),i=n(266),a=n.n(i),s=n(301),c=n.n(s),u=n(18);r.a.getPatcher().patch("request",a.a);var l=Object(u.generateRemoteUrl)("dav"),d=r.a.createClient(l);c()(l).pathname;e.a=d},303:function(t,e,n){"use strict";n.d(e,"a",(function(){return o})); /** * @copyright Copyright (c) 2019 John Molakvoæ * * @author John Molakvoæ * * @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 . * */ var o="\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t";'\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t'.concat(o,"\n\t\t\t\t\n\t\t\t")},304:function(t,e,n){var o=n(508);"string"==typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);(0,n(152).default)("c29390dc",o,!0,{})},326:function(t,e){},327:function(t,e){},347:function(t,e){},349:function(t,e){},366:function(t,e){t.exports={sizes:{400:{marginTop:66,marginW:8,count:3,gap:8},700:{marginTop:66,marginW:8,count:4,gap:8},1024:{marginTop:66,marginW:44,count:5,gap:8},1280:{marginTop:66,marginW:44,count:4,gap:8},1440:{marginTop:88,marginW:66,count:5,gap:8},1600:{marginTop:88,marginW:66,count:6,gap:8},2048:{marginTop:88,marginW:66,count:7,gap:8},2560:{marginTop:88,marginW:88,count:8,gap:8},3440:{marginTop:88,marginW:88,count:9,gap:8},max:{marginTop:88,marginW:88,count:10,gap:8}}}},506:function(t,e){function n(t,e,n){var o,r,i,a,s;function c(){var u=Date.now()-a;u=0?o=setTimeout(c,e-u):(o=null,n||(s=t.apply(i,r),i=r=null))}null==e&&(e=100);var u=function(){i=this,r=arguments,a=Date.now();var u=n&&!o;return o||(o=setTimeout(c,e)),u&&(s=t.apply(i,r),i=r=null),s};return u.clear=function(){o&&(clearTimeout(o),o=null)},u.flush=function(){o&&(s=t.apply(i,r),i=r=null,clearTimeout(o),o=null)},u}n.debounce=n,t.exports=n},507:function(t,e,n){"use strict";var o=n(304);n.n(o).a},508:function(t,e,n){(e=n(151)(!1)).push([t.i,".grid-filler[data-v-4517b139]{grid-column-end:-1}.grid-loading[data-v-4517b139]{grid-column:1/-1;height:88px}\n",""]),t.exports=e},512:function(t,e,n){"use strict";n.r(e);var o=n(49),r=n(506),i=n.n(r),a=n(22),s=n(21),c=n(276),u=n(267),l=n(303),d=n(366);function p(t,e,n,o,r,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(o,r)}function f(t){return function(){var e=this,n=arguments;return new Promise((function(o,r){var i=t.apply(e,n);function a(t){p(i,o,r,a,s,"next",t)}function s(t){p(i,o,r,a,s,"throw",t)}a(void 0)}))}} /** * @copyright Copyright (c) 2019 John Molakvoæ * * @author John Molakvoæ * * @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 . * */var g=function(){return h.apply(this,arguments)};function h(){return(h=f(regeneratorRuntime.mark((function t(){var e,n,o,r,i,p,f=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=f.length>0&&void 0!==f[0]&&f[0],n=f.length>1&&void 0!==f[1]?f[1]:{},n=Object.assign({},{page:0,perPage:10*d.sizes.max.count},n),o="/files/".concat(Object(s.getCurrentUser)().uid),r=c.a.reduce((function(t,e){return"".concat(t,"\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t").concat(e,"\n\t\t\n\t")}),""),i=e?"\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t1\n\t\t\t":"",n=Object.assign({method:"SEARCH",headers:{"content-Type":"text/xml"},data:'\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t'.concat(l.a,"\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t").concat(o,"\n\t\t\t\t\t\t\tinfinity\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t").concat(r,"\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t").concat(i,"\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t").concat(Object(s.getCurrentUser)().uid,"\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t").concat(n.perPage,"\n\t\t\t\t\t\t").concat(n.page*n.perPage,"\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t"),deep:!0,details:!0},n),t.next=9,u.a.getDirectoryContents("",n);case 9:return p=t.sent,t.abrupt("return",p.data.map((function(t){return Object(a.b)(t)})).map((function(t){return Object.assign({},t,{filename:t.filename.replace(o,"")})})));case 11:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var m=n(305),w=n(307);let v="undefined",b=typeof window!==v?window:{},y=typeof performance!==v?performance:Date,R=()=>y.now(),x="AnimationFrame",C="cancel"+x,O="request"+x,T=b[O]&&b[O].bind(b),P=b[C]&&b[C].bind(b);if(!T||!P){let t=0;T=e=>{let n=R(),o=Math.max(t+1e3/60,n);return setTimeout(()=>{e(t=o)},o-n)},P=function(t){return clearTimeout(t)}}var j=function(t,e){var n=R(),o={};return o.v=T((function r(){R()-n>=e?t.call(null):o.v=T(r)})),o},q=n(308),D=new(n(0).default)({data:function(){return{gridConfig:d.sizes.max}},watch:{gridConfig:function(t){this.$emit("changed",t)}},created:function(){window.addEventListener("resize",this.handleWindowResize),this.handleWindowResize()},beforeDestroy:function(){window.removeEventListener("resize",this.handleWindowResize)},methods:{handleWindowResize:function(){var t=Object.keys(d.sizes).find((function(t){return t>document.documentElement.clientWidth}));this.gridConfig=d.sizes[t]}}}),S={data:function(){return{gridConfig:{}}},created:function(){var t=this;D.$on("changed",(function(e){t.gridConfig=e})),console.debug("Current grid config",D.gridConfig),this.gridConfig=D.gridConfig},beforeDestroy:function(){D.$off("changed",this.gridConfig)}},E={name:"VirtualGrid",components:{Grid:q.a},mixins:[S],props:{list:{type:Array,default:function(){return[]}},props:{type:Function,default:function(){return{}}},component:{type:Function,required:!0},loadingPage:{type:Boolean,default:!1}},data:function(){return{shownFirstRow:0,shownLastRow:this.getRowNumber(this.list.length-1)}},computed:{shownList:function(){var t=this;return this.list.filter((function(e,n){return t.isVisible(n)}))},topPadding:function(){return"".concat(100*this.shownFirstRow,"%")},bottomPadding:function(){return"".concat(100*(this.lastRow-this.shownLastRow),"%")},lastRow:function(){return this.getRowNumber(this.list.length-1)}},created:function(){window.addEventListener("resize",this.onDocumentScroll),window.addEventListener("scroll",this.onDocumentScroll)},mounted:function(){this.onDocumentScroll()},beforeDestroy:function(){window.removeEventListener("resize",this.onDocumentScroll),window.removeEventListener("scroll",this.onDocumentScroll)},methods:{debounceOnDocumentScroll:function(){var t;this.debounceOnDocumentScrollRequest&&(t=this.debounceOnDocumentScrollRequest,P(t.v||-1)),this.debounceOnDocumentScrollRequest=j(this.onDocumentScroll,150)},onDocumentScroll:function(){var t=this.$refs.grid.$el,e=getComputedStyle(t),n=parseFloat(e.gridTemplateColumns.split(" ")[0],10),o=this.roundToTen(window.pageYOffset-this.gridConfig.marginTop),r=Math.floor(o/(n+this.gridConfig.gap))-1,i=Math.ceil(window.innerHeight/n)+r+1;this.shownFirstRow=Math.max(r,0),this.shownLastRow=Math.min(i,this.lastRow),this.shownLastRow>=this.lastRow&&this.$emit("bottomReached")},isVisible:function(t){var e=this.getRowNumber(t);return e>=this.shownFirstRow&&e0,expression:"shownFirstRow > 0"}],key:"filler-top",ref:"filler-top",staticClass:"grid-filler grid-filler--top",style:{paddingBottom:t.topPadding},attrs:{role:"none"}}),t._v(" "),t._l(t.shownList,(function(e,o){return n(t.component(e),t._b({key:e.fileid,ref:"item-"+o,refInFor:!0,tag:"component",class:"row-"+t.getRowNumber(o),attrs:{list:t.list}},"component",t.props(e),!1))})),t._v(" "),t.loadingPage?n("div",{key:"grid-loading",staticClass:"grid-loading icon-loading",attrs:{role:"none"}}):t._e(),t._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:t.shownLastRow