photos/js/photos-src_mixins_FetchFile...

3 lines
22 KiB
JavaScript

/*! For license information please see photos-src_mixins_FetchFilesMixin_js-src_mixins_FilesSelectionMixin_js-node_modules_vue-material-des-d0b874.js.LICENSE.txt */
"use strict";(self.webpackChunkphotos=self.webpackChunkphotos||[]).push([["src_mixins_FetchFilesMixin_js-src_mixins_FilesSelectionMixin_js-node_modules_vue-material-des-d0b874"],{66951:(t,n,e)=>{e.d(n,{Z:()=>_});var r=e(59537),i=e(94236),o=e(45994),a=e(3301),s=e(81067),c=e(2161),l=e(80351),u=e.n(l);function d(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function f(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?d(Object(e),!0).forEach((function(n){p(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):d(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function p(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function m(t,n,e,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void e(t)}s.done?n(c):Promise.resolve(c).then(r,i)}function h(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function a(t){m(o,r,i,a,s,"next",t)}function s(t){m(o,r,i,a,s,"throw",t)}a(void 0)}))}}function g(){return y.apply(this,arguments)}function y(){return y=h(regeneratorRuntime.mark((function t(){var n,e,r,l,d,p,m,h=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=h.length>0&&void 0!==h[0]?h[0]:"",e=h.length>1&&void 0!==h[1]?h[1]:{},e=f({firstResult:0,nbResults:200,mimesType:a.Oj,onThisDay:!1,onlyFavorites:!1},e),r="/files/".concat((0,o.ts)().uid),l=e.mimesType.reduce((function(t,n){return"".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")}),""),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(t,n){var e=u()(Date.now()).startOf("day").subtract(3,"d").subtract(n+1,"y"),r=u()(Date.now()).endOf("day").add(3,"d").subtract(n+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(n,"</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),t.next=10,s.Z.getDirectoryContents("",e);case 10:return m=t.sent,t.abrupt("return",m.data.map((function(t){return(0,i.AX)(t)})).map((function(t){return f(f({},t),{},{filename:t.filename.replace(r,"")})})));case 12:case"end":return t.stop()}}),t)}))),y.apply(this,arguments)}var v=e(4615),b=e(32114),A=e(25108);function w(t){return function(t){if(Array.isArray(t))return C(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return C(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return C(t,n)}(t)||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 C(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function O(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function F(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?O(Object(e),!0).forEach((function(n){x(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):O(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function x(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function T(t,n,e,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void e(t)}s.done?n(c):Promise.resolve(c).then(r,i)}function S(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var o=t.apply(n,e);function a(t){T(o,r,i,a,s,"next",t)}function s(t){T(o,r,i,a,s,"throw",t)}a(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(t,n,e){return this.cancelFilesRequest&&this.cancelFilesRequest("Changed view"),e()},watch:{$route:function(){this.resetFetchFilesState()}},methods:{fetchFiles:function(){var t=arguments,n=this;return S(regeneratorRuntime.mark((function e(){var i,o,a,s,c,l,u,d,f,p,m,h,y;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=t.length>0&&void 0!==t[0]?t[0]:"",o=t.length>1&&void 0!==t[1]?t[1]:{},a=t.length>2&&void 0!==t[2]?t[2]:[],!n.doneFetchingFiles&&!n.loadingFiles){e.next=5;break}return e.abrupt("return",[]);case 5:return e.next=7,n.semaphore.acquire((function(){return 0}),"fetchFiles");case 7:return s=e.sent,e.next=10,n.fetchSemaphore.acquire();case 10:return c=e.sent,e.prev=11,n.errorFetchingFiles=null,n.loadingFiles=!0,n.semaphoreSymbol=s,u=(0,v.Z)(g),d=u.request,f=u.cancel,n.cancelFilesRequest=f,p=1e3,e.next=20,d(i,F({firstResult:n.fetchedFileIds.length,nbResults:p},o));case 20:return(m=e.sent).length!==p&&(n.doneFetchingFiles=!0),h=m.map((function(t){return t.fileid})).filter((function(t){return!n.fetchedFileIds.includes(t)})),(l=n.fetchedFileIds).push.apply(l,w(h.map((function(t){return t.toString()})).filter((function(t){return!a.includes(t)})))),n.$store.dispatch("appendFiles",m),r.Z.debug("[FetchFilesMixin] Fetched ".concat(h.length," new files: "),h),e.abrupt("return",h);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}n.errorFetchingFiles=404,e.next=40;break;case 35:if("ERR_CANCELED"!==e.t0.code){e.next=39;break}return e.abrupt("return",[]);case 39:n.errorFetchingFiles=e.t0;case 40:r.Z.error("Error fetching files",e.t0),A.error(e.t0);case 42:return e.prev=42,n.loadingFiles=!1,n.cancelFilesRequest=function(){},n.semaphore.release(s),n.fetchSemaphore.release(c),e.finish(42);case 48:return e.abrupt("return",[]);case 49:case"end":return e.stop()}}),e,null,[[11,29,42,48]])})))()},resetFetchFilesState:function(){this.doneFetchingFiles=!1,this.errorFetchingFiles=null,this.loadingFiles=!1,this.fetchedFileIds=[],this.cancelFilesRequest=function(){}}}}},98171:(t,n,e)=>{e.d(n,{Z:()=>r});const r={name:"FilesSelectionMixin",data:function(){return{selection:{}}},methods:{onFileSelectToggle:function(t){var n=t.id,e=t.value;this.$set(this.selection,n,e)},onUncheckFiles:function(t){var n=this;t.forEach((function(t){return n.$set(n.selection,t,!1)}))},resetSelection:function(){this.selection={}}},computed:{selectedFileIds:function(){var t=this;return Object.keys(this.selection).filter((function(n){return t.selection[n]}))}}}},6726:(t,n,e)=>{e.d(n,{Z:()=>s});var r=e(87537),i=e.n(r),o=e(23645),a=e.n(o)()(i());a.push([t.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 s=a},13319:(t,n,e)=>{e.d(n,{Z:()=>s});var r=e(87537),i=e.n(r),o=e(23645),a=e.n(o)()(i());a.push([t.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 s=a},40321:(t,n,e)=>{e.d(n,{Z:()=>s});var r=e(87537),i=e.n(r),o=e(23645),a=e.n(o)()(i());a.push([t.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 s=a},2470:(t,n,e)=>{e.d(n,{Z:()=>i});const r={name:"DownloadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const i=(0,e(51900).Z)(r,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("span",t._b({staticClass:"material-design-icon download-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(n){return t.$emit("click",n)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports},50242:(t,n,e)=>{e.d(n,{Z:()=>q});var r=e(20629),i=e(33476),o=e(59537);function a(t,n){return t.map((function(t){return n*t.ratio})).reduce((function(t,n){return t+n}))}function s(t,n,e,r){if(1===t.length&&t[0].sectionHeader)return t[0].height;var i=n/t.map((function(t){return t.ratio})).reduce((function(t,n){return t+n}));return 1===t.length&&t[0].width>n&&(i=n/t[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),m=e(3565),h=e.n(m),g=e(19216),y=e.n(g),v=e(44589),b=e.n(v),A=e(40321),w={};w.styleTagTransform=b(),w.setAttributes=h(),w.insert=p().bind(null,"head"),w.domAPI=d(),w.insertStyleElement=y();l()(A.Z,w);A.Z&&A.Z.locals&&A.Z.locals;var C=e(51900);function O(t,n){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=function(t,n){if(!t)return;if("string"==typeof t)return F(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return F(t,n)}(t))||n&&t&&"number"==typeof t.length){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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,a=!0,s=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==e.return||e.return()}finally{if(s)throw o}}}}function F(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}const x={name:"TiledLayout",components:{TiledRows:(0,C.Z)({},(function(t,n){var e=n._c;return e("ul",n._l(n.props.rows,(function(t){return e("div",{key:t.key,staticClass:"tiled-row",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,{row:t,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(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200;if(0===n)return[];for(var r=[],i=0,o=0;o<t.length;){var c=[];do{c.push(t[o++])}while(o<t.length&&!t[o-1].sectionHeader&&!t[o].sectionHeader&&a([].concat(c,[t[o]]),e)<=n);r[i]={items:c,height:s(c,n,t.length===o||!0===t[o].sectionHeader,e),key:c.map((function(t){return t.id})).join("-")},i+=1}return r}(this.items,this.containerWidth,this.baseHeight)}},mounted:function(){var t=this;this.resizeObserver=new ResizeObserver((function(n){var e,r=O(n);try{for(r.s();!(e=r.n()).done;){var i=e.value,o=i.contentRect;i.target.classList.contains("tiled-container")&&(t.containerWidth=o.width)}}catch(t){r.e(t)}finally{r.f()}})),this.resizeObserver.observe(this.$refs.tiledLayoutContainer)},beforeDestroy:function(){this.resizeObserver.disconnect()}};var T=e(13319),S={};S.styleTagTransform=b(),S.setAttributes=h(),S.insert=p().bind(null,"head"),S.domAPI=d(),S.insertStyleElement=y();l()(T.Z,S);T.Z&&T.Z.locals&&T.Z.locals;const _=(0,C.Z)(x,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{ref:"tiledLayoutContainer",staticClass:"tiled-container"},[t._t("default",(function(){return[e("TiledRows",{attrs:{rows:t.rows}})]}),{rows:t.rows})],2)}),[],!1,null,"58b32a0e",null).exports;var j=e(20561),k=e(8702),P=e(51612);function W(t){return function(t){if(Array.isArray(t))return I(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return I(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);"Object"===e&&t.constructor&&(e=t.constructor.name);if("Map"===e||"Set"===e)return Array.from(t);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return I(t,n)}(t)||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 I(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function Z(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function E(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?Z(Object(e),!0).forEach((function(n){R(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Z(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function R(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}const D={name:"FilesListViewer",components:{EmptyContent:i.EmptyContent,TiledLayout:_,VirtualScrolling:j.Z,Loader:k.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:P}},computed:E(E({},(0,r.Se)(["files"])),{},{fileIdsToItems:function(){return void 0===this.fileIds?[]:this.fileIds.map(this.mapFileToItem)},sectionsToItems:function(){var t=this;return void 0===this.sections?[]:this.sections.flatMap((function(n){return[{id:n,sectionHeader:!0,height:t.sectionHeaderHeight}].concat(W(t.fileIdsBySection[n].map(t.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(t){var n=this.files[t];return{id:n.fileid,width:n.fileMetadataSizeParsed.width,height:n.fileMetadataSizeParsed.height,ratio:n.fileMetadataSizeParsed.width/n.fileMetadataSizeParsed.height}}}};var H=e(6726),M={};M.styleTagTransform=b(),M.setAttributes=h(),M.insert=p().bind(null,"head"),M.domAPI=d(),M.insertStyleElement=y();l()(H.Z,M);H.Z&&H.Z.locals&&H.Z.locals;const q=(0,C.Z)(D,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"files-list-viewer"},[""===t.emptyMessage||0!==t.items.length||t.loading?t._e():e("EmptyContent",{key:"emptycontent",scopedSlots:t._u([{key:"icon",fn:function(){return[e("span",{staticClass:"empty-content-illustration",domProps:{innerHTML:t._s(t.EmptyBox)}})]},proxy:!0}],null,!1,3410044941)},[t._v("\n\t\t"+t._s(t.emptyMessage)+"\n\t")]),t._v(" "),e("TiledLayout",{attrs:{"base-height":t.baseHeight,items:t.items},scopedSlots:t._u([{key:"default",fn:function(n){var r=n.rows;return e("VirtualScrolling",{attrs:{"use-window":t.useWindow,rows:r,"scroll-to-key":t.scrollToSection},on:{"need-content":t.needContent},scopedSlots:t._u([{key:"default",fn:function(n){var r=n.renderedRows;return e("ul",{},t._l(r,(function(n){return e("div",{key:n.key,staticClass:"tiled-row",class:{"files-list-viewer__section-header":n.items[0].sectionHeader},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,{file:r,visibility:n.visibility})],2)})),0)})),0)}},t.loading?{key:"loader",fn:function(){return[e("Loader",{staticClass:"files-list-viewer__loader"})]},proxy:!0}:null],null,!0)})}}])})],1)}),[],!1,null,"5196d262",null).exports}}]);
//# sourceMappingURL=photos-src_mixins_FetchFilesMixin_js-src_mixins_FilesSelectionMixin_js-node_modules_vue-material-des-d0b874.js.map?v=f92cac9386133df01c09