pixelfed/public/js/direct.js
2020-11-18 14:41:37 -07:00

1 line
No EOL
54 KiB
JavaScript
Vendored

(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{"0ox+":function(t,e,a){(t.exports=a("I1BE")(!1)).push([t.i,'.autocomplete-input{border:1px solid #eee;border-radius:8px;width:100%;padding:12px 12px 12px 48px;box-sizing:border-box;position:relative;font-size:16px;line-height:1.5;-webkit-box-flex:1;flex:1;background-color:#eee;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNjY2IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iOCIvPjxwYXRoIGQ9Ik0yMSAyMWwtNC00Ii8+PC9zdmc+");background-repeat:no-repeat;background-position:12px}.autocomplete-input:focus,.autocomplete-input[aria-expanded=true]{border-color:rgba(0,0,0,.12);background-color:#fff;outline:none;box-shadow:0 2px 2px rgba(0,0,0,.16)}[data-position=below] .autocomplete-input[aria-expanded=true]{border-bottom-color:transparent;border-radius:8px 8px 0 0}[data-position=above] .autocomplete-input[aria-expanded=true]{border-top-color:transparent;border-radius:0 0 8px 8px;z-index:2}.autocomplete[data-loading=true]:after{content:"";border:3px solid rgba(0,0,0,.12);border-right-color:rgba(0,0,0,.48);border-radius:100%;width:20px;height:20px;position:absolute;right:12px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-animation:rotate 1s linear infinite;animation:rotate 1s linear infinite}.autocomplete-result-list{margin:0;border:1px solid rgba(0,0,0,.12);padding:0;box-sizing:border-box;max-height:296px;overflow-y:auto;background:#fff;list-style:none;box-shadow:0 2px 2px rgba(0,0,0,.16)}[data-position=below] .autocomplete-result-list{margin-top:-1px;border-top-color:transparent;border-radius:0 0 8px 8px;padding-bottom:8px}[data-position=above] .autocomplete-result-list{margin-bottom:-1px;border-bottom-color:transparent;border-radius:8px 8px 0 0;padding-top:8px}.autocomplete-result{cursor:default;padding:12px 12px 12px 48px;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjY2NjIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iOCIvPjxwYXRoIGQ9Ik0yMSAyMWwtNC00Ii8+PC9zdmc+");background-repeat:no-repeat;background-position:12px}.autocomplete-result:hover,.autocomplete-result[aria-selected=true]{background-color:rgba(0,0,0,.06)}@-webkit-keyframes rotate{0%{-webkit-transform:translateY(-50%) rotate(0deg);transform:translateY(-50%) rotate(0deg)}to{-webkit-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@keyframes rotate{0%{-webkit-transform:translateY(-50%) rotate(0deg);transform:translateY(-50%) rotate(0deg)}to{-webkit-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}',""])},21:function(t,e,a){t.exports=a("7D/a")},"7D/a":function(t,e,a){Vue.component("direct-component",a("VGw1").default),Vue.component("direct-message",a("9oR/").default)},"9oR/":function(t,e,a){"use strict";a.r(e);function s(t){return function(t){if(Array.isArray(t)){for(var e=0,a=new Array(t.length);e<t.length;e++)a[e]=t[e];return a}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var i={props:["accountId"],data:function(){return{config:window.App.config,hideAvatars:!0,hideTimestamps:!1,largerText:!1,autoRefresh:!1,mutedNotifications:!1,blocked:!1,loaded:!1,profile:{},page:"read",pages:["browse","add","read"],threads:[],thread:!1,threadIndex:!1,replyText:"",composeUsername:"",ctxContext:null,ctxIndex:null,uploading:!1,uploadProgress:null,min_id:null,max_id:null,loadingMessages:!1,showLoadMore:!0}},mounted:function(){var t=this;this.fetchProfile();var e=this;axios.get("/api/direct/thread",{params:{pid:e.accountId}}).then((function(a){e.loaded=!0;var i=a.data;i.messages.reverse(),t.thread=i,t.threads=[i],t.threadIndex=0;var n=i.messages.map((function(t){return t.id}));t.max_id=Math.max.apply(Math,s(n)),t.min_id=Math.min.apply(Math,s(n)),t.mutedNotifications=i.muted,t.markAsRead(),setTimeout((function(){var t=document.querySelector(".dm-wrapper");t.scrollTop=t.scrollHeight}),300)}))},watch:{mutedNotifications:function(t){t?axios.post("/api/direct/mute",{id:this.accountId}).then((function(t){})):axios.post("/api/direct/unmute",{id:this.accountId}).then((function(t){})),this.mutedNotifications=t}},updated:function(){$('[data-toggle="tooltip"]').tooltip()},methods:{fetchProfile:function(){var t=this;axios.get("/api/pixelfed/v1/accounts/verify_credentials").then((function(e){t.profile=e.data,window._sharedData.curUser=e.data}))},sendMessage:function(){var t=this,e=this,a=this.replyText;axios.post("/api/direct/create",{to_id:this.threads[this.threadIndex].id,message:a,type:e.isEmoji(a)&&a.length<10?"emoji":"text"}).then((function(a){var i=a.data;e.threads[e.threadIndex].messages.push(i);var n=e.threads[e.threadIndex].messages.map((function(t){return t.id}));t.max_id=Math.max.apply(Math,s(n)),t.min_id=Math.min.apply(Math,s(n)),setTimeout((function(){var t=document.querySelector(".dm-wrapper");t.scrollTop=t.scrollHeight}),300)})).catch((function(t){403==t.response.status&&(e.blocked=!0,swal("Profile Unavailable","You cannot message this profile at this time.","error"))})),this.replyText=""},openCtxMenu:function(t,e){this.ctxIndex=e,this.ctxContext=t,this.$refs.ctxModal.show()},closeCtxMenu:function(){this.$refs.ctxModal.hide()},truncate:function(t){return _.truncate(t)},deleteMessage:function(){var t=this;window.confirm("Are you sure you want to delete this message?")?axios.delete("/api/direct/message",{params:{id:t.ctxContext.id}}).then((function(e){t.threads[t.threadIndex].messages.splice(t.ctxIndex,1),t.closeCtxMenu()})):t.closeCtxMenu()},reportMessage:function(){this.closeCtxMenu();var t="/i/report?type=post&id="+this.ctxContext.id;window.location.href=t},uploadMedia:function(t){var e=this;$(document).on("change","#uploadMedia",(function(t){e.handleUpload()}));var a=$(t.target);a.attr("disabled",""),$("#uploadMedia").click(),a.blur(),a.removeAttr("disabled")},handleUpload:function(){var t=this;t.uploading=!0;var e=document.querySelector("#uploadMedia");e.files.length||(this.uploading=!1),Array.prototype.forEach.call(e.files,(function(e,a){var s=e.type,i=t.config.uploader.media_types.split(",");if(-1==$.inArray(s,i))return swal("Invalid File Type","The file you are trying to add is not a valid mime type. Please upload a "+t.config.uploader.media_types+" only.","error"),void(t.uploading=!1);var n=new FormData;n.append("file",e),n.append("to_id",t.threads[t.threadIndex].id);var o={onUploadProgress:function(e){var a=Math.round(100*e.loaded/e.total);t.uploadProgress=a}};axios.post("/api/direct/media",n,o).then((function(e){t.uploadProgress=100,t.uploading=!1;var a={id:Date.now(),type:e.data.type,isAuthor:!0,text:null,media:e.data.url,timeAgo:"1s",seen:null};t.threads[t.threadIndex].messages.push(a),setTimeout((function(){var t=document.querySelector(".dm-wrapper");t.scrollTop=t.scrollHeight}),300)})).catch((function(a){switch(a.response.status){case 451:t.uploading=!1,e.value=null,swal("Banned Content","This content has been banned and cannot be uploaded.","error");break;default:t.uploading=!1,e.value=null,swal("Oops, something went wrong!","An unexpected error occurred.","error")}})),e.value=null,t.uploadProgress=0}))},viewOriginal:function(){var t=this.ctxContext.media;window.location.href=t},isEmoji:function(t){var e=t.replace(new RegExp("[\0-ữf]","g"),""),a=t.replace(new RegExp("[\n\rs]+|( )+","g"),"");return e.length===a.length},copyText:function(){window.App.util.clipboard(this.ctxContext.text),this.closeCtxMenu()},clickLink:function(){var t=this.ctxContext.text;1!=this.ctxContext.meta.local&&(t="/i/redirect?url="+encodeURI(this.ctxContext.text)),window.location.href=t},markAsRead:function(){},loadOlderMessages:function(){var t=this,e=this;this.loadingMessages=!0,axios.get("/api/direct/thread",{params:{pid:this.accountId,max_id:this.min_id}}).then((function(a){var i,n=a.data;if(!n.messages.length)return t.showLoadMore=!1,void(t.loadingMessages=!1);var o=t.thread.messages.map((function(t){return t.id})),r=n.messages.filter((function(t){return-1==o.indexOf(t.id)})).reverse(),l=r.map((function(t){return t.id})),c=Math.min.apply(Math,s(l));if(c==t.min_id)return t.showLoadMore=!1,void(t.loadingMessages=!1);t.min_id=c,(i=t.thread.messages).unshift.apply(i,s(r)),setTimeout((function(){e.loadingMessages=!1}),500)})).catch((function(e){t.loadingMessages=!1}))},messagePoll:function(){var t=this;setInterval((function(){axios.get("/api/direct/thread",{params:{pid:t.accountId,min_id:t.thread.messages[t.thread.messages.length-1].id}}).then((function(t){}))}),5e3)},showOptions:function(){this.page="options"}}},n=(a("Mo/Y"),a("KHd+")),o=Object(n.a)(i,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.loaded&&"read"==t.page?a("div",{staticClass:"container messages-page p-0 p-md-2 mt-n4",staticStyle:{"min-height":"60vh"}},[a("div",{staticClass:"col-12 col-md-8 offset-md-2 p-0 px-md-2"},[a("div",{staticClass:"card shadow-none border mt-4"},[a("div",{staticClass:"card-header bg-white d-flex justify-content-between align-items-center"},[t._m(0),t._v(" "),a("span",[a("div",{staticClass:"media"},[a("img",{staticClass:"mr-3 rounded-circle img-thumbnail",attrs:{src:t.thread.avatar,alt:"Generic placeholder image",width:"40px"}}),t._v(" "),a("div",{staticClass:"media-body"},[a("p",{staticClass:"mb-0"},[a("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.thread.name))])]),t._v(" "),a("p",{staticClass:"mb-0"},[t.thread.isLocal?a("a",{staticClass:"text-decoration-none text-muted",attrs:{href:"/"+t.thread.username}},[t._v("@"+t._s(t.thread.username))]):a("a",{staticClass:"text-decoration-none text-muted",attrs:{href:"/"+t.thread.username}},[t._v(t._s(t.thread.username))])])])])]),t._v(" "),a("span",[a("a",{staticClass:"text-muted",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showOptions()}}},[a("i",{staticClass:"fas fa-cog fa-lg"})])])]),t._v(" "),a("ul",{staticClass:"list-group list-group-flush dm-wrapper",staticStyle:{height:"60vh","overflow-y":"scroll"}},[a("li",{staticClass:"list-group-item border-0"},[a("p",{staticClass:"text-center small text-muted"},[t._v("\n\t\t\t\t\t\t\tConversation with "),a("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.thread.username))])]),t._v(" "),a("hr")]),t._v(" "),t.showLoadMore&&t.thread.messages&&t.thread.messages.length>5?a("li",{staticClass:"list-group-item border-0 mt-n4"},[a("p",{staticClass:"text-center small text-muted"},[t.loadingMessages?a("button",{staticClass:"btn btn-primary font-weight-bold rounded-pill btn-sm px-3",attrs:{disabled:""}},[t._v("Loading...")]):a("button",{staticClass:"btn btn-primary font-weight-bold rounded-pill btn-sm px-3",on:{click:function(e){return t.loadOlderMessages()}}},[t._v("Load Older Messages")])])]):t._e(),t._v(" "),t._l(t.thread.messages,(function(e,s){return a("li",{staticClass:"list-group-item border-0 chat-msg cursor-pointer",on:{click:function(a){return t.openCtxMenu(e,s)}}},[e.isAuthor?a("div",{staticClass:"media d-inline-flex float-right mb-0"},[a("div",{staticClass:"media-body"},["photo"==e.type?a("p",{staticClass:"pill-from p-0 shadow"},[a("img",{staticStyle:{"border-radius":"20px"},attrs:{src:e.media,width:"140px"}})]):"link"==e.type?a("div",{staticClass:"media d-inline-flex float-right mb-0 cursor-pointer"},[a("div",{staticClass:"media-body"},[a("div",{staticClass:"card mb-2 rounded border shadow",staticStyle:{width:"240px"},attrs:{title:e.text}},[a("div",{staticClass:"card-body p-0"},[a("div",{staticClass:"media d-flex align-items-center"},[e.meta.local?a("div",{staticClass:"bg-primary mr-3 border-right p-3"},[a("i",{staticClass:"fas fa-link text-white fa-2x"})]):a("div",{staticClass:"bg-light mr-3 border-right p-3"},[a("i",{staticClass:"fas fa-link text-lighter fa-2x"})]),t._v(" "),a("div",{staticClass:"media-body text-muted small text-truncate pr-2 font-weight-bold"},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"+t._s(e.meta.local?e.text.substr(8):e.meta.domain)+"\n\t\t\t\t\t\t\t\t\t\t\t\t\t")])])])])])]):"video"==e.type?a("p",{staticClass:"pill-from p-0 shadow"},[t._m(2,!0)]):"emoji"==e.type?a("p",{staticClass:"p-0 emoji-msg"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(e.text)+"\n\t\t\t\t\t\t\t\t")]):a("p",{class:[t.largerText?"pill-from shadow larger-text text-break":"pill-from shadow text-break"]},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(e.text)+"\n\t\t\t\t\t\t\t\t")]),t._v(" "),t.hideTimestamps?t._e():a("p",{staticClass:"small text-muted font-weight-bold text-right mr-2"},[e.hidden?a("span",{staticClass:"mr-2 small",attrs:{title:"Filtered Message","data-toggle":"tooltip","data-placement":"bottom"}},[a("i",{staticClass:"fas fa-lock"})]):t._e(),t._v(" "+t._s(e.timeAgo)+"\n\t\t\t\t\t\t\t\t")])]),t._v(" "),t.hideAvatars?t._e():a("img",{staticClass:"ml-3 mt-2 rounded-circle img-thumbnail",attrs:{src:t.profile.avatar,alt:"avatar",width:"32px"}})]):a("div",{staticClass:"media d-inline-flex mb-0"},[t.hideAvatars?t._e():a("img",{staticClass:"mr-3 mt-2 rounded-circle img-thumbnail",attrs:{src:t.thread.avatar,alt:"avatar",width:"32px"}}),t._v(" "),a("div",{staticClass:"media-body"},["photo"==e.type?a("p",{staticClass:"pill-to p-0 shadow"},[a("img",{staticStyle:{"border-radius":"20px"},attrs:{src:e.media,width:"140px"}})]):"link"==e.type?a("div",{staticClass:"media d-inline-flex mb-0 cursor-pointer"},[a("div",{staticClass:"media-body"},[a("div",{staticClass:"card mb-2 rounded border shadow",staticStyle:{width:"240px"},attrs:{title:e.text}},[a("div",{staticClass:"card-body p-0"},[a("div",{staticClass:"media d-flex align-items-center"},[e.meta.local?a("div",{staticClass:"bg-primary mr-3 border-right p-3"},[a("i",{staticClass:"fas fa-link text-white fa-2x"})]):a("div",{staticClass:"bg-light mr-3 border-right p-3"},[a("i",{staticClass:"fas fa-link text-lighter fa-2x"})]),t._v(" "),a("div",{staticClass:"media-body text-muted small text-truncate pr-2 font-weight-bold"},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"+t._s(e.meta.local?e.text.substr(8):e.meta.domain)+"\n\t\t\t\t\t\t\t\t\t\t\t\t\t")])])])])])]):"video"==e.type?a("p",{staticClass:"pill-to p-0 shadow"},[t._m(1,!0)]):"emoji"==e.type?a("p",{staticClass:"p-0 emoji-msg"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(e.text)+"\n\t\t\t\t\t\t\t\t")]):a("p",{class:[t.largerText?"pill-to shadow larger-text text-break":"pill-to shadow text-break"]},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(e.text)+"\n\t\t\t\t\t\t\t\t")]),t._v(" "),t.hideTimestamps?t._e():a("p",{staticClass:"small text-muted font-weight-bold ml-2 d-flex align-items-center justify-content-start",attrs:{"data-timestamp":"timestamp"}},[e.hidden?a("span",{staticClass:"mr-2 small",attrs:{title:"Filtered Message","data-toggle":"tooltip","data-placement":"bottom"}},[a("i",{staticClass:"fas fa-lock"})]):t._e(),t._v(" "+t._s(e.timeAgo))])])])])}))],2),t._v(" "),a("div",{staticClass:"card-footer bg-white p-0"},[a("form",{staticClass:"border-0 rounded-0 align-middle",attrs:{method:"post",action:"#"}},[a("textarea",{directives:[{name:"model",rawName:"v-model",value:t.replyText,expression:"replyText"}],staticClass:"form-control border-0 rounded-0 no-focus",staticStyle:{height:"86px","line-height":"18px","max-height":"80px",resize:"none","padding-right":"115.22px"},attrs:{name:"comment",placeholder:"Reply ...",autocomplete:"off",autocorrect:"off",disabled:t.blocked},domProps:{value:t.replyText},on:{input:function(e){e.target.composing||(t.replyText=e.target.value)}}}),t._v(" "),a("input",{class:[t.replyText.length?"d-inline-block btn btn-sm btn-primary rounded-pill font-weight-bold reply-btn text-decoration-none text-uppercase":"d-inline-block btn btn-sm btn-primary rounded-pill font-weight-bold reply-btn text-decoration-none text-uppercase disabled"],attrs:{type:"button",value:"Send",disabled:0==t.replyText.length},on:{click:function(e){return e.preventDefault(),t.sendMessage(e)}}})])]),t._v(" "),a("div",{staticClass:"card-footer p-0"},[a("p",{staticClass:"d-flex justify-content-between align-items-center mb-0 px-3 py-1 small"},[a("span",[a("span",{staticClass:"btn btn-primary btn-sm font-weight-bold py-0 px-3 rounded-pill",on:{click:t.uploadMedia}},[a("i",{staticClass:"fas fa-upload mr-1"}),t._v("\n\t\t\t\t\t\t\t\tAdd Photo/Video\n\t\t\t\t\t\t\t")])]),t._v(" "),a("input",{staticClass:"d-none",attrs:{type:"file",id:"uploadMedia",name:"uploadMedia",accept:"image/jpeg,image/png,image/gif,video/mp4"}}),t._v(" "),a("span",{staticClass:"text-muted font-weight-bold"},[t._v(t._s(t.replyText.length)+"/600")])])])])])]):t._e(),t._v(" "),t.loaded&&"options"==t.page?a("div",{staticClass:"container messages-page p-0 p-md-2 mt-n4",staticStyle:{"min-height":"60vh"}},[a("div",{staticClass:"col-12 col-md-8 offset-md-2 p-0 px-md-2"},[a("div",{staticClass:"card shadow-none border mt-4"},[a("div",{staticClass:"card-header bg-white d-flex justify-content-between align-items-center"},[a("span",[a("a",{staticClass:"text-muted",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.page="read"}}},[a("i",{staticClass:"fas fa-chevron-left fa-lg"})])]),t._v(" "),t._m(3),t._v(" "),t._m(4)]),t._v(" "),a("ul",{staticClass:"list-group list-group-flush dm-wrapper",staticStyle:{height:"698px"}},[a("div",{staticClass:"list-group-item media border-bottom"},[a("div",{staticClass:"d-inline-block custom-control custom-switch ml-3"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.hideAvatars,expression:"hideAvatars"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customSwitch0"},domProps:{checked:Array.isArray(t.hideAvatars)?t._i(t.hideAvatars,null)>-1:t.hideAvatars},on:{change:function(e){var a=t.hideAvatars,s=e.target,i=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&(t.hideAvatars=a.concat([null])):n>-1&&(t.hideAvatars=a.slice(0,n).concat(a.slice(n+1)))}else t.hideAvatars=i}}}),t._v(" "),a("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch0"}})]),t._v(" "),a("div",{staticClass:"d-inline-block ml-3 font-weight-bold"},[t._v("\n\t\t\t\t\t\t\tHide Avatars\n\t\t\t\t\t\t")])]),t._v(" "),a("div",{staticClass:"list-group-item media border-bottom"},[a("div",{staticClass:"d-inline-block custom-control custom-switch ml-3"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.hideTimestamps,expression:"hideTimestamps"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customSwitch1"},domProps:{checked:Array.isArray(t.hideTimestamps)?t._i(t.hideTimestamps,null)>-1:t.hideTimestamps},on:{change:function(e){var a=t.hideTimestamps,s=e.target,i=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&(t.hideTimestamps=a.concat([null])):n>-1&&(t.hideTimestamps=a.slice(0,n).concat(a.slice(n+1)))}else t.hideTimestamps=i}}}),t._v(" "),a("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch1"}})]),t._v(" "),a("div",{staticClass:"d-inline-block ml-3 font-weight-bold"},[t._v("\n\t\t\t\t\t\t\tHide Timestamps\n\t\t\t\t\t\t")])]),t._v(" "),a("div",{staticClass:"list-group-item media border-bottom"},[a("div",{staticClass:"d-inline-block custom-control custom-switch ml-3"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.largerText,expression:"largerText"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customSwitch2"},domProps:{checked:Array.isArray(t.largerText)?t._i(t.largerText,null)>-1:t.largerText},on:{change:function(e){var a=t.largerText,s=e.target,i=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&(t.largerText=a.concat([null])):n>-1&&(t.largerText=a.slice(0,n).concat(a.slice(n+1)))}else t.largerText=i}}}),t._v(" "),a("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch2"}})]),t._v(" "),a("div",{staticClass:"d-inline-block ml-3 font-weight-bold"},[t._v("\n\t\t\t\t\t\t\tLarger Text\n\t\t\t\t\t\t")])]),t._v(" "),a("div",{staticClass:"list-group-item media border-bottom d-flex align-items-center"},[a("div",{staticClass:"d-inline-block custom-control custom-switch ml-3"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.mutedNotifications,expression:"mutedNotifications"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customSwitch4"},domProps:{checked:Array.isArray(t.mutedNotifications)?t._i(t.mutedNotifications,null)>-1:t.mutedNotifications},on:{change:function(e){var a=t.mutedNotifications,s=e.target,i=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&(t.mutedNotifications=a.concat([null])):n>-1&&(t.mutedNotifications=a.slice(0,n).concat(a.slice(n+1)))}else t.mutedNotifications=i}}}),t._v(" "),a("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch4"}})]),t._v(" "),a("div",{staticClass:"d-inline-block ml-3 font-weight-bold"},[t._v("\n\t\t\t\t\t\t\tMute Notifications \n\t\t\t\t\t\t\t"),a("p",{staticClass:"small mb-0"},[t._v("You will not receive any direct message notifications from "),a("strong",[t._v(t._s(t.thread.username))]),t._v(".")])])])])])])]):t._e(),t._v(" "),a("b-modal",{ref:"ctxModal",attrs:{id:"ctx-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[a("div",{staticClass:"list-group text-center"},[t.ctxContext&&"photo"==t.ctxContext.type?a("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold text-dark",on:{click:function(e){return t.viewOriginal()}}},[t._v("View Original")]):t._e(),t._v(" "),t.ctxContext&&"video"==t.ctxContext.type?a("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold text-dark",on:{click:function(e){return t.viewOriginal()}}},[t._v("Play")]):t._e(),t._v(" "),t.ctxContext&&"link"==t.ctxContext.type?a("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.clickLink()}}},[a("p",{staticClass:"mb-0",staticStyle:{"font-size":"12px"}},[t._v("\n\t\t\t\tNavigate to \n\t\t\t")]),t._v(" "),a("p",{staticClass:"mb-0 font-weight-bold text-dark"},[t._v("\n\t\t\t\t"+t._s(this.ctxContext.meta.domain)+"\n\t\t\t")])]):t._e(),t._v(" "),!t.ctxContext||"text"!=t.ctxContext.type&&"emoji"!=t.ctxContext.type&&"link"!=t.ctxContext.type?t._e():a("div",{staticClass:"list-group-item rounded cursor-pointer text-dark",on:{click:function(e){return t.copyText()}}},[t._v("Copy")]),t._v(" "),t.ctxContext&&!t.ctxContext.isAuthor?a("div",{staticClass:"list-group-item rounded cursor-pointer text-muted",on:{click:function(e){return t.reportMessage()}}},[t._v("Report")]):t._e(),t._v(" "),t.ctxContext&&t.ctxContext.isAuthor?a("div",{staticClass:"list-group-item rounded cursor-pointer text-muted",on:{click:function(e){return t.deleteMessage()}}},[t._v("Delete")]):t._e(),t._v(" "),a("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.closeCtxMenu()}}},[t._v("Cancel")])])])],1)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("span",[e("a",{staticClass:"text-muted",attrs:{href:"/account/direct"}},[e("i",{staticClass:"fas fa-chevron-left fa-lg"})])])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"d-block bg-primary d-flex align-items-center justify-content-center",staticStyle:{width:"200px",height:"110px","border-radius":"20px"}},[e("div",{staticClass:"text-center"},[e("p",{staticClass:"mb-1"},[e("i",{staticClass:"fas fa-play fa-2x text-white"})]),this._v(" "),e("p",{staticClass:"mb-0 small font-weight-bold text-white"},[this._v("\n\t\t\t\t\t\t\t\t\t\t\t\tPlay\n\t\t\t\t\t\t\t\t\t\t\t")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"rounded-pill bg-primary d-flex align-items-center justify-content-center",staticStyle:{width:"200px",height:"110px"}},[e("div",{staticClass:"text-center"},[e("p",{staticClass:"mb-1"},[e("i",{staticClass:"fas fa-play fa-2x text-white"})]),this._v(" "),e("p",{staticClass:"mb-0 small font-weight-bold"},[this._v("\n\t\t\t\t\t\t\t\t\t\t\t\tPlay\n\t\t\t\t\t\t\t\t\t\t\t")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",[e("p",{staticClass:"mb-0 lead font-weight-bold py-2"},[this._v("Message Settings")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"text-lighter",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:"Have a nice day!"}},[e("i",{staticClass:"far fa-smile fa-lg"})])}],!1,null,"c67f496c",null);e.default=o.exports},"9tPo":function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var a=e.protocol+"//"+e.host,s=a+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var i,n=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(n)?t:(i=0===n.indexOf("//")?n:0===n.indexOf("/")?a+n:s+n.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var a=function(t,e){var a=t[1]||"",s=t[3];if(!s)return a;if(e&&"function"==typeof btoa){var i=(o=s,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),n=s.sources.map((function(t){return"/*# sourceURL="+s.sourceRoot+t+" */"}));return[a].concat(n).concat([i]).join("\n")}var o;return[a].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+a+"}":a})).join("")},e.i=function(t,a){"string"==typeof t&&(t=[[null,t,""]]);for(var s={},i=0;i<this.length;i++){var n=this[i][0];"number"==typeof n&&(s[n]=!0)}for(i=0;i<t.length;i++){var o=t[i];"number"==typeof o[0]&&s[o[0]]||(a&&!o[2]?o[2]=a:a&&(o[2]="("+o[2]+") and ("+a+")"),e.push(o))}},e}},"KHd+":function(t,e,a){"use strict";function s(t,e,a,s,i,n,o,r){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=a,c._compiled=!0),s&&(c.functional=!0),n&&(c._scopeId="data-v-"+n),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__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=l):i&&(l=r?function(){i.call(this,this.$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(t,e){return l.call(e),d(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:c}}a.d(e,"a",(function(){return s}))},"Mo/Y":function(t,e,a){"use strict";var s=a("Nsl2");a.n(s).a},Nsl2:function(t,e,a){var s=a("csQ8");"string"==typeof s&&(s=[[t.i,s,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};a("aET+")(s,i);s.locals&&(t.exports=s.locals)},VGw1:function(t,e,a){"use strict";a.r(e);var s=a("lb/t"),i=(a("i3gq"),{components:{Autocomplete:s.a},data:function(){return{config:window.App.config,loaded:!1,profile:{},page:"browse",pages:["browse","add","read"],tab:"inbox",tabs:["inbox","sent","filtered"],inboxPage:1,sentPage:1,filteredPage:1,threads:[],thread:!1,threadIndex:!1,replyText:"",composeUsername:"",ctxContext:null,ctxIndex:null,uploading:!1,uploadProgress:null,messages:{inbox:[],sent:[],filtered:[]}}},mounted:function(){var t=this;this.fetchProfile();var e=this;axios.get("/api/direct/browse",{params:{a:"inbox"}}).then((function(a){e.loaded=!0,t.threads=a.data,t.messages.inbox=a.data}))},updated:function(){$('[data-toggle="tooltip"]').tooltip()},methods:{fetchProfile:function(){var t=this;axios.get("/api/pixelfed/v1/accounts/verify_credentials").then((function(e){t.profile=e.data,window._sharedData.curUser=e.data}))},goto:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"browse";this.page=t;var e="/account/direct";switch(t){case"read":e="/account/direct/t/"+this.thread.id;break;case"add":e+="#/new"}window.history.pushState({},"",e)},loadMessage:function(t){var e="/account/direct/t/"+t;window.location.href=e},composeUsernameSelect:function(){var t=this;if(this.profile.username==this.composeUsername)return swal("Ooops!","You cannot send a direct message to yourself.","error"),void(this.composeUsername="");axios.post("/api/direct/lookup",{username:this.composeUsername}).then((function(t){var e="/account/direct/t/"+t.data.id;window.location.href=e})).catch((function(e){swal("Ooops!","The username you entered is incorrect. Please try again","error"),t.composeUsername=""}))},truncate:function(t){return _.truncate(t)},switchTab:function(t){var e=this;switch(t){case"inbox":this.messages.inbox.length;break;case"sent":0==this.messages.sent.length&&axios.get("/api/direct/browse",{params:{a:"sent"}}).then((function(t){e.loaded=!0,e.threads=t.data,e.messages.sent=t.data}));break;case"filtered":0==this.messages.filtered.length&&axios.get("/api/direct/browse",{params:{a:"filtered"}}).then((function(t){e.loaded=!0,e.threads=t.data,e.messages.filtered=t.data}))}this.tab=t},composeSearch:function(t){if(t.length<1)return[];return axios.get("/api/local/compose/tag/search",{params:{q:t}}).then((function(t){return t.data}))},getTagResultValue:function(t){return"@"+t.name},onTagSubmitLocation:function(t){window.location.href="/account/direct/t/"+t.id},messagePagination:function(t,e){var a=this;"inbox"==t&&(this.inboxPage="prev"==e?this.inboxPage-1:this.inboxPage+1,axios.get("/api/direct/browse",{params:{a:"inbox",page:this.inboxPage}}).then((function(t){self.loaded=!0,a.threads=t.data,a.messages.inbox=t.data}))),"sent"==t&&(this.sentPage="prev"==e?this.sentPage-1:this.sentPage+1,axios.get("/api/direct/browse",{params:{a:"sent",page:this.sentPage}}).then((function(t){self.loaded=!0,a.threads=t.data,a.messages.sent=t.data}))),"filtered"==t&&(this.filteredPage="prev"==e?this.filteredPage-1:this.filteredPage+1,axios.get("/api/direct/browse",{params:{a:"filtered",page:this.filteredPage}}).then((function(t){self.loaded=!0,a.threads=t.data,a.messages.filtered=t.data})))}}}),n=a("KHd+"),o=Object(n.a)(i,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.loaded&&"browse"==t.page?a("div",{staticClass:"container messages-page p-0 p-md-2 mt-n4",staticStyle:{"min-height":"50vh"}},[a("div",{staticClass:"col-12 col-md-8 offset-md-2 p-0 px-md-2"},[a("div",{staticClass:"card shadow-none border mt-4"},[a("div",{staticClass:"card-header bg-white py-4"},[a("span",{staticClass:"h4 font-weight-bold mb-0"},[t._v("Direct Messages")]),t._v(" "),a("span",{staticClass:"float-right"},[a("a",{staticClass:"btn btn-outline-primary font-weight-bold py-0",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goto("add")}}},[t._v("New Message")])])]),t._v(" "),a("div",{staticClass:"card-header bg-white"},[a("ul",{staticClass:"nav nav-pills nav-fill"},[a("li",{staticClass:"nav-item"},[a("a",{class:["inbox"==t.tab?"nav-link px-4 font-weight-bold rounded-pill active":"nav-link px-4 font-weight-bold rounded-pill"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchTab("inbox")}}},[t._v("Inbox")])]),t._v(" "),a("li",{staticClass:"nav-item"},[a("a",{class:["sent"==t.tab?"nav-link px-4 font-weight-bold rounded-pill active":"nav-link px-4 font-weight-bold rounded-pill"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchTab("sent")}}},[t._v("Sent")])]),t._v(" "),a("li",{staticClass:"nav-item"},[a("a",{class:["filtered"==t.tab?"nav-link px-4 font-weight-bold rounded-pill active":"nav-link px-4 font-weight-bold rounded-pill"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchTab("filtered")}}},[t._v("Filtered")])])])]),t._v(" "),"inbox"==t.tab?a("ul",{staticClass:"list-group list-group-flush"},[t.messages.inbox.length?t._l(t.messages.inbox,(function(e,s){return a("div",[a("a",{staticClass:"list-group-item text-dark text-decoration-none border-left-0 border-right-0 border-top-0",attrs:{href:"/account/direct/t/"+e.id}},[a("div",{staticClass:"media d-flex align-items-center"},[a("img",{staticClass:"mr-3 rounded-circle img-thumbnail",attrs:{src:e.avatar,alt:"Generic placeholder image",width:"32px"}}),t._v(" "),a("div",{staticClass:"media-body"},[a("p",{staticClass:"mb-0"},[a("span",{staticClass:"font-weight-bold text-truncate",attrs:{title:[e.isLocal?"@"+e.username:e.username],"data-toggle":"tooltip","data-placement":"bottom"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.name)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),a("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"13px","font-weight":"500"}},[t._m(0,!0),t._v(" "),a("span",{staticClass:"pl-1 pr-3"},[t._v("\n\t\t\t\t\t\t\t\t\t\tReceived\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),a("span",[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.timeAgo)+"\n\t\t\t\t\t\t\t\t\t")])])]),t._v(" "),t._m(1,!0)])])])})):a("div",{staticClass:"list-group-item d-flex justify-content-center align-items-center",staticStyle:{"min-height":"40vh"}},[a("p",{staticClass:"lead mb-0"},[t._v("No messages found :(")])])],2):t._e(),t._v(" "),"sent"==t.tab?a("ul",{staticClass:"list-group list-group-flush"},[t.messages.sent.length?t._l(t.messages.sent,(function(e,s){return a("div",[a("a",{staticClass:"list-group-item text-dark text-decoration-none border-left-0 border-right-0 border-top-0",attrs:{href:"#"},on:{click:function(a){return a.preventDefault(),t.loadMessage(e.id)}}},[a("div",{staticClass:"media d-flex align-items-center"},[a("img",{staticClass:"mr-3 rounded-circle img-thumbnail",attrs:{src:e.avatar,alt:"Generic placeholder image",width:"32px"}}),t._v(" "),a("div",{staticClass:"media-body"},[a("p",{staticClass:"mb-0"},[a("span",{staticClass:"font-weight-bold text-truncate",attrs:{title:[e.isLocal?"@"+e.username:e.username],"data-toggle":"tooltip","data-placement":"bottom"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.name)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),a("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"13px","font-weight":"500"}},[t._m(2,!0),t._v(" "),a("span",{staticClass:"pl-1 pr-3"},[t._v("\n\t\t\t\t\t\t\t\t\t\tDelivered\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),a("span",[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.timeAgo)+"\n\t\t\t\t\t\t\t\t\t")])])]),t._v(" "),t._m(3,!0)])])])})):a("div",{staticClass:"list-group-item d-flex justify-content-center align-items-center",staticStyle:{"min-height":"40vh"}},[a("p",{staticClass:"lead mb-0"},[t._v("No messages found :(")])])],2):t._e(),t._v(" "),"filtered"==t.tab?a("ul",{staticClass:"list-group list-group-flush"},[t.messages.filtered.length?t._l(t.messages.filtered,(function(e,s){return a("div",[a("a",{staticClass:"list-group-item text-dark text-decoration-none border-left-0 border-right-0 border-top-0",attrs:{href:"#"},on:{click:function(a){return a.preventDefault(),t.loadMessage(e.id)}}},[a("div",{staticClass:"media d-flex align-items-center"},[a("img",{staticClass:"mr-3 rounded-circle img-thumbnail",attrs:{src:e.avatar,alt:"Generic placeholder image",width:"32px"}}),t._v(" "),a("div",{staticClass:"media-body"},[a("p",{staticClass:"mb-0"},[a("span",{staticClass:"font-weight-bold text-truncate",attrs:{title:[e.isLocal?"@"+e.username:e.username],"data-toggle":"tooltip","data-placement":"bottom"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.name)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),a("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"13px","font-weight":"500"}},[t._m(4,!0),t._v(" "),a("span",{staticClass:"pl-1 pr-3"},[t._v("\n\t\t\t\t\t\t\t\t\t\tFiltered\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),a("span",[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.timeAgo)+"\n\t\t\t\t\t\t\t\t\t")])])]),t._v(" "),t._m(5,!0)])])])})):a("div",{staticClass:"list-group-item d-flex justify-content-center align-items-center",staticStyle:{"min-height":"40vh"}},[a("p",{staticClass:"lead mb-0"},[t._v("No messages found :(")])])],2):t._e()]),t._v(" "),"inbox"==t.tab?a("div",{staticClass:"mt-3 text-center"},[a("button",{staticClass:"btn btn-outline-primary rounded-pill btn-sm",attrs:{disabled:1==t.inboxPage},on:{click:function(e){return t.messagePagination("inbox","prev")}}},[t._v("Prev")]),t._v(" "),a("button",{staticClass:"btn btn-outline-primary rounded-pill btn-sm",attrs:{disabled:8!=t.messages.inbox.length},on:{click:function(e){return t.messagePagination("inbox","next")}}},[t._v("Next")])]):t._e(),t._v(" "),"sent"==t.tab?a("div",{staticClass:"mt-3 text-center"},[a("button",{staticClass:"btn btn-outline-primary rounded-pill btn-sm",attrs:{disabled:1==t.sentPage},on:{click:function(e){return t.messagePagination("sent","prev")}}},[t._v("Prev")]),t._v(" "),a("button",{staticClass:"btn btn-outline-primary rounded-pill btn-sm",attrs:{disabled:8!=t.messages.sent.length},on:{click:function(e){return t.messagePagination("sent","next")}}},[t._v("Next")])]):t._e(),t._v(" "),"filtered"==t.tab?a("div",{staticClass:"mt-3 text-center"},[a("button",{staticClass:"btn btn-outline-primary rounded-pill btn-sm",attrs:{disabled:1==t.filteredPage},on:{click:function(e){return t.messagePagination("filtered","prev")}}},[t._v("Prev")]),t._v(" "),a("button",{staticClass:"btn btn-outline-primary rounded-pill btn-sm",attrs:{disabled:8!=t.messages.filtered.length},on:{click:function(e){return t.messagePagination("filtered","next")}}},[t._v("Next")])]):t._e()])]):t._e(),t._v(" "),t.loaded&&"add"==t.page?a("div",{staticClass:"container messages-page p-0 p-md-2 mt-n4",staticStyle:{"min-height":"60vh"}},[a("div",{staticClass:"col-12 col-md-8 offset-md-2 p-0 px-md-2"},[a("div",{staticClass:"card shadow-none border mt-4"},[a("div",{staticClass:"card-header bg-white py-4 d-flex justify-content-between"},[a("span",{staticClass:"cursor-pointer px-3",on:{click:function(e){return t.goto("browse")}}},[a("i",{staticClass:"fas fa-chevron-left"})]),t._v(" "),a("span",{staticClass:"h4 font-weight-bold mb-0"},[t._v("New Direct Message")]),t._v(" "),t._m(6)]),t._v(" "),a("div",{staticClass:"card-body d-flex align-items-center justify-content-center",staticStyle:{height:"60vh"}},[a("div",{},[a("p",{staticClass:"form-group"},[a("label",[t._v("To:")]),t._v(" "),a("autocomplete",{ref:"autocomplete",attrs:{search:t.composeSearch,placeholder:"@dansup","aria-label":"Search usernames","get-result-value":t.getTagResultValue},on:{submit:t.onTagSubmitLocation}}),t._v(" "),a("span",{staticClass:"help-text small text-muted"},[t._v("Select a username to send a message to.")])],1),t._v(" "),a("hr"),t._v(" "),t._m(7)])])])])]):t._e()])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("span",[e("i",{staticClass:"far fa-comment text-primary"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"float-right"},[e("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",[e("i",{staticClass:"far fa-paper-plane text-primary"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"float-right"},[e("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",[e("i",{staticClass:"fas fa-shield-alt",staticStyle:{color:"#fd9426"}})])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"float-right"},[e("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",[e("i",{staticClass:"fas fa-chevron-right text-white"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",{staticClass:"text-muted"},[e("li",[this._v("You cannot message remote accounts yet.")])])}],!1,null,"d861bc5a",null);e.default=o.exports},"aET+":function(t,e,a){var s,i,n={},o=(s=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=s.apply(this,arguments)),i}),r=function(t,e){return e?e.querySelector(t):document.querySelector(t)},l=function(t){var e={};return function(t,a){if("function"==typeof t)return t();if(void 0===e[t]){var s=r.call(this,t,a);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch(t){s=null}e[t]=s}return e[t]}}(),c=null,d=0,u=[],p=a("9tPo");function h(t,e){for(var a=0;a<t.length;a++){var s=t[a],i=n[s.id];if(i){i.refs++;for(var o=0;o<i.parts.length;o++)i.parts[o](s.parts[o]);for(;o<s.parts.length;o++)i.parts.push(x(s.parts[o],e))}else{var r=[];for(o=0;o<s.parts.length;o++)r.push(x(s.parts[o],e));n[s.id]={id:s.id,refs:1,parts:r}}}}function m(t,e){for(var a=[],s={},i=0;i<t.length;i++){var n=t[i],o=e.base?n[0]+e.base:n[0],r={css:n[1],media:n[2],sourceMap:n[3]};s[o]?s[o].parts.push(r):a.push(s[o]={id:o,parts:[r]})}return a}function f(t,e){var a=l(t.insertInto);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var s=u[u.length-1];if("top"===t.insertAt)s?s.nextSibling?a.insertBefore(e,s.nextSibling):a.appendChild(e):a.insertBefore(e,a.firstChild),u.push(e);else if("bottom"===t.insertAt)a.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 i=l(t.insertAt.before,a);a.insertBefore(e,i)}}function g(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=u.indexOf(t);e>=0&&u.splice(e,1)}function v(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var s=function(){0;return a.nc}();s&&(t.attrs.nonce=s)}return b(e,t.attrs),f(t,e),e}function b(t,e){Object.keys(e).forEach((function(a){t.setAttribute(a,e[a])}))}function x(t,e){var a,s,i,n;if(e.transform&&t.css){if(!(n="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=n}if(e.singleton){var o=d++;a=c||(c=v(e)),s=C.bind(null,a,o,!1),i=C.bind(null,a,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(a=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,a,e),i=function(){g(a),a.href&&URL.revokeObjectURL(a.href)}):(a=v(e),s=y.bind(null,a),i=function(){g(a)});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 i()}}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 a=m(t,e);return h(a,e),function(t){for(var s=[],i=0;i<a.length;i++){var o=a[i];(r=n[o.id]).refs--,s.push(r)}t&&h(m(t,e),e);for(i=0;i<s.length;i++){var r;if(0===(r=s[i]).refs){for(var l=0;l<r.parts.length;l++)r.parts[l]();delete n[r.id]}}}};var _,w=(_=[],function(t,e){return _[t]=e,_.filter(Boolean).join("\n")});function C(t,e,a,s){var i=a?"":s.css;if(t.styleSheet)t.styleSheet.cssText=w(e,i);else{var n=document.createTextNode(i),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(n,o[e]):t.appendChild(n)}}function y(t,e){var a=e.css,s=e.media;if(s&&t.setAttribute("media",s),t.styleSheet)t.styleSheet.cssText=a;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(a))}}function k(t,e,a){var s=a.css,i=a.sourceMap,n=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||n)&&(s=p(s)),i&&(s+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var o=new Blob([s],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(o),r&&URL.revokeObjectURL(r)}},csQ8:function(t,e,a){(t.exports=a("I1BE")(!1)).push([t.i,"\n.reply-btn[data-v-c67f496c] {\n\tposition: absolute;\n\tbottom: 54px;\n\tright: 20px;\n\twidth: 90px;\n\ttext-align: center;\n\tborder-radius: 0 3px 3px 0;\n}\n.media-body .bg-primary[data-v-c67f496c] {\n\tbackground: linear-gradient(135deg, #2EA2F4 0%, #0B93F6 100%) !important;\n}\n.pill-to[data-v-c67f496c] {\n\tbackground:#EDF2F7;\n\tfont-weight: 500;\n\tborder-radius: 20px !important;\n\tpadding-left: 1rem;\n\tpadding-right: 1rem;\n\tpadding-top: 0.5rem;\n\tpadding-bottom: 0.5rem;\n\tmargin-right: 3rem;\n\tmargin-bottom: 0.25rem;\n}\n.pill-from[data-v-c67f496c] {\n\tcolor: white !important;\n\ttext-align: right !important;\n\t/*background: #53d769;*/\n\tbackground: linear-gradient(135deg, #2EA2F4 0%, #0B93F6 100%) !important;\n\tfont-weight: 500;\n\tborder-radius: 20px !important;\n\tpadding-left: 1rem;\n\tpadding-right: 1rem;\n\tpadding-top: 0.5rem;\n\tpadding-bottom: 0.5rem;\n\tmargin-left: 3rem;\n\tmargin-bottom: 0.25rem;\n}\n.chat-msg[data-v-c67f496c]:hover {\n\tbackground: #f7fbfd;\n}\n.no-focus[data-v-c67f496c]:focus {\n\toutline: none !important;\n\toutline-width: 0 !important;\n\tbox-shadow: none;\n\t-moz-box-shadow: none;\n\t-webkit-box-shadow: none;\n}\n.emoji-msg[data-v-c67f496c] {\n\tfont-size: 4rem !important;\n\tline-height: 30px !important;\n\tmargin-top: 10px !important;\n}\n.larger-text[data-v-c67f496c] {\n\tfont-size: 22px;\n}\n",""])},i3gq:function(t,e,a){var s=a("0ox+");"string"==typeof s&&(s=[[t.i,s,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};a("aET+")(s,i);s.locals&&(t.exports=s.locals)},"lb/t":function(t,e,a){"use strict";(function(t){function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function i(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,s)}return a}function n(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?i(Object(a),!0).forEach((function(e){s(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):i(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var o=function(t,e){return t.matches?t.matches(e):t.msMatchesSelector?t.msMatchesSelector(e):t.webkitMatchesSelector?t.webkitMatchesSelector(e):null},r=function(t,e){return t.closest?t.closest(e):function(t,e){for(var a=t;a&&1===a.nodeType;){if(o(a,e))return a;a=a.parentNode}return null}(t,e)},l=function(t){return Boolean(t&&"function"==typeof t.then)},c=function t(){var e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=i.search,o=i.autoSelect,c=void 0!==o&&o,d=i.setValue,u=void 0===d?function(){}:d,p=i.setAttribute,h=void 0===p?function(){}:p,m=i.onUpdate,f=void 0===m?function(){}:m,g=i.onSubmit,v=void 0===g?function(){}:g,b=i.onShow,x=void 0===b?function(){}:b,_=i.onHide,w=void 0===_?function(){}:_,C=i.onLoading,y=void 0===C?function(){}:C,k=i.onLoaded,S=void 0===k?function(){}:k;a(this,t),s(this,"value",""),s(this,"searchCounter",0),s(this,"results",[]),s(this,"selectedIndex",-1),s(this,"handleInput",(function(t){var a=t.target.value;e.updateResults(a),e.value=a})),s(this,"handleKeyDown",(function(t){var a=t.key;switch(a){case"Up":case"Down":case"ArrowUp":case"ArrowDown":var s="ArrowUp"===a||"Up"===a?e.selectedIndex-1:e.selectedIndex+1;t.preventDefault(),e.handleArrows(s);break;case"Tab":e.selectResult();break;case"Enter":var i=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(i);break;case"Esc":case"Escape":e.hideResults(),e.setValue();break;default:return}})),s(this,"handleFocus",(function(t){var a=t.target.value;e.updateResults(a),e.value=a})),s(this,"handleBlur",(function(){e.hideResults()})),s(this,"handleResultMouseDown",(function(t){t.preventDefault()})),s(this,"handleResultClick",(function(t){var a=t.target,s=r(a,"[data-result-index]");if(s){e.selectedIndex=parseInt(s.dataset.resultIndex,10);var i=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(i)}})),s(this,"handleArrows",(function(t){var a=e.results.length;e.selectedIndex=(t%a+a)%a,e.onUpdate(e.results,e.selectedIndex)})),s(this,"selectResult",(function(){var t=e.results[e.selectedIndex];t&&e.setValue(t),e.hideResults()})),s(this,"updateResults",(function(t){var a=++e.searchCounter;e.onLoading(),e.search(t).then((function(t){a===e.searchCounter&&(e.results=t,e.onLoaded(),0!==e.results.length?(e.selectedIndex=e.autoSelect?0:-1,e.onUpdate(e.results,e.selectedIndex),e.showResults()):e.hideResults())}))})),s(this,"showResults",(function(){e.setAttribute("aria-expanded",!0),e.onShow()})),s(this,"hideResults",(function(){e.selectedIndex=-1,e.results=[],e.setAttribute("aria-expanded",!1),e.setAttribute("aria-activedescendant",""),e.onUpdate(e.results,e.selectedIndex),e.onHide()})),s(this,"checkSelectedResultVisible",(function(t){var a=t.querySelector('[data-result-index="'.concat(e.selectedIndex,'"]'));if(a){var s=t.getBoundingClientRect(),i=a.getBoundingClientRect();i.top<s.top?t.scrollTop-=s.top-i.top:i.bottom>s.bottom&&(t.scrollTop+=i.bottom-s.bottom)}})),this.search=l(n)?n:function(t){return Promise.resolve(n(t))},this.autoSelect=c,this.setValue=u,this.setAttribute=h,this.onUpdate=f,this.onSubmit=v,this.onShow=x,this.onHide=w,this.onLoading=y,this.onLoaded=S},d=0,u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(t).concat(++d)};const p=function(t,e,a,s,i,n,o,r,l,c){"boolean"!=typeof o&&(l=r,r=o,o=!1);const d="function"==typeof a?a.options:a;let u;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,i&&(d.functional=!0)),s&&(d._scopeId=s),n?(u=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__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(n)},d._ssrRegister=u):e&&(u=o?function(t){e.call(this,c(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,r(t))}),u)if(d.functional){const t=d.render;d.render=function(e,a){return u.call(a),t(e,a)}}else{const t=d.beforeCreate;d.beforeCreate=t?[].concat(t,u):[u]}return a}({render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{ref:"root"},[t._t("default",[a("div",t._b({},"div",t.rootProps,!1),[a("input",t._g(t._b({ref:"input",on:{input:t.handleInput,keydown:t.core.handleKeyDown,focus:t.core.handleFocus,blur:t.core.handleBlur}},"input",t.inputProps,!1),t.$listeners)),t._v(" "),a("ul",t._g(t._b({ref:"resultList"},"ul",t.resultListProps,!1),t.resultListListeners),[t._l(t.results,(function(e,s){return[t._t("result",[a("li",t._b({key:t.resultProps[s].id},"li",t.resultProps[s],!1),[t._v("\n "+t._s(t.getResultValue(e))+"\n ")])],{result:e,props:t.resultProps[s]})]}))],2)])],{rootProps:t.rootProps,inputProps:t.inputProps,inputListeners:t.inputListeners,resultListProps:t.resultListProps,resultListListeners:t.resultListListeners,results:t.results,resultProps:t.resultProps})],2)},staticRenderFns:[]},void 0,{name:"Autocomplete",inheritAttrs:!1,props:{search:{type:Function,required:!0},baseClass:{type:String,default:"autocomplete"},autoSelect:{type:Boolean,default:!1},getResultValue:{type:Function,default:function(t){return t}},defaultValue:{type:String,default:""},debounceTime:{type:Number,default:0}},data:function(){var t,e,a,s,i=new c({search:this.search,autoSelect:this.autoSelect,setValue:this.setValue,onUpdate:this.handleUpdate,onSubmit:this.handleSubmit,onShow:this.handleShow,onHide:this.handleHide,onLoading:this.handleLoading,onLoaded:this.handleLoaded});return this.debounceTime>0&&(i.handleInput=(t=i.handleInput,e=this.debounceTime,function(){var i=this,n=arguments,o=function(){s=null,a||t.apply(i,n)},r=a&&!s;clearTimeout(s),s=setTimeout(o,e),r&&t.apply(i,n)})),{core:i,value:this.defaultValue,resultListId:u("".concat(this.baseClass,"-result-list-")),results:[],selectedIndex:-1,expanded:!1,loading:!1,position:"below",resetPosition:!0}},computed:{rootProps:function(){return{class:this.baseClass,style:{position:"relative"},"data-expanded":this.expanded,"data-loading":this.loading,"data-position":this.position}},inputProps:function(){return n({class:"".concat(this.baseClass,"-input"),value:this.value,role:"combobox",autocomplete:"off",autocapitalize:"off",autocorrect:"off",spellcheck:"false","aria-autocomplete":"list","aria-haspopup":"listbox","aria-owns":this.resultListId,"aria-expanded":this.expanded?"true":"false","aria-activedescendant":this.selectedIndex>-1?this.resultProps[this.selectedIndex].id:""},this.$attrs)},inputListeners:function(){return{input:this.handleInput,keydown:this.core.handleKeyDown,focus:this.core.handleFocus,blur:this.core.handleBlur}},resultListProps:function(){var t="below"===this.position?"top":"bottom";return{id:this.resultListId,class:"".concat(this.baseClass,"-result-list"),role:"listbox",style:s({position:"absolute",zIndex:1,width:"100%",visibility:this.expanded?"visible":"hidden",pointerEvents:this.expanded?"auto":"none"},t,"100%")}},resultListListeners:function(){return{mousedown:this.core.handleResultMouseDown,click:this.core.handleResultClick}},resultProps:function(){var t=this;return this.results.map((function(e,a){return n({id:"".concat(t.baseClass,"-result-").concat(a),class:"".concat(t.baseClass,"-result"),"data-result-index":a,role:"option"},t.selectedIndex===a?{"aria-selected":"true"}:{})}))}},mounted:function(){document.body.addEventListener("click",this.handleDocumentClick)},beforeDestroy:function(){document.body.removeEventListener("click",this.handleDocumentClick)},updated:function(){var t,e,a,s;this.$refs.input&&this.$refs.resultList&&(this.resetPosition&&this.results.length>0&&(this.resetPosition=!1,this.position=(t=this.$refs.input,e=this.$refs.resultList,a=t.getBoundingClientRect(),s=e.getBoundingClientRect(),a.bottom+s.height>window.innerHeight&&window.innerHeight-a.bottom<a.top&&window.pageYOffset+a.top-s.height>0?"above":"below")),this.core.checkSelectedResultVisible(this.$refs.resultList))},methods:{setValue:function(t){this.value=t?this.getResultValue(t):""},handleUpdate:function(t,e){this.results=t,this.selectedIndex=e,this.$emit("update",t,e)},handleShow:function(){this.expanded=!0},handleHide:function(){this.expanded=!1,this.resetPosition=!0},handleLoading:function(){this.loading=!0},handleLoaded:function(){this.loading=!1},handleInput:function(t){this.value=t.target.value,this.core.handleInput(t)},handleSubmit:function(t){this.$emit("submit",t)},handleDocumentClick:function(t){this.$refs.root.contains(t.target)||this.core.hideResults()}}},void 0,!1,void 0,!1,void 0,void 0,void 0);function h(t){h.installed||(h.installed=!0,t.component("Autocomplete",p))}var m,f={install:h};"undefined"!=typeof window?m=window.Vue:void 0!==t&&(m=t.Vue),m&&m.use(f),p.install=h,e.a=p}).call(this,a("yLpj"))},yLpj:function(t,e){var a;a=function(){return this}();try{a=a||new Function("return this")()}catch(t){"object"==typeof window&&(a=window)}t.exports=a}},[[21,0]]]);