!function(t){var e={};function s(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,s),n.l=!0,n.exports}s.m=t,s.c=e,s.d=function(t,e,a){s.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(s.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)s.d(a,n,function(e){return t[e]}.bind(null,n));return a},s.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return s.d(e,"a",e),e},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.p="/",s(s.s=5)}({"/sM+":function(t,e,s){"use strict";var a=s("v7ba");s.n(a).a},"038o":function(t,e,s){(t.exports=s("I1BE")(!1)).push([t.i,"\n.status-comments[data-v-387d06e6],\n.reactions[data-v-387d06e6],\n.col-md-4[data-v-387d06e6] {\n background: #fff;\n}\n.postPresenterContainer[data-v-387d06e6] {\n background: #fff;\n}\n@media(min-width: 720px) {\n.postPresenterContainer[data-v-387d06e6] {\n min-height: 600px;\n}\n}\n",""])},5:function(t,e,s){t.exports=s("CJs/")},"6ZA0":function(t,e,s){"use strict";s.r(e);function a(t){return function(t){if(Array.isArray(t)){for(var e=0,s=new Array(t.length);e0?((n=e.likes).push.apply(n,a(r.data)),e.likesPage++,t.loaded()):t.complete()})},infiniteSharesHandler:function(t){var e=this;axios.get("/api/v2/shares/profile/"+this.statusUsername+"/status/"+this.statusId,{params:{page:this.sharesPage}}).then(function(s){var n,r=s.data;r.data.length>0?((n=e.shares).push.apply(n,a(r.data)),e.sharesPage++,t.loaded()):t.complete()})},likeStatus:function(t){var e=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/like",{item:this.status.id}).then(function(t){if(e.status.favourites_count=t.data.count,1==e.reactions.liked){e.reactions.liked=!1;var s=e.user.id;e.likes=e.likes.filter(function(t){return t.id!==s})}else{e.reactions.liked=!0;var a=e.user;e.likes.push(a)}}).catch(function(t){console.error(t),swal("Error","Something went wrong, please try again later.","error")})},shareStatus:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/share",{item:this.status.id}).then(function(e){if(t.status.reblogs_count=e.data.count,1==t.reactions.shared){t.reactions.shared=!1;var s=t.user.id;t.shares=t.shares.filter(function(t){return t.id!==s})}else{t.reactions.shared=!0;var a=t.user;t.shares.push(a)}}).catch(function(t){console.error(t),swal("Error","Something went wrong, please try again later.","error")})},bookmarkStatus:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/bookmark",{item:this.status.id}).then(function(e){1==t.reactions.bookmarked?t.reactions.bookmarked=!1:t.reactions.bookmarked=!0}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})},muteProfile:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/mute",{type:"user",item:this.status.account.id}).then(function(e){swal("Success","You have successfully muted "+t.status.account.acct,"success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},blockProfile:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/block",{type:"user",item:this.status.account.id}).then(function(e){swal("Success","You have successfully blocked "+t.status.account.acct,"success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},deletePost:function(t){if(confirm("Are you sure you want to delete this post?")){if(0==$("body").hasClass("loggedIn"))return;axios.post("/i/delete",{type:"status",item:this.status.id}).then(function(t){swal("Success","You have successfully deleted this post","success"),window.location.href="/"}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})}},owner:function(){return this.user.id===this.status.account.id},admin:function(){return 1==this.user.is_admin},ownerOrAdmin:function(){return this.owner()||this.admin()}}},r=(s("C99e"),s("KHd+")),o=Object(r.a)(n,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"postComponent d-none"},[s("div",{staticClass:"container px-0"},[s("div",{staticClass:"card card-md-rounded-0 status-container orientation-unknown"},[s("div",{staticClass:"row px-0 mx-0"},[s("div",{staticClass:"d-flex d-md-none align-items-center justify-content-between card-header bg-white w-100"},[s("a",{staticClass:"d-flex align-items-center status-username text-truncate",attrs:{href:t.statusProfileUrl,"data-toggle":"tooltip","data-placement":"bottom",title:t.statusUsername}},[s("div",{staticClass:"status-avatar mr-2"},[s("img",{staticStyle:{"border-radius":"12px"},attrs:{src:t.statusAvatar,width:"24px",height:"24px"}})]),t._v(" "),s("div",{staticClass:"username"},[s("span",{staticClass:"username-link font-weight-bold text-dark"},[t._v(t._s(t.statusUsername))])])]),t._v(" "),0!=t.user?s("div",{staticClass:"float-right"},[s("div",{staticClass:"post-actions"},[s("div",{staticClass:"dropdown"},[t._m(0),t._v(" "),s("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[t.owner()?t._e():s("div",[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:t.reportUrl()}},[t._v("Report")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(e){return t.muteProfile()}}},[t._v("Mute Profile")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:function(e){return t.blockProfile()}}},[t._v("Block Profile")])]),t._v(" "),t.ownerOrAdmin()?s("div",[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:t.editUrl()}},[t._v("Edit")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold text-danger",on:{click:function(e){return t.deletePost(t.status)}}},[t._v("Delete")])]):t._e()])])])]):t._e()]),t._v(" "),s("div",{staticClass:"col-12 col-md-8 px-0 mx-0"},[t._m(1),t._v(" "),s("div",{staticClass:"postPresenterContainer d-none d-flex justify-content-center align-items-center"},["photo"===t.status.pf_type?s("div",{staticClass:"w-100"},[s("photo-presenter",{attrs:{status:t.status}})],1):"video"===t.status.pf_type?s("div",{staticClass:"w-100"},[s("video-presenter",{attrs:{status:t.status}})],1):"photo:album"===t.status.pf_type?s("div",{staticClass:"w-100"},[s("photo-album-presenter",{attrs:{status:t.status}})],1):"video:album"===t.status.pf_type?s("div",{staticClass:"w-100"},[s("video-album-presenter",{attrs:{status:t.status}})],1):"photo:video:album"===t.status.pf_type?s("div",{staticClass:"w-100"},[s("mixed-album-presenter",{attrs:{status:t.status}})],1):s("div",{staticClass:"w-100"},[s("p",{staticClass:"text-center p-0 font-weight-bold text-white"},[t._v("Error: Problem rendering preview.")])])])]),t._v(" "),s("div",{staticClass:"col-12 col-md-4 px-0 d-flex flex-column border-left border-md-left-0"},[s("div",{staticClass:"d-md-flex d-none align-items-center justify-content-between card-header py-3 bg-white"},[s("a",{staticClass:"d-flex align-items-center status-username text-truncate",attrs:{href:t.statusProfileUrl,"data-toggle":"tooltip","data-placement":"bottom",title:t.statusUsername}},[s("div",{staticClass:"status-avatar mr-2"},[s("img",{staticStyle:{"border-radius":"12px"},attrs:{src:t.statusAvatar,width:"24px",height:"24px"}})]),t._v(" "),s("div",{staticClass:"username"},[s("span",{staticClass:"username-link font-weight-bold text-dark"},[t._v(t._s(t.statusUsername))])])]),t._v(" "),s("div",{staticClass:"float-right"},[s("div",{staticClass:"post-actions"},[s("div",{staticClass:"dropdown"},[t._m(2),t._v(" "),s("div",{staticClass:"dropdown-menu dropdown-menu-right",attrs:{"aria-labelledby":"dropdownMenuButton"}},[s("span",{staticClass:"menu-user d-none"},[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:t.reportUrl()}},[t._v("Report")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:t.muteProfile}},[t._v("Mute Profile")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold",on:{click:t.blockProfile}},[t._v("Block Profile")])]),t._v(" "),s("span",{staticClass:"menu-author d-none"},[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:t.editUrl()}},[t._v("Edit")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold text-danger",on:{click:t.deletePost}},[t._v("Delete")])])])])])])]),t._v(" "),s("div",{staticClass:"d-flex flex-md-column flex-column-reverse h-100"},[s("div",{staticClass:"card-body status-comments"},[s("div",{staticClass:"status-comment"},[s("p",{staticClass:"mb-1 read-more",staticStyle:{overflow:"hidden"}},[s("span",{staticClass:"font-weight-bold pr-1"},[t._v(t._s(t.statusUsername))]),t._v(" "),s("span",{staticClass:"comment-text",attrs:{id:t.status.id+"-status-readmore"},domProps:{innerHTML:t._s(t.status.content)}})]),t._v(" "),s("post-comments",{attrs:{user:this.user,"post-id":t.statusId,"post-username":t.statusUsername}})],1)]),t._v(" "),s("div",{staticClass:"card-body flex-grow-0 py-1"},[s("div",{staticClass:"reactions my-1"},[s("h3",{class:[t.reactions.liked?"fas fa-heart text-danger pr-3 m-0":"far fa-heart pr-3 m-0 like-btn"],attrs:{title:"Like"},on:{click:t.likeStatus}}),t._v(" "),s("h3",{staticClass:"far fa-comment pr-3 m-0",attrs:{title:"Comment"},on:{click:t.commentFocus}}),t._v(" "),s("h3",{class:[t.reactions.shared?"far fa-share-square pr-3 m-0 text-primary":"far fa-share-square pr-3 m-0 share-btn"],attrs:{title:"Share"},on:{click:t.shareStatus}}),t._v(" "),s("h3",{class:[t.reactions.bookmarked?"fas fa-bookmark text-warning m-0 float-right":"far fa-bookmark m-0 float-right"],attrs:{title:"Bookmark"},on:{click:t.bookmarkStatus}})]),t._v(" "),s("div",{staticClass:"reaction-counts font-weight-bold mb-0"},[s("span",{staticStyle:{cursor:"pointer"},on:{click:t.likesModal}},[s("span",{staticClass:"like-count"},[t._v(t._s(t.status.favourites_count||0))]),t._v(" likes\n ")]),t._v(" "),s("span",{staticClass:"float-right",staticStyle:{cursor:"pointer"},on:{click:t.sharesModal}},[s("span",{staticClass:"share-count pl-4"},[t._v(t._s(t.status.reblogs_count||0))]),t._v(" shares\n ")])]),t._v(" "),s("div",{staticClass:"timestamp"},[s("a",{staticClass:"small text-muted",attrs:{href:t.statusUrl}},[t._v("\n "+t._s(t.timestampFormat())+"\n ")])])])]),t._v(" "),s("div",{staticClass:"card-footer bg-white sticky-md-bottom"},[t._m(3),t._v(" "),s("form",{staticClass:"comment-form d-none",attrs:{method:"post",action:"/i/comment","data-id":t.statusId,"data-truncate":"false"}},[s("input",{attrs:{type:"hidden",name:"_token",value:""}}),t._v(" "),s("input",{attrs:{type:"hidden",name:"item"},domProps:{value:t.statusId}}),t._v(" "),s("input",{staticClass:"form-control",attrs:{name:"comment",placeholder:"Add a comment...",autocomplete:"off"}}),t._v(" "),s("input",{staticClass:"btn btn-primary comment-submit",attrs:{type:"submit",value:"Send"}})])])])])])]),t._v(" "),s("b-modal",{ref:"likesModal",attrs:{id:"l-modal","hide-footer":"",centered:"",title:"Likes","body-class":"list-group-flush p-0"}},[s("div",{staticClass:"list-group"},[t._l(t.likes,function(e,a){return s("div",{key:"modal_likes_"+a,staticClass:"list-group-item border-0"},[s("div",{staticClass:"media"},[s("a",{attrs:{href:e.url}},[s("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"'s avatar",width:"30px"}})]),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[s("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n "+t._s(e.username)+"\n ")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[t._v("\n "+t._s(e.display_name)+"\n ")])])])])}),t._v(" "),s("infinite-loading",{attrs:{spinner:"spiral"},on:{infinite:t.infiniteLikesHandler}},[s("div",{attrs:{slot:"no-more"},slot:"no-more"}),t._v(" "),s("div",{attrs:{slot:"no-results"},slot:"no-results"})])],2)]),t._v(" "),s("b-modal",{ref:"sharesModal",attrs:{id:"s-modal","hide-footer":"",centered:"",title:"Shares","body-class":"list-group-flush p-0"}},[s("div",{staticClass:"list-group"},[t._l(t.shares,function(e,a){return s("div",{key:"modal_shares_"+a,staticClass:"list-group-item border-0"},[s("div",{staticClass:"media"},[s("a",{attrs:{href:e.url}},[s("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"'s avatar",width:"30px"}})]),t._v(" "),s("div",{staticClass:"media-body"},[s("div",{staticClass:"d-inline-block"},[s("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[s("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n "+t._s(e.username)+"\n ")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[t._v("\n "+t._s(e.display_name)+"\n ")])]),t._v(" "),s("p",{staticClass:"float-right"},[s("a",{staticClass:"btn btn-primary font-weight-bold py-1",attrs:{href:"#"}},[t._v("Follow")])])])])])}),t._v(" "),s("infinite-loading",{attrs:{spinner:"spiral"},on:{infinite:t.infiniteSharesHandler}},[s("div",{attrs:{slot:"no-more"},slot:"no-more"}),t._v(" "),s("div",{attrs:{slot:"no-results"},slot:"no-results"})])],2)])],1)},[function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"btn btn-link text-dark no-caret dropdown-toggle",attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",title:"Post options"}},[e("span",{staticClass:"fas fa-ellipsis-v text-muted"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"postPresenterLoader text-center"},[e("div",{staticClass:"lds-ring"},[e("div"),e("div"),e("div"),e("div")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("button",{staticClass:"btn btn-link text-dark no-caret dropdown-toggle",attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",title:"Post options"}},[e("span",{staticClass:"fas fa-ellipsis-v text-muted"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"comment-form-guest"},[e("a",{attrs:{href:"/login"}},[this._v("Login")]),this._v(" to like or comment.\n ")])}],!1,null,"387d06e6",null);e.default=o.exports},"9tPo":function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var s=e.protocol+"//"+e.host,a=s+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var n,r=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?t:(n=0===r.indexOf("//")?r:0===r.indexOf("/")?s+r:a+r.replace(/^\.\//,""),"url("+JSON.stringify(n)+")")})}},BXdT:function(t,e,s){(t.exports=s("I1BE")(!1)).push([t.i,"\nspan[data-v-2003471d] {\n font-size: 14px;\n}\n.comment-text[data-v-2003471d] {\n}\n.comment-text p[data-v-2003471d] {\n display: inline;\n}\n",""])},C99e:function(t,e,s){"use strict";var a=s("HCEn");s.n(a).a},"CJs/":function(t,e,s){Vue.component("post-component",s("6ZA0").default),Vue.component("post-comments",s("oeKV").default)},CcDW:function(t,e,s){"use strict";var a=s("W0ut");s.n(a).a},HCEn:function(t,e,s){var a=s("038o");"string"==typeof a&&(a=[[t.i,a,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};s("aET+")(a,n);a.locals&&(t.exports=a.locals)},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var s=function(t,e){var s=t[1]||"",a=t[3];if(!a)return s;if(e&&"function"==typeof btoa){var n=(o=a,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),r=a.sources.map(function(t){return"/*# sourceURL="+a.sourceRoot+t+" */"});return[s].concat(r).concat([n]).join("\n")}var o;return[s].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+s+"}":s}).join("")},e.i=function(t,s){"string"==typeof t&&(t=[[null,t,""]]);for(var a={},n=0;n=0&&d.splice(e,1)}function v(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var a=function(){0;return s.nc}();a&&(t.attrs.nonce=a)}return g(e,t.attrs),m(t,e),e}function g(t,e){Object.keys(e).forEach(function(s){t.setAttribute(s,e[s])})}function b(t,e){var s,a,n,r;if(e.transform&&t.css){if(!(r="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=r}if(e.singleton){var o=c++;s=l||(l=v(e)),a=y.bind(null,s,o,!1),n=y.bind(null,s,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(s=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",g(e,t.attrs),m(t,e),e}(e),a=function(t,e,s){var a=s.css,n=s.sourceMap,r=void 0===e.convertToAbsoluteUrls&&n;(e.convertToAbsoluteUrls||r)&&(a=u(a));n&&(a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var o=new Blob([a],{type:"text/css"}),i=t.href;t.href=URL.createObjectURL(o),i&&URL.revokeObjectURL(i)}.bind(null,s,e),n=function(){h(s),s.href&&URL.revokeObjectURL(s.href)}):(s=v(e),a=function(t,e){var s=e.css,a=e.media;a&&t.setAttribute("media",a);if(t.styleSheet)t.styleSheet.cssText=s;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(s))}}.bind(null,s),n=function(){h(s)});return a(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;a(t=e)}else n()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var s=p(t,e);return f(s,e),function(t){for(var a=[],n=0;n0&&$(".load-more-link").removeClass("d-none"),$(".postCommentsLoader").addClass("d-none"),$(".postCommentsContainer").removeClass("d-none")}).catch(function(t){if(t.response)switch(t.response.status){case 401:$(".postCommentsLoader .lds-ring").attr("style","width:100%").addClass("pt-4 font-weight-bold text-muted").text("Please login to view.");break;default:$(".postCommentsLoader .lds-ring").attr("style","width:100%").addClass("pt-4 font-weight-bold text-muted").text("An error occurred, cannot fetch comments. Please try again later.")}else $(".postCommentsLoader .lds-ring").attr("style","width:100%").addClass("pt-4 font-weight-bold text-muted").text("An error occurred, cannot fetch comments. Please try again later.")})},loadMore:function(t){var e=this;if(t.preventDefault(),1!=this.pagination.total_pages&&this.pagination.current_page!=this.pagination.total_pages){$(".postCommentsLoader").removeClass("d-none");var s=this.pagination.links.next;axios.get(s).then(function(t){var s=t.data.data;$(".postCommentsLoader").addClass("d-none");for(var a=0;a