From c2a51c91a648dcf08ad69c6f74c86d38578b533a Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 21 Apr 2020 23:01:04 -0600 Subject: [PATCH 1/9] Update AP Helper --- app/Util/ActivityPub/Helpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Util/ActivityPub/Helpers.php b/app/Util/ActivityPub/Helpers.php index ba3517314..b68b6fd84 100644 --- a/app/Util/ActivityPub/Helpers.php +++ b/app/Util/ActivityPub/Helpers.php @@ -416,7 +416,7 @@ class Helpers { if(!$profile) { $profile = new Profile(); $profile->domain = strtolower($domain); - $profile->username = strtolower(Purify::clean($remoteUsername)); + $profile->username = strtolower(Purify::clean($webfinger)); $profile->name = isset($res['name']) ? Purify::clean($res['name']) : 'user'; $profile->bio = isset($res['summary']) ? Purify::clean($res['summary']) : null; $profile->sharedInbox = isset($res['endpoints']) && isset($res['endpoints']['sharedInbox']) ? $res['endpoints']['sharedInbox'] : null; From 0f943f672cff59c2cdac980b6a83e1f6d3f6fb0e Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 21 Apr 2020 23:13:38 -0600 Subject: [PATCH 2/9] Update FixUsernames command, fixes remote username search --- app/Console/Commands/FixUsernames.php | 42 ++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/FixUsernames.php b/app/Console/Commands/FixUsernames.php index 5ba49a6a0..5269c8469 100644 --- a/app/Console/Commands/FixUsernames.php +++ b/app/Console/Commands/FixUsernames.php @@ -40,8 +40,14 @@ class FixUsernames extends Command */ public function handle() { + $this->line(' '); $this->info('Collecting data ...'); + $this->line(' '); + $this->restrictedCheck(); + } + protected function restrictedCheck() + { $affected = collect([]); $restricted = RestrictedNames::get(); @@ -61,6 +67,7 @@ class FixUsernames extends Command } } }); + if($affected->count() > 0) { $this->info('Found: ' . $affected->count() . ' affected usernames'); @@ -118,7 +125,40 @@ class FixUsernames extends Command $this->info('Fixed ' . $affected->count() . ' usernames!'); } else { - $this->info('No affected usernames found!'); + $this->info('No restricted usernames found!'); } + $this->line(' '); + $this->versionZeroTenNineFix(); + } + + protected function versionZeroTenNineFix() + { + $profiles = Profile::whereNotNull('domain') + ->whereNull('private_key') + ->where('username', 'not like', '@%@%') + ->get(); + + $count = $profiles->count(); + + if($count > 0) { + $this->info("Found {$count} remote usernames to fix ..."); + $this->line(' '); + } else { + $this->info('No remote fixes found!'); + $this->line(' '); + return; + } + foreach($profiles as $p) { + $this->info("Fixed $p->username => $p->webfinger"); + $p->username = $p->webfinger ?? "@{$p->username}@{$p->domain}"; + if(Profile::whereUsername($p->username)->exists()) { + return; + } + $p->save(); + } + if($count > 0) { + $this->line(' '); + } + } } From 0dde87444c7f3fec52ffef8b164da94f14a8e8f1 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 21 Apr 2020 23:15:10 -0600 Subject: [PATCH 3/9] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f723176b..a2c9079f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Updated RemoteProfile, fix missing content warnings ([e487527a](https://github.com/pixelfed/pixelfed/commit/e487527a)) - Updated RemotePost component, fix missing like button on comments ([7ef90565](https://github.com/pixelfed/pixelfed/commit/7ef90565)) - Updated PublicApiControllers, fix block/mutes filtering on public timeline ([08383dd4](https://github.com/pixelfed/pixelfed/commit/08383dd4)) +- Updated FixUsernames command, fixes remote username search ([0f943f67](https://github.com/pixelfed/pixelfed/commit/0f943f67)) ## [v0.10.9 (2020-04-17)](https://github.com/pixelfed/pixelfed/compare/v0.10.8...v0.10.9) From c796c331abff34acf7eeb6a724941bb685cfb0bc Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 21 Apr 2020 23:22:17 -0600 Subject: [PATCH 4/9] Update readme --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index c095a75c5..b736590a2 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@

Build Status - Latest Stable Version License

@@ -48,6 +47,4 @@ We would like to extend our thanks to the following sponsors for funding Pixelfe - [NLnet Foundation](https://nlnet.nl) and [NGI0 Discovery](https://nlnet.nl/discovery/), part of the [Next Generation -Internet](https://ngi.eu) initiative. -- [](https://oscillas.com/) -- Managed Pixelfed Hosting by [Spacebear](https://app.spacebear.ee/) +Internet](https://ngi.eu) initiative. \ No newline at end of file From 8fedfe54eb859941005313fbed46058836b7311a Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 21 Apr 2020 23:24:10 -0600 Subject: [PATCH 5/9] Update readme --- README.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/README.md b/README.md index b736590a2..7d06831ae 100644 --- a/README.md +++ b/README.md @@ -28,19 +28,9 @@ The ways you can communicate on the project are below. Before interacting, pleas read through the [Code Of Conduct](CODE_OF_CONDUCT.md). * IRC: [#pixelfed](irc://chat.freenode.net/pixelfed) on irc.freenode.net -* Matrix: [#pixelfed:matrix.org](https://matrix.to/#/#pixelfed:matrix.org) * Mastodon: [@pixelfed@mastodon.social](https://mastodon.social/@pixelfed) * E-mail: [hello@pixelfed.org](mailto:hello@pixelfed.org) -### Development - -For more development focused communication methods, please visit the following: - -* IRC: [#pixelfed-dev](irc://chat.freenode.net/pixelfed-dev) on irc.freenode.net -* Matrix: [#pixelfed-dev:matrix.org](https://matrix.to/#/#pixelfed-dev:matrix.org) -* Mastodon: [@pixeldev@mastodon.social](https://mastodon.social/@pixeldev) - - ## Pixelfed Sponsors We would like to extend our thanks to the following sponsors for funding Pixelfed development. If you are interested in becoming a sponsor, please visit the Pixelfed [Patreon Page](https://www.patreon.com/dansup/overview) From 9e533c7e87296e715a15625749b2a5b8a7ead081 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 21 Apr 2020 23:42:52 -0600 Subject: [PATCH 6/9] Update SearchController --- app/Http/Controllers/SearchController.php | 66 +++++++++-- .../assets/js/components/SearchResults.vue | 112 ++++++++++++++++++ 2 files changed, 167 insertions(+), 11 deletions(-) diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index be506ea4e..332b679fb 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -61,6 +61,10 @@ class SearchController extends Controller $this->webfingerSearch(); break; + case 'remote': + $this->remoteLookupSearch(); + break; + default: break; } @@ -179,24 +183,15 @@ class SearchController extends Controller 'following' => $item->followedBy(Auth::user()->profile), 'follow_request' => $item->hasFollowRequestById(Auth::user()->profile_id), 'thumb' => $item->avatarUrl(), - 'local' => (bool) !$item->domain + 'local' => (bool) !$item->domain, + 'post_count' => $item->statuses()->count() ] ]]; return $tokens; }); } } - // elseif( Str::containsAll($tag, ['@', '.']) - // config('federation.activitypub.enabled') == true && - // config('federation.activitypub.remoteFollow') == true - // ) { - // if(substr_count($tag, '@') == 2) { - // $domain = last(explode('@', sub_str($u, 1))); - // } else { - // $domain = last(explode('@', $u)); - // } - // } else { $this->tokens['profiles'] = Cache::remember($key, $ttl, function() use($tag) { $users = Profile::select('domain', 'username', 'name', 'id') @@ -268,4 +263,53 @@ class SearchController extends Controller ]; return; } + + protected function remotePostLookup() + { + $tag = $this->term; + $hash = hash('sha256', $tag); + $local = Helpers::validateLocalUrl($tag); + $valid = Helpers::validateUrl($tag); + + if($valid == false || $local == true) { + return; + } + + if(Status::whereUri($tag)->whereLocal(false)->exists()) { + $item = Status::whereUri($tag)->first(); + $this->tokens['posts'] = [[ + 'count' => 0, + 'url' => "/i/web/post/_/$item->profile_id/$item->id", + 'type' => 'status', + 'username' => $item->profile->username, + 'caption' => $item->rendered ?? $item->caption, + 'thumb' => $item->firstMedia()->remote_url, + 'timestamp' => $item->created_at->diffForHumans() + ]]; + } + + $remote = Helpers::fetchFromUrl($tag); + + if(isset($remote['type']) && $remote['type'] == 'Note') { + $item = Helpers::statusFetch($tag); + $this->tokens['posts'] = [[ + 'count' => 0, + 'url' => "/i/web/post/_/$item->profile_id/$item->id", + 'type' => 'status', + 'username' => $item->profile->username, + 'caption' => $item->rendered ?? $item->caption, + 'thumb' => $item->firstMedia()->remote_url, + 'timestamp' => $item->created_at->diffForHumans() + ]]; + } + } + + protected function remoteLookupSearch() + { + if(!Helpers::validateUrl($this->term)) { + return; + } + $this->getProfiles(); + $this->remotePostLookup(); + } } \ No newline at end of file diff --git a/resources/assets/js/components/SearchResults.vue b/resources/assets/js/components/SearchResults.vue index 9922ef131..347e324b9 100644 --- a/resources/assets/js/components/SearchResults.vue +++ b/resources/assets/js/components/SearchResults.vue @@ -175,6 +175,82 @@ + +
+
+

Showing results for {{query}}

+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + +
+

{{status.username}}

+
+
+

{{status.timestamp}}

+
+
+
+

+ + +
+ +
+
+
+
No results found
+
+
+

No results found

@@ -232,6 +308,14 @@ export default { }, fetchSearchResults() { + if(this.analysis == 'remote') { + let term = this.query; + let parsed = new URL(term); + if(parsed.host === window.location.host) { + window.location.href = term; + return; + } + } this.searchContext(this.analysis); }, @@ -320,6 +404,34 @@ export default { }); break; + case 'remote': + axios.get('/api/search', { + params: { + 'q': this.query, + 'src': 'metro', + 'v': 1, + 'scope': 'remote' + } + }).then(res => { + let results = res.data; + this.results.hashtags = results.hashtags ? results.hashtags : []; + this.results.profiles = results.profiles ? results.profiles : []; + this.results.statuses = results.posts ? results.posts : []; + + if(this.results.profiles.length) { + this.analysis = 'profile'; + } + if(this.results.statuses.length) { + this.analysis = 'remotePost'; + } + this.loading = false; + }).catch(err => { + this.loading = false; + console.log(err); + this.networkError = true; + }); + break; + case 'hashtag': axios.get('/api/search', { params: { From 276638e933cf4172dc10fa5e72f0714e79067f2f Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 21 Apr 2020 23:46:46 -0600 Subject: [PATCH 7/9] Update compiled assets --- public/js/search.js | 2 +- public/mix-manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/search.js b/public/js/search.js index acfbfdd18..c33c153e2 100644 --- a/public/js/search.js +++ b/public/js/search.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{"51wX":function(t,e,s){var r=s("zZx1");"string"==typeof r&&(r=[[t.i,r,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};s("aET+")(r,a);r.locals&&(t.exports=r.locals)},9:function(t,e,s){t.exports=s("EnJJ")},"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,r=s+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var a,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:(a=0===n.indexOf("//")?n:0===n.indexOf("/")?s+n:r+n.replace(/^\.\//,""),"url("+JSON.stringify(a)+")")}))}},EnJJ:function(t,e,s){Vue.component("search-results",s("IpYn").default)},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]||"",r=t[3];if(!r)return s;if(e&&"function"==typeof btoa){var a=(i=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),n=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[s].concat(n).concat([a]).join("\n")}var i;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 r={},a=0;a0&&void 0!==arguments[0]?arguments[0]:"hashtag",e=arguments.length>1?arguments[1]:void 0;switch(t){case"hashtag":return e.url+"?src=search";case"profile":return 1==e.entity.local?e.url:"/i/web/profile/_/"+e.entity.id;default:return e.url+"?src=search"}},searchContext:function(t){var e=this;switch(t){case"all":axios.get("/api/search",{params:{q:this.query,src:"metro",v:1,scope:"all"}}).then((function(t){var s=t.data;e.results.hashtags=s.hashtags?s.hashtags:[],e.results.profiles=s.profiles?s.profiles:[],e.results.statuses=s.posts?s.posts:[],e.loading=!1})).catch((function(t){e.loading=!1,console.log(t),e.networkError=!0}));break;case"hashtag":axios.get("/api/search",{params:{q:this.query.slice(1),src:"metro",v:1,scope:"hashtag"}}).then((function(t){var s=t.data;e.results.hashtags=s.hashtags?s.hashtags:[],e.results.profiles=s.profiles?s.profiles:[],e.results.statuses=s.posts?s.posts:[],e.loading=!1})).catch((function(t){e.loading=!1,console.log(t),e.networkError=!0}));break;case"profile":axios.get("/api/search",{params:{q:this.query,src:"metro",v:1,scope:"profile"}}).then((function(t){var s=t.data;e.results.hashtags=s.hashtags?s.hashtags:[],e.results.profiles=s.profiles?s.profiles:[],e.results.statuses=s.posts?s.posts:[],e.loading=!1})).catch((function(t){e.loading=!1,console.log(t),e.networkError=!0}));break;case"webfinger":axios.get("/api/search",{params:{q:this.query,src:"metro",v:1,scope:"webfinger"}}).then((function(t){var s=t.data;e.results.hashtags=[],e.results.profiles=s.profiles,e.results.statuses=[],e.loading=!1})).catch((function(t){e.loading=!1,console.log(t),e.networkError=!0}));break;default:this.loading=!1,this.networkError=!0}}}},a=(s("j3Fg"),s("KHd+")),n=Object(a.a)(r,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"container"},[t.loading?s("div",{staticClass:"pt-5 text-center"},[t._m(0)]):t._e(),t._v(" "),t.networkError?s("div",{staticClass:"pt-5 text-center"},[t._m(1)]):t._e(),t._v(" "),t.loading||t.networkError?t._e():s("div",{staticClass:"mt-5"},["all"==t.analysis?s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 mb-5"},[s("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),s("i",[t._v(t._s(t.query))])]),t._v(" "),s("hr")]),t._v(" "),s("div",{staticClass:"col-md-3"},[s("div",{staticClass:"mb-4"},[s("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("HASHTAGS "),s("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.hashtags.length)+")")])])]),t._v(" "),t.results.hashtags.length?s("div",t._l(t.results.hashtags,(function(e,r){return s("a",{staticClass:"mb-2 result-card",attrs:{href:t.buildUrl("hashtag",e)}},[s("div",{staticClass:"pb-3"},[s("div",{staticClass:"media align-items-center py-2 pr-3"},[t._m(2,!0),t._v(" "),s("div",{staticClass:"media-body text-truncate"},[s("p",{staticClass:"mb-0 text-truncate text-dark font-weight-bold",attrs:{"data-toggle":"tooltip",title:e.value}},[t._v("\n\t\t\t\t\t\t\t\t\t\t#"+t._s(e.value)+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),e.count>2?s("p",{staticClass:"mb-0 small font-weight-bold text-muted text-uppercase"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(e.count)+" posts\n\t\t\t\t\t\t\t\t")]):t._e()])])])])})),0):s("div",[s("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])]),t._v(" "),s("div",{staticClass:"col-md-5"},[s("div",{staticClass:"mb-4"},[s("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("PROFILES "),s("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.profiles.length)+")")])])]),t._v(" "),t.results.profiles.length?s("div",t._l(t.results.profiles,(function(e,r){return s("a",{staticClass:"mb-2 result-card",attrs:{href:t.buildUrl("profile",e)}},[s("div",{staticClass:"pb-3"},[s("div",{staticClass:"media align-items-center py-2 pr-3"},[s("img",{staticClass:"mr-3 rounded-circle border",attrs:{src:e.avatar,width:"50px",height:"50px"}}),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0 text-truncate text-dark font-weight-bold",attrs:{"data-toggle":"tooltip",title:e.value}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.value)+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),s("p",{staticClass:"mb-0 small font-weight-bold text-muted text-uppercase"},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.entity.post_count)+" Posts\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s("div",{staticClass:"ml-3"},[e.entity.following?s("a",{staticClass:"btn btn-primary btn-sm font-weight-bold text-uppercase py-0",attrs:{href:t.buildUrl("profile",e)}},[t._v("Following")]):s("a",{staticClass:"btn btn-outline-primary btn-sm font-weight-bold text-uppercase py-0",attrs:{href:t.buildUrl("profile",e)}},[t._v("View")])])])])])})),0):s("div",[s("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])]),t._v(" "),s("div",{staticClass:"col-md-4"},[s("div",{staticClass:"mb-4"},[s("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("STATUSES "),s("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.statuses.length)+")")])])]),t._v(" "),t.results.statuses.length?s("div",t._l(t.results.statuses,(function(e,r){return s("a",{staticClass:"mr-2 result-card",attrs:{href:t.buildUrl("status",e)}},[s("img",{staticClass:"mb-2",attrs:{src:e.thumb,width:"90px",height:"90px"}})])})),0):s("div",[s("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])])]):"hashtag"==t.analysis?s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 mb-5"},[s("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),s("i",[t._v(t._s(t.query))])]),t._v(" "),s("hr")]),t._v(" "),s("div",{staticClass:"col-md-6 offset-md-3"},[s("div",{staticClass:"mb-4"},[s("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("HASHTAGS "),s("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.hashtags.length)+")")])])]),t._v(" "),t.results.hashtags.length?s("div",t._l(t.results.hashtags,(function(e,r){return s("a",{staticClass:"mb-2 result-card",attrs:{href:t.buildUrl("hashtag",e)}},[s("div",{staticClass:"pb-3"},[s("div",{staticClass:"media align-items-center py-2 pr-3"},[t._m(3,!0),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0 text-truncate text-dark font-weight-bold",attrs:{"data-toggle":"tooltip",title:e.value}},[t._v("\n\t\t\t\t\t\t\t\t\t\t#"+t._s(e.value)+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),e.count>2?s("p",{staticClass:"mb-0 small font-weight-bold text-muted text-uppercase"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(e.count)+" posts\n\t\t\t\t\t\t\t\t")]):t._e()])])])])})),0):s("div",[s("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])])]):"profile"==t.analysis?s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 mb-5"},[s("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),s("i",[t._v(t._s(t.query))])]),t._v(" "),s("hr")]),t._v(" "),s("div",{staticClass:"col-md-6 offset-md-3"},[s("div",{staticClass:"mb-4"},[s("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("PROFILES "),s("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.profiles.length)+")")])])]),t._v(" "),t.results.profiles.length?s("div",t._l(t.results.profiles,(function(e,r){return s("div",{staticClass:"card mb-4"},[t._m(4,!0),t._v(" "),s("div",{staticClass:"card-body"},[s("div",{staticClass:"text-center mt-n5 mb-4"},[s("img",{staticClass:"rounded-circle p-1 border mt-n4 bg-white shadow",attrs:{src:e.entity.thumb,width:"90px",height:"90px;",onerror:"this.onerror=null;this.src='/storage/avatars/default.png';"}})]),t._v(" "),s("p",{staticClass:"text-center lead font-weight-bold mb-1"},[t._v(t._s(e.value))]),t._v(" "),s("p",{staticClass:"text-center text-muted small text-uppercase mb-4"}),t._v(" "),s("div",{staticClass:"d-flex justify-content-center"},[e.entity.following?s("button",{staticClass:"btn btn-outline-secondary btn-sm py-1 px-4 text-uppercase font-weight-bold mr-3",staticStyle:{"font-weight":"500"},attrs:{type:"button"}},[t._v("Following")]):t._e(),t._v(" "),s("a",{staticClass:"btn btn-primary btn-sm py-1 px-4 text-uppercase font-weight-bold",staticStyle:{"font-weight":"500"},attrs:{href:t.buildUrl("profile",e)}},[t._v("View Profile")])])])])})),0):s("div",[s("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])])]):"webfinger"==t.analysis?s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 mb-5"},[s("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),s("i",[t._v(t._s(t.query))])]),t._v(" "),s("hr"),t._v(" "),s("div",{staticClass:"col-md-6 offset-md-3"},t._l(t.results.profiles,(function(e,r){return s("div",{staticClass:"card mb-2"},[t._m(5,!0),t._v(" "),s("div",{staticClass:"card-body"},[s("div",{staticClass:"text-center mt-n5 mb-4"},[s("img",{staticClass:"rounded-circle p-1 border mt-n4 bg-white shadow",attrs:{src:e.entity.thumb,width:"90px",height:"90px;",onerror:"this.onerror=null;this.src='/storage/avatars/default.png';"}})]),t._v(" "),s("p",{staticClass:"text-center lead font-weight-bold mb-1"},[t._v(t._s(e.value))]),t._v(" "),s("p",{staticClass:"text-center text-muted small text-uppercase mb-4"}),t._v(" "),s("div",{staticClass:"d-flex justify-content-center"},[s("a",{staticClass:"btn btn-primary btn-sm py-1 px-4 text-uppercase font-weight-bold",staticStyle:{"font-weight":"500"},attrs:{href:"/i/web/profile/_/"+e.entity.id}},[t._v("View Profile")])])])])})),0)])]):s("div",{staticClass:"col-12"},[s("p",{staticClass:"text-center text-muted lead font-weight-bold"},[t._v("No results found")])])])])}),[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("p",{staticClass:"lead font-weight-lighter"},[this._v("An error occured, results could not be loaded."),e("br"),this._v(" Please try again later.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"d-inline-flex align-items-center justify-content-center border rounded-circle mr-3",staticStyle:{width:"50px",height:"50px"}},[e("i",{staticClass:"fas fa-hashtag text-muted"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"d-inline-flex align-items-center justify-content-center border rounded-circle mr-3",staticStyle:{width:"50px",height:"50px"}},[e("i",{staticClass:"fas fa-hashtag text-muted"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-header p-0 m-0"},[e("div",{staticStyle:{width:"100%",height:"140px",background:"#0070b7"}})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-header p-0 m-0"},[e("div",{staticStyle:{width:"100%",height:"140px",background:"#0070b7"}})])}],!1,null,"1e60658e",null);e.default=n.exports},"KHd+":function(t,e,s){"use strict";function r(t,e,s,r,a,n,i,o){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=s,c._compiled=!0),r&&(c.functional=!0),n&&(c._scopeId="data-v-"+n),i?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},c._ssrRegister=l):a&&(l=o?function(){a.call(this,this.$root.$options.shadowRoot)}:a),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(t,e){return l.call(e),u(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:c}}s.d(e,"a",(function(){return r}))},"aET+":function(t,e,s){var r,a,n={},i=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===a&&(a=r.apply(this,arguments)),a}),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 r=o.call(this,t,s);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}}(),c=null,u=0,d=[],f=s("9tPo");function h(t,e){for(var s=0;s=0&&d.splice(e,1)}function b(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return s.nc}();r&&(t.attrs.nonce=r)}return m(e,t.attrs),v(t,e),e}function m(t,e){Object.keys(e).forEach((function(s){t.setAttribute(s,e[s])}))}function _(t,e){var s,r,a,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 i=u++;s=c||(c=b(e)),r=w.bind(null,s,i,!1),a=w.bind(null,s,i,!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",m(e,t.attrs),v(t,e),e}(e),r=S.bind(null,s,e),a=function(){g(s),s.href&&URL.revokeObjectURL(s.href)}):(s=b(e),r=x.bind(null,s),a=function(){g(s)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else a()}}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=i()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var s=p(t,e);return h(s,e),function(t){for(var r=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:"hashtag",s=arguments.length>1?arguments[1]:void 0;switch(t){case"hashtag":return s.url+"?src=search";case"profile":return 1==s.entity.local?s.url:"/i/web/profile/_/"+s.entity.id;default:return s.url+"?src=search"}},searchContext:function(t){var s=this;switch(t){case"all":axios.get("/api/search",{params:{q:this.query,src:"metro",v:1,scope:"all"}}).then((function(t){var e=t.data;s.results.hashtags=e.hashtags?e.hashtags:[],s.results.profiles=e.profiles?e.profiles:[],s.results.statuses=e.posts?e.posts:[],s.loading=!1})).catch((function(t){s.loading=!1,console.log(t),s.networkError=!0}));break;case"remote":axios.get("/api/search",{params:{q:this.query,src:"metro",v:1,scope:"remote"}}).then((function(t){var e=t.data;s.results.hashtags=e.hashtags?e.hashtags:[],s.results.profiles=e.profiles?e.profiles:[],s.results.statuses=e.posts?e.posts:[],s.results.profiles.length&&(s.analysis="profile"),s.results.statuses.length&&(s.analysis="remotePost"),s.loading=!1})).catch((function(t){s.loading=!1,console.log(t),s.networkError=!0}));break;case"hashtag":axios.get("/api/search",{params:{q:this.query.slice(1),src:"metro",v:1,scope:"hashtag"}}).then((function(t){var e=t.data;s.results.hashtags=e.hashtags?e.hashtags:[],s.results.profiles=e.profiles?e.profiles:[],s.results.statuses=e.posts?e.posts:[],s.loading=!1})).catch((function(t){s.loading=!1,console.log(t),s.networkError=!0}));break;case"profile":axios.get("/api/search",{params:{q:this.query,src:"metro",v:1,scope:"profile"}}).then((function(t){var e=t.data;s.results.hashtags=e.hashtags?e.hashtags:[],s.results.profiles=e.profiles?e.profiles:[],s.results.statuses=e.posts?e.posts:[],s.loading=!1})).catch((function(t){s.loading=!1,console.log(t),s.networkError=!0}));break;case"webfinger":axios.get("/api/search",{params:{q:this.query,src:"metro",v:1,scope:"webfinger"}}).then((function(t){var e=t.data;s.results.hashtags=[],s.results.profiles=e.profiles,s.results.statuses=[],s.loading=!1})).catch((function(t){s.loading=!1,console.log(t),s.networkError=!0}));break;default:this.loading=!1,this.networkError=!0}}}},a=(e("lPk3"),e("KHd+")),i=Object(a.a)(r,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"container"},[t.loading?e("div",{staticClass:"pt-5 text-center"},[t._m(0)]):t._e(),t._v(" "),t.networkError?e("div",{staticClass:"pt-5 text-center"},[t._m(1)]):t._e(),t._v(" "),t.loading||t.networkError?t._e():e("div",{staticClass:"mt-5"},["all"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr")]),t._v(" "),e("div",{staticClass:"col-md-3"},[e("div",{staticClass:"mb-4"},[e("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("HASHTAGS "),e("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.hashtags.length)+")")])])]),t._v(" "),t.results.hashtags.length?e("div",t._l(t.results.hashtags,(function(s,r){return e("a",{staticClass:"mb-2 result-card",attrs:{href:t.buildUrl("hashtag",s)}},[e("div",{staticClass:"pb-3"},[e("div",{staticClass:"media align-items-center py-2 pr-3"},[t._m(2,!0),t._v(" "),e("div",{staticClass:"media-body text-truncate"},[e("p",{staticClass:"mb-0 text-truncate text-dark font-weight-bold",attrs:{"data-toggle":"tooltip",title:s.value}},[t._v("\n\t\t\t\t\t\t\t\t\t\t#"+t._s(s.value)+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),s.count>2?e("p",{staticClass:"mb-0 small font-weight-bold text-muted text-uppercase"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(s.count)+" posts\n\t\t\t\t\t\t\t\t")]):t._e()])])])])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])]),t._v(" "),e("div",{staticClass:"col-md-5"},[e("div",{staticClass:"mb-4"},[e("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("PROFILES "),e("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.profiles.length)+")")])])]),t._v(" "),t.results.profiles.length?e("div",t._l(t.results.profiles,(function(s,r){return e("a",{staticClass:"mb-2 result-card",attrs:{href:t.buildUrl("profile",s)}},[e("div",{staticClass:"pb-3"},[e("div",{staticClass:"media align-items-center py-2 pr-3"},[e("img",{staticClass:"mr-3 rounded-circle border",attrs:{src:s.avatar,width:"50px",height:"50px"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0 text-truncate text-dark font-weight-bold",attrs:{"data-toggle":"tooltip",title:s.value}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(s.value)+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),e("p",{staticClass:"mb-0 small font-weight-bold text-muted text-uppercase"},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(s.entity.post_count)+" Posts\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),e("div",{staticClass:"ml-3"},[s.entity.following?e("a",{staticClass:"btn btn-primary btn-sm font-weight-bold text-uppercase py-0",attrs:{href:t.buildUrl("profile",s)}},[t._v("Following")]):e("a",{staticClass:"btn btn-outline-primary btn-sm font-weight-bold text-uppercase py-0",attrs:{href:t.buildUrl("profile",s)}},[t._v("View")])])])])])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])]),t._v(" "),e("div",{staticClass:"col-md-4"},[e("div",{staticClass:"mb-4"},[e("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("STATUSES "),e("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.statuses.length)+")")])])]),t._v(" "),t.results.statuses.length?e("div",t._l(t.results.statuses,(function(s,r){return e("a",{staticClass:"mr-2 result-card",attrs:{href:t.buildUrl("status",s)}},[e("img",{staticClass:"mb-2",attrs:{src:s.thumb,width:"90px",height:"90px"}})])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])])]):"hashtag"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr")]),t._v(" "),e("div",{staticClass:"col-md-6 offset-md-3"},[e("div",{staticClass:"mb-4"},[e("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("HASHTAGS "),e("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.hashtags.length)+")")])])]),t._v(" "),t.results.hashtags.length?e("div",t._l(t.results.hashtags,(function(s,r){return e("a",{staticClass:"mb-2 result-card",attrs:{href:t.buildUrl("hashtag",s)}},[e("div",{staticClass:"pb-3"},[e("div",{staticClass:"media align-items-center py-2 pr-3"},[t._m(3,!0),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0 text-truncate text-dark font-weight-bold",attrs:{"data-toggle":"tooltip",title:s.value}},[t._v("\n\t\t\t\t\t\t\t\t\t\t#"+t._s(s.value)+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),s.count>2?e("p",{staticClass:"mb-0 small font-weight-bold text-muted text-uppercase"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(s.count)+" posts\n\t\t\t\t\t\t\t\t")]):t._e()])])])])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])])]):"profile"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr")]),t._v(" "),e("div",{staticClass:"col-md-6 offset-md-3"},[e("div",{staticClass:"mb-4"},[e("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("PROFILES "),e("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.profiles.length)+")")])])]),t._v(" "),t.results.profiles.length?e("div",t._l(t.results.profiles,(function(s,r){return e("div",{staticClass:"card mb-4"},[t._m(4,!0),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"text-center mt-n5 mb-4"},[e("img",{staticClass:"rounded-circle p-1 border mt-n4 bg-white shadow",attrs:{src:s.entity.thumb,width:"90px",height:"90px;",onerror:"this.onerror=null;this.src='/storage/avatars/default.png';"}})]),t._v(" "),e("p",{staticClass:"text-center lead font-weight-bold mb-1"},[t._v(t._s(s.value))]),t._v(" "),e("p",{staticClass:"text-center text-muted small text-uppercase mb-4"}),t._v(" "),e("div",{staticClass:"d-flex justify-content-center"},[s.entity.following?e("button",{staticClass:"btn btn-outline-secondary btn-sm py-1 px-4 text-uppercase font-weight-bold mr-3",staticStyle:{"font-weight":"500"},attrs:{type:"button"}},[t._v("Following")]):t._e(),t._v(" "),e("a",{staticClass:"btn btn-primary btn-sm py-1 px-4 text-uppercase font-weight-bold",staticStyle:{"font-weight":"500"},attrs:{href:t.buildUrl("profile",s)}},[t._v("View Profile")])])])])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])])]):"webfinger"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr"),t._v(" "),e("div",{staticClass:"col-md-6 offset-md-3"},t._l(t.results.profiles,(function(s,r){return e("div",{staticClass:"card mb-2"},[t._m(5,!0),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"text-center mt-n5 mb-4"},[e("img",{staticClass:"rounded-circle p-1 border mt-n4 bg-white shadow",attrs:{src:s.entity.thumb,width:"90px",height:"90px;",onerror:"this.onerror=null;this.src='/storage/avatars/default.png';"}})]),t._v(" "),e("p",{staticClass:"text-center lead font-weight-bold mb-1"},[t._v(t._s(s.value))]),t._v(" "),e("p",{staticClass:"text-center text-muted small text-uppercase mb-4"}),t._v(" "),e("div",{staticClass:"d-flex justify-content-center"},[e("a",{staticClass:"btn btn-primary btn-sm py-1 px-4 text-uppercase font-weight-bold",staticStyle:{"font-weight":"500"},attrs:{href:"/i/web/profile/_/"+s.entity.id}},[t._v("View Profile")])])])])})),0)])]):"remote"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr")]),t._v(" "),t.results.profiles.length?e("div",{staticClass:"col-md-6 offset-3"},t._l(t.results.profiles,(function(s,r){return e("a",{staticClass:"mb-2 result-card",attrs:{href:t.buildUrl("profile",s)}},[e("div",{staticClass:"pb-3"},[e("div",{staticClass:"media align-items-center py-2 pr-3"},[e("img",{staticClass:"mr-3 rounded-circle border",attrs:{src:s.entity.thumb,width:"50px",height:"50px",onerror:"this.onerror=null;this.src='/storage/avatars/default.png';"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0 text-truncate text-dark font-weight-bold",attrs:{"data-toggle":"tooltip",title:s.value}},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(s.value)+"\n\t\t\t\t\t\t\t\t")]),t._v(" "),e("p",{staticClass:"mb-0 small font-weight-bold text-muted text-uppercase"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(s.entity.post_count)+" Posts\n\t\t\t\t\t\t\t\t")])]),t._v(" "),e("div",{staticClass:"ml-3"},[s.entity.following?e("a",{staticClass:"btn btn-primary btn-sm font-weight-bold text-uppercase py-0",attrs:{href:t.buildUrl("profile",s)}},[t._v("Following")]):e("a",{staticClass:"btn btn-outline-primary btn-sm font-weight-bold text-uppercase py-0",attrs:{href:t.buildUrl("profile",s)}},[t._v("View")])])])])])})),0):t._e(),t._v(" "),t.results.statuses.length?e("div",{staticClass:"col-md-6 offset-3"},t._l(t.results.statuses,(function(s,r){return e("a",{staticClass:"mr-2 result-card",attrs:{href:t.buildUrl("status",s)}},[e("img",{staticClass:"mb-2",attrs:{src:s.thumb,width:"90px",height:"90px",onerror:"this.onerror=null;this.src='/storage/no-preview.png';"}})])})),0):t._e()]):"remotePost"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr")]),t._v(" "),e("div",{staticClass:"col-md-6 offset-md-3"},[t.results.statuses.length?e("div",t._l(t.results.statuses,(function(s,r){return e("div",{staticClass:"card mb-4 shadow-none border"},[e("div",{staticClass:"card-header p-0 m-0"},[e("div",{staticStyle:{width:"100%",height:"200px",background:"#fff"}},[e("div",{staticClass:"pt-4 text-center"},[e("img",{staticClass:"img-fluid border",staticStyle:{"max-height":"140px"},attrs:{src:s.thumb}})])])]),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"mt-n4 mb-2"},[e("div",{staticClass:"media"},[e("img",{staticClass:"rounded-circle p-1 mr-2 border mt-n3 bg-white shadow",attrs:{src:"/storage/avatars/default.png",width:"70px",height:"70px;",onerror:"this.onerror=null;this.src='/storage/avatars/default.png';"}}),t._v(" "),e("div",{staticClass:"media-body pt-3"},[e("p",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(s.username))])]),t._v(" "),e("div",{staticClass:"float-right pt-3"},[e("p",{staticClass:"small mb-0 text-muted"},[t._v(t._s(s.timestamp))])])])]),t._v(" "),e("p",{staticClass:"text-center mb-3 lead",domProps:{innerHTML:t._s(s.caption)}})]),t._v(" "),e("div",{staticClass:"card-footer"},[e("a",{staticClass:"btn btn-primary btn-block font-weight-bold rounded-0",attrs:{href:s.url}},[t._v("View Post")])])])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])])]):e("div",{staticClass:"col-12"},[e("p",{staticClass:"text-center text-muted lead font-weight-bold"},[t._v("No results found")])])])])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"spinner-border",attrs:{role:"status"}},[s("span",{staticClass:"sr-only"},[this._v("Loading…")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("p",{staticClass:"lead font-weight-lighter"},[this._v("An error occured, results could not be loaded."),s("br"),this._v(" Please try again later.")])},function(){var t=this.$createElement,s=this._self._c||t;return s("span",{staticClass:"d-inline-flex align-items-center justify-content-center border rounded-circle mr-3",staticStyle:{width:"50px",height:"50px"}},[s("i",{staticClass:"fas fa-hashtag text-muted"})])},function(){var t=this.$createElement,s=this._self._c||t;return s("span",{staticClass:"d-inline-flex align-items-center justify-content-center border rounded-circle mr-3",staticStyle:{width:"50px",height:"50px"}},[s("i",{staticClass:"fas fa-hashtag text-muted"})])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"card-header p-0 m-0"},[s("div",{staticStyle:{width:"100%",height:"140px",background:"#0070b7"}})])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"card-header p-0 m-0"},[s("div",{staticStyle:{width:"100%",height:"140px",background:"#0070b7"}})])}],!1,null,"6001172e",null);s.default=i.exports},"KHd+":function(t,s,e){"use strict";function r(t,s,e,r,a,i,n,o){var l,c="function"==typeof t?t.options:t;if(s&&(c.render=s,c.staticRenderFns=e,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),n?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(n)},c._ssrRegister=l):a&&(l=o?function(){a.call(this,this.$root.$options.shadowRoot)}:a),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(t,s){return l.call(s),d(t,s)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:c}}e.d(s,"a",(function(){return r}))},"aET+":function(t,s,e){var r,a,i={},n=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===a&&(a=r.apply(this,arguments)),a}),o=function(t,s){return s?s.querySelector(t):document.querySelector(t)},l=function(t){var s={};return function(t,e){if("function"==typeof t)return t();if(void 0===s[t]){var r=o.call(this,t,e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}s[t]=r}return s[t]}}(),c=null,d=0,u=[],h=e("9tPo");function f(t,s){for(var e=0;e=0&&u.splice(s,1)}function m(t){var s=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return e.nc}();r&&(t.attrs.nonce=r)}return b(s,t.attrs),v(t,s),s}function b(t,s){Object.keys(s).forEach((function(e){t.setAttribute(e,s[e])}))}function _(t,s){var e,r,a,i;if(s.transform&&t.css){if(!(i="function"==typeof s.transform?s.transform(t.css):s.transform.default(t.css)))return function(){};t.css=i}if(s.singleton){var n=d++;e=c||(c=m(s)),r=y.bind(null,e,n,!1),a=y.bind(null,e,n,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=function(t){var s=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(s,t.attrs),v(t,s),s}(s),r=S.bind(null,e,s),a=function(){g(e),e.href&&URL.revokeObjectURL(e.href)}):(e=m(s),r=x.bind(null,e),a=function(){g(e)});return r(t),function(s){if(s){if(s.css===t.css&&s.media===t.media&&s.sourceMap===t.sourceMap)return;r(t=s)}else a()}}t.exports=function(t,s){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(s=s||{}).attrs="object"==typeof s.attrs?s.attrs:{},s.singleton||"boolean"==typeof s.singleton||(s.singleton=n()),s.insertInto||(s.insertInto="head"),s.insertAt||(s.insertAt="bottom");var e=p(t,s);return f(e,s),function(t){for(var r=[],a=0;a Date: Tue, 21 Apr 2020 23:58:22 -0600 Subject: [PATCH 8/9] Update SearchResults, fix remote post bug --- resources/assets/js/components/SearchResults.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/assets/js/components/SearchResults.vue b/resources/assets/js/components/SearchResults.vue index 347e324b9..12d11b2c0 100644 --- a/resources/assets/js/components/SearchResults.vue +++ b/resources/assets/js/components/SearchResults.vue @@ -350,7 +350,7 @@ export default { return 'webfinger'; } - if(q.startsWith('@') || q.search('@') != -1) { + if(q.startsWith('@')) { return 'profile'; } From 30284f5ff0066018ee306f4d5e4d17d1b3e12345 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Tue, 21 Apr 2020 23:58:48 -0600 Subject: [PATCH 9/9] Update compiled assets --- public/js/search.js | 2 +- public/mix-manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/search.js b/public/js/search.js index c33c153e2..b4361fe3f 100644 --- a/public/js/search.js +++ b/public/js/search.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{9:function(t,s,e){t.exports=e("EnJJ")},"9tPo":function(t,s){t.exports=function(t){var s="undefined"!=typeof window&&window.location;if(!s)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var e=s.protocol+"//"+s.host,r=e+s.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,s){var a,i=s.trim().replace(/^"(.*)"$/,(function(t,s){return s})).replace(/^'(.*)'$/,(function(t,s){return s}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?t:(a=0===i.indexOf("//")?i:0===i.indexOf("/")?e+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(a)+")")}))}},EnJJ:function(t,s,e){Vue.component("search-results",e("IpYn").default)},I1BE:function(t,s){t.exports=function(t){var s=[];return s.toString=function(){return this.map((function(s){var e=function(t,s){var e=t[1]||"",r=t[3];if(!r)return e;if(s&&"function"==typeof btoa){var a=(n=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),i=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[e].concat(i).concat([a]).join("\n")}var n;return[e].join("\n")}(s,t);return s[2]?"@media "+s[2]+"{"+e+"}":e})).join("")},s.i=function(t,e){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},a=0;a0&&void 0!==arguments[0]?arguments[0]:"hashtag",s=arguments.length>1?arguments[1]:void 0;switch(t){case"hashtag":return s.url+"?src=search";case"profile":return 1==s.entity.local?s.url:"/i/web/profile/_/"+s.entity.id;default:return s.url+"?src=search"}},searchContext:function(t){var s=this;switch(t){case"all":axios.get("/api/search",{params:{q:this.query,src:"metro",v:1,scope:"all"}}).then((function(t){var e=t.data;s.results.hashtags=e.hashtags?e.hashtags:[],s.results.profiles=e.profiles?e.profiles:[],s.results.statuses=e.posts?e.posts:[],s.loading=!1})).catch((function(t){s.loading=!1,console.log(t),s.networkError=!0}));break;case"remote":axios.get("/api/search",{params:{q:this.query,src:"metro",v:1,scope:"remote"}}).then((function(t){var e=t.data;s.results.hashtags=e.hashtags?e.hashtags:[],s.results.profiles=e.profiles?e.profiles:[],s.results.statuses=e.posts?e.posts:[],s.results.profiles.length&&(s.analysis="profile"),s.results.statuses.length&&(s.analysis="remotePost"),s.loading=!1})).catch((function(t){s.loading=!1,console.log(t),s.networkError=!0}));break;case"hashtag":axios.get("/api/search",{params:{q:this.query.slice(1),src:"metro",v:1,scope:"hashtag"}}).then((function(t){var e=t.data;s.results.hashtags=e.hashtags?e.hashtags:[],s.results.profiles=e.profiles?e.profiles:[],s.results.statuses=e.posts?e.posts:[],s.loading=!1})).catch((function(t){s.loading=!1,console.log(t),s.networkError=!0}));break;case"profile":axios.get("/api/search",{params:{q:this.query,src:"metro",v:1,scope:"profile"}}).then((function(t){var e=t.data;s.results.hashtags=e.hashtags?e.hashtags:[],s.results.profiles=e.profiles?e.profiles:[],s.results.statuses=e.posts?e.posts:[],s.loading=!1})).catch((function(t){s.loading=!1,console.log(t),s.networkError=!0}));break;case"webfinger":axios.get("/api/search",{params:{q:this.query,src:"metro",v:1,scope:"webfinger"}}).then((function(t){var e=t.data;s.results.hashtags=[],s.results.profiles=e.profiles,s.results.statuses=[],s.loading=!1})).catch((function(t){s.loading=!1,console.log(t),s.networkError=!0}));break;default:this.loading=!1,this.networkError=!0}}}},a=(e("lPk3"),e("KHd+")),i=Object(a.a)(r,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"container"},[t.loading?e("div",{staticClass:"pt-5 text-center"},[t._m(0)]):t._e(),t._v(" "),t.networkError?e("div",{staticClass:"pt-5 text-center"},[t._m(1)]):t._e(),t._v(" "),t.loading||t.networkError?t._e():e("div",{staticClass:"mt-5"},["all"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr")]),t._v(" "),e("div",{staticClass:"col-md-3"},[e("div",{staticClass:"mb-4"},[e("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("HASHTAGS "),e("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.hashtags.length)+")")])])]),t._v(" "),t.results.hashtags.length?e("div",t._l(t.results.hashtags,(function(s,r){return e("a",{staticClass:"mb-2 result-card",attrs:{href:t.buildUrl("hashtag",s)}},[e("div",{staticClass:"pb-3"},[e("div",{staticClass:"media align-items-center py-2 pr-3"},[t._m(2,!0),t._v(" "),e("div",{staticClass:"media-body text-truncate"},[e("p",{staticClass:"mb-0 text-truncate text-dark font-weight-bold",attrs:{"data-toggle":"tooltip",title:s.value}},[t._v("\n\t\t\t\t\t\t\t\t\t\t#"+t._s(s.value)+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),s.count>2?e("p",{staticClass:"mb-0 small font-weight-bold text-muted text-uppercase"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(s.count)+" posts\n\t\t\t\t\t\t\t\t")]):t._e()])])])])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])]),t._v(" "),e("div",{staticClass:"col-md-5"},[e("div",{staticClass:"mb-4"},[e("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("PROFILES "),e("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.profiles.length)+")")])])]),t._v(" "),t.results.profiles.length?e("div",t._l(t.results.profiles,(function(s,r){return e("a",{staticClass:"mb-2 result-card",attrs:{href:t.buildUrl("profile",s)}},[e("div",{staticClass:"pb-3"},[e("div",{staticClass:"media align-items-center py-2 pr-3"},[e("img",{staticClass:"mr-3 rounded-circle border",attrs:{src:s.avatar,width:"50px",height:"50px"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0 text-truncate text-dark font-weight-bold",attrs:{"data-toggle":"tooltip",title:s.value}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(s.value)+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),e("p",{staticClass:"mb-0 small font-weight-bold text-muted text-uppercase"},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(s.entity.post_count)+" Posts\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),e("div",{staticClass:"ml-3"},[s.entity.following?e("a",{staticClass:"btn btn-primary btn-sm font-weight-bold text-uppercase py-0",attrs:{href:t.buildUrl("profile",s)}},[t._v("Following")]):e("a",{staticClass:"btn btn-outline-primary btn-sm font-weight-bold text-uppercase py-0",attrs:{href:t.buildUrl("profile",s)}},[t._v("View")])])])])])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])]),t._v(" "),e("div",{staticClass:"col-md-4"},[e("div",{staticClass:"mb-4"},[e("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("STATUSES "),e("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.statuses.length)+")")])])]),t._v(" "),t.results.statuses.length?e("div",t._l(t.results.statuses,(function(s,r){return e("a",{staticClass:"mr-2 result-card",attrs:{href:t.buildUrl("status",s)}},[e("img",{staticClass:"mb-2",attrs:{src:s.thumb,width:"90px",height:"90px"}})])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])])]):"hashtag"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr")]),t._v(" "),e("div",{staticClass:"col-md-6 offset-md-3"},[e("div",{staticClass:"mb-4"},[e("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("HASHTAGS "),e("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.hashtags.length)+")")])])]),t._v(" "),t.results.hashtags.length?e("div",t._l(t.results.hashtags,(function(s,r){return e("a",{staticClass:"mb-2 result-card",attrs:{href:t.buildUrl("hashtag",s)}},[e("div",{staticClass:"pb-3"},[e("div",{staticClass:"media align-items-center py-2 pr-3"},[t._m(3,!0),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0 text-truncate text-dark font-weight-bold",attrs:{"data-toggle":"tooltip",title:s.value}},[t._v("\n\t\t\t\t\t\t\t\t\t\t#"+t._s(s.value)+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),s.count>2?e("p",{staticClass:"mb-0 small font-weight-bold text-muted text-uppercase"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(s.count)+" posts\n\t\t\t\t\t\t\t\t")]):t._e()])])])])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])])]):"profile"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr")]),t._v(" "),e("div",{staticClass:"col-md-6 offset-md-3"},[e("div",{staticClass:"mb-4"},[e("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("PROFILES "),e("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.profiles.length)+")")])])]),t._v(" "),t.results.profiles.length?e("div",t._l(t.results.profiles,(function(s,r){return e("div",{staticClass:"card mb-4"},[t._m(4,!0),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"text-center mt-n5 mb-4"},[e("img",{staticClass:"rounded-circle p-1 border mt-n4 bg-white shadow",attrs:{src:s.entity.thumb,width:"90px",height:"90px;",onerror:"this.onerror=null;this.src='/storage/avatars/default.png';"}})]),t._v(" "),e("p",{staticClass:"text-center lead font-weight-bold mb-1"},[t._v(t._s(s.value))]),t._v(" "),e("p",{staticClass:"text-center text-muted small text-uppercase mb-4"}),t._v(" "),e("div",{staticClass:"d-flex justify-content-center"},[s.entity.following?e("button",{staticClass:"btn btn-outline-secondary btn-sm py-1 px-4 text-uppercase font-weight-bold mr-3",staticStyle:{"font-weight":"500"},attrs:{type:"button"}},[t._v("Following")]):t._e(),t._v(" "),e("a",{staticClass:"btn btn-primary btn-sm py-1 px-4 text-uppercase font-weight-bold",staticStyle:{"font-weight":"500"},attrs:{href:t.buildUrl("profile",s)}},[t._v("View Profile")])])])])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])])]):"webfinger"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr"),t._v(" "),e("div",{staticClass:"col-md-6 offset-md-3"},t._l(t.results.profiles,(function(s,r){return e("div",{staticClass:"card mb-2"},[t._m(5,!0),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"text-center mt-n5 mb-4"},[e("img",{staticClass:"rounded-circle p-1 border mt-n4 bg-white shadow",attrs:{src:s.entity.thumb,width:"90px",height:"90px;",onerror:"this.onerror=null;this.src='/storage/avatars/default.png';"}})]),t._v(" "),e("p",{staticClass:"text-center lead font-weight-bold mb-1"},[t._v(t._s(s.value))]),t._v(" "),e("p",{staticClass:"text-center text-muted small text-uppercase mb-4"}),t._v(" "),e("div",{staticClass:"d-flex justify-content-center"},[e("a",{staticClass:"btn btn-primary btn-sm py-1 px-4 text-uppercase font-weight-bold",staticStyle:{"font-weight":"500"},attrs:{href:"/i/web/profile/_/"+s.entity.id}},[t._v("View Profile")])])])])})),0)])]):"remote"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr")]),t._v(" "),t.results.profiles.length?e("div",{staticClass:"col-md-6 offset-3"},t._l(t.results.profiles,(function(s,r){return e("a",{staticClass:"mb-2 result-card",attrs:{href:t.buildUrl("profile",s)}},[e("div",{staticClass:"pb-3"},[e("div",{staticClass:"media align-items-center py-2 pr-3"},[e("img",{staticClass:"mr-3 rounded-circle border",attrs:{src:s.entity.thumb,width:"50px",height:"50px",onerror:"this.onerror=null;this.src='/storage/avatars/default.png';"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0 text-truncate text-dark font-weight-bold",attrs:{"data-toggle":"tooltip",title:s.value}},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(s.value)+"\n\t\t\t\t\t\t\t\t")]),t._v(" "),e("p",{staticClass:"mb-0 small font-weight-bold text-muted text-uppercase"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(s.entity.post_count)+" Posts\n\t\t\t\t\t\t\t\t")])]),t._v(" "),e("div",{staticClass:"ml-3"},[s.entity.following?e("a",{staticClass:"btn btn-primary btn-sm font-weight-bold text-uppercase py-0",attrs:{href:t.buildUrl("profile",s)}},[t._v("Following")]):e("a",{staticClass:"btn btn-outline-primary btn-sm font-weight-bold text-uppercase py-0",attrs:{href:t.buildUrl("profile",s)}},[t._v("View")])])])])])})),0):t._e(),t._v(" "),t.results.statuses.length?e("div",{staticClass:"col-md-6 offset-3"},t._l(t.results.statuses,(function(s,r){return e("a",{staticClass:"mr-2 result-card",attrs:{href:t.buildUrl("status",s)}},[e("img",{staticClass:"mb-2",attrs:{src:s.thumb,width:"90px",height:"90px",onerror:"this.onerror=null;this.src='/storage/no-preview.png';"}})])})),0):t._e()]):"remotePost"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr")]),t._v(" "),e("div",{staticClass:"col-md-6 offset-md-3"},[t.results.statuses.length?e("div",t._l(t.results.statuses,(function(s,r){return e("div",{staticClass:"card mb-4 shadow-none border"},[e("div",{staticClass:"card-header p-0 m-0"},[e("div",{staticStyle:{width:"100%",height:"200px",background:"#fff"}},[e("div",{staticClass:"pt-4 text-center"},[e("img",{staticClass:"img-fluid border",staticStyle:{"max-height":"140px"},attrs:{src:s.thumb}})])])]),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"mt-n4 mb-2"},[e("div",{staticClass:"media"},[e("img",{staticClass:"rounded-circle p-1 mr-2 border mt-n3 bg-white shadow",attrs:{src:"/storage/avatars/default.png",width:"70px",height:"70px;",onerror:"this.onerror=null;this.src='/storage/avatars/default.png';"}}),t._v(" "),e("div",{staticClass:"media-body pt-3"},[e("p",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(s.username))])]),t._v(" "),e("div",{staticClass:"float-right pt-3"},[e("p",{staticClass:"small mb-0 text-muted"},[t._v(t._s(s.timestamp))])])])]),t._v(" "),e("p",{staticClass:"text-center mb-3 lead",domProps:{innerHTML:t._s(s.caption)}})]),t._v(" "),e("div",{staticClass:"card-footer"},[e("a",{staticClass:"btn btn-primary btn-block font-weight-bold rounded-0",attrs:{href:s.url}},[t._v("View Post")])])])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])])]):e("div",{staticClass:"col-12"},[e("p",{staticClass:"text-center text-muted lead font-weight-bold"},[t._v("No results found")])])])])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"spinner-border",attrs:{role:"status"}},[s("span",{staticClass:"sr-only"},[this._v("Loading…")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("p",{staticClass:"lead font-weight-lighter"},[this._v("An error occured, results could not be loaded."),s("br"),this._v(" Please try again later.")])},function(){var t=this.$createElement,s=this._self._c||t;return s("span",{staticClass:"d-inline-flex align-items-center justify-content-center border rounded-circle mr-3",staticStyle:{width:"50px",height:"50px"}},[s("i",{staticClass:"fas fa-hashtag text-muted"})])},function(){var t=this.$createElement,s=this._self._c||t;return s("span",{staticClass:"d-inline-flex align-items-center justify-content-center border rounded-circle mr-3",staticStyle:{width:"50px",height:"50px"}},[s("i",{staticClass:"fas fa-hashtag text-muted"})])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"card-header p-0 m-0"},[s("div",{staticStyle:{width:"100%",height:"140px",background:"#0070b7"}})])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"card-header p-0 m-0"},[s("div",{staticStyle:{width:"100%",height:"140px",background:"#0070b7"}})])}],!1,null,"6001172e",null);s.default=i.exports},"KHd+":function(t,s,e){"use strict";function r(t,s,e,r,a,i,n,o){var l,c="function"==typeof t?t.options:t;if(s&&(c.render=s,c.staticRenderFns=e,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),n?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(n)},c._ssrRegister=l):a&&(l=o?function(){a.call(this,this.$root.$options.shadowRoot)}:a),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(t,s){return l.call(s),d(t,s)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:c}}e.d(s,"a",(function(){return r}))},"aET+":function(t,s,e){var r,a,i={},n=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===a&&(a=r.apply(this,arguments)),a}),o=function(t,s){return s?s.querySelector(t):document.querySelector(t)},l=function(t){var s={};return function(t,e){if("function"==typeof t)return t();if(void 0===s[t]){var r=o.call(this,t,e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}s[t]=r}return s[t]}}(),c=null,d=0,u=[],h=e("9tPo");function f(t,s){for(var e=0;e=0&&u.splice(s,1)}function m(t){var s=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return e.nc}();r&&(t.attrs.nonce=r)}return b(s,t.attrs),v(t,s),s}function b(t,s){Object.keys(s).forEach((function(e){t.setAttribute(e,s[e])}))}function _(t,s){var e,r,a,i;if(s.transform&&t.css){if(!(i="function"==typeof s.transform?s.transform(t.css):s.transform.default(t.css)))return function(){};t.css=i}if(s.singleton){var n=d++;e=c||(c=m(s)),r=y.bind(null,e,n,!1),a=y.bind(null,e,n,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=function(t){var s=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(s,t.attrs),v(t,s),s}(s),r=S.bind(null,e,s),a=function(){g(e),e.href&&URL.revokeObjectURL(e.href)}):(e=m(s),r=x.bind(null,e),a=function(){g(e)});return r(t),function(s){if(s){if(s.css===t.css&&s.media===t.media&&s.sourceMap===t.sourceMap)return;r(t=s)}else a()}}t.exports=function(t,s){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(s=s||{}).attrs="object"==typeof s.attrs?s.attrs:{},s.singleton||"boolean"==typeof s.singleton||(s.singleton=n()),s.insertInto||(s.insertInto="head"),s.insertAt||(s.insertAt="bottom");var e=p(t,s);return f(e,s),function(t){for(var r=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:"hashtag",s=arguments.length>1?arguments[1]:void 0;switch(t){case"hashtag":return s.url+"?src=search";case"profile":return 1==s.entity.local?s.url:"/i/web/profile/_/"+s.entity.id;default:return s.url+"?src=search"}},searchContext:function(t){var s=this;switch(t){case"all":axios.get("/api/search",{params:{q:this.query,src:"metro",v:1,scope:"all"}}).then((function(t){var e=t.data;s.results.hashtags=e.hashtags?e.hashtags:[],s.results.profiles=e.profiles?e.profiles:[],s.results.statuses=e.posts?e.posts:[],s.loading=!1})).catch((function(t){s.loading=!1,console.log(t),s.networkError=!0}));break;case"remote":axios.get("/api/search",{params:{q:this.query,src:"metro",v:1,scope:"remote"}}).then((function(t){var e=t.data;s.results.hashtags=e.hashtags?e.hashtags:[],s.results.profiles=e.profiles?e.profiles:[],s.results.statuses=e.posts?e.posts:[],s.results.profiles.length&&(s.analysis="profile"),s.results.statuses.length&&(s.analysis="remotePost"),s.loading=!1})).catch((function(t){s.loading=!1,console.log(t),s.networkError=!0}));break;case"hashtag":axios.get("/api/search",{params:{q:this.query.slice(1),src:"metro",v:1,scope:"hashtag"}}).then((function(t){var e=t.data;s.results.hashtags=e.hashtags?e.hashtags:[],s.results.profiles=e.profiles?e.profiles:[],s.results.statuses=e.posts?e.posts:[],s.loading=!1})).catch((function(t){s.loading=!1,console.log(t),s.networkError=!0}));break;case"profile":axios.get("/api/search",{params:{q:this.query,src:"metro",v:1,scope:"profile"}}).then((function(t){var e=t.data;s.results.hashtags=e.hashtags?e.hashtags:[],s.results.profiles=e.profiles?e.profiles:[],s.results.statuses=e.posts?e.posts:[],s.loading=!1})).catch((function(t){s.loading=!1,console.log(t),s.networkError=!0}));break;case"webfinger":axios.get("/api/search",{params:{q:this.query,src:"metro",v:1,scope:"webfinger"}}).then((function(t){var e=t.data;s.results.hashtags=[],s.results.profiles=e.profiles,s.results.statuses=[],s.loading=!1})).catch((function(t){s.loading=!1,console.log(t),s.networkError=!0}));break;default:this.loading=!1,this.networkError=!0}}}},a=(e("80eU"),e("KHd+")),i=Object(a.a)(r,(function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"container"},[t.loading?e("div",{staticClass:"pt-5 text-center"},[t._m(0)]):t._e(),t._v(" "),t.networkError?e("div",{staticClass:"pt-5 text-center"},[t._m(1)]):t._e(),t._v(" "),t.loading||t.networkError?t._e():e("div",{staticClass:"mt-5"},["all"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr")]),t._v(" "),e("div",{staticClass:"col-md-3"},[e("div",{staticClass:"mb-4"},[e("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("HASHTAGS "),e("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.hashtags.length)+")")])])]),t._v(" "),t.results.hashtags.length?e("div",t._l(t.results.hashtags,(function(s,r){return e("a",{staticClass:"mb-2 result-card",attrs:{href:t.buildUrl("hashtag",s)}},[e("div",{staticClass:"pb-3"},[e("div",{staticClass:"media align-items-center py-2 pr-3"},[t._m(2,!0),t._v(" "),e("div",{staticClass:"media-body text-truncate"},[e("p",{staticClass:"mb-0 text-truncate text-dark font-weight-bold",attrs:{"data-toggle":"tooltip",title:s.value}},[t._v("\n\t\t\t\t\t\t\t\t\t\t#"+t._s(s.value)+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),s.count>2?e("p",{staticClass:"mb-0 small font-weight-bold text-muted text-uppercase"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(s.count)+" posts\n\t\t\t\t\t\t\t\t")]):t._e()])])])])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])]),t._v(" "),e("div",{staticClass:"col-md-5"},[e("div",{staticClass:"mb-4"},[e("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("PROFILES "),e("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.profiles.length)+")")])])]),t._v(" "),t.results.profiles.length?e("div",t._l(t.results.profiles,(function(s,r){return e("a",{staticClass:"mb-2 result-card",attrs:{href:t.buildUrl("profile",s)}},[e("div",{staticClass:"pb-3"},[e("div",{staticClass:"media align-items-center py-2 pr-3"},[e("img",{staticClass:"mr-3 rounded-circle border",attrs:{src:s.avatar,width:"50px",height:"50px"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0 text-truncate text-dark font-weight-bold",attrs:{"data-toggle":"tooltip",title:s.value}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(s.value)+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),e("p",{staticClass:"mb-0 small font-weight-bold text-muted text-uppercase"},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(s.entity.post_count)+" Posts\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),e("div",{staticClass:"ml-3"},[s.entity.following?e("a",{staticClass:"btn btn-primary btn-sm font-weight-bold text-uppercase py-0",attrs:{href:t.buildUrl("profile",s)}},[t._v("Following")]):e("a",{staticClass:"btn btn-outline-primary btn-sm font-weight-bold text-uppercase py-0",attrs:{href:t.buildUrl("profile",s)}},[t._v("View")])])])])])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])]),t._v(" "),e("div",{staticClass:"col-md-4"},[e("div",{staticClass:"mb-4"},[e("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("STATUSES "),e("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.statuses.length)+")")])])]),t._v(" "),t.results.statuses.length?e("div",t._l(t.results.statuses,(function(s,r){return e("a",{staticClass:"mr-2 result-card",attrs:{href:t.buildUrl("status",s)}},[e("img",{staticClass:"mb-2",attrs:{src:s.thumb,width:"90px",height:"90px"}})])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])])]):"hashtag"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr")]),t._v(" "),e("div",{staticClass:"col-md-6 offset-md-3"},[e("div",{staticClass:"mb-4"},[e("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("HASHTAGS "),e("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.hashtags.length)+")")])])]),t._v(" "),t.results.hashtags.length?e("div",t._l(t.results.hashtags,(function(s,r){return e("a",{staticClass:"mb-2 result-card",attrs:{href:t.buildUrl("hashtag",s)}},[e("div",{staticClass:"pb-3"},[e("div",{staticClass:"media align-items-center py-2 pr-3"},[t._m(3,!0),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0 text-truncate text-dark font-weight-bold",attrs:{"data-toggle":"tooltip",title:s.value}},[t._v("\n\t\t\t\t\t\t\t\t\t\t#"+t._s(s.value)+"\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),s.count>2?e("p",{staticClass:"mb-0 small font-weight-bold text-muted text-uppercase"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(s.count)+" posts\n\t\t\t\t\t\t\t\t")]):t._e()])])])])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])])]):"profile"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr")]),t._v(" "),e("div",{staticClass:"col-md-6 offset-md-3"},[e("div",{staticClass:"mb-4"},[e("p",{staticClass:"text-secondary small font-weight-bold"},[t._v("PROFILES "),e("span",{staticClass:"pl-1 text-lighter"},[t._v("("+t._s(t.results.profiles.length)+")")])])]),t._v(" "),t.results.profiles.length?e("div",t._l(t.results.profiles,(function(s,r){return e("div",{staticClass:"card mb-4"},[t._m(4,!0),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"text-center mt-n5 mb-4"},[e("img",{staticClass:"rounded-circle p-1 border mt-n4 bg-white shadow",attrs:{src:s.entity.thumb,width:"90px",height:"90px;",onerror:"this.onerror=null;this.src='/storage/avatars/default.png';"}})]),t._v(" "),e("p",{staticClass:"text-center lead font-weight-bold mb-1"},[t._v(t._s(s.value))]),t._v(" "),e("p",{staticClass:"text-center text-muted small text-uppercase mb-4"}),t._v(" "),e("div",{staticClass:"d-flex justify-content-center"},[s.entity.following?e("button",{staticClass:"btn btn-outline-secondary btn-sm py-1 px-4 text-uppercase font-weight-bold mr-3",staticStyle:{"font-weight":"500"},attrs:{type:"button"}},[t._v("Following")]):t._e(),t._v(" "),e("a",{staticClass:"btn btn-primary btn-sm py-1 px-4 text-uppercase font-weight-bold",staticStyle:{"font-weight":"500"},attrs:{href:t.buildUrl("profile",s)}},[t._v("View Profile")])])])])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])])]):"webfinger"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr"),t._v(" "),e("div",{staticClass:"col-md-6 offset-md-3"},t._l(t.results.profiles,(function(s,r){return e("div",{staticClass:"card mb-2"},[t._m(5,!0),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"text-center mt-n5 mb-4"},[e("img",{staticClass:"rounded-circle p-1 border mt-n4 bg-white shadow",attrs:{src:s.entity.thumb,width:"90px",height:"90px;",onerror:"this.onerror=null;this.src='/storage/avatars/default.png';"}})]),t._v(" "),e("p",{staticClass:"text-center lead font-weight-bold mb-1"},[t._v(t._s(s.value))]),t._v(" "),e("p",{staticClass:"text-center text-muted small text-uppercase mb-4"}),t._v(" "),e("div",{staticClass:"d-flex justify-content-center"},[e("a",{staticClass:"btn btn-primary btn-sm py-1 px-4 text-uppercase font-weight-bold",staticStyle:{"font-weight":"500"},attrs:{href:"/i/web/profile/_/"+s.entity.id}},[t._v("View Profile")])])])])})),0)])]):"remote"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr")]),t._v(" "),t.results.profiles.length?e("div",{staticClass:"col-md-6 offset-3"},t._l(t.results.profiles,(function(s,r){return e("a",{staticClass:"mb-2 result-card",attrs:{href:t.buildUrl("profile",s)}},[e("div",{staticClass:"pb-3"},[e("div",{staticClass:"media align-items-center py-2 pr-3"},[e("img",{staticClass:"mr-3 rounded-circle border",attrs:{src:s.entity.thumb,width:"50px",height:"50px",onerror:"this.onerror=null;this.src='/storage/avatars/default.png';"}}),t._v(" "),e("div",{staticClass:"media-body"},[e("p",{staticClass:"mb-0 text-truncate text-dark font-weight-bold",attrs:{"data-toggle":"tooltip",title:s.value}},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(s.value)+"\n\t\t\t\t\t\t\t\t")]),t._v(" "),e("p",{staticClass:"mb-0 small font-weight-bold text-muted text-uppercase"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(s.entity.post_count)+" Posts\n\t\t\t\t\t\t\t\t")])]),t._v(" "),e("div",{staticClass:"ml-3"},[s.entity.following?e("a",{staticClass:"btn btn-primary btn-sm font-weight-bold text-uppercase py-0",attrs:{href:t.buildUrl("profile",s)}},[t._v("Following")]):e("a",{staticClass:"btn btn-outline-primary btn-sm font-weight-bold text-uppercase py-0",attrs:{href:t.buildUrl("profile",s)}},[t._v("View")])])])])])})),0):t._e(),t._v(" "),t.results.statuses.length?e("div",{staticClass:"col-md-6 offset-3"},t._l(t.results.statuses,(function(s,r){return e("a",{staticClass:"mr-2 result-card",attrs:{href:t.buildUrl("status",s)}},[e("img",{staticClass:"mb-2",attrs:{src:s.thumb,width:"90px",height:"90px",onerror:"this.onerror=null;this.src='/storage/no-preview.png';"}})])})),0):t._e()]):"remotePost"==t.analysis?e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 mb-5"},[e("p",{staticClass:"h5 font-weight-bold text-dark"},[t._v("Showing results for "),e("i",[t._v(t._s(t.query))])]),t._v(" "),e("hr")]),t._v(" "),e("div",{staticClass:"col-md-6 offset-md-3"},[t.results.statuses.length?e("div",t._l(t.results.statuses,(function(s,r){return e("div",{staticClass:"card mb-4 shadow-none border"},[e("div",{staticClass:"card-header p-0 m-0"},[e("div",{staticStyle:{width:"100%",height:"200px",background:"#fff"}},[e("div",{staticClass:"pt-4 text-center"},[e("img",{staticClass:"img-fluid border",staticStyle:{"max-height":"140px"},attrs:{src:s.thumb}})])])]),t._v(" "),e("div",{staticClass:"card-body"},[e("div",{staticClass:"mt-n4 mb-2"},[e("div",{staticClass:"media"},[e("img",{staticClass:"rounded-circle p-1 mr-2 border mt-n3 bg-white shadow",attrs:{src:"/storage/avatars/default.png",width:"70px",height:"70px;",onerror:"this.onerror=null;this.src='/storage/avatars/default.png';"}}),t._v(" "),e("div",{staticClass:"media-body pt-3"},[e("p",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(s.username))])]),t._v(" "),e("div",{staticClass:"float-right pt-3"},[e("p",{staticClass:"small mb-0 text-muted"},[t._v(t._s(s.timestamp))])])])]),t._v(" "),e("p",{staticClass:"text-center mb-3 lead",domProps:{innerHTML:t._s(s.caption)}})]),t._v(" "),e("div",{staticClass:"card-footer"},[e("a",{staticClass:"btn btn-primary btn-block font-weight-bold rounded-0",attrs:{href:s.url}},[t._v("View Post")])])])})),0):e("div",[e("div",{staticClass:"border py-3 text-center font-weight-bold"},[t._v("No results found")])])])]):e("div",{staticClass:"col-12"},[e("p",{staticClass:"text-center text-muted lead font-weight-bold"},[t._v("No results found")])])])])}),[function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"spinner-border",attrs:{role:"status"}},[s("span",{staticClass:"sr-only"},[this._v("Loading…")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("p",{staticClass:"lead font-weight-lighter"},[this._v("An error occured, results could not be loaded."),s("br"),this._v(" Please try again later.")])},function(){var t=this.$createElement,s=this._self._c||t;return s("span",{staticClass:"d-inline-flex align-items-center justify-content-center border rounded-circle mr-3",staticStyle:{width:"50px",height:"50px"}},[s("i",{staticClass:"fas fa-hashtag text-muted"})])},function(){var t=this.$createElement,s=this._self._c||t;return s("span",{staticClass:"d-inline-flex align-items-center justify-content-center border rounded-circle mr-3",staticStyle:{width:"50px",height:"50px"}},[s("i",{staticClass:"fas fa-hashtag text-muted"})])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"card-header p-0 m-0"},[s("div",{staticStyle:{width:"100%",height:"140px",background:"#0070b7"}})])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"card-header p-0 m-0"},[s("div",{staticStyle:{width:"100%",height:"140px",background:"#0070b7"}})])}],!1,null,"30adae83",null);s.default=i.exports},"KHd+":function(t,s,e){"use strict";function r(t,s,e,r,a,i,n,o){var l,c="function"==typeof t?t.options:t;if(s&&(c.render=s,c.staticRenderFns=e,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),n?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(n)},c._ssrRegister=l):a&&(l=o?function(){a.call(this,this.$root.$options.shadowRoot)}:a),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(t,s){return l.call(s),d(t,s)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:c}}e.d(s,"a",(function(){return r}))},WiWu:function(t,s,e){var r=e("rZLf");"string"==typeof r&&(r=[[t.i,r,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};e("aET+")(r,a);r.locals&&(t.exports=r.locals)},"aET+":function(t,s,e){var r,a,i={},n=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===a&&(a=r.apply(this,arguments)),a}),o=function(t,s){return s?s.querySelector(t):document.querySelector(t)},l=function(t){var s={};return function(t,e){if("function"==typeof t)return t();if(void 0===s[t]){var r=o.call(this,t,e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}s[t]=r}return s[t]}}(),c=null,d=0,u=[],h=e("9tPo");function f(t,s){for(var e=0;e=0&&u.splice(s,1)}function g(t){var s=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return e.nc}();r&&(t.attrs.nonce=r)}return b(s,t.attrs),v(t,s),s}function b(t,s){Object.keys(s).forEach((function(e){t.setAttribute(e,s[e])}))}function _(t,s){var e,r,a,i;if(s.transform&&t.css){if(!(i="function"==typeof s.transform?s.transform(t.css):s.transform.default(t.css)))return function(){};t.css=i}if(s.singleton){var n=d++;e=c||(c=g(s)),r=y.bind(null,e,n,!1),a=y.bind(null,e,n,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=function(t){var s=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(s,t.attrs),v(t,s),s}(s),r=S.bind(null,e,s),a=function(){m(e),e.href&&URL.revokeObjectURL(e.href)}):(e=g(s),r=x.bind(null,e),a=function(){m(e)});return r(t),function(s){if(s){if(s.css===t.css&&s.media===t.media&&s.sourceMap===t.sourceMap)return;r(t=s)}else a()}}t.exports=function(t,s){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(s=s||{}).attrs="object"==typeof s.attrs?s.attrs:{},s.singleton||"boolean"==typeof s.singleton||(s.singleton=n()),s.insertInto||(s.insertInto="head"),s.insertAt||(s.insertAt="bottom");var e=p(t,s);return f(e,s),function(t){for(var r=[],a=0;a