From 5fb33772c32a7e008b819cf7aa05a5d33cf78795 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 8 Jul 2021 23:23:56 -0600 Subject: [PATCH 01/10] Update reply blade view, fix missing avatar and media images --- resources/views/status/reply.blade.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/views/status/reply.blade.php b/resources/views/status/reply.blade.php index f59df58da..dee2e360c 100644 --- a/resources/views/status/reply.blade.php +++ b/resources/views/status/reply.blade.php @@ -9,12 +9,12 @@
@if($status->parent()->parent()->media()->count()) - + @endif
- +
{{$status->parent()->parent()->profile->username}}
@@ -36,12 +36,12 @@
@if($status->parent()->media()->count()) - + @endif
- +
{{$status->parent()->profile->username}}
@@ -66,7 +66,7 @@

This comment may contain sensitive content. Show

- +
{{$status->profile->username}}

{!! $status->rendered !!}

@@ -80,7 +80,7 @@ @else
- +
{{$status->profile->username}}

{!! $status->rendered !!}

@@ -105,12 +105,12 @@
@if($status->comments()->first()->media()->count()) - + @endif
- +
{{$status->comments()->first()->profile->username}}
From 57e0a741ab2a0c0157642377b7a77cc7a4d9fa55 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Fri, 9 Jul 2021 02:07:14 -0600 Subject: [PATCH 02/10] Add FanoutDeletePipeline --- .../DeletePipeline/FanoutDeletePipeline.php | 93 ++++++++ app/Jobs/InboxPipeline/DeleteWorker.php | 211 ++++++++++++++++++ 2 files changed, 304 insertions(+) create mode 100644 app/Jobs/DeletePipeline/FanoutDeletePipeline.php create mode 100644 app/Jobs/InboxPipeline/DeleteWorker.php diff --git a/app/Jobs/DeletePipeline/FanoutDeletePipeline.php b/app/Jobs/DeletePipeline/FanoutDeletePipeline.php new file mode 100644 index 000000000..e1a9a6d11 --- /dev/null +++ b/app/Jobs/DeletePipeline/FanoutDeletePipeline.php @@ -0,0 +1,93 @@ +profile = $profile; + } + + public function handle() + { + $profile = $this->profile; + + $client = new Client([ + 'timeout' => config('federation.activitypub.delivery.timeout') + ]); + + $audience = Cache::remember('pf:ap:known_instances', now()->addHours(6), function() { + return Profile::whereNotNull('sharedInbox')->groupBy('sharedInbox')->pluck('sharedInbox')->toArray(); + }); + + $activity = [ + "@context" => "https://www.w3.org/ns/activitystreams", + "id" => $profile->permalink('#delete'), + "type" => "Delete", + "actor" => $profile->permalink(), + "to" => [ + "https://www.w3.org/ns/activitystreams#Public", + ], + "object" => $profile->permalink(), + ]; + + $payload = json_encode($activity); + + $requests = function($audience) use ($client, $activity, $profile, $payload) { + foreach($audience as $url) { + $headers = HttpSignature::sign($profile, $url, $activity); + yield function() use ($client, $url, $headers, $payload) { + return $client->postAsync($url, [ + 'curl' => [ + CURLOPT_HTTPHEADER => $headers, + CURLOPT_POSTFIELDS => $payload, + CURLOPT_HEADER => true + ] + ]); + }; + } + }; + + $pool = new Pool($client, $requests($audience), [ + 'concurrency' => config('federation.activitypub.delivery.concurrency'), + 'fulfilled' => function ($response, $index) { + }, + 'rejected' => function ($reason, $index) { + } + ]); + + $promise = $pool->promise(); + + $promise->wait(); + + return 1; + } +} diff --git a/app/Jobs/InboxPipeline/DeleteWorker.php b/app/Jobs/InboxPipeline/DeleteWorker.php new file mode 100644 index 000000000..cab8df0c8 --- /dev/null +++ b/app/Jobs/InboxPipeline/DeleteWorker.php @@ -0,0 +1,211 @@ +headers = $headers; + $this->payload = $payload; + } + + /** + * Execute the job. + * + * @return void + */ + public function handle() + { + $profile = null; + $headers = $this->headers; + $payload = json_decode($this->payload, true, 8); + + if(isset($payload['id'])) { + $lockKey = hash('sha256', $payload['id']); + if(Cache::get($lockKey) !== null) { + // Job processed already + return 1; + } + Cache::put($lockKey, 1, 300); + } + + if(!isset($headers['signature']) || !isset($headers['date'])) { + return; + } + + if(empty($headers) || empty($payload)) { + return; + } + + if( $payload['type'] === 'Delete' && + ( ( is_string($payload['object']) && + $payload['object'] === $payload['actor'] ) || + ( is_array($payload['object']) && + isset($payload['object']['id'], $payload['object']['type']) && + $payload['object']['type'] === 'Person' && + $payload['actor'] === $payload['object']['id'] + )) + ) { + $actor = $payload['actor']; + $hash = strlen($actor) <= 48 ? + 'b:' . base64_encode($actor) : + 'h:' . hash('sha256', $actor); + + $lockKey = 'ap:inbox:actor-delete-exists:lock:' . $hash; + Cache::lock($lockKey, 10)->block(5, function () use( + $headers, + $payload, + $actor, + $hash + ) { + $key = 'ap:inbox:actor-delete-exists:' . $hash; + $actorDelete = Cache::remember($key, now()->addMinutes(15), function() use($actor) { + return Profile::whereRemoteUrl($actor) + ->whereNotNull('domain') + ->exists(); + }); + if($actorDelete) { + if($this->verifySignature($headers, $payload) == true) { + Cache::set($key, false); + $profile = Profile::whereNotNull('domain') + ->whereNull('status') + ->whereRemoteUrl($actor) + ->first(); + if($profile) { + DeleteRemoteProfilePipeline::dispatch($profile)->onQueue('delete'); + } + return; + } else { + // Signature verification failed, exit. + return; + } + } else { + // Remote user doesn't exist, exit early. + return; + } + }); + + return; + } + } + + protected function verifySignature($headers, $payload) + { + $body = $this->payload; + $bodyDecoded = $payload; + $signature = is_array($headers['signature']) ? $headers['signature'][0] : $headers['signature']; + $date = is_array($headers['date']) ? $headers['date'][0] : $headers['date']; + if(!$signature) { + return; + } + if(!$date) { + return; + } + if(!now()->parse($date)->gt(now()->subDays(1)) || + !now()->parse($date)->lt(now()->addDays(1)) + ) { + return; + } + $signatureData = HttpSignature::parseSignatureHeader($signature); + $keyId = Helpers::validateUrl($signatureData['keyId']); + $id = Helpers::validateUrl($bodyDecoded['id']); + $keyDomain = parse_url($keyId, PHP_URL_HOST); + $idDomain = parse_url($id, PHP_URL_HOST); + if(isset($bodyDecoded['object']) + && is_array($bodyDecoded['object']) + && isset($bodyDecoded['object']['attributedTo']) + ) { + if(parse_url($bodyDecoded['object']['attributedTo'], PHP_URL_HOST) !== $keyDomain) { + return; + } + } + if(!$keyDomain || !$idDomain || $keyDomain !== $idDomain) { + return; + } + $actor = Profile::whereKeyId($keyId)->first(); + if(!$actor) { + $actorUrl = is_array($bodyDecoded['actor']) ? $bodyDecoded['actor'][0] : $bodyDecoded['actor']; + $actor = Helpers::profileFirstOrNew($actorUrl); + } + if(!$actor) { + return; + } + $pkey = openssl_pkey_get_public($actor->public_key); + if(!$pkey) { + return 0; + } + $inboxPath = "/f/inbox"; + list($verified, $headers) = HttpSignature::verify($pkey, $signatureData, $headers, $inboxPath, $body); + if($verified == 1) { + return true; + } else { + return false; + } + } + + protected function blindKeyRotation($headers, $payload) + { + $signature = is_array($headers['signature']) ? $headers['signature'][0] : $headers['signature']; + $date = is_array($headers['date']) ? $headers['date'][0] : $headers['date']; + if(!$signature) { + return; + } + if(!$date) { + return; + } + if(!now()->parse($date)->gt(now()->subDays(1)) || + !now()->parse($date)->lt(now()->addDays(1)) + ) { + return; + } + $signatureData = HttpSignature::parseSignatureHeader($signature); + $keyId = Helpers::validateUrl($signatureData['keyId']); + $actor = Profile::whereKeyId($keyId)->whereNotNull('remote_url')->first(); + if(!$actor) { + return; + } + if(Helpers::validateUrl($actor->remote_url) == false) { + return; + } + $res = Zttp::timeout(5)->withHeaders([ + 'Accept' => 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"', + 'User-Agent' => 'PixelfedBot v0.1 - https://pixelfed.org', + ])->get($actor->remote_url); + $res = json_decode($res->body(), true, 8); + if($res['publicKey']['id'] !== $actor->key_id) { + return; + } + $actor->public_key = $res['publicKey']['publicKeyPem']; + $actor->save(); + return $this->verifySignature($headers, $payload); + } +} From 726553f5525cfa1e9ff65b4a09cbf3eec943751c Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 11 Jul 2021 02:57:14 -0600 Subject: [PATCH 03/10] Update components, add fallback default avatar --- resources/assets/js/components/Direct.vue | 14 +++++++------- resources/assets/js/components/DirectMessage.vue | 12 ++++++------ resources/assets/js/components/PostComponent.vue | 2 +- resources/assets/js/components/Timeline.vue | 1 + 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/resources/assets/js/components/Direct.vue b/resources/assets/js/components/Direct.vue index b9093dabd..f0901ed03 100644 --- a/resources/assets/js/components/Direct.vue +++ b/resources/assets/js/components/Direct.vue @@ -26,10 +26,10 @@

No messages found :(

-
+
- Generic placeholder image +

@@ -62,10 +62,10 @@

No messages found :(

-
+
- Generic placeholder image +

@@ -98,10 +98,10 @@

No messages found :(

-
+
- Generic placeholder image +

@@ -373,4 +373,4 @@ export default { } } } - \ No newline at end of file + diff --git a/resources/assets/js/components/DirectMessage.vue b/resources/assets/js/components/DirectMessage.vue index 1d4dbe873..3f2346870 100644 --- a/resources/assets/js/components/DirectMessage.vue +++ b/resources/assets/js/components/DirectMessage.vue @@ -11,7 +11,7 @@

- Generic placeholder image +

{{thread.name}} @@ -40,10 +40,10 @@

  • - avatar + avatar

    - +

    @@ -90,7 +90,7 @@

    - +

    @@ -134,7 +134,7 @@

     

    - avatar + avatar
  • @@ -682,4 +682,4 @@ } } } - \ No newline at end of file + diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index 6e7a657ed..38b966ffb 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -466,7 +466,7 @@
    - +

    diff --git a/resources/assets/js/components/Timeline.vue b/resources/assets/js/components/Timeline.vue index 9f8f0e6c2..7f444bda1 100644 --- a/resources/assets/js/components/Timeline.vue +++ b/resources/assets/js/components/Timeline.vue @@ -104,6 +104,7 @@

    Date: Sun, 11 Jul 2021 03:07:57 -0600 Subject: [PATCH 04/10] Update compiled assets --- public/js/direct.js | 2 +- public/js/status.js | 2 +- public/js/timeline.js | 2 +- public/mix-manifest.json | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/js/direct.js b/public/js/direct.js index 221abfc24..c6499ef86 100644 --- a/public/js/direct.js +++ b/public/js/direct.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{"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;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%;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%{transform:translateY(-50%) rotate(0deg)}to{transform:translateY(-50%) rotate(359deg)}}@keyframes rotate{0%{transform:translateY(-50%) rotate(0deg)}to{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))return i(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 i(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return i(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 i(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,s=new Array(e);a5?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?a("p",[t._v(" ")]):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?a("p",[t._v(" ")]):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,"5b26c7b8",null);e.default=r.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)+")")}))}},DncB:function(t,e,a){(t.exports=a("I1BE")(!1)).push([t.i,"\n.reply-btn[data-v-5b26c7b8] {\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-5b26c7b8] {\n\tbackground: linear-gradient(135deg, #2EA2F4 0%, #0B93F6 100%) !important;\n}\n.pill-to[data-v-5b26c7b8] {\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-5b26c7b8] {\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-5b26c7b8]:hover {\n\tbackground: #f7fbfd;\n}\n.no-focus[data-v-5b26c7b8]: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-5b26c7b8] {\n\tfont-size: 4rem !important;\n\tline-height: 30px !important;\n\tmargin-top: 10px !important;\n}\n.larger-text[data-v-5b26c7b8] {\n\tfont-size: 22px;\n}\n",""])},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;i0&&void 0!==arguments[0]?arguments[0]:"browse";this.page=t},loadMessage:function(t){var e="/account/direct/t/"+t;window.location.href=e},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.post("/api/direct/lookup",{q:t}).then((function(t){return t.data}))},getTagResultValue:function(t){return t.local?"@"+t.name:t.name},onTagSubmitLocation:function(t){this.composeLoading=!0,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 rounded-pill",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"},[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("span",{staticClass:"pl-1 text-muted small text-truncate",staticStyle:{"font-weight":"500"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.isLocal?"@"+e.username:e.username)+"\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"},[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("span",{staticClass:"pl-1 text-muted small text-truncate",staticStyle:{"font-weight":"500"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.isLocal?"@"+e.username:e.username)+"\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"},[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("span",{staticClass:"pl-1 text-muted small text-truncate",staticStyle:{"font-weight":"500"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.isLocal?"@"+e.username:e.username)+"\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:"mb-0 font-weight-bold"},[t._v("Select Recipient")]),t._v(" "),a("autocomplete",{ref:"autocomplete",attrs:{search:t.composeSearch,disabled:t.composeLoading,placeholder:"@dansup","aria-label":"Search usernames","get-result-value":t.getTagResultValue},on:{submit:t.onTagSubmitLocation}}),t._v(" "),a("div",{staticStyle:{width:"300px"}})],1)])])])]):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"})])}],!1,null,"2e8e718a",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=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=w.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;i0&&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,y=void 0===_?function(){}:_,C=i.onLoading,w=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.tops.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=y,this.onLoading=w,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.bottom0?"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]]]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{"0ox+":function(t,e,s){(t.exports=s("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;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%;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%{transform:translateY(-50%) rotate(0deg)}to{transform:translateY(-50%) rotate(359deg)}}@keyframes rotate{0%{transform:translateY(-50%) rotate(0deg)}to{transform:translateY(-50%) rotate(359deg)}}',""])},21:function(t,e,s){t.exports=s("7D/a")},"7D/a":function(t,e,s){Vue.component("direct-component",s("VGw1").default),Vue.component("direct-message",s("9oR/").default)},"9oR/":function(t,e,s){"use strict";s.r(e);function a(t){return function(t){if(Array.isArray(t))return i(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 i(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);"Object"===s&&t.constructor&&(s=t.constructor.name);if("Map"===s||"Set"===s)return Array.from(t);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return i(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 i(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,a=new Array(e);s5?s("li",{staticClass:"list-group-item border-0 mt-n4"},[s("p",{staticClass:"text-center small text-muted"},[t.loadingMessages?s("button",{staticClass:"btn btn-primary font-weight-bold rounded-pill btn-sm px-3",attrs:{disabled:""}},[t._v("Loading...")]):s("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,a){return s("li",{staticClass:"list-group-item border-0 chat-msg cursor-pointer",on:{click:function(s){return t.openCtxMenu(e,a)}}},[e.isAuthor?s("div",{staticClass:"media d-inline-flex float-right mb-0"},[s("div",{staticClass:"media-body"},["photo"==e.type?s("p",{staticClass:"pill-from p-0 shadow"},[s("img",{staticStyle:{"border-radius":"20px"},attrs:{src:e.media,width:"140",onerror:"this.onerror=null;this.src='/storage/no-preview.png';"}})]):"link"==e.type?s("div",{staticClass:"media d-inline-flex float-right mb-0 cursor-pointer"},[s("div",{staticClass:"media-body"},[s("div",{staticClass:"card mb-2 rounded border shadow",staticStyle:{width:"240px"},attrs:{title:e.text}},[s("div",{staticClass:"card-body p-0"},[s("div",{staticClass:"media d-flex align-items-center"},[e.meta.local?s("div",{staticClass:"bg-primary mr-3 border-right p-3"},[s("i",{staticClass:"fas fa-link text-white fa-2x"})]):s("div",{staticClass:"bg-light mr-3 border-right p-3"},[s("i",{staticClass:"fas fa-link text-lighter fa-2x"})]),t._v(" "),s("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?s("p",{staticClass:"pill-from p-0 shadow"},[t._m(2,!0)]):"emoji"==e.type?s("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")]):s("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?s("p",[t._v(" ")]):s("p",{staticClass:"small text-muted font-weight-bold text-right mr-2"},[e.hidden?s("span",{staticClass:"mr-2 small",attrs:{title:"Filtered Message","data-toggle":"tooltip","data-placement":"bottom"}},[s("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():s("img",{staticClass:"ml-3 mt-2 rounded-circle img-thumbnail",attrs:{src:t.profile.avatar,alt:"avatar",width:"32",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg';"}})]):s("div",{staticClass:"media d-inline-flex mb-0"},[t.hideAvatars?t._e():s("img",{staticClass:"mr-3 mt-2 rounded-circle img-thumbnail",attrs:{src:t.thread.avatar,alt:"avatar",width:"32",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg';"}}),t._v(" "),s("div",{staticClass:"media-body"},["photo"==e.type?s("p",{staticClass:"pill-to p-0 shadow"},[s("img",{staticStyle:{"border-radius":"20px"},attrs:{src:e.media,width:"140",onerror:"this.onerror=null;this.src='/storage/no-preview.png';"}})]):"link"==e.type?s("div",{staticClass:"media d-inline-flex mb-0 cursor-pointer"},[s("div",{staticClass:"media-body"},[s("div",{staticClass:"card mb-2 rounded border shadow",staticStyle:{width:"240px"},attrs:{title:e.text}},[s("div",{staticClass:"card-body p-0"},[s("div",{staticClass:"media d-flex align-items-center"},[e.meta.local?s("div",{staticClass:"bg-primary mr-3 border-right p-3"},[s("i",{staticClass:"fas fa-link text-white fa-2x"})]):s("div",{staticClass:"bg-light mr-3 border-right p-3"},[s("i",{staticClass:"fas fa-link text-lighter fa-2x"})]),t._v(" "),s("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?s("p",{staticClass:"pill-to p-0 shadow"},[t._m(1,!0)]):"emoji"==e.type?s("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")]):s("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?s("p",[t._v(" ")]):s("p",{staticClass:"small text-muted font-weight-bold ml-2 d-flex align-items-center justify-content-start",attrs:{"data-timestamp":"timestamp"}},[e.hidden?s("span",{staticClass:"mr-2 small",attrs:{title:"Filtered Message","data-toggle":"tooltip","data-placement":"bottom"}},[s("i",{staticClass:"fas fa-lock"})]):t._e(),t._v(" "+t._s(e.timeAgo))])])])])}))],2),t._v(" "),s("div",{staticClass:"card-footer bg-white p-0"},[s("form",{staticClass:"border-0 rounded-0 align-middle",attrs:{method:"post",action:"#"}},[s("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(" "),s("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(" "),s("div",{staticClass:"card-footer p-0"},[s("p",{staticClass:"d-flex justify-content-between align-items-center mb-0 px-3 py-1 small"},[s("span",[s("span",{staticClass:"btn btn-primary btn-sm font-weight-bold py-0 px-3 rounded-pill",on:{click:t.uploadMedia}},[s("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(" "),s("input",{staticClass:"d-none",attrs:{type:"file",id:"uploadMedia",name:"uploadMedia",accept:"image/jpeg,image/png,image/gif,video/mp4"}}),t._v(" "),s("span",{staticClass:"text-muted font-weight-bold"},[t._v(t._s(t.replyText.length)+"/600")])])])])])]):t._e(),t._v(" "),t.loaded&&"options"==t.page?s("div",{staticClass:"container messages-page p-0 p-md-2 mt-n4",staticStyle:{"min-height":"60vh"}},[s("div",{staticClass:"col-12 col-md-8 offset-md-2 p-0 px-md-2"},[s("div",{staticClass:"card shadow-none border mt-4"},[s("div",{staticClass:"card-header bg-white d-flex justify-content-between align-items-center"},[s("span",[s("a",{staticClass:"text-muted",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.page="read"}}},[s("i",{staticClass:"fas fa-chevron-left fa-lg"})])]),t._v(" "),t._m(3),t._v(" "),t._m(4)]),t._v(" "),s("ul",{staticClass:"list-group list-group-flush dm-wrapper",staticStyle:{height:"698px"}},[s("div",{staticClass:"list-group-item media border-bottom"},[s("div",{staticClass:"d-inline-block custom-control custom-switch ml-3"},[s("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 s=t.hideAvatars,a=e.target,i=!!a.checked;if(Array.isArray(s)){var n=t._i(s,null);a.checked?n<0&&(t.hideAvatars=s.concat([null])):n>-1&&(t.hideAvatars=s.slice(0,n).concat(s.slice(n+1)))}else t.hideAvatars=i}}}),t._v(" "),s("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch0"}})]),t._v(" "),s("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(" "),s("div",{staticClass:"list-group-item media border-bottom"},[s("div",{staticClass:"d-inline-block custom-control custom-switch ml-3"},[s("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 s=t.hideTimestamps,a=e.target,i=!!a.checked;if(Array.isArray(s)){var n=t._i(s,null);a.checked?n<0&&(t.hideTimestamps=s.concat([null])):n>-1&&(t.hideTimestamps=s.slice(0,n).concat(s.slice(n+1)))}else t.hideTimestamps=i}}}),t._v(" "),s("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch1"}})]),t._v(" "),s("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(" "),s("div",{staticClass:"list-group-item media border-bottom"},[s("div",{staticClass:"d-inline-block custom-control custom-switch ml-3"},[s("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 s=t.largerText,a=e.target,i=!!a.checked;if(Array.isArray(s)){var n=t._i(s,null);a.checked?n<0&&(t.largerText=s.concat([null])):n>-1&&(t.largerText=s.slice(0,n).concat(s.slice(n+1)))}else t.largerText=i}}}),t._v(" "),s("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch2"}})]),t._v(" "),s("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(" "),s("div",{staticClass:"list-group-item media border-bottom d-flex align-items-center"},[s("div",{staticClass:"d-inline-block custom-control custom-switch ml-3"},[s("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 s=t.mutedNotifications,a=e.target,i=!!a.checked;if(Array.isArray(s)){var n=t._i(s,null);a.checked?n<0&&(t.mutedNotifications=s.concat([null])):n>-1&&(t.mutedNotifications=s.slice(0,n).concat(s.slice(n+1)))}else t.mutedNotifications=i}}}),t._v(" "),s("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch4"}})]),t._v(" "),s("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"),s("p",{staticClass:"small mb-0"},[t._v("You will not receive any direct message notifications from "),s("strong",[t._v(t._s(t.thread.username))]),t._v(".")])])])])])])]):t._e(),t._v(" "),s("b-modal",{ref:"ctxModal",attrs:{id:"ctx-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[s("div",{staticClass:"list-group text-center"},[t.ctxContext&&"photo"==t.ctxContext.type?s("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?s("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?s("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.clickLink()}}},[s("p",{staticClass:"mb-0",staticStyle:{"font-size":"12px"}},[t._v("\n\t\t\t\tNavigate to \n\t\t\t")]),t._v(" "),s("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():s("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?s("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?s("div",{staticClass:"list-group-item rounded cursor-pointer text-muted",on:{click:function(e){return t.deleteMessage()}}},[t._v("Delete")]):t._e(),t._v(" "),s("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,"0bbc0461",null);e.default=o.exports},"9tPo":function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var s=e.protocol+"//"+e.host,a=s+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var 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("/")?s+n:a+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 s=function(t,e){var s=t[1]||"",a=t[3];if(!a)return s;if(e&&"function"==typeof btoa){var i=(r=a,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),n=a.sources.map((function(t){return"/*# sourceURL="+a.sourceRoot+t+" */"}));return[s].concat(n).concat([i]).join("\n")}var r;return[s].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+s+"}":s})).join("")},e.i=function(t,s){"string"==typeof t&&(t=[[null,t,""]]);for(var a={},i=0;i0&&void 0!==arguments[0]?arguments[0]:"browse";this.page=t},loadMessage:function(t){var e="/account/direct/t/"+t;window.location.href=e},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.post("/api/direct/lookup",{q:t}).then((function(t){return t.data}))},getTagResultValue:function(t){return t.local?"@"+t.name:t.name},onTagSubmitLocation:function(t){this.composeLoading=!0,window.location.href="/account/direct/t/"+t.id},messagePagination:function(t,e){var s=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,s.threads=t.data,s.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,s.threads=t.data,s.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,s.threads=t.data,s.messages.filtered=t.data})))}}}),n=s("KHd+"),r=Object(n.a)(i,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[t.loaded&&"browse"==t.page?s("div",{staticClass:"container messages-page p-0 p-md-2 mt-n4",staticStyle:{"min-height":"50vh"}},[s("div",{staticClass:"col-12 col-md-8 offset-md-2 p-0 px-md-2"},[s("div",{staticClass:"card shadow-none border mt-4"},[s("div",{staticClass:"card-header bg-white py-4"},[s("span",{staticClass:"h4 font-weight-bold mb-0"},[t._v("Direct Messages")]),t._v(" "),s("span",{staticClass:"float-right"},[s("a",{staticClass:"btn btn-outline-primary font-weight-bold py-0 rounded-pill",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goto("add")}}},[t._v("New Message")])])]),t._v(" "),s("div",{staticClass:"card-header bg-white"},[s("ul",{staticClass:"nav nav-pills nav-fill"},[s("li",{staticClass:"nav-item"},[s("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(" "),s("li",{staticClass:"nav-item"},[s("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(" "),s("li",{staticClass:"nav-item"},[s("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?s("ul",{staticClass:"list-group list-group-flush"},[t.messages.inbox.length?t._l(t.messages.inbox,(function(e,a){return s("div",{key:"dm_inbox"+a},[s("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}},[s("div",{staticClass:"media d-flex align-items-center"},[t._o(s("img",{staticClass:"mr-3 rounded-circle img-thumbnail",attrs:{src:e.avatar,width:"32",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg';"}}),0,"dm_inbox"+a),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0"},[s("span",{staticClass:"font-weight-bold text-truncate"},[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(" "),s("span",{staticClass:"pl-1 text-muted small text-truncate",staticStyle:{"font-weight":"500"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.isLocal?"@"+e.username:e.username)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"13px","font-weight":"500"}},[t._m(0,!0),t._v(" "),s("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(" "),s("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)])])])})):s("div",{staticClass:"list-group-item d-flex justify-content-center align-items-center",staticStyle:{"min-height":"40vh"}},[s("p",{staticClass:"lead mb-0"},[t._v("No messages found :(")])])],2):t._e(),t._v(" "),"sent"==t.tab?s("ul",{staticClass:"list-group list-group-flush"},[t.messages.sent.length?t._l(t.messages.sent,(function(e,a){return s("div",{key:"dm_sent"+a},[s("a",{staticClass:"list-group-item text-dark text-decoration-none border-left-0 border-right-0 border-top-0",attrs:{href:"#"},on:{click:function(s){return s.preventDefault(),t.loadMessage(e.id)}}},[s("div",{staticClass:"media d-flex align-items-center"},[t._o(s("img",{staticClass:"mr-3 rounded-circle img-thumbnail",attrs:{src:e.avatar,width:"32",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg';"}}),1,"dm_sent"+a),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0"},[s("span",{staticClass:"font-weight-bold text-truncate"},[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(" "),s("span",{staticClass:"pl-1 text-muted small text-truncate",staticStyle:{"font-weight":"500"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.isLocal?"@"+e.username:e.username)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"13px","font-weight":"500"}},[t._m(2,!0),t._v(" "),s("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(" "),s("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)])])])})):s("div",{staticClass:"list-group-item d-flex justify-content-center align-items-center",staticStyle:{"min-height":"40vh"}},[s("p",{staticClass:"lead mb-0"},[t._v("No messages found :(")])])],2):t._e(),t._v(" "),"filtered"==t.tab?s("ul",{staticClass:"list-group list-group-flush"},[t.messages.filtered.length?t._l(t.messages.filtered,(function(e,a){return s("div",{key:"dm_filtered"+a},[s("a",{staticClass:"list-group-item text-dark text-decoration-none border-left-0 border-right-0 border-top-0",attrs:{href:"#"},on:{click:function(s){return s.preventDefault(),t.loadMessage(e.id)}}},[s("div",{staticClass:"media d-flex align-items-center"},[t._o(s("img",{staticClass:"mr-3 rounded-circle img-thumbnail",attrs:{src:e.avatar,width:"32",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg';"}}),2,"dm_filtered"+a),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0"},[s("span",{staticClass:"font-weight-bold text-truncate"},[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(" "),s("span",{staticClass:"pl-1 text-muted small text-truncate",staticStyle:{"font-weight":"500"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.isLocal?"@"+e.username:e.username)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"13px","font-weight":"500"}},[t._m(4,!0),t._v(" "),s("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(" "),s("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)])])])})):s("div",{staticClass:"list-group-item d-flex justify-content-center align-items-center",staticStyle:{"min-height":"40vh"}},[s("p",{staticClass:"lead mb-0"},[t._v("No messages found :(")])])],2):t._e()]),t._v(" "),"inbox"==t.tab?s("div",{staticClass:"mt-3 text-center"},[s("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(" "),s("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?s("div",{staticClass:"mt-3 text-center"},[s("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(" "),s("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?s("div",{staticClass:"mt-3 text-center"},[s("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(" "),s("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?s("div",{staticClass:"container messages-page p-0 p-md-2 mt-n4",staticStyle:{"min-height":"60vh"}},[s("div",{staticClass:"col-12 col-md-8 offset-md-2 p-0 px-md-2"},[s("div",{staticClass:"card shadow-none border mt-4"},[s("div",{staticClass:"card-header bg-white py-4 d-flex justify-content-between"},[s("span",{staticClass:"cursor-pointer px-3",on:{click:function(e){return t.goto("browse")}}},[s("i",{staticClass:"fas fa-chevron-left"})]),t._v(" "),s("span",{staticClass:"h4 font-weight-bold mb-0"},[t._v("New Direct Message")]),t._v(" "),t._m(6)]),t._v(" "),s("div",{staticClass:"card-body d-flex align-items-center justify-content-center",staticStyle:{height:"60vh"}},[s("div",[s("p",{staticClass:"mb-0 font-weight-bold"},[t._v("Select Recipient")]),t._v(" "),s("autocomplete",{ref:"autocomplete",attrs:{search:t.composeSearch,disabled:t.composeLoading,placeholder:"@dansup","aria-label":"Search usernames","get-result-value":t.getTagResultValue},on:{submit:t.onTagSubmitLocation}}),t._v(" "),s("div",{staticStyle:{width:"300px"}})],1)])])])]):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"})])}],!1,null,"07ed533f",null);e.default=r.exports},"aET+":function(t,e,s){var a,i,n={},r=(a=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=a.apply(this,arguments)),i}),o=function(t,e){return e?e.querySelector(t):document.querySelector(t)},l=function(t){var e={};return function(t,s){if("function"==typeof t)return t();if(void 0===e[t]){var a=o.call(this,t,s);if(window.HTMLIFrameElement&&a instanceof window.HTMLIFrameElement)try{a=a.contentDocument.head}catch(t){a=null}e[t]=a}return e[t]}}(),c=null,d=0,u=[],p=s("9tPo");function h(t,e){for(var s=0;s=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 a=function(){0;return s.nc}();a&&(t.attrs.nonce=a)}return b(e,t.attrs),f(t,e),e}function b(t,e){Object.keys(e).forEach((function(s){t.setAttribute(s,e[s])}))}function x(t,e){var s,a,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 r=d++;s=c||(c=v(e)),a=w.bind(null,s,r,!1),i=w.bind(null,s,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(s=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(e,t.attrs),f(t,e),e}(e),a=k.bind(null,s,e),i=function(){g(s),s.href&&URL.revokeObjectURL(s.href)}):(s=v(e),a=C.bind(null,s),i=function(){g(s)});return a(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;a(t=e)}else 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=r()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var s=m(t,e);return h(s,e),function(t){for(var a=[],i=0;i0&&void 0!==arguments[0]?arguments[0]:{},n=i.search,r=i.autoSelect,c=void 0!==r&&r,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,y=void 0===_?function(){}:_,w=i.onLoading,C=void 0===w?function(){}:w,k=i.onLoaded,S=void 0===k?function(){}:k;s(this,t),a(this,"value",""),a(this,"searchCounter",0),a(this,"results",[]),a(this,"selectedIndex",-1),a(this,"handleInput",(function(t){var s=t.target.value;e.updateResults(s),e.value=s})),a(this,"handleKeyDown",(function(t){var s=t.key;switch(s){case"Up":case"Down":case"ArrowUp":case"ArrowDown":var a="ArrowUp"===s||"Up"===s?e.selectedIndex-1:e.selectedIndex+1;t.preventDefault(),e.handleArrows(a);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}})),a(this,"handleFocus",(function(t){var s=t.target.value;e.updateResults(s),e.value=s})),a(this,"handleBlur",(function(){e.hideResults()})),a(this,"handleResultMouseDown",(function(t){t.preventDefault()})),a(this,"handleResultClick",(function(t){var s=t.target,a=o(s,"[data-result-index]");if(a){e.selectedIndex=parseInt(a.dataset.resultIndex,10);var i=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(i)}})),a(this,"handleArrows",(function(t){var s=e.results.length;e.selectedIndex=(t%s+s)%s,e.onUpdate(e.results,e.selectedIndex)})),a(this,"selectResult",(function(){var t=e.results[e.selectedIndex];t&&e.setValue(t),e.hideResults()})),a(this,"updateResults",(function(t){var s=++e.searchCounter;e.onLoading(),e.search(t).then((function(t){s===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())}))})),a(this,"showResults",(function(){e.setAttribute("aria-expanded",!0),e.onShow()})),a(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()})),a(this,"checkSelectedResultVisible",(function(t){var s=t.querySelector('[data-result-index="'.concat(e.selectedIndex,'"]'));if(s){var a=t.getBoundingClientRect(),i=s.getBoundingClientRect();i.topa.bottom&&(t.scrollTop+=i.bottom-a.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=y,this.onLoading=C,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,s,a,i,n,r,o,l,c){"boolean"!=typeof r&&(l=o,o=r,r=!1);const d="function"==typeof s?s.options:s;let u;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,i&&(d.functional=!0)),a&&(d._scopeId=a),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=r?function(t){e.call(this,c(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,o(t))}),u)if(d.functional){const t=d.render;d.render=function(e,s){return u.call(s),t(e,s)}}else{const t=d.beforeCreate;d.beforeCreate=t?[].concat(t,u):[u]}return s}({render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{ref:"root"},[t._t("default",[s("div",t._b({},"div",t.rootProps,!1),[s("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(" "),s("ul",t._g(t._b({ref:"resultList"},"ul",t.resultListProps,!1),t.resultListListeners),[t._l(t.results,(function(e,a){return[t._t("result",[s("li",t._b({key:t.resultProps[a].id},"li",t.resultProps[a],!1),[t._v("\n "+t._s(t.getResultValue(e))+"\n ")])],{result:e,props:t.resultProps[a]})]}))],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,s,a,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,r=function(){a=null,s||t.apply(i,n)},o=s&&!a;clearTimeout(a),a=setTimeout(r,e),o&&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:a({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,s){return n({id:"".concat(t.baseClass,"-result-").concat(s),class:"".concat(t.baseClass,"-result"),"data-result-index":s,role:"option"},t.selectedIndex===s?{"aria-selected":"true"}:{})}))}},mounted:function(){document.body.addEventListener("click",this.handleDocumentClick)},beforeDestroy:function(){document.body.removeEventListener("click",this.handleDocumentClick)},updated:function(){var t,e,s,a;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,s=t.getBoundingClientRect(),a=e.getBoundingClientRect(),s.bottom+a.height>window.innerHeight&&window.innerHeight-s.bottom0?"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,s("yLpj"))},"vxA/":function(t,e,s){var a=s("UZ4+");"string"==typeof a&&(a=[[t.i,a,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};s("aET+")(a,i);a.locals&&(t.exports=a.locals)},yLpj:function(t,e){var s;s=function(){return this}();try{s=s||new Function("return this")()}catch(t){"object"==typeof window&&(s=window)}t.exports=s}},[[21,0]]]); \ No newline at end of file diff --git a/public/js/status.js b/public/js/status.js index 6aac08e77..1749b22a6 100644 --- a/public/js/status.js +++ b/public/js/status.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[23],{"/w6d":function(t,e,i){"use strict";i("gnpF")},"2Jpm":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||"Video was not tagged with any alt text."},playOrPause:function(t){var e=t.target;1==e.getAttribute("playing")?(e.removeAttribute("playing"),e.pause()):(e.setAttribute("playing",1),e.play())},toggleContentWarning:function(t){this.$emit("togglecw")}}},n=(i("XWj2"),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",{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}})])])}),[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,"4b79c47a",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>>0,n=arguments[1],a=0;a 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=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;so.bottom){var r=a.bottom-o.bottom;this.tribute.menu.scrollTop+=r}else if(a.tops.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=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=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:rMath.ceil(a+i),bottom:c>Math.ceil(o+s),left:uparseInt(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.score0&&(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:$,D=i.requireLeadingSpace,N=void 0===D||D,j=i.allowSpaces,z=void 0!==j&&j,H=i.replaceTextSuffix,W=void 0===H?null:H,B=i.positionMenu,F=void 0===B||B,V=i.spaceSelectsMatch,q=void 0!==V&&V,K=i.searchOpts,Y=void 0===K?{}:K,G=i.menuItemLimit,X=void 0===G?null:G,J=i.menuShowMinLength,Q=void 0===J?0:J;if(t(this,e),this.autocompleteMode=y,this.menuSelected=0,this.current={},this.inputEvent=!1,this.isActive=!1,this.menuContainer=U,this.allowSpaces=z,this.replaceTextSuffix=W,this.positionMenu=F,this.hasTrailingSpace=!1,this.spaceSelectsMatch=q,this.autocompleteMode&&(_="",z=!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"
  • No Match Found!
  • "}.bind(l)),lookup:M,fillAttr:A,values:u,requireLeadingSpace:N,searchOpts:Y,menuItemLimit:X,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"
  • No Match Found!
  • "}.bind(l)}(O),lookup:t.lookup||M,fillAttr:t.fillAttr||A,values:t.values,requireLeadingSpace:t.requireLeadingSpace,searchOpts:t.searchOpts||Y,menuItemLimit:t.menuItemLimit||X,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",post:i.current.collection.searchOpts.post||"",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'+(this.current.collection.trigger+t.original[this.current.collection.fillAttr])+"":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);i0?((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;s0)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("/w6d"),i("Wk7D"),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,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:"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("\n\n\t\t\t\t\t\t\t\t\t\t"+t._s(1==t.ownerOrAdmin?t.status.liked_by.total_count+1:0)+"\n\t\t\t\t\t\t\t\t\t")])]),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 "+t.replyingToUsername+"":"","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,"55af22a1",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)+")")}))}},"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