(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{18:function(t,e,n){t.exports=n("ntcu")},"3GDH":function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n.dims[data-v-77dc949a] {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\tleft: 0;\n\tbackground: rgba(0,0,0,.68);\n\tz-index: 300;\n}\n.scrollbar-hidden[data-v-77dc949a]::-webkit-scrollbar {\n\tdisplay: none;\n}\n.delete-border[data-v-77dc949a] {\n\tborder: 4px solid #ff0000;\n}\n.delete-border .square-content[data-v-77dc949a] {\n\tbackground-color: red;\n\tbackground-blend-mode: screen;\n}\n",""])},"9tPo":function(t,e){t.exports=function(t){vare="undefined"!=typeofwindow&&window.location;if(!e)thrownewError("fixUrls requires window.location");if(!t||"string"!=typeoft)returnt;varn=e.protocol+"//"+e.host,o=n+e.pathname.replace(/\/[^\/]*$/,"/");returnt.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){vari,r=e.trim().replace(/^"(.*)"$/,(function(t,e){returne})).replace(/^'(.*)'$/,(function(t,e){returne}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?t:(i=0===r.indexOf("//")?r:0===r.indexOf("/")?n+r:o+r.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},BzCV:function(t,e,n){"use strict";n.r(e);varo=n("la7V");functioni(t){returnfunction(t){if(Array.isArray(t)){for(vare=0,n=newArray(t.length);e<t.length;e++)n[e]=t[e];returnn}}(t)||function(t){if(Symbol.iteratorinObject(t)||"[object Arguments]"===Object.prototype.toString.call(t))returnArray.from(t)}(t)||function(){thrownewTypeError("Invalid attempt to spread non-iterable instance")}()}Vue.use(o.a);varr={props:["collection-id","collection-title","collection-description","collection-visibility","profile-id","profile-username"],data:function(){return{loaded:!1,posts:[],ids:[],currentUser:!1,owner:!1,title:this.collectionTitle,description:this.collectionDescription,visibility:this.collectionVisibility,photoId:"",postsList:[],loadingPostList:!1,addingPostToCollection:!1,markedForDeletion:[]}},beforeMount:function(){this.fetchCurrentUser(),this.fetchItems()},mounted:function(){},methods:{fetchCurrentUser:function(){vart=this;1==document.querySelectorAll("body")[0].classList.contains("loggedIn")&&axios.get("/api/pixelfed/v1/accounts/verify_credentials").then((function(e){t.currentUser=e.data,t.owner=t.currentUser.id==t.profileId,window._sharedData.curUser=e.data,window.App.util.navatar()}))},fetchItems:function(){vart=this;axios.get("/api/local/collection/items/"+this.collectionId).then((function(e){t.posts=e.data,t.ids=t.posts.map((function(t){returnt.id})),t.loaded=!0}))},previewUrl:function(t){returnt.sensitive?"/storage/no-preview.png?v="+(newDate).getTime():t.media_attachments[0].preview_url},previewBackground:function(t){return"background-image: url("+this.previewUrl(t)+");"},addToCollection:function(){vart=this;this.loadingPostList=!0,0==this.postsList.length?axios.get("/api/pixelfed/v1/accounts/"+this.profileId+"/statuses",{params:{min_id:1,limit:13}}).then((function(e){t.postsList=e.data.filter((function(e){return-1==t.ids.indexOf(e.id)})).splice(0,9),t.loadingPostList=!1,t.$refs.addPhotoModal.show()})).catch((function(e){t.loadingPostList=!1,swal("An Error Occured","We cannot process your request at this time, please try again later.","error")})):(this.$refs.addPhotoModal.show(),this.loadingPostList=!1)},pushId:function(){vart=this,e=this;if(this.posts.length>=18)swal("Error","You can only add 18 posts per collection","error");else{varn=this.photoId,o=window.location.origin,r=n.split("/");n.slice(0,o.length)!==o&&(swal("Invalid URL","You can only add posts from this instance","error"),this.photoId=""),n.slice(0,o.length+3)===o+"/p/"&&6===r.length||(swal("Invalid URL","Invalid URL","error"),this.photoId=""),axios.post("/api/local/collection/item",{collection_id:this.collectionId,post_id:r[5]}).then((function(t){varn;(n=e.ids).push.apply(n,i(r[5]))})).catch((function(e){swal("Invalid URL","The post you entered was invalid","error"),t.photoId=""})),e.$refs.addPhotoModal.hide(),window.location.reload()}},editCollection:fu