photos/js/photos-src_mixins_FetchFile...

3 lines
32 KiB
JavaScript

/*! For license information please see photos-src_mixins_FetchFilesMixin_js-src_mixins_FilesSelectionMixin_js-node_modules_vue-material-des-bd2ac8.js.LICENSE.txt */
"use strict";(self.webpackChunkphotos=self.webpackChunkphotos||[]).push([["src_mixins_FetchFilesMixin_js-src_mixins_FilesSelectionMixin_js-node_modules_vue-material-des-bd2ac8"],{66951:(n,t,e)=>{e.d(t,{Z:()=>_});var r=e(59537),i=e(99588),o=e(22200),s=e(3301),a=e(81067),c=e(2161),l=e(80351),u=e.n(l);function d(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function f(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?d(Object(e),!0).forEach((function(t){p(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):d(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}function p(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function h(n,t,e,r,i,o,s){try{var a=n[o](s),c=a.value}catch(n){return void e(n)}a.done?t(c):Promise.resolve(c).then(r,i)}function m(n){return function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function s(n){h(o,r,i,s,a,"next",n)}function a(n){h(o,r,i,s,a,"throw",n)}s(void 0)}))}}function g(){return y.apply(this,arguments)}function y(){return(y=m(regeneratorRuntime.mark((function n(){var t,e,r,l,d,p,h,m=arguments;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t=m.length>0&&void 0!==m[0]?m[0]:"",e=m.length>1&&void 0!==m[1]?m[1]:{},e=f({firstResult:0,nbResults:200,mimesType:s.Oj,onThisDay:!1,onlyFavorites:!1},e),r="/files/".concat((0,o.getCurrentUser)().uid),l=e.mimesType.reduce((function(n,t){return"".concat(n,"\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(t,"</d:literal>\n\t\t</d:eq>\n\t")}),""),d=e.onlyFavorites?"<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>":"",p=e.onThisDay?"<d:or>".concat(Array(20).fill(1).map((function(n,t){var e=u()(Date.now()).startOf("day").subtract(3,"d").subtract(t+1,"y"),r=u()(Date.now()).endOf("day").add(3,"d").subtract(t+1,"y");return"<d:and>\n\t\t\t\t<d:gt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified />\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>".concat(e.format(u().defaultFormatUtc),"</d:literal>\n\t\t\t\t</d:gt>\n\t\t\t\t<d:lt>\n\t\t\t\t\t<d:prop>\n\t\t\t\t\t\t<d:getlastmodified />\n\t\t\t\t\t</d:prop>\n\t\t\t\t\t<d:literal>").concat(r.format(u().defaultFormatUtc),"</d:literal>\n\t\t\t\t</d:lt>\n\t\t\t</d:and>")})).join("\n"),"</d:or>"):"",e=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(c.N,"\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(r,"/").concat(t,"</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(l,"\n\t\t\t\t\t\t\t</d:or>\n\t\t\t\t\t\t\t").concat(d,"\n\t\t\t\t\t\t\t").concat(p,"\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(e.nbResults,"</d:nresults>\n\t\t\t\t\t\t<ns:firstresult>").concat(e.firstResult,"</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},e),n.next=10,a.Z.getDirectoryContents("",e);case 10:return h=n.sent,n.abrupt("return",h.data.map((function(n){return(0,i.AX)(n)})).map((function(n){return f(f({},n),{},{filename:n.filename.replace(r,"")})})));case 12:case"end":return n.stop()}}),n)})))).apply(this,arguments)}var v=e(4615),b=e(32114);function w(n){return function(n){if(Array.isArray(n))return A(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,t){if(!n)return;if("string"==typeof n)return A(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);"Object"===e&&n.constructor&&(e=n.constructor.name);if("Map"===e||"Set"===e)return Array.from(n);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return A(n,t)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}function C(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function T(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?C(Object(e),!0).forEach((function(t){O(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):C(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}function O(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function S(n,t,e,r,i,o,s){try{var a=n[o](s),c=a.value}catch(n){return void e(n)}a.done?t(c):Promise.resolve(c).then(r,i)}function x(n){return function(){var t=this,e=arguments;return new Promise((function(r,i){var o=n.apply(t,e);function s(n){S(o,r,i,s,a,"next",n)}function a(n){S(o,r,i,s,a,"throw",n)}s(void 0)}))}}const _={name:"FetchFilesMixin",data:function(){return{errorFetchingFiles:null,loadingFiles:!1,doneFetchingFiles:!1,cancelFilesRequest:function(){},semaphore:new b.Z(30),fetchSemaphore:new b.Z(1),semaphoreSymbol:null,fetchedFileIds:[]}},beforeDestroy:function(){this.cancelFilesRequest&&this.cancelFilesRequest("Changed view")},beforeRouteLeave:function(n,t,e){return this.cancelFilesRequest&&this.cancelFilesRequest("Changed view"),e()},watch:{$route:function(){this.resetFetchFilesState()}},methods:{fetchFiles:function(){var n=arguments,t=this;return x(regeneratorRuntime.mark((function e(){var i,o,s,a,c,l,u,d,f,p,h,m,y;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.length>0&&void 0!==n[0]?n[0]:"",o=n.length>1&&void 0!==n[1]?n[1]:{},s=n.length>2&&void 0!==n[2]?n[2]:[],!t.doneFetchingFiles&&!t.loadingFiles){e.next=5;break}return e.abrupt("return",[]);case 5:return e.next=7,t.semaphore.acquire((function(){return 0}),"fetchFiles");case 7:return a=e.sent,e.next=10,t.fetchSemaphore.acquire();case 10:return c=e.sent,e.prev=11,t.errorFetchingFiles=null,t.loadingFiles=!0,t.semaphoreSymbol=a,u=(0,v.Z)(g),d=u.request,f=u.cancel,t.cancelFilesRequest=f,p=1e3,e.next=20,d(i,T({firstResult:t.fetchedFileIds.length,nbResults:p},o));case 20:return(h=e.sent).length!==p&&(t.doneFetchingFiles=!0),m=h.map((function(n){return n.fileid})).filter((function(n){return!t.fetchedFileIds.includes(n)})),(l=t.fetchedFileIds).push.apply(l,w(m.map((function(n){return n.toString()})).filter((function(n){return!s.includes(n)})))),t.$store.dispatch("appendFiles",h),r.Z.debug("[FetchFilesMixin] Fetched ".concat(m.length," new files: "),m),e.abrupt("return",m);case 29:if(e.prev=29,e.t0=e.catch(11),404!==(null===(y=e.t0.response)||void 0===y?void 0:y.status)){e.next=35;break}t.errorFetchingFiles=404,e.next=40;break;case 35:if("ERR_CANCELED"!==e.t0.code){e.next=39;break}return e.abrupt("return",[]);case 39:t.errorFetchingFiles=e.t0;case 40:r.Z.error("Error fetching files",e.t0);case 41:return e.prev=41,t.loadingFiles=!1,t.cancelFilesRequest=function(){},t.semaphore.release(a),t.fetchSemaphore.release(c),e.finish(41);case 47:return e.abrupt("return",[]);case 48:case"end":return e.stop()}}),e,null,[[11,29,41,47]])})))()},resetFetchFilesState:function(){this.doneFetchingFiles=!1,this.errorFetchingFiles=null,this.loadingFiles=!1,this.fetchedFileIds=[],this.cancelFilesRequest=function(){}}}}},98171:(n,t,e)=>{e.d(t,{Z:()=>r});const r={name:"FilesSelectionMixin",data:function(){return{selection:{}}},methods:{onFileSelectToggle:function(n){var t=n.id,e=n.value;this.$set(this.selection,t,e)},onUncheckFiles:function(n){var t=this;n.forEach((function(n){return t.$set(t.selection,n,!1)}))},resetSelection:function(){this.selection={}}},computed:{selectedFileIds:function(){var n=this;return Object.keys(this.selection).filter((function(t){return n.selection[t]}))}}}},6726:(n,t,e)=>{e.d(t,{Z:()=>a});var r=e(87537),i=e.n(r),o=e(23645),s=e.n(o)()(i());s.push([n.id,".files-list-viewer[data-v-5196d262]{height:100%;position:relative}.files-list-viewer[data-v-5196d262] .empty-content__icon{width:200px;height:200px}.files-list-viewer[data-v-5196d262] .empty-content__icon .empty-content-illustration svg{width:200px;height:200px}.files-list-viewer .tiled-row[data-v-5196d262]{display:flex}.files-list-viewer__section-header[data-v-5196d262]{position:-webkit-sticky;position:sticky;top:0;z-index:3;background:var(--color-main-background)}.files-list-viewer__loader[data-v-5196d262]{margin:50px 0}","",{version:3,sources:["webpack://./src/components/FilesListViewer.vue"],names:[],mappings:"AAiNA,oCACC,WAAA,CACA,iBAAA,CAEA,0DACC,WAAA,CACA,YAAA,CAEA,0FACC,WAAA,CACA,YAAA,CAIF,+CACC,YAAA,CAGD,oDACC,uBAAA,CAAA,eAAA,CACA,KAAA,CACA,SAAA,CACA,uCAAA,CAGD,4CACC,aAAA",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.files-list-viewer {\n\theight: 100%;\n\tposition: relative;\n\n\t::v-deep .empty-content__icon {\n\t\twidth: 200px;\n\t\theight: 200px;\n\n\t\t.empty-content-illustration svg {\n\t\t\twidth: 200px;\n\t\t\theight: 200px;\n\t\t}\n\t}\n\n\t.tiled-row {\n\t\tdisplay: flex;\n\t}\n\n\t&__section-header {\n\t\tposition: sticky;\n\t\ttop: 0;\n\t\tz-index: 3;\n\t\tbackground: var(--color-main-background);\n\t}\n\n\t&__loader {\n\t\tmargin: 50px 0;\n\t}\n}\n'],sourceRoot:""}]);const a=s},78504:(n,t,e)=>{e.d(t,{Z:()=>a});var r=e(87537),i=e.n(r),o=e(23645),s=e.n(o)()(i());s.push([n.id,".loader{display:grid;height:60px}","",{version:3,sources:["webpack://./src/components/Loader.vue"],names:[],mappings:"AAsCA,QACC,YAAA,CACA,WAAA",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.loader {\n\tdisplay: grid;\n\theight: 60px;\n}\n'],sourceRoot:""}]);const a=s},13319:(n,t,e)=>{e.d(t,{Z:()=>a});var r=e(87537),i=e.n(r),o=e(23645),s=e.n(o)()(i());s.push([n.id,".tiled-container[data-v-58b32a0e]{height:100%}.tiled-container .tiled-row[data-v-58b32a0e]{display:flex}","",{version:3,sources:["webpack://./src/components/TiledLayout.vue"],names:[],mappings:"AA8FA,kCACC,WAAA,CAEA,6CACC,YAAA",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.tiled-container {\n\theight: 100%;\n\n\t.tiled-row {\n\t\tdisplay: flex;\n\t}\n}\n'],sourceRoot:""}]);const a=s},40321:(n,t,e)=>{e.d(t,{Z:()=>a});var r=e(87537),i=e.n(r),o=e(23645),s=e.n(o)()(i());s.push([n.id,".tiled-row[data-v-452165e4]{display:flex}","",{version:3,sources:["webpack://./src/components/TiledRows.vue"],names:[],mappings:"AAsCA,4BACC,YAAA",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.tiled-row {\n\tdisplay: flex;\n}\n'],sourceRoot:""}]);const a=s},21238:(n,t,e)=>{e.d(t,{Z:()=>a});var r=e(87537),i=e.n(r),o=e(23645),s=e.n(o)()(i());s.push([n.id,".vs-container[data-v-5e8733b7]{overflow-y:scroll;height:100%}.vs-rows-container[data-v-5e8733b7]{box-sizing:border-box}","",{version:3,sources:["webpack://./src/components/VirtualScrolling.vue"],names:[],mappings:"AAkTA,+BACC,iBAAA,CACA,WAAA,CAGD,oCACC,qBAAA",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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.vs-container {\n\toverflow-y: scroll;\n\theight: 100%;\n}\n\n.vs-rows-container {\n\tbox-sizing: border-box;\n}\n'],sourceRoot:""}]);const a=s},84796:(n,t,e)=>{e.d(t,{Z:()=>i});const r={name:"DownloadIcon",props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const i=(0,e(51900).Z)(r,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("span",n._b({staticClass:"material-design-icon download-icon",attrs:{"aria-hidden":!n.title,"aria-label":n.title,role:"img"},on:{click:function(t){return n.$emit("click",t)}}},"span",n.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:n.fillColor,width:n.size,height:n.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"}},[n.title?e("title",[n._v(n._s(n.title))]):n._e()])])])}),[],!1,null,null,null).exports},75017:(n,t,e)=>{e.d(t,{Z:()=>i});const r={name:"SendIcon",props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const i=(0,e(51900).Z)(r,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("span",n._b({staticClass:"material-design-icon send-icon",attrs:{"aria-hidden":!n.title,"aria-label":n.title,role:"img"},on:{click:function(t){return n.$emit("click",t)}}},"span",n.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:n.fillColor,width:n.size,height:n.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M2,21L23,12L2,3V10L17,12L2,14V21Z"}},[n.title?e("title",[n._v(n._s(n.title))]):n._e()])])])}),[],!1,null,null,null).exports},42408:(n,t,e)=>{e.d(t,{Z:()=>Q});var r=e(20629),i=e(33476),o=e(59537);function s(n,t){return n.map((function(n){return t*n.ratio})).reduce((function(n,t){return n+t}))}function a(n,t,e,r){if(1===n.length&&n[0].sectionHeader)return n[0].height;var i=t/n.map((function(n){return n.ratio})).reduce((function(n,t){return n+t}));return 1===n.length&&n[0].width>t&&(i=t/n[0].ratio),e&&(i=Math.min(r+20,i)),i}var c=e(93379),l=e.n(c),u=e(7795),d=e.n(u),f=e(90569),p=e.n(f),h=e(3565),m=e.n(h),g=e(19216),y=e.n(g),v=e(44589),b=e.n(v),w=e(40321),A={};A.styleTagTransform=b(),A.setAttributes=m(),A.insert=p().bind(null,"head"),A.domAPI=d(),A.insertStyleElement=y();l()(w.Z,A);w.Z&&w.Z.locals&&w.Z.locals;var C=e(51900);function T(n,t){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=function(n,t){if(!n)return;if("string"==typeof n)return O(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);"Object"===e&&n.constructor&&(e=n.constructor.name);if("Map"===e||"Set"===e)return Array.from(n);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return O(n,t)}(n))||t&&n&&"number"==typeof n.length){e&&(n=e);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return s=n.done,n},e:function(n){a=!0,o=n},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function O(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}const S={name:"TiledLayout",components:{TiledRows:(0,C.Z)({},(function(n,t){var e=t._c;return e("ul",t._l(t.props.rows,(function(n){return e("div",{key:n.key,staticClass:"tiled-row",style:{height:n.height+"px"}},t._l(n.items,(function(r){return e("li",{key:r.id,style:{width:r.ratio?n.height*r.ratio+"px":"100%",height:n.height+"px"}},[t._t("default",null,{row:n,item:r})],2)})),0)})),0)}),[],!0,null,"452165e4",null).exports},props:{items:{type:Array,required:!0},baseHeight:{type:Number,default:200}},data:function(){return{containerWidth:0,resizeObserver:null}},computed:{rows:function(){return o.Z.debug("[TiledLayout] Computing rows",this.items),function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200;if(0===t)return[];for(var r=[],i=0,o=0;o<n.length;){var c=[];do{c.push(n[o++])}while(o<n.length&&!n[o-1].sectionHeader&&!n[o].sectionHeader&&s([].concat(c,[n[o]]),e)<=t);r[i]={items:c,height:a(c,t,n.length===o||!0===n[o].sectionHeader,e),key:c.map((function(n){return n.id})).join("-")},i+=1}return r}(this.items,this.containerWidth,this.baseHeight)}},mounted:function(){var n=this;this.resizeObserver=new ResizeObserver((function(t){var e,r=T(t);try{for(r.s();!(e=r.n()).done;){var i=e.value,o=i.contentRect;i.target.classList.contains("tiled-container")&&(n.containerWidth=o.width)}}catch(n){r.e(n)}finally{r.f()}})),this.resizeObserver.observe(this.$refs.tiledLayoutContainer)},beforeDestroy:function(){this.resizeObserver.disconnect()}};var x=e(13319),_={};_.styleTagTransform=b(),_.setAttributes=m(),_.insert=p().bind(null,"head"),_.domAPI=d(),_.insertStyleElement=y();l()(x.Z,_);x.Z&&x.Z.locals&&x.Z.locals;const W=(0,C.Z)(S,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{ref:"tiledLayoutContainer",staticClass:"tiled-container"},[n._t("default",(function(){return[e("TiledRows",{attrs:{rows:n.rows}})]}),{rows:n.rows})],2)}),[],!1,null,"58b32a0e",null).exports;var j=e(20296);function F(n,t){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=E(n))||t&&n&&"number"==typeof n.length){e&&(n=e);var r=0,i=function(){};return{s:i,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return s=n.done,n},e:function(n){a=!0,o=n},f:function(){try{s||null==e.return||e.return()}finally{if(a)throw o}}}}function P(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function R(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?P(Object(e),!0).forEach((function(t){Z(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):P(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}function Z(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function k(n){return function(n){if(Array.isArray(n))return I(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||E(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(n,t){if(n){if("string"==typeof n)return I(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?I(n,t):void 0}}function I(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}const H={name:"VirtualScrolling",props:{rows:{type:Array,required:!0},containerElement:{type:HTMLElement,default:null},useWindow:{type:Boolean,default:!1},renderWindowRatio:{type:Number,default:4},willBeVisibleWindowRatio:{type:Number,default:4},visibleWindowRatio:{type:Number,default:0},bottomBufferRatio:{type:Number,default:5},scrollToKey:{type:String,default:""}},data:function(){return{scrollPosition:0,containerHeight:0,rowsContainerHeight:0,resizeObserver:null}},computed:{visibleRows:function(){o.Z.debug("[VirtualScrolling] Computing visible rows",this.rows);var n=this.scrollPosition,t=this.containerHeight,e=t*this.renderWindowRatio,r=t*this.willBeVisibleWindowRatio,i=t*this.visibleWindowRatio,s=0,a=0;return this.rows.reduce((function(o,c){if(s=a,a+=c.height,s<n-e||n+t+e<s)return o;var l="none";return n-r<s&&s<n+t+r&&(l="near",n-i<s&&s<n+t+i&&(l="visible"),n-i<a&&a<n+t+i&&(l="visible")),[].concat(k(o),[R(R({},c),{},{visibility:l})])}),[])},rowsHeight:function(){return this.rows.map((function(n){return n.height})).reduce((function(n,t){return n+t}),0)+200},paddingTop:function(){var n=this;if(0===this.visibleRows.length)return 0;var t=this.rows.findIndex((function(t){return t.items===n.visibleRows[0].items}));return this.rows.map((function(n){return n.height})).slice(0,t).reduce((function(n,t){return n+t}),0)},rowsContainerStyle:function(){return{height:"".concat(this.rowsHeight,"px"),paddingTop:"".concat(this.paddingTop,"px")}},isNearBottom:function(){var n=this.containerHeight*this.bottomBufferRatio;return this.scrollPosition+this.containerHeight>=this.rowsHeight-n},container:function(){return o.Z.debug("[VirtualScrolling] Computing container"),null!==this.containerElement?this.containerElement:this.useWindow?window:this.$refs.container}},watch:{isNearBottom:function(n){n&&this.$emit("need-content")},rows:function(){this.isNearBottom&&this.$emit("need-content")},scrollToKey:function(n){var t,e=0,r=F(this.rows);try{for(r.s();!(t=r.n()).done;){var i=t.value;if(i.key===n)return void this.$refs.container.scrollTo({top:e,behavior:"smooth"});e+=i.height}}catch(n){r.e(n)}finally{r.f()}}},mounted:function(){var n=this;this.resizeObserver=new ResizeObserver((function(t){var e,r=F(t);try{for(r.s();!(e=r.n()).done;){var i=e.value,o=i.contentRect;i.target.classList.contains("vs-container")&&(n.containerHeight=o.height),i.target.classList.contains("vs-rows-container")&&(n.rowsContainerHeight=o.height)}}catch(n){r.e(n)}finally{r.f()}})),this.useWindow?(window.addEventListener("resize",this.updateContainerSize),this.containerHeight=window.innerHeight):this.resizeObserver.observe(this.container),this.resizeObserver.observe(this.$refs.rowsContainer),this.container.addEventListener("scroll",this.updateScrollPosition)},beforeDestroy:function(){this.useWindow&&window.removeEventListener("resize",this.updateContainerSize),this.resizeObserver.disconnect(),this.container.removeEventListener("scroll",this.updateScrollPosition)},methods:{updateScrollPosition:(0,j.debounce)((function(){this.useWindow?this.scrollPosition=this.container.scrollY:this.scrollPosition=this.container.scrollTop}),200),updateContainerSize:function(){this.containerHeight=window.innerHeight}}};var z=e(21238),D={};D.styleTagTransform=b(),D.setAttributes=m(),D.insert=p().bind(null,"head"),D.domAPI=d(),D.insertStyleElement=y();l()(z.Z,D);z.Z&&z.Z.locals&&z.Z.locals;const L=(0,C.Z)(H,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return n.useWindow||null!==n.containerElement?e("div",{ref:"rowsContainer",staticClass:"vs-rows-container",style:n.rowsContainerStyle},[n._t("default",null,{renderedRows:n.visibleRows}),n._v(" "),n._t("loader")],2):e("div",{ref:"container",staticClass:"vs-container"},[e("div",{ref:"rowsContainer",staticClass:"vs-rows-container",style:n.rowsContainerStyle},[n._t("default",null,{renderedRows:n.visibleRows}),n._v(" "),n._t("loader")],2)])}),[],!1,null,"5e8733b7",null).exports;var $=e(8702),M=e(51612);function B(n){return function(n){if(Array.isArray(n))return q(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,t){if(!n)return;if("string"==typeof n)return q(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);"Object"===e&&n.constructor&&(e=n.constructor.name);if("Map"===e||"Set"===e)return Array.from(n);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return q(n,t)}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}function V(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function N(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?V(Object(e),!0).forEach((function(t){U(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):V(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}function U(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}const Y={name:"FilesListViewer",components:{EmptyContent:i.EmptyContent,TiledLayout:W,VirtualScrolling:L,Loader:$.Z},props:{fileIds:{type:Array,default:void 0},fileIdsBySection:{type:Object,default:void 0},sections:{type:Array,default:void 0},loading:{type:Boolean,required:!0},emptyMessage:{type:String,default:""},baseHeight:{type:Number,default:200},sectionHeaderHeight:{type:Number,default:75},scrollToSection:{type:String,default:""},containerElement:{type:HTMLElement,default:null},useWindow:{type:Boolean,default:!1}},data:function(){return{EmptyBox:M}},computed:N(N({},(0,r.Se)(["files"])),{},{fileIdsToItems:function(){return void 0===this.fileIds?[]:this.fileIds.map(this.mapFileToItem)},sectionsToItems:function(){var n=this;return void 0===this.sections?[]:this.sections.flatMap((function(t){return[{id:t,sectionHeader:!0,height:n.sectionHeaderHeight}].concat(B(n.fileIdsBySection[t].map(n.mapFileToItem)))}))},items:function(){return void 0!==this.fileIds?this.fileIdsToItems:void 0!==this.sections?this.sectionsToItems:[]}}),methods:{needContent:function(){this.$emit("need-content")},mapFileToItem:function(n){var t=this.files[n];return{id:t.fileid,width:t.fileMetadataSizeParsed.width,height:t.fileMetadataSizeParsed.height,ratio:t.fileMetadataSizeParsed.width/t.fileMetadataSizeParsed.height}}}};var G=e(6726),K={};K.styleTagTransform=b(),K.setAttributes=m(),K.insert=p().bind(null,"head"),K.domAPI=d(),K.insertStyleElement=y();l()(G.Z,K);G.Z&&G.Z.locals&&G.Z.locals;const Q=(0,C.Z)(Y,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"files-list-viewer"},[""===n.emptyMessage||0!==n.items.length||n.loading?n._e():e("EmptyContent",{key:"emptycontent",scopedSlots:n._u([{key:"icon",fn:function(){return[e("span",{staticClass:"empty-content-illustration",domProps:{innerHTML:n._s(n.EmptyBox)}})]},proxy:!0}],null,!1,3410044941)},[n._v("\n\t\t"+n._s(n.emptyMessage)+"\n\t")]),n._v(" "),e("TiledLayout",{attrs:{"base-height":n.baseHeight,items:n.items},scopedSlots:n._u([{key:"default",fn:function(t){var r=t.rows;return e("VirtualScrolling",{attrs:{"use-window":n.useWindow,rows:r,"scroll-to-key":n.scrollToSection},on:{"need-content":n.needContent},scopedSlots:n._u([{key:"default",fn:function(t){var r=t.renderedRows;return e("ul",{},n._l(r,(function(t){return e("div",{key:t.key,staticClass:"tiled-row",class:{"files-list-viewer__section-header":t.items[0].sectionHeader},style:{height:t.height+"px"}},n._l(t.items,(function(r){return e("li",{key:r.id,style:{width:r.ratio?t.height*r.ratio+"px":"100%",height:t.height+"px"}},[n._t("default",null,{file:r,visibility:t.visibility})],2)})),0)})),0)}},n.loading?{key:"loader",fn:function(){return[e("Loader",{staticClass:"files-list-viewer__loader"})]},proxy:!0}:null],null,!0)})}}])})],1)}),[],!1,null,"5196d262",null).exports},8702:(n,t,e)=>{e.d(t,{Z:()=>v});const r={name:"Loader"};var i=e(93379),o=e.n(i),s=e(7795),a=e.n(s),c=e(90569),l=e.n(c),u=e(3565),d=e.n(u),f=e(19216),p=e.n(f),h=e(44589),m=e.n(h),g=e(78504),y={};y.styleTagTransform=m(),y.setAttributes=d(),y.insert=l().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=p();o()(g.Z,y);g.Z&&g.Z.locals&&g.Z.locals;const v=(0,e(51900).Z)(r,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("div",{staticClass:"loader"},[n._t("icon",(function(){return[e("span",{staticClass:"icon-loading"})]}))],2)}),[],!1,null,null,null).exports}}]);
//# sourceMappingURL=photos-src_mixins_FetchFilesMixin_js-src_mixins_FilesSelectionMixin_js-node_modules_vue-material-des-bd2ac8.js.map?v=7a72ebb3ce570b47c654