diff --git a/CHANGELOG.md b/CHANGELOG.md index 612a867d..0327239a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## [Unreleased](https://github.com/pixelfed/pixelfed/compare/v0.10.10...dev) ### Added - Autocomplete Support (hashtags + mentions) ([de514f7d](https://github.com/pixelfed/pixelfed/commit/de514f7d)) +- Creative Commons Licenses ([552e950](https://github.com/pixelfed/pixelfed/commit/552e950)) ### Updated - Updated AdminController, fix variable name in updateSpam method. ([6edaf940](https://github.com/pixelfed/pixelfed/commit/6edaf940)) @@ -403,7 +404,7 @@ - Updated CollectionController, increase limit from 18 to 50. ([c2826fd3](https://github.com/pixelfed/pixelfed/c2826fd3)) ## Deprecated - + ## [v0.10.6 (2019-09-30)](https://github.com/pixelfed/pixelfed/compare/v0.10.5...v0.10.6) @@ -468,7 +469,7 @@ - Run ```php artisan passport:keys``` - Add ```OAUTH_ENABLED=true``` to .env - Run ```php artisan config:cache``` - + ## [v0.10.5 (2019-09-24)](https://github.com/pixelfed/pixelfed/compare/v0.10.4...v0.10.5) @@ -479,8 +480,8 @@ - Fixed cache bug in privacy and terms pages [#1712](https://github.com/pixelfed/pixelfed/commit/fe522da8db7a8b0d7c18d405abcb885f8678f35c) ### Changed - - + + ## [v0.10.4 (2019-09-24)](https://github.com/pixelfed/pixelfed/compare/v0.10.3...v0.10.4) ### Added @@ -511,17 +512,17 @@ ## Deprecated - Remove deprecated profile following/followers [#1697](https://github.com/pixelfed/pixelfed/pull/1697) - Remove old comment permalink [05f6598](https://github.com/pixelfed/pixelfed/pull/1708/commits/05f659896d903e1ff41dba810f125d721fa057e7) - - + + ## [v0.10.3 (2019-09-08)](https://github.com/pixelfed/pixelfed/compare/v0.10.2...v0.10.3) ### Added - Append ```.json``` to local status urls to view ActivityPub object [#1666](https://github.com/pixelfed/pixelfed/pull/1666) ### Fixed -- Reverted ```strict``` Same-Site Cookies to ```null``` to fix 2FA/session expiry [#1667](https://github.com/pixelfed/pixelfed/pull/1667) -- Fixed AP errors by storing ActivityPub object id and url [#1668](https://github.com/pixelfed/pixelfed/pull/1668) [#1683](https://github.com/pixelfed/pixelfed/pull/1683) -- Fixed content warnings that had filter applied [#1669](https://github.com/pixelfed/pixelfed/pull/1669) +- Reverted ```strict``` Same-Site Cookies to ```null``` to fix 2FA/session expiry [#1667](https://github.com/pixelfed/pixelfed/pull/1667) +- Fixed AP errors by storing ActivityPub object id and url [#1668](https://github.com/pixelfed/pixelfed/pull/1668) [#1683](https://github.com/pixelfed/pixelfed/pull/1683) +- Fixed content warnings that had filter applied [#1669](https://github.com/pixelfed/pixelfed/pull/1669) ### Changed - Japanese Translations [#1673](https://github.com/pixelfed/pixelfed/pull/1673) @@ -531,7 +532,7 @@ ### Deprecated - Personalized Discover has been deprecated due to low use [#1670](https://github.com/pixelfed/pixelfed/pull/1670) - + ## [v0.10.2 (2019-09-06)](https://github.com/pixelfed/pixelfed/compare/v0.10.1...v0.10.2) @@ -551,7 +552,7 @@ - Loops! Discover short videos - Preliminary support for profile PropertyValue metadata - Preliminary support for Direct Messages -- Places! Run the artisan task `import:cities` +- Places! Run the artisan task `import:cities` - Emails are now validated and banned email domains are disallowed at signup. Artisan task `email:bancheck` will validate existing users. - .env vars `REDIS_SCHEME` and `REDIS_PATH` allow for using Redis over a Unix socket instead of TCP [#1602](https://github.com/pixelfed/pixelfed/pull/1602) - .env var `IMAGE_DRIVER` allows using imagick instead of gd @@ -574,7 +575,7 @@ - Sample nginx.conf in contrib/ now uses HTTPS instead of HTTP. Docs updated to reference this file - Updated register form - Allow users to edit email after registrations - + ## [v0.10.0 (2019-07-17)](https://github.com/pixelfed/pixelfed/compare/v0.9.6...v0.10.0) @@ -595,7 +596,7 @@ ### Fixed - Hashtag post count off-by-one [#1485](https://github.com/pixelfed/pixelfed/pull/1485) - + ## [v0.9.5 (2019-07-10)](https://github.com/pixelfed/pixelfed/compare/v0.9.4...v0.9.5) @@ -631,8 +632,8 @@ ### Removed - Remove Classic Compose UI [#1434](https://github.com/pixelfed/pixelfed/pull/1434), [72bffd1](https://github.com/pixelfed/pixelfed/commit/72bffd1) [a2640af](https://github.com/pixelfed/pixelfed/commit/a2640af) -- - +- + ## [v0.9.4 (2019-06-03)](https://github.com/pixelfed/pixelfed/compare/v0.9.0...v0.9.4) @@ -672,7 +673,7 @@ php artisan config:cache ### Removed - Google Recaptcha is no longer supported (#1231) - Lightbox has been deprecated in favor of double-tap-to-like; it will return as a dedicated button in the future (#1277) - + ## [v0.9.0 (2019-04-17)](https://github.com/pixelfed/pixelfed/compare/v0.8.6...v0.9.0) @@ -698,7 +699,7 @@ php artisan config:cache ### Removed - Removed identicons due to SVG compatibility issues with federation. New users will instead be assigned a default avatar. - + ## [v0.8.6 (2019-04-06)](https://github.com/pixelfed/pixelfed/compare/v0.8.5...v0.8.6) diff --git a/app/Http/Controllers/ComposeController.php b/app/Http/Controllers/ComposeController.php index 35bba5c9..6d62ab07 100644 --- a/app/Http/Controllers/ComposeController.php +++ b/app/Http/Controllers/ComposeController.php @@ -45,6 +45,7 @@ use App\Services\ServiceService; use Illuminate\Support\Str; use App\Util\Lexer\Autolink; use App\Util\Lexer\Extractor; +use App\Util\Media\License; class ComposeController extends Controller { @@ -407,6 +408,7 @@ class ComposeController extends Controller 'place' => 'nullable', 'comments_disabled' => 'nullable', 'tagged' => 'nullable', + 'license' => 'nullable|integer|min:1|max:16' // 'optimize_media' => 'nullable' ]); @@ -439,6 +441,8 @@ class ComposeController extends Controller abort_if($limitReached == true, 429); + $license = in_array($request->input('license'), License::keys()) ? $request->input('license') : null; + $visibility = $request->input('visibility'); $medias = $request->input('media'); $attachments = []; @@ -458,7 +462,7 @@ class ComposeController extends Controller abort(403, 'Invalid media id'); } $m->filter_class = in_array($media['filter_class'], Filter::classes()) ? $media['filter_class'] : null; - $m->license = $media['license']; + $m->license = $license; $m->caption = isset($media['alt']) ? strip_tags($media['alt']) : null; $m->order = isset($media['cursor']) && is_int($media['cursor']) ? (int) $media['cursor'] : $k; // if($optimize_media == false) { diff --git a/app/Media.php b/app/Media.php index 3854c384..107f15b4 100644 --- a/app/Media.php +++ b/app/Media.php @@ -4,6 +4,7 @@ namespace App; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; +use App\Util\Media\License; use Storage; class Media extends Model @@ -101,4 +102,25 @@ class Media extends Model return $meta['Model']; } } + + public function getLicense() + { + $license = $this->license; + + if(!$license || strlen($license) > 2 || $license == 1) { + return null; + } + + if(!in_array($license, License::keys())) { + return null; + } + + $res = License::get()[$license]; + + return [ + 'id' => $res['id'], + 'title' => $res['title'], + 'url' => $res['url'] + ]; + } } diff --git a/app/Transformer/Api/MediaDraftTransformer.php b/app/Transformer/Api/MediaDraftTransformer.php index bb531f55..1f6c578c 100644 --- a/app/Transformer/Api/MediaDraftTransformer.php +++ b/app/Transformer/Api/MediaDraftTransformer.php @@ -10,14 +10,6 @@ class MediaDraftTransformer extends Fractal\TransformerAbstract { public function transform(Media $media) { - - $url = URL::temporarySignedRoute( - 'temp-media', now()->addHours(1), ['profileId' => $media->profile_id, 'mediaId' => $media->id, 'timestamp' => time()] - ); - - //$url = $media->thumbnailUrl(); - //$url = $media->url(); - return [ 'id' => (string) $media->id, 'type' => $media->activityVerb(), diff --git a/app/Transformer/Api/MediaTransformer.php b/app/Transformer/Api/MediaTransformer.php index a5d0a0ad..21c0b25b 100644 --- a/app/Transformer/Api/MediaTransformer.php +++ b/app/Transformer/Api/MediaTransformer.php @@ -15,10 +15,11 @@ class MediaTransformer extends Fractal\TransformerAbstract 'url' => $media->url(), 'remote_url' => null, 'preview_url' => $media->thumbnailUrl(), + 'optimized_url' => $media->optimized_url, 'text_url' => null, 'meta' => null, 'description' => $media->caption, - 'license' => $media->license, + 'license' => $media->getLicense(), 'is_nsfw' => $media->is_nsfw, 'orientation' => $media->orientation, 'filter_name' => $media->filter_name, diff --git a/app/Util/Media/License.php b/app/Util/Media/License.php new file mode 100644 index 00000000..653013a4 --- /dev/null +++ b/app/Util/Media/License.php @@ -0,0 +1,123 @@ + [ + "id" => 1, + "title" => "All Rights Reserved", + "name" => "All Rights Reserved", + "description" => "You, the copyright holder, reserve all rights provided by copyright law, such as the right to make copies, distribute your work, perform your work, license, or otherwise exploit your work; no rights are waived under this license.", + "terms" => [], + "url" => url('/site/kb/licenses') + ], + 5 => [ + "id" => 5, + "title" => "Public Domain", + "name" => "Public Domain Work", + "description" => "Works, or aspects of copyrighted works, which copyright law does not protect.", + "terms" => [], + "url" => url('/site/kb/licenses') + ], + 6 => [ + "id" => 6, + "title" => "Public Domain (CC0)", + "name" => "Public Domain Dedication (CC0)", + "description" => "You, the copyright holder, waive your interest in your work and place the work as completely as possible in the public domain so others may freely exploit and use the work without restriction under copyright or database law.", + "terms" => [], + "url" => url('/site/kb/licenses') + ], + 11 => [ + "id" => 11, + "title" => "CC BY", + "name" => "Attribution", + "description" => "This license allows reusers to distribute, remix, adapt, and build upon the material in any medium or format, so long as attribution is given to the creator. The license allows for commercial use.", + "terms" => [ + "Credit must be given to the creator", + ], + "url" => "https://creativecommons.org/licenses/by/4.0/" + ], + 12 => [ + "id" => 12, + "title" => "CC BY-SA", + "name" => "Attribution-ShareAlike", + "description" => "This license allows reusers to distribute, remix, adapt, and build upon the material in any medium or format, so long as attribution is given to the creator. The license allows for commercial use. If you remix, adapt, or build upon the material, you must license the modified material under identical terms.", + "terms" => [ + "Credit must be given to the creator", + "Adaptations must be shared under the same terms" + ], + "url" => "https://creativecommons.org/licenses/by-sa/4.0/" + ], + 13 => [ + "id" => 13, + "title" => "CC BY-NC", + "name" => "Attribution-NonCommercial", + "description" => "This license allows reusers to distribute, remix, adapt, and build upon the material in any medium or format for noncommercial purposes only, and only so long as attribution is given to the creator.", + "terms" => [ + "Credit must be given to the creator", + "Only noncommercial uses of the work are permitted" + ], + "url" => "https://creativecommons.org/licenses/by-nc/4.0/" + ], + 14 => [ + "id" => 14, + "title" => "CC BY-NC-SA", + "name" => "Attribution-NonCommercial-ShareAlike", + "description" => "This license allows reusers to distribute, remix, adapt, and build upon the material in any medium or format for noncommercial purposes only, and only so long as attribution is given to the creator. If you remix, adapt, or build upon the material, you must license the modified material under identical terms.", + "terms" => [ + "Credit must be given to the creator", + "Only noncommercial uses of the work are permitted", + "Adaptations must be shared under the same terms" + ], + "url" => "https://creativecommons.org/licenses/by-nc-sa/4.0/" + ], + 15 => [ + "id" => 15, + "title" => "CC BY-ND", + "name" => "Attribution-NoDerivs", + "description" => "This license allows reusers to copy and distribute the material in any medium or format in unadapted form only, and only so long as attribution is given to the creator. The license allows for commercial use.", + "terms" => [ + "Credit must be given to the creator", + "No derivatives or adaptations of the work are permitted" + ], + "url" => "https://creativecommons.org/licenses/by-nd/4.0/" + ], + 16 => [ + "id" => 16, + "title" => "CC BY-NC-ND", + "name" => "Attribution-NonCommercial-NoDerivs", + "description" => "This license allows reusers to copy and distribute the material in any medium or format in unadapted form only, for noncommercial purposes only, and only so long as attribution is given to the creator.", + "terms" => [ + "Credit must be given to the creator", + "Only noncommercial uses of the work are permitted", + "No derivatives or adaptations of the work are permitted" + ], + "url" => "https://creativecommons.org/licenses/by-nc-nd/4.0/" + ] + ]; + } + + public static function keys() + { + return array_keys(self::get()); + } + + public static function getId($index) + { + return self::get()[$index]['id']; + } + + public static function names() + { + return collect(self::get()) + ->map(function($v) { + return $v['title']; + }) + ->values() + ->toArray(); + } +} diff --git a/public/js/compose.js b/public/js/compose.js index 1f3ff979..e83d89df 100644 --- a/public/js/compose.js +++ b/public/js/compose.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{"0ox+":function(t,e,i){(t.exports=i("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)}}',""])},"3VoG":function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"/*!\n * Cropper.js v1.5.9\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2020-09-10T13:16:21.689Z\n */\n\n.cropper-container {\n direction: ltr;\n font-size: 0;\n line-height: 0;\n position: relative;\n -ms-touch-action: none;\n touch-action: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.cropper-container img {\n display: block;\n height: 100%;\n image-orientation: 0deg;\n max-height: none !important;\n max-width: none !important;\n min-height: 0 !important;\n min-width: 0 !important;\n width: 100%;\n}\n\n.cropper-wrap-box,\n.cropper-canvas,\n.cropper-drag-box,\n.cropper-crop-box,\n.cropper-modal {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.cropper-wrap-box,\n.cropper-canvas {\n overflow: hidden;\n}\n\n.cropper-drag-box {\n background-color: #fff;\n opacity: 0;\n}\n\n.cropper-modal {\n background-color: #000;\n opacity: 0.5;\n}\n\n.cropper-view-box {\n display: block;\n height: 100%;\n outline: 1px solid #39f;\n outline-color: rgba(51, 153, 255, 0.75);\n overflow: hidden;\n width: 100%;\n}\n\n.cropper-dashed {\n border: 0 dashed #eee;\n display: block;\n opacity: 0.5;\n position: absolute;\n}\n\n.cropper-dashed.dashed-h {\n border-bottom-width: 1px;\n border-top-width: 1px;\n height: calc(100% / 3);\n left: 0;\n top: calc(100% / 3);\n width: 100%;\n}\n\n.cropper-dashed.dashed-v {\n border-left-width: 1px;\n border-right-width: 1px;\n height: 100%;\n left: calc(100% / 3);\n top: 0;\n width: calc(100% / 3);\n}\n\n.cropper-center {\n display: block;\n height: 0;\n left: 50%;\n opacity: 0.75;\n position: absolute;\n top: 50%;\n width: 0;\n}\n\n.cropper-center::before,\n.cropper-center::after {\n background-color: #eee;\n content: ' ';\n display: block;\n position: absolute;\n}\n\n.cropper-center::before {\n height: 1px;\n left: -3px;\n top: 0;\n width: 7px;\n}\n\n.cropper-center::after {\n height: 7px;\n left: 0;\n top: -3px;\n width: 1px;\n}\n\n.cropper-face,\n.cropper-line,\n.cropper-point {\n display: block;\n height: 100%;\n opacity: 0.1;\n position: absolute;\n width: 100%;\n}\n\n.cropper-face {\n background-color: #fff;\n left: 0;\n top: 0;\n}\n\n.cropper-line {\n background-color: #39f;\n}\n\n.cropper-line.line-e {\n cursor: ew-resize;\n right: -3px;\n top: 0;\n width: 5px;\n}\n\n.cropper-line.line-n {\n cursor: ns-resize;\n height: 5px;\n left: 0;\n top: -3px;\n}\n\n.cropper-line.line-w {\n cursor: ew-resize;\n left: -3px;\n top: 0;\n width: 5px;\n}\n\n.cropper-line.line-s {\n bottom: -3px;\n cursor: ns-resize;\n height: 5px;\n left: 0;\n}\n\n.cropper-point {\n background-color: #39f;\n height: 5px;\n opacity: 0.75;\n width: 5px;\n}\n\n.cropper-point.point-e {\n cursor: ew-resize;\n margin-top: -3px;\n right: -3px;\n top: 50%;\n}\n\n.cropper-point.point-n {\n cursor: ns-resize;\n left: 50%;\n margin-left: -3px;\n top: -3px;\n}\n\n.cropper-point.point-w {\n cursor: ew-resize;\n left: -3px;\n margin-top: -3px;\n top: 50%;\n}\n\n.cropper-point.point-s {\n bottom: -3px;\n cursor: s-resize;\n left: 50%;\n margin-left: -3px;\n}\n\n.cropper-point.point-ne {\n cursor: nesw-resize;\n right: -3px;\n top: -3px;\n}\n\n.cropper-point.point-nw {\n cursor: nwse-resize;\n left: -3px;\n top: -3px;\n}\n\n.cropper-point.point-sw {\n bottom: -3px;\n cursor: nesw-resize;\n left: -3px;\n}\n\n.cropper-point.point-se {\n bottom: -3px;\n cursor: nwse-resize;\n height: 20px;\n opacity: 1;\n right: -3px;\n width: 20px;\n}\n\n@media (min-width: 768px) {\n .cropper-point.point-se {\n height: 15px;\n width: 15px;\n }\n}\n\n@media (min-width: 992px) {\n .cropper-point.point-se {\n height: 10px;\n width: 10px;\n }\n}\n\n@media (min-width: 1200px) {\n .cropper-point.point-se {\n height: 5px;\n opacity: 0.75;\n width: 5px;\n }\n}\n\n.cropper-point.point-se::before {\n background-color: #39f;\n bottom: -50%;\n content: ' ';\n display: block;\n height: 200%;\n opacity: 0;\n position: absolute;\n right: -50%;\n width: 200%;\n}\n\n.cropper-invisible {\n opacity: 0;\n}\n\n.cropper-bg {\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');\n}\n\n.cropper-hide {\n display: block;\n height: 0;\n position: absolute;\n width: 0;\n}\n\n.cropper-hidden {\n display: none !important;\n}\n\n.cropper-move {\n cursor: move;\n}\n\n.cropper-crop {\n cursor: crosshair;\n}\n\n.cropper-disabled .cropper-drag-box,\n.cropper-disabled .cropper-face,\n.cropper-disabled .cropper-line,\n.cropper-disabled .cropper-point {\n cursor: not-allowed;\n}\n",""])},"4Izb":function(t,e,i){var n=i("Lu9Q");"string"==typeof n&&(n=[[t.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};i("aET+")(n,a);n.locals&&(t.exports=n.locals)},"6xVh":function(t,e,i){t.exports=function t(e,i,n){function a(r,s){if(!i[r]){if(!e[r]){if(o)return o(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[r]={exports:{}};e[r][0].call(c.exports,(function(t){return a(e[r][1][t]||t)}),c,c.exports,t,e,i,n)}return i[r].exports}for(var o=!1,r=0;r'+(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"]}}],(i=[{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.filteredItems=n;var a=i.menu.querySelector("ul");if(i.range.positionMenuAtCaret(e),!n.length){var o=new CustomEvent("tribute-no-match",{detail:i.menu});return i.current.element.dispatchEvent(o),void("function"==typeof i.current.collection.noMatchTemplate&&!i.current.collection.noMatchTemplate()||!i.current.collection.noMatchTemplate?i.hideMenu():"function"==typeof i.current.collection.noMatchTemplate?a.innerHTML=i.current.collection.noMatchTemplate():a.innerHTML=i.current.collection.noMatchTemplate)}i.current.collection.menuItemLimit&&(n=n.slice(0,i.current.collection.menuItemLimit)),a.innerHTML="";var r=i.range.getDocument().createDocumentFragment();n.forEach((function(t,e){var n=i.range.getDocument().createElement("li");n.setAttribute("data-index",e),n.addEventListener("mousemove",(function(t){var e=l(i._findLiTarget(t.target),2),n=(e[0],e[1]);0!==t.movementY&&i.events.setActiveLi(n)})),i.menuSelected===e&&(n.className=i.current.collection.selectClass),n.innerHTML=i.current.collection.menuItemTemplate(t),r.appendChild(n)})),a.appendChild(r)}};"function"==typeof this.current.collection.values?this.current.collection.values(this.current.mentionText,n):n(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 n=document.body.createTextRange();n.moveToElementText(t),n.collapse(!1),n.select()}}},{key:"insertTextAtCursor",value:function(t){var e,i;(i=(e=window.getSelection()).getRangeAt(0)).deleteContents();var n=document.createTextNode(t);i.insertNode(n),i.selectNodeContents(n),i.collapse(!1),e.removeAllRanges(),e.addRange(i)}},{key:"insertAtCaret",value:function(t,e){var i=t.scrollTop,n=t.selectionStart,a=t.value.substring(0,n),o=t.value.substring(t.selectionEnd,t.value.length);t.value=a+e+o,n+=e.length,t.selectionStart=n,t.selectionEnd=n,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],n=this.current.collection.selectTemplate(i);null!==n&&this.replaceText(n,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 n=parseInt(t);if("number"!=typeof n)throw new Error("please provide an index for the collection to update.");var a=this.collection[n];this._append(a,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 container for the click");i.selectItemAtIndex(n.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 n=t.tribute.triggers().find((function(t){return t.charCodeAt(0)===i}));void 0!==n&&t.callbacks().triggerChar(e,this,n)}((t.tribute.current.trigger||t.tribute.autocompleteMode)&&!1===t.commandEvent||t.tribute.isActive&&8===e.keyCode)&&t.tribute.showMenuFor(this,!0)}}},{key:"shouldDeactivate",value:function(e){if(!this.tribute.isActive)return!1;if(0===this.tribute.current.mentionText.length){var i=!1;return t.keys().forEach((function(t){e.keyCode===t.key&&(i=!0)})),!i}return!1}},{key:"getKeyCode",value:function(t,e,i){var n=t.tribute,a=n.range.getTriggerInfo(!1,n.hasTrailingSpace,!0,n.allowSpaces,n.autocompleteMode);return!!a&&a.mentionTriggerChar.charCodeAt(0)}},{key:"updateSelection",value:function(t){this.tribute.current.element=t;var e=this.tribute.range.getTriggerInfo(!1,this.tribute.hasTrailingSpace,!0,this.tribute.allowSpaces,this.tribute.autocompleteMode);e&&(this.tribute.current.selectedPath=e.mentionSelectedPath,this.tribute.current.mentionText=e.mentionText,this.tribute.current.selectedOffset=e.mentionSelectedOffset)}},{key:"callbacks",value:function(){var t=this;return{triggerChar:function(e,i,n){var a=t.tribute;a.current.trigger=n;var o=a.collection.find((function(t){return t.trigger===n}));a.current.collection=o,a.inputEvent&&a.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 n=t.tribute.current.filteredItems.length,a=t.tribute.menuSelected;n>a&&a>0?(t.tribute.menuSelected--,t.setActiveLi()):0===a&&(t.tribute.menuSelected=n-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 n=t.tribute.current.filteredItems.length-1,a=t.tribute.menuSelected;n>a?(t.tribute.menuSelected++,t.setActiveLi()):n===a&&(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 n=0;nr.bottom){var s=o.bottom-r.bottom;this.tribute.menu.scrollTop+=s}else if(o.topn.width&&(a.left||a.right),r=window.innerHeight>n.height&&(a.top||a.bottom);(o||r)&&(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 n,a=t;if(e)for(var o=0;o=0&&(e=n.substring(0,a))}}else{var o=this.tribute.current.element;if(o){var r=o.selectionStart;o.value&&r>=0&&(e=o.value.substring(0,r))}}return e}},{key:"getLastWordInText",value:function(t){var e=(t=t.replace(/\u00A0/g," ")).split(" ");return e[e.length-1].trim()}},{key:"getTriggerInfo",value:function(t,e,i,n,a){var o,r,s,l=this,c=this.tribute.current;if(this.isContentEditable(c.element)){var u=this.getContentEditableSelectedPath(c);u&&(o=u.selected,r=u.path,s=u.offset)}else o=this.tribute.current.element;var d=this.getTextPrecedingCurrentSelection(),h=this.getLastWordInText(d);if(a)return{mentionPosition:d.length-h.length,mentionText:h,mentionSelectedElement:o,mentionSelectedPath:r,mentionSelectedOffset:s};if(null!=d){var p,f=-1;if(this.tribute.collection.forEach((function(t){var e=t.trigger,n=t.requireLeadingSpace?l.lastIndexWithLeadingSpace(d,e):d.lastIndexOf(e);n>f&&(f=n,p=e,i=t.requireLeadingSpace)})),f>=0&&(0===f||!i||/[\xA0\s]/g.test(d.substring(f-1,f)))){var m=d.substring(f+1,d.length);p=d.substring(f,f+1);var g=m.substring(0,1),v=m.length>0&&(" "===g||" "===g);e&&(m=m.trim());var b=n?/[^\S ]/g:/[\xA0\s]/g;if(this.tribute.hasTrailingSpace=b.test(m),!v&&(t||!b.test(m)))return{mentionPosition:f,mentionText:m,mentionSelectedElement:o,mentionSelectedPath:r,mentionSelectedOffset:s,mentionTriggerChar:p}}}}},{key:"lastIndexWithLeadingSpace",value:function(t,e){for(var i=t.split("").reverse().join(""),n=-1,a=0,o=t.length;aMath.ceil(o+i),bottom:c>Math.ceil(r+n),left:uparseInt(r.height)&&(o.overflowY="scroll")):o.overflow="hidden",a.textContent=t.value.substring(0,e),"INPUT"===t.nodeName&&(a.textContent=a.textContent.replace(/\s/g," "));var s=this.getDocument().createElement("span");s.textContent=t.value.substring(e)||".",a.appendChild(s);var l=t.getBoundingClientRect(),c=document.documentElement,u=(window.pageXOffset||c.scrollLeft)-(c.clientLeft||0),d=(window.pageYOffset||c.scrollTop)-(c.clientTop||0),h={top:l.top+d+s.offsetTop+parseInt(r.borderTopWidth)+parseInt(r.fontSize)-t.scrollTop,left:l.left+u+s.offsetLeft+parseInt(r.borderLeftWidth)},p=window.innerWidth,f=window.innerHeight,m=this.getMenuDimensions(),g=this.isMenuOffScreen(h,m);g.right&&(h.right=p-h.left,h.left="auto");var v=this.tribute.menuContainer?this.tribute.menuContainer.offsetHeight:this.getDocument().body.offsetHeight;if(g.bottom){var b=v-(f-(this.tribute.menuContainer?this.tribute.menuContainer.getBoundingClientRect():this.getDocument().body.getBoundingClientRect()).top);h.bottom=b+(f-l.top-s.offsetTop),h.top="auto"}return(g=this.isMenuOffScreen(h,m)).left&&(h.left=p>m.width?u+p-m.width:u,delete h.right),g.top&&(h.top=f>m.height?d+f-m.height:d,delete h.bottom),this.getDocument().body.removeChild(a),h}},{key:"getContentEditableCaretPosition",value:function(t){var e,i,n="sel_".concat((new Date).getTime(),"_").concat(Math.random().toString().substr(2)),a=this.getWindowSelection(),o=a.getRangeAt(0);(i=this.getDocument().createRange()).setStart(a.anchorNode,t),i.setEnd(a.anchorNode,t),i.collapse(!1),(e=this.getDocument().createElement("span")).id=n,e.appendChild(this.getDocument().createTextNode("\ufeff")),i.insertNode(e),a.removeAllRanges(),a.addRange(o);var r=e.getBoundingClientRect(),s=document.documentElement,l=(window.pageXOffset||s.scrollLeft)-(s.clientLeft||0),c=(window.pageYOffset||s.scrollTop)-(s.clientTop||0),u={left:r.left+l,top:r.top+e.offsetHeight+c},d=window.innerWidth,h=window.innerHeight,p=this.getMenuDimensions(),f=this.isMenuOffScreen(u,p);f.right&&(u.left="auto",u.right=d-r.left-l);var m=this.tribute.menuContainer?this.tribute.menuContainer.offsetHeight:this.getDocument().body.offsetHeight;if(f.bottom){var g=m-(h-(this.tribute.menuContainer?this.tribute.menuContainer.getBoundingClientRect():this.getDocument().body.getBoundingClientRect()).top);u.top="auto",u.bottom=g+(h-r.top)}return(f=this.isMenuOffScreen(u,p)).left&&(u.left=d>p.width?l+d-p.width:l,delete u.right),f.top&&(u.top=h>p.height?c+h-p.height:c,delete u.bottom),e.parentNode.removeChild(e),u}},{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 n=e.top,a=n+e.height;if(n<0)window.scrollTo(0,window.pageYOffset+e.top-20);else if(a>window.innerHeight){var o=window.pageYOffset+e.top-20;o-window.pageYOffset>100&&(o=window.pageYOffset+100);var r=window.pageYOffset-(window.innerHeight-a);r>o&&(r=o),window.scrollTo(0,r)}}}}])&&n(e.prototype,i),a&&n(e,a),t}();i.default=a,e.exports=i.default},{}],5:[function(t,e,i){"use strict";function n(t,e){for(var i=0;it.length-i)){for(var o,r,s=e[n],l=t.indexOf(s,i);l>-1;){if(a.push(l),r=this.traverse(t,e,l+1,n+1,a),a.pop(),!r)return o;(!o||o.score0&&(t[a-1]+1===n?i+=i+1:i=1),e+=i})),e}},{key:"render",value:function(t,e,i,n){var a=t.substring(0,e[0]);return e.forEach((function(o,r){a+=i+t[o]+n+t.substring(o+1,e[r+1]?e[r+1]:t.length)})),a}},{key:"filter",value:function(t,e,i){var n=this;return i=i||{},e.reduce((function(e,a,o,r){var s=a;i.extract&&((s=i.extract(a))||(s=""));var l=n.match(t,s,i);return null!=l&&(e[e.length]={string:l.rendered,score:l.score,index:o,original:a}),e}),[]).sort((function(t,e){var i=e.score-t.score;return i||t.index-e.index}))}}])&&n(e.prototype,i),a&&n(e,a),t}();i.default=a,e.exports=i.default},{}],6:[function(t,e,i){"use strict";var n;Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var a=((n=t("./Tribute"))&&n.__esModule?n:{default:n}).default;i.default=a,e.exports=i.default},{"./Tribute":1}],7:[function(t,e,i){"use strict";if(Array.prototype.find||(Array.prototype.find=function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,i=Object(this),n=i.length>>>0,a=arguments[1],o=0;o=0&&d.splice(e,1)}function v(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var n=function(){0;return i.nc}();n&&(t.attrs.nonce=n)}return b(e,t.attrs),m(t,e),e}function b(t,e){Object.keys(e).forEach((function(i){t.setAttribute(i,e[i])}))}function w(t,e){var i,n,a,o;if(e.transform&&t.css){if(!(o="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=o}if(e.singleton){var r=u++;i=c||(c=v(e)),n=C.bind(null,i,r,!1),a=C.bind(null,i,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(e,t.attrs),m(t,e),e}(e),n=k.bind(null,i,e),a=function(){g(i),i.href&&URL.revokeObjectURL(i.href)}):(i=v(e),n=_.bind(null,i),a=function(){g(i)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(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=r()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var i=f(t,e);return p(i,e),function(t){for(var n=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:{},o=a.search,r=a.autoSelect,c=void 0!==r&&r,u=a.setValue,d=void 0===u?function(){}:u,h=a.setAttribute,p=void 0===h?function(){}:h,f=a.onUpdate,m=void 0===f?function(){}:f,g=a.onSubmit,v=void 0===g?function(){}:g,b=a.onShow,w=void 0===b?function(){}:b,y=a.onHide,x=void 0===y?function(){}:y,C=a.onLoading,_=void 0===C?function(){}:C,k=a.onLoaded,T=void 0===k?function(){}:k;i(this,t),n(this,"value",""),n(this,"searchCounter",0),n(this,"results",[]),n(this,"selectedIndex",-1),n(this,"handleInput",(function(t){var i=t.target.value;e.updateResults(i),e.value=i})),n(this,"handleKeyDown",(function(t){var i=t.key;switch(i){case"Up":case"Down":case"ArrowUp":case"ArrowDown":var n="ArrowUp"===i||"Up"===i?e.selectedIndex-1:e.selectedIndex+1;t.preventDefault(),e.handleArrows(n);break;case"Tab":e.selectResult();break;case"Enter":var a=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(a);break;case"Esc":case"Escape":e.hideResults(),e.setValue();break;default:return}})),n(this,"handleFocus",(function(t){var i=t.target.value;e.updateResults(i),e.value=i})),n(this,"handleBlur",(function(){e.hideResults()})),n(this,"handleResultMouseDown",(function(t){t.preventDefault()})),n(this,"handleResultClick",(function(t){var i=t.target,n=s(i,"[data-result-index]");if(n){e.selectedIndex=parseInt(n.dataset.resultIndex,10);var a=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(a)}})),n(this,"handleArrows",(function(t){var i=e.results.length;e.selectedIndex=(t%i+i)%i,e.onUpdate(e.results,e.selectedIndex)})),n(this,"selectResult",(function(){var t=e.results[e.selectedIndex];t&&e.setValue(t),e.hideResults()})),n(this,"updateResults",(function(t){var i=++e.searchCounter;e.onLoading(),e.search(t).then((function(t){i===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())}))})),n(this,"showResults",(function(){e.setAttribute("aria-expanded",!0),e.onShow()})),n(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()})),n(this,"checkSelectedResultVisible",(function(t){var i=t.querySelector('[data-result-index="'.concat(e.selectedIndex,'"]'));if(i){var n=t.getBoundingClientRect(),a=i.getBoundingClientRect();a.topn.bottom&&(t.scrollTop+=a.bottom-n.bottom)}})),this.search=l(o)?o:function(t){return Promise.resolve(o(t))},this.autoSelect=c,this.setValue=d,this.setAttribute=p,this.onUpdate=m,this.onSubmit=v,this.onShow=w,this.onHide=x,this.onLoading=_,this.onLoaded=T},u=0,d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(t).concat(++u)};const h=function(t,e,i,n,a,o,r,s,l,c){"boolean"!=typeof r&&(l=s,s=r,r=!1);const u="function"==typeof i?i.options:i;let d;if(t&&t.render&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,a&&(u.functional=!0)),n&&(u._scopeId=n),o?(d=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(o)},u._ssrRegister=d):e&&(d=r?function(t){e.call(this,c(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),d)if(u.functional){const t=u.render;u.render=function(e,i){return d.call(i),t(e,i)}}else{const t=u.beforeCreate;u.beforeCreate=t?[].concat(t,d):[d]}return i}({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"root"},[t._t("default",[i("div",t._b({},"div",t.rootProps,!1),[i("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(" "),i("ul",t._g(t._b({ref:"resultList"},"ul",t.resultListProps,!1),t.resultListListeners),[t._l(t.results,(function(e,n){return[t._t("result",[i("li",t._b({key:t.resultProps[n].id},"li",t.resultProps[n],!1),[t._v("\n "+t._s(t.getResultValue(e))+"\n ")])],{result:e,props:t.resultProps[n]})]}))],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,i,n,a=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&&(a.handleInput=(t=a.handleInput,e=this.debounceTime,function(){var a=this,o=arguments,r=function(){n=null,i||t.apply(a,o)},s=i&&!n;clearTimeout(n),n=setTimeout(r,e),s&&t.apply(a,o)})),{core:a,value:this.defaultValue,resultListId:d("".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 o({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:n({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,i){return o({id:"".concat(t.baseClass,"-result-").concat(i),class:"".concat(t.baseClass,"-result"),"data-result-index":i,role:"option"},t.selectedIndex===i?{"aria-selected":"true"}:{})}))}},mounted:function(){document.body.addEventListener("click",this.handleDocumentClick)},beforeDestroy:function(){document.body.removeEventListener("click",this.handleDocumentClick)},updated:function(){var t,e,i,n;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,i=t.getBoundingClientRect(),n=e.getBoundingClientRect(),i.bottom+n.height>window.innerHeight&&window.innerHeight-i.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 p(t){p.installed||(p.installed=!0,t.component("Autocomplete",h))}var f,m={install:p};"undefined"!=typeof window?f=window.Vue:void 0!==t&&(f=t.Vue),f&&f.use(m),h.install=p,e.a=h}).call(this,i("yLpj"))},lcPr:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,a=i("urRO"),o=(n=a)&&n.__esModule?n:{default:n};var r="undefined"==typeof window?[String,Array]:[String,Array,Element,NodeList];e.default={render:function(t){var e=this.crossorigin||void 0;return t("div",{style:this.containerStyle},[t("img",{ref:"img",attrs:{src:this.src,alt:this.alt||"image",style:"max-width: 100%",crossorigin:e},on:this.$listeners,style:this.imgStyle})])},props:{containerStyle:Object,src:{type:String,default:""},alt:String,imgStyle:Object,viewMode:Number,dragMode:String,initialAspectRatio:Number,aspectRatio:Number,data:Object,preview:r,responsive:{type:Boolean,default:!0},restore:{type:Boolean,default:!0},checkCrossOrigin:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},crossorigin:{type:String},modal:{type:Boolean,default:!0},guides:{type:Boolean,default:!0},center:{type:Boolean,default:!0},highlight:{type:Boolean,default:!0},background:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!0},autoCropArea:Number,movable:{type:Boolean,default:!0},rotatable:{type:Boolean,default:!0},scalable:{type:Boolean,default:!0},zoomable:{type:Boolean,default:!0},zoomOnTouch:{type:Boolean,default:!0},zoomOnWheel:{type:Boolean,default:!0},wheelZoomRatio:Number,cropBoxMovable:{type:Boolean,default:!0},cropBoxResizable:{type:Boolean,default:!0},toggleDragModeOnDblclick:{type:Boolean,default:!0},minCanvasWidth:Number,minCanvasHeight:Number,minCropBoxWidth:Number,minCropBoxHeight:Number,minContainerWidth:Number,minContainerHeight:Number,ready:Function,cropstart:Function,cropmove:Function,cropend:Function,crop:Function,zoom:Function},mounted:function(){var t=this.$options.props,e=(t.containerStyle,t.src,t.alt,t.imgStyle,function(t,e){var i={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n]);return i}(t,["containerStyle","src","alt","imgStyle"])),i={};for(var n in e)void 0!==this[n]&&(i[n]=this[n]);this.cropper=new o.default(this.$refs.img,i)},methods:{reset:function(){return this.cropper.reset()},clear:function(){return this.cropper.clear()},initCrop:function(){return this.cropper.crop()},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.cropper.replace(t,e)},enable:function(){return this.cropper.enable()},disable:function(){return this.cropper.disable()},destroy:function(){return this.cropper.destroy()},move:function(t,e){return this.cropper.move(t,e)},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.cropper.moveTo(t,e)},relativeZoom:function(t,e){return this.cropper.zoom(t,e)},zoomTo:function(t,e){return this.cropper.zoomTo(t,e)},rotate:function(t){return this.cropper.rotate(t)},rotateTo:function(t){return this.cropper.rotateTo(t)},scaleX:function(t){return this.cropper.scaleX(t)},scaleY:function(t){return this.cropper.scaleY(t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.cropper.scale(t,e)},getData:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.cropper.getData(t)},setData:function(t){return this.cropper.setData(t)},getContainerData:function(){return this.cropper.getContainerData()},getImageData:function(){return this.cropper.getImageData()},getCanvasData:function(){return this.cropper.getCanvasData()},setCanvasData:function(t){return this.cropper.setCanvasData(t)},getCropBoxData:function(){return this.cropper.getCropBoxData()},setCropBoxData:function(t){return this.cropper.setCropBoxData(t)},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.cropper.getCroppedCanvas(t)},setAspectRatio:function(t){return this.cropper.setAspectRatio(t)},setDragMode:function(t){return this.cropper.setDragMode(t)}}}},urRO:function(t,e,i){t.exports=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var i=0;it.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&t<1/0};function O(t){return void 0===t}function B(e){return"object"===t(e)&&null!==e}var N=Object.prototype.hasOwnProperty;function j(t){if(!B(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&N.call(i,"isPrototypeOf")}catch(t){return!1}}function z(t){return"function"==typeof t}var H=Array.prototype.slice;function W(t){return Array.from?Array.from(t):H.call(t)}function U(t,e){return t&&z(e)&&(Array.isArray(t)||R(t.length)?W(t).forEach((function(i,n){e.call(t,i,n,t)})):B(t)&&Object.keys(t).forEach((function(i){e.call(t,t[i],i,t)}))),t}var Y=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n0&&i.forEach((function(e){B(e)&&Object.keys(e).forEach((function(i){t[i]=e[i]}))})),t},F=/\.\d*(?:0|9){12}\d*$/;function $(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return F.test(t)?Math.round(t*e)/e:t}var X=/^width|height|left|top|marginLeft|marginTop$/;function V(t,e){var i=t.style;U(e,(function(t,e){X.test(e)&&R(t)&&(t="".concat(t,"px")),i[e]=t}))}function q(t,e){if(e)if(R(t.length))U(t,(function(t){q(t,e)}));else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function Z(t,e){e&&(R(t.length)?U(t,(function(t){Z(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function Q(t,e,i){e&&(R(t.length)?U(t,(function(t){Q(t,e,i)})):i?q(t,e):Z(t,e))}var K=/([a-z\d])([A-Z])/g;function G(t){return t.replace(K,"$1-$2").toLowerCase()}function J(t,e){return B(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(G(e)))}function tt(t,e,i){B(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(G(e)),i)}var et=/\s\s*/,it=function(){var t=!1;if(l){var e=!1,i=function(){},n=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});c.addEventListener("test",i,n),c.removeEventListener("test",i,n)}return t}();function nt(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=i;e.trim().split(et).forEach((function(e){if(!it){var o=t.listeners;o&&o[e]&&o[e][i]&&(a=o[e][i],delete o[e][i],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,a,n)}))}function at(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=i;e.trim().split(et).forEach((function(e){if(n.once&&!it){var o=t.listeners,r=void 0===o?{}:o;a=function(){delete r[e][i],t.removeEventListener(e,a,n);for(var o=arguments.length,s=new Array(o),l=0;l1&&void 0!==arguments[1]?arguments[1]:"contain",o=I(n),r=I(i);if(o&&r){var s=i*e;"contain"===a&&s>n||"cover"===a&&s=8&&(o=l+u)}}}if(o){var d,h,p=i.getUint16(o,n);for(h=0;h=0?a:200),height:Math.max(i.offsetHeight,o>=0?o:100)};this.containerData=r,V(n,{width:r.width,height:r.height}),q(t,f),Z(n,f)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,n=Math.abs(e.rotate)%180==90,a=n?e.naturalHeight:e.naturalWidth,o=n?e.naturalWidth:e.naturalHeight,r=a/o,s=t.width,l=t.height;t.height*r>t.width?3===i?s=t.height*r:l=t.width/r:3===i?l=t.width/r:s=t.height*r;var c={aspectRatio:r,naturalWidth:a,naturalHeight:o,width:s,height:l};this.canvasData=c,this.limited=1===i||2===i,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=Y({},c)},limitCanvas:function(t,e){var i=this.options,n=this.containerData,a=this.canvasData,o=this.cropBoxData,r=i.viewMode,s=a.aspectRatio,l=this.cropped&&o;if(t){var c=Number(i.minCanvasWidth)||0,u=Number(i.minCanvasHeight)||0;r>1?(c=Math.max(c,n.width),u=Math.max(u,n.height),3===r&&(u*s>c?c=u*s:u=c/s)):r>0&&(c?c=Math.max(c,l?o.width:0):u?u=Math.max(u,l?o.height:0):l&&(c=o.width,(u=o.height)*s>c?c=u*s:u=c/s));var d=pt({aspectRatio:s,width:c,height:u});c=d.width,u=d.height,a.minWidth=c,a.minHeight=u,a.maxWidth=1/0,a.maxHeight=1/0}if(e)if(r>(l?0:1)){var h=n.width-a.width,p=n.height-a.height;a.minLeft=Math.min(0,h),a.minTop=Math.min(0,p),a.maxLeft=Math.max(0,h),a.maxTop=Math.max(0,p),l&&this.limited&&(a.minLeft=Math.min(o.left,o.left+(o.width-a.width)),a.minTop=Math.min(o.top,o.top+(o.height-a.height)),a.maxLeft=o.left,a.maxTop=o.top,2===r&&(a.width>=n.width&&(a.minLeft=Math.min(0,h),a.maxLeft=Math.max(0,h)),a.height>=n.height&&(a.minTop=Math.min(0,p),a.maxTop=Math.max(0,p))))}else a.minLeft=-a.width,a.minTop=-a.height,a.maxLeft=n.width,a.maxTop=n.height},renderCanvas:function(t,e){var i=this.canvasData,n=this.imageData;if(e){var a=function(t){var e=t.width,i=t.height,n=t.degree;if(90==(n=Math.abs(n)%180))return{width:i,height:e};var a=n%90*Math.PI/180,o=Math.sin(a),r=Math.cos(a),s=e*r+i*o,l=e*o+i*r;return n>90?{width:l,height:s}:{width:s,height:l}}({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),o=a.width,r=a.height,s=i.width*(o/i.naturalWidth),l=i.height*(r/i.naturalHeight);i.left-=(s-i.width)/2,i.top-=(l-i.height)/2,i.width=s,i.height=l,i.aspectRatio=o/r,i.naturalWidth=o,i.naturalHeight=r,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.widthi.maxHeight||i.heighte.width?a.height=a.width/i:a.width=a.height*i),this.cropBoxData=a,this.limitCropBox(!0,!0),a.width=Math.min(Math.max(a.width,a.minWidth),a.maxWidth),a.height=Math.min(Math.max(a.height,a.minHeight),a.maxHeight),a.width=Math.max(a.minWidth,a.width*n),a.height=Math.max(a.minHeight,a.height*n),a.left=e.left+(e.width-a.width)/2,a.top=e.top+(e.height-a.height)/2,a.oldLeft=a.left,a.oldTop=a.top,this.initialCropBoxData=Y({},a)},limitCropBox:function(t,e){var i=this.options,n=this.containerData,a=this.canvasData,o=this.cropBoxData,r=this.limited,s=i.aspectRatio;if(t){var l=Number(i.minCropBoxWidth)||0,c=Number(i.minCropBoxHeight)||0,u=r?Math.min(n.width,a.width,a.width+a.left,n.width-a.left):n.width,d=r?Math.min(n.height,a.height,a.height+a.top,n.height-a.top):n.height;l=Math.min(l,n.width),c=Math.min(c,n.height),s&&(l&&c?c*s>l?c=l/s:l=c*s:l?c=l/s:c&&(l=c*s),d*s>u?d=u/s:u=d*s),o.minWidth=Math.min(l,u),o.minHeight=Math.min(c,d),o.maxWidth=u,o.maxHeight=d}e&&(r?(o.minLeft=Math.max(0,a.left),o.minTop=Math.max(0,a.top),o.maxLeft=Math.min(n.width,a.left+a.width)-o.width,o.maxTop=Math.min(n.height,a.top+a.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=n.width-o.width,o.maxTop=n.height-o.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.widthi.maxHeight||i.height=e.width&&i.height>=e.height?"move":"all"),V(this.cropBox,Y({width:i.width,height:i.height},dt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),ot(this.element,"crop",this.getData())}},wt={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,n=e?this.crossOriginUrl:this.url,a=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=n,o.alt=a,this.viewBox.appendChild(o),this.viewBoxImage=o,i){var r=i;"string"==typeof i?r=t.ownerDocument.querySelectorAll(i):i.querySelector&&(r=[i]),this.previews=r,U(r,(function(t){var i=document.createElement("img");tt(t,y,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=n,i.alt=a,i.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(i)}))}},resetPreview:function(){U(this.previews,(function(t){var e=J(t,y);V(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(B(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(G(e)))}(t,y)}))},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,n=i.width,a=i.height,o=t.width,r=t.height,s=i.left-e.left-t.left,l=i.top-e.top-t.top;this.cropped&&!this.disabled&&(V(this.viewBoxImage,Y({width:o,height:r},dt(Y({translateX:-s,translateY:-l},t)))),U(this.previews,(function(e){var i=J(e,y),c=i.width,u=i.height,d=c,h=u,p=1;n&&(h=a*(p=c/n)),a&&h>u&&(d=n*(p=u/a),h=u),V(e,{width:d,height:h}),V(e.getElementsByTagName("img")[0],Y({width:o*p,height:r*p},dt(Y({translateX:-s*p,translateY:-l*p},t))))})))}},yt={bind:function(){var t=this.element,e=this.options,i=this.cropper;z(e.cropstart)&&at(t,"cropstart",e.cropstart),z(e.cropmove)&&at(t,"cropmove",e.cropmove),z(e.cropend)&&at(t,"cropend",e.cropend),z(e.crop)&&at(t,"crop",e.crop),z(e.zoom)&&at(t,"zoom",e.zoom),at(i,k,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&at(i,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&at(i,"dblclick",this.onDblclick=this.dblclick.bind(this)),at(t.ownerDocument,T,this.onCropMove=this.cropMove.bind(this)),at(t.ownerDocument,S,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&at(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;z(e.cropstart)&&nt(t,"cropstart",e.cropstart),z(e.cropmove)&&nt(t,"cropmove",e.cropmove),z(e.cropend)&&nt(t,"cropend",e.cropend),z(e.crop)&&nt(t,"crop",e.crop),z(e.zoom)&&nt(t,"zoom",e.zoom),nt(i,k,this.onCropStart),e.zoomable&&e.zoomOnWheel&&nt(i,"wheel",this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&nt(i,"dblclick",this.onDblclick),nt(t.ownerDocument,T,this.onCropMove),nt(t.ownerDocument,S,this.onCropEnd),e.responsive&&nt(window,"resize",this.onResize)}},xt={resize:function(){if(!this.disabled){var t,e,i=this.options,n=this.container,a=this.containerData,o=n.offsetWidth/a.width;1===o&&n.offsetHeight===a.height||(i.restore&&(t=this.getCanvasData(),e=this.getCropBoxData()),this.render(),i.restore&&(this.setCanvasData(U(t,(function(e,i){t[i]=e*o}))),this.setCropBoxData(U(e,(function(t,i){e[i]=t*o})))))}},dblclick:function(){var t,e;this.disabled||"none"===this.options.dragMode||this.setDragMode((t=this.dragBox,e=h,(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)?"move":"crop"))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(R(e)&&1!==e||R(i)&&0!==i||t.ctrlKey))){var n,a=this.options,o=this.pointers;t.changedTouches?U(t.changedTouches,(function(t){o[t.identifier]=ht(t)})):o[t.pointerId||0]=ht(t),n=Object.keys(o).length>1&&a.zoomable&&a.zoomOnTouch?"zoom":J(t.target,w),M.test(n)&&!1!==ot(this.element,"cropstart",{originalEvent:t,action:n})&&(t.preventDefault(),this.action=n,this.cropping=!1,"crop"===n&&(this.cropping=!0,q(this.dragBox,v)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==ot(this.element,"cropmove",{originalEvent:t,action:e})&&(t.changedTouches?U(t.changedTouches,(function(t){Y(i[t.identifier]||{},ht(t,!0))})):Y(i[t.pointerId||0]||{},ht(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?U(t.changedTouches,(function(t){delete i[t.identifier]})):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,Q(this.dragBox,v,this.cropped&&this.options.modal)),ot(this.element,"cropend",{originalEvent:t,action:e}))}}},Ct={change:function(t){var e,i=this.options,n=this.canvasData,a=this.containerData,r=this.cropBoxData,s=this.pointers,l=this.action,c=i.aspectRatio,u=r.left,d=r.top,h=r.width,p=r.height,m=u+h,g=d+p,v=0,b=0,w=a.width,y=a.height,x=!0;!c&&t.shiftKey&&(c=h&&p?h/p:1),this.limited&&(v=r.minLeft,b=r.minTop,w=v+Math.min(a.width,n.width,n.left+n.width),y=b+Math.min(a.height,n.height,n.top+n.height));var C=s[Object.keys(s)[0]],_={x:C.endX-C.startX,y:C.endY-C.startY},k=function(t){switch(t){case"e":m+_.x>w&&(_.x=w-m);break;case"w":u+_.xy&&(_.y=y-g)}};switch(l){case"all":u+=_.x,d+=_.y;break;case"e":if(_.x>=0&&(m>=w||c&&(d<=b||g>=y))){x=!1;break}k("e"),(h+=_.x)<0&&(l="w",u-=h=-h),c&&(p=h/c,d+=(r.height-p)/2);break;case"n":if(_.y<=0&&(d<=b||c&&(u<=v||m>=w))){x=!1;break}k("n"),p-=_.y,d+=_.y,p<0&&(l="s",d-=p=-p),c&&(h=p*c,u+=(r.width-h)/2);break;case"w":if(_.x<=0&&(u<=v||c&&(d<=b||g>=y))){x=!1;break}k("w"),h-=_.x,u+=_.x,h<0&&(l="e",u-=h=-h),c&&(p=h/c,d+=(r.height-p)/2);break;case"s":if(_.y>=0&&(g>=y||c&&(u<=v||m>=w))){x=!1;break}k("s"),(p+=_.y)<0&&(l="n",d-=p=-p),c&&(h=p*c,u+=(r.width-h)/2);break;case"ne":if(c){if(_.y<=0&&(d<=b||m>=w)){x=!1;break}k("n"),p-=_.y,d+=_.y,h=p*c}else k("n"),k("e"),_.x>=0?mb&&(p-=_.y,d+=_.y):(p-=_.y,d+=_.y);h<0&&p<0?(l="sw",d-=p=-p,u-=h=-h):h<0?(l="nw",u-=h=-h):p<0&&(l="se",d-=p=-p);break;case"nw":if(c){if(_.y<=0&&(d<=b||u<=v)){x=!1;break}k("n"),p-=_.y,d+=_.y,h=p*c,u+=r.width-h}else k("n"),k("w"),_.x<=0?u>v?(h-=_.x,u+=_.x):_.y<=0&&d<=b&&(x=!1):(h-=_.x,u+=_.x),_.y<=0?d>b&&(p-=_.y,d+=_.y):(p-=_.y,d+=_.y);h<0&&p<0?(l="se",d-=p=-p,u-=h=-h):h<0?(l="ne",u-=h=-h):p<0&&(l="sw",d-=p=-p);break;case"sw":if(c){if(_.x<=0&&(u<=v||g>=y)){x=!1;break}k("w"),h-=_.x,u+=_.x,p=h/c}else k("s"),k("w"),_.x<=0?u>v?(h-=_.x,u+=_.x):_.y>=0&&g>=y&&(x=!1):(h-=_.x,u+=_.x),_.y>=0?g=0&&(m>=w||g>=y)){x=!1;break}k("e"),p=(h+=_.x)/c}else k("s"),k("e"),_.x>=0?m=0&&g>=y&&(x=!1):h+=_.x,_.y>=0?gMath.abs(i)&&(i=l)}))})),i}(s),t),x=!1;break;case"crop":if(!_.x||!_.y){x=!1;break}e=rt(this.cropper),u=C.startX-e.left,d=C.startY-e.top,h=r.minWidth,p=r.minHeight,_.x>0?l=_.y>0?"se":"ne":_.x<0&&(u-=h,l=_.y>0?"sw":"nw"),_.y<0&&(d-=p),this.cropped||(Z(this.cropBox,f),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}x&&(r.width=h,r.height=p,r.left=u,r.top=d,this.action=l,this.renderCropBox()),U(s,(function(t){t.startX=t.endX,t.startY=t.endY}))}},_t={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&q(this.dragBox,v),Z(this.cropBox,f),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Y({},this.initialImageData),this.canvasData=Y({},this.initialCanvasData),this.cropBoxData=Y({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Y(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Z(this.dragBox,v),q(this.cropBox,f)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,U(this.previews,(function(e){e.getElementsByTagName("img")[0].src=t})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Z(this.cropper,p)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,q(this.cropper,p)),this},destroy:function(){var t=this.element;return t.cropper?(t.cropper=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,n=i.left,a=i.top;return this.moveTo(O(t)?t:n+Number(t),O(e)?e:a+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(R(t)&&(i.left=t,n=!0),R(e)&&(i.top=e,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var n=this.options,a=this.canvasData,o=a.width,r=a.height,s=a.naturalWidth,l=a.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&n.zoomable){var c=s*t,u=l*t;if(!1===ot(this.element,"zoom",{ratio:t,oldRatio:o/s,originalEvent:i}))return this;if(i){var d=this.pointers,h=rt(this.cropper),p=d&&Object.keys(d).length?function(t){var e=0,i=0,n=0;return U(t,(function(t){var a=t.startX,o=t.startY;e+=a,i+=o,n+=1})),{pageX:e/=n,pageY:i/=n}}(d):{pageX:i.pageX,pageY:i.pageY};a.left-=(c-o)*((p.pageX-h.left-a.left)/o),a.top-=(u-r)*((p.pageY-h.top-a.top)/r)}else j(e)&&R(e.x)&&R(e.y)?(a.left-=(c-o)*((e.x-a.left)/o),a.top-=(u-r)*((e.y-a.top)/r)):(a.left-=(c-o)/2,a.top-=(u-r)/2);a.width=c,a.height=u,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return R(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,R(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(R(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(R(t)&&(i.scaleX=t,n=!0),R(e)&&(i.scaleY=e,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,n=this.imageData,a=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-a.left,y:o.top-a.top,width:o.width,height:o.height};var r=n.width/n.naturalWidth;if(U(t,(function(e,i){t[i]=e/r})),e){var s=Math.round(t.y+t.height),l=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=l-t.x,t.height=s-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=n.rotate||0),i.scalable&&(t.scaleX=n.scaleX||1,t.scaleY=n.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,n=this.canvasData,a={};if(this.ready&&!this.disabled&&j(t)){var o=!1;e.rotatable&&R(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(R(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),R(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var r=i.width/i.naturalWidth;R(t.x)&&(a.left=t.x*r+n.left),R(t.y)&&(a.top=t.y*r+n.top),R(t.width)&&(a.width=t.width*r),R(t.height)&&(a.height=t.height*r),this.setCropBoxData(a)}return this},getContainerData:function(){return this.ready?Y({},this.containerData):{}},getImageData:function(){return this.sized?Y({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&U(["left","top","width","height","naturalWidth","naturalHeight"],(function(i){e[i]=t[i]})),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&j(t)&&(R(t.left)&&(e.left=t.left),R(t.top)&&(e.top=t.top),R(t.width)?(e.width=t.width,e.height=t.width/i):R(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,n=this.cropBoxData,a=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&j(t)&&(R(t.left)&&(n.left=t.left),R(t.top)&&(n.top=t.top),R(t.width)&&t.width!==n.width&&(e=!0,n.width=t.width),R(t.height)&&t.height!==n.height&&(i=!0,n.height=t.height),a&&(e?n.height=n.width/a:i&&(n.width=n.height*a)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=ft(this.image,this.imageData,e,t);if(!this.cropped)return i;var n=this.getData(),a=n.x,o=n.y,s=n.width,l=n.height,c=i.width/Math.floor(e.naturalWidth);1!==c&&(a*=c,o*=c,s*=c,l*=c);var u=s/l,d=pt({aspectRatio:u,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),h=pt({aspectRatio:u,width:t.minWidth||0,height:t.minHeight||0},"cover"),p=pt({aspectRatio:u,width:t.width||(1!==c?i.width:s),height:t.height||(1!==c?i.height:l)}),f=p.width,m=p.height;f=Math.min(d.width,Math.max(h.width,f)),m=Math.min(d.height,Math.max(h.height,m));var g=document.createElement("canvas"),v=g.getContext("2d");g.width=$(f),g.height=$(m),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,f,m);var b=t.imageSmoothingEnabled,w=void 0===b||b,y=t.imageSmoothingQuality;v.imageSmoothingEnabled=w,y&&(v.imageSmoothingQuality=y);var x,C,_,k,T,S,M=i.width,D=i.height,E=a,A=o;E<=-s||E>M?(E=0,x=0,_=0,T=0):E<=0?(_=-E,E=0,T=x=Math.min(M,s+E)):E<=M&&(_=0,T=x=Math.min(s,M-E)),x<=0||A<=-l||A>D?(A=0,C=0,k=0,S=0):A<=0?(k=-A,A=0,S=C=Math.min(D,l+A)):A<=D&&(k=0,S=C=Math.min(l,D-A));var L=[E,A,x,C];if(T>0&&S>0){var P=f/s;L.push(_*P,k*P,T*P,S*P)}return v.drawImage.apply(v,[i].concat(r(L.map((function(t){return Math.floor($(t))}))))),g},setAspectRatio:function(t){var e=this.options;return this.disabled||O(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var a="crop"===t,o=e.movable&&"move"===t;t=a||o?t:"none",e.dragMode=t,tt(i,w,t),Q(i,h,a),Q(i,b,o),e.cropBoxMovable||(tt(n,w,t),Q(n,h,a),Q(n,b,o))}return this}},kt=c.Cropper,Tt=function(){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e(this,t),!i||!A.test(i.tagName))throw new Error("The first argument is required and must be an or element.");this.element=i,this.options=Y({},L,j(n)&&n),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}var n,a,o;return n=t,o=[{key:"noConflict",value:function(){return window.Cropper=kt,t}},{key:"setDefaults",value:function(t){Y(L,j(t)&&t)}}],(a=[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e.cropper){if(e.cropper=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var i=this.element,n=this.options;if(n.rotatable||n.scalable||(n.checkOrientation=!1),n.checkOrientation&&window.ArrayBuffer)if(D.test(t))E.test(t)?this.read((a=t.replace(gt,""),o=atob(a),r=new ArrayBuffer(o.length),U(s=new Uint8Array(r),(function(t,e){s[e]=o.charCodeAt(e)})),r)):this.clone();else{var a,o,r,s,l=new XMLHttpRequest,c=this.clone.bind(this);this.reloading=!0,this.xhr=l,l.onabort=c,l.onerror=c,l.ontimeout=c,l.onprogress=function(){"image/jpeg"!==l.getResponseHeader("content-type")&&l.abort()},l.onload=function(){e.read(l.response)},l.onloadend=function(){e.reloading=!1,e.xhr=null},n.checkCrossOrigin&&ct(t)&&i.crossOrigin&&(t=ut(t)),l.open("GET",t),l.responseType="arraybuffer",l.withCredentials="use-credentials"===i.crossOrigin,l.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,n=vt(t),a=0,o=1,r=1;if(n>1){this.url=function(t,e){for(var i=[],n=new Uint8Array(t);n.length>0;)i.push(mt.apply(null,W(n.subarray(0,8192)))),n=n.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,"image/jpeg");var s=function(t){var e=0,i=1,n=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:n=-1;break;case 5:e=90,n=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:n}}(n);a=s.rotate,o=s.scaleX,r=s.scaleY}e.rotatable&&(i.rotate=a),e.scalable&&(i.scaleX=o,i.scaleY=r),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,n=e;this.options.checkCrossOrigin&&ct(e)&&(i||(i="anonymous"),n=ut(e)),this.crossOrigin=i,this.crossOriginUrl=n;var a=document.createElement("img");i&&(a.crossOrigin=i),a.src=n||e,a.alt=t.alt||"The image to crop",this.image=a,a.onload=this.start.bind(this),a.onerror=this.stop.bind(this),q(a,m),t.parentNode.insertBefore(a,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=c.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(c.navigator.userAgent),n=function(e,i){Y(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.initialImageData=Y({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var a=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=a,a.onload=function(){n(a.width,a.height),i||o.removeChild(a)},a.src=e.src,i||(a.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(a))}else n(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,n=t.parentNode,a=document.createElement("div");a.innerHTML='
';var o=a.querySelector(".".concat("cropper","-container")),r=o.querySelector(".".concat("cropper","-canvas")),s=o.querySelector(".".concat("cropper","-drag-box")),l=o.querySelector(".".concat("cropper","-crop-box")),c=l.querySelector(".".concat("cropper","-face"));this.container=n,this.cropper=o,this.canvas=r,this.dragBox=s,this.cropBox=l,this.viewBox=o.querySelector(".".concat("cropper","-view-box")),this.face=c,r.appendChild(i),q(t,f),n.insertBefore(o,t.nextSibling),this.isImg||Z(i,m),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,q(l,f),e.guides||q(l.getElementsByClassName("".concat("cropper","-dashed")),f),e.center||q(l.getElementsByClassName("".concat("cropper","-center")),f),e.background&&q(o,"".concat("cropper","-bg")),e.highlight||q(c,g),e.cropBoxMovable&&(q(c,b),tt(c,w,"all")),e.cropBoxResizable||(q(l.getElementsByClassName("".concat("cropper","-line")),f),q(l.getElementsByClassName("".concat("cropper","-point")),f)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),z(e.ready)&&at(t,"ready",e.ready,{once:!0}),ot(t,"ready")}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),Z(this.element,f))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&i(n.prototype,a),o&&i(n,o),t}();return Y(Tt.prototype,bt,wt,yt,xt,Ct,_t),Tt}()},yLpj:function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},zlB4:function(t,e,i){"use strict";i.r(e);var n=i("lcPr"),a=i.n(n),o=(i("YQfW"),i("lb/t")),r=(i("i3gq"),i("JMt0"));function s(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var l={components:{VueCropper:a.a,Autocomplete:o.a,VueTribute:r.a},data:function(){var t;return s(t={config:window.App.config,pageLoading:!1,profile:window._sharedData.curUser,composeText:"",composeTextLength:0,nsfw:!1,filters:[],currentFilter:!1,ids:[],media:[],carouselCursor:0,uploading:!1,uploadProgress:100,composeType:!1,page:1,composeState:"publish",visibility:"public",visibilityTag:"Public"},"nsfw",!1),s(t,"place",!1),s(t,"commentsDisabled",!1),s(t,"optimizeMedia",!0),s(t,"mediaCropped",!1),s(t,"pageTitle",""),s(t,"cropper",{aspectRatio:1,viewMode:1,zoomable:!0,zoom:0}),s(t,"namedPages",["cropPhoto","tagPeople","addLocation","advancedSettings","visibility","altText","addToCollection","schedulePost","mediaMetadata","addToStory","editMedia","cameraRoll","tagPeopleHelp","textOptions"]),s(t,"cameraRollMedia",[]),s(t,"taggedUsernames",[]),s(t,"taggedPeopleSearch",null),s(t,"textMode",!1),s(t,"tributeSettings",{collection:[{trigger:"@",menuShowMinLength:2,values:function(t,e){axios.get("/api/compose/v0/search/mention",{params:{q:t}}).then((function(t){e(t.data)})).catch((function(t){console.log(t)}))}},{trigger:"#",menuShowMinLength:2,values:function(t,e){axios.get("/api/compose/v0/search/hashtag",{params:{q:t}}).then((function(t){e(t.data)})).catch((function(t){console.log(t)}))}}]}),t},beforeMount:function(){this.fetchProfile(),0==this.config.uploader.media_types.includes("video/mp4")&&(this.composeType="post"),this.filters=window.App.util.filters},mounted:function(){this.mediaWatcher()},methods:{fetchProfile:function(){var t=this;window._sharedData.curUser.id?(this.profile=window._sharedData.curUser,1==this.profile.locked&&(this.visibility="private",this.visibilityTag="Followers Only")):axios.get("/api/pixelfed/v1/accounts/verify_credentials").then((function(e){window._sharedData.currentUser=e.data,t.profile=e.data,1==t.profile.locked&&(t.visibility="private",t.visibilityTag="Followers Only")})).catch((function(t){}))},addMedia:function(t){var e=$(t.target);e.attr("disabled",""),$('.file-input[name="media"]').trigger("click"),e.blur(),e.removeAttr("disabled")},addText:function(t){this.pageTitle="New Text Post",this.page="addText",this.textMode=!0},mediaWatcher:function(){var t=this;$(document).on("change","#pf-dz",(function(e){t.mediaUpload()}))},mediaUpload:function(){var t=this;t.uploading=!0;var e=document.querySelector("#pf-dz");e.files.length||(t.uploading=!1),Array.prototype.forEach.call(e.files,(function(e,i){if(t.media&&t.media.length+i>=t.config.uploader.album_limit)return swal("Error","You can only upload "+t.config.uploader.album_limit+" photos per album","error"),t.uploading=!1,void(t.page=2);var n=e.type,a=t.config.uploader.media_types.split(",");if(-1==$.inArray(n,a))return swal("Invalid File Type","The file you are trying to add is not a valid mime type. Please upload a "+t.config.uploader.media_types+" only.","error"),t.uploading=!1,void(t.page=2);var o=new FormData;o.append("file",e);var r={onUploadProgress:function(e){var i=Math.round(100*e.loaded/e.total);t.uploadProgress=i}};axios.post("/api/compose/v0/media/upload",o,r).then((function(e){t.uploadProgress=100,t.ids.push(e.data.id),t.media.push(e.data),t.uploading=!1,setTimeout((function(){t.page=2}),300)})).catch((function(i){switch(i.response.status){case 451:t.uploading=!1,e.value=null,swal("Banned Content","This content has been banned and cannot be uploaded.","error"),t.page=2;break;case 429:t.uploading=!1,e.value=null,swal("Limit Reached","You can upload up to 250 photos or videos per day and you've reached that limit. Please try again later.","error"),t.page=2;break;default:t.uploading=!1,e.value=null,swal("Oops, something went wrong!","An unexpected error occurred.","error"),t.page=2}})),e.value=null,t.uploadProgress=0}))},toggleFilter:function(t,e){this.media[this.carouselCursor].filter_class=e,this.currentFilter=e},deleteMedia:function(){var t=this;if(0!=window.confirm("Are you sure you want to delete this media?")){var e=this.media[this.carouselCursor].id;axios.delete("/api/compose/v0/media/delete",{params:{id:e}}).then((function(e){t.ids.splice(t.carouselCursor,1),t.media.splice(t.carouselCursor,1),0==t.media.length?(t.ids=[],t.media=[],t.carouselCursor=0):t.carouselCursor=0})).catch((function(t){swal("Whoops!","An error occured when attempting to delete this, please try again","error")}))}},compose:function(){var t=this.composeState;if(100==this.uploadProgress&&0!=this.ids.length)if(this.composeText.length>this.config.uploader.max_caption_length)swal("Error","Caption is too long","error");else switch(t){case"publish":if(0==this.media.length)return void swal("Whoops!","You need to add media before you can save this!","warning");"Add optional caption..."==this.composeText&&(this.composeText="");var e={media:this.media,caption:this.composeText,visibility:this.visibility,cw:this.nsfw,comments_disabled:this.commentsDisabled,place:this.place,tagged:this.taggedUsernames,optimize_media:this.optimizeMedia};return void axios.post("/api/compose/v0/publish",e).then((function(t){var e=t.data;window.location.href=e})).catch((function(t){var e=t.response.data.message?t.response.data.message:"An unexpected error occured.";swal("Oops, something went wrong!",e,"error")}));case"delete":return this.ids=[],this.media=[],this.carouselCursor=0,this.composeText="",this.composeTextLength=0,void $("#composeModal").modal("hide")}},composeTextPost:function(){var t=this.composeState;if(this.composeText.length>this.config.uploader.max_caption_length)swal("Error","Caption is too long","error");else switch(t){case"publish":var e={caption:this.composeText,visibility:this.visibility,cw:this.nsfw,comments_disabled:this.commentsDisabled,place:this.place,tagged:this.taggedUsernames};return void axios.post("/api/compose/v0/publish/text",e).then((function(t){var e=t.data;window.location.href=e})).catch((function(t){var e=t.response.data.message?t.response.data.message:"An unexpected error occured.";swal("Oops, something went wrong!",e,"error")}));case"delete":return this.ids=[],this.media=[],this.carouselCursor=0,this.composeText="",this.composeTextLength=0,void $("#composeModal").modal("hide")}},closeModal:function(){this.composeType="",$("#composeModal").modal("hide")},goBack:function(){switch(this.pageTitle="",this.page){case"addText":this.page=1;break;case"textOptions":this.page="addText";break;case"cropPhoto":case"editMedia":this.page=2;break;case"tagPeopleHelp":this.showTagCard();break;default:-1!=this.namedPages.indexOf(this.page)?this.page=this.textMode?"addText":3:this.textMode||this.page--}},nextPage:function(){switch(this.pageTitle="",this.page){case 1:this.page=2;break;case"cropPhoto":this.pageLoading=!0;var t=this;this.$refs.cropper.getCroppedCanvas({maxWidth:4096,maxHeight:4096,fillColor:"#fff",imageSmoothingEnabled:!1,imageSmoothingQuality:"high"}).toBlob((function(e){t.mediaCropped=!0;var i=new FormData;i.append("file",e),i.append("id",t.ids[t.carouselCursor]);axios.post("/api/compose/v0/media/update",i).then((function(e){t.media[t.carouselCursor].url=e.data.url,t.pageLoading=!1,t.page=2})).catch((function(t){}))}));break;case 2:this.currentFilter?window.confirm("Are you sure you want to apply this filter?")&&(this.applyFilterToMedia(),this.page++):this.page++;break;case 3:this.page++}},rotate:function(){this.$refs.cropper.rotate(90)},changeAspect:function(t){this.cropper.aspectRatio=t,this.$refs.cropper.setAspectRatio(t)},showTagCard:function(){this.pageTitle="Tag People",this.page="tagPeople"},showTagHelpCard:function(){this.pageTitle="About Tag People",this.page="tagPeopleHelp"},showLocationCard:function(){this.pageTitle="Add Location",this.page="addLocation"},showAdvancedSettingsCard:function(){this.pageTitle="Advanced Settings",this.page="advancedSettings"},locationSearch:function(t){if(t.length<1)return[];return axios.get("/api/compose/v0/search/location",{params:{q:t}}).then((function(t){return t.data}))},getResultValue:function(t){return t.name+", "+t.country},onSubmitLocation:function(t){this.place=t,this.pageTitle=this.textMode?"New Text Post":"",this.page=this.textMode?"addText":3},showVisibilityCard:function(){this.pageTitle="Post Visibility",this.page="visibility"},showAddToStoryCard:function(){this.pageTitle="Add to Story",this.page="addToStory"},showCropPhotoCard:function(){this.pageTitle="Edit Photo",this.page="cropPhoto"},toggleVisibility:function(t){this.visibility=t,this.visibilityTag={public:"Public",private:"Followers Only",unlisted:"Unlisted"}[t],this.pageTitle="",this.page=this.textMode?"addText":3},showMediaDescriptionsCard:function(){this.pageTitle="Media Descriptions",this.page="altText"},showAddToCollectionsCard:function(){this.pageTitle="Add to Collection",this.page="addToCollection"},showSchedulePostCard:function(){this.pageTitle="Schedule Post",this.page="schedulePost"},showEditMediaCard:function(){this.pageTitle="Edit Media",this.page="editMedia"},fetchCameraRollDrafts:function(){var t=this;axios.get("/api/pixelfed/local/drafts").then((function(e){t.cameraRollMedia=e.data}))},applyFilterToMedia:function(){var t=navigator.userAgent.toLowerCase();if(-1!=t.indexOf("firefox")||-1!=t.indexOf("chrome"))for(var e=this.media,i=null,n=document.getElementById("pr_canvas"),a=n.getContext("2d"),o=document.getElementById("pr_img"),r=null,s=e.length-1;s>=0;s--)(i=e[s]).filter_class&&(o.src=i.url,o.addEventListener("load",(function(t){n.width=o.width,n.height=o.height,a.filter=App.util.filterCss[i.filter_class],a.drawImage(o,0,0,o.width,o.height),a.save(),n.toBlob((function(t){(r=new FormData).append("file",t),r.append("id",i.id),axios.post("/api/compose/v0/media/update",r).then((function(t){})).catch((function(t){}))}))}),i.mime,.9),a.clearRect(0,0,o.width,o.height));else swal("Oops!","Your browser does not support the filter feature.","error")},tagSearch:function(t){if(t.length<1)return[];var e=this;return axios.get("/api/compose/v0/search/tag",{params:{q:t}}).then((function(t){if(t.data.length)return t.data.filter((function(t){return 0==e.taggedUsernames.filter((function(e){return e.id==t.id})).length}))}))},getTagResultValue:function(t){return"@"+t.name},onTagSubmitLocation:function(t){this.taggedUsernames.filter((function(e){return e.id==t.id})).length||(this.taggedUsernames.push(t),this.$refs.autocomplete.value="")},untagUsername:function(t){this.taggedUsernames.splice(t,1)},showTextOptions:function(){this.page="textOptions",this.pageTitle="Text Post Options"}}},c=(i("lDQ0"),i("KHd+")),u=Object(c.a)(l,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("input",{staticClass:"w-100 h-100 d-none file-input",attrs:{type:"file",id:"pf-dz",name:"media",accept:t.config.uploader.media_types}}),t._v(" "),i("canvas",{staticClass:"d-none",attrs:{id:"pr_canvas"}}),t._v(" "),i("img",{staticClass:"d-none",attrs:{id:"pr_img"}}),t._v(" "),i("div",{staticClass:"timeline"},[t.uploading?i("div",[i("div",{staticClass:"card status-card card-md-rounded-0 w-100 h-100 bg-light py-3",staticStyle:{"border-bottom":"1px solid #f1f1f1"}},[i("div",{staticClass:"p-5 mt-2"},[i("b-progress",{attrs:{value:t.uploadProgress,max:100,striped:"",animated:!0}}),t._v(" "),i("p",{staticClass:"text-center mb-0 font-weight-bold"},[t._v("Uploading ... ("+t._s(t.uploadProgress)+"%)")])],1)])]):"cameraRoll"==t.page?i("div",[i("div",{staticClass:"card status-card card-md-rounded-0",staticStyle:{display:"flex"}},[t._m(0),t._v(" "),i("div",{staticClass:"h-100 card-body p-0 border-top",staticStyle:{width:"100%","min-height":"400px"}},[t.cameraRollMedia.length>0?i("div",{staticClass:"row p-0 m-0"},t._l(t.cameraRollMedia,(function(t,e){return i("div",{class:[0==e?"col-12 p-0":"col-3 p-0"]},[i("div",{staticClass:"card info-overlay p-0 rounded-0 shadow-none border"},[i("div",{staticClass:"square"},[i("img",{staticClass:"square-content",attrs:{src:t.preview_url}})])])])})),0):i("div",{staticClass:"w-100 h-100 d-flex justify-content-center align-items-center"},[i("span",{staticClass:"w-100 h-100"},[i("button",{staticClass:"btn btn-primary",attrs:{type:"button"}},[t._v("Upload")]),t._v(" "),i("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(e){return t.fetchCameraRollDrafts()}}},[t._v("Load Camera Roll")])])])])])]):i("div",[i("div",{staticClass:"card status-card card-md-rounded-0 w-100 h-100",staticStyle:{display:"flex"}},[i("div",{staticClass:"card-header d-inline-flex align-items-center justify-content-between bg-white"},[i("div",[1==t.page?i("a",{staticClass:"font-weight-bold text-decoration-none text-muted",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.closeModal()}}},[i("i",{staticClass:"fas fa-times fa-lg"}),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]):2==t.page?i("span",[t.config.uploader.album_limit>t.media.length?i("button",{staticClass:"btn btn-outline-primary btn-sm font-weight-bold",attrs:{id:"cm-add-media-btn"},on:{click:function(e){return e.preventDefault(),t.addMedia(e)}}},[i("i",{staticClass:"fas fa-plus"})]):i("button",{staticClass:"btn btn-outline-secondary btn-sm font-weight-bold",attrs:{disabled:""}},[i("i",{staticClass:"fas fa-plus"})]),t._v(" "),i("b-tooltip",{attrs:{target:"cm-add-media-btn",triggers:"hover"}},[t._v("\n\t\t\t\t\t\t\t\tUpload another photo or video\n\t\t\t\t\t\t\t")])],1):3==t.page?i("span",[i("a",{staticClass:"text-lighter text-decoration-none mr-3 d-flex align-items-center",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goBack()}}},[i("i",{staticClass:"fas fa-long-arrow-alt-left fa-lg mr-2"}),t._v(" "),i("span",{staticClass:"btn btn-outline-secondary btn-sm px-2 py-0 disabled",attrs:{disabled:""}},[t._v(t._s(t.media.length))])]),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]):i("span",[i("a",{staticClass:"text-lighter text-decoration-none mr-3",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goBack()}}},[i("i",{staticClass:"fas fa-long-arrow-alt-left fa-lg"})])]),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]),t._v(" "),2==t.page?i("div",[1==t.media.length?i("a",{staticClass:"text-center text-dark",attrs:{href:"#",title:"Crop & Resize",id:"cm-crop-btn"},on:{click:function(e){return e.preventDefault(),t.showCropPhotoCard(e)}}},[i("i",{staticClass:"fas fa-crop-alt fa-lg"})]):t._e(),t._v(" "),i("b-tooltip",{attrs:{target:"cm-crop-btn",triggers:"hover"}},[t._v("\n\t\t\t\t\t\t\tCrop & Resize\n\t\t\t\t\t\t")])],1):t._e(),t._v(" "),i("div",[t.pageLoading?i("span",[t._m(1)]):i("span",[!t.pageLoading&&t.page>1&&t.page<=2||1==t.page&&0!=t.ids.length||"cropPhoto"==t.page?i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.nextPage(e)}}},[t._v("Next")]):t._e(),t._v(" "),t.pageLoading||3!=t.page?t._e():i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.compose()}}},[t._v("Post")]),t._v(" "),t.pageLoading||"addText"!=t.page?t._e():i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.composeTextPost()}}},[t._v("Post")])])])]),t._v(" "),i("div",{staticClass:"card-body p-0 border-top"},["textOptions"==t.page?i("div",{staticClass:"w-100 h-100",staticStyle:{"min-height":"280px"}},[t._v("\n\t\t\t\t\t\ttest\n\t\t\t\t\t")]):t._e(),t._v(" "),"addText"==t.page?i("div",{staticClass:"w-100 h-100",staticStyle:{"min-height":"280px"}},[i("div",{staticClass:"mt-2"},[i("div",{staticClass:"media px-3"},[i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small d-none"},[t._v("Body")]),t._v(" "),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.composeText,expression:"composeText"}],staticClass:"form-control border-0 rounded-0 no-focus",staticStyle:{"font-size":"18px",resize:"none"},attrs:{rows:"7",placeholder:"What's happening?"},domProps:{value:t.composeText},on:{keyup:function(e){t.composeTextLength=t.composeText.length},input:function(e){e.target.composing||(t.composeText=e.target.value)}}}),t._v(" "),i("div",{staticClass:"border-bottom"}),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0 font-weight-bold"},[t._v(t._s(t.composeTextLength)+"/"+t._s(t.config.uploader.max_caption_length))]),t._v(" "),i("p",{staticClass:"mb-0 mt-2"},[i("a",{staticClass:"btn btn-primary rounded-pill mr-2",staticStyle:{height:"37px"},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showTextOptions()}}},[i("i",{staticClass:"fas fa-palette px-3 text-white"})]),t._v(" "),i("a",{staticClass:"btn rounded-pill mx-3 d-inline-flex align-items-center",class:[t.nsfw?"btn-danger":"btn-outline-lighter"],staticStyle:{height:"37px"},attrs:{href:"#",title:"Mark as sensitive/not safe for work"},on:{click:function(e){e.preventDefault(),t.nsfw=!t.nsfw}}},[i("i",{staticClass:"far fa-flag px-3"}),t._v(" "),i("span",{staticClass:"text-muted small font-weight-bold"})]),t._v(" "),i("a",{staticClass:"btn btn-outline-lighter rounded-pill d-inline-flex align-items-center",staticStyle:{height:"37px"},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[i("i",{staticClass:"fas fa-eye mr-2"}),t._v(" "),i("span",{staticClass:"text-muted small font-weight-bold"},[t._v(t._s(t.visibilityTag))])])])])])])])]):t._e(),t._v(" "),1==t.page?i("div",{staticClass:"w-100 h-100 d-flex justify-content-center align-items-center",staticStyle:{"min-height":"400px"}},[i("div",{staticClass:"text-center"},[0==t.media.length?i("div",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark"},[i("div",{staticClass:"card-body",on:{click:function(e){return e.preventDefault(),t.addMedia(e)}}},[i("div",{staticClass:"media"},[t._m(2),t._v(" "),i("div",{staticClass:"media-body text-left"},[t._m(3),t._v(" "),i("p",{staticClass:"mb-0 text-muted"},[t._v("Share up to "+t._s(t.config.uploader.album_limit)+" photos or videos")])])])])]):t._e(),t._v(" "),1==t.config.ab.top&&0==t.media.length?i("div",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark"},[i("div",{staticClass:"card-body",on:{click:function(e){return e.preventDefault(),t.addText(e)}}},[t._m(4)])]):t._e(),t._v(" "),1==t.config.features.stories?i("a",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark",attrs:{href:"/i/stories/new"}},[t._m(5)]):t._e(),t._v(" "),t._m(6),t._v(" "),t._m(7)])]):t._e(),t._v(" "),"cropPhoto"==t.page?i("div",{staticClass:"w-100 h-100"},[t.ids.length>0?i("div",[i("vue-cropper",{ref:"cropper",attrs:{relativeZoom:t.cropper.zoom,aspectRatio:t.cropper.aspectRatio,viewMode:t.cropper.viewMode,zoomable:t.cropper.zoomable,rotatable:!0,src:t.media[t.carouselCursor].url}})],1):t._e()]):t._e(),t._v(" "),2==t.page?i("div",{staticClass:"w-100 h-100"},[1==t.media.length?i("div",[i("div",{staticStyle:{display:"flex","min-height":"420px","align-items":"center"},attrs:{slot:"img"},slot:"img"},[i("img",{class:"d-block img-fluid w-100 "+[t.media[t.carouselCursor].filter_class?t.media[t.carouselCursor].filter_class:""],attrs:{src:t.media[t.carouselCursor].url,alt:t.media[t.carouselCursor].description,title:t.media[t.carouselCursor].description}})]),t._v(" "),i("hr"),t._v(" "),t.ids.length>0&&"Image"==t.media[t.carouselCursor].type?i("div",{staticClass:"align-items-center px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{staticClass:"cursor-pointer",attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}})]),t._v(" "),i("a",{class:[null==t.media[t.carouselCursor].filter_class?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}},[t._v("No Filter")])]),t._v(" "),t._l(t.filters,(function(e,n){return i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{class:e[1],attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}})]),t._v(" "),i("a",{class:[t.media[t.carouselCursor].filter_class==e[1]?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}},[t._v(t._s(e[0]))])])}))],2)]):t._e()]):t.media.length>1?i("div",{staticClass:"d-flex-inline px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item mx-md-4"},[t._v(" ")]),t._v(" "),t._l(t.media,(function(e,n){return i("li",{staticClass:"nav-item mx-md-4"},[i("div",{staticClass:"nav-link",staticStyle:{display:"block",width:"300px",height:"300px"},on:{click:function(e){t.carouselCursor=n}}},[i("span",{class:[e.filter_class?e.filter_class:""]},[i("span",{class:"rounded border "+[n==t.carouselCursor?" border-primary shadow":""],style:"display:block;padding:5px;width:100%;height:100%;background-image: url("+e.url+");background-size:cover;border-width:3px !important;"})])]),t._v(" "),n==t.carouselCursor?i("div",{staticClass:"text-center mb-0 small text-lighter font-weight-bold pt-2"},[i("span",{staticClass:"cursor-pointer",on:{click:function(e){return e.preventDefault(),t.showCropPhotoCard(e)}}},[t._v("Crop")]),t._v(" "),i("span",{staticClass:"cursor-pointer px-3",on:{click:function(e){return e.preventDefault(),t.showEditMediaCard()}}},[t._v("Edit")]),t._v(" "),i("span",{staticClass:"cursor-pointer",on:{click:function(e){return t.deleteMedia()}}},[t._v("Delete")])]):t._e()])})),t._v(" "),i("li",{staticClass:"nav-item mx-md-4"},[t._v(" ")])],2),t._v(" "),i("hr"),t._v(" "),t.ids.length>0&&"Image"==t.media[t.carouselCursor].type?i("div",{staticClass:"align-items-center px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{staticClass:"cursor-pointer",attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}})]),t._v(" "),i("a",{class:[null==t.media[t.carouselCursor].filter_class?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}},[t._v("No Filter")])]),t._v(" "),t._l(t.filters,(function(e,n){return i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{class:e[1],attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}})]),t._v(" "),i("a",{class:[t.media[t.carouselCursor].filter_class==e[1]?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}},[t._v(t._s(e[0]))])])}))],2)]):t._e()]):i("div",[i("p",{staticClass:"mb-0 p-5 text-center font-weight-bold"},[t._v("An error occured, please refresh the page.")])])]):t._e(),t._v(" "),3==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"border-bottom mt-2"},[i("div",{staticClass:"media px-3"},[i("img",{class:[t.media[0].filter_class?"mr-2 "+t.media[0].filter_class:"mr-2"],attrs:{src:t.media[0].url,width:"42px",height:"42px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small d-none"},[t._v("Caption")]),t._v(" "),i("vue-tribute",{attrs:{options:t.tributeSettings}},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.composeText,expression:"composeText"}],staticClass:"form-control border-0 rounded-0 no-focus",attrs:{rows:"3",placeholder:"Write a caption..."},domProps:{value:t.composeText},on:{keyup:function(e){t.composeTextLength=t.composeText.length},input:function(e){e.target.composing||(t.composeText=e.target.value)}}})]),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0"},[t._v(t._s(t.composeTextLength)+"/"+t._s(t.config.uploader.max_caption_length))])],1)])])]),t._v(" "),i("div",{staticClass:"border-bottom d-flex justify-content-between px-4 mb-0 py-2 "},[t._m(8),t._v(" "),i("div",[i("div",{staticClass:"custom-control custom-switch",staticStyle:{"z-index":"9999"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.nsfw,expression:"nsfw"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"asnsfw"},domProps:{checked:Array.isArray(t.nsfw)?t._i(t.nsfw,null)>-1:t.nsfw},on:{change:function(e){var i=t.nsfw,n=e.target,a=!!n.checked;if(Array.isArray(i)){var o=t._i(i,null);n.checked?o<0&&(t.nsfw=i.concat([null])):o>-1&&(t.nsfw=i.slice(0,o).concat(i.slice(o+1)))}else t.nsfw=a}}}),t._v(" "),i("label",{staticClass:"custom-control-label",attrs:{for:"asnsfw"}})])])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showTagCard()}}},[t._v("Tag people "),i("span",{staticClass:"ml-2 badge badge-primary"},[t._v("NEW")])])]),t._v(" "),i("div",{staticClass:"border-bottom"},[t.place?i("p",{staticClass:"px-4 mb-0 py-2"},[i("span",{staticClass:"text-lighter"},[t._v("Location:")]),t._v(" "+t._s(t.place.name)+", "+t._s(t.place.country)+"\n\t\t\t\t\t\t\t\t"),i("span",{staticClass:"float-right"},[i("a",{staticClass:"btn btn-outline-secondary btn-sm small mr-2",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showLocationCard()}}},[t._v("Edit")]),t._v(" "),i("a",{staticClass:"btn btn-outline-secondary btn-sm small",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.place=!1}}},[t._v("Remove")])])]):i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showLocationCard()}}},[t._v("Add location")])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2"},[i("span",[t._v("Audience")]),t._v(" "),i("span",{staticClass:"float-right"},[i("a",{staticClass:"btn btn-outline-secondary btn-sm small mr-3 mt-n1 disabled",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#",disabled:""},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[t._v(t._s(t.visibilityTag))]),t._v(" "),i("a",{staticClass:"text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[i("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])])])]),t._v(" "),i("div",{staticStyle:{"min-height":"200px"}},[i("p",{staticClass:"px-4 mb-0 py-2 small font-weight-bold text-muted cursor-pointer",on:{click:function(e){return t.showAdvancedSettingsCard()}}},[t._v("Advanced settings")])])]):t._e(),t._v(" "),"tagPeople"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("autocomplete",{directives:[{name:"show",rawName:"v-show",value:t.taggedUsernames.length<10,expression:"taggedUsernames.length < 10"}],ref:"autocomplete",attrs:{search:t.tagSearch,placeholder:"@pixelfed","aria-label":"Search usernames","get-result-value":t.getTagResultValue},on:{submit:t.onTagSubmitLocation}}),t._v(" "),i("p",{directives:[{name:"show",rawName:"v-show",value:t.taggedUsernames.length<10,expression:"taggedUsernames.length < 10"}],staticClass:"font-weight-bold text-muted small"},[t._v("You can tag "+t._s(10-t.taggedUsernames.length)+" more "+t._s(9==t.taggedUsernames.length?"person":"people")+"!")]),t._v(" "),i("p",{staticClass:"font-weight-bold text-center mt-3"},[t._v("Tagged People")]),t._v(" "),i("div",{staticClass:"list-group"},[t._l(t.taggedUsernames,(function(e,n){return i("div",{staticClass:"list-group-item d-flex justify-content-between"},[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-2 rounded-circle border",attrs:{src:e.avatar,width:"24px",height:"24px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("span",{staticClass:"font-weight-bold"},[t._v(t._s(e.name))])])]),t._v(" "),i("div",{staticClass:"custom-control custom-switch"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.privacy,expression:"tag.privacy"}],staticClass:"custom-control-input disabled",attrs:{type:"checkbox",id:"cci-tagged-privacy-switch"+n,disabled:""},domProps:{checked:Array.isArray(e.privacy)?t._i(e.privacy,null)>-1:e.privacy},on:{change:function(i){var n=e.privacy,a=i.target,o=!!a.checked;if(Array.isArray(n)){var r=t._i(n,null);a.checked?r<0&&t.$set(e,"privacy",n.concat([null])):r>-1&&t.$set(e,"privacy",n.slice(0,r).concat(n.slice(r+1)))}else t.$set(e,"privacy",o)}}}),t._v(" "),i("label",{staticClass:"custom-control-label font-weight-bold text-lighter",attrs:{for:"cci-tagged-privacy-switch"+n}},[t._v(t._s(e.privacy?"Public":"Private"))]),t._v(" "),i("a",{staticClass:"ml-3",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.untagUsername(n)}}},[i("i",{staticClass:"fas fa-times text-muted"})])])])})),t._v(" "),0==t.taggedUsernames.length?i("div",{staticClass:"list-group-item p-3"},[i("p",{staticClass:"text-center mb-0 font-weight-bold text-lighter"},[t._v("Search usernames to tag.")])]):t._e()],2),t._v(" "),i("p",{staticClass:"font-weight-bold text-center small text-muted pt-3 mb-0"},[t._v("When you tag someone, they are sent a notification."),i("br"),t._v("For more information on tagging, "),i("a",{staticClass:"text-primary",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showTagHelpCard()}}},[t._v("click here")]),t._v(".")])],1):t._e(),t._v(" "),"tagPeopleHelp"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"mb-0 text-center py-3 px-2 lead"},[t._v("Tagging someone is like mentioning them, with the option to make it private between you.")]),t._v(" "),i("p",{staticClass:"mb-3 py-3 px-2 font-weight-lighter"},[t._v("\n\t\t\t\t\t\t\tYou can choose to tag someone in public or private mode. Public mode will allow others to see who you tagged in the post and private mode tagged users will not be shown to others.\n\t\t\t\t\t\t")])]):t._e(),t._v(" "),"addLocation"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"mb-0"},[t._v("Add Location")]),t._v(" "),i("autocomplete",{attrs:{search:t.locationSearch,placeholder:"Search locations ...","aria-label":"Search locations ...","get-result-value":t.getResultValue},on:{submit:t.onSubmitLocation}})],1):t._e(),t._v(" "),"advancedSettings"==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"list-group list-group-flush"},[i("div",{staticClass:"list-group-item d-flex justify-content-between"},[t._m(9),t._v(" "),i("div",[i("div",{staticClass:"custom-control custom-switch",staticStyle:{"z-index":"9999"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.commentsDisabled,expression:"commentsDisabled"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"asdisablecomments"},domProps:{checked:Array.isArray(t.commentsDisabled)?t._i(t.commentsDisabled,null)>-1:t.commentsDisabled},on:{change:function(e){var i=t.commentsDisabled,n=e.target,a=!!n.checked;if(Array.isArray(i)){var o=t._i(i,null);n.checked?o<0&&(t.commentsDisabled=i.concat([null])):o>-1&&(t.commentsDisabled=i.slice(0,o).concat(i.slice(o+1)))}else t.commentsDisabled=a}}}),t._v(" "),i("label",{staticClass:"custom-control-label",attrs:{for:"asdisablecomments"}})])])]),t._v(" "),i("a",{staticClass:"list-group-item",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showMediaDescriptionsCard()}}},[t._m(10)])])]):t._e(),t._v(" "),"visibility"==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"list-group list-group-flush"},[t.profile.locked?t._e():i("div",{staticClass:"list-group-item lead cursor-pointer",class:{"text-primary":"public"==t.visibility},on:{click:function(e){return t.toggleVisibility("public")}}},[t._v("\n\t\t\t\t\t\t\t\tPublic\n\t\t\t\t\t\t\t")]),t._v(" "),t.profile.locked?t._e():i("div",{staticClass:"list-group-item lead cursor-pointer",class:{"text-primary":"unlisted"==t.visibility},on:{click:function(e){return t.toggleVisibility("unlisted")}}},[t._v("\n\t\t\t\t\t\t\t\tUnlisted\n\t\t\t\t\t\t\t")]),t._v(" "),i("div",{staticClass:"list-group-item lead cursor-pointer",class:{"text-primary":"private"==t.visibility},on:{click:function(e){return t.toggleVisibility("private")}}},[t._v("\n\t\t\t\t\t\t\t\tFollowers Only\n\t\t\t\t\t\t\t")])])]):t._e(),t._v(" "),"altText"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[t._l(t.media,(function(e,n){return i("div",[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-3",attrs:{src:e.preview_url,width:"50px",height:"50px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:e.alt,expression:"m.alt"}],staticClass:"form-control",attrs:{placeholder:"Add a media description here...",maxlength:"140"},domProps:{value:e.alt},on:{input:function(i){i.target.composing||t.$set(e,"alt",i.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0"},[t._v(t._s(e.alt?e.alt.length:0)+"/140")])])]),t._v(" "),i("hr")])})),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Cancel")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])],2):t._e(),t._v(" "),"addToCollection"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("div",{staticClass:"list-group mb-3"},[i("div",{staticClass:"list-group-item cursor-pointer compose-action border",on:{click:function(e){return t.goBack()}}},[t._m(11)])]),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Cancel")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])]):t._e(),t._v(" "),"schedulePost"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"mediaMetadata"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"addToStory"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"editMedia"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-3",attrs:{src:t.media[t.carouselCursor].preview_url,width:"50px",height:"50px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small"},[t._v("Media Description")]),t._v(" "),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.media[t.carouselCursor].alt,expression:"media[carouselCursor].alt"}],staticClass:"form-control",attrs:{placeholder:"Add a media description here...",maxlength:"140"},domProps:{value:t.media[t.carouselCursor].alt},on:{input:function(e){e.target.composing||t.$set(t.media[t.carouselCursor],"alt",e.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-muted mb-0 d-flex justify-content-between"},[i("span",[t._v("Describe your photo for people with visual impairments.")]),t._v(" "),i("span",[t._v(t._s(t.media[t.carouselCursor].alt?t.media[t.carouselCursor].alt.length:0)+"/140")])])]),t._v(" "),i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small"},[t._v("License")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model",value:t.media[t.carouselCursor].license,expression:"media[carouselCursor].license"}],staticClass:"form-control",attrs:{type:"text",placeholder:"All Rights Reserved (Default license)"},domProps:{value:t.media[t.carouselCursor].license},on:{input:function(e){e.target.composing||t.$set(t.media[t.carouselCursor],"license",e.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-muted mb-0 d-flex justify-content-between"},[i("span"),t._v(" "),i("span",[t._v(t._s(t.media[t.carouselCursor].license?t.media[t.carouselCursor].license.length:0)+"/140")])])])])]),t._v(" "),i("hr"),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Cancel")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])]):t._e()]),t._v(" "),"cropPhoto"==t.page?i("div",{staticClass:"card-footer bg-white d-flex justify-content-between"},[i("div",[i("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button"},on:{click:t.rotate}},[i("i",{staticClass:"fas fa-redo"})])]),t._v(" "),i("div",[i("div",{staticClass:"d-inline-block button-group"},[i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==16/9?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(16/9)}}},[t._v("16:9")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==4/3?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(4/3)}}},[t._v("4:3")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[1.5==t.cropper.aspectRatio?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(1.5)}}},[t._v("3:2")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[1==t.cropper.aspectRatio?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(1)}}},[t._v("1:1")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==2/3?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(2/3)}}},[t._v("2:3")])])])]):t._e()])])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-header d-inline-flex align-items-center justify-content-between bg-white"},[e("span",{staticClass:"pr-3"},[e("i",{staticClass:"fas fa-cog fa-lg text-muted"})]),this._v(" "),e("span",{staticClass:"font-weight-bold"},[this._v("\n\t\t\t\t\t\tCamera Roll\n\t\t\t\t\t")]),this._v(" "),e("span",{staticClass:"text-primary font-weight-bold"},[this._v("Upload")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"spinner-border spinner-border-sm",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:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%","background-color":"#008DF5"}},[e("i",{staticClass:"fas fa-bolt text-white fa-lg"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Post")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"2px solid #008DF5"}},[e("i",{staticClass:"far fa-edit text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Text Post")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("Share a text only post")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-body"},[e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"2px solid #008DF5"}},[e("i",{staticClass:"fas fa-history text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Story")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("Add Photo to Story")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("a",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark",attrs:{href:"/i/collections/create"}},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"2px solid #008DF5"}},[e("i",{staticClass:"fas fa-images text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Collection")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("New collection of posts")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"py-3"},[e("a",{staticClass:"font-weight-bold",attrs:{href:"/site/help"}},[this._v("Help")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticClass:"text-dark "},[this._v("Contains NSFW Media")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticClass:"text-dark "},[this._v("Turn off commenting")]),this._v(" "),e("p",{staticClass:"text-muted small mb-0"},[this._v("Disables comments for this post, you can change this later.")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"d-flex justify-content-between align-items-center"},[e("div",[e("div",{staticClass:"text-dark"},[this._v("Media Descriptions")]),this._v(" "),e("p",{staticClass:"text-muted small mb-0"},[this._v("Describe your photos for people with visual impairments.")])]),this._v(" "),e("div",[e("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"media"},[e("img",{staticClass:"mr-3",attrs:{src:"",alt:"",width:"50px",height:"50px"}}),this._v(" "),e("div",{staticClass:"media-body"},[e("h5",{staticClass:"mt-0"},[this._v("collection title")]),this._v(" "),e("p",{staticClass:"mb-0 text-muted small"},[this._v("3 Photos - Created 2h ago")])])])}],!1,null,"fb0e5b48",null);e.default=u.exports}},[[7,0]]]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{"0ox+":function(t,e,i){(t.exports=i("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)}}',""])},"1F2C":function(t,e,i){var n=i("nqP/");"string"==typeof n&&(n=[[t.i,n,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};i("aET+")(n,a);n.locals&&(t.exports=n.locals)},"3VoG":function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"/*!\n * Cropper.js v1.5.9\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2020-09-10T13:16:21.689Z\n */\n\n.cropper-container {\n direction: ltr;\n font-size: 0;\n line-height: 0;\n position: relative;\n -ms-touch-action: none;\n touch-action: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.cropper-container img {\n display: block;\n height: 100%;\n image-orientation: 0deg;\n max-height: none !important;\n max-width: none !important;\n min-height: 0 !important;\n min-width: 0 !important;\n width: 100%;\n}\n\n.cropper-wrap-box,\n.cropper-canvas,\n.cropper-drag-box,\n.cropper-crop-box,\n.cropper-modal {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.cropper-wrap-box,\n.cropper-canvas {\n overflow: hidden;\n}\n\n.cropper-drag-box {\n background-color: #fff;\n opacity: 0;\n}\n\n.cropper-modal {\n background-color: #000;\n opacity: 0.5;\n}\n\n.cropper-view-box {\n display: block;\n height: 100%;\n outline: 1px solid #39f;\n outline-color: rgba(51, 153, 255, 0.75);\n overflow: hidden;\n width: 100%;\n}\n\n.cropper-dashed {\n border: 0 dashed #eee;\n display: block;\n opacity: 0.5;\n position: absolute;\n}\n\n.cropper-dashed.dashed-h {\n border-bottom-width: 1px;\n border-top-width: 1px;\n height: calc(100% / 3);\n left: 0;\n top: calc(100% / 3);\n width: 100%;\n}\n\n.cropper-dashed.dashed-v {\n border-left-width: 1px;\n border-right-width: 1px;\n height: 100%;\n left: calc(100% / 3);\n top: 0;\n width: calc(100% / 3);\n}\n\n.cropper-center {\n display: block;\n height: 0;\n left: 50%;\n opacity: 0.75;\n position: absolute;\n top: 50%;\n width: 0;\n}\n\n.cropper-center::before,\n.cropper-center::after {\n background-color: #eee;\n content: ' ';\n display: block;\n position: absolute;\n}\n\n.cropper-center::before {\n height: 1px;\n left: -3px;\n top: 0;\n width: 7px;\n}\n\n.cropper-center::after {\n height: 7px;\n left: 0;\n top: -3px;\n width: 1px;\n}\n\n.cropper-face,\n.cropper-line,\n.cropper-point {\n display: block;\n height: 100%;\n opacity: 0.1;\n position: absolute;\n width: 100%;\n}\n\n.cropper-face {\n background-color: #fff;\n left: 0;\n top: 0;\n}\n\n.cropper-line {\n background-color: #39f;\n}\n\n.cropper-line.line-e {\n cursor: ew-resize;\n right: -3px;\n top: 0;\n width: 5px;\n}\n\n.cropper-line.line-n {\n cursor: ns-resize;\n height: 5px;\n left: 0;\n top: -3px;\n}\n\n.cropper-line.line-w {\n cursor: ew-resize;\n left: -3px;\n top: 0;\n width: 5px;\n}\n\n.cropper-line.line-s {\n bottom: -3px;\n cursor: ns-resize;\n height: 5px;\n left: 0;\n}\n\n.cropper-point {\n background-color: #39f;\n height: 5px;\n opacity: 0.75;\n width: 5px;\n}\n\n.cropper-point.point-e {\n cursor: ew-resize;\n margin-top: -3px;\n right: -3px;\n top: 50%;\n}\n\n.cropper-point.point-n {\n cursor: ns-resize;\n left: 50%;\n margin-left: -3px;\n top: -3px;\n}\n\n.cropper-point.point-w {\n cursor: ew-resize;\n left: -3px;\n margin-top: -3px;\n top: 50%;\n}\n\n.cropper-point.point-s {\n bottom: -3px;\n cursor: s-resize;\n left: 50%;\n margin-left: -3px;\n}\n\n.cropper-point.point-ne {\n cursor: nesw-resize;\n right: -3px;\n top: -3px;\n}\n\n.cropper-point.point-nw {\n cursor: nwse-resize;\n left: -3px;\n top: -3px;\n}\n\n.cropper-point.point-sw {\n bottom: -3px;\n cursor: nesw-resize;\n left: -3px;\n}\n\n.cropper-point.point-se {\n bottom: -3px;\n cursor: nwse-resize;\n height: 20px;\n opacity: 1;\n right: -3px;\n width: 20px;\n}\n\n@media (min-width: 768px) {\n .cropper-point.point-se {\n height: 15px;\n width: 15px;\n }\n}\n\n@media (min-width: 992px) {\n .cropper-point.point-se {\n height: 10px;\n width: 10px;\n }\n}\n\n@media (min-width: 1200px) {\n .cropper-point.point-se {\n height: 5px;\n opacity: 0.75;\n width: 5px;\n }\n}\n\n.cropper-point.point-se::before {\n background-color: #39f;\n bottom: -50%;\n content: ' ';\n display: block;\n height: 200%;\n opacity: 0;\n position: absolute;\n right: -50%;\n width: 200%;\n}\n\n.cropper-invisible {\n opacity: 0;\n}\n\n.cropper-bg {\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');\n}\n\n.cropper-hide {\n display: block;\n height: 0;\n position: absolute;\n width: 0;\n}\n\n.cropper-hidden {\n display: none !important;\n}\n\n.cropper-move {\n cursor: move;\n}\n\n.cropper-crop {\n cursor: crosshair;\n}\n\n.cropper-disabled .cropper-drag-box,\n.cropper-disabled .cropper-face,\n.cropper-disabled .cropper-line,\n.cropper-disabled .cropper-point {\n cursor: not-allowed;\n}\n",""])},"6xVh":function(t,e,i){t.exports=function t(e,i,n){function a(r,s){if(!i[r]){if(!e[r]){if(o)return o(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[r]={exports:{}};e[r][0].call(c.exports,(function(t){return a(e[r][1][t]||t)}),c,c.exports,t,e,i,n)}return i[r].exports}for(var o=!1,r=0;r'+(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"]}}],(i=[{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.filteredItems=n;var a=i.menu.querySelector("ul");if(i.range.positionMenuAtCaret(e),!n.length){var o=new CustomEvent("tribute-no-match",{detail:i.menu});return i.current.element.dispatchEvent(o),void("function"==typeof i.current.collection.noMatchTemplate&&!i.current.collection.noMatchTemplate()||!i.current.collection.noMatchTemplate?i.hideMenu():"function"==typeof i.current.collection.noMatchTemplate?a.innerHTML=i.current.collection.noMatchTemplate():a.innerHTML=i.current.collection.noMatchTemplate)}i.current.collection.menuItemLimit&&(n=n.slice(0,i.current.collection.menuItemLimit)),a.innerHTML="";var r=i.range.getDocument().createDocumentFragment();n.forEach((function(t,e){var n=i.range.getDocument().createElement("li");n.setAttribute("data-index",e),n.addEventListener("mousemove",(function(t){var e=l(i._findLiTarget(t.target),2),n=(e[0],e[1]);0!==t.movementY&&i.events.setActiveLi(n)})),i.menuSelected===e&&(n.className=i.current.collection.selectClass),n.innerHTML=i.current.collection.menuItemTemplate(t),r.appendChild(n)})),a.appendChild(r)}};"function"==typeof this.current.collection.values?this.current.collection.values(this.current.mentionText,n):n(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 n=document.body.createTextRange();n.moveToElementText(t),n.collapse(!1),n.select()}}},{key:"insertTextAtCursor",value:function(t){var e,i;(i=(e=window.getSelection()).getRangeAt(0)).deleteContents();var n=document.createTextNode(t);i.insertNode(n),i.selectNodeContents(n),i.collapse(!1),e.removeAllRanges(),e.addRange(i)}},{key:"insertAtCaret",value:function(t,e){var i=t.scrollTop,n=t.selectionStart,a=t.value.substring(0,n),o=t.value.substring(t.selectionEnd,t.value.length);t.value=a+e+o,n+=e.length,t.selectionStart=n,t.selectionEnd=n,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],n=this.current.collection.selectTemplate(i);null!==n&&this.replaceText(n,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 n=parseInt(t);if("number"!=typeof n)throw new Error("please provide an index for the collection to update.");var a=this.collection[n];this._append(a,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 container for the click");i.selectItemAtIndex(n.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 n=t.tribute.triggers().find((function(t){return t.charCodeAt(0)===i}));void 0!==n&&t.callbacks().triggerChar(e,this,n)}((t.tribute.current.trigger||t.tribute.autocompleteMode)&&!1===t.commandEvent||t.tribute.isActive&&8===e.keyCode)&&t.tribute.showMenuFor(this,!0)}}},{key:"shouldDeactivate",value:function(e){if(!this.tribute.isActive)return!1;if(0===this.tribute.current.mentionText.length){var i=!1;return t.keys().forEach((function(t){e.keyCode===t.key&&(i=!0)})),!i}return!1}},{key:"getKeyCode",value:function(t,e,i){var n=t.tribute,a=n.range.getTriggerInfo(!1,n.hasTrailingSpace,!0,n.allowSpaces,n.autocompleteMode);return!!a&&a.mentionTriggerChar.charCodeAt(0)}},{key:"updateSelection",value:function(t){this.tribute.current.element=t;var e=this.tribute.range.getTriggerInfo(!1,this.tribute.hasTrailingSpace,!0,this.tribute.allowSpaces,this.tribute.autocompleteMode);e&&(this.tribute.current.selectedPath=e.mentionSelectedPath,this.tribute.current.mentionText=e.mentionText,this.tribute.current.selectedOffset=e.mentionSelectedOffset)}},{key:"callbacks",value:function(){var t=this;return{triggerChar:function(e,i,n){var a=t.tribute;a.current.trigger=n;var o=a.collection.find((function(t){return t.trigger===n}));a.current.collection=o,a.inputEvent&&a.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 n=t.tribute.current.filteredItems.length,a=t.tribute.menuSelected;n>a&&a>0?(t.tribute.menuSelected--,t.setActiveLi()):0===a&&(t.tribute.menuSelected=n-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 n=t.tribute.current.filteredItems.length-1,a=t.tribute.menuSelected;n>a?(t.tribute.menuSelected++,t.setActiveLi()):n===a&&(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 n=0;nr.bottom){var s=o.bottom-r.bottom;this.tribute.menu.scrollTop+=s}else if(o.topn.width&&(a.left||a.right),r=window.innerHeight>n.height&&(a.top||a.bottom);(o||r)&&(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 n,a=t;if(e)for(var o=0;o=0&&(e=n.substring(0,a))}}else{var o=this.tribute.current.element;if(o){var r=o.selectionStart;o.value&&r>=0&&(e=o.value.substring(0,r))}}return e}},{key:"getLastWordInText",value:function(t){var e=(t=t.replace(/\u00A0/g," ")).split(" ");return e[e.length-1].trim()}},{key:"getTriggerInfo",value:function(t,e,i,n,a){var o,r,s,l=this,c=this.tribute.current;if(this.isContentEditable(c.element)){var u=this.getContentEditableSelectedPath(c);u&&(o=u.selected,r=u.path,s=u.offset)}else o=this.tribute.current.element;var d=this.getTextPrecedingCurrentSelection(),h=this.getLastWordInText(d);if(a)return{mentionPosition:d.length-h.length,mentionText:h,mentionSelectedElement:o,mentionSelectedPath:r,mentionSelectedOffset:s};if(null!=d){var p,f=-1;if(this.tribute.collection.forEach((function(t){var e=t.trigger,n=t.requireLeadingSpace?l.lastIndexWithLeadingSpace(d,e):d.lastIndexOf(e);n>f&&(f=n,p=e,i=t.requireLeadingSpace)})),f>=0&&(0===f||!i||/[\xA0\s]/g.test(d.substring(f-1,f)))){var m=d.substring(f+1,d.length);p=d.substring(f,f+1);var g=m.substring(0,1),v=m.length>0&&(" "===g||" "===g);e&&(m=m.trim());var b=n?/[^\S ]/g:/[\xA0\s]/g;if(this.tribute.hasTrailingSpace=b.test(m),!v&&(t||!b.test(m)))return{mentionPosition:f,mentionText:m,mentionSelectedElement:o,mentionSelectedPath:r,mentionSelectedOffset:s,mentionTriggerChar:p}}}}},{key:"lastIndexWithLeadingSpace",value:function(t,e){for(var i=t.split("").reverse().join(""),n=-1,a=0,o=t.length;aMath.ceil(o+i),bottom:c>Math.ceil(r+n),left:uparseInt(r.height)&&(o.overflowY="scroll")):o.overflow="hidden",a.textContent=t.value.substring(0,e),"INPUT"===t.nodeName&&(a.textContent=a.textContent.replace(/\s/g," "));var s=this.getDocument().createElement("span");s.textContent=t.value.substring(e)||".",a.appendChild(s);var l=t.getBoundingClientRect(),c=document.documentElement,u=(window.pageXOffset||c.scrollLeft)-(c.clientLeft||0),d=(window.pageYOffset||c.scrollTop)-(c.clientTop||0),h={top:l.top+d+s.offsetTop+parseInt(r.borderTopWidth)+parseInt(r.fontSize)-t.scrollTop,left:l.left+u+s.offsetLeft+parseInt(r.borderLeftWidth)},p=window.innerWidth,f=window.innerHeight,m=this.getMenuDimensions(),g=this.isMenuOffScreen(h,m);g.right&&(h.right=p-h.left,h.left="auto");var v=this.tribute.menuContainer?this.tribute.menuContainer.offsetHeight:this.getDocument().body.offsetHeight;if(g.bottom){var b=v-(f-(this.tribute.menuContainer?this.tribute.menuContainer.getBoundingClientRect():this.getDocument().body.getBoundingClientRect()).top);h.bottom=b+(f-l.top-s.offsetTop),h.top="auto"}return(g=this.isMenuOffScreen(h,m)).left&&(h.left=p>m.width?u+p-m.width:u,delete h.right),g.top&&(h.top=f>m.height?d+f-m.height:d,delete h.bottom),this.getDocument().body.removeChild(a),h}},{key:"getContentEditableCaretPosition",value:function(t){var e,i,n="sel_".concat((new Date).getTime(),"_").concat(Math.random().toString().substr(2)),a=this.getWindowSelection(),o=a.getRangeAt(0);(i=this.getDocument().createRange()).setStart(a.anchorNode,t),i.setEnd(a.anchorNode,t),i.collapse(!1),(e=this.getDocument().createElement("span")).id=n,e.appendChild(this.getDocument().createTextNode("\ufeff")),i.insertNode(e),a.removeAllRanges(),a.addRange(o);var r=e.getBoundingClientRect(),s=document.documentElement,l=(window.pageXOffset||s.scrollLeft)-(s.clientLeft||0),c=(window.pageYOffset||s.scrollTop)-(s.clientTop||0),u={left:r.left+l,top:r.top+e.offsetHeight+c},d=window.innerWidth,h=window.innerHeight,p=this.getMenuDimensions(),f=this.isMenuOffScreen(u,p);f.right&&(u.left="auto",u.right=d-r.left-l);var m=this.tribute.menuContainer?this.tribute.menuContainer.offsetHeight:this.getDocument().body.offsetHeight;if(f.bottom){var g=m-(h-(this.tribute.menuContainer?this.tribute.menuContainer.getBoundingClientRect():this.getDocument().body.getBoundingClientRect()).top);u.top="auto",u.bottom=g+(h-r.top)}return(f=this.isMenuOffScreen(u,p)).left&&(u.left=d>p.width?l+d-p.width:l,delete u.right),f.top&&(u.top=h>p.height?c+h-p.height:c,delete u.bottom),e.parentNode.removeChild(e),u}},{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 n=e.top,a=n+e.height;if(n<0)window.scrollTo(0,window.pageYOffset+e.top-20);else if(a>window.innerHeight){var o=window.pageYOffset+e.top-20;o-window.pageYOffset>100&&(o=window.pageYOffset+100);var r=window.pageYOffset-(window.innerHeight-a);r>o&&(r=o),window.scrollTo(0,r)}}}}])&&n(e.prototype,i),a&&n(e,a),t}();i.default=a,e.exports=i.default},{}],5:[function(t,e,i){"use strict";function n(t,e){for(var i=0;it.length-i)){for(var o,r,s=e[n],l=t.indexOf(s,i);l>-1;){if(a.push(l),r=this.traverse(t,e,l+1,n+1,a),a.pop(),!r)return o;(!o||o.score0&&(t[a-1]+1===n?i+=i+1:i=1),e+=i})),e}},{key:"render",value:function(t,e,i,n){var a=t.substring(0,e[0]);return e.forEach((function(o,r){a+=i+t[o]+n+t.substring(o+1,e[r+1]?e[r+1]:t.length)})),a}},{key:"filter",value:function(t,e,i){var n=this;return i=i||{},e.reduce((function(e,a,o,r){var s=a;i.extract&&((s=i.extract(a))||(s=""));var l=n.match(t,s,i);return null!=l&&(e[e.length]={string:l.rendered,score:l.score,index:o,original:a}),e}),[]).sort((function(t,e){var i=e.score-t.score;return i||t.index-e.index}))}}])&&n(e.prototype,i),a&&n(e,a),t}();i.default=a,e.exports=i.default},{}],6:[function(t,e,i){"use strict";var n;Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var a=((n=t("./Tribute"))&&n.__esModule?n:{default:n}).default;i.default=a,e.exports=i.default},{"./Tribute":1}],7:[function(t,e,i){"use strict";if(Array.prototype.find||(Array.prototype.find=function(t){if(null===this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,i=Object(this),n=i.length>>>0,a=arguments[1],o=0;o=0&&d.splice(e,1)}function v(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var n=function(){0;return i.nc}();n&&(t.attrs.nonce=n)}return b(e,t.attrs),m(t,e),e}function b(t,e){Object.keys(e).forEach((function(i){t.setAttribute(i,e[i])}))}function w(t,e){var i,n,a,o;if(e.transform&&t.css){if(!(o="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=o}if(e.singleton){var r=u++;i=c||(c=v(e)),n=C.bind(null,i,r,!1),a=C.bind(null,i,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(e,t.attrs),m(t,e),e}(e),n=k.bind(null,i,e),a=function(){g(i),i.href&&URL.revokeObjectURL(i.href)}):(i=v(e),n=_.bind(null,i),a=function(){g(i)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(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=r()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var i=f(t,e);return p(i,e),function(t){for(var n=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:{},o=a.search,r=a.autoSelect,c=void 0!==r&&r,u=a.setValue,d=void 0===u?function(){}:u,h=a.setAttribute,p=void 0===h?function(){}:h,f=a.onUpdate,m=void 0===f?function(){}:f,g=a.onSubmit,v=void 0===g?function(){}:g,b=a.onShow,w=void 0===b?function(){}:b,y=a.onHide,x=void 0===y?function(){}:y,C=a.onLoading,_=void 0===C?function(){}:C,k=a.onLoaded,T=void 0===k?function(){}:k;i(this,t),n(this,"value",""),n(this,"searchCounter",0),n(this,"results",[]),n(this,"selectedIndex",-1),n(this,"handleInput",(function(t){var i=t.target.value;e.updateResults(i),e.value=i})),n(this,"handleKeyDown",(function(t){var i=t.key;switch(i){case"Up":case"Down":case"ArrowUp":case"ArrowDown":var n="ArrowUp"===i||"Up"===i?e.selectedIndex-1:e.selectedIndex+1;t.preventDefault(),e.handleArrows(n);break;case"Tab":e.selectResult();break;case"Enter":var a=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(a);break;case"Esc":case"Escape":e.hideResults(),e.setValue();break;default:return}})),n(this,"handleFocus",(function(t){var i=t.target.value;e.updateResults(i),e.value=i})),n(this,"handleBlur",(function(){e.hideResults()})),n(this,"handleResultMouseDown",(function(t){t.preventDefault()})),n(this,"handleResultClick",(function(t){var i=t.target,n=s(i,"[data-result-index]");if(n){e.selectedIndex=parseInt(n.dataset.resultIndex,10);var a=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(a)}})),n(this,"handleArrows",(function(t){var i=e.results.length;e.selectedIndex=(t%i+i)%i,e.onUpdate(e.results,e.selectedIndex)})),n(this,"selectResult",(function(){var t=e.results[e.selectedIndex];t&&e.setValue(t),e.hideResults()})),n(this,"updateResults",(function(t){var i=++e.searchCounter;e.onLoading(),e.search(t).then((function(t){i===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())}))})),n(this,"showResults",(function(){e.setAttribute("aria-expanded",!0),e.onShow()})),n(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()})),n(this,"checkSelectedResultVisible",(function(t){var i=t.querySelector('[data-result-index="'.concat(e.selectedIndex,'"]'));if(i){var n=t.getBoundingClientRect(),a=i.getBoundingClientRect();a.topn.bottom&&(t.scrollTop+=a.bottom-n.bottom)}})),this.search=l(o)?o:function(t){return Promise.resolve(o(t))},this.autoSelect=c,this.setValue=d,this.setAttribute=p,this.onUpdate=m,this.onSubmit=v,this.onShow=w,this.onHide=x,this.onLoading=_,this.onLoaded=T},u=0,d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(t).concat(++u)};const h=function(t,e,i,n,a,o,r,s,l,c){"boolean"!=typeof r&&(l=s,s=r,r=!1);const u="function"==typeof i?i.options:i;let d;if(t&&t.render&&(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,a&&(u.functional=!0)),n&&(u._scopeId=n),o?(d=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(o)},u._ssrRegister=d):e&&(d=r?function(t){e.call(this,c(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),d)if(u.functional){const t=u.render;u.render=function(e,i){return d.call(i),t(e,i)}}else{const t=u.beforeCreate;u.beforeCreate=t?[].concat(t,d):[d]}return i}({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"root"},[t._t("default",[i("div",t._b({},"div",t.rootProps,!1),[i("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(" "),i("ul",t._g(t._b({ref:"resultList"},"ul",t.resultListProps,!1),t.resultListListeners),[t._l(t.results,(function(e,n){return[t._t("result",[i("li",t._b({key:t.resultProps[n].id},"li",t.resultProps[n],!1),[t._v("\n "+t._s(t.getResultValue(e))+"\n ")])],{result:e,props:t.resultProps[n]})]}))],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,i,n,a=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&&(a.handleInput=(t=a.handleInput,e=this.debounceTime,function(){var a=this,o=arguments,r=function(){n=null,i||t.apply(a,o)},s=i&&!n;clearTimeout(n),n=setTimeout(r,e),s&&t.apply(a,o)})),{core:a,value:this.defaultValue,resultListId:d("".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 o({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:n({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,i){return o({id:"".concat(t.baseClass,"-result-").concat(i),class:"".concat(t.baseClass,"-result"),"data-result-index":i,role:"option"},t.selectedIndex===i?{"aria-selected":"true"}:{})}))}},mounted:function(){document.body.addEventListener("click",this.handleDocumentClick)},beforeDestroy:function(){document.body.removeEventListener("click",this.handleDocumentClick)},updated:function(){var t,e,i,n;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,i=t.getBoundingClientRect(),n=e.getBoundingClientRect(),i.bottom+n.height>window.innerHeight&&window.innerHeight-i.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 p(t){p.installed||(p.installed=!0,t.component("Autocomplete",h))}var f,m={install:p};"undefined"!=typeof window?f=window.Vue:void 0!==t&&(f=t.Vue),f&&f.use(m),h.install=p,e.a=h}).call(this,i("yLpj"))},lcPr:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,a=i("urRO"),o=(n=a)&&n.__esModule?n:{default:n};var r="undefined"==typeof window?[String,Array]:[String,Array,Element,NodeList];e.default={render:function(t){var e=this.crossorigin||void 0;return t("div",{style:this.containerStyle},[t("img",{ref:"img",attrs:{src:this.src,alt:this.alt||"image",style:"max-width: 100%",crossorigin:e},on:this.$listeners,style:this.imgStyle})])},props:{containerStyle:Object,src:{type:String,default:""},alt:String,imgStyle:Object,viewMode:Number,dragMode:String,initialAspectRatio:Number,aspectRatio:Number,data:Object,preview:r,responsive:{type:Boolean,default:!0},restore:{type:Boolean,default:!0},checkCrossOrigin:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},crossorigin:{type:String},modal:{type:Boolean,default:!0},guides:{type:Boolean,default:!0},center:{type:Boolean,default:!0},highlight:{type:Boolean,default:!0},background:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!0},autoCropArea:Number,movable:{type:Boolean,default:!0},rotatable:{type:Boolean,default:!0},scalable:{type:Boolean,default:!0},zoomable:{type:Boolean,default:!0},zoomOnTouch:{type:Boolean,default:!0},zoomOnWheel:{type:Boolean,default:!0},wheelZoomRatio:Number,cropBoxMovable:{type:Boolean,default:!0},cropBoxResizable:{type:Boolean,default:!0},toggleDragModeOnDblclick:{type:Boolean,default:!0},minCanvasWidth:Number,minCanvasHeight:Number,minCropBoxWidth:Number,minCropBoxHeight:Number,minContainerWidth:Number,minContainerHeight:Number,ready:Function,cropstart:Function,cropmove:Function,cropend:Function,crop:Function,zoom:Function},mounted:function(){var t=this.$options.props,e=(t.containerStyle,t.src,t.alt,t.imgStyle,function(t,e){var i={};for(var n in t)e.indexOf(n)>=0||Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n]);return i}(t,["containerStyle","src","alt","imgStyle"])),i={};for(var n in e)void 0!==this[n]&&(i[n]=this[n]);this.cropper=new o.default(this.$refs.img,i)},methods:{reset:function(){return this.cropper.reset()},clear:function(){return this.cropper.clear()},initCrop:function(){return this.cropper.crop()},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.cropper.replace(t,e)},enable:function(){return this.cropper.enable()},disable:function(){return this.cropper.disable()},destroy:function(){return this.cropper.destroy()},move:function(t,e){return this.cropper.move(t,e)},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.cropper.moveTo(t,e)},relativeZoom:function(t,e){return this.cropper.zoom(t,e)},zoomTo:function(t,e){return this.cropper.zoomTo(t,e)},rotate:function(t){return this.cropper.rotate(t)},rotateTo:function(t){return this.cropper.rotateTo(t)},scaleX:function(t){return this.cropper.scaleX(t)},scaleY:function(t){return this.cropper.scaleY(t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.cropper.scale(t,e)},getData:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.cropper.getData(t)},setData:function(t){return this.cropper.setData(t)},getContainerData:function(){return this.cropper.getContainerData()},getImageData:function(){return this.cropper.getImageData()},getCanvasData:function(){return this.cropper.getCanvasData()},setCanvasData:function(t){return this.cropper.setCanvasData(t)},getCropBoxData:function(){return this.cropper.getCropBoxData()},setCropBoxData:function(t){return this.cropper.setCropBoxData(t)},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.cropper.getCroppedCanvas(t)},setAspectRatio:function(t){return this.cropper.setAspectRatio(t)},setDragMode:function(t){return this.cropper.setDragMode(t)}}}},"nqP/":function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"\n.media-drawer-filters[data-v-ba051ea2] {\n\t\toverflow-x: scroll;\n\t\tflex-wrap:unset;\n}\n.media-drawer-filters[data-v-ba051ea2]::-webkit-scrollbar {\n\t\twidth: 0px;\n\t\tbackground: transparent;\n}\n.media-drawer-filters .nav-link[data-v-ba051ea2] {\n\t\tmin-width:100px;\n\t\tpadding-top: 1rem;\n\t\tpadding-bottom: 1rem;\n}\n.media-drawer-filters .active[data-v-ba051ea2] {\n\t\tcolor: #fff;\n\t\tfont-weight: bold;\n}\n@media (hover: none) and (pointer: coarse) {\n.media-drawer-filters[data-v-ba051ea2]::-webkit-scrollbar {\n\t display: none;\n}\n}\n.no-focus[data-v-ba051ea2] {\n\t\tborder-color: none;\n\t\toutline: 0;\n\t\tbox-shadow: none;\n}\na.list-group-item[data-v-ba051ea2] {\n\t\ttext-decoration: none;\n}\na.list-group-item[data-v-ba051ea2]:hover {\n\t\ttext-decoration: none;\n\t\tbackground-color: #f8f9fa !important;\n}\n.compose-action[data-v-ba051ea2]:hover {\n\t\tcursor: pointer;\n\t\tbackground-color: #f8f9fa !important;\n}\n",""])},urRO:function(t,e,i){t.exports=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var i=0;it.length)&&(e=t.length);for(var i=0,n=new Array(e);i0&&t<1/0};function O(t){return void 0===t}function N(e){return"object"===t(e)&&null!==e}var B=Object.prototype.hasOwnProperty;function j(t){if(!N(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&B.call(i,"isPrototypeOf")}catch(t){return!1}}function z(t){return"function"==typeof t}var H=Array.prototype.slice;function W(t){return Array.from?Array.from(t):H.call(t)}function U(t,e){return t&&z(e)&&(Array.isArray(t)||I(t.length)?W(t).forEach((function(i,n){e.call(t,i,n,t)})):N(t)&&Object.keys(t).forEach((function(i){e.call(t,t[i],i,t)}))),t}var Y=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n0&&i.forEach((function(e){N(e)&&Object.keys(e).forEach((function(i){t[i]=e[i]}))})),t},F=/\.\d*(?:0|9){12}\d*$/;function $(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return F.test(t)?Math.round(t*e)/e:t}var X=/^width|height|left|top|marginLeft|marginTop$/;function V(t,e){var i=t.style;U(e,(function(t,e){X.test(e)&&I(t)&&(t="".concat(t,"px")),i[e]=t}))}function q(t,e){if(e)if(I(t.length))U(t,(function(t){q(t,e)}));else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function Z(t,e){e&&(I(t.length)?U(t,(function(t){Z(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function K(t,e,i){e&&(I(t.length)?U(t,(function(t){K(t,e,i)})):i?q(t,e):Z(t,e))}var G=/([a-z\d])([A-Z])/g;function Q(t){return t.replace(G,"$1-$2").toLowerCase()}function J(t,e){return N(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(Q(e)))}function tt(t,e,i){N(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(Q(e)),i)}var et=/\s\s*/,it=function(){var t=!1;if(l){var e=!1,i=function(){},n=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});c.addEventListener("test",i,n),c.removeEventListener("test",i,n)}return t}();function nt(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=i;e.trim().split(et).forEach((function(e){if(!it){var o=t.listeners;o&&o[e]&&o[e][i]&&(a=o[e][i],delete o[e][i],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,a,n)}))}function at(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=i;e.trim().split(et).forEach((function(e){if(n.once&&!it){var o=t.listeners,r=void 0===o?{}:o;a=function(){delete r[e][i],t.removeEventListener(e,a,n);for(var o=arguments.length,s=new Array(o),l=0;l1&&void 0!==arguments[1]?arguments[1]:"contain",o=R(n),r=R(i);if(o&&r){var s=i*e;"contain"===a&&s>n||"cover"===a&&s=8&&(o=l+u)}}}if(o){var d,h,p=i.getUint16(o,n);for(h=0;h=0?a:200),height:Math.max(i.offsetHeight,o>=0?o:100)};this.containerData=r,V(n,{width:r.width,height:r.height}),q(t,f),Z(n,f)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,n=Math.abs(e.rotate)%180==90,a=n?e.naturalHeight:e.naturalWidth,o=n?e.naturalWidth:e.naturalHeight,r=a/o,s=t.width,l=t.height;t.height*r>t.width?3===i?s=t.height*r:l=t.width/r:3===i?l=t.width/r:s=t.height*r;var c={aspectRatio:r,naturalWidth:a,naturalHeight:o,width:s,height:l};this.canvasData=c,this.limited=1===i||2===i,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=Y({},c)},limitCanvas:function(t,e){var i=this.options,n=this.containerData,a=this.canvasData,o=this.cropBoxData,r=i.viewMode,s=a.aspectRatio,l=this.cropped&&o;if(t){var c=Number(i.minCanvasWidth)||0,u=Number(i.minCanvasHeight)||0;r>1?(c=Math.max(c,n.width),u=Math.max(u,n.height),3===r&&(u*s>c?c=u*s:u=c/s)):r>0&&(c?c=Math.max(c,l?o.width:0):u?u=Math.max(u,l?o.height:0):l&&(c=o.width,(u=o.height)*s>c?c=u*s:u=c/s));var d=pt({aspectRatio:s,width:c,height:u});c=d.width,u=d.height,a.minWidth=c,a.minHeight=u,a.maxWidth=1/0,a.maxHeight=1/0}if(e)if(r>(l?0:1)){var h=n.width-a.width,p=n.height-a.height;a.minLeft=Math.min(0,h),a.minTop=Math.min(0,p),a.maxLeft=Math.max(0,h),a.maxTop=Math.max(0,p),l&&this.limited&&(a.minLeft=Math.min(o.left,o.left+(o.width-a.width)),a.minTop=Math.min(o.top,o.top+(o.height-a.height)),a.maxLeft=o.left,a.maxTop=o.top,2===r&&(a.width>=n.width&&(a.minLeft=Math.min(0,h),a.maxLeft=Math.max(0,h)),a.height>=n.height&&(a.minTop=Math.min(0,p),a.maxTop=Math.max(0,p))))}else a.minLeft=-a.width,a.minTop=-a.height,a.maxLeft=n.width,a.maxTop=n.height},renderCanvas:function(t,e){var i=this.canvasData,n=this.imageData;if(e){var a=function(t){var e=t.width,i=t.height,n=t.degree;if(90==(n=Math.abs(n)%180))return{width:i,height:e};var a=n%90*Math.PI/180,o=Math.sin(a),r=Math.cos(a),s=e*r+i*o,l=e*o+i*r;return n>90?{width:l,height:s}:{width:s,height:l}}({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),o=a.width,r=a.height,s=i.width*(o/i.naturalWidth),l=i.height*(r/i.naturalHeight);i.left-=(s-i.width)/2,i.top-=(l-i.height)/2,i.width=s,i.height=l,i.aspectRatio=o/r,i.naturalWidth=o,i.naturalHeight=r,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.widthi.maxHeight||i.heighte.width?a.height=a.width/i:a.width=a.height*i),this.cropBoxData=a,this.limitCropBox(!0,!0),a.width=Math.min(Math.max(a.width,a.minWidth),a.maxWidth),a.height=Math.min(Math.max(a.height,a.minHeight),a.maxHeight),a.width=Math.max(a.minWidth,a.width*n),a.height=Math.max(a.minHeight,a.height*n),a.left=e.left+(e.width-a.width)/2,a.top=e.top+(e.height-a.height)/2,a.oldLeft=a.left,a.oldTop=a.top,this.initialCropBoxData=Y({},a)},limitCropBox:function(t,e){var i=this.options,n=this.containerData,a=this.canvasData,o=this.cropBoxData,r=this.limited,s=i.aspectRatio;if(t){var l=Number(i.minCropBoxWidth)||0,c=Number(i.minCropBoxHeight)||0,u=r?Math.min(n.width,a.width,a.width+a.left,n.width-a.left):n.width,d=r?Math.min(n.height,a.height,a.height+a.top,n.height-a.top):n.height;l=Math.min(l,n.width),c=Math.min(c,n.height),s&&(l&&c?c*s>l?c=l/s:l=c*s:l?c=l/s:c&&(l=c*s),d*s>u?d=u/s:u=d*s),o.minWidth=Math.min(l,u),o.minHeight=Math.min(c,d),o.maxWidth=u,o.maxHeight=d}e&&(r?(o.minLeft=Math.max(0,a.left),o.minTop=Math.max(0,a.top),o.maxLeft=Math.min(n.width,a.left+a.width)-o.width,o.maxTop=Math.min(n.height,a.top+a.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=n.width-o.width,o.maxTop=n.height-o.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.widthi.maxHeight||i.height=e.width&&i.height>=e.height?"move":"all"),V(this.cropBox,Y({width:i.width,height:i.height},dt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),ot(this.element,"crop",this.getData())}},wt={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,n=e?this.crossOriginUrl:this.url,a=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=n,o.alt=a,this.viewBox.appendChild(o),this.viewBoxImage=o,i){var r=i;"string"==typeof i?r=t.ownerDocument.querySelectorAll(i):i.querySelector&&(r=[i]),this.previews=r,U(r,(function(t){var i=document.createElement("img");tt(t,y,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=n,i.alt=a,i.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(i)}))}},resetPreview:function(){U(this.previews,(function(t){var e=J(t,y);V(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(N(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(Q(e)))}(t,y)}))},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,n=i.width,a=i.height,o=t.width,r=t.height,s=i.left-e.left-t.left,l=i.top-e.top-t.top;this.cropped&&!this.disabled&&(V(this.viewBoxImage,Y({width:o,height:r},dt(Y({translateX:-s,translateY:-l},t)))),U(this.previews,(function(e){var i=J(e,y),c=i.width,u=i.height,d=c,h=u,p=1;n&&(h=a*(p=c/n)),a&&h>u&&(d=n*(p=u/a),h=u),V(e,{width:d,height:h}),V(e.getElementsByTagName("img")[0],Y({width:o*p,height:r*p},dt(Y({translateX:-s*p,translateY:-l*p},t))))})))}},yt={bind:function(){var t=this.element,e=this.options,i=this.cropper;z(e.cropstart)&&at(t,"cropstart",e.cropstart),z(e.cropmove)&&at(t,"cropmove",e.cropmove),z(e.cropend)&&at(t,"cropend",e.cropend),z(e.crop)&&at(t,"crop",e.crop),z(e.zoom)&&at(t,"zoom",e.zoom),at(i,k,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&at(i,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&at(i,"dblclick",this.onDblclick=this.dblclick.bind(this)),at(t.ownerDocument,T,this.onCropMove=this.cropMove.bind(this)),at(t.ownerDocument,S,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&at(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;z(e.cropstart)&&nt(t,"cropstart",e.cropstart),z(e.cropmove)&&nt(t,"cropmove",e.cropmove),z(e.cropend)&&nt(t,"cropend",e.cropend),z(e.crop)&&nt(t,"crop",e.crop),z(e.zoom)&&nt(t,"zoom",e.zoom),nt(i,k,this.onCropStart),e.zoomable&&e.zoomOnWheel&&nt(i,"wheel",this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&nt(i,"dblclick",this.onDblclick),nt(t.ownerDocument,T,this.onCropMove),nt(t.ownerDocument,S,this.onCropEnd),e.responsive&&nt(window,"resize",this.onResize)}},xt={resize:function(){if(!this.disabled){var t,e,i=this.options,n=this.container,a=this.containerData,o=n.offsetWidth/a.width;1===o&&n.offsetHeight===a.height||(i.restore&&(t=this.getCanvasData(),e=this.getCropBoxData()),this.render(),i.restore&&(this.setCanvasData(U(t,(function(e,i){t[i]=e*o}))),this.setCropBoxData(U(e,(function(t,i){e[i]=t*o})))))}},dblclick:function(){var t,e;this.disabled||"none"===this.options.dragMode||this.setDragMode((t=this.dragBox,e=h,(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)?"move":"crop"))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(I(e)&&1!==e||I(i)&&0!==i||t.ctrlKey))){var n,a=this.options,o=this.pointers;t.changedTouches?U(t.changedTouches,(function(t){o[t.identifier]=ht(t)})):o[t.pointerId||0]=ht(t),n=Object.keys(o).length>1&&a.zoomable&&a.zoomOnTouch?"zoom":J(t.target,w),M.test(n)&&!1!==ot(this.element,"cropstart",{originalEvent:t,action:n})&&(t.preventDefault(),this.action=n,this.cropping=!1,"crop"===n&&(this.cropping=!0,q(this.dragBox,v)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==ot(this.element,"cropmove",{originalEvent:t,action:e})&&(t.changedTouches?U(t.changedTouches,(function(t){Y(i[t.identifier]||{},ht(t,!0))})):Y(i[t.pointerId||0]||{},ht(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?U(t.changedTouches,(function(t){delete i[t.identifier]})):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,K(this.dragBox,v,this.cropped&&this.options.modal)),ot(this.element,"cropend",{originalEvent:t,action:e}))}}},Ct={change:function(t){var e,i=this.options,n=this.canvasData,a=this.containerData,r=this.cropBoxData,s=this.pointers,l=this.action,c=i.aspectRatio,u=r.left,d=r.top,h=r.width,p=r.height,m=u+h,g=d+p,v=0,b=0,w=a.width,y=a.height,x=!0;!c&&t.shiftKey&&(c=h&&p?h/p:1),this.limited&&(v=r.minLeft,b=r.minTop,w=v+Math.min(a.width,n.width,n.left+n.width),y=b+Math.min(a.height,n.height,n.top+n.height));var C=s[Object.keys(s)[0]],_={x:C.endX-C.startX,y:C.endY-C.startY},k=function(t){switch(t){case"e":m+_.x>w&&(_.x=w-m);break;case"w":u+_.xy&&(_.y=y-g)}};switch(l){case"all":u+=_.x,d+=_.y;break;case"e":if(_.x>=0&&(m>=w||c&&(d<=b||g>=y))){x=!1;break}k("e"),(h+=_.x)<0&&(l="w",u-=h=-h),c&&(p=h/c,d+=(r.height-p)/2);break;case"n":if(_.y<=0&&(d<=b||c&&(u<=v||m>=w))){x=!1;break}k("n"),p-=_.y,d+=_.y,p<0&&(l="s",d-=p=-p),c&&(h=p*c,u+=(r.width-h)/2);break;case"w":if(_.x<=0&&(u<=v||c&&(d<=b||g>=y))){x=!1;break}k("w"),h-=_.x,u+=_.x,h<0&&(l="e",u-=h=-h),c&&(p=h/c,d+=(r.height-p)/2);break;case"s":if(_.y>=0&&(g>=y||c&&(u<=v||m>=w))){x=!1;break}k("s"),(p+=_.y)<0&&(l="n",d-=p=-p),c&&(h=p*c,u+=(r.width-h)/2);break;case"ne":if(c){if(_.y<=0&&(d<=b||m>=w)){x=!1;break}k("n"),p-=_.y,d+=_.y,h=p*c}else k("n"),k("e"),_.x>=0?mb&&(p-=_.y,d+=_.y):(p-=_.y,d+=_.y);h<0&&p<0?(l="sw",d-=p=-p,u-=h=-h):h<0?(l="nw",u-=h=-h):p<0&&(l="se",d-=p=-p);break;case"nw":if(c){if(_.y<=0&&(d<=b||u<=v)){x=!1;break}k("n"),p-=_.y,d+=_.y,h=p*c,u+=r.width-h}else k("n"),k("w"),_.x<=0?u>v?(h-=_.x,u+=_.x):_.y<=0&&d<=b&&(x=!1):(h-=_.x,u+=_.x),_.y<=0?d>b&&(p-=_.y,d+=_.y):(p-=_.y,d+=_.y);h<0&&p<0?(l="se",d-=p=-p,u-=h=-h):h<0?(l="ne",u-=h=-h):p<0&&(l="sw",d-=p=-p);break;case"sw":if(c){if(_.x<=0&&(u<=v||g>=y)){x=!1;break}k("w"),h-=_.x,u+=_.x,p=h/c}else k("s"),k("w"),_.x<=0?u>v?(h-=_.x,u+=_.x):_.y>=0&&g>=y&&(x=!1):(h-=_.x,u+=_.x),_.y>=0?g=0&&(m>=w||g>=y)){x=!1;break}k("e"),p=(h+=_.x)/c}else k("s"),k("e"),_.x>=0?m=0&&g>=y&&(x=!1):h+=_.x,_.y>=0?gMath.abs(i)&&(i=l)}))})),i}(s),t),x=!1;break;case"crop":if(!_.x||!_.y){x=!1;break}e=rt(this.cropper),u=C.startX-e.left,d=C.startY-e.top,h=r.minWidth,p=r.minHeight,_.x>0?l=_.y>0?"se":"ne":_.x<0&&(u-=h,l=_.y>0?"sw":"nw"),_.y<0&&(d-=p),this.cropped||(Z(this.cropBox,f),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}x&&(r.width=h,r.height=p,r.left=u,r.top=d,this.action=l,this.renderCropBox()),U(s,(function(t){t.startX=t.endX,t.startY=t.endY}))}},_t={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&q(this.dragBox,v),Z(this.cropBox,f),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Y({},this.initialImageData),this.canvasData=Y({},this.initialCanvasData),this.cropBoxData=Y({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Y(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Z(this.dragBox,v),q(this.cropBox,f)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,U(this.previews,(function(e){e.getElementsByTagName("img")[0].src=t})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Z(this.cropper,p)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,q(this.cropper,p)),this},destroy:function(){var t=this.element;return t.cropper?(t.cropper=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,n=i.left,a=i.top;return this.moveTo(O(t)?t:n+Number(t),O(e)?e:a+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(I(t)&&(i.left=t,n=!0),I(e)&&(i.top=e,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var n=this.options,a=this.canvasData,o=a.width,r=a.height,s=a.naturalWidth,l=a.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&n.zoomable){var c=s*t,u=l*t;if(!1===ot(this.element,"zoom",{ratio:t,oldRatio:o/s,originalEvent:i}))return this;if(i){var d=this.pointers,h=rt(this.cropper),p=d&&Object.keys(d).length?function(t){var e=0,i=0,n=0;return U(t,(function(t){var a=t.startX,o=t.startY;e+=a,i+=o,n+=1})),{pageX:e/=n,pageY:i/=n}}(d):{pageX:i.pageX,pageY:i.pageY};a.left-=(c-o)*((p.pageX-h.left-a.left)/o),a.top-=(u-r)*((p.pageY-h.top-a.top)/r)}else j(e)&&I(e.x)&&I(e.y)?(a.left-=(c-o)*((e.x-a.left)/o),a.top-=(u-r)*((e.y-a.top)/r)):(a.left-=(c-o)/2,a.top-=(u-r)/2);a.width=c,a.height=u,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return I(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,I(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(I(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,n=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(I(t)&&(i.scaleX=t,n=!0),I(e)&&(i.scaleY=e,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,n=this.imageData,a=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-a.left,y:o.top-a.top,width:o.width,height:o.height};var r=n.width/n.naturalWidth;if(U(t,(function(e,i){t[i]=e/r})),e){var s=Math.round(t.y+t.height),l=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=l-t.x,t.height=s-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=n.rotate||0),i.scalable&&(t.scaleX=n.scaleX||1,t.scaleY=n.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,n=this.canvasData,a={};if(this.ready&&!this.disabled&&j(t)){var o=!1;e.rotatable&&I(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(I(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),I(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var r=i.width/i.naturalWidth;I(t.x)&&(a.left=t.x*r+n.left),I(t.y)&&(a.top=t.y*r+n.top),I(t.width)&&(a.width=t.width*r),I(t.height)&&(a.height=t.height*r),this.setCropBoxData(a)}return this},getContainerData:function(){return this.ready?Y({},this.containerData):{}},getImageData:function(){return this.sized?Y({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&U(["left","top","width","height","naturalWidth","naturalHeight"],(function(i){e[i]=t[i]})),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&j(t)&&(I(t.left)&&(e.left=t.left),I(t.top)&&(e.top=t.top),I(t.width)?(e.width=t.width,e.height=t.width/i):I(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,n=this.cropBoxData,a=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&j(t)&&(I(t.left)&&(n.left=t.left),I(t.top)&&(n.top=t.top),I(t.width)&&t.width!==n.width&&(e=!0,n.width=t.width),I(t.height)&&t.height!==n.height&&(i=!0,n.height=t.height),a&&(e?n.height=n.width/a:i&&(n.width=n.height*a)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=ft(this.image,this.imageData,e,t);if(!this.cropped)return i;var n=this.getData(),a=n.x,o=n.y,s=n.width,l=n.height,c=i.width/Math.floor(e.naturalWidth);1!==c&&(a*=c,o*=c,s*=c,l*=c);var u=s/l,d=pt({aspectRatio:u,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),h=pt({aspectRatio:u,width:t.minWidth||0,height:t.minHeight||0},"cover"),p=pt({aspectRatio:u,width:t.width||(1!==c?i.width:s),height:t.height||(1!==c?i.height:l)}),f=p.width,m=p.height;f=Math.min(d.width,Math.max(h.width,f)),m=Math.min(d.height,Math.max(h.height,m));var g=document.createElement("canvas"),v=g.getContext("2d");g.width=$(f),g.height=$(m),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,f,m);var b=t.imageSmoothingEnabled,w=void 0===b||b,y=t.imageSmoothingQuality;v.imageSmoothingEnabled=w,y&&(v.imageSmoothingQuality=y);var x,C,_,k,T,S,M=i.width,D=i.height,A=a,E=o;A<=-s||A>M?(A=0,x=0,_=0,T=0):A<=0?(_=-A,A=0,T=x=Math.min(M,s+A)):A<=M&&(_=0,T=x=Math.min(s,M-A)),x<=0||E<=-l||E>D?(E=0,C=0,k=0,S=0):E<=0?(k=-E,E=0,S=C=Math.min(D,l+E)):E<=D&&(k=0,S=C=Math.min(l,D-E));var L=[A,E,x,C];if(T>0&&S>0){var P=f/s;L.push(_*P,k*P,T*P,S*P)}return v.drawImage.apply(v,[i].concat(r(L.map((function(t){return Math.floor($(t))}))))),g},setAspectRatio:function(t){var e=this.options;return this.disabled||O(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var a="crop"===t,o=e.movable&&"move"===t;t=a||o?t:"none",e.dragMode=t,tt(i,w,t),K(i,h,a),K(i,b,o),e.cropBoxMovable||(tt(n,w,t),K(n,h,a),K(n,b,o))}return this}},kt=c.Cropper,Tt=function(){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e(this,t),!i||!E.test(i.tagName))throw new Error("The first argument is required and must be an or element.");this.element=i,this.options=Y({},L,j(n)&&n),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}var n,a,o;return n=t,o=[{key:"noConflict",value:function(){return window.Cropper=kt,t}},{key:"setDefaults",value:function(t){Y(L,j(t)&&t)}}],(a=[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e.cropper){if(e.cropper=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var i=this.element,n=this.options;if(n.rotatable||n.scalable||(n.checkOrientation=!1),n.checkOrientation&&window.ArrayBuffer)if(D.test(t))A.test(t)?this.read((a=t.replace(gt,""),o=atob(a),r=new ArrayBuffer(o.length),U(s=new Uint8Array(r),(function(t,e){s[e]=o.charCodeAt(e)})),r)):this.clone();else{var a,o,r,s,l=new XMLHttpRequest,c=this.clone.bind(this);this.reloading=!0,this.xhr=l,l.onabort=c,l.onerror=c,l.ontimeout=c,l.onprogress=function(){"image/jpeg"!==l.getResponseHeader("content-type")&&l.abort()},l.onload=function(){e.read(l.response)},l.onloadend=function(){e.reloading=!1,e.xhr=null},n.checkCrossOrigin&&ct(t)&&i.crossOrigin&&(t=ut(t)),l.open("GET",t),l.responseType="arraybuffer",l.withCredentials="use-credentials"===i.crossOrigin,l.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,n=vt(t),a=0,o=1,r=1;if(n>1){this.url=function(t,e){for(var i=[],n=new Uint8Array(t);n.length>0;)i.push(mt.apply(null,W(n.subarray(0,8192)))),n=n.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,"image/jpeg");var s=function(t){var e=0,i=1,n=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:n=-1;break;case 5:e=90,n=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:n}}(n);a=s.rotate,o=s.scaleX,r=s.scaleY}e.rotatable&&(i.rotate=a),e.scalable&&(i.scaleX=o,i.scaleY=r),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,n=e;this.options.checkCrossOrigin&&ct(e)&&(i||(i="anonymous"),n=ut(e)),this.crossOrigin=i,this.crossOriginUrl=n;var a=document.createElement("img");i&&(a.crossOrigin=i),a.src=n||e,a.alt=t.alt||"The image to crop",this.image=a,a.onload=this.start.bind(this),a.onerror=this.stop.bind(this),q(a,m),t.parentNode.insertBefore(a,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=c.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(c.navigator.userAgent),n=function(e,i){Y(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.initialImageData=Y({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var a=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=a,a.onload=function(){n(a.width,a.height),i||o.removeChild(a)},a.src=e.src,i||(a.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(a))}else n(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,n=t.parentNode,a=document.createElement("div");a.innerHTML='
';var o=a.querySelector(".".concat("cropper","-container")),r=o.querySelector(".".concat("cropper","-canvas")),s=o.querySelector(".".concat("cropper","-drag-box")),l=o.querySelector(".".concat("cropper","-crop-box")),c=l.querySelector(".".concat("cropper","-face"));this.container=n,this.cropper=o,this.canvas=r,this.dragBox=s,this.cropBox=l,this.viewBox=o.querySelector(".".concat("cropper","-view-box")),this.face=c,r.appendChild(i),q(t,f),n.insertBefore(o,t.nextSibling),this.isImg||Z(i,m),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,q(l,f),e.guides||q(l.getElementsByClassName("".concat("cropper","-dashed")),f),e.center||q(l.getElementsByClassName("".concat("cropper","-center")),f),e.background&&q(o,"".concat("cropper","-bg")),e.highlight||q(c,g),e.cropBoxMovable&&(q(c,b),tt(c,w,"all")),e.cropBoxResizable||(q(l.getElementsByClassName("".concat("cropper","-line")),f),q(l.getElementsByClassName("".concat("cropper","-point")),f)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),z(e.ready)&&at(t,"ready",e.ready,{once:!0}),ot(t,"ready")}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),Z(this.element,f))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&i(n.prototype,a),o&&i(n,o),t}();return Y(Tt.prototype,bt,wt,yt,xt,Ct,_t),Tt}()},yLpj:function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},zlB4:function(t,e,i){"use strict";i.r(e);var n=i("lcPr"),a=i.n(n),o=(i("YQfW"),i("lb/t")),r=(i("i3gq"),i("JMt0"));function s(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var l={components:{VueCropper:a.a,Autocomplete:o.a,VueTribute:r.a},data:function(){var t;return s(t={config:window.App.config,pageLoading:!1,profile:window._sharedData.curUser,composeText:"",composeTextLength:0,nsfw:!1,filters:[],currentFilter:!1,ids:[],media:[],carouselCursor:0,uploading:!1,uploadProgress:100,composeType:!1,page:1,composeState:"publish",visibility:"public",visibilityTag:"Public"},"nsfw",!1),s(t,"place",!1),s(t,"commentsDisabled",!1),s(t,"optimizeMedia",!0),s(t,"mediaCropped",!1),s(t,"pageTitle",""),s(t,"cropper",{aspectRatio:1,viewMode:1,zoomable:!0,zoom:0}),s(t,"namedPages",["cropPhoto","tagPeople","addLocation","advancedSettings","visibility","altText","addToCollection","schedulePost","mediaMetadata","addToStory","editMedia","cameraRoll","tagPeopleHelp","textOptions","licensePicker"]),s(t,"cameraRollMedia",[]),s(t,"taggedUsernames",[]),s(t,"taggedPeopleSearch",null),s(t,"textMode",!1),s(t,"tributeSettings",{collection:[{trigger:"@",menuShowMinLength:2,values:function(t,e){axios.get("/api/compose/v0/search/mention",{params:{q:t}}).then((function(t){e(t.data)})).catch((function(t){console.log(t)}))}},{trigger:"#",menuShowMinLength:2,values:function(t,e){axios.get("/api/compose/v0/search/hashtag",{params:{q:t}}).then((function(t){e(t.data)})).catch((function(t){console.log(t)}))}}]}),s(t,"availableLicenses",[{id:1,name:"All Rights Reserved"},{id:5,name:"Public Domain Work"},{id:6,name:"Public Domain Dedication (CC0)"},{id:11,name:"Attribution"},{id:12,name:"Attribution-ShareAlike"},{id:13,name:"Attribution-NonCommercial"},{id:14,name:"Attribution-NonCommercial-ShareAlike"},{id:15,name:"Attribution-NoDerivs"},{id:16,name:"Attribution-NonCommercial-NoDerivs"}]),s(t,"licenseIndex",0),t},beforeMount:function(){this.fetchProfile(),0==this.config.uploader.media_types.includes("video/mp4")&&(this.composeType="post"),this.filters=window.App.util.filters},mounted:function(){this.mediaWatcher()},methods:{fetchProfile:function(){var t=this;window._sharedData.curUser.id?(this.profile=window._sharedData.curUser,1==this.profile.locked&&(this.visibility="private",this.visibilityTag="Followers Only")):axios.get("/api/pixelfed/v1/accounts/verify_credentials").then((function(e){window._sharedData.currentUser=e.data,t.profile=e.data,1==t.profile.locked&&(t.visibility="private",t.visibilityTag="Followers Only")})).catch((function(t){}))},addMedia:function(t){var e=$(t.target);e.attr("disabled",""),$('.file-input[name="media"]').trigger("click"),e.blur(),e.removeAttr("disabled")},addText:function(t){this.pageTitle="New Text Post",this.page="addText",this.textMode=!0},mediaWatcher:function(){var t=this;$(document).on("change","#pf-dz",(function(e){t.mediaUpload()}))},mediaUpload:function(){var t=this;t.uploading=!0;var e=document.querySelector("#pf-dz");e.files.length||(t.uploading=!1),Array.prototype.forEach.call(e.files,(function(e,i){if(t.media&&t.media.length+i>=t.config.uploader.album_limit)return swal("Error","You can only upload "+t.config.uploader.album_limit+" photos per album","error"),t.uploading=!1,void(t.page=2);var n=e.type,a=t.config.uploader.media_types.split(",");if(-1==$.inArray(n,a))return swal("Invalid File Type","The file you are trying to add is not a valid mime type. Please upload a "+t.config.uploader.media_types+" only.","error"),t.uploading=!1,void(t.page=2);var o=new FormData;o.append("file",e);var r={onUploadProgress:function(e){var i=Math.round(100*e.loaded/e.total);t.uploadProgress=i}};axios.post("/api/compose/v0/media/upload",o,r).then((function(e){t.uploadProgress=100,t.ids.push(e.data.id),t.media.push(e.data),t.uploading=!1,setTimeout((function(){t.page=2}),300)})).catch((function(i){switch(i.response.status){case 451:t.uploading=!1,e.value=null,swal("Banned Content","This content has been banned and cannot be uploaded.","error"),t.page=2;break;case 429:t.uploading=!1,e.value=null,swal("Limit Reached","You can upload up to 250 photos or videos per day and you've reached that limit. Please try again later.","error"),t.page=2;break;default:t.uploading=!1,e.value=null,swal("Oops, something went wrong!","An unexpected error occurred.","error"),t.page=2}})),e.value=null,t.uploadProgress=0}))},toggleFilter:function(t,e){this.media[this.carouselCursor].filter_class=e,this.currentFilter=e},deleteMedia:function(){var t=this;if(0!=window.confirm("Are you sure you want to delete this media?")){var e=this.media[this.carouselCursor].id;axios.delete("/api/compose/v0/media/delete",{params:{id:e}}).then((function(e){t.ids.splice(t.carouselCursor,1),t.media.splice(t.carouselCursor,1),0==t.media.length?(t.ids=[],t.media=[],t.carouselCursor=0):t.carouselCursor=0})).catch((function(t){swal("Whoops!","An error occured when attempting to delete this, please try again","error")}))}},compose:function(){var t=this.composeState;if(100==this.uploadProgress&&0!=this.ids.length)if(this.composeText.length>this.config.uploader.max_caption_length)swal("Error","Caption is too long","error");else switch(t){case"publish":if(0==this.media.length)return void swal("Whoops!","You need to add media before you can save this!","warning");"Add optional caption..."==this.composeText&&(this.composeText="");var e={media:this.media,caption:this.composeText,visibility:this.visibility,cw:this.nsfw,comments_disabled:this.commentsDisabled,place:this.place,tagged:this.taggedUsernames,optimize_media:this.optimizeMedia,license:this.availableLicenses[this.licenseIndex].id};return void axios.post("/api/compose/v0/publish",e).then((function(t){var e=t.data;window.location.href=e})).catch((function(t){var e=t.response.data.message?t.response.data.message:"An unexpected error occured.";swal("Oops, something went wrong!",e,"error")}));case"delete":return this.ids=[],this.media=[],this.carouselCursor=0,this.composeText="",this.composeTextLength=0,void $("#composeModal").modal("hide")}},composeTextPost:function(){var t=this.composeState;if(this.composeText.length>this.config.uploader.max_caption_length)swal("Error","Caption is too long","error");else switch(t){case"publish":var e={caption:this.composeText,visibility:this.visibility,cw:this.nsfw,comments_disabled:this.commentsDisabled,place:this.place,tagged:this.taggedUsernames};return void axios.post("/api/compose/v0/publish/text",e).then((function(t){var e=t.data;window.location.href=e})).catch((function(t){var e=t.response.data.message?t.response.data.message:"An unexpected error occured.";swal("Oops, something went wrong!",e,"error")}));case"delete":return this.ids=[],this.media=[],this.carouselCursor=0,this.composeText="",this.composeTextLength=0,void $("#composeModal").modal("hide")}},closeModal:function(){this.composeType="",$("#composeModal").modal("hide")},goBack:function(){switch(this.pageTitle="",this.page){case"addText":this.page=1;break;case"textOptions":this.page="addText";break;case"cropPhoto":case"editMedia":this.page=2;break;case"tagPeopleHelp":this.showTagCard();break;case"licensePicker":this.page=3;break;default:-1!=this.namedPages.indexOf(this.page)?this.page=this.textMode?"addText":3:this.textMode||this.page--}},nextPage:function(){switch(this.pageTitle="",this.page){case 1:this.page=2;break;case"cropPhoto":this.pageLoading=!0;var t=this;this.$refs.cropper.getCroppedCanvas({maxWidth:4096,maxHeight:4096,fillColor:"#fff",imageSmoothingEnabled:!1,imageSmoothingQuality:"high"}).toBlob((function(e){t.mediaCropped=!0;var i=new FormData;i.append("file",e),i.append("id",t.ids[t.carouselCursor]);axios.post("/api/compose/v0/media/update",i).then((function(e){t.media[t.carouselCursor].url=e.data.url,t.pageLoading=!1,t.page=2})).catch((function(t){}))}));break;case 2:this.currentFilter?window.confirm("Are you sure you want to apply this filter?")&&(this.applyFilterToMedia(),this.page++):this.page++;break;case 3:this.page++}},rotate:function(){this.$refs.cropper.rotate(90)},changeAspect:function(t){this.cropper.aspectRatio=t,this.$refs.cropper.setAspectRatio(t)},showTagCard:function(){this.pageTitle="Tag People",this.page="tagPeople"},showTagHelpCard:function(){this.pageTitle="About Tag People",this.page="tagPeopleHelp"},showLocationCard:function(){this.pageTitle="Add Location",this.page="addLocation"},showAdvancedSettingsCard:function(){this.pageTitle="Advanced Settings",this.page="advancedSettings"},locationSearch:function(t){if(t.length<1)return[];return axios.get("/api/compose/v0/search/location",{params:{q:t}}).then((function(t){return t.data}))},getResultValue:function(t){return t.name+", "+t.country},onSubmitLocation:function(t){this.place=t,this.pageTitle=this.textMode?"New Text Post":"",this.page=this.textMode?"addText":3},showVisibilityCard:function(){this.pageTitle="Post Visibility",this.page="visibility"},showAddToStoryCard:function(){this.pageTitle="Add to Story",this.page="addToStory"},showCropPhotoCard:function(){this.pageTitle="Edit Photo",this.page="cropPhoto"},toggleVisibility:function(t){this.visibility=t,this.visibilityTag={public:"Public",private:"Followers Only",unlisted:"Unlisted"}[t],this.pageTitle="",this.page=this.textMode?"addText":3},showMediaDescriptionsCard:function(){this.pageTitle="Media Descriptions",this.page="altText"},showAddToCollectionsCard:function(){this.pageTitle="Add to Collection",this.page="addToCollection"},showSchedulePostCard:function(){this.pageTitle="Schedule Post",this.page="schedulePost"},showEditMediaCard:function(){this.pageTitle="Edit Media",this.page="editMedia"},fetchCameraRollDrafts:function(){var t=this;axios.get("/api/pixelfed/local/drafts").then((function(e){t.cameraRollMedia=e.data}))},applyFilterToMedia:function(){var t=navigator.userAgent.toLowerCase();if(-1!=t.indexOf("firefox")||-1!=t.indexOf("chrome"))for(var e=this.media,i=null,n=document.getElementById("pr_canvas"),a=n.getContext("2d"),o=document.getElementById("pr_img"),r=null,s=e.length-1;s>=0;s--)(i=e[s]).filter_class&&(o.src=i.url,o.addEventListener("load",(function(t){n.width=o.width,n.height=o.height,a.filter=App.util.filterCss[i.filter_class],a.drawImage(o,0,0,o.width,o.height),a.save(),n.toBlob((function(t){(r=new FormData).append("file",t),r.append("id",i.id),axios.post("/api/compose/v0/media/update",r).then((function(t){})).catch((function(t){}))}))}),i.mime,.9),a.clearRect(0,0,o.width,o.height));else swal("Oops!","Your browser does not support the filter feature.","error")},tagSearch:function(t){if(t.length<1)return[];var e=this;return axios.get("/api/compose/v0/search/tag",{params:{q:t}}).then((function(t){if(t.data.length)return t.data.filter((function(t){return 0==e.taggedUsernames.filter((function(e){return e.id==t.id})).length}))}))},getTagResultValue:function(t){return"@"+t.name},onTagSubmitLocation:function(t){this.taggedUsernames.filter((function(e){return e.id==t.id})).length||(this.taggedUsernames.push(t),this.$refs.autocomplete.value="")},untagUsername:function(t){this.taggedUsernames.splice(t,1)},showTextOptions:function(){this.page="textOptions",this.pageTitle="Text Post Options"},showLicenseCard:function(){this.pageTitle="Select a License",this.page="licensePicker"},toggleLicense:function(t){this.licenseIndex=t,this.pageTitle="",this.page=3}}},c=(i("E+Lu"),i("KHd+")),u=Object(c.a)(l,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("input",{staticClass:"w-100 h-100 d-none file-input",attrs:{type:"file",id:"pf-dz",name:"media",accept:t.config.uploader.media_types}}),t._v(" "),i("canvas",{staticClass:"d-none",attrs:{id:"pr_canvas"}}),t._v(" "),i("img",{staticClass:"d-none",attrs:{id:"pr_img"}}),t._v(" "),i("div",{staticClass:"timeline"},[t.uploading?i("div",[i("div",{staticClass:"card status-card card-md-rounded-0 w-100 h-100 bg-light py-3",staticStyle:{"border-bottom":"1px solid #f1f1f1"}},[i("div",{staticClass:"p-5 mt-2"},[i("b-progress",{attrs:{value:t.uploadProgress,max:100,striped:"",animated:!0}}),t._v(" "),i("p",{staticClass:"text-center mb-0 font-weight-bold"},[t._v("Uploading ... ("+t._s(t.uploadProgress)+"%)")])],1)])]):"cameraRoll"==t.page?i("div",[i("div",{staticClass:"card status-card card-md-rounded-0",staticStyle:{display:"flex"}},[t._m(0),t._v(" "),i("div",{staticClass:"h-100 card-body p-0 border-top",staticStyle:{width:"100%","min-height":"400px"}},[t.cameraRollMedia.length>0?i("div",{staticClass:"row p-0 m-0"},t._l(t.cameraRollMedia,(function(t,e){return i("div",{class:[0==e?"col-12 p-0":"col-3 p-0"]},[i("div",{staticClass:"card info-overlay p-0 rounded-0 shadow-none border"},[i("div",{staticClass:"square"},[i("img",{staticClass:"square-content",attrs:{src:t.preview_url}})])])])})),0):i("div",{staticClass:"w-100 h-100 d-flex justify-content-center align-items-center"},[i("span",{staticClass:"w-100 h-100"},[i("button",{staticClass:"btn btn-primary",attrs:{type:"button"}},[t._v("Upload")]),t._v(" "),i("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(e){return t.fetchCameraRollDrafts()}}},[t._v("Load Camera Roll")])])])])])]):i("div",[i("div",{staticClass:"card status-card card-md-rounded-0 w-100 h-100",staticStyle:{display:"flex"}},[i("div",{staticClass:"card-header d-inline-flex align-items-center justify-content-between bg-white"},[i("div",[1==t.page?i("a",{staticClass:"font-weight-bold text-decoration-none text-muted",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.closeModal()}}},[i("i",{staticClass:"fas fa-times fa-lg"}),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]):2==t.page?i("span",[t.config.uploader.album_limit>t.media.length?i("button",{staticClass:"btn btn-outline-primary btn-sm font-weight-bold",attrs:{id:"cm-add-media-btn"},on:{click:function(e){return e.preventDefault(),t.addMedia(e)}}},[i("i",{staticClass:"fas fa-plus"})]):i("button",{staticClass:"btn btn-outline-secondary btn-sm font-weight-bold",attrs:{disabled:""}},[i("i",{staticClass:"fas fa-plus"})]),t._v(" "),i("b-tooltip",{attrs:{target:"cm-add-media-btn",triggers:"hover"}},[t._v("\n\t\t\t\t\t\t\t\tUpload another photo or video\n\t\t\t\t\t\t\t")])],1):3==t.page?i("span",[i("a",{staticClass:"text-lighter text-decoration-none mr-3 d-flex align-items-center",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goBack()}}},[i("i",{staticClass:"fas fa-long-arrow-alt-left fa-lg mr-2"}),t._v(" "),i("span",{staticClass:"btn btn-outline-secondary btn-sm px-2 py-0 disabled",attrs:{disabled:""}},[t._v(t._s(t.media.length))])]),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]):i("span",[i("a",{staticClass:"text-lighter text-decoration-none mr-3",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goBack()}}},[i("i",{staticClass:"fas fa-long-arrow-alt-left fa-lg"})])]),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]),t._v(" "),2==t.page?i("div",[1==t.media.length?i("a",{staticClass:"text-center text-dark",attrs:{href:"#",title:"Crop & Resize",id:"cm-crop-btn"},on:{click:function(e){return e.preventDefault(),t.showCropPhotoCard(e)}}},[i("i",{staticClass:"fas fa-crop-alt fa-lg"})]):t._e(),t._v(" "),i("b-tooltip",{attrs:{target:"cm-crop-btn",triggers:"hover"}},[t._v("\n\t\t\t\t\t\t\tCrop & Resize\n\t\t\t\t\t\t")])],1):t._e(),t._v(" "),i("div",[t.pageLoading?i("span",[t._m(1)]):i("span",[!t.pageLoading&&t.page>1&&t.page<=2||1==t.page&&0!=t.ids.length||"cropPhoto"==t.page?i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.nextPage(e)}}},[t._v("Next")]):t._e(),t._v(" "),t.pageLoading||3!=t.page?t._e():i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.compose()}}},[t._v("Post")]),t._v(" "),t.pageLoading||"addText"!=t.page?t._e():i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.composeTextPost()}}},[t._v("Post")])])])]),t._v(" "),i("div",{staticClass:"card-body p-0 border-top"},["licensePicker"==t.page?i("div",{staticClass:"w-100 h-100",staticStyle:{"min-height":"280px"}},[i("div",{staticClass:"list-group list-group-flush"},t._l(t.availableLicenses,(function(e,n){return i("div",{staticClass:"list-group-item cursor-pointer",class:{"text-primary":t.licenseIndex===n,"font-weight-bold":t.licenseIndex===n},on:{click:function(e){return t.toggleLicense(n)}}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(e.name)+"\n\t\t\t\t\t\t\t")])})),0)]):t._e(),t._v(" "),"textOptions"==t.page?i("div",{staticClass:"w-100 h-100",staticStyle:{"min-height":"280px"}}):t._e(),t._v(" "),"addText"==t.page?i("div",{staticClass:"w-100 h-100",staticStyle:{"min-height":"280px"}},[i("div",{staticClass:"mt-2"},[i("div",{staticClass:"media px-3"},[i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small d-none"},[t._v("Body")]),t._v(" "),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.composeText,expression:"composeText"}],staticClass:"form-control border-0 rounded-0 no-focus",staticStyle:{"font-size":"18px",resize:"none"},attrs:{rows:"7",placeholder:"What's happening?"},domProps:{value:t.composeText},on:{keyup:function(e){t.composeTextLength=t.composeText.length},input:function(e){e.target.composing||(t.composeText=e.target.value)}}}),t._v(" "),i("div",{staticClass:"border-bottom"}),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0 font-weight-bold"},[t._v(t._s(t.composeTextLength)+"/"+t._s(t.config.uploader.max_caption_length))]),t._v(" "),i("p",{staticClass:"mb-0 mt-2"},[i("a",{staticClass:"btn btn-primary rounded-pill mr-2",staticStyle:{height:"37px"},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showTextOptions()}}},[i("i",{staticClass:"fas fa-palette px-3 text-white"})]),t._v(" "),i("a",{staticClass:"btn rounded-pill mx-3 d-inline-flex align-items-center",class:[t.nsfw?"btn-danger":"btn-outline-lighter"],staticStyle:{height:"37px"},attrs:{href:"#",title:"Mark as sensitive/not safe for work"},on:{click:function(e){e.preventDefault(),t.nsfw=!t.nsfw}}},[i("i",{staticClass:"far fa-flag px-3"}),t._v(" "),i("span",{staticClass:"text-muted small font-weight-bold"})]),t._v(" "),i("a",{staticClass:"btn btn-outline-lighter rounded-pill d-inline-flex align-items-center",staticStyle:{height:"37px"},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[i("i",{staticClass:"fas fa-eye mr-2"}),t._v(" "),i("span",{staticClass:"text-muted small font-weight-bold"},[t._v(t._s(t.visibilityTag))])])])])])])])]):t._e(),t._v(" "),1==t.page?i("div",{staticClass:"w-100 h-100 d-flex justify-content-center align-items-center",staticStyle:{"min-height":"400px"}},[i("div",{staticClass:"text-center"},[0==t.media.length?i("div",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark"},[i("div",{staticClass:"card-body",on:{click:function(e){return e.preventDefault(),t.addMedia(e)}}},[i("div",{staticClass:"media"},[t._m(2),t._v(" "),i("div",{staticClass:"media-body text-left"},[t._m(3),t._v(" "),i("p",{staticClass:"mb-0 text-muted"},[t._v("Share up to "+t._s(t.config.uploader.album_limit)+" photos or videos")])])])])]):t._e(),t._v(" "),1==t.config.ab.top&&0==t.media.length?i("div",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark"},[i("div",{staticClass:"card-body",on:{click:function(e){return e.preventDefault(),t.addText(e)}}},[t._m(4)])]):t._e(),t._v(" "),1==t.config.features.stories?i("a",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark",attrs:{href:"/i/stories/new"}},[t._m(5)]):t._e(),t._v(" "),t._m(6),t._v(" "),t._m(7)])]):t._e(),t._v(" "),"cropPhoto"==t.page?i("div",{staticClass:"w-100 h-100"},[t.ids.length>0?i("div",[i("vue-cropper",{ref:"cropper",attrs:{relativeZoom:t.cropper.zoom,aspectRatio:t.cropper.aspectRatio,viewMode:t.cropper.viewMode,zoomable:t.cropper.zoomable,rotatable:!0,src:t.media[t.carouselCursor].url}})],1):t._e()]):t._e(),t._v(" "),2==t.page?i("div",{staticClass:"w-100 h-100"},[1==t.media.length?i("div",[i("div",{staticStyle:{display:"flex","min-height":"420px","align-items":"center"},attrs:{slot:"img"},slot:"img"},[i("img",{class:"d-block img-fluid w-100 "+[t.media[t.carouselCursor].filter_class?t.media[t.carouselCursor].filter_class:""],attrs:{src:t.media[t.carouselCursor].url,alt:t.media[t.carouselCursor].description,title:t.media[t.carouselCursor].description}})]),t._v(" "),i("hr"),t._v(" "),t.ids.length>0&&"Image"==t.media[t.carouselCursor].type?i("div",{staticClass:"align-items-center px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{staticClass:"cursor-pointer",attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}})]),t._v(" "),i("a",{class:[null==t.media[t.carouselCursor].filter_class?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}},[t._v("No Filter")])]),t._v(" "),t._l(t.filters,(function(e,n){return i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{class:e[1],attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}})]),t._v(" "),i("a",{class:[t.media[t.carouselCursor].filter_class==e[1]?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}},[t._v(t._s(e[0]))])])}))],2)]):t._e()]):t.media.length>1?i("div",{staticClass:"d-flex-inline px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item mx-md-4"},[t._v(" ")]),t._v(" "),t._l(t.media,(function(e,n){return i("li",{staticClass:"nav-item mx-md-4"},[i("div",{staticClass:"nav-link",staticStyle:{display:"block",width:"300px",height:"300px"},on:{click:function(e){t.carouselCursor=n}}},[i("span",{class:[e.filter_class?e.filter_class:""]},[i("span",{class:"rounded border "+[n==t.carouselCursor?" border-primary shadow":""],style:"display:block;padding:5px;width:100%;height:100%;background-image: url("+e.url+");background-size:cover;border-width:3px !important;"})])]),t._v(" "),n==t.carouselCursor?i("div",{staticClass:"text-center mb-0 small text-lighter font-weight-bold pt-2"},[i("span",{staticClass:"cursor-pointer",on:{click:function(e){return e.preventDefault(),t.showCropPhotoCard(e)}}},[t._v("Crop")]),t._v(" "),i("span",{staticClass:"cursor-pointer px-3",on:{click:function(e){return e.preventDefault(),t.showEditMediaCard()}}},[t._v("Edit")]),t._v(" "),i("span",{staticClass:"cursor-pointer",on:{click:function(e){return t.deleteMedia()}}},[t._v("Delete")])]):t._e()])})),t._v(" "),i("li",{staticClass:"nav-item mx-md-4"},[t._v(" ")])],2),t._v(" "),i("hr"),t._v(" "),t.ids.length>0&&"Image"==t.media[t.carouselCursor].type?i("div",{staticClass:"align-items-center px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{staticClass:"cursor-pointer",attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}})]),t._v(" "),i("a",{class:[null==t.media[t.carouselCursor].filter_class?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}},[t._v("No Filter")])]),t._v(" "),t._l(t.filters,(function(e,n){return i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{class:e[1],attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}})]),t._v(" "),i("a",{class:[t.media[t.carouselCursor].filter_class==e[1]?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}},[t._v(t._s(e[0]))])])}))],2)]):t._e()]):i("div",[i("p",{staticClass:"mb-0 p-5 text-center font-weight-bold"},[t._v("An error occured, please refresh the page.")])])]):t._e(),t._v(" "),3==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"border-bottom mt-2"},[i("div",{staticClass:"media px-3"},[i("img",{class:[t.media[0].filter_class?"mr-2 "+t.media[0].filter_class:"mr-2"],attrs:{src:t.media[0].url,width:"42px",height:"42px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small d-none"},[t._v("Caption")]),t._v(" "),i("vue-tribute",{attrs:{options:t.tributeSettings}},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.composeText,expression:"composeText"}],staticClass:"form-control border-0 rounded-0 no-focus",attrs:{rows:"3",placeholder:"Write a caption..."},domProps:{value:t.composeText},on:{keyup:function(e){t.composeTextLength=t.composeText.length},input:function(e){e.target.composing||(t.composeText=e.target.value)}}})]),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0"},[t._v(t._s(t.composeTextLength)+"/"+t._s(t.config.uploader.max_caption_length))])],1)])])]),t._v(" "),i("div",{staticClass:"border-bottom d-flex justify-content-between px-4 mb-0 py-2 "},[t._m(8),t._v(" "),i("div",[i("div",{staticClass:"custom-control custom-switch",staticStyle:{"z-index":"9999"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.nsfw,expression:"nsfw"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"asnsfw"},domProps:{checked:Array.isArray(t.nsfw)?t._i(t.nsfw,null)>-1:t.nsfw},on:{change:function(e){var i=t.nsfw,n=e.target,a=!!n.checked;if(Array.isArray(i)){var o=t._i(i,null);n.checked?o<0&&(t.nsfw=i.concat([null])):o>-1&&(t.nsfw=i.slice(0,o).concat(i.slice(o+1)))}else t.nsfw=a}}}),t._v(" "),i("label",{staticClass:"custom-control-label",attrs:{for:"asnsfw"}})])])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showTagCard()}}},[t._v("Tag people")])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showLicenseCard()}}},[t._v("Add license "),i("span",{staticClass:"ml-2 badge badge-primary"},[t._v("NEW")])])]),t._v(" "),i("div",{staticClass:"border-bottom"},[t.place?i("p",{staticClass:"px-4 mb-0 py-2"},[i("span",{staticClass:"text-lighter"},[t._v("Location:")]),t._v(" "+t._s(t.place.name)+", "+t._s(t.place.country)+"\n\t\t\t\t\t\t\t\t"),i("span",{staticClass:"float-right"},[i("a",{staticClass:"btn btn-outline-secondary btn-sm small mr-2",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showLocationCard()}}},[t._v("Edit")]),t._v(" "),i("a",{staticClass:"btn btn-outline-secondary btn-sm small",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.place=!1}}},[t._v("Remove")])])]):i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showLocationCard()}}},[t._v("Add location")])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2"},[i("span",[t._v("Audience")]),t._v(" "),i("span",{staticClass:"float-right"},[i("a",{staticClass:"btn btn-outline-secondary btn-sm small mr-3 mt-n1 disabled",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#",disabled:""},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[t._v(t._s(t.visibilityTag))]),t._v(" "),i("a",{staticClass:"text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[i("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])])])]),t._v(" "),i("div",{staticStyle:{"min-height":"200px"}},[i("p",{staticClass:"px-4 mb-0 py-2 small font-weight-bold text-muted cursor-pointer",on:{click:function(e){return t.showAdvancedSettingsCard()}}},[t._v("Advanced settings")])])]):t._e(),t._v(" "),"tagPeople"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("autocomplete",{directives:[{name:"show",rawName:"v-show",value:t.taggedUsernames.length<10,expression:"taggedUsernames.length < 10"}],ref:"autocomplete",attrs:{search:t.tagSearch,placeholder:"@pixelfed","aria-label":"Search usernames","get-result-value":t.getTagResultValue},on:{submit:t.onTagSubmitLocation}}),t._v(" "),i("p",{directives:[{name:"show",rawName:"v-show",value:t.taggedUsernames.length<10,expression:"taggedUsernames.length < 10"}],staticClass:"font-weight-bold text-muted small"},[t._v("You can tag "+t._s(10-t.taggedUsernames.length)+" more "+t._s(9==t.taggedUsernames.length?"person":"people")+"!")]),t._v(" "),i("p",{staticClass:"font-weight-bold text-center mt-3"},[t._v("Tagged People")]),t._v(" "),i("div",{staticClass:"list-group"},[t._l(t.taggedUsernames,(function(e,n){return i("div",{staticClass:"list-group-item d-flex justify-content-between"},[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-2 rounded-circle border",attrs:{src:e.avatar,width:"24px",height:"24px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("span",{staticClass:"font-weight-bold"},[t._v(t._s(e.name))])])]),t._v(" "),i("div",{staticClass:"custom-control custom-switch"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.privacy,expression:"tag.privacy"}],staticClass:"custom-control-input disabled",attrs:{type:"checkbox",id:"cci-tagged-privacy-switch"+n,disabled:""},domProps:{checked:Array.isArray(e.privacy)?t._i(e.privacy,null)>-1:e.privacy},on:{change:function(i){var n=e.privacy,a=i.target,o=!!a.checked;if(Array.isArray(n)){var r=t._i(n,null);a.checked?r<0&&t.$set(e,"privacy",n.concat([null])):r>-1&&t.$set(e,"privacy",n.slice(0,r).concat(n.slice(r+1)))}else t.$set(e,"privacy",o)}}}),t._v(" "),i("label",{staticClass:"custom-control-label font-weight-bold text-lighter",attrs:{for:"cci-tagged-privacy-switch"+n}},[t._v(t._s(e.privacy?"Public":"Private"))]),t._v(" "),i("a",{staticClass:"ml-3",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.untagUsername(n)}}},[i("i",{staticClass:"fas fa-times text-muted"})])])])})),t._v(" "),0==t.taggedUsernames.length?i("div",{staticClass:"list-group-item p-3"},[i("p",{staticClass:"text-center mb-0 font-weight-bold text-lighter"},[t._v("Search usernames to tag.")])]):t._e()],2),t._v(" "),i("p",{staticClass:"font-weight-bold text-center small text-muted pt-3 mb-0"},[t._v("When you tag someone, they are sent a notification."),i("br"),t._v("For more information on tagging, "),i("a",{staticClass:"text-primary",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showTagHelpCard()}}},[t._v("click here")]),t._v(".")])],1):t._e(),t._v(" "),"tagPeopleHelp"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"mb-0 text-center py-3 px-2 lead"},[t._v("Tagging someone is like mentioning them, with the option to make it private between you.")]),t._v(" "),i("p",{staticClass:"mb-3 py-3 px-2 font-weight-lighter"},[t._v("\n\t\t\t\t\t\t\tYou can choose to tag someone in public or private mode. Public mode will allow others to see who you tagged in the post and private mode tagged users will not be shown to others.\n\t\t\t\t\t\t")])]):t._e(),t._v(" "),"addLocation"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"mb-0"},[t._v("Add Location")]),t._v(" "),i("autocomplete",{attrs:{search:t.locationSearch,placeholder:"Search locations ...","aria-label":"Search locations ...","get-result-value":t.getResultValue},on:{submit:t.onSubmitLocation}})],1):t._e(),t._v(" "),"advancedSettings"==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"list-group list-group-flush"},[i("div",{staticClass:"list-group-item d-flex justify-content-between"},[t._m(9),t._v(" "),i("div",[i("div",{staticClass:"custom-control custom-switch",staticStyle:{"z-index":"9999"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.commentsDisabled,expression:"commentsDisabled"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"asdisablecomments"},domProps:{checked:Array.isArray(t.commentsDisabled)?t._i(t.commentsDisabled,null)>-1:t.commentsDisabled},on:{change:function(e){var i=t.commentsDisabled,n=e.target,a=!!n.checked;if(Array.isArray(i)){var o=t._i(i,null);n.checked?o<0&&(t.commentsDisabled=i.concat([null])):o>-1&&(t.commentsDisabled=i.slice(0,o).concat(i.slice(o+1)))}else t.commentsDisabled=a}}}),t._v(" "),i("label",{staticClass:"custom-control-label",attrs:{for:"asdisablecomments"}})])])]),t._v(" "),i("a",{staticClass:"list-group-item",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showMediaDescriptionsCard()}}},[t._m(10)])])]):t._e(),t._v(" "),"visibility"==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"list-group list-group-flush"},[t.profile.locked?t._e():i("div",{staticClass:"list-group-item lead cursor-pointer",class:{"text-primary":"public"==t.visibility},on:{click:function(e){return t.toggleVisibility("public")}}},[t._v("\n\t\t\t\t\t\t\t\tPublic\n\t\t\t\t\t\t\t")]),t._v(" "),t.profile.locked?t._e():i("div",{staticClass:"list-group-item lead cursor-pointer",class:{"text-primary":"unlisted"==t.visibility},on:{click:function(e){return t.toggleVisibility("unlisted")}}},[t._v("\n\t\t\t\t\t\t\t\tUnlisted\n\t\t\t\t\t\t\t")]),t._v(" "),i("div",{staticClass:"list-group-item lead cursor-pointer",class:{"text-primary":"private"==t.visibility},on:{click:function(e){return t.toggleVisibility("private")}}},[t._v("\n\t\t\t\t\t\t\t\tFollowers Only\n\t\t\t\t\t\t\t")])])]):t._e(),t._v(" "),"altText"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[t._l(t.media,(function(e,n){return i("div",[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-3",attrs:{src:e.preview_url,width:"50px",height:"50px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:e.alt,expression:"m.alt"}],staticClass:"form-control",attrs:{placeholder:"Add a media description here...",maxlength:"140"},domProps:{value:e.alt},on:{input:function(i){i.target.composing||t.$set(e,"alt",i.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0"},[t._v(t._s(e.alt?e.alt.length:0)+"/140")])])]),t._v(" "),i("hr")])})),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Cancel")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])],2):t._e(),t._v(" "),"addToCollection"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("div",{staticClass:"list-group mb-3"},[i("div",{staticClass:"list-group-item cursor-pointer compose-action border",on:{click:function(e){return t.goBack()}}},[t._m(11)])]),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Cancel")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])]):t._e(),t._v(" "),"schedulePost"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"mediaMetadata"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"addToStory"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"editMedia"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-3",attrs:{src:t.media[t.carouselCursor].preview_url,width:"50px",height:"50px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small"},[t._v("Media Description")]),t._v(" "),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.media[t.carouselCursor].alt,expression:"media[carouselCursor].alt"}],staticClass:"form-control",attrs:{placeholder:"Add a media description here...",maxlength:"140"},domProps:{value:t.media[t.carouselCursor].alt},on:{input:function(e){e.target.composing||t.$set(t.media[t.carouselCursor],"alt",e.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-muted mb-0 d-flex justify-content-between"},[i("span",[t._v("Describe your photo for people with visual impairments.")]),t._v(" "),i("span",[t._v(t._s(t.media[t.carouselCursor].alt?t.media[t.carouselCursor].alt.length:0)+"/140")])])]),t._v(" "),i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small"},[t._v("License")]),t._v(" "),i("select",{directives:[{name:"model",rawName:"v-model",value:t.licenseIndex,expression:"licenseIndex"}],staticClass:"form-control",on:{change:function(e){var i=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.licenseIndex=e.target.multiple?i:i[0]}}},t._l(t.availableLicenses,(function(e,n){return i("option",{domProps:{value:n,selected:n===t.licenseIndex}},[t._v("\n\t\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")])})),0)])])]),t._v(" "),i("hr"),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Cancel")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])]):t._e()]),t._v(" "),"cropPhoto"==t.page?i("div",{staticClass:"card-footer bg-white d-flex justify-content-between"},[i("div",[i("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button"},on:{click:t.rotate}},[i("i",{staticClass:"fas fa-redo"})])]),t._v(" "),i("div",[i("div",{staticClass:"d-inline-block button-group"},[i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==16/9?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(16/9)}}},[t._v("16:9")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==4/3?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(4/3)}}},[t._v("4:3")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[1.5==t.cropper.aspectRatio?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(1.5)}}},[t._v("3:2")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[1==t.cropper.aspectRatio?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(1)}}},[t._v("1:1")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==2/3?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(2/3)}}},[t._v("2:3")])])])]):t._e()])])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-header d-inline-flex align-items-center justify-content-between bg-white"},[e("span",{staticClass:"pr-3"},[e("i",{staticClass:"fas fa-cog fa-lg text-muted"})]),this._v(" "),e("span",{staticClass:"font-weight-bold"},[this._v("\n\t\t\t\t\t\tCamera Roll\n\t\t\t\t\t")]),this._v(" "),e("span",{staticClass:"text-primary font-weight-bold"},[this._v("Upload")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"spinner-border spinner-border-sm",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:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%","background-color":"#008DF5"}},[e("i",{staticClass:"fas fa-bolt text-white fa-lg"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Post")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"2px solid #008DF5"}},[e("i",{staticClass:"far fa-edit text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Text Post")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("Share a text only post")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-body"},[e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"2px solid #008DF5"}},[e("i",{staticClass:"fas fa-history text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Story")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("Add Photo to Story")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("a",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark",attrs:{href:"/i/collections/create"}},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"2px solid #008DF5"}},[e("i",{staticClass:"fas fa-images text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Collection")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("New collection of posts")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"py-3"},[e("a",{staticClass:"font-weight-bold",attrs:{href:"/site/help"}},[this._v("Help")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticClass:"text-dark "},[this._v("Contains NSFW Media")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticClass:"text-dark "},[this._v("Turn off commenting")]),this._v(" "),e("p",{staticClass:"text-muted small mb-0"},[this._v("Disables comments for this post, you can change this later.")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"d-flex justify-content-between align-items-center"},[e("div",[e("div",{staticClass:"text-dark"},[this._v("Media Descriptions")]),this._v(" "),e("p",{staticClass:"text-muted small mb-0"},[this._v("Describe your photos for people with visual impairments.")])]),this._v(" "),e("div",[e("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"media"},[e("img",{staticClass:"mr-3",attrs:{src:"",alt:"",width:"50px",height:"50px"}}),this._v(" "),e("div",{staticClass:"media-body"},[e("h5",{staticClass:"mt-0"},[this._v("collection title")]),this._v(" "),e("p",{staticClass:"mb-0 text-muted small"},[this._v("3 Photos - Created 2h ago")])])])}],!1,null,"ba051ea2",null);e.default=u.exports}},[[7,0]]]); \ No newline at end of file diff --git a/public/js/profile.js b/public/js/profile.js index e74c1196..4cc3b0c0 100644 --- a/public/js/profile.js +++ b/public/js/profile.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{"2Jpm":function(t,e,n){"use strict";n.r(e);var i={props:["status"],methods:{playOrPause:function(t){var e=t.target;1==e.getAttribute("playing")?(e.removeAttribute("playing"),e.pause()):(e.setAttribute("playing",1),e.play())}}},o=n("KHd+"),s=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return 1==t.status.sensitive?n("div",[n("details",{staticClass:"details-animated"},[n("summary",[n("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(" "),n("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),n("div",{staticClass:"embed-responsive embed-responsive-1by1"},[n("video",{staticClass:"video",attrs:{preload:"none",loop:"",poster:t.status.media_attachments[0].preview_url,"data-id":t.status.id},on:{click:function(e){return t.playOrPause(e)}}},[n("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])])])]):n("div",{staticClass:"embed-responsive embed-responsive-16by9"},[n("video",{staticClass:"video",attrs:{controls:"",preload:"metadata",loop:"",poster:t.status.media_attachments[0].preview_url,"data-id":t.status.id}},[n("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])])}),[],!1,null,null,null);e.default=s.exports},"2wtg":function(t,e,n){Vue.component("photo-presenter",n("d+I4").default),Vue.component("video-presenter",n("2Jpm").default),Vue.component("photo-album-presenter",n("Mrqh").default),Vue.component("video-album-presenter",n("9wGH").default),Vue.component("mixed-album-presenter",n("exej").default),Vue.component("post-menu",n("yric").default),Vue.component("story-viewer",n("Zhjo").default),Vue.component("profile",n("EHjT").default)},4:function(t,e,n){t.exports=n("2wtg")},"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 n=e.protocol+"//"+e.host,i=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var o,s=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(s)?t:(o=0===s.indexOf("//")?s:0===s.indexOf("/")?n+s:i+s.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},"9wGH":function(t,e,n){"use strict";n.r(e);var i={props:["status"]},o=n("KHd+"),s=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return 1==t.status.sensitive?n("div",[n("details",{staticClass:"details-animated"},[n("summary",[n("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(" "),n("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),n("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 n("b-carousel-slide",{key:t.id+"-media"},[n("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"},[n("source",{attrs:{src:t.url,type:t.mime}})])])})),1)],1)]):n("div",[n("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 n("b-carousel-slide",{key:t.id+"-media"},[n("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"},[n("source",{attrs:{src:t.url,type:t.mime}})])])})),1)],1)}),[],!1,null,null,null);e.default=s.exports},B6o4:function(t,e,n){"use strict";n("CcmX")},CcmX:function(t,e,n){var i=n("YG3N");"string"==typeof i&&(i=[[t.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(i,o);i.locals&&(t.exports=i.locals)},EHjT:function(t,e,n){"use strict";n.r(e);n("la7V");function i(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(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 o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0})),o=n.map((function(t){return t.id}));t.ids=o,t.min_id=Math.max.apply(Math,i(o)),t.max_id=Math.min.apply(Math,i(o)),t.modalStatus=_.first(e.data),t.timeline=n,t.ownerCheck(),t.loading=!1})).catch((function(t){swal("Oops, something went wrong","Please release the page.","error")}))},ownerCheck:function(){0!=$("body").hasClass("loggedIn")?this.owner=this.profile.id===this.user.id:this.owner=!1},infiniteTimeline:function(t){var e=this;if(this.loading||this.timeline.length<9)t.complete();else{var n="/api/pixelfed/v1/accounts/"+this.profileId+"/statuses";axios.get(n,{params:{only_media:!0,max_id:this.max_id}}).then((function(n){if(n.data.length&&0==e.loading){var o=n.data,s=e;o.forEach((function(t){-1==s.ids.indexOf(t.id)&&(s.timeline.push(t),s.ids.push(t.id))}));var a=Math.min.apply(Math,i(e.ids));if(a==e.max_id)return void t.complete();e.min_id=Math.max.apply(Math,i(e.ids)),e.max_id=a,t.loaded(),e.loading=!1}else t.complete()}))}},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)+");"},blurhHashMedia:function(t){return t.sensitive?null:t.media_attachments[0].preview_url},switchMode:function(t){var e=this;this.mode=_.indexOf(this.modes,t)?t:"grid","bookmarks"==this.mode&&0==this.bookmarks.length&&axios.get("/api/local/bookmarks").then((function(t){e.bookmarks=t.data,e.bookmarksLoading=!1})),"collections"==this.mode&&0==this.collections.length&&axios.get("/api/local/profile/collections/"+this.profileId).then((function(t){e.collections=t.data}))},reportProfile:function(){var t=this.profile.id;window.location.href="/i/report?type=user&id="+t},reportUrl:function(t){return"/i/report?type="+(t.in_reply_to?"comment":"post")+"&id="+t.id},commentFocus:function(t,e){var n=event.target.parentElement.parentElement.parentElement,i=n.getElementsByClassName("comments")[0];0==i.children.length&&(i.classList.add("mb-2"),this.fetchStatusComments(t,n));var o=n.querySelectorAll(".card-footer")[0],s=n.querySelectorAll(".status-reply-input")[0];1==o.classList.contains("d-none")?(o.classList.remove("d-none"),s.focus()):(o.classList.add("d-none"),s.blur())},likeStatus:function(t,e){0!=$("body").hasClass("loggedIn")&&axios.post("/i/like",{item:t.id}).then((function(e){t.favourites_count=e.data.count,1==t.favourited?t.favourited=!1:t.favourited=!0})).catch((function(t){swal("Error","Something went wrong, please try again later.","error")}))},shareStatus:function(t,e){0!=$("body").hasClass("loggedIn")&&axios.post("/i/share",{item:t.id}).then((function(e){t.reblogs_count=e.data.count,1==t.reblogged?t.reblogged=!1:t.reblogged=!0})).catch((function(t){swal("Error","Something went wrong, please try again later.","error")}))},timestampFormat:function(t){var e=new Date(t);return e.toDateString()+" "+e.toLocaleTimeString()},editUrl:function(t){return t.url+"/edit"},redirect:function(t){window.location.href=t},remoteRedirect:function(t){window.location.href=window.App.config.site.url+"/i/redirect?url="+encodeURIComponent(t)},replyUrl:function(t){return"/p/"+this.profile.username+"/"+(t.account.id==this.profile.id?t.id:t.in_reply_to_id)},mentionUrl:function(t){return"/p/"+t.account.username+"/"+t.id},statusOwner:function(t){return t.account.id==this.profile.id},fetchRelationships:function(){var t=this;0!=document.querySelectorAll("body")[0].classList.contains("loggedIn")&&axios.get("/api/pixelfed/v1/accounts/relationships",{params:{"id[]":this.profileId}}).then((function(e){e.data.length&&(t.relationship=e.data[0],1==e.data[0].blocking&&(t.warning=!0))}))},muteProfile:function(){var t=this;if(0!=$("body").hasClass("loggedIn")){var e=this.profileId;axios.post("/i/mute",{type:"user",item:e}).then((function(e){t.fetchRelationships(),t.$refs.visitorContextMenu.hide(),swal("Success","You have successfully muted "+t.profile.acct,"success")})).catch((function(t){swal("Error","Something went wrong. Please try again later.","error")}))}},unmuteProfile:function(){var t=this;if(0!=$("body").hasClass("loggedIn")){var e=this.profileId;axios.post("/i/unmute",{type:"user",item:e}).then((function(e){t.fetchRelationships(),t.$refs.visitorContextMenu.hide(),swal("Success","You have successfully unmuted "+t.profile.acct,"success")})).catch((function(t){swal("Error","Something went wrong. Please try again later.","error")}))}},blockProfile:function(){var t=this;if(0!=$("body").hasClass("loggedIn")){var e=this.profileId;axios.post("/i/block",{type:"user",item:e}).then((function(e){t.warning=!0,t.fetchRelationships(),t.$refs.visitorContextMenu.hide(),swal("Success","You have successfully blocked "+t.profile.acct,"success")})).catch((function(t){swal("Error","Something went wrong. Please try again later.","error")}))}},unblockProfile:function(){var t=this;if(0!=$("body").hasClass("loggedIn")){var e=this.profileId;axios.post("/i/unblock",{type:"user",item:e}).then((function(e){t.fetchRelationships(),t.$refs.visitorContextMenu.hide(),swal("Success","You have successfully unblocked "+t.profile.acct,"success")})).catch((function(t){swal("Error","Something went wrong. Please try again later.","error")}))}},deletePost:function(t,e){var n=this;0!=$("body").hasClass("loggedIn")&&t.account.id===this.profile.id&&axios.post("/i/delete",{type:"status",item:t.id}).then((function(t){n.timeline.splice(e,1),swal("Success","You have successfully deleted this post","success")})).catch((function(t){swal("Error","Something went wrong. Please try again later.","error")}))},followProfile:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/follow",{item:this.profileId}).then((function(e){t.$refs.visitorContextMenu.hide(),t.relationship.following?(t.profile.followers_count--,1==t.profile.locked&&(window.location.href="/")):t.profile.followers_count++,t.relationship.following=!t.relationship.following})).catch((function(t){t.response.data.message&&swal("Error",t.response.data.message,"error")}))},followingModal:function(){var t=this;if(0!=$("body").hasClass("loggedIn")){if(0!=this.profileSettings.following.list)return this.followingCursor>1||axios.get("/api/pixelfed/v1/accounts/"+this.profileId+"/following",{params:{page:this.followingCursor}}).then((function(e){t.following=e.data,t.followingModalSearchCache=e.data,t.followingCursor++,e.data.length<10&&(t.followingMore=!1)})),void this.$refs.followingModal.show()}else window.location.href=encodeURI("/login?next=/"+this.profileUsername+"/")},followersModal:function(){var t=this;if(0!=$("body").hasClass("loggedIn")){if(0!=this.profileSettings.followers.list)return this.followerCursor>1||axios.get("/api/pixelfed/v1/accounts/"+this.profileId+"/followers",{params:{page:this.followerCursor}}).then((function(e){var n;(n=t.followers).push.apply(n,i(e.data)),t.followerCursor++,e.data.length<10&&(t.followerMore=!1)})),void this.$refs.followerModal.show()}else window.location.href=encodeURI("/login?next=/"+this.profileUsername+"/")},followingLoadMore:function(){var t=this;0!=$("body").hasClass("loggedIn")?axios.get("/api/pixelfed/v1/accounts/"+this.profile.id+"/following",{params:{page:this.followingCursor,fbu:this.followingModalSearch}}).then((function(e){var n;e.data.length>0&&((n=t.following).push.apply(n,i(e.data)),t.followingCursor++,t.followingModalSearchCache=t.following);e.data.length<10&&(t.followingModalSearchCache=t.following,t.followingMore=!1)})):window.location.href=encodeURI("/login?next=/"+this.profile.username+"/")},followersLoadMore:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.get("/api/pixelfed/v1/accounts/"+this.profile.id+"/followers",{params:{page:this.followerCursor}}).then((function(e){var n;e.data.length>0&&((n=t.followers).push.apply(n,i(e.data)),t.followerCursor++);e.data.length<10&&(t.followerMore=!1)}))},visitorMenu:function(){this.$refs.visitorContextMenu.show()},followModalAction:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"following";axios.post("/i/follow",{item:t}).then((function(t){"following"==i&&(n.following.splice(e,1),n.profile.following_count--)})).catch((function(t){t.response.data.message&&swal("Error",t.response.data.message,"error")}))},momentBackground:function(){var t="w-100 h-100 mt-n3 ";return this.profile.header_bg?t+="default"==this.profile.header_bg?"bg-pixelfed":"bg-moment-"+this.profile.header_bg:t+="bg-pixelfed",t},loadSponsor:function(){var t=this;axios.get("/api/local/profile/sponsor/"+this.profileId).then((function(e){t.sponsorList=e.data}))},showSponsorModal:function(){this.$refs.sponsorModal.show()},goBack:function(){return window.history.length>2?void window.history.back():void(window.location.href="/")},copyProfileLink:function(){navigator.clipboard.writeText(window.location.href),this.$refs.visitorContextMenu.hide()},formatCount:function(t){return App.util.format.count(t)},statusUrl:function(t){return t.url},profileUrl:function(t){return t.url},showEmbedProfileModal:function(){this.ctxEmbedPayload=window.App.util.embed.profile(this.profile.url),this.$refs.visitorContextMenu.hide(),this.$refs.embedModal.show()},ctxCopyEmbed:function(){navigator.clipboard.writeText(this.ctxEmbedPayload),this.$refs.embedModal.hide(),this.$refs.visitorContextMenu.hide()},storyRedirect:function(){window.location.href="/stories/"+this.profileUsername},followingModalSearchHandler:function(){var t=this,e=this,n=this.followingModalSearch;if(0==n.length&&(this.following=this.followingModalSearchCache,this.followingModalSearch=null),n.length>0){var i="/api/pixelfed/v1/accounts/"+e.profileId+"/following?page=1&fbu="+n;axios.get(i).then((function(e){t.following=e.data})).catch((function(t){e.following=e.followingModalSearchCache,e.followingModalSearch=null}))}},truncate:function(t,e){return _.truncate(t,{length:e})}}},a=(n("ae+D"),n("KHd+")),r=Object(a.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"w-100 h-100"},[t.owner&&"moment"==t.layout?n("div",[t._m(0)]):t._e(),t._v(" "),t.isMobile?n("div",{staticClass:"bg-white p-3 border-bottom"},[n("div",{staticClass:"d-flex justify-content-between align-items-center"},[n("div",{staticClass:"cursor-pointer",on:{click:t.goBack}},[n("i",{staticClass:"fas fa-chevron-left fa-lg"})]),t._v(" "),n("div",{staticClass:"font-weight-bold"},[t._v("\n\t\t\t\t"+t._s(this.profileUsername)+"\t\t\t\t\t\t\t\t\n\n\t\t\t")]),t._v(" "),n("div",[n("a",{staticClass:"fas fa-ellipsis-v fa-lg text-muted text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.visitorMenu(e)}}})])])]):t._e(),t._v(" "),t.relationship&&t.relationship.blocking&&t.warning?n("div",{staticClass:"bg-white pt-3 border-bottom"},[n("div",{staticClass:"container"},[n("p",{staticClass:"text-center font-weight-bold"},[t._v("You are blocking this account")]),t._v(" "),n("p",{staticClass:"text-center font-weight-bold"},[t._v("Click "),n("a",{staticClass:"cursor-pointer",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.warning=!1}}},[t._v("here")]),t._v(" to view profile")])])]):t._e(),t._v(" "),t.loading?n("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{height:"80vh"}},[n("img",{attrs:{src:"/img/pixelfed-icon-grey.svg"}})]):t._e(),t._v(" "),t.loading||t.warning?t._e():n("div",["metro"==t.layout?n("div",{staticClass:"container"},[n("div",{class:t.isMobile?"pt-5":"pt-5 border-bottom"},[n("div",{staticClass:"container px-0"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-md-4 d-md-flex"},[n("div",{staticClass:"profile-avatar mx-md-auto"},[n("div",{staticClass:"d-block d-md-none mt-n3 mb-3"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-4"},[t.hasStory?n("div",{staticClass:"has-story cursor-pointer shadow-sm",on:{click:function(e){return t.storyRedirect()}}},[n("img",{staticClass:"rounded-circle",attrs:{alt:t.profileUsername+"'s profile picture",src:t.profile.avatar,width:"77px",height:"77px"}})]):n("div",[n("img",{staticClass:"rounded-circle border",attrs:{alt:t.profileUsername+"'s profile picture",src:t.profile.avatar,width:"77px",height:"77px"}})])]),t._v(" "),n("div",{staticClass:"col-8"},[n("div",{staticClass:"d-block d-md-none mt-3 py-2"},[n("ul",{staticClass:"nav d-flex justify-content-between"},[n("li",{staticClass:"nav-item"},[n("div",{staticClass:"font-weight-light"},[n("span",{staticClass:"text-dark text-center"},[n("p",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.formatCount(t.profile.statuses_count)))]),t._v(" "),n("p",{staticClass:"text-muted mb-0 small"},[t._v("Posts")])])])]),t._v(" "),n("li",{staticClass:"nav-item"},[t.profileSettings.followers.count?n("div",{staticClass:"font-weight-light"},[n("a",{staticClass:"text-dark cursor-pointer text-center",on:{click:function(e){return t.followersModal()}}},[n("p",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.formatCount(t.profile.followers_count)))]),t._v(" "),n("p",{staticClass:"text-muted mb-0 small"},[t._v("Followers")])])]):t._e()]),t._v(" "),n("li",{staticClass:"nav-item"},[t.profileSettings.following.count?n("div",{staticClass:"font-weight-light"},[n("a",{staticClass:"text-dark cursor-pointer text-center",on:{click:function(e){return t.followingModal()}}},[n("p",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.formatCount(t.profile.following_count)))]),t._v(" "),n("p",{staticClass:"text-muted mb-0 small"},[t._v("Following")])])]):t._e()])])])])])]),t._v(" "),n("div",{staticClass:"d-none d-md-block pb-3"},[t.hasStory?n("div",{staticClass:"has-story-lg cursor-pointer shadow-sm",on:{click:function(e){return t.storyRedirect()}}},[n("img",{staticClass:"rounded-circle box-shadow cursor-pointer",attrs:{alt:t.profileUsername+"'s profile picture",src:t.profile.avatar,width:"150px",height:"150px"}})]):n("div",[n("img",{staticClass:"rounded-circle box-shadow",attrs:{alt:t.profileUsername+"'s profile picture",src:t.profile.avatar,width:"150px",height:"150px"}})]),t._v(" "),t.sponsorList.patreon||t.sponsorList.liberapay||t.sponsorList.opencollective?n("p",{staticClass:"text-center mt-3"},[n("button",{staticClass:"btn btn-outline-secondary font-weight-bold py-0",attrs:{type:"button"},on:{click:t.showSponsorModal}},[n("i",{staticClass:"fas fa-heart text-danger"}),t._v("\n\t\t\t\t\t\t\t\t\t\t\tDonate\n\t\t\t\t\t\t\t\t\t\t")])]):t._e()])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-8 d-flex align-items-center"},[n("div",{staticClass:"profile-details"},[n("div",{staticClass:"d-none d-md-flex username-bar pb-3 align-items-center"},[n("span",{staticClass:"font-weight-ultralight h3 mb-0"},[t._v(t._s(t.profile.username))]),t._v(" "),t.profile.is_admin?n("span",{staticClass:"pl-1 pb-2 fa-stack",attrs:{title:"Admin Account","data-toggle":"tooltip"}},[n("i",{staticClass:"fas fa-certificate fa-lg text-danger fa-stack-1x"}),t._v(" "),n("i",{staticClass:"fas fa-crown text-white fa-sm fa-stack-1x",staticStyle:{"font-size":"9px"}})]):t._e(),t._v(" "),t.profile.id!=t.user.id&&t.user.hasOwnProperty("id")?n("span",[1==t.relationship.following?n("span",{staticClass:"pl-4"},[n("a",{staticClass:"btn btn-outline-secondary font-weight-bold btn-sm py-1 text-dark mr-2 px-3 btn-sec-alt",staticStyle:{border:"1px solid #dbdbdb"},attrs:{href:"/account/direct/t/"+t.profile.id,"data-toggle":"tooltip",title:"Message"}},[t._v("Message")]),t._v(" "),n("button",{staticClass:"btn btn-outline-secondary font-weight-bold btn-sm py-1 text-dark btn-sec-alt",staticStyle:{border:"1px solid #dbdbdb"},attrs:{type:"button","data-toggle":"tooltip",title:"Unfollow"},on:{click:t.followProfile}},[n("i",{staticClass:"fas fa-user-check mx-3"})])]):t._e(),t._v(" "),t.relationship.following?t._e():n("span",{staticClass:"pl-4"},[n("button",{staticClass:"btn btn-primary font-weight-bold btn-sm py-1 px-3",attrs:{type:"button","data-toggle":"tooltip",title:"Follow"},on:{click:t.followProfile}},[t._v("Follow")])])]):t._e(),t._v(" "),t.owner&&t.user.hasOwnProperty("id")?n("span",{staticClass:"pl-4"},[n("a",{staticClass:"btn btn-outline-secondary btn-sm",staticStyle:{"font-weight":"600"},attrs:{href:"/settings/home"}},[t._v("Edit Profile")])]):t._e(),t._v(" "),n("span",{staticClass:"pl-4"},[n("a",{staticClass:"fas fa-ellipsis-h fa-lg text-dark text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.visitorMenu(e)}}})])]),t._v(" "),n("div",{staticClass:"font-size-16px"},[n("div",{staticClass:"d-none d-md-inline-flex profile-stats pb-3"},[n("div",{staticClass:"font-weight-light pr-5"},[n("span",{staticClass:"text-dark"},[n("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(t.profile.statuses_count)))]),t._v("\n\t\t\t\t\t\t\t\t\t\t\t\tPosts\n\t\t\t\t\t\t\t\t\t\t\t")])]),t._v(" "),t.profileSettings.followers.count?n("div",{staticClass:"font-weight-light pr-5"},[n("a",{staticClass:"text-dark cursor-pointer",on:{click:function(e){return t.followersModal()}}},[n("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(t.profile.followers_count)))]),t._v("\n\t\t\t\t\t\t\t\t\t\t\t\tFollowers\n\t\t\t\t\t\t\t\t\t\t\t")])]):t._e(),t._v(" "),t.profileSettings.following.count?n("div",{staticClass:"font-weight-light"},[n("a",{staticClass:"text-dark cursor-pointer",on:{click:function(e){return t.followingModal()}}},[n("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(t.profile.following_count)))]),t._v("\n\t\t\t\t\t\t\t\t\t\t\t\tFollowing\n\t\t\t\t\t\t\t\t\t\t\t")])]):t._e()]),t._v(" "),n("p",{staticClass:"mb-0 d-flex align-items-center"},[n("span",{staticClass:"font-weight-bold pr-3"},[t._v(t._s(t.profile.display_name))])]),t._v(" "),t.profile.note?n("div",{staticClass:"mb-0",domProps:{innerHTML:t._s(t.profile.note)}}):t._e(),t._v(" "),t.profile.website?n("p",{},[n("a",{staticClass:"profile-website",attrs:{href:t.profile.website,rel:"me external nofollow noopener",target:"_blank"},on:{click:function(e){return e.preventDefault(),t.remoteRedirect(t.profile.website)}}},[t._v(t._s(t.truncate(t.profile.website,24)))])]):t._e()])])])])])]),t._v(" "),n("div",{staticClass:"d-block d-md-none my-0 pt-3 border-bottom"},[t.user&&t.user.hasOwnProperty("id")?n("p",{staticClass:"pt-3"},[t.owner?n("button",{staticClass:"btn btn-outline-secondary bg-white btn-sm py-1 btn-block text-center font-weight-bold text-dark border border-lighter",on:{click:function(e){return e.preventDefault(),t.redirect("/settings/home")}}},[t._v("Edit Profile")]):t._e(),t._v(" "),!t.owner&&t.relationship.following?n("button",{staticClass:"btn btn-outline-secondary bg-white btn-sm py-1 px-5 font-weight-bold text-dark border border-lighter",on:{click:t.followProfile}},[t._v("   Unfollow   ")]):t._e(),t._v(" "),t.owner||t.relationship.following?t._e():n("button",{staticClass:"btn btn-primary btn-sm py-1 px-5 font-weight-bold",on:{click:t.followProfile}},[t._v(t._s(t.relationship.followed_by?"Follow Back":"     Follow     "))])]):t._e()]),t._v(" "),n("div",{},[n("ul",{staticClass:"nav nav-topbar d-flex justify-content-center border-0"},[n("li",{staticClass:"nav-item border-top"},[n("a",{class:"grid"==this.mode?"nav-link text-dark":"nav-link",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchMode("grid")}}},[n("i",{staticClass:"fas fa-th"}),t._v(" "),n("span",{staticClass:"d-none d-md-inline-block small pl-1"},[t._v("POSTS")])])]),t._v(" "),n("li",{staticClass:"nav-item px-0 border-top"},[n("a",{class:"collections"==this.mode?"nav-link text-dark":"nav-link",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchMode("collections")}}},[n("i",{staticClass:"fas fa-images"}),t._v(" "),n("span",{staticClass:"d-none d-md-inline-block small pl-1"},[t._v("COLLECTIONS")])])]),t._v(" "),t.owner?n("li",{staticClass:"nav-item border-top"},[n("a",{class:"bookmarks"==this.mode?"nav-link text-dark":"nav-link",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchMode("bookmarks")}}},[n("i",{staticClass:"fas fa-bookmark"}),t._v(" "),n("span",{staticClass:"d-none d-md-inline-block small pl-1"},[t._v("SAVED")])])]):t._e()])]),t._v(" "),n("div",{staticClass:"container px-0"},[n("div",{staticClass:"profile-timeline mt-md-4"},["grid"==t.mode?n("div",{staticClass:"row"},[t._l(t.timeline,(function(e,i){return n("div",{key:"tlob:"+i,staticClass:"col-4 p-1 p-md-3"},[t._o(n("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:t.statusUrl(e)}},[n("div",{staticClass:"square"},[e.sensitive?n("div",{staticClass:"square-content"},[t._m(1,!0),t._v(" "),n("blur-hash-canvas",{attrs:{width:"32",height:"32",hash:e.media_attachments[0].blurhash}})],1):n("div",{staticClass:"square-content"},[n("blur-hash-image",{attrs:{width:"32",height:"32",hash:e.media_attachments[0].blurhash,src:e.media_attachments[0].preview_url}})],1),t._v(" "),"photo:album"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-images fa-2x"})]):t._e(),t._v(" "),"video"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-video fa-2x"})]):t._e(),t._v(" "),"video:album"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-film fa-2x"})]):t._e(),t._v(" "),n("div",{staticClass:"info-overlay-text"},[n("h5",{staticClass:"text-white m-auto font-weight-bold"},[n("span",[n("span",{staticClass:"far fa-heart fa-lg p-2 d-flex-inline"}),t._v(" "),n("span",{staticClass:"d-flex-inline"},[t._v(t._s(t.formatCount(e.favourites_count)))])]),t._v(" "),n("span",[n("span",{staticClass:"far fa-comment fa-lg p-2 d-flex-inline"}),t._v(" "),n("span",{staticClass:"d-flex-inline"},[t._v(t._s(t.formatCount(e.reply_count)))])])])])])]),0,"tlob:"+i)])})),t._v(" "),0==t.timeline.length?n("div",{staticClass:"col-12"},[t._m(2)]):t._e()],2):t._e(),t._v(" "),t.timeline.length&&"grid"==t.mode?n("div",[n("infinite-loading",{on:{infinite:t.infiniteTimeline}},[n("div",{attrs:{slot:"no-more"},slot:"no-more"}),t._v(" "),n("div",{attrs:{slot:"no-results"},slot:"no-results"})])],1):t._e(),t._v(" "),"bookmarks"==t.mode?n("div",[t.bookmarksLoading?n("div",[t._m(3)]):n("div",[t.bookmarks.length?n("div",{staticClass:"row"},t._l(t.bookmarks,(function(e,i){return n("div",{staticClass:"col-4 p-1 p-sm-2 p-md-3"},[n("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:e.url}},[n("div",{staticClass:"square"},["photo:album"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-images fa-2x"})]):t._e(),t._v(" "),"video"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-video fa-2x"})]):t._e(),t._v(" "),"video:album"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-film fa-2x"})]):t._e(),t._v(" "),n("div",{staticClass:"square-content",style:t.previewBackground(e)}),t._v(" "),n("div",{staticClass:"info-overlay-text"},[n("h5",{staticClass:"text-white m-auto font-weight-bold"},[n("span",[n("span",{staticClass:"far fa-heart fa-lg p-2 d-flex-inline"}),t._v(" "),n("span",{staticClass:"d-flex-inline"},[t._v(t._s(e.favourites_count))])]),t._v(" "),n("span",[n("span",{staticClass:"fas fa-retweet fa-lg p-2 d-flex-inline"}),t._v(" "),n("span",{staticClass:"d-flex-inline"},[t._v(t._s(e.reblogs_count))])])])])])])])})),0):n("div",{staticClass:"col-12"},[t._m(4)])])]):t._e(),t._v(" "),"collections"==t.mode?n("div",[t.collections.length?n("div",{staticClass:"row"},t._l(t.collections,(function(t,e){return n("div",{staticClass:"col-4 p-1 p-sm-2 p-md-3"},[n("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:t.url}},[n("div",{staticClass:"square"},[n("div",{staticClass:"square-content",style:"background-image: url("+t.thumb+");"})])])])})),0):n("div",[t._m(5)])]):t._e()])])]):t._e(),t._v(" "),"moment"==t.layout?n("div",{staticClass:"mt-3"},[n("div",{class:t.momentBackground(),staticStyle:{width:"100%","min-height":"274px"}}),t._v(" "),n("div",{staticClass:"bg-white border-bottom"},[n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 row mx-0"},[n("div",{staticClass:"col-4 text-left mt-2"},[t.relationship&&t.relationship.followed_by?n("span",[n("span",{staticClass:"bg-light border border-secondary font-weight-bold small py-1 px-2 text-muted rounded"},[t._v("FOLLOWS YOU")])]):t._e(),t._v(" "),t.profile.is_admin?n("span",[n("span",{staticClass:"bg-light border border-danger font-weight-bold small py-1 px-2 text-danger rounded"},[t._v("ADMIN")])]):t._e()]),t._v(" "),n("div",{staticClass:"col-4 text-center"},[n("div",{staticClass:"d-block d-md-none"},[n("img",{staticClass:"rounded-circle box-shadow",staticStyle:{"margin-top":"-60px",border:"5px solid #fff"},attrs:{src:t.profile.avatar,width:"110px",height:"110px"}})]),t._v(" "),n("div",{staticClass:"d-none d-md-block"},[n("img",{staticClass:"rounded-circle box-shadow",staticStyle:{"margin-top":"-90px",border:"5px solid #fff"},attrs:{src:t.profile.avatar,width:"172px",height:"172px"}})])]),t._v(" "),n("div",{staticClass:"col-4 text-right mt-2"},[n("span",{staticClass:"d-none d-md-inline-block pl-4"},[n("a",{staticClass:"fas fa-rss fa-lg text-muted text-decoration-none",attrs:{href:"/users/"+t.profile.username+".atom"}})]),t._v(" "),t.owner?n("span",{staticClass:"pl-md-4 pl-sm-2"},[n("a",{staticClass:"fas fa-cog fa-lg text-muted text-decoration-none",attrs:{href:"/settings/home"}})]):t._e(),t._v(" "),t.profile.id!=t.user.id&&t.user.hasOwnProperty("id")?n("span",{staticClass:"pl-md-4 pl-sm-2"},[n("a",{staticClass:"fas fa-cog fa-lg text-muted text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.visitorMenu(e)}}})]):t._e(),t._v(" "),t.profile.id!=t.user.id&&t.user.hasOwnProperty("id")?n("span",[1==t.relationship.following?n("span",{staticClass:"pl-md-4 pl-sm-2"},[n("button",{staticClass:"btn btn-outline-secondary font-weight-bold btn-sm",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.followProfile()}}},[t._v("Unfollow")])]):n("span",{staticClass:"pl-md-4 pl-sm-2"},[n("button",{staticClass:"btn btn-primary font-weight-bold btn-sm",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.followProfile()}}},[t._v("Follow")])])]):t._e()])]),t._v(" "),n("div",{staticClass:"col-12 text-center"},[n("div",{staticClass:"profile-details my-3"},[n("p",{staticClass:"font-weight-ultralight h2 text-center"},[t._v(t._s(t.profile.username))]),t._v(" "),t.profile.note?n("div",{staticClass:"text-center text-muted p-3",domProps:{innerHTML:t._s(t.profile.note)}}):t._e(),t._v(" "),n("div",{staticClass:"pb-3 text-muted text-center"},[n("a",{staticClass:"text-lighter",attrs:{href:t.profile.url}},[n("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(t.profile.statuses_count)))]),t._v("\n\t\t\t\t\t\t\t\t\t\tPosts\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),t.profileSettings.followers.count?n("a",{staticClass:"text-lighter cursor-pointer px-3",on:{click:function(e){return t.followersModal()}}},[n("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(t.profile.followers_count)))]),t._v("\n\t\t\t\t\t\t\t\t\t\tFollowers\n\t\t\t\t\t\t\t\t\t")]):t._e(),t._v(" "),t.profileSettings.following.count?n("a",{staticClass:"text-lighter cursor-pointer",on:{click:function(e){return t.followingModal()}}},[n("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(t.profile.following_count)))]),t._v("\n\t\t\t\t\t\t\t\t\t\tFollowing\n\t\t\t\t\t\t\t\t\t")]):t._e()])])])])])]),t._v(" "),n("div",{staticClass:"container-fluid"},[n("div",{staticClass:"profile-timeline mt-md-4"},["grid"==t.mode?n("div",{},[n("masonry",{attrs:{cols:{default:3,700:2,400:1},gutter:{default:"5px"}}},t._l(t.timeline,(function(e,i){return n("div",{staticClass:"p-1"},[n("a",{class:[e.sensitive?"card info-overlay card-md-border-0":e.media_attachments[0].filter_class+" card info-overlay card-md-border-0"],attrs:{href:t.statusUrl(e)}},[n("img",{staticClass:"img-fluid w-100",attrs:{src:t.previewUrl(e)}})])])})),0)],1):t._e(),t._v(" "),t.timeline.length?n("div",[n("infinite-loading",{on:{infinite:t.infiniteTimeline}},[n("div",{attrs:{slot:"no-more"},slot:"no-more"}),t._v(" "),n("div",{attrs:{slot:"no-results"},slot:"no-results"})])],1):t._e()])])]):t._e()]),t._v(" "),t.profile&&t.following?n("b-modal",{ref:"followingModal",attrs:{id:"following-modal","hide-footer":"",centered:"",scrollable:"",title:"Following","body-class":"list-group-flush py-3 px-0","dialog-class":"follow-modal"}},[t.loading?t._e():n("div",{staticClass:"list-group",staticStyle:{"min-height":"60vh"}},[1==t.owner?n("div",{staticClass:"list-group-item border-0 pt-0 px-0 mt-n2 mb-3"},[n("span",{staticClass:"d-flex px-4 pb-0 align-items-center"},[n("i",{staticClass:"fas fa-search text-lighter"}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.followingModalSearch,expression:"followingModalSearch"}],staticClass:"form-control border-0 shadow-0 no-focus",attrs:{type:"text",placeholder:"Search Following..."},domProps:{value:t.followingModalSearch},on:{keyup:t.followingModalSearchHandler,input:function(e){e.target.composing||(t.followingModalSearch=e.target.value)}}})])]):t._e(),t._v(" "),1==t.owner?n("div",{staticClass:"btn-group rounded-0 mt-n3 mb-3 border-top",attrs:{role:"group","aria-label":"Following"}}):n("div",{staticClass:"btn-group rounded-0 mt-n3 mb-3",attrs:{role:"group","aria-label":"Following"}}),t._v(" "),t._l(t.following,(function(e,i){return n("div",{key:"following_"+i,staticClass:"list-group-item border-0 py-1"},[n("div",{staticClass:"media"},[n("a",{attrs:{href:e.url}},[n("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px",loading:"lazy"}})]),t._v(" "),n("div",{staticClass:"media-body text-truncate"},[n("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[n("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?n("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")]):n("p",{staticClass:"text-muted mb-0 text-truncate mr-3",staticStyle:{"font-size":"14px"},attrs:{title:e.acct,"data-toggle":"dropdown","data-placement":"bottom"}},[n("span",{staticClass:"font-weight-bold"},[t._v(t._s(e.acct.split("@")[0]))]),n("span",{staticClass:"text-lighter"},[t._v("@"+t._s(e.acct.split("@")[1]))])])]),t._v(" "),t.owner?n("div",[n("a",{staticClass:"btn btn-outline-dark btn-sm font-weight-bold",attrs:{href:"#"},on:{click:function(n){return n.preventDefault(),t.followModalAction(e.id,i,"following")}}},[t._v("Following")])]):t._e()])])})),t._v(" "),t.followingModalSearch&&0==t.following.length?n("div",{staticClass:"list-group-item border-0"},[n("div",{staticClass:"list-group-item border-0 pt-5"},[n("p",{staticClass:"p-3 text-center mb-0 lead"},[t._v("No Results Found")])])]):t._e(),t._v(" "),t.following.length>0&&t.followingMore?n("div",{staticClass:"list-group-item text-center",on:{click:function(e){return t.followingLoadMore()}}},[n("p",{staticClass:"mb-0 small text-muted font-weight-light cursor-pointer"},[t._v("Load more")])]):t._e()],2)]):t._e(),t._v(" "),n("b-modal",{ref:"followerModal",attrs:{id:"follower-modal","hide-footer":"",centered:"",scrollable:"",title:"Followers","body-class":"list-group-flush py-3 px-0","dialog-class":"follow-modal"}},[n("div",{staticClass:"list-group"},[0==t.followers.length?n("div",{staticClass:"list-group-item border-0"},[n("p",{staticClass:"text-center mb-0 font-weight-bold text-muted py-5"},[n("span",{staticClass:"text-dark"},[t._v(t._s(t.profileUsername))]),t._v(" has no followers yet")])]):t._e(),t._v(" "),t._l(t.followers,(function(e,i){return n("div",{key:"follower_"+i,staticClass:"list-group-item border-0 py-1"},[n("div",{staticClass:"media mb-0"},[n("a",{attrs:{href:e.url}},[n("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px",height:"30px",loading:"lazy"}})]),t._v(" "),n("div",{staticClass:"media-body mb-0"},[n("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[n("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(" "),n("p",{staticClass:"text-secondary mb-0",staticStyle:{"font-size":"13px"}},[t._v("\n\t\t\t\t\t\t\t"+t._s(e.display_name)+"\n\t\t\t\t\t\t")])])])])})),t._v(" "),t.followers.length&&t.followerMore?n("div",{staticClass:"list-group-item text-center",on:{click:function(e){return t.followersLoadMore()}}},[n("p",{staticClass:"mb-0 small text-muted font-weight-light cursor-pointer"},[t._v("Load more")])]):t._e()],2)]),t._v(" "),n("b-modal",{ref:"visitorContextMenu",attrs:{id:"visitor-context-menu","hide-footer":"","hide-header":"",centered:"",size:"sm","body-class":"list-group-flush p-0"}},[t.relationship?n("div",{staticClass:"list-group"},[n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:t.copyProfileLink}},[t._v("\n\t\t\t\tCopy Link\n\t\t\t")]),t._v(" "),0==t.profile.locked?n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:t.showEmbedProfileModal}},[t._v("\n\t\t\t\tEmbed\n\t\t\t")]):t._e(),t._v(" "),!t.user||t.owner||t.relationship.following?t._e():n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:t.followProfile}},[t._v("\n\t\t\t\tFollow\n\t\t\t")]),t._v(" "),t.user&&!t.owner&&t.relationship.following?n("div",{staticClass:"list-group-item cursor-pointer text-center rounded",on:{click:t.followProfile}},[t._v("\n\t\t\t\tUnfollow\n\t\t\t")]):t._e(),t._v(" "),!t.user||t.owner||t.relationship.muting?t._e():n("div",{staticClass:"list-group-item cursor-pointer text-center rounded",on:{click:t.muteProfile}},[t._v("\n\t\t\t\tMute\n\t\t\t")]),t._v(" "),t.user&&!t.owner&&t.relationship.muting?n("div",{staticClass:"list-group-item cursor-pointer text-center rounded",on:{click:t.unmuteProfile}},[t._v("\n\t\t\t\tUnmute\n\t\t\t")]):t._e(),t._v(" "),t.user&&!t.owner?n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:t.reportProfile}},[t._v("\n\t\t\t\tReport User\n\t\t\t")]):t._e(),t._v(" "),!t.user||t.owner||t.relationship.blocking?t._e():n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:t.blockProfile}},[t._v("\n\t\t\t\tBlock\n\t\t\t")]),t._v(" "),t.user&&!t.owner&&t.relationship.blocking?n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:t.unblockProfile}},[t._v("\n\t\t\t\tUnblock\n\t\t\t")]):t._e(),t._v(" "),t.user&&t.owner?n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:function(e){return t.redirect("/settings/home")}}},[t._v("\n\t\t\t\tSettings\n\t\t\t")]):t._e(),t._v(" "),n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:function(e){return t.redirect("/users/"+t.profileUsername+".atom")}}},[t._v("\n\t\t\t\tAtom Feed\n\t\t\t")]),t._v(" "),n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-muted font-weight-bold",on:{click:function(e){return t.$refs.visitorContextMenu.hide()}}},[t._v("\n\t\t\t\tClose\n\t\t\t")])]):t._e()]),t._v(" "),n("b-modal",{ref:"sponsorModal",attrs:{id:"sponsor-modal","hide-footer":"",title:"Sponsor "+t.profileUsername,centered:"",size:"md","body-class":"px-5"}},[n("div",[n("p",{staticClass:"font-weight-bold"},[t._v("External Links")]),t._v(" "),t.sponsorList.patreon?n("p",{staticClass:"pt-2"},[n("a",{staticClass:"font-weight-bold",attrs:{href:"https://"+t.sponsorList.patreon,rel:"nofollow"}},[t._v(t._s(t.sponsorList.patreon))])]):t._e(),t._v(" "),t.sponsorList.liberapay?n("p",{staticClass:"pt-2"},[n("a",{staticClass:"font-weight-bold",attrs:{href:"https://"+t.sponsorList.liberapay,rel:"nofollow"}},[t._v(t._s(t.sponsorList.liberapay))])]):t._e(),t._v(" "),t.sponsorList.opencollective?n("p",{staticClass:"pt-2"},[n("a",{staticClass:"font-weight-bold",attrs:{href:"https://"+t.sponsorList.opencollective,rel:"nofollow"}},[t._v(t._s(t.sponsorList.opencollective))])]):t._e()])]),t._v(" "),n("b-modal",{ref:"embedModal",attrs:{id:"ctx-embed-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"md","body-class":"p-2 rounded"}},[n("div",[n("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:"6",disabled:""},domProps:{value:t.ctxEmbedPayload},on:{input:function(e){e.target.composing||(t.ctxEmbedPayload=e.target.value)}}}),t._v(" "),n("hr"),t._v(" "),n("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(" "),n("p",{staticClass:"mb-0 px-2 small text-muted"},[t._v("By using this embed, you agree to our "),n("a",{attrs:{href:"/site/terms"}},[t._v("Terms of Use")])])])])],1)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"bg-primary shadow"},[e("p",{staticClass:"text-center text-white mb-0 py-3 font-weight-bold border-bottom border-info"},[e("i",{staticClass:"fas fa-exclamation-triangle fa-lg mr-2"}),this._v(" The Moment UI layout has been deprecated and will be removed in a future release.\n\t\t\t")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"info-overlay-text-label"},[e("h5",{staticClass:"text-white m-auto font-weight-bold"},[e("span",[e("span",{staticClass:"far fa-eye-slash fa-lg p-2 d-flex-inline"})])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"py-5 text-center text-muted"},[e("p",[e("i",{staticClass:"fas fa-camera-retro fa-2x"})]),this._v(" "),e("p",{staticClass:"h2 font-weight-light pt-3"},[this._v("No posts yet")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"p-1 p-sm-2 p-md-3 d-flex justify-content-center align-items-center",staticStyle:{height:"30vh"}},[e("img",{attrs:{src:"/img/pixelfed-icon-grey.svg"}})])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"py-5 text-center text-muted"},[e("p",[e("i",{staticClass:"fas fa-bookmark fa-2x"})]),this._v(" "),e("p",{staticClass:"h2 font-weight-light pt-3"},[this._v("No saved bookmarks")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"py-5 text-center text-muted"},[e("p",[e("i",{staticClass:"fas fa-images fa-2x"})]),this._v(" "),e("p",{staticClass:"h2 font-weight-light pt-3"},[this._v("No collections yet")])])}],!1,null,"16438291",null);e.default=r.exports},EUxM:function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n.o-square[data-v-16438291] {\n\tmax-width: 320px;\n}\n.o-portrait[data-v-16438291] {\n\tmax-width: 320px;\n}\n.o-landscape[data-v-16438291] {\n\tmax-width: 320px;\n}\n.post-icon[data-v-16438291] {\n\tcolor: #fff;\n\tposition:relative;\n\tmargin-top: 10px;\n\tz-index: 9;\n\topacity: 0.6;\n\ttext-shadow: 3px 3px 16px #272634;\n}\n.font-size-16px[data-v-16438291] {\n\tfont-size: 16px;\n}\n.profile-website[data-v-16438291] {\n\tcolor: #003569;\n\ttext-decoration: none;\n\tfont-weight: 600;\n}\n.nav-topbar .nav-link[data-v-16438291] {\n\tcolor: #999;\n}\n.nav-topbar .nav-link .small[data-v-16438291] {\n\tfont-weight: 600;\n}\n.has-story[data-v-16438291] {\n\twidth: 84px;\n\theight: 84px;\n\tborder-radius: 50%;\n\tpadding: 4px;\n\tbackground: radial-gradient(ellipse at 70% 70%, #ee583f 8%, #d92d77 42%, #bd3381 58%);\n}\n.has-story img[data-v-16438291] {\n\twidth: 76px;\n\theight: 76px;\n\tborder-radius: 50%;\n\tpadding: 6px;\n\tbackground: #fff;\n}\n.has-story-lg[data-v-16438291] {\n\twidth: 159px;\n\theight: 159px;\n\tborder-radius: 50%;\n\tpadding: 4px;\n\tbackground: radial-gradient(ellipse at 70% 70%, #ee583f 8%, #d92d77 42%, #bd3381 58%);\n}\n.has-story-lg img[data-v-16438291] {\n\twidth: 150px;\n\theight: 150px;\n\tborder-radius: 50%;\n\tpadding: 6px;\n\tbackground:#fff;\n}\n.no-focus[data-v-16438291] {\n\tborder-color: none;\n\toutline: 0;\n\tbox-shadow: none;\n}\n.modal-tab-active[data-v-16438291] {\n\tborder-bottom: 1px solid #08d;\n}\n.btn-sec-alt[data-v-16438291]:hover {\n\tcolor: #ccc;\n\topacity: .7;\n\tbackground-color: transparent;\n\tborder-color: #6c757d;\n}\n",""])},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var o=(a=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),s=i.sources.map((function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"}));return[n].concat(s).concat([o]).join("\n")}var a;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},o=0;o