-
-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathphotos-src_views_Timeline_vue.js
More file actions
3 lines (3 loc) · 24.2 KB
/
photos-src_views_Timeline_vue.js
File metadata and controls
3 lines (3 loc) · 24.2 KB
1
2
3
/*! For license information please see photos-src_views_Timeline_vue.js.LICENSE.txt */
"use strict";(self.webpackChunkphotos=self.webpackChunkphotos||[]).push([["src_views_Timeline_vue"],{84031:(t,e,n)=>{n.d(e,{Z:()=>l});var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".album-picker[data-v-729b3459]{padding:32px;padding-top:16px}.album-picker h2[data-v-729b3459]{display:flex;align-items:center;height:60px}.album-picker h2 .loading-icon[data-v-729b3459]{margin-left:32px}.album-picker .albums-container[data-v-729b3459]{min-height:150px;max-height:350px;overflow-x:scroll;padding:2px}.album-picker .albums-container .album[data-v-729b3459] .list-item{padding:8px 16px;box-sizing:border-box}.album-picker .albums-container .album[data-v-729b3459]:not(:last-child){margin-bottom:16px}.album-picker .albums-container .album__image[data-v-729b3459]{width:40px;height:40px;object-fit:none;border-radius:var(--border-radius)}.album-picker .albums-container .album__image--placeholder[data-v-729b3459]{background:var(--color-primary-light)}.album-picker .albums-container .album__image--placeholder[data-v-729b3459] .material-design-icon{width:100%;height:100%}.album-picker .albums-container .album__image--placeholder[data-v-729b3459] .material-design-icon .material-design-icon__svg{fill:var(--color-primary)}.album-picker .new-album-button[data-v-729b3459]{margin-top:32px}","",{version:3,sources:["webpack://./src/components/Albums/AlbumPicker.vue"],names:[],mappings:"AAEA,+BACC,YAAA,CACA,gBAAA,CAEA,kCACC,YAAA,CACA,kBAAA,CACA,WAAA,CAEA,gDACC,gBAAA,CAIF,iDACC,gBAAA,CACA,gBAAA,CACA,iBAAA,CACA,WAAA,CAIC,mEACC,gBAAA,CACA,qBAAA,CAGD,yEACC,kBAAA,CAGD,+DACC,UAAA,CACA,WAAA,CACA,eAAA,CACA,kCAAA,CAEA,4EACC,qCAAA,CAEA,kGACC,UAAA,CACA,WAAA,CAEA,6HACC,yBAAA,CAQN,iDACC,eAAA",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.album-picker {\n\tpadding: 32px;\n\tpadding-top: 16px;\n\n\th2 {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\theight: 60px;\n\n\t\t.loading-icon {\n\t\t\tmargin-left: 32px;\n\t\t}\n\t}\n\n\t.albums-container {\n\t\tmin-height: 150px;\n\t\tmax-height: 350px;\n\t\toverflow-x: scroll;\n\t\tpadding: 2px;\n\n\t\t.album {\n\n\t\t\t:deep .list-item {\n\t\t\t\tpadding: 8px 16px;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\n\t\t\t&:not(:last-child) {\n\t\t\t\tmargin-bottom: 16px;\n\t\t\t}\n\n\t\t\t&__image {\n\t\t\t\twidth: 40px;\n\t\t\t\theight: 40px;\n\t\t\t\tobject-fit: none;\n\t\t\t\tborder-radius: var(--border-radius);\n\n\t\t\t\t&--placeholder {\n\t\t\t\t\tbackground: var(--color-primary-light);\n\n\t\t\t\t\t:deep .material-design-icon {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\theight: 100%;\n\n\t\t\t\t\t\t.material-design-icon__svg {\n\t\t\t\t\t\t\tfill: var(--color-primary);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t.new-album-button {\n\t\tmargin-top: 32px;\n\t}\n}\n'],sourceRoot:""}]);const l=a},66561:(t,e,n)=>{n.d(e,{Z:()=>l});var r=n(87537),o=n.n(r),i=n(23645),a=n.n(i)()(o());a.push([t.id,".timeline[data-v-6b90633c]{display:flex;flex-direction:column}.timeline__header__left[data-v-6b90633c]{display:flex}.timeline__file-list[data-v-6b90633c]{padding:0 64px}@media only screen and (max-width: 1200px){.timeline__file-list[data-v-6b90633c]{padding:0 4px}}.timeline__file-list[data-v-6b90633c] .files-list-viewer__section-header{top:var(--photos-navigation-height)}","",{version:3,sources:["webpack://./src/views/Timeline.vue"],names:[],mappings:"AAEA,2BACC,YAAA,CACA,qBAAA,CAGC,yCACC,YAAA,CAIF,sCACC,cAAA,CAEA,2CAHD,sCAIE,aAAA,CAAA,CAGD,yEACC,mCAAA",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.timeline {\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t&__header {\n\t\t&__left {\n\t\t\tdisplay: flex;\n\t\t}\n\t}\n\n\t&__file-list {\n\t\tpadding: 0 64px;\n\n\t\t@media only screen and (max-width: 1200px) {\n\t\t\tpadding: 0 4px;\n\t\t}\n\n\t\t:deep .files-list-viewer__section-header {\n\t\t\ttop: var(--photos-navigation-height);\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const l=a},47741:(t,e,n)=>{n.d(e,{Z:()=>o});const r={name:"DownloadIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const o=(0,n(51900).Z)(r,(function(){var t=this,e=t._self._c;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(e){return t.$emit("click",e)}}},"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},48450:(t,e,n)=>{n.d(e,{Z:()=>o});const r={name:"ImageMultipleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};const o=(0,n(51900).Z)(r,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon image-multiple-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"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:"M22,16V4A2,2 0 0,0 20,2H8A2,2 0 0,0 6,4V16A2,2 0 0,0 8,18H20A2,2 0 0,0 22,16M11,12L13.03,14.71L16,11L20,16H8M2,6V20A2,2 0 0,0 4,22H18V20H4V6"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports},96:(t,e,n)=>{n.r(e),n.d(e,{default:()=>nt});var r=n(20629),o=n(69141),i=n(11341);const a={name:"PlusBoxMultipleIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var l=n(51900);const s=(0,l.Z)(a,(function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon plus-box-multiple-icon",attrs:{"aria-hidden":!t.title,"aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"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:"M19,11H15V15H13V11H9V9H13V5H15V9H19M20,2H8A2,2 0 0,0 6,4V16A2,2 0 0,0 8,18H20A2,2 0 0,0 22,16V4A2,2 0 0,0 20,2M4,6H2V20A2,2 0 0,0 4,22H18V20H4V6Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])}),[],!1,null,null,null).exports;var c=n(47741),u=n(15961),p=n(80351),d=n.n(p),m=n(3301),f=n(66951),h=n(28391),g=n(98171),b=n(80629),A=n(22524),v=n(69554),y=n(48450),C=n(79753),w=n(12945);const _={name:"AlbumPicker",components:{Plus:o.Z,ImageMultiple:y.Z,NcButton:u.P2,NcListItem:u.hx,NcLoadingIcon:u.lb,AlbumForm:v.Z},filters:{toCoverUrl:function(t){return(0,C.generateUrl)("/apps/photos/api/v1/preview/".concat(t,"?x=",64,"&y=",64))}},mixins:[w.Z],data:function(){return{showAlbumCreationForm:!1}},methods:{albumCreatedHandler:function(){this.showAlbumCreationForm=!1,this.fetchAlbums()},pickAlbum:function(t){this.$emit("album-picked",t)}}};var x=n(93379),k=n.n(x),O=n(7795),F=n.n(O),P=n(90569),L=n.n(P),T=n(3565),E=n.n(T),N=n(19216),j=n.n(N),S=n(44589),Z=n.n(S),I=n(84031),M={};M.styleTagTransform=Z(),M.setAttributes=E(),M.insert=L().bind(null,"head"),M.domAPI=F(),M.insertStyleElement=j();k()(I.Z,M);I.Z&&I.Z.locals&&I.Z.locals;const B=(0,l.Z)(_,(function(){var t=this,e=t._self._c;return t.showAlbumCreationForm?e("AlbumForm",{attrs:{"display-back-button":!0,title:t.t("photos","New album")},on:{back:function(e){t.showAlbumCreationForm=!1},done:t.albumCreatedHandler}}):e("div",{staticClass:"album-picker"},[e("h2",[t._v("\n\t\t"+t._s(t.t("photos","Add to Album"))+"\n\t\t"),t.loadingAlbums?e("NcLoadingIcon",{staticClass:"loading-icon"}):t._e()],1),t._v(" "),e("ul",{staticClass:"albums-container"},t._l(t.albums,(function(n){return e("NcListItem",{key:n.basename,staticClass:"album",attrs:{title:n.basename,"aria-label":t.t("photos","Add selection to album {albumName}",{albumName:n.basename})},on:{click:function(e){return t.pickAlbum(n.basename)}}},[e("template",{slot:"icon"},[-1!==n.lastPhoto?e("img",{staticClass:"album__image",attrs:{src:t._f("toCoverUrl")(n.lastPhoto)}}):e("div",{staticClass:"album__image album__image--placeholder"},[e("ImageMultiple",{attrs:{size:32}})],1)]),t._v(" "),e("template",{slot:"subtitle"},[t._v("\n\t\t\t\t"+t._s(t.n("photos","%n item","%n photos and videos",n.nbItems))+"\n\t\t\t\t")])],2)})),1),t._v(" "),e("NcButton",{staticClass:"new-album-button",attrs:{"aria-label":t.t("photos","Create a new album."),type:"tertiary"},on:{click:function(e){t.showAlbumCreationForm=!0}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Plus")]},proxy:!0}],null,!1,1489515321)},[t._v("\n\t\t"+t._s(t.t("photos","Create new album"))+"\n\t")])],1)}),[],!1,null,"729b3459",null).exports;var D=n(84598);function H(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function V(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?H(Object(n),!0).forEach((function(e){W(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function W(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Y={name:"ActionDownload",components:{NcActionLink:u.ih},props:{title:{type:String,required:!0},selectedFileIds:{type:Array,required:!0}},computed:V(V({},(0,r.Se)(["files"])),{},{downloadUrl:function(){var t=new URLSearchParams,e=this.fileNames.map((function(t){return"/"+t.split("/").splice(3).join("/")}));return t.append("files",JSON.stringify(e)),(0,C.generateUrl)("/apps/files/ajax/download.php?".concat(t))},fileNames:function(){var t=this;return this.selectedFileIds.map((function(e){return t.files[e].filename}))}})};const z=(0,l.Z)(Y,(function(){var t=this;return(0,t._self._c)("NcActionLink",{attrs:{"close-after-click":!0,href:t.downloadUrl,download:t.downloadUrl,"aria-label":t.title}},[t._v("\n\t"+t._s(t.title)+"\n\t"),t._t("icon",null,{slot:"icon"})],2)}),[],!1,null,null,null).exports;var G=n(71823);function U(t){return U="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},U(t)}function $(){$=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function c(t,e,n,o){var i=e&&e.prototype instanceof d?e:d,a=Object.create(i.prototype),l=new k(o||[]);return r(a,"_invoke",{value:C(t,n,l)}),a}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var p={};function d(){}function m(){}function f(){}var h={};s(h,i,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(O([])));b&&b!==e&&n.call(b,i)&&(h=b);var A=f.prototype=d.prototype=Object.create(h);function v(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function y(t,e){function o(r,i,a,l){var s=u(t[r],t,i);if("throw"!==s.type){var c=s.arg,p=c.value;return p&&"object"==U(p)&&n.call(p,"__await")?e.resolve(p.__await).then((function(t){o("next",t,a,l)}),(function(t){o("throw",t,a,l)})):e.resolve(p).then((function(t){c.value=t,a(c)}),(function(t){return o("throw",t,a,l)}))}l(s.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function C(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return F()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=w(a,n);if(l){if(l===p)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=u(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function w(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=u(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,p;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function O(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:F}}function F(){return{value:void 0,done:!0}}return m.prototype=f,r(A,"constructor",{value:f,configurable:!0}),r(f,"constructor",{value:m,configurable:!0}),m.displayName=s(f,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,s(t,l,"GeneratorFunction")),t.prototype=Object.create(A),t},t.awrap=function(t){return{__await:t}},v(y.prototype),s(y.prototype,a,(function(){return this})),t.AsyncIterator=y,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new y(c(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},v(A),s(A,l,"Generator"),s(A,i,(function(){return this})),s(A,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=O,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;x(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:O(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},t}function q(t,e,n,r,o,i,a){try{var l=t[i](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,o)}function R(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){q(i,r,o,a,l,"next",t)}function l(t){q(i,r,o,a,l,"throw",t)}a(void 0)}))}}function J(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Q(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?J(Object(n),!0).forEach((function(e){K(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function K(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const X={name:"Timeline",components:{Delete:i.Z,PlusBoxMultiple:s,Download:c.Z,Plus:o.Z,NcEmptyContent:u.SL,NcModal:u.Jc,NcActions:u.O3,NcActionButton:u.Js,NcButton:u.P2,AlbumForm:v.Z,AlbumPicker:B,FilesListViewer:b.Z,File:A.Z,ActionFavorite:D.Z,ActionDownload:z,HeaderNavigation:G.Z},filters:{dateMonth:function(t){return d()(t,"YYYYMM").format("MMMM")},dateYear:function(t){return d()(t,"YYYYMM").format("YYYY")}},mixins:[f.Z,g.Z,h.Z,u.tq],beforeRouteLeave:function(t,e,n){window.scrollTo(0,0),n()},props:{onlyFavorites:{type:Boolean,default:!1},mimesType:{type:Array,default:function(){return m.Oj}},onThisDay:{type:Boolean,default:!1},rootTitle:{type:String,required:!0}},data:function(){return{loadingCount:0,showAlbumCreationForm:!1,showAlbumPicker:!1,appContent:document.getElementById("app-content-vue")}},computed:Q({},(0,r.Se)(["files"])),methods:Q(Q({},(0,r.nv)(["deleteFiles","addFilesToAlbum"])),{},{getContent:function(){this.fetchFiles("",{mimesType:this.mimesType,onThisDay:this.onThisDay,onlyFavorites:this.onlyFavorites})},openViewer:function(t){var e=this,n=this.files[t];OCA.Viewer.open({fileInfo:n,list:Object.values(this.fileIdsByMonth).flat().map((function(t){return e.files[t]})),loadMore:n.loadMore?R($().mark((function t(){return $().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.loadMore(!0);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))):function(){return[]},canLoop:n.canLoop})},openUploader:function(){},addSelectionToAlbum:function(t){var e=this;return R($().mark((function n(){return $().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return e.showAlbumPicker=!1,n.next=3,e.addFilesToAlbum({albumName:t,fileIdsToAdd:e.selectedFileIds});case 3:case"end":return n.stop()}}),n)})))()},deleteSelection:function(){var t=this;return R($().mark((function e(){var n;return $().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.selectedFileIds,t.onUncheckFiles(n),t.fetchedFileIds=t.fetchedFileIds.filter((function(t){return!n.includes(t)})),e.next=5,t.deleteFiles(n);case 5:case"end":return e.stop()}}),e)})))()}})};var tt=n(66561),et={};et.styleTagTransform=Z(),et.setAttributes=E(),et.insert=L().bind(null,"head"),et.domAPI=F(),et.insertStyleElement=j();k()(tt.Z,et);tt.Z&&tt.Z.locals&&tt.Z.locals;const nt=(0,l.Z)(X,(function(){var t=this,e=t._self._c;return t.errorFetchingFiles?e("NcEmptyContent",[t._v("\n\t"+t._s(t.t("photos","An error occurred"))+"\n")]):e("div",{staticClass:"timeline"},[e("HeaderNavigation",{key:"navigation",attrs:{loading:t.loadingCount>0,path:"/",title:t.rootTitle,"root-title":t.rootTitle},on:{refresh:t.resetFetchFilesState}},[e("div",{staticClass:"timeline__header__left"},[0===t.selectedFileIds.length?e("NcActions",{attrs:{"force-title":!0,"force-menu":!0,"menu-title":t.t("photos","Add")}},[e("Plus",{attrs:{slot:"icon"},slot:"icon"}),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Create a new album")},on:{click:function(e){t.showAlbumCreationForm=!0}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("photos","Create new album"))+"\n\t\t\t\t\t"),e("PlusBoxMultiple",{attrs:{slot:"icon"},slot:"icon"})],1)],1):[e("NcButton",{attrs:{"close-after-click":!0,type:"primary","aria-label":t.t("photos","Add selection to an album")},on:{click:function(e){t.showAlbumPicker=!0}},scopedSlots:t._u([{key:"icon",fn:function(){return[e("Plus",{attrs:{slot:"icon"},slot:"icon"})]},proxy:!0}])},[t._v("\n\t\t\t\t\t"+t._s(t.t("photos","Add to album"))+"\n\t\t\t\t")]),t._v(" "),e("NcActions",{attrs:{"aria-label":t.t("photos","Open actions menu")}},[e("ActionDownload",{attrs:{"selected-file-ids":t.selectedFileIds,title:t.t("photos","Download selected files")}},[e("Download",{attrs:{slot:"icon"},slot:"icon"})],1),t._v(" "),e("ActionFavorite",{attrs:{"selected-file-ids":t.selectedFileIds}}),t._v(" "),e("NcActionButton",{attrs:{"close-after-click":!0,"aria-label":t.t("photos","Delete selection")},on:{click:t.deleteSelection}},[t._v("\n\t\t\t\t\t\t"+t._s(t.t("photos","Delete selection"))+"\n\t\t\t\t\t\t"),e("Delete",{attrs:{slot:"icon"},slot:"icon"})],1)],1)]],2)]),t._v(" "),e("FilesListViewer",{ref:"filesListViewer",staticClass:"timeline__file-list",attrs:{"container-element":t.appContent,"file-ids-by-section":t.fileIdsByMonth,sections:t.monthsList,loading:t.loadingFiles,"base-height":t.isMobile?120:200,"empty-message":t.t("photos","No photos or videos in here")},on:{"need-content":t.getContent},scopedSlots:t._u([{key:"default",fn:function(n){var r=n.file,o=n.visibility;return[r.sectionHeader?e("h3",{staticClass:"section-header",attrs:{id:"file-picker-section-header-".concat(r.id)}},[e("b",[t._v(t._s(t._f("dateMonth")(r.id)))]),t._v("\n\t\t\t\t"+t._s(t._f("dateYear")(r.id))+"\n\t\t\t")]):e("File",{attrs:{file:t.files[r.id],"allow-selection":!0,selected:!0===t.selection[r.id],visibility:o,semaphore:t.semaphore},on:{click:t.openViewer,"select-toggled":t.onFileSelectToggle}})]}}])}),t._v(" "),t.showAlbumCreationForm?e("NcModal",{key:"albumCreationForm",attrs:{"close-button-contained":!1,title:t.t("photos","New album")},on:{close:function(e){t.showAlbumCreationForm=!1}}},[e("AlbumForm",{on:{done:function(e){t.showAlbumCreationForm=!1}}})],1):t._e(),t._v(" "),t.showAlbumPicker?e("NcModal",{key:"albumPicker",attrs:{"close-button-contained":!1,title:t.t("photos","Add to album")},on:{close:function(e){t.showAlbumPicker=!1}}},[e("AlbumPicker",{on:{"album-picked":t.addSelectionToAlbum}})],1):t._e()],1)}),[],!1,null,"6b90633c",null).exports}}]);
//# sourceMappingURL=photos-src_views_Timeline_vue.js.map?v=cf39e0157036ee7db454