mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-24 14:03:16 +00:00
1 line
No EOL
119 KiB
JavaScript
Vendored
1 line
No EOL
119 KiB
JavaScript
Vendored
(window.webpackJsonp=window.webpackJsonp||[]).push([[24],{"2Jpm":function(t,e,i){"use strict";i.r(e);var s={props:["status"],methods:{playOrPause:function(t){var e=t.target;1==e.getAttribute("playing")?(e.removeAttribute("playing"),e.pause()):(e.setAttribute("playing",1),e.play())}}},n=i("KHd+"),a=Object(n.a)(s,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return 1==t.status.sensitive?i("div",[i("details",{staticClass:"details-animated"},[i("summary",[i("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v(t._s(t.status.spoiler_text?t.status.spoiler_text:"CW / NSFW / Hidden Media"))]),t._v(" "),i("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),i("div",{staticClass:"embed-responsive embed-responsive-1by1"},[i("video",{staticClass:"video",attrs:{preload:"none",loop:"",poster:t.status.media_attachments[0].preview_url,"data-id":t.status.id},on:{click:function(e){return t.playOrPause(e)}}},[i("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])])])]):i("div",{staticClass:"embed-responsive embed-responsive-16by9"},[i("video",{staticClass:"video",attrs:{controls:"",preload:"metadata",loop:"",poster:t.status.media_attachments[0].preview_url,"data-id":t.status.id}},[i("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])])}),[],!1,null,null,null);e.default=a.exports},"4KG8":function(t,e,i){t.exports=function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function i(t,i,s){return i&&e(t.prototype,i),s&&e(t,s),t}if(Array.prototype.find||(Array.prototype.find=function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,i=Object(this),s=i.length>>>0,n=arguments[1],a=0;a<s;a++)if(e=i[a],t.call(n,e,a,i))return e}),window&&"function"!=typeof window.CustomEvent){var s=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i};void 0!==window.Event&&(s.prototype=window.Event.prototype),window.CustomEvent=s}var n=function(){function e(i){t(this,e),this.tribute=i,this.tribute.events=this}return i(e,[{key:"bind",value:function(t){t.boundKeydown=this.keydown.bind(t,this),t.boundKeyup=this.keyup.bind(t,this),t.boundInput=this.input.bind(t,this),t.addEventListener("keydown",t.boundKeydown,!1),t.addEventListener("keyup",t.boundKeyup,!1),t.addEventListener("input",t.boundInput,!1)}},{key:"unbind",value:function(t){t.removeEventListener("keydown",t.boundKeydown,!1),t.removeEventListener("keyup",t.boundKeyup,!1),t.removeEventListener("input",t.boundInput,!1),delete t.boundKeydown,delete t.boundKeyup,delete t.boundInput}},{key:"keydown",value:function(t,i){t.shouldDeactivate(i)&&(t.tribute.isActive=!1,t.tribute.hideMenu());var s=this;t.commandEvent=!1,e.keys().forEach((function(e){e.key===i.keyCode&&(t.commandEvent=!0,t.callbacks()[e.value.toLowerCase()](i,s))}))}},{key:"input",value:function(t,e){t.inputEvent=!0,t.keyup.call(this,t,e)}},{key:"click",value:function(t,e){var i=t.tribute;if(i.menu&&i.menu.contains(e.target)){var s=e.target;for(e.preventDefault(),e.stopPropagation();"li"!==s.nodeName.toLowerCase();)if(!(s=s.parentNode)||s===i.menu)throw new Error("cannot find the <li> container for the click");i.selectItemAtIndex(s.getAttribute("data-index"),e),i.hideMenu()}else i.current.element&&!i.current.externalTrigger&&(i.current.externalTrigger=!1,setTimeout((function(){return i.hideMenu()})))}},{key:"keyup",value:function(t,e){if(t.inputEvent&&(t.inputEvent=!1),t.updateSelection(this),27!==e.keyCode){if(!t.tribute.allowSpaces&&t.tribute.hasTrailingSpace)return t.tribute.hasTrailingSpace=!1,t.commandEvent=!0,void t.callbacks().space(e,this);if(!t.tribute.isActive)if(t.tribute.autocompleteMode)t.callbacks().triggerChar(e,this,"");else{var i=t.getKeyCode(t,this,e);if(isNaN(i)||!i)return;var s=t.tribute.triggers().find((function(t){return t.charCodeAt(0)===i}));void 0!==s&&t.callbacks().triggerChar(e,this,s)}t.tribute.current.mentionText.length<t.tribute.current.collection.menuShowMinLength||((t.tribute.current.trigger||t.tribute.autocompleteMode)&&!1===t.commandEvent||t.tribute.isActive&&8===e.keyCode)&&t.tribute.showMenuFor(this,!0)}}},{key:"shouldDeactivate",value:function(t){if(!this.tribute.isActive)return!1;if(0===this.tribute.current.mentionText.length){var i=!1;return e.keys().forEach((function(e){t.keyCode===e.key&&(i=!0)})),!i}return!1}},{key:"getKeyCode",value:function(t,e,i){var s=t.tribute,n=s.range.getTriggerInfo(!1,s.hasTrailingSpace,!0,s.allowSpaces,s.autocompleteMode);return!!n&&n.mentionTriggerChar.charCodeAt(0)}},{key:"updateSelection",value:function(t){this.tribute.current.element=t;var e=this.tribute.range.getTriggerInfo(!1,this.tribute.hasTrailingSpace,!0,this.tribute.allowSpaces,this.tribute.autocompleteMode);e&&(this.tribute.current.selectedPath=e.mentionSelectedPath,this.tribute.current.mentionText=e.mentionText,this.tribute.current.selectedOffset=e.mentionSelectedOffset)}},{key:"callbacks",value:function(){var t=this;return{triggerChar:function(e,i,s){var n=t.tribute;n.current.trigger=s;var a=n.collection.find((function(t){return t.trigger===s}));n.current.collection=a,n.current.mentionText.length>=n.current.collection.menuShowMinLength&&n.inputEvent&&n.showMenuFor(i,!0)},enter:function(e,i){t.tribute.isActive&&t.tribute.current.filteredItems&&(e.preventDefault(),e.stopPropagation(),setTimeout((function(){t.tribute.selectItemAtIndex(t.tribute.menuSelected,e),t.tribute.hideMenu()}),0))},escape:function(e,i){t.tribute.isActive&&(e.preventDefault(),e.stopPropagation(),t.tribute.isActive=!1,t.tribute.hideMenu())},tab:function(e,i){t.callbacks().enter(e,i)},space:function(e,i){t.tribute.isActive&&(t.tribute.spaceSelectsMatch?t.callbacks().enter(e,i):t.tribute.allowSpaces||(e.stopPropagation(),setTimeout((function(){t.tribute.hideMenu(),t.tribute.isActive=!1}),0)))},up:function(e,i){if(t.tribute.isActive&&t.tribute.current.filteredItems){e.preventDefault(),e.stopPropagation();var s=t.tribute.current.filteredItems.length,n=t.tribute.menuSelected;s>n&&n>0?(t.tribute.menuSelected--,t.setActiveLi()):0===n&&(t.tribute.menuSelected=s-1,t.setActiveLi(),t.tribute.menu.scrollTop=t.tribute.menu.scrollHeight)}},down:function(e,i){if(t.tribute.isActive&&t.tribute.current.filteredItems){e.preventDefault(),e.stopPropagation();var s=t.tribute.current.filteredItems.length-1,n=t.tribute.menuSelected;s>n?(t.tribute.menuSelected++,t.setActiveLi()):s===n&&(t.tribute.menuSelected=0,t.setActiveLi(),t.tribute.menu.scrollTop=0)}},delete:function(e,i){t.tribute.isActive&&t.tribute.current.mentionText.length<1?t.tribute.hideMenu():t.tribute.isActive&&t.tribute.showMenuFor(i)}}}},{key:"setActiveLi",value:function(t){var e=this.tribute.menu.querySelectorAll("li"),i=e.length>>>0;t&&(this.tribute.menuSelected=parseInt(t));for(var s=0;s<i;s++){var n=e[s];if(s===this.tribute.menuSelected){n.classList.add(this.tribute.current.collection.selectClass);var a=n.getBoundingClientRect(),o=this.tribute.menu.getBoundingClientRect();if(a.bottom>o.bottom){var r=a.bottom-o.bottom;this.tribute.menu.scrollTop+=r}else if(a.top<o.top){var l=o.top-a.top;this.tribute.menu.scrollTop-=l}}else n.classList.remove(this.tribute.current.collection.selectClass)}}},{key:"getFullHeight",value:function(t,e){var i=t.getBoundingClientRect().height;if(e){var s=t.currentStyle||window.getComputedStyle(t);return i+parseFloat(s.marginTop)+parseFloat(s.marginBottom)}return i}}],[{key:"keys",value:function(){return[{key:9,value:"TAB"},{key:8,value:"DELETE"},{key:13,value:"ENTER"},{key:27,value:"ESCAPE"},{key:32,value:"SPACE"},{key:38,value:"UP"},{key:40,value:"DOWN"}]}}]),e}(),a=function(){function e(i){t(this,e),this.tribute=i,this.tribute.menuEvents=this,this.menu=this.tribute.menu}return i(e,[{key:"bind",value:function(t){var e=this;this.menuClickEvent=this.tribute.events.click.bind(null,this),this.menuContainerScrollEvent=this.debounce((function(){e.tribute.isActive&&e.tribute.showMenuFor(e.tribute.current.element,!1)}),300,!1),this.windowResizeEvent=this.debounce((function(){e.tribute.isActive&&e.tribute.range.positionMenuAtCaret(!0)}),300,!1),this.tribute.range.getDocument().addEventListener("MSPointerDown",this.menuClickEvent,!1),this.tribute.range.getDocument().addEventListener("mousedown",this.menuClickEvent,!1),window.addEventListener("resize",this.windowResizeEvent),this.menuContainer?this.menuContainer.addEventListener("scroll",this.menuContainerScrollEvent,!1):window.addEventListener("scroll",this.menuContainerScrollEvent)}},{key:"unbind",value:function(t){this.tribute.range.getDocument().removeEventListener("mousedown",this.menuClickEvent,!1),this.tribute.range.getDocument().removeEventListener("MSPointerDown",this.menuClickEvent,!1),window.removeEventListener("resize",this.windowResizeEvent),this.menuContainer?this.menuContainer.removeEventListener("scroll",this.menuContainerScrollEvent,!1):window.removeEventListener("scroll",this.menuContainerScrollEvent)}},{key:"debounce",value:function(t,e,i){var s,n=arguments,a=this;return function(){var o=a,r=n,l=i&&!s;clearTimeout(s),s=setTimeout((function(){s=null,i||t.apply(o,r)}),e),l&&t.apply(o,r)}}}]),e}(),o=function(){function e(i){t(this,e),this.tribute=i,this.tribute.range=this}return i(e,[{key:"getDocument",value:function(){var t;return this.tribute.current.collection&&(t=this.tribute.current.collection.iframe),t?t.contentWindow.document:document}},{key:"positionMenuAtCaret",value:function(t){var e,i=this,s=this.tribute.current,n=this.getTriggerInfo(!1,this.tribute.hasTrailingSpace,!0,this.tribute.allowSpaces,this.tribute.autocompleteMode);if(void 0!==n){if(!this.tribute.positionMenu)return void(this.tribute.menu.style.cssText="display: block;");e=this.isContentEditable(s.element)?this.getContentEditableCaretPosition(n.mentionPosition):this.getTextAreaOrInputUnderlinePosition(this.tribute.current.element,n.mentionPosition),this.tribute.menu.style.cssText="top: ".concat(e.top,"px;\n left: ").concat(e.left,"px;\n right: ").concat(e.right,"px;\n bottom: ").concat(e.bottom,"px;\n position: absolute;\n display: block;"),"auto"===e.left&&(this.tribute.menu.style.left="auto"),"auto"===e.top&&(this.tribute.menu.style.top="auto"),t&&this.scrollIntoView(),window.setTimeout((function(){var s={width:i.tribute.menu.offsetWidth,height:i.tribute.menu.offsetHeight},n=i.isMenuOffScreen(e,s),a=window.innerWidth>s.width&&(n.left||n.right),o=window.innerHeight>s.height&&(n.top||n.bottom);(a||o)&&(i.tribute.menu.style.cssText="display: none",i.positionMenuAtCaret(t))}),0)}else this.tribute.menu.style.cssText="display: none"}},{key:"selectElement",value:function(t,e,i){var s,n=t;if(e)for(var a=0;a<e.length;a++){if(void 0===(n=n.childNodes[e[a]]))return;for(;n.length<i;)i-=n.length,n=n.nextSibling;0!==n.childNodes.length||n.length||(n=n.previousSibling)}var o=this.getWindowSelection();(s=this.getDocument().createRange()).setStart(n,i),s.setEnd(n,i),s.collapse(!0);try{o.removeAllRanges()}catch(t){}o.addRange(s),t.focus()}},{key:"replaceTriggerText",value:function(t,e,i,s,n){var a=this.getTriggerInfo(!0,i,e,this.tribute.allowSpaces,this.tribute.autocompleteMode);if(void 0!==a){var o=this.tribute.current,r=new CustomEvent("tribute-replaced",{detail:{item:n,instance:o,context:a,event:s}});if(this.isContentEditable(o.element)){t+="string"==typeof this.tribute.replaceTextSuffix?this.tribute.replaceTextSuffix:" ";var l=a.mentionPosition+a.mentionText.length;this.tribute.autocompleteMode||(l+=a.mentionTriggerChar.length),this.pasteHtml(t,a.mentionPosition,l)}else{var c=this.tribute.current.element,u="string"==typeof this.tribute.replaceTextSuffix?this.tribute.replaceTextSuffix:" ";t+=u;var d=a.mentionPosition,p=a.mentionPosition+a.mentionText.length+u.length;this.tribute.autocompleteMode||(p+=a.mentionTriggerChar.length-1),c.value=c.value.substring(0,d)+t+c.value.substring(p,c.value.length),c.selectionStart=d+t.length,c.selectionEnd=d+t.length}o.element.dispatchEvent(new CustomEvent("input",{bubbles:!0})),o.element.dispatchEvent(r)}}},{key:"pasteHtml",value:function(t,e,i){var s,n;n=this.getWindowSelection(),(s=this.getDocument().createRange()).setStart(n.anchorNode,e),s.setEnd(n.anchorNode,i),s.deleteContents();var a=this.getDocument().createElement("div");a.innerHTML=t;for(var o,r,l=this.getDocument().createDocumentFragment();o=a.firstChild;)r=l.appendChild(o);s.insertNode(l),r&&((s=s.cloneRange()).setStartAfter(r),s.collapse(!0),n.removeAllRanges(),n.addRange(s))}},{key:"getWindowSelection",value:function(){return this.tribute.collection.iframe?this.tribute.collection.iframe.contentWindow.getSelection():window.getSelection()}},{key:"getNodePositionInParent",value:function(t){if(null===t.parentNode)return 0;for(var e=0;e<t.parentNode.childNodes.length;e++)if(t.parentNode.childNodes[e]===t)return e}},{key:"getContentEditableSelectedPath",value:function(t){var e=this.getWindowSelection(),i=e.anchorNode,s=[];if(null!=i){for(var n,a=i.contentEditable;null!==i&&"true"!==a;)n=this.getNodePositionInParent(i),s.push(n),null!==(i=i.parentNode)&&(a=i.contentEditable);return s.reverse(),{selected:i,path:s,offset:e.getRangeAt(0).startOffset}}}},{key:"getTextPrecedingCurrentSelection",value:function(){var t=this.tribute.current,e="";if(this.isContentEditable(t.element)){var i=this.getWindowSelection().anchorNode;if(null!=i){var s=i.textContent,n=this.getWindowSelection().getRangeAt(0).startOffset;s&&n>=0&&(e=s.substring(0,n))}}else{var a=this.tribute.current.element;if(a){var o=a.selectionStart;a.value&&o>=0&&(e=a.value.substring(0,o))}}return e}},{key:"getLastWordInText",value:function(t){var e=(t=t.replace(/\u00A0/g," ")).split(/\s+/);return e[e.length-1].trim()}},{key:"getTriggerInfo",value:function(t,e,i,s,n){var a,o,r,l=this,c=this.tribute.current;if(this.isContentEditable(c.element)){var u=this.getContentEditableSelectedPath(c);u&&(a=u.selected,o=u.path,r=u.offset)}else a=this.tribute.current.element;var d=this.getTextPrecedingCurrentSelection(),p=this.getLastWordInText(d);if(n)return{mentionPosition:d.length-p.length,mentionText:p,mentionSelectedElement:a,mentionSelectedPath:o,mentionSelectedOffset:r};if(null!=d){var h,m=-1;if(this.tribute.collection.forEach((function(t){var e=t.trigger,s=t.requireLeadingSpace?l.lastIndexWithLeadingSpace(d,e):d.lastIndexOf(e);s>m&&(m=s,h=e,i=t.requireLeadingSpace)})),m>=0&&(0===m||!i||/[\xA0\s]/g.test(d.substring(m-1,m)))){var f=d.substring(m+h.length,d.length);h=d.substring(m,m+h.length);var v=f.substring(0,1),g=f.length>0&&(" "===v||" "===v);e&&(f=f.trim());var b=s?/[^\S ]/g:/[\xA0\s]/g;if(this.tribute.hasTrailingSpace=b.test(f),!g&&(t||!b.test(f)))return{mentionPosition:m,mentionText:f,mentionSelectedElement:a,mentionSelectedPath:o,mentionSelectedOffset:r,mentionTriggerChar:h}}}}},{key:"lastIndexWithLeadingSpace",value:function(t,e){for(var i=t.split("").reverse().join(""),s=-1,n=0,a=t.length;n<a;n++){for(var o=n===t.length-1,r=/\s/.test(i[n+1]),l=!0,c=e.length-1;c>=0;c--)if(e[c]!==i[n-c]){l=!1;break}if(l&&(o||r)){s=t.length-1-n;break}}return s}},{key:"isContentEditable",value:function(t){return"INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName}},{key:"isMenuOffScreen",value:function(t,e){var i=window.innerWidth,s=window.innerHeight,n=document.documentElement,a=(window.pageXOffset||n.scrollLeft)-(n.clientLeft||0),o=(window.pageYOffset||n.scrollTop)-(n.clientTop||0),r="number"==typeof t.top?t.top:o+s-t.bottom-e.height,l="number"==typeof t.right?t.right:t.left+e.width,c="number"==typeof t.bottom?t.bottom:t.top+e.height,u="number"==typeof t.left?t.left:a+i-t.right-e.width;return{top:r<Math.floor(o),right:l>Math.ceil(a+i),bottom:c>Math.ceil(o+s),left:u<Math.floor(a)}}},{key:"getMenuDimensions",value:function(){var t={width:null,height:null};return this.tribute.menu.style.cssText="top: 0px;\n left: 0px;\n position: fixed;\n display: block;\n visibility; hidden;",t.width=this.tribute.menu.offsetWidth,t.height=this.tribute.menu.offsetHeight,this.tribute.menu.style.cssText="display: none;",t}},{key:"getTextAreaOrInputUnderlinePosition",value:function(t,e,i){var s=null!==window.mozInnerScreenX,n=this.getDocument().createElement("div");n.id="input-textarea-caret-position-mirror-div",this.getDocument().body.appendChild(n);var a=n.style,o=window.getComputedStyle?getComputedStyle(t):t.currentStyle;a.whiteSpace="pre-wrap","INPUT"!==t.nodeName&&(a.wordWrap="break-word"),a.position="absolute",a.visibility="hidden",["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing"].forEach((function(t){a[t]=o[t]})),s?(a.width="".concat(parseInt(o.width)-2,"px"),t.scrollHeight>parseInt(o.height)&&(a.overflowY="scroll")):a.overflow="hidden",n.textContent=t.value.substring(0,e),"INPUT"===t.nodeName&&(n.textContent=n.textContent.replace(/\s/g," "));var r=this.getDocument().createElement("span");r.textContent=t.value.substring(e)||".",n.appendChild(r);var l=t.getBoundingClientRect(),c=document.documentElement,u=(window.pageXOffset||c.scrollLeft)-(c.clientLeft||0),d=(window.pageYOffset||c.scrollTop)-(c.clientTop||0),p=0,h=0;this.menuContainerIsBody&&(p=l.top,h=l.left);var m={top:p+d+r.offsetTop+parseInt(o.borderTopWidth)+parseInt(o.fontSize)-t.scrollTop,left:h+u+r.offsetLeft+parseInt(o.borderLeftWidth)},f=window.innerWidth,v=window.innerHeight,g=this.getMenuDimensions(),b=this.isMenuOffScreen(m,g);b.right&&(m.right=f-m.left,m.left="auto");var w=this.tribute.menuContainer?this.tribute.menuContainer.offsetHeight:this.getDocument().body.offsetHeight;if(b.bottom){var _=w-(v-(this.tribute.menuContainer?this.tribute.menuContainer.getBoundingClientRect():this.getDocument().body.getBoundingClientRect()).top);m.bottom=_+(v-l.top-r.offsetTop),m.top="auto"}return(b=this.isMenuOffScreen(m,g)).left&&(m.left=f>g.width?u+f-g.width:u,delete m.right),b.top&&(m.top=v>g.height?d+v-g.height:d,delete m.bottom),this.getDocument().body.removeChild(n),m}},{key:"getContentEditableCaretPosition",value:function(t){var e,i=this.getWindowSelection();(e=this.getDocument().createRange()).setStart(i.anchorNode,t),e.setEnd(i.anchorNode,t),e.collapse(!1);var s=e.getBoundingClientRect(),n=document.documentElement,a=(window.pageXOffset||n.scrollLeft)-(n.clientLeft||0),o=(window.pageYOffset||n.scrollTop)-(n.clientTop||0),r={left:s.left+a,top:s.top+s.height+o},l=window.innerWidth,c=window.innerHeight,u=this.getMenuDimensions(),d=this.isMenuOffScreen(r,u);d.right&&(r.left="auto",r.right=l-s.left-a);var p=this.tribute.menuContainer?this.tribute.menuContainer.offsetHeight:this.getDocument().body.offsetHeight;if(d.bottom){var h=p-(c-(this.tribute.menuContainer?this.tribute.menuContainer.getBoundingClientRect():this.getDocument().body.getBoundingClientRect()).top);r.top="auto",r.bottom=h+(c-s.top)}return(d=this.isMenuOffScreen(r,u)).left&&(r.left=l>u.width?a+l-u.width:a,delete r.right),d.top&&(r.top=c>u.height?o+c-u.height:o,delete r.bottom),this.menuContainerIsBody||(r.left=r.left?r.left-this.tribute.menuContainer.offsetLeft:r.left,r.top=r.top?r.top-this.tribute.menuContainer.offsetTop:r.top),r}},{key:"scrollIntoView",value:function(t){var e,i=this.menu;if(void 0!==i){for(;void 0===e||0===e.height;)if(0===(e=i.getBoundingClientRect()).height&&(void 0===(i=i.childNodes[0])||!i.getBoundingClientRect))return;var s=e.top,n=s+e.height;if(s<0)window.scrollTo(0,window.pageYOffset+e.top-20);else if(n>window.innerHeight){var a=window.pageYOffset+e.top-20;a-window.pageYOffset>100&&(a=window.pageYOffset+100);var o=window.pageYOffset-(window.innerHeight-n);o>a&&(o=a),window.scrollTo(0,o)}}}},{key:"menuContainerIsBody",get:function(){return this.tribute.menuContainer===document.body||!this.tribute.menuContainer}}]),e}(),r=function(){function e(i){t(this,e),this.tribute=i,this.tribute.search=this}return i(e,[{key:"simpleFilter",value:function(t,e){var i=this;return e.filter((function(e){return i.test(t,e)}))}},{key:"test",value:function(t,e){return null!==this.match(t,e)}},{key:"match",value:function(t,e,i){i=i||{},e.length;var s=i.pre||"",n=i.post||"",a=i.caseSensitive&&e||e.toLowerCase();if(i.skip)return{rendered:e,score:0};t=i.caseSensitive&&t||t.toLowerCase();var o=this.traverse(a,t,0,0,[]);return o?{rendered:this.render(e,o.cache,s,n),score:o.score}:null}},{key:"traverse",value:function(t,e,i,s,n){if(e.length===s)return{score:this.calculateScore(n),cache:n.slice()};if(!(t.length===i||e.length-s>t.length-i)){for(var a,o,r=e[s],l=t.indexOf(r,i);l>-1;){if(n.push(l),o=this.traverse(t,e,l+1,s+1,n),n.pop(),!o)return a;(!a||a.score<o.score)&&(a=o),l=t.indexOf(r,l+1)}return a}}},{key:"calculateScore",value:function(t){var e=0,i=1;return t.forEach((function(s,n){n>0&&(t[n-1]+1===s?i+=i+1:i=1),e+=i})),e}},{key:"render",value:function(t,e,i,s){var n=t.substring(0,e[0]);return e.forEach((function(a,o){n+=i+t[a]+s+t.substring(a+1,e[o+1]?e[o+1]:t.length)})),n}},{key:"filter",value:function(t,e,i){var s=this;return i=i||{},e.reduce((function(e,n,a,o){var r=n;i.extract&&((r=i.extract(n))||(r=""));var l=s.match(t,r,i);return null!=l&&(e[e.length]={string:l.rendered,score:l.score,index:a,original:n}),e}),[]).sort((function(t,e){return e.score-t.score||t.index-e.index}))}}]),e}();return function(){function e(i){var s,l=this,c=i.values,u=void 0===c?null:c,d=i.iframe,p=void 0===d?null:d,h=i.selectClass,m=void 0===h?"highlight":h,f=i.containerClass,v=void 0===f?"tribute-container":f,g=i.itemClass,b=void 0===g?"":g,w=i.trigger,_=void 0===w?"@":w,x=i.autocompleteMode,y=void 0!==x&&x,C=i.selectTemplate,k=void 0===C?null:C,S=i.menuItemTemplate,T=void 0===S?null:S,E=i.lookup,M=void 0===E?"key":E,P=i.fillAttr,A=void 0===P?"value":P,L=i.collection,I=void 0===L?null:L,R=i.menuContainer,U=void 0===R?null:R,$=i.noMatchTemplate,O=void 0===$?null:$,N=i.requireLeadingSpace,D=void 0===N||N,j=i.allowSpaces,H=void 0!==j&&j,z=i.replaceTextSuffix,B=void 0===z?null:z,W=i.positionMenu,F=void 0===W||W,q=i.spaceSelectsMatch,V=void 0!==q&&q,Y=i.searchOpts,K=void 0===Y?{}:Y,J=i.menuItemLimit,G=void 0===J?null:J,X=i.menuShowMinLength,Q=void 0===X?0:X;if(t(this,e),this.autocompleteMode=y,this.menuSelected=0,this.current={},this.inputEvent=!1,this.isActive=!1,this.menuContainer=U,this.allowSpaces=H,this.replaceTextSuffix=B,this.positionMenu=F,this.hasTrailingSpace=!1,this.spaceSelectsMatch=V,this.autocompleteMode&&(_="",H=!1),u)this.collection=[{trigger:_,iframe:p,selectClass:m,containerClass:v,itemClass:b,selectTemplate:(k||e.defaultSelectTemplate).bind(this),menuItemTemplate:(T||e.defaultMenuItemTemplate).bind(this),noMatchTemplate:(s=O,"string"==typeof s?""===s.trim()?null:s:"function"==typeof s?s.bind(l):O||function(){return"<li>No Match Found!</li>"}.bind(l)),lookup:M,fillAttr:A,values:u,requireLeadingSpace:D,searchOpts:K,menuItemLimit:G,menuShowMinLength:Q}];else{if(!I)throw new Error("[Tribute] No collection specified.");this.autocompleteMode&&console.warn("Tribute in autocomplete mode does not work for collections"),this.collection=I.map((function(t){return{trigger:t.trigger||_,iframe:t.iframe||p,selectClass:t.selectClass||m,containerClass:t.containerClass||v,itemClass:t.itemClass||b,selectTemplate:(t.selectTemplate||e.defaultSelectTemplate).bind(l),menuItemTemplate:(t.menuItemTemplate||e.defaultMenuItemTemplate).bind(l),noMatchTemplate:function(t){return"string"==typeof t?""===t.trim()?null:t:"function"==typeof t?t.bind(l):O||function(){return"<li>No Match Found!</li>"}.bind(l)}(O),lookup:t.lookup||M,fillAttr:t.fillAttr||A,values:t.values,requireLeadingSpace:t.requireLeadingSpace,searchOpts:t.searchOpts||K,menuItemLimit:t.menuItemLimit||G,menuShowMinLength:t.menuShowMinLength||Q}}))}new o(this),new n(this),new a(this),new r(this)}return i(e,[{key:"triggers",value:function(){return this.collection.map((function(t){return t.trigger}))}},{key:"attach",value:function(t){if(!t)throw new Error("[Tribute] Must pass in a DOM node or NodeList.");if("undefined"!=typeof jQuery&&t instanceof jQuery&&(t=t.get()),t.constructor===NodeList||t.constructor===HTMLCollection||t.constructor===Array)for(var e=t.length,i=0;i<e;++i)this._attach(t[i]);else this._attach(t)}},{key:"_attach",value:function(t){t.hasAttribute("data-tribute")&&console.warn("Tribute was already bound to "+t.nodeName),this.ensureEditable(t),this.events.bind(t),t.setAttribute("data-tribute",!0)}},{key:"ensureEditable",value:function(t){if(-1===e.inputTypes().indexOf(t.nodeName)){if(!t.contentEditable)throw new Error("[Tribute] Cannot bind to "+t.nodeName);t.contentEditable=!0}}},{key:"createMenu",value:function(t){var e=this.range.getDocument().createElement("div"),i=this.range.getDocument().createElement("ul");return e.className=t,e.appendChild(i),this.menuContainer?this.menuContainer.appendChild(e):this.range.getDocument().body.appendChild(e)}},{key:"showMenuFor",value:function(t,e){var i=this;if(!this.isActive||this.current.element!==t||this.current.mentionText!==this.currentMentionTextSnapshot){this.currentMentionTextSnapshot=this.current.mentionText,this.menu||(this.menu=this.createMenu(this.current.collection.containerClass),t.tributeMenu=this.menu,this.menuEvents.bind(this.menu)),this.isActive=!0,this.menuSelected=0,this.current.mentionText||(this.current.mentionText="");var s=function(t){if(i.isActive){var s=i.search.filter(i.current.mentionText,t,{pre:i.current.collection.searchOpts.pre||"<span>",post:i.current.collection.searchOpts.post||"</span>",skip:i.current.collection.searchOpts.skip,extract:function(t){if("string"==typeof i.current.collection.lookup)return t[i.current.collection.lookup];if("function"==typeof i.current.collection.lookup)return i.current.collection.lookup(t,i.current.mentionText);throw new Error("Invalid lookup attribute, lookup must be string or function.")}});i.current.collection.menuItemLimit&&(s=s.slice(0,i.current.collection.menuItemLimit)),i.current.filteredItems=s;var n=i.menu.querySelector("ul");if(i.range.positionMenuAtCaret(e),!s.length){var a=new CustomEvent("tribute-no-match",{detail:i.menu});return i.current.element.dispatchEvent(a),void("function"==typeof i.current.collection.noMatchTemplate&&!i.current.collection.noMatchTemplate()||!i.current.collection.noMatchTemplate?i.hideMenu():"function"==typeof i.current.collection.noMatchTemplate?n.innerHTML=i.current.collection.noMatchTemplate():n.innerHTML=i.current.collection.noMatchTemplate)}n.innerHTML="";var o=i.range.getDocument().createDocumentFragment();s.forEach((function(t,e){var s=i.range.getDocument().createElement("li");s.setAttribute("data-index",e),s.className=i.current.collection.itemClass,s.addEventListener("mousemove",(function(t){var e=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var i=[],s=!0,n=!1,a=void 0;try{for(var o,r=t[Symbol.iterator]();!(s=(o=r.next()).done)&&(i.push(o.value),!e||i.length!==e);s=!0);}catch(t){n=!0,a=t}finally{try{s||null==r.return||r.return()}finally{if(n)throw a}}return i}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}(i._findLiTarget(t.target),2),s=(e[0],e[1]);0!==t.movementY&&i.events.setActiveLi(s)})),i.menuSelected===e&&s.classList.add(i.current.collection.selectClass),s.innerHTML=i.current.collection.menuItemTemplate(t),o.appendChild(s)})),n.appendChild(o)}};"function"==typeof this.current.collection.values?this.current.collection.values(this.current.mentionText,s):s(this.current.collection.values)}}},{key:"_findLiTarget",value:function(t){if(!t)return[];var e=t.getAttribute("data-index");return e?[t,e]:this._findLiTarget(t.parentNode)}},{key:"showMenuForCollection",value:function(t,e){t!==document.activeElement&&this.placeCaretAtEnd(t),this.current.collection=this.collection[e||0],this.current.externalTrigger=!0,this.current.element=t,t.isContentEditable?this.insertTextAtCursor(this.current.collection.trigger):this.insertAtCaret(t,this.current.collection.trigger),this.showMenuFor(t)}},{key:"placeCaretAtEnd",value:function(t){if(t.focus(),void 0!==window.getSelection&&void 0!==document.createRange){var e=document.createRange();e.selectNodeContents(t),e.collapse(!1);var i=window.getSelection();i.removeAllRanges(),i.addRange(e)}else if(void 0!==document.body.createTextRange){var s=document.body.createTextRange();s.moveToElementText(t),s.collapse(!1),s.select()}}},{key:"insertTextAtCursor",value:function(t){var e,i;(i=(e=window.getSelection()).getRangeAt(0)).deleteContents();var s=document.createTextNode(t);i.insertNode(s),i.selectNodeContents(s),i.collapse(!1),e.removeAllRanges(),e.addRange(i)}},{key:"insertAtCaret",value:function(t,e){var i=t.scrollTop,s=t.selectionStart,n=t.value.substring(0,s),a=t.value.substring(t.selectionEnd,t.value.length);t.value=n+e+a,s+=e.length,t.selectionStart=s,t.selectionEnd=s,t.focus(),t.scrollTop=i}},{key:"hideMenu",value:function(){this.menu&&(this.menu.style.cssText="display: none;",this.isActive=!1,this.menuSelected=0,this.current={})}},{key:"selectItemAtIndex",value:function(t,e){if("number"==typeof(t=parseInt(t))&&!isNaN(t)){var i=this.current.filteredItems[t],s=this.current.collection.selectTemplate(i);null!==s&&this.replaceText(s,e,i)}}},{key:"replaceText",value:function(t,e,i){this.range.replaceTriggerText(t,!0,!0,e,i)}},{key:"_append",value:function(t,e,i){if("function"==typeof t.values)throw new Error("Unable to append to values, as it is a function.");t.values=i?e:t.values.concat(e)}},{key:"append",value:function(t,e,i){var s=parseInt(t);if("number"!=typeof s)throw new Error("please provide an index for the collection to update.");var n=this.collection[s];this._append(n,e,i)}},{key:"appendCurrent",value:function(t,e){if(!this.isActive)throw new Error("No active state. Please use append instead and pass an index.");this._append(this.current.collection,t,e)}},{key:"detach",value:function(t){if(!t)throw new Error("[Tribute] Must pass in a DOM node or NodeList.");if("undefined"!=typeof jQuery&&t instanceof jQuery&&(t=t.get()),t.constructor===NodeList||t.constructor===HTMLCollection||t.constructor===Array)for(var e=t.length,i=0;i<e;++i)this._detach(t[i]);else this._detach(t)}},{key:"_detach",value:function(t){var e=this;this.events.unbind(t),t.tributeMenu&&this.menuEvents.unbind(t.tributeMenu),setTimeout((function(){t.removeAttribute("data-tribute"),e.isActive=!1,t.tributeMenu&&t.tributeMenu.remove()}))}},{key:"isActive",get:function(){return this._isActive},set:function(t){if(this._isActive!=t&&(this._isActive=t,this.current.element)){var e=new CustomEvent("tribute-active-".concat(t));this.current.element.dispatchEvent(e)}}}],[{key:"defaultSelectTemplate",value:function(t){return void 0===t?"".concat(this.current.collection.trigger).concat(this.current.mentionText):this.range.isContentEditable(this.current.element)?'<span class="tribute-mention">'+(this.current.collection.trigger+t.original[this.current.collection.fillAttr])+"</span>":this.current.collection.trigger+t.original[this.current.collection.fillAttr]}},{key:"defaultMenuItemTemplate",value:function(t){return t.string}},{key:"inputTypes",value:function(){return["TEXTAREA","INPUT"]}}]),e}()}()},5:function(t,e,i){t.exports=i("CJs/")},"6ZA0":function(t,e,i){"use strict";i.r(e);var s=i("JMt0");function n(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return a(t,e)}(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 a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}function o(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}pixelfed.postComponent={};var r={props:["status-id","status-username","status-template","status-url","status-profile-url","status-avatar","status-profile-id","profile-layout","profile-recent"],components:{VueTribute:s.a},data:function(){var t;return o(t={config:window.App.config,status:!1,media:{},user:!1,reactions:{liked:!1,shared:!1},likes:[],likesPage:1,shares:[],sharesPage:1,lightboxMedia:!1,replyText:"",replyStatus:{},replySensitive:!1,relationship:{},results:[],pagination:{},min_id:0,max_id:0,reply_to_profile_id:0,thread:!1,showComments:!1,warning:!1,loaded:!1,loading:null,replyingToId:this.statusId,replyingToUsername:this.statusUsername,replyToIndex:0,replySending:!1,emoji:window.App.util.emoji,showReadMore:!0,showCaption:!0,ctxEmbedPayload:!1,copiedEmbed:!1,ctxEmbedShowCaption:!0,ctxEmbedShowLikes:!1,ctxEmbedCompactMode:!1,layout:this.profileLayout,showProfileMorePosts:!1,profileMorePosts:[]},"replySending",!1),o(t,"reactionBarLoading",!0),o(t,"tributeSettings",{collection:[{trigger:"@",menuShowMinLength:2,values:function(t,e){axios.get("/api/compose/v0/search/mention",{params:{q:t}}).then((function(t){e(t.data)})).catch((function(t){console.log(t)}))}},{trigger:"#",menuShowMinLength:2,values:function(t,e){axios.get("/api/compose/v0/search/hashtag",{params:{q:t}}).then((function(t){e(t.data)})).catch((function(t){console.log(t)}))}}]}),t},watch:{ctxEmbedShowCaption:function(t,e){1==t&&(this.ctxEmbedCompactMode=!1);var i=this.ctxEmbedCompactMode?"compact":"full";this.ctxEmbedPayload=window.App.util.embed.post(this.status.url,this.ctxEmbedShowCaption,this.ctxEmbedShowLikes,i)},ctxEmbedShowLikes:function(t,e){1==t&&(this.ctxEmbedCompactMode=!1);var i=this.ctxEmbedCompactMode?"compact":"full";this.ctxEmbedPayload=window.App.util.embed.post(this.status.url,this.ctxEmbedShowCaption,this.ctxEmbedShowLikes,i)},ctxEmbedCompactMode:function(t,e){1==t&&(this.ctxEmbedShowCaption=!1,this.ctxEmbedShowLikes=!1);var i=this.ctxEmbedCompactMode?"compact":"full";this.ctxEmbedPayload=window.App.util.embed.post(this.status.url,this.ctxEmbedShowCaption,this.ctxEmbedShowLikes,i)}},beforeMount:function(){var t=new URLSearchParams(window.location.search),e="true"==localStorage.getItem("pf_metro_ui.exp.forceMetro");"text"!=this.statusTemplate?(1==e||t.has("ui")&&"metro"==t.get("ui")&&"metro"!=this.layout)&&(this.layout="metro"):this.layout="metro"},mounted:function(){this.fetchRelationships(),"false"==localStorage.getItem("pf_metro_ui.exp.rm")?this.showReadMore=!1:this.showReadMore=!0},updated:function(){$(".carousel").carousel(),$('[data-toggle="tooltip"]').tooltip(),1==this.showReadMore&&window.pixelfed.readmore()},methods:{reportUrl:function(){return"/i/report?type=post&id="+this.status.id},editUrl:function(){return this.status.url+"/edit"},timestampFormat:function(){return new Date(this.status.created_at).toDateString()},fetchData:function(){var t=this,e=this;axios.get("/api/v2/profile/"+this.statusUsername+"/status/"+this.statusId).then((function(i){e.status=i.data.status,e.media=e.status.media_attachments,e.likesPage=2,e.sharesPage=2,e.showCaption=!i.data.status.sensitive,0==e.status.comments_disabled&&(e.showComments=!0,t.fetchComments()),t.loaded=!0,!1!==t.profileRecent&&setTimeout((function(){e.fetchProfilePosts()}),3e3),setTimeout((function(){e.fetchState(),document.querySelectorAll(".status-comment .postCommentsContainer .comment-body a").forEach((function(t,e){t.href=App.util.format.rewriteLinks(t)}))}),500)})).catch((function(t){swal("Oops!","An error occured, please try refreshing the page.","error")}))},fetchState:function(){var t=this;axios.get("/api/v2/profile/"+this.statusUsername+"/status/"+this.statusId+"/state").then((function(e){t.user=e.data.user,window._sharedData.curUser=t.user,window.App.util.navatar(),t.likes=e.data.likes,t.shares=e.data.shares,t.reactions=e.data.reactions,t.reactionBarLoading=!1}))},likesModal:function(){var t=this;0!=$("body").hasClass("loggedIn")?this.likes.length?this.$refs.likesModal.show():axios.get("/api/v2/likes/profile/"+this.statusUsername+"/status/"+this.statusId).then((function(e){t.likes=e.data.data,t.$refs.likesModal.show()})):window.location.href="/login?next="+encodeURIComponent("/p/"+this.status.shortcode)},sharesModal:function(){var t=this;0!=this.status.reblogs_count&&0!=$("body").hasClass("loggedIn")?this.shares.length?this.$refs.sharesModal.show():axios.get("/api/v2/shares/profile/"+this.statusUsername+"/status/"+this.statusId).then((function(e){t.shares=e.data.data,t.$refs.sharesModal.show()})):window.location.href="/login?next="+encodeURIComponent("/p/"+this.status.shortcode)},infiniteLikesHandler:function(t){var e=this,i="/api/v2/likes/profile/"+this.statusUsername+"/status/"+this.statusId;axios.get(i,{params:{page:this.likesPage}}).then((function(i){var s,a=i.data;a.data.length>0?((s=e.likes).push.apply(s,n(a.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(i){var s,a=i.data;a.data.length>0?((s=e.shares).push.apply(s,n(a.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(i){if(e.status.favourites_count=i.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 n=e.user;e.likes.unshift(n),setTimeout((function(){t.target.classList.add("animate__animated","animate__bounce")}),100)}})).catch((function(t){console.error(t),swal("Error","Something went wrong, please try again later.","error")})),window.navigator.vibrate(200)):window.location.href="/login?next="+encodeURIComponent(window.location.pathname)},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 i=t.user.id;t.shares=t.shares.filter((function(t){return t.id!==i}))}else{t.reactions.shared=!0;var s=t.user;t.shares.push(s)}})).catch((function(t){console.error(t),swal("Error","Something went wrong, please try again later.","error")})):window.location.href="/login?next="+encodeURIComponent(window.location.pathname)},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")})):window.location.href="/login?next="+encodeURIComponent(window.location.pathname)},blockProfile:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/block",{type:"user",item:this.status.account.id}).then((function(e){t.$refs.ctxModal.hide(),t.relationship.blocking=!0,swal("Success","You have successfully blocked "+t.status.account.acct,"success")})).catch((function(t){swal("Error","Something went wrong. Please try again later.","error")}))},unblockProfile:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/unblock",{type:"user",item:this.status.account.id}).then((function(e){t.relationship.blocking=!1,t.$refs.ctxModal.hide(),swal("Success","You have successfully unblocked "+t.status.account.acct,"success")})).catch((function(t){swal("Error","Something went wrong. Please try again later.","error")}))},deletePost:function(t){if(this.ownerOrAdmin()&&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"),setTimeout((function(){window.location.href="/"}),3e3)})).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()},lightbox:function(t){this.lightboxMedia=t,this.$refs.lightboxModal.show()},postReply:function(){var t=this;if(this.replySending=!0,0==this.replyText.length||this.replyText.trim()=="@"+this.status.account.acct)return t.replyText=null,void $('textarea[name="comment"]').blur();var e={item:this.replyingToId,comment:this.replyText,sensitive:this.replySensitive};this.replyText="",axios.post("/i/comment",e).then((function(e){var i=e.data.entity;if(i.in_reply_to_id==t.status.id){"metro"==t.layout?t.results.push(i):t.results.unshift(i);var s=$(".status-comments")[0];s.scrollTop=2*s.clientHeight}else if(t.replyToIndex>=0){var n=t.results[t.replyToIndex];n.replies.push(i),n.reply_count=n.reply_count+1}t.$refs.replyModal.hide(),t.replySending=!1}))},deleteComment:function(t,e){var i=this;axios.post("/i/delete",{type:"comment",item:t}).then((function(t){i.results.splice(e,1)})).catch((function(t){swal("Something went wrong!","Please try again later","error")}))},deleteCommentReply:function(t,e,i){var s=this;axios.post("/i/delete",{type:"comment",item:t}).then((function(t){s.results[i].replies.splice(e,1),--s.results[i].reply_count})).catch((function(t){swal("Something went wrong!","Please try again later","error")}))},l:function(t){return t.length<10?t:t.substr(0,10)+"..."},replyFocus:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(0!=$("body").hasClass("loggedIn")){if(!this.status.comments_disabled){this.replyToIndex=e,this.replyingToId=t.id,this.replyingToUsername=t.account.username,this.reply_to_profile_id=t.account.id;var s=t.account.local?"@"+t.account.username+" ":"@"+t.account.acct+" ";1==i&&(this.replyText=s),this.$refs.replyModal.show()}}else this.redirect("/login?next="+encodeURIComponent(window.location.pathname))},fetchComments:function(){var t=this,e="/api/v2/comments/"+this.statusProfileId+"/status/"+this.statusId;axios.get(e).then((function(e){t.results="metro"==t.layout?_.reverse(e.data.data):e.data.data,t.pagination=e.data.meta.pagination,t.results.length>0&&$(".load-more-link").removeClass("d-none"),$(".postCommentsLoader").addClass("d-none"),$(".postCommentsContainer").removeClass("d-none"),setTimeout((function(){document.querySelectorAll(".status-comment .postCommentsContainer .comment-body a").forEach((function(t,e){t.href=App.util.format.rewriteLinks(t)}))}),500)})).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){$(".load-more-link").addClass("d-none"),$(".postCommentsLoader").removeClass("d-none");var i=this.pagination.links.next;axios.get(i).then((function(t){var i=t.data.data;$(".postCommentsLoader").addClass("d-none");for(var s=0;s<i.length;s++)e.results.unshift(i[s]);e.pagination=t.data.meta.pagination,$(".load-more-link").removeClass("d-none")}))}else $(".load-more-link").addClass("d-none")},likeReply:function(t,e){0!=$("body").hasClass("loggedIn")?axios.post("/i/like",{item:t.id}).then((function(e){t.favourites_count=e.data.count,1==t.favourited?t.favourited=!1:t.favourited=!0})).catch((function(t){swal("Error","Something went wrong, please try again later.","error")})):swal("Login","Please login to perform this action.","info")},truncate:function(t,e){return _.truncate(t,{length:e})},timeAgo:function(t){return App.util.format.timeAgo(t)},emojiReaction:function(){var t=event.target.innerText;0==this.replyText.length?(this.reply_to_profile_id=this.status.account.id,this.replyText=t+" ",$('textarea[name="comment"]').focus()):(this.reply_to_profile_id=this.status.account.id,this.replyText+=t+" ",$('textarea[name="comment"]').focus())},toggleCommentVisibility:function(){if(0!=this.ownerOrAdmin()){var t=this.status.comments_disabled,e=this;1==t?axios.post("/i/visibility",{item:e.status.id,disableComments:!1}).then((function(t){e.status.comments_disabled=!1,e.$refs.ctxModal.hide(),window.location.reload()})).catch((function(t){})):axios.post("/i/visibility",{item:e.status.id,disableComments:!0}).then((function(t){e.status.comments_disabled=!0,e.showComments=!1,e.$refs.ctxModal.hide()})).catch((function(t){}))}},fetchRelationships:function(){var t=this;0!=document.querySelectorAll("body")[0].classList.contains("loggedIn")?axios.get("/api/pixelfed/v1/accounts/relationships",{params:{"id[]":this.statusProfileId}}).then((function(e){if(null!=e.data[0])return t.relationship=e.data[0],1==e.data[0].blocking?(t.loaded=!0,void(t.warning=!0)):void t.fetchData();t.fetchData()})):this.fetchData()},visibilityModal:function(){switch(this.status.visibility){case"public":swal("Public Post","This post is visible to everyone.","info");break;case"unlisted":swal("Unlisted Post","This post is visible on profiles and with a direct links. It is not displayed on timelines.","info");break;case"private":swal("Private Post","This post is only visible to followers.","info")}},toggleReplies:function(t){if(t.thread)t.thread=!1;else{if(t.replies.length>0)return void(t.thread=!0);var e="/api/v2/comments/"+t.account.id+"/status/"+t.id;axios.get(e).then((function(e){t.replies=_.reverse(e.data.data),t.thread=!0}))}},redirect:function(t){window.location.href=t},showEmbedPostModal:function(){var t=this.ctxEmbedCompactMode?"compact":"full";this.ctxEmbedPayload=window.App.util.embed.post(this.status.url,this.ctxEmbedShowCaption,this.ctxEmbedShowLikes,t),this.$refs.ctxModal.hide(),this.$refs.embedModal.show()},ctxCopyEmbed:function(){navigator.clipboard.writeText(this.ctxEmbedPayload),this.$refs.embedModal.hide()},permalinkUrl:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t.account;return 1==i.local||e?t.url:"/i/web/post/_/"+i.id+"/"+t.id},fetchProfilePosts:function(){if($("body").hasClass("loggedIn")||!this.loaded){var t=this,e="/api/pixelfed/v1/accounts/"+this.statusProfileId+"/statuses";axios.get(e,{params:{only_media:!0,min_id:1,limit:9}}).then((function(e){var i=e.data.filter((function(e){return e.media_attachments.length>0&&e.id!=t.statusId&&0==e.sensitive}));i.map((function(t){return t.id}));i.length>=3&&(t.showProfileMorePosts=!0),t.profileMorePosts=i.slice(0,6)}))}},previewUrl:function(t){return t.sensitive?"/storage/no-preview.png?v="+(new Date).getTime():t.media_attachments[0].preview_url},previewBackground:function(t){return"background-image: url("+this.previewUrl(t)+");"},getStatusUrl:function(t){return 1==t.local?t.url:"/i/web/post/_/"+t.account.id+"/"+t.id},showTaggedPeopleModal:function(){!$("body").hasClass("loggedIn")&&this.loaded||this.$refs.taggedModal.show()},untagMe:function(){var t=this;this.$refs.taggedModal.hide();var e=this.user.id;axios.post("/api/local/compose/tag/untagme",{status_id:this.statusId,profile_id:e}).then((function(i){t.status.taggedPeople=t.status.taggedPeople.filter((function(t){return t.id!=e})),swal("Untagged","You have been untagged from this post.","success")})).catch((function(t){swal("An Error Occurred","Please try again later.","error")}))},copyPostUrl:function(){navigator.clipboard.writeText(this.statusUrl)},moderatePost:function(t,e){var i=this.status,s=(i.account.username,""),n=this;switch(t){case"addcw":s="Are you sure you want to add a content warning to this post?",swal({title:"Confirm",text:s,icon:"warning",buttons:!0,dangerMode:!0}).then((function(e){e&&axios.post("/api/v2/moderator/action",{action:t,item_id:i.id,item_type:"status"}).then((function(t){swal("Success","Successfully added content warning","success"),i.sensitive=!0,n.ctxModMenuClose()})).catch((function(t){swal("Error","Something went wrong, please try again later.","error"),n.ctxModMenuClose()}))}));break;case"remcw":s="Are you sure you want to remove the content warning on this post?",swal({title:"Confirm",text:s,icon:"warning",buttons:!0,dangerMode:!0}).then((function(e){e&&axios.post("/api/v2/moderator/action",{action:t,item_id:i.id,item_type:"status"}).then((function(t){swal("Success","Successfully added content warning","success"),i.sensitive=!1,n.ctxModMenuClose()})).catch((function(t){swal("Error","Something went wrong, please try again later.","error"),n.ctxModMenuClose()}))}));break;case"unlist":s="Are you sure you want to unlist this post?",swal({title:"Confirm",text:s,icon:"warning",buttons:!0,dangerMode:!0}).then((function(e){e&&axios.post("/api/v2/moderator/action",{action:t,item_id:i.id,item_type:"status"}).then((function(t){swal("Success","Successfully unlisted post","success"),n.ctxModMenuClose()})).catch((function(t){n.ctxModMenuClose(),swal("Error","Something went wrong, please try again later.","error")}))}))}},ctxMenu:function(){this.$refs.ctxModal.show()},closeCtxMenu:function(t){this.$refs.ctxModal.hide()},ctxModMenu:function(){this.$refs.ctxModal.hide(),this.$refs.ctxModModal.show()},ctxModMenuClose:function(){this.$refs.ctxModal.hide(),this.$refs.ctxModModal.hide()},ctxMenuCopyLink:function(){var t=this.status;navigator.clipboard.writeText(t.url),this.closeCtxMenu()},ctxMenuFollow:function(){var t=this,e=this.status.account.id;axios.post("/i/follow",{item:e}).then((function(e){var i=t.status.account.acct;t.relationship.following=!0,t.$refs.ctxModal.hide(),setTimeout((function(){swal("Follow successful!","You are now following "+i,"success")}),500)}))},ctxMenuUnfollow:function(){var t=this,e=this.status.account.id;axios.post("/i/follow",{item:e}).then((function(e){var i=t.status.account.acct;t.relationship.following=!1,t.$refs.ctxModal.hide(),setTimeout((function(){swal("Unfollow successful!","You are no longer following "+i,"success")}),500)}))}}},l=(i("xjdm"),i("ND1R"),i("KHd+")),c=Object(l.a)(r,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.loaded?t._e():i("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{height:"80vh"}},[i("img",{attrs:{src:"/img/pixelfed-icon-grey.svg"}})]),t._v(" "),t.loaded&&t.warning?i("div",{staticClass:"bg-white mt-n4 pt-3 border-bottom"},[i("div",{staticClass:"container"},[i("p",{staticClass:"text-center font-weight-bold"},[t._v("You are blocking this account")]),t._v(" "),i("p",{staticClass:"text-center font-weight-bold"},[i("a",{staticClass:"btn btn-primary font-weight-bold px-5",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.warning=!1,t.fetchData()}}},[t._v("View Status")])])])]):t._e(),t._v(" "),t.loaded&&0==t.warning?i("div",{staticClass:"postComponent"},["metro"==t.layout?i("div",{staticClass:"container px-0"},[i("div",{staticClass:"card card-md-rounded-0 status-container orientation-unknown shadow-none border"},[i("div",{staticClass:"row px-0 mx-0"},[i("div",{staticClass:"d-flex d-md-none align-items-center justify-content-between card-header bg-white w-100"},[i("div",{staticClass:"d-flex"},[i("div",{staticClass:"status-avatar mr-2",on:{click:function(e){return t.redirect(t.statusProfileUrl)}}},[i("img",{staticClass:"cursor-pointer",staticStyle:{"border-radius":"12px"},attrs:{src:t.statusAvatar,width:"24px",height:"24px"}})]),t._v(" "),i("div",{staticClass:"username"},[i("span",{staticClass:"username-link font-weight-bold text-dark cursor-pointer",on:{click:function(e){return t.redirect(t.statusProfileUrl)}}},[t._v(t._s(t.statusUsername))]),t._v(" "),t.status.account.is_admin?i("span",{staticClass:"fa-stack",staticStyle:{height:"1em","line-height":"1em","max-width":"19px"},attrs:{title:"Admin Account","data-toggle":"tooltip"}},[i("i",{staticClass:"fas fa-certificate text-danger fa-stack-1x"}),t._v(" "),i("i",{staticClass:"fas fa-crown text-white fa-sm fa-stack-1x",staticStyle:{"font-size":"7px"}})]):t._e(),t._v(" "),i("p",{staticClass:"mb-0",staticStyle:{"font-size":"10px"}},[t.loaded&&t.status.taggedPeople.length?i("span",{staticClass:"mb-0"},[i("span",{staticClass:"font-weight-light cursor-pointer",staticStyle:{color:"#718096"},attrs:{title:"Tagged People","data-toggle":"tooltip","data-placement":"bottom"},on:{click:function(e){return t.showTaggedPeopleModal()}}},[i("i",{staticClass:"fas fa-tag text-lighter"}),t._v(" "),i("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.status.taggedPeople.length)+" Tagged People")])])]):t._e(),t._v(" "),t.loaded&&null!=t.status.place&&t.status.taggedPeople.length?i("span",{staticClass:"px-2 font-weight-bold text-lighter"},[t._v("•")]):t._e(),t._v(" "),t.loaded&&null!=t.status.place?i("span",{staticClass:"mb-0 cursor-pointer text-truncate",staticStyle:{color:"#718096"},on:{click:function(e){return t.redirect("/discover/places/"+t.status.place.id+"/"+t.status.place.slug)}}},[i("i",{staticClass:"fas fa-map-marked-alt text-lighter"}),t._v(" "),i("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.status.place.name)+", "+t._s(t.status.place.country))])]):t._e()])])]),t._v(" "),0!=t.user?i("div",{staticClass:"float-right"},[i("div",{staticClass:"post-actions"},[i("div",[i("button",{staticClass:"btn btn-link text-dark no-caret",attrs:{title:"Post options"},on:{click:function(e){return t.ctxMenu()}}},[i("span",{staticClass:"fas fa-ellipsis-v text-muted"})])])])]):t._e()]),t._v(" "),i("div",{staticClass:"col-12 col-md-8 px-0 mx-0"},[i("div",{staticClass:"postPresenterContainer d-none d-flex justify-content-center align-items-center",staticStyle:{background:"#000"}},["text"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("div",{staticClass:"w-100 card-img-top border-bottom rounded-0",staticStyle:{"background-image":"url(/storage/textimg/bg_1.jpg)","background-size":"cover",width:"100%",height:"540px"}},[i("div",{staticClass:"w-100 h-100 d-flex justify-content-center align-items-center"},[i("p",{staticClass:"text-center text-break h3 px-5 font-weight-bold",domProps:{innerHTML:t._s(t.status.content)}})])])]):"photo"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("photo-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox,togglecw:function(e){t.status.sensitive=!1}}})],1):"video"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("video-presenter",{attrs:{status:t.status}})],1):"photo:album"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("photo-album-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox}})],1):"video:album"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("video-album-presenter",{attrs:{status:t.status}})],1):"photo:video:album"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("mixed-album-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox}})],1):i("div",{staticClass:"w-100"},[i("p",{staticClass:"text-center p-0 font-weight-bold text-white"},[t._v("Error: Problem rendering preview.")])])])]),t._v(" "),i("div",{staticClass:"col-12 col-md-4 px-0 d-flex flex-column border-left border-md-left-0"},[i("div",{staticClass:"d-md-flex d-none align-items-center justify-content-between card-header py-3 bg-white"},[i("div",{staticClass:"d-flex align-items-center status-username text-truncate"},[i("div",{staticClass:"status-avatar mr-2",on:{click:function(e){return t.redirect(t.statusProfileUrl)}}},[i("img",{staticClass:"cursor-pointer",staticStyle:{"border-radius":"12px"},attrs:{src:t.statusAvatar,width:"24px",height:"24px"}})]),t._v(" "),i("div",{staticClass:"username"},[i("span",{staticClass:"username-link font-weight-bold text-dark cursor-pointer",on:{click:function(e){return t.redirect(t.statusProfileUrl)}}},[t._v(t._s(t.statusUsername))]),t._v(" "),t.status.account.is_admin?i("span",{staticClass:"fa-stack",staticStyle:{height:"1em","line-height":"1em","max-width":"19px"},attrs:{title:"Admin Account","data-toggle":"tooltip"}},[i("i",{staticClass:"fas fa-certificate text-danger fa-stack-1x"}),t._v(" "),i("i",{staticClass:"fas fa-crown text-white fa-sm fa-stack-1x",staticStyle:{"font-size":"7px"}})]):t._e(),t._v(" "),i("p",{staticClass:"mb-0",staticStyle:{"font-size":"10px"}},[t.loaded&&t.status.taggedPeople.length?i("span",{staticClass:"mb-0"},[i("span",{staticClass:"font-weight-light cursor-pointer",staticStyle:{color:"#718096"},attrs:{title:"Tagged People","data-toggle":"tooltip","data-placement":"bottom"},on:{click:function(e){return t.showTaggedPeopleModal()}}},[i("i",{staticClass:"fas fa-tag text-lighter"}),t._v(" "),i("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.status.taggedPeople.length)+" Tagged People")])])]):t._e(),t._v(" "),t.loaded&&null!=t.status.place&&t.status.taggedPeople.length?i("span",{staticClass:"px-2 font-weight-bold text-lighter"},[t._v("•")]):t._e(),t._v(" "),t.loaded&&null!=t.status.place?i("span",{staticClass:"mb-0 cursor-pointer text-truncate",staticStyle:{color:"#718096"},on:{click:function(e){return t.redirect("/discover/places/"+t.status.place.id+"/"+t.status.place.slug)}}},[i("i",{staticClass:"fas fa-map-marked-alt text-lighter"}),t._v(" "),i("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.status.place.name)+", "+t._s(t.status.place.country))])]):t._e()])])]),t._v(" "),i("div",{staticClass:"float-right"},[i("div",{staticClass:"post-actions"},[0!=t.user?i("div",[i("button",{staticClass:"btn btn-link text-dark no-caret",attrs:{title:"Post options"},on:{click:function(e){return t.ctxMenu()}}},[i("span",{staticClass:"fas fa-ellipsis-v text-muted"})])]):t._e()])])]),t._v(" "),i("div",{staticClass:"d-flex flex-md-column flex-column-reverse h-100",staticStyle:{"overflow-y":"auto"}},[i("div",{staticClass:"card-body status-comments pt-0"},["text"!=t.status.pf_type?i("div",{staticClass:"status-comment"},[t.status.content.length?i("div",{staticClass:"pt-3"},[t.status.sensitive?i("div",[i("span",{staticClass:"py-3"},[i("a",{staticClass:"text-dark font-weight-bold mr-1",attrs:{href:t.status.account.url,title:t.status.account.username}},[t._v(t._s(t.truncate(t.status.account.username,15)))]),t._v(" "),i("span",{staticClass:"text-break"},[i("span",{staticClass:"font-italic text-muted"},[t._v("This comment may contain sensitive material")]),t._v(" "),i("span",{staticClass:"text-primary cursor-pointer pl-1",on:{click:function(e){t.status.sensitive=!1}}},[t._v("Show")])])])]):i("div",[i("p",{class:[t.status.content.length>620?"mb-1 read-more":"mb-1"],staticStyle:{overflow:"hidden"}},[i("a",{staticClass:"font-weight-bold pr-1 text-dark text-decoration-none",attrs:{href:t.statusProfileUrl}},[t._v(t._s(t.statusUsername))]),t._v(" "),i("span",{staticClass:"comment-text",attrs:{id:t.status.id+"-status-readmore"},domProps:{innerHTML:t._s(t.status.content)}})])]),t._v(" "),i("hr")]):t._e(),t._v(" "),t.showComments?i("div",[t._m(0),t._v(" "),i("div",{staticClass:"postCommentsContainer d-none"},[i("p",{staticClass:"mb-1 text-center load-more-link d-none my-4"},[i("a",{staticClass:"text-dark",attrs:{href:"#",title:"Load more comments","data-toggle":"tooltip","data-placement":"bottom"},on:{click:t.loadMore}},[i("svg",{staticClass:"bi bi-plus-circle",staticStyle:{"font-size":"2em"},attrs:{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"}},[i("path",{attrs:{"fill-rule":"evenodd",d:"M8 3.5a.5.5 0 01.5.5v4a.5.5 0 01-.5.5H4a.5.5 0 010-1h3.5V4a.5.5 0 01.5-.5z","clip-rule":"evenodd"}}),t._v(" "),i("path",{attrs:{"fill-rule":"evenodd",d:"M7.5 8a.5.5 0 01.5-.5h4a.5.5 0 010 1H8.5V12a.5.5 0 01-1 0V8z","clip-rule":"evenodd"}}),t._v(" "),i("path",{attrs:{"fill-rule":"evenodd",d:"M8 15A7 7 0 108 1a7 7 0 000 14zm0 1A8 8 0 108 0a8 8 0 000 16z","clip-rule":"evenodd"}})])])]),t._v(" "),i("div",{staticClass:"comments mt-3"},t._l(t.results,(function(e,s){return i("div",{key:"tl"+e.id+"_"+s,staticClass:"pb-4 media"},[i("img",{staticClass:"rounded-circle border mr-3",attrs:{src:e.account.avatar,width:"42px",height:"42px"}}),t._v(" "),i("div",{staticClass:"media-body"},[1==e.sensitive?i("div",[i("span",{staticClass:"py-3"},[i("a",{staticClass:"text-dark font-weight-bold mr-1",attrs:{href:e.account.url,title:e.account.username}},[t._v(t._s(t.truncate(e.account.username,15)))]),t._v(" "),i("span",{staticClass:"text-break"},[i("span",{staticClass:"font-italic text-muted"},[t._v("This comment may contain sensitive material")]),t._v(" "),i("span",{staticClass:"text-primary cursor-pointer pl-1",on:{click:function(t){e.sensitive=!1}}},[t._v("Show")])])])]):i("div",[i("p",{staticClass:"d-flex justify-content-between align-items-top read-more",staticStyle:{"overflow-y":"hidden"}},[i("span",[i("a",{staticClass:"text-dark font-weight-bold mr-1 text-break",attrs:{href:e.account.url,title:e.account.username}},[t._v(t._s(t.truncate(e.account.username,15)))]),t._v(" "),i("span",{staticClass:"text-break comment-body",staticStyle:{"word-break":"break-all"},domProps:{innerHTML:t._s(e.content)}})]),t._v(" "),i("span",{staticStyle:{"min-width":"38px"}},[i("span",{on:{click:function(i){return t.likeReply(e,i)}}},[i("i",{class:[e.favourited?"fas fa-heart fa-sm text-danger":"far fa-heart fa-sm text-lighter"]})]),t._v(" "),i("post-menu",{staticClass:"d-inline-block px-2",attrs:{status:e,profile:t.user,size:"sm",modal:"true"},on:{deletePost:function(i){return t.deleteComment(e.id,s)}}})],1)]),t._v(" "),i("p",{},[t._o(i("a",{staticClass:"text-muted mr-3 text-decoration-none small",staticStyle:{width:"20px"},attrs:{href:t.permalinkUrl(e)},domProps:{textContent:t._s(t.timeAgo(e.created_at))}}),0,"tl"+e.id+"_"+s),t._v(" "),e.favourites_count?i("span",{staticClass:"text-muted comment-reaction font-weight-bold mr-3"},[t._v(t._s(1==e.favourites_count?"1 like":e.favourites_count+" likes"))]):t._e(),t._v(" "),i("span",{staticClass:"text-muted comment-reaction font-weight-bold cursor-pointer",on:{click:function(i){return t.replyFocus(e,s,!0)}}},[t._v("Reply")])]),t._v(" "),e.reply_count>0?i("div",{staticClass:"cursor-pointer",on:{click:function(i){return t.toggleReplies(e)}}},[i("span",{staticClass:"show-reply-bar"}),t._v(" "),i("span",{staticClass:"comment-reaction font-weight-bold text-muted"},[t._v(t._s(e.thread?"Hide":"View")+" Replies ("+t._s(e.reply_count)+")")])]):t._e(),t._v(" "),1==e.thread?i("div",{staticClass:"comment-thread"},t._l(e.replies,(function(e,n){return i("div",{key:"cr"+e.id+"_"+s,staticClass:"pb-3 media"},[i("img",{staticClass:"rounded-circle border mr-3",attrs:{src:e.account.avatar,width:"25px",height:"25px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("p",{staticClass:"d-flex justify-content-between align-items-top read-more",staticStyle:{"overflow-y":"hidden"}},[i("span",[i("a",{staticClass:"text-dark font-weight-bold mr-1",attrs:{href:e.account.url,title:e.account.username}},[t._v(t._s(e.account.username))]),t._v(" "),i("span",{staticClass:"text-break comment-body",staticStyle:{"word-break":"break-all"},domProps:{innerHTML:t._s(e.content)}})]),t._v(" "),i("span",{staticClass:"pl-2",staticStyle:{"min-width":"38px"}},[i("span",{on:{click:function(i){return t.likeReply(e,i)}}},[i("i",{class:[e.favourited?"fas fa-heart fa-sm text-danger":"far fa-heart fa-sm text-lighter"]})]),t._v(" "),i("post-menu",{staticClass:"d-inline-block pl-2",attrs:{status:e,profile:t.user,size:"sm",modal:"true"},on:{deletePost:function(i){return t.deleteCommentReply(e.id,n,s)}}})],1)]),t._v(" "),i("p",{},[t._o(i("a",{staticClass:"text-muted mr-3 text-decoration-none small",staticStyle:{width:"20px"},attrs:{href:e.url},domProps:{textContent:t._s(t.timeAgo(e.created_at))}}),1,"cr"+e.id+"_"+s),t._v(" "),e.favourites_count?i("span",{staticClass:"text-muted comment-reaction font-weight-bold mr-3"},[t._v(t._s(1==e.favourites_count?"1 like":e.favourites_count+" likes"))]):t._e()])])])})),0):t._e()])])])})),0)])]):t._e()]):t._e()]),t._v(" "),t.reactionBarLoading?i("div",{staticClass:"card-body flex-grow-0 py-4 text-center"},[t._m(1)]):i("div",{staticClass:"card-body flex-grow-0 py-1"},[t.loaded&&t.user.hasOwnProperty("id")?i("div",{staticClass:"reactions my-2 pb-1 d-flex justify-content-between"},[i("h3",{class:[t.reactions.liked?"fas fa-heart text-danger mr-3 m-0 cursor-pointer":"far fa-heart pr-3 m-0 like-btn cursor-pointer"],attrs:{title:"Like"},on:{click:t.likeStatus}}),t._v(" "),t.status.comments_disabled?t._e():i("h3",{staticClass:"far fa-comment mr-3 m-0 cursor-pointer",attrs:{title:"Comment"},on:{click:function(e){return t.replyFocus(t.status)}}}),t._v(" "),i("h3",{staticClass:"fas fa-expand m-0 mr-3 cursor-pointer",on:{click:function(e){return t.redirect(t.status.media_attachments[0].url)}}}),t._v(" "),"public"==t.status.visibility?i("h3",{class:[t.reactions.bookmarked?"fas fa-bookmark text-warning m-0 mr-3 cursor-pointer":"far fa-bookmark m-0 mr-3 cursor-pointer"],attrs:{title:"Bookmark"},on:{click:t.bookmarkStatus}}):t._e(),t._v(" "),"public"==t.status.visibility?i("h3",{class:[t.reactions.shared?"fas fa-retweet m-0 text-primary cursor-pointer":"fas fa-retweet m-0 share-btn cursor-pointer"],attrs:{title:"Share"},on:{click:t.shareStatus}}):t._e()]):t._e(),t._v(" "),i("div",{staticClass:"reaction-counts mb-0"},[t.status.liked_by.username&&t.status.liked_by.username!==t.user.username?i("div",{staticClass:"likes mb-1"},[i("span",{staticClass:"like-count"},[t._v("Liked by\n\t\t\t\t\t\t\t"),i("a",{staticClass:"font-weight-bold text-dark",attrs:{href:t.status.liked_by.url}},[t._v(t._s(t.status.liked_by.username))]),t._v(" "),1==t.status.liked_by.others?i("span",[t._v("\n\t\t\t\t\t\t\t\tand "),i("span",{staticClass:"font-weight-bold text-dark cursor-pointer",on:{click:t.likesModal}},[t.status.liked_by.total_count_pretty?i("span",[t._v(t._s(t.status.liked_by.total_count_pretty))]):t._e(),t._v(" others")])]):t._e()])]):t._e()]),t._v(" "),i("div",{staticClass:"timestamp d-flex align-items-bottom justify-content-between"},[i("a",{staticClass:"small text-muted",attrs:{href:t.statusUrl,title:t.status.created_at}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(t.timestampFormat())+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),i("span",{staticClass:"small text-muted text-capitalize cursor-pointer",on:{click:t.visibilityModal}},[t._v(t._s(t.status.visibility))])])])]),t._v(" "),t.showComments?i("div",{staticClass:"card-footer bg-white sticky-md-bottom p-0"},[0==t.user.length?i("div",{staticClass:"comment-form-guest p-3"},[i("a",{attrs:{href:"/login"}},[t._v("Login")]),t._v(" to like or comment.\n\t\t\t\t\t\t\t")]):i("form",{staticClass:"border-0 rounded-0 align-middle",attrs:{method:"post",action:"/i/comment","data-id":t.statusId,"data-truncate":"false"}},[i("textarea",{staticClass:"form-control border-0 rounded-0",staticStyle:{height:"56px","line-height":"18px","max-height":"80px",resize:"none","padding-right":"4.2rem"},attrs:{name:"comment",placeholder:"Add a comment…",autocomplete:"off",autocorrect:"off"},on:{click:function(e){return t.replyFocus(t.status)}}}),t._v(" "),i("input",{staticClass:"d-inline-block btn btn-link font-weight-bold reply-btn text-decoration-none",attrs:{type:"button",value:"Post",disabled:""}})])]):t._e()])])]),t._v(" "),t.showProfileMorePosts?i("div",{staticClass:"container"},[i("p",{staticClass:"text-lighter px-3 mt-5",staticStyle:{"font-weight":"600","font-size":"15px"}},[t._v("More posts from "),i("a",{staticClass:"text-dark",attrs:{href:"/"+t.statusUsername}},[t._v(t._s(this.statusUsername))])]),t._v(" "),i("div",{staticClass:"profile-timeline mt-md-4"},[i("div",{staticClass:"row"},t._l(t.profileMorePosts,(function(e,s){return i("div",{key:"tlob:"+s,staticClass:"col-4 p-1 p-md-3"},[t._o(i("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:t.getStatusUrl(e)}},[i("div",{class:[e.sensitive?"square":"square "+e.media_attachments[0].filter_class]},["photo:album"==e.pf_type?i("span",{staticClass:"float-right mr-3 post-icon"},[i("i",{staticClass:"fas fa-images fa-2x"})]):t._e(),t._v(" "),"video"==e.pf_type?i("span",{staticClass:"float-right mr-3 post-icon"},[i("i",{staticClass:"fas fa-video fa-2x"})]):t._e(),t._v(" "),"video:album"==e.pf_type?i("span",{staticClass:"float-right mr-3 post-icon"},[i("i",{staticClass:"fas fa-film fa-2x"})]):t._e(),t._v(" "),i("div",{staticClass:"square-content",style:t.previewBackground(e)}),t._v(" "),i("div",{staticClass:"info-overlay-text"},[i("h5",{staticClass:"text-white m-auto font-weight-bold"},[i("span",[i("span",{staticClass:"far fa-heart fa-lg p-2 d-flex-inline"}),t._v(" "),i("span",{staticClass:"d-flex-inline"},[t._v(t._s(e.favourites_count))])]),t._v(" "),i("span",[i("span",{staticClass:"fas fa-retweet fa-lg p-2 d-flex-inline"}),t._v(" "),i("span",{staticClass:"d-flex-inline"},[t._v(t._s(e.reblogs_count))])])])])])]),2,"tlob:"+s)])})),0)])]):t._e()]):t._e(),t._v(" "),"moment"==t.layout?i("div",{staticClass:"momentui"},[i("div",{staticClass:"bg-dark mt-md-n4"},[i("div",{staticClass:"container",staticStyle:{"max-width":"700px"}},[i("div",{staticClass:"postPresenterContainer d-none d-flex justify-content-center align-items-center bg-dark"},["photo"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("photo-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox}})],1):"video"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("video-presenter",{attrs:{status:t.status}})],1):"photo:album"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("photo-album-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox}})],1):"video:album"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("video-album-presenter",{attrs:{status:t.status}})],1):"photo:video:album"===t.status.pf_type?i("div",{staticClass:"w-100"},[i("mixed-album-presenter",{attrs:{status:t.status},on:{lightbox:t.lightbox}})],1):i("div",{staticClass:"w-100"},[i("p",{staticClass:"text-center p-0 font-weight-bold text-white"},[t._v("Error: Problem rendering preview.")])])])])]),t._v(" "),i("div",{staticClass:"bg-white"},[i("div",{staticClass:"container"},[i("div",{staticClass:"row pb-5"},[i("div",{staticClass:"col-12 col-md-8 py-4"},[i("div",{staticClass:"reactions d-flex align-items-center"},[i("div",{staticClass:"text-center mr-5"},[i("div",{class:[t.reactions.liked?"fas fa-heart text-danger m-0 cursor-pointer":"far fa-heart m-0 like-btn cursor-pointer"],staticStyle:{"font-size":"1.575rem"},attrs:{title:"Like"},on:{click:t.likeStatus}}),t._v(" "),i("div",{staticClass:"like-count font-weight-bold mt-2 rounded border",staticStyle:{cursor:"pointer"},on:{click:t.likesModal}},[t._v(t._s(t.status.favourites_count||0))])]),t._v(" "),i("div",{staticClass:"text-center"},["public"==t.status.visibility?i("div",{class:[t.reactions.shared?"h3 far fa-share-square m-0 text-primary cursor-pointer":"h3 far fa-share-square m-0 share-btn cursor-pointer"],attrs:{title:"Share"},on:{click:t.shareStatus}}):t._e(),t._v(" "),"public"==t.status.visibility?i("div",{staticClass:"share-count font-weight-bold mt-2 rounded border",staticStyle:{cursor:"pointer"},on:{click:t.sharesModal}},[t._v(t._s(t.status.reblogs_count||0))]):t._e()])]),t._v(" "),t.status.length&&t.status.content_text.includes("#")||t.status.content_text.includes("https://")||t.status.content_text.includes("@")||t.status.content_text.length>45?i("div",{staticClass:"media align-items-center mt-3"},[i("div",{staticClass:"media-body"},[i("p",{staticClass:"lead mr-2",domProps:{innerHTML:t._s(t.status.content)}}),t._v(" "),i("p",{staticClass:"lead mb-0"},[t._v("\n\t\t\t\t\t\t\t\t\t\tby "),i("a",{attrs:{href:t.statusProfileUrl}},[t._v(t._s(t.statusUsername))]),t._v(" "),t.relationship&&t.profile&&t.user&&!t.relationship.following&&t.profile.id!=t.user.id?i("span",[i("span",{staticClass:"px-1 text-lighter"},[t._v("•")]),t._v(" "),i("a",{staticClass:"font-weight-bold small",attrs:{href:"#"}},[t._v("Follow")])]):t._e()])]),t._v(" "),i("a",{attrs:{href:t.statusProfileUrl,title:t.statusUsername}},[i("img",{staticClass:"rounded-circle border mr-3",attrs:{src:t.statusAvatar,alt:"avatar",width:"72px",height:"72px"}})])]):i("div",{staticClass:"media align-items-center mt-3"},[i("div",{staticClass:"media-body"},[i("h2",{staticClass:"font-weight-bold mr-2"},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(t.status.content_text.length?t.status.content_text:"Untitled Post")+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),i("p",{staticClass:"lead mb-0"},[t._v("\n\t\t\t\t\t\t\t\t\t\tby "),i("a",{attrs:{href:t.statusProfileUrl}},[t._v(t._s(t.statusUsername))])])]),t._v(" "),i("a",{attrs:{href:t.statusProfileUrl,title:t.statusUsername}},[i("img",{staticClass:"rounded-circle border mr-3",attrs:{src:t.statusAvatar,alt:"avatar",width:"72px",height:"72px"}})])]),t._v(" "),i("hr"),t._v(" "),i("div",[i("p",{staticClass:"lead"},[t.status.place?i("span",{staticClass:"text-truncate"},[i("i",{staticClass:"fas fa-map-marker-alt text-lighter mr-3"}),t._v(" "+t._s(t.status.place.name)+", "+t._s(t.status.place.country)+"\n\t\t\t\t\t\t\t\t\t")]):t._e(),t._v(" "),t._m(2)]),t._v(" "),t.status.tags?i("div",{staticClass:"pt-4"},[i("p",{staticClass:"lead"},t._l(t.status.tags,(function(e,s){return i("a",{staticClass:"btn btn-outline-dark mr-1 mb-1",attrs:{href:e.url+"?src=mp"}},[t._v(t._s(e.name))])})),0)]):t._e()])]),t._v(" "),i("div",{staticClass:"col-12 col-md-4 pt-4 pl-md-3"},[i("p",{staticClass:"lead font-weight-bold"},[t._v("Comments")]),t._v(" "),0!=t.user?i("div",{staticClass:"moment-comments"},[i("div",{staticClass:"form-group"},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.replyText,expression:"replyText"}],staticClass:"form-control",attrs:{rows:"3",placeholder:"Add a comment ..."},domProps:{value:t.replyText},on:{input:function(e){e.target.composing||(t.replyText=e.target.value)}}}),t._v(" "),i("p",{staticClass:"d-flex justify-content-between align-items-center mt-3"},[i("span",{staticClass:"small text-lighter font-weight-bold"},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t"+t._s(t.replyText.length)+"/"+t._s(t.config.uploader.max_caption_length)+"\n\t\t\t\t\t\t\t\t\t\t")]),t._v(" "),t.replyText.length>2?i("span",[i("div",{staticClass:"custom-control custom-switch"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.replySensitive,expression:"replySensitive"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"sensitiveReply"},domProps:{checked:Array.isArray(t.replySensitive)?t._i(t.replySensitive,null)>-1:t.replySensitive},on:{click:function(e){t.replySensitive},change:function(e){var i=t.replySensitive,s=e.target,n=!!s.checked;if(Array.isArray(i)){var a=t._i(i,null);s.checked?a<0&&(t.replySensitive=i.concat([null])):a>-1&&(t.replySensitive=i.slice(0,a).concat(i.slice(a+1)))}else t.replySensitive=n}}}),t._v(" "),i("label",{staticClass:"custom-control-label small font-weight-bold text-muted",staticStyle:{"padding-top":"3px"},attrs:{for:"sensitiveReply"}},[t._v("Add Content Warning")])])]):t._e(),t._v(" "),t.replyText.length>2?i("button",{staticClass:"btn btn-sm font-weight-bold btn-outline-primary py-1",on:{click:t.postReply}},[t._v("Post")]):t._e()])])]):t._e(),t._v(" "),i("div",{staticClass:"comment mt-4",staticStyle:{"max-height":"500px","overflow-y":"auto"}},t._l(t.results,(function(e,s){return i("div",{key:"tl"+e.id+"_"+s,staticClass:"media mb-3 mt-2"},[i("a",{attrs:{href:e.account.url,title:e.account.username}},[i("img",{staticClass:"rounded-circle border mr-3",attrs:{src:e.account.avatar,alt:"avatar",width:"32px",height:"32px"}})]),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"d-flex justify-content-between"},[i("span",[i("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.account.url}},[t._v(t._s(e.account.username))])]),t._v(" "),i("span",{staticClass:"text-lighter"},[e.favourited?i("span",{staticClass:"cursor-pointer mr-2",on:{click:function(i){return t.likeReply(e)}}},[i("i",{staticClass:"fas fa-heart text-danger"})]):i("span",{staticClass:"cursor-pointer mr-2",on:{click:function(i){return t.likeReply(e)}}},[i("i",{staticClass:"far fa-heart"})]),t._v(" "),i("span",{},[i("post-menu",{staticClass:"d-inline-block px-2",attrs:{status:e,profile:t.user,size:"sm",modal:"true"},on:{deletePost:function(i){return t.deleteComment(e.id,s)}}})],1)])]),t._v(" "),1==e.sensitive?i("div",[i("span",{staticClass:"py-3"},[i("span",{staticClass:"text-break"},[i("span",{staticClass:"font-italic text-muted"},[t._v("This comment may contain sensitive material")]),t._v(" "),i("span",{staticClass:"badge badge-primary cursor-pointer ml-2 py-1",on:{click:function(t){e.sensitive=!1}}},[t._v("Show")])])])]):i("div",{staticClass:"read-more",staticStyle:{"overflow-y":"hidden"}},[i("p",{staticClass:"mb-0",domProps:{innerHTML:t._s(e.content)}},[t._v("loading ...")])]),t._v(" "),i("p",[i("span",{staticClass:"small"},[i("a",{staticClass:"text-lighter text-decoration-none",attrs:{href:e.url}},[t._v(t._s(t.timeAgo(e.created_at)))])])])])])})),0)])])])])]):t._e()]):t._e(),t._v(" "),i("b-modal",{ref:"likesModal",attrs:{id:"l-modal","hide-footer":"",centered:"",title:"Likes","body-class":"list-group-flush py-3 px-0"}},[i("div",{staticClass:"list-group"},[t._l(t.likes,(function(e,s){return i("div",{key:"modal_likes_"+s,staticClass:"list-group-item border-0 py-1"},[i("div",{staticClass:"media"},[i("a",{attrs:{href:e.url}},[i("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px"}})]),t._v(" "),i("div",{staticClass:"media-body"},[i("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[i("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(e.username)+"\n\t\t\t\t\t\t\t")])]),t._v(" "),e.local?i("p",{staticClass:"text-muted mb-0 text-truncate",staticStyle:{"font-size":"14px"}},[t._v("\n\t\t\t\t\t\t\t"+t._s(e.display_name)+"\n\t\t\t\t\t\t")]):i("p",{staticClass:"text-muted mb-0 text-truncate mr-3",staticStyle:{"font-size":"14px"},attrs:{title:e.acct,"data-toggle":"dropdown","data-placement":"bottom"}},[i("span",{staticClass:"font-weight-bold"},[t._v(t._s(e.acct.split("@")[0]))]),i("span",{staticClass:"text-lighter"},[t._v("@"+t._s(e.acct.split("@")[1]))])])])])])})),t._v(" "),i("infinite-loading",{attrs:{spinner:"spiral"},on:{infinite:t.infiniteLikesHandler}},[i("div",{attrs:{slot:"no-more"},slot:"no-more"}),t._v(" "),i("div",{attrs:{slot:"no-results"},slot:"no-results"})])],2)]),t._v(" "),i("b-modal",{ref:"sharesModal",attrs:{id:"s-modal","hide-footer":"",centered:"",title:"Shares","body-class":"list-group-flush py-3 px-0"}},[i("div",{staticClass:"list-group"},[t._l(t.shares,(function(e,s){return i("div",{key:"modal_shares_"+s,staticClass:"list-group-item border-0 py-1"},[i("div",{staticClass:"media"},[i("a",{attrs:{href:e.url}},[i("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px"}})]),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"d-inline-block"},[i("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[i("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(e.username)+"\n\t\t\t\t\t\t\t\t")])]),t._v(" "),i("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(e.display_name)+"\n\t\t\t\t\t\t\t\t")])]),t._v(" "),i("p",{staticClass:"float-right"})])])])})),t._v(" "),i("infinite-loading",{attrs:{spinner:"spiral"},on:{infinite:t.infiniteSharesHandler}},[i("div",{attrs:{slot:"no-more"},slot:"no-more"}),t._v(" "),i("div",{attrs:{slot:"no-results"},slot:"no-results"})])],2)]),t._v(" "),i("b-modal",{ref:"lightboxModal",attrs:{id:"lightbox","hide-header":!0,"hide-footer":!0,centered:"",size:"lg","body-class":"p-0"}},[t.lightboxMedia?i("div",[i("img",{class:t.lightboxMedia.filter_class+" img-fluid",staticStyle:{"min-height":"100%","min-width":"100%"},attrs:{src:t.lightboxMedia.url}})]):t._e()]),t._v(" "),i("b-modal",{ref:"embedModal",attrs:{id:"ctx-embed-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"md","body-class":"p-2 rounded"}},[i("div",[i("div",{staticClass:"form-group"},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedPayload,expression:"ctxEmbedPayload"}],staticClass:"form-control disabled text-monospace",staticStyle:{"overflow-y":"hidden",border:"1px solid #efefef","font-size":"12px","line-height":"18px",margin:"0 0 7px",resize:"none"},attrs:{rows:"8",disabled:""},domProps:{value:t.ctxEmbedPayload},on:{input:function(e){e.target.composing||(t.ctxEmbedPayload=e.target.value)}}})]),t._v(" "),i("div",{staticClass:"form-group pl-2 d-flex justify-content-center"},[i("div",{staticClass:"form-check mr-3"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedShowCaption,expression:"ctxEmbedShowCaption"}],staticClass:"form-check-input",attrs:{type:"checkbox",disabled:1==t.ctxEmbedCompactMode},domProps:{checked:Array.isArray(t.ctxEmbedShowCaption)?t._i(t.ctxEmbedShowCaption,null)>-1:t.ctxEmbedShowCaption},on:{change:function(e){var i=t.ctxEmbedShowCaption,s=e.target,n=!!s.checked;if(Array.isArray(i)){var a=t._i(i,null);s.checked?a<0&&(t.ctxEmbedShowCaption=i.concat([null])):a>-1&&(t.ctxEmbedShowCaption=i.slice(0,a).concat(i.slice(a+1)))}else t.ctxEmbedShowCaption=n}}}),t._v(" "),i("label",{staticClass:"form-check-label font-weight-light"},[t._v("\n\t\t\t\t\t\tShow Caption\n\t\t\t\t\t")])]),t._v(" "),i("div",{staticClass:"form-check mr-3"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedShowLikes,expression:"ctxEmbedShowLikes"}],staticClass:"form-check-input",attrs:{type:"checkbox",disabled:1==t.ctxEmbedCompactMode},domProps:{checked:Array.isArray(t.ctxEmbedShowLikes)?t._i(t.ctxEmbedShowLikes,null)>-1:t.ctxEmbedShowLikes},on:{change:function(e){var i=t.ctxEmbedShowLikes,s=e.target,n=!!s.checked;if(Array.isArray(i)){var a=t._i(i,null);s.checked?a<0&&(t.ctxEmbedShowLikes=i.concat([null])):a>-1&&(t.ctxEmbedShowLikes=i.slice(0,a).concat(i.slice(a+1)))}else t.ctxEmbedShowLikes=n}}}),t._v(" "),i("label",{staticClass:"form-check-label font-weight-light"},[t._v("\n\t\t\t\t\t\tShow Likes\n\t\t\t\t\t")])]),t._v(" "),i("div",{staticClass:"form-check"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedCompactMode,expression:"ctxEmbedCompactMode"}],staticClass:"form-check-input",attrs:{type:"checkbox"},domProps:{checked:Array.isArray(t.ctxEmbedCompactMode)?t._i(t.ctxEmbedCompactMode,null)>-1:t.ctxEmbedCompactMode},on:{change:function(e){var i=t.ctxEmbedCompactMode,s=e.target,n=!!s.checked;if(Array.isArray(i)){var a=t._i(i,null);s.checked?a<0&&(t.ctxEmbedCompactMode=i.concat([null])):a>-1&&(t.ctxEmbedCompactMode=i.slice(0,a).concat(i.slice(a+1)))}else t.ctxEmbedCompactMode=n}}}),t._v(" "),i("label",{staticClass:"form-check-label font-weight-light"},[t._v("\n\t\t\t\t\t\tCompact Mode\n\t\t\t\t\t")])])]),t._v(" "),i("hr"),t._v(" "),i("button",{class:t.copiedEmbed?"btn btn-primary btn-block btn-sm py-1 font-weight-bold disabed":"btn btn-primary btn-block btn-sm py-1 font-weight-bold",attrs:{disabled:t.copiedEmbed},on:{click:t.ctxCopyEmbed}},[t._v(t._s(t.copiedEmbed?"Embed Code Copied!":"Copy Embed Code"))]),t._v(" "),i("p",{staticClass:"mb-0 px-2 small text-muted"},[t._v("By using this embed, you agree to our "),i("a",{attrs:{href:"/site/terms"}},[t._v("Terms of Use")])])])]),t._v(" "),i("b-modal",{ref:"taggedModal",attrs:{id:"tagged-modal","hide-footer":"",centered:"",title:"Tagged People","body-class":"list-group-flush py-3 px-0"}},[i("div",{staticClass:"list-group"},t._l(t.status.taggedPeople,(function(e,s){return i("div",{key:"modal_taggedpeople_"+s,staticClass:"list-group-item border-0 py-1"},[i("div",{staticClass:"media"},[i("a",{attrs:{href:"/"+e.username}},[i("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px"}})]),t._v(" "),i("div",{staticClass:"media-body"},[i("p",{staticClass:"pt-1 d-flex justify-content-between",staticStyle:{"font-size":"14px"}},[i("a",{staticClass:"font-weight-bold text-dark",attrs:{href:"/"+e.username}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(e.username)+"\n\t\t\t\t\t\t\t")]),t._v(" "),e.id==t.user.id?i("button",{staticClass:"btn btn-outline-primary btn-sm py-1 px-3",on:{click:function(e){return t.untagMe()}}},[t._v("Untag Me")]):t._e()])])])])})),0),t._v(" "),i("p",{staticClass:"mb-0 text-center small text-muted font-weight-bold"},[i("a",{attrs:{href:"/site/kb/tagging-people"}},[t._v("Learn more")]),t._v(" about Tagging People.")])]),t._v(" "),i("b-modal",{ref:"ctxModal",attrs:{id:"ctx-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[i("div",{staticClass:"list-group text-center"},[t.status&&1==t.status.local?i("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.showEmbedPostModal()}}},[t._v("Embed")]):t._e(),t._v(" "),i("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.ctxMenuCopyLink()}}},[t._v("Copy Link")]),t._v(" "),t.status&&t.user.id==t.status.account.id?i("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:t.toggleCommentVisibility}},[t._v(t._s(t.showComments?"Disable":"Enable")+" Comments")]):t._e(),t._v(" "),t.status&&t.user.id==t.status.account.id?i("a",{staticClass:"list-group-item rounded cursor-pointer text-dark text-decoration-none",attrs:{href:t.editUrl()}},[t._v("Edit")]):t._e(),t._v(" "),t.user&&1==t.user.is_admin?i("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.ctxModMenu()}}},[t._v("Moderation Tools")]):t._e(),t._v(" "),!t.status||t.user.id==t.status.account.id||t.relationship.blocking||t.user.is_admin?t._e():i("div",{staticClass:"list-group-item rounded cursor-pointer text-danger",on:{click:function(e){return t.blockProfile()}}},[t._v("Block")]),t._v(" "),t.status&&t.user.id!=t.status.account.id&&t.relationship.blocking&&!t.user.is_admin?i("div",{staticClass:"list-group-item rounded cursor-pointer text-danger",on:{click:function(e){return t.unblockProfile()}}},[t._v("Unblock")]):t._e(),t._v(" "),t.user&&t.user.id!=t.status.account.id&&!t.user.is_admin?i("a",{staticClass:"list-group-item rounded cursor-pointer text-danger text-decoration-none",attrs:{href:t.reportUrl()}},[t._v("Report")]):t._e(),t._v(" "),t.status&&(t.user.is_admin||t.user.id==t.status.account.id)?i("div",{staticClass:"list-group-item rounded cursor-pointer text-danger",on:{click:function(e){return t.deletePost(t.ctxMenuStatus)}}},[t._v("Delete")]):t._e(),t._v(" "),i("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.closeCtxMenu()}}},[t._v("Cancel")])])]),t._v(" "),i("b-modal",{ref:"ctxModModal",attrs:{id:"ctx-mod-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[i("div",{staticClass:"list-group text-center"},[i("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:t.toggleCommentVisibility}},[t._v(t._s(t.showComments?"Disable":"Enable")+" Comments")]),t._v(" "),i("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.moderatePost("unlist")}}},[t._v("Unlist from Timelines")]),t._v(" "),t.status.sensitive?i("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.moderatePost("remcw")}}},[t._v("Remove Content Warning")]):i("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.moderatePost("addcw")}}},[t._v("Add Content Warning")]),t._v(" "),i("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.ctxModMenuClose()}}},[t._v("Cancel")])])]),t._v(" "),i("b-modal",{ref:"replyModal",attrs:{id:"ctx-reply-modal","hide-footer":"",centered:"",rounded:"","title-html":t.replyingToUsername?"Reply to <span class=text-dark>"+t.replyingToUsername+"</span>":"","title-tag":"p","title-class":"font-weight-bold text-muted",size:"md","body-class":"p-2 rounded"}},[i("div",[i("vue-tribute",{attrs:{options:t.tributeSettings}},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.replyText,expression:"replyText"}],staticClass:"form-control",staticStyle:{border:"none","font-size":"18px",resize:"none","white-space":"pre-wrap",outline:"none"},attrs:{rows:"4",placeholder:"Reply here ..."},domProps:{value:t.replyText},on:{input:function(e){e.target.composing||(t.replyText=e.target.value)}}})]),t._v(" "),i("div",{staticClass:"border-top border-bottom my-2"},[i("ul",{staticClass:"nav align-items-center emoji-reactions",staticStyle:{"overflow-x":"scroll","flex-wrap":"unset"}},t._l(t.emoji,(function(e){return i("li",{staticClass:"nav-item",on:{click:function(e){return t.emojiReaction(t.status)}}},[t._v(t._s(e))])})),0)]),t._v(" "),i("div",{staticClass:"d-flex justify-content-between align-items-center"},[i("div",[i("span",{staticClass:"pl-2 small text-muted font-weight-bold text-monospace"},[i("span",{class:[t.replyText.length>t.config.uploader.max_caption_length?"text-danger":"text-dark"]},[t._v(t._s(t.replyText.length>t.config.uploader.max_caption_length?t.config.uploader.max_caption_length-t.replyText.length:t.replyText.length))]),t._v("/"+t._s(t.config.uploader.max_caption_length)+"\n\t\t\t\t\t")])]),t._v(" "),i("div",{staticClass:"d-flex align-items-center"},[i("div",{staticClass:"custom-control custom-switch mr-3"},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.replySensitive,expression:"replySensitive"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"replyModalCWSwitch"},domProps:{checked:Array.isArray(t.replySensitive)?t._i(t.replySensitive,null)>-1:t.replySensitive},on:{change:function(e){var i=t.replySensitive,s=e.target,n=!!s.checked;if(Array.isArray(i)){var a=t._i(i,null);s.checked?a<0&&(t.replySensitive=i.concat([null])):a>-1&&(t.replySensitive=i.slice(0,a).concat(i.slice(a+1)))}else t.replySensitive=n}}}),t._v(" "),i("label",{class:[t.replySensitive?"custom-control-label font-weight-bold text-dark":"custom-control-label text-lighter"],attrs:{for:"replyModalCWSwitch"}},[t._v("Mark as NSFW")])]),t._v(" "),i("button",{staticClass:"btn btn-primary btn-sm py-2 px-4 lead text-uppercase font-weight-bold",attrs:{disabled:0==t.replyText.length},on:{click:function(e){return e.preventDefault(),t.postReply()}}},[t._v("\n\t\t\t\t\t"+t._s(1==t.replySending?"POSTING":"POST")+"\n\t\t\t\t")])])])],1)])],1)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"postCommentsLoader text-center py-2"},[e("div",{staticClass:"spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"float-right"},[e("i",{staticClass:"far fa-clock text-lighter mr-3"}),this._v(" "+this._s(this.timeAgo(this.status.created_at))+" ago\n\t\t\t\t\t\t\t\t\t")])}],!1,null,"2c1a915b",null);e.default=c.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 i=e.protocol+"//"+e.host,s=i+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var n,a=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?t:(n=0===a.indexOf("//")?a:0===a.indexOf("/")?i+a:s+a.replace(/^\.\//,""),"url("+JSON.stringify(n)+")")}))}},"9v/q":function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"\n.status-comments[data-v-2c1a915b],\n.reactions[data-v-2c1a915b] {\n\tbackground: #fff;\n}\n.postPresenterContainer[data-v-2c1a915b] {\n\tbackground: #fff;\n}\n@media(min-width: 720px) {\n.postPresenterContainer[data-v-2c1a915b] {\n\t\tmin-height: 600px;\n}\n}\n[data-v-2c1a915b]::-webkit-scrollbar {\n\t\twidth: 0px;\n\t\tbackground: transparent;\n}\n.reply-btn[data-v-2c1a915b] {\n\tposition: absolute;\n\tbottom: 12px;\n\tright: 20px;\n\twidth: 60px;\n\ttext-align: center;\n\tborder-radius: 0 3px 3px 0;\n}\n.text-lighter[data-v-2c1a915b] {\n\tcolor:#B8C2CC !important;\n}\n.text-break[data-v-2c1a915b] {\n\toverflow-wrap: break-word;\n}\n.comments p[data-v-2c1a915b] {\n\tmargin-bottom: 0;\n}\n.comment-reaction[data-v-2c1a915b] {\n\tfont-size: 80%;\n}\n.show-reply-bar[data-v-2c1a915b] {\n\tdisplay: inline-block;\n\tborder-bottom: 1px solid #999;\n\theight: 0;\n\tmargin-right: 16px;\n\tvertical-align: middle;\n\twidth: 24px;\n}\n.comment-thread[data-v-2c1a915b] {\n\tmargin-top: 1rem;\n}\n.emoji-reactions .nav-item[data-v-2c1a915b] {\n\tfont-size: 1.2rem;\n\tpadding: 9px;\n\tcursor: pointer;\n}\n.emoji-reactions[data-v-2c1a915b]::-webkit-scrollbar {\n\twidth: 0px;\n\theight: 0px;\n\tbackground: transparent;\n}\n@media (min-width: 1200px) {\n.container[data-v-2c1a915b] {\n\t\tmax-width: 1100px;\n}\n}\n\n",""])},"9wGH":function(t,e,i){"use strict";i.r(e);var s={props:["status"]},n=i("KHd+"),a=Object(n.a)(s,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return 1==t.status.sensitive?i("div",[i("details",{staticClass:"details-animated"},[i("summary",[i("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v(t._s(t.status.spoiler_text?t.status.spoiler_text:"CW / NSFW / Hidden Media"))]),t._v(" "),i("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),i("b-carousel",{staticStyle:{"text-shadow":"1px 1px 2px #333","background-color":"#000"},attrs:{id:t.status.id+"-carousel",controls:"","img-blank":"",background:"#ffffff",interval:0}},t._l(t.status.media_attachments,(function(t,e){return i("b-carousel-slide",{key:t.id+"-media"},[i("video",{staticClass:"embed-responsive-item",attrs:{slot:"img",preload:"none",controls:"",loop:"",alt:t.description,width:"100%",height:"100%",poster:t.preview_url},slot:"img"},[i("source",{attrs:{src:t.url,type:t.mime}})])])})),1)],1)]):i("div",[i("b-carousel",{staticStyle:{"text-shadow":"1px 1px 2px #333","background-color":"#000"},attrs:{id:t.status.id+"-carousel",controls:"","img-blank":"",background:"#ffffff",interval:0}},t._l(t.status.media_attachments,(function(t,e){return i("b-carousel-slide",{key:t.id+"-media"},[i("video",{staticClass:"embed-responsive-item",attrs:{slot:"img",preload:"none",controls:"",loop:"",alt:t.description,width:"100%",height:"100%",poster:t.preview_url},slot:"img"},[i("source",{attrs:{src:t.url,type:t.mime}})])])})),1)],1)}),[],!1,null,null,null);e.default=a.exports},"CJs/":function(t,e,i){Vue.component("photo-presenter",i("d+I4").default),Vue.component("video-presenter",i("2Jpm").default),Vue.component("photo-album-presenter",i("Mrqh").default),Vue.component("video-album-presenter",i("9wGH").default),Vue.component("mixed-album-presenter",i("exej").default),Vue.component("post-menu",i("yric").default),Vue.component("post-component",i("6ZA0").default)},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",s=t[3];if(!s)return i;if(e&&"function"==typeof btoa){var n=(o=s,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),a=s.sources.map((function(t){return"/*# sourceURL="+s.sourceRoot+t+" */"}));return[i].concat(a).concat([n]).join("\n")}var o;return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i})).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var s={},n=0;n<this.length;n++){var a=this[n][0];"number"==typeof a&&(s[a]=!0)}for(n=0;n<t.length;n++){var o=t[n];"number"==typeof o[0]&&s[o[0]]||(i&&!o[2]?o[2]=i:i&&(o[2]="("+o[2]+") and ("+i+")"),e.push(o))}},e}},JMt0:function(t,e,i){"use strict";var s=i("4KG8"),n=i.n(s),a={name:"vue-tribute",props:{options:{type:Object,required:!0}},watch:{options:{immediate:!1,deep:!0,handler:function(){var t=this;this.tribute&&setTimeout((function(){var e=t.$slots.default[0].elm;t.tribute.detach(e),setTimeout((function(){e=t.$slots.default[0].elm,t.tribute=new n.a(t.options),t.tribute.attach(e),e.tributeInstance=t.tribute}),0)}),0)}}},mounted:function(){if(void 0===n.a)throw new Error("[vue-tribute] cannot locate tributejs!");var t=this.$slots.default[0].elm;this.tribute=new n.a(this.options),this.tribute.attach(t),t.tributeInstance=this.tribute,t.addEventListener("tribute-replaced",(function(t){t.target.dispatchEvent(new Event("input",{bubbles:!0}))}))},beforeDestroy:function(){var t=this.$slots.default[0].elm;this.tribute&&this.tribute.detach(t)},render:function(t){return t("div",{staticClass:"v-tribute"},this.$slots.default)}};"undefined"!=typeof window&&window.Vue&&window.Vue.component(a.name,a),e.a=a},"KHd+":function(t,e,i){"use strict";function s(t,e,i,s,n,a,o,r){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),s&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),o?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=l):n&&(l=r?function(){n.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:n),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}i.d(e,"a",(function(){return s}))},Mrqh:function(t,e,i){"use strict";i.r(e);var s={props:["status"],data:function(){return{cursor:0}},created:function(){},beforeDestroy:function(){},methods:{loadSensitive:function(){this.$refs.carousel.onResize(),this.$refs.carousel.goToPage(0)},altText:function(t){var e=t.description;return e||"Photo was not tagged with any alt text."},keypressNavigation:function(t){var e=this.$refs.carousel;if("37"==t.keyCode){t.preventDefault();e.advancePage("backward"),e.$emit("navigation-click","backward")}if("39"==t.keyCode){t.preventDefault();e.advancePage("forward"),e.$emit("navigation-click","forward")}}}},n=(i("fRnu"),i("KHd+")),a=Object(n.a)(s,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return 1==t.status.sensitive?i("div",[i("details",{staticClass:"details-animated"},[i("summary",{on:{click:t.loadSensitive}},[i("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v(t._s(t.status.spoiler_text?t.status.spoiler_text:"CW / NSFW / Hidden Media"))]),t._v(" "),i("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),i("carousel",{ref:"carousel",attrs:{centerMode:!0,loop:!1,"per-page":1,paginationPosition:"bottom-overlay",paginationActiveColor:"#3897f0",paginationColor:"#dbdbdb"}},t._l(t.status.media_attachments,(function(e,s){return i("slide",{key:"px-carousel-"+e.id+"-"+s,staticClass:"w-100 h-100 d-block mx-auto text-center",attrs:{title:e.description}},[i("img",{class:e.filter_class+" img-fluid",attrs:{src:e.url,alt:t.altText(e),onerror:"this.onerror=null;this.src='/storage/no-preview.png'"}}),t._v(" "),t.status.media_attachments[0].license?i("p",{staticStyle:{"margin-bottom":"0",padding:"0 5px",color:"#fff","font-size":"10px","text-align":"right",position:"absolute",bottom:"0",right:"0","border-top-left-radius":"5px",background:"linear-gradient(0deg, rgba(0,0,0,0.5), rgba(0,0,0,0.5))"}},[i("a",{staticClass:"font-weight-bold text-light",attrs:{href:t.status.url}},[t._v("Photo")]),t._v(" by "),i("a",{staticClass:"font-weight-bold text-light",attrs:{href:t.status.account.url}},[t._v("@"+t._s(t.status.account.username))]),t._v(" licensed under "),i("a",{staticClass:"font-weight-bold text-light",attrs:{href:t.status.media_attachments[0].license.url}},[t._v(t._s(t.status.media_attachments[0].license.title))])]):t._e()])})),1)],1)]):i("div",{staticClass:"w-100 h-100 p-0"},[i("carousel",{ref:"carousel",staticClass:"p-0 m-0",attrs:{centerMode:!0,loop:!1,"per-page":1,paginationPosition:"bottom-overlay",paginationActiveColor:"#3897f0",paginationColor:"#dbdbdb"}},t._l(t.status.media_attachments,(function(e,s){return i("slide",{key:"px-carousel-"+e.id+"-"+s,staticStyle:{background:"#000",display:"flex","align-items":"center"},attrs:{title:e.description}},[i("img",{class:e.filter_class+" img-fluid w-100 p-0",attrs:{src:e.url,alt:t.altText(e),onerror:"this.onerror=null;this.src='/storage/no-preview.png'"}}),t._v(" "),t.status.media_attachments[0].license?i("p",{staticStyle:{"margin-bottom":"0",padding:"0 5px",color:"#fff","font-size":"10px","text-align":"right",position:"absolute",bottom:"0",right:"0","border-top-left-radius":"5px",background:"linear-gradient(0deg, rgba(0,0,0,0.5), rgba(0,0,0,0.5))"}},[i("a",{staticClass:"font-weight-bold text-light",attrs:{href:t.status.url}},[t._v("Photo")]),t._v(" by "),i("a",{staticClass:"font-weight-bold text-light",attrs:{href:t.status.account.url}},[t._v("@"+t._s(t.status.account.username))]),t._v(" licensed under "),i("a",{staticClass:"font-weight-bold text-light",attrs:{href:t.status.media_attachments[0].license.url}},[t._v(t._s(t.status.media_attachments[0].license.title))])]):t._e()])})),1)],1)}),[],!1,null,"d73e370c",null);e.default=a.exports},ND1R:function(t,e,i){"use strict";i("pbJG")},OizH:function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"\n.text-lighter[data-v-0ed43037] {\n\tcolor:#B8C2CC !important;\n}\n.modal-body[data-v-0ed43037] {\n\tpadding: 0;\n}\n",""])},S1R9:function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"\n.card-img-top[data-v-d73e370c] {\n border-top-left-radius: 0 !important;\n border-top-right-radius: 0 !important;\n}\n",""])},YpCb:function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"\n.momentui .bg-dark[data-v-2c1a915b] {\n\tbackground: #000 !important;\n}\n.momentui .carousel.slide[data-v-2c1a915b],\n.momentui .carousel-item[data-v-2c1a915b] {\n\tbackground: #000 !important;\n}\n.reply-btn[disabled][data-v-2c1a915b] {\n\topacity: .3;\n\tcolor: #3897f0;\n}\n",""])},"aET+":function(t,e,i){var s,n,a={},o=(s=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===n&&(n=s.apply(this,arguments)),n}),r=function(t,e){return e?e.querySelector(t):document.querySelector(t)},l=function(t){var e={};return function(t,i){if("function"==typeof t)return t();if(void 0===e[t]){var s=r.call(this,t,i);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch(t){s=null}e[t]=s}return e[t]}}(),c=null,u=0,d=[],p=i("9tPo");function h(t,e){for(var i=0;i<t.length;i++){var s=t[i],n=a[s.id];if(n){n.refs++;for(var o=0;o<n.parts.length;o++)n.parts[o](s.parts[o]);for(;o<s.parts.length;o++)n.parts.push(w(s.parts[o],e))}else{var r=[];for(o=0;o<s.parts.length;o++)r.push(w(s.parts[o],e));a[s.id]={id:s.id,refs:1,parts:r}}}}function m(t,e){for(var i=[],s={},n=0;n<t.length;n++){var a=t[n],o=e.base?a[0]+e.base:a[0],r={css:a[1],media:a[2],sourceMap:a[3]};s[o]?s[o].parts.push(r):i.push(s[o]={id:o,parts:[r]})}return i}function f(t,e){var i=l(t.insertInto);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var s=d[d.length-1];if("top"===t.insertAt)s?s.nextSibling?i.insertBefore(e,s.nextSibling):i.appendChild(e):i.insertBefore(e,i.firstChild),d.push(e);else if("bottom"===t.insertAt)i.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var n=l(t.insertAt.before,i);i.insertBefore(e,n)}}function v(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=d.indexOf(t);e>=0&&d.splice(e,1)}function g(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var s=function(){0;return i.nc}();s&&(t.attrs.nonce=s)}return b(e,t.attrs),f(t,e),e}function b(t,e){Object.keys(e).forEach((function(i){t.setAttribute(i,e[i])}))}function w(t,e){var i,s,n,a;if(e.transform&&t.css){if(!(a="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=a}if(e.singleton){var o=u++;i=c||(c=g(e)),s=y.bind(null,i,o,!1),n=y.bind(null,i,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(e,t.attrs),f(t,e),e}(e),s=k.bind(null,i,e),n=function(){v(i),i.href&&URL.revokeObjectURL(i.href)}):(i=g(e),s=C.bind(null,i),n=function(){v(i)});return s(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;s(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 i=m(t,e);return h(i,e),function(t){for(var s=[],n=0;n<i.length;n++){var o=i[n];(r=a[o.id]).refs--,s.push(r)}t&&h(m(t,e),e);for(n=0;n<s.length;n++){var r;if(0===(r=s[n]).refs){for(var l=0;l<r.parts.length;l++)r.parts[l]();delete a[r.id]}}}};var _,x=(_=[],function(t,e){return _[t]=e,_.filter(Boolean).join("\n")});function y(t,e,i,s){var n=i?"":s.css;if(t.styleSheet)t.styleSheet.cssText=x(e,n);else{var a=document.createTextNode(n),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(a,o[e]):t.appendChild(a)}}function C(t,e){var i=e.css,s=e.media;if(s&&t.setAttribute("media",s),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}function k(t,e,i){var s=i.css,n=i.sourceMap,a=void 0===e.convertToAbsoluteUrls&&n;(e.convertToAbsoluteUrls||a)&&(s=p(s)),n&&(s+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var o=new Blob([s],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(o),r&&URL.revokeObjectURL(r)}},bb5l:function(t,e,i){var s=i("S1R9");"string"==typeof s&&(s=[[t.i,s,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i("aET+")(s,n);s.locals&&(t.exports=s.locals)},"d+I4":function(t,e,i){"use strict";i.r(e);var s={props:["status"],methods:{altText:function(t){var e=t.media_attachments[0].description;return e||"Photo was not tagged with any alt text."},toggleContentWarning:function(t){this.$emit("togglecw")},width:function(){if(this.status.media_attachments[0].meta&&this.status.media_attachments[0].meta.original&&this.status.media_attachments[0].meta.original.width)return this.status.media_attachments[0].meta.original.width},height:function(){if(this.status.media_attachments[0].meta&&this.status.media_attachments[0].meta.original&&this.status.media_attachments[0].meta.original.height)return this.status.media_attachments[0].meta.original.height}}},n=(i("o8Ne"),i("KHd+")),a=Object(n.a)(s,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return 1==t.status.sensitive?i("div",{staticClass:"content-label-wrapper"},[i("div",{staticClass:"text-light content-label"},[t._m(0),t._v(" "),i("p",{staticClass:"h4 font-weight-bold text-center"},[t._v("\n\t\t\tSensitive Content\n\t\t")]),t._v(" "),i("p",{staticClass:"text-center py-2"},[t._v("\n\t\t\t"+t._s(t.status.spoiler_text?t.status.spoiler_text:"This post may contain sensitive content.")+"\n\t\t")]),t._v(" "),i("p",{staticClass:"mb-0"},[i("button",{staticClass:"btn btn-outline-light btn-block btn-sm font-weight-bold",on:{click:function(e){return t.toggleContentWarning()}}},[t._v("See Post")])])]),t._v(" "),i("blur-hash-image",{attrs:{width:"32",height:"32",punch:1,hash:t.status.media_attachments[0].blurhash,alt:t.altText(t.status)}})],1):i("div",[i("div",{staticStyle:{position:"relative"},attrs:{title:t.status.media_attachments[0].description}},[i("img",{staticClass:"card-img-top",attrs:{src:t.status.media_attachments[0].url,loading:"lazy",alt:t.altText(t.status),width:t.width(),height:t.height(),onerror:"this.onerror=null;this.src='/storage/no-preview.png'"}}),t._v(" "),t.status.media_attachments[0].license?i("p",{staticStyle:{"margin-bottom":"0",padding:"0 5px",color:"#fff","font-size":"10px","text-align":"right",position:"absolute",bottom:"0",right:"0","border-top-left-radius":"5px",background:"linear-gradient(0deg, rgba(0,0,0,0.5), rgba(0,0,0,0.5))"}},[i("a",{staticClass:"font-weight-bold text-light",attrs:{href:t.status.url}},[t._v("Photo")]),t._v(" by "),i("a",{staticClass:"font-weight-bold text-light",attrs:{href:t.status.account.url}},[t._v("@"+t._s(t.status.account.username))]),t._v(" licensed under "),i("a",{staticClass:"font-weight-bold text-light",attrs:{href:t.status.media_attachments[0].license.url}},[t._v(t._s(t.status.media_attachments[0].license.title))])]):t._e()])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"text-center"},[e("i",{staticClass:"far fa-eye-slash fa-2x"})])}],!1,null,"3de721d9",null);e.default=a.exports},exej:function(t,e,i){"use strict";i.r(e);var s={props:["status"]},n=i("KHd+"),a=Object(n.a)(s,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return 1==t.status.sensitive?i("div",[i("details",{staticClass:"details-animated"},[i("summary",[i("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v(t._s(t.status.spoiler_text?t.status.spoiler_text:"CW / NSFW / Hidden Media"))]),t._v(" "),i("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),i("b-carousel",{staticStyle:{"text-shadow":"1px 1px 2px #333","background-color":"#000"},attrs:{id:t.status.id+"-carousel",controls:"","img-blank":"",background:"#ffffff",interval:0}},t._l(t.status.media_attachments,(function(e,s){return i("b-carousel-slide",{key:e.id+"-media"},["Video"==e.type?i("video",{staticClass:"embed-responsive-item",attrs:{slot:"img",preload:"none",controls:"",loop:"",alt:e.description,width:"100%",height:"100%",poster:e.preview_url},slot:"img"},[i("source",{attrs:{src:e.url,type:e.mime}})]):"Image"==e.type?i("div",{attrs:{slot:"img",title:e.description},slot:"img"},[i("img",{class:e.filter_class+" d-block img-fluid w-100",attrs:{src:e.url,alt:e.description,loading:"lazy",onerror:"this.onerror=null;this.src='/storage/no-preview.png'"}})]):i("p",{staticClass:"text-center p-0 font-weight-bold text-white"},[t._v("Error: Problem rendering preview.")])])})),1)],1)]):i("div",{staticClass:"w-100 h-100 p-0"},[i("carousel",{ref:"carousel",staticClass:"p-0 m-0",attrs:{centerMode:!0,loop:!1,"per-page":1,paginationPosition:"bottom-overlay",paginationActiveColor:"#3897f0",paginationColor:"#dbdbdb"}},t._l(t.status.media_attachments,(function(e,s){return i("slide",{key:"px-carousel-"+e.id+"-"+s,staticClass:"w-100 h-100 d-block mx-auto text-center",staticStyle:{background:"#000",display:"flex","align-items":"center"}},["Video"==e.type?i("video",{staticClass:"embed-responsive-item",attrs:{preload:"none",controls:"",loop:"",title:e.description,width:"100%",height:"100%",poster:e.preview_url}},[i("source",{attrs:{src:e.url,type:e.mime}})]):"Image"==e.type?i("div",{attrs:{title:e.description}},[i("img",{class:e.filter_class+" img-fluid w-100",attrs:{src:e.url,alt:e.description,loading:"lazy",onerror:"this.onerror=null;this.src='/storage/no-preview.png'"}})]):i("p",{staticClass:"text-center p-0 font-weight-bold text-white"},[t._v("Error: Problem rendering preview.")])])})),1)],1)}),[],!1,null,null,null);e.default=a.exports},fRnu:function(t,e,i){"use strict";i("bb5l")},jXBh:function(t,e,i){"use strict";i("mrrf")},kkBR:function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"\n.card-img-top[data-v-3de721d9] {\n border-top-left-radius: 0 !important;\n border-top-right-radius: 0 !important;\n}\n.content-label[data-v-3de721d9] {\n\tmargin: 0;\n\tposition: absolute;\n\ttop:50%;\n\tleft:50%;\n\tz-index: 2;\n\ttransform: translate(-50%, -50%);\n\tdisplay: flex;\n\tflex-direction: column;\n\talign-items: center;\n\tjustify-content: center;\n\twidth: 100%;\n\theight: 100%;\n\tz-index: 2;\n\tbackground: rgba(0, 0, 0, 0.2)\n}\n",""])},mrrf:function(t,e,i){var s=i("OizH");"string"==typeof s&&(s=[[t.i,s,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i("aET+")(s,n);s.locals&&(t.exports=s.locals)},o8Ne:function(t,e,i){"use strict";i("wx8x")},pbJG:function(t,e,i){var s=i("YpCb");"string"==typeof s&&(s=[[t.i,s,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i("aET+")(s,n);s.locals&&(t.exports=s.locals)},sv1T:function(t,e,i){var s=i("9v/q");"string"==typeof s&&(s=[[t.i,s,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i("aET+")(s,n);s.locals&&(t.exports=s.locals)},wx8x:function(t,e,i){var s=i("kkBR");"string"==typeof s&&(s=[[t.i,s,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i("aET+")(s,n);s.locals&&(t.exports=s.locals)},xjdm:function(t,e,i){"use strict";i("sv1T")},yric:function(t,e,i){"use strict";i.r(e);var s={props:["feed","status","profile","size","modal"],data:function(){return{activeSession:!1}},mounted:function(){var t=document.querySelector("body");this.activeSession=!!t.classList.contains("loggedIn")},methods:{reportUrl:function(t){return"/i/report?type="+(t.in_reply_to?"comment":"post")+"&id="+t.id},timestampFormat:function(t){var e=new Date(t);return e.toDateString()+" "+e.toLocaleTimeString()},editUrl:function(t){return t.url+"/edit"},redirect:function(t){window.location.href=t},replyUrl:function(t){return"/p/"+this.profile.username+"/"+(t.account.id==this.profile.id?t.id:t.in_reply_to_id)},mentionUrl:function(t){return"/p/"+t.account.username+"/"+t.id},statusOwner:function(t){return parseInt(t.account.id)==parseInt(this.profile.id)},deletePost:function(){this.$emit("deletePost"),$("#mt_pid_"+this.status.id).modal("hide")},hidePost:function(t){t.sensitive=!0,$("#mt_pid_"+t.id).modal("hide")},moderatePost:function(t,e,i){var s=t.account.username;switch(e){case"autocw":var n="Are you sure you want to enforce CW for "+s+" ?";swal({title:"Confirm",text:n,icon:"warning",buttons:!0,dangerMode:!0});break;case"suspend":n="Are you sure you want to suspend the account of "+s+" ?",swal({title:"Confirm",text:n,icon:"warning",buttons:!0,dangerMode:!0})}},muteProfile:function(t){0!=$("body").hasClass("loggedIn")&&axios.post("/i/mute",{type:"user",item:t.account.id}).then((function(e){swal("Success","You have successfully muted "+t.account.acct,"success")})).catch((function(t){swal("Error","Something went wrong. Please try again later.","error")}))},blockProfile:function(t){0!=$("body").hasClass("loggedIn")&&axios.post("/i/block",{type:"user",item:t.account.id}).then((function(e){swal("Success","You have successfully blocked "+t.account.acct,"success")})).catch((function(t){swal("Error","Something went wrong. Please try again later.","error")}))}}},n=(i("jXBh"),i("KHd+")),a=Object(n.a)(s,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",["true"!=t.modal?i("div",{staticClass:"dropdown"},[i("button",{staticClass:"btn btn-link text-dark no-caret dropdown-toggle py-0",attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",title:"Post options"}},[i("span",{class:["lg"==t.size?"fas fa-ellipsis-v fa-lg text-muted":"fas fa-ellipsis-v fa-sm text-lighter"]})]),t._v(" "),i("div",{staticClass:"dropdown-menu dropdown-menu-right"},[i("a",{staticClass:"dropdown-item font-weight-bold text-decoration-none",attrs:{href:t.status.url}},[t._v("Go to post")]),t._v(" "),1==t.activeSession&&0==t.statusOwner(t.status)?i("span",[i("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:t.reportUrl(t.status)}},[t._v("Report")])]):t._e(),t._v(" "),1==t.activeSession&&1==t.statusOwner(t.status)?i("span",[i("a",{staticClass:"dropdown-item font-weight-bold text-decoration-none",on:{click:function(e){return e.preventDefault(),t.muteProfile(t.status)}}},[t._v("Mute Profile")]),t._v(" "),i("a",{staticClass:"dropdown-item font-weight-bold text-decoration-none",on:{click:function(e){return e.preventDefault(),t.blockProfile(t.status)}}},[t._v("Block Profile")])]):t._e(),t._v(" "),1==t.activeSession&&1==t.profile.is_admin?i("span",[i("div",{staticClass:"dropdown-divider"}),t._v(" "),i("a",{staticClass:"dropdown-item font-weight-bold text-danger text-decoration-none",on:{click:function(e){return t.deletePost(t.status)}}},[t._v("Delete")]),t._v(" "),i("div",{staticClass:"dropdown-divider"}),t._v(" "),i("h6",{staticClass:"dropdown-header"},[t._v("Mod Tools")]),t._v(" "),i("a",{staticClass:"dropdown-item font-weight-bold text-decoration-none",on:{click:function(e){return t.moderatePost(t.status,"autocw")}}},[i("p",{staticClass:"mb-0"},[t._v("Enforce CW")]),t._v(" "),t._m(0)]),t._v(" "),i("a",{staticClass:"dropdown-item font-weight-bold text-decoration-none",on:{click:function(e){return t.moderatePost(t.status,"noautolink")}}},[i("p",{staticClass:"mb-0"},[t._v("No Autolinking")]),t._v(" "),t._m(1)]),t._v(" "),i("a",{staticClass:"dropdown-item font-weight-bold text-decoration-none",on:{click:function(e){return t.moderatePost(t.status,"unlisted")}}},[i("p",{staticClass:"mb-0"},[t._v("Unlisted Posts")]),t._v(" "),t._m(2)]),t._v(" "),i("a",{staticClass:"dropdown-item font-weight-bold text-decoration-none",on:{click:function(e){return t.moderatePost(t.status,"disable")}}},[i("p",{staticClass:"mb-0"},[t._v("Disable Account")]),t._v(" "),t._m(3)]),t._v(" "),i("a",{staticClass:"dropdown-item font-weight-bold text-decoration-none",on:{click:function(e){return t.moderatePost(t.status,"suspend")}}},[i("p",{staticClass:"mb-0"},[t._v("Suspend Account")]),t._v(" "),t._m(4)])]):t._e()])]):t._e(),t._v(" "),"true"==t.modal?i("div",[i("span",{attrs:{"data-toggle":"modal","data-target":"#mt_pid_"+t.status.id}},[i("span",{class:["lg"==t.size?"fas fa-ellipsis-v fa-lg text-muted":"fas fa-ellipsis-v fa-sm text-lighter"]})]),t._v(" "),i("div",{staticClass:"modal",attrs:{tabindex:"-1",role:"dialog",id:"mt_pid_"+t.status.id}},[i("div",{staticClass:"modal-dialog modal-sm",attrs:{role:"document"}},[i("div",{staticClass:"modal-content"},[i("div",{staticClass:"modal-body text-center"},[i("div",{staticClass:"list-group text-dark"},[i("a",{staticClass:"list-group-item text-dark text-decoration-none",attrs:{href:t.status.url}},[t._v("Go to post")]),t._v(" "),i("a",{staticClass:"list-group-item text-dark text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.hidePost(t.status)}}},[t._v("Hide")]),t._v(" "),1!=t.activeSession||t.statusOwner(t.status)?t._e():i("a",{staticClass:"list-group-item text-danger font-weight-bold text-decoration-none",attrs:{href:t.reportUrl(t.status)}},[t._v("Report")]),t._v(" "),1==t.activeSession&&1==t.statusOwner(t.status)||1==t.profile.is_admin?i("div",{staticClass:"list-group-item text-danger font-weight-bold cursor-pointer",on:{click:function(e){return e.preventDefault(),t.deletePost(e)}}},[t._v("Delete")]):t._e()])])])])])]):t._e()])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0 small text-muted"},[this._v("Adds a CW to every post "),e("br"),this._v(" made by this account.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0 small text-muted"},[this._v("Do not transform mentions, "),e("br"),this._v(" hashtags or urls into HTML.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0 small text-muted"},[this._v("Removes account from "),e("br"),this._v(" public/network timelines.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0 small text-muted"},[this._v("Temporarily disable account "),e("br"),this._v(" until next time user log in.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0 small text-muted"},[this._v("This prevents any new interactions, "),e("br"),this._v(" without deleting existing data.")])}],!1,null,"0ed43037",null);e.default=a.exports}},[[5,0]]]); |