From 560f06eae31f5d41585d2e6c893228bc7456e24d Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 12 Sep 2019 22:39:15 -0600 Subject: [PATCH] Update compiled assets --- public/js/compose.js | 2 +- public/js/profile.js | 2 +- public/mix-manifest.json | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/js/compose.js b/public/js/compose.js index 81a0800d0..d582761d2 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.4\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2019-07-20T02:37:43.686Z\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",""])},7:function(t,e,i){t.exports=i("K0g3")},"7Hs7":function(t,e,i){"use strict";var n=i("e1EG");i.n(n).a},"9tPo":function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var i=e.protocol+"//"+e.host,n=i+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var a,o=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(a=0===o.indexOf("//")?o:0===o.indexOf("/")?i+o:n+o.replace(/^\.\//,""),"url("+JSON.stringify(a)+")")})}},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var a=(r=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),o=n.sources.map(function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"});return[i].concat(o).concat([a]).join("\n")}var r;return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i}).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},a=0;a=0&&h.splice(e,1)}function g(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var n=function(){0;return i.nc}();n&&(t.attrs.nonce=n)}return v(e,t.attrs),f(t,e),e}function v(t,e){Object.keys(e).forEach(function(i){t.setAttribute(i,e[i])})}function b(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=l++;i=c||(c=g(e)),n=y.bind(null,i,r,!1),a=y.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",v(e,t.attrs),f(t,e),e}(e),n=function(t,e,i){var n=i.css,a=i.sourceMap,o=void 0===e.convertToAbsoluteUrls&&a;(e.convertToAbsoluteUrls||o)&&(n=p(n));a&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");var r=new Blob([n],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(r),s&&URL.revokeObjectURL(s)}.bind(null,i,e),a=function(){m(i),i.href&&URL.revokeObjectURL(i.href)}):(i=g(e),n=function(t,e){var i=e.css,n=e.media;n&&t.setAttribute("media",n);if(t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}.bind(null,i),a=function(){m(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=u(t,e);return d(i,e),function(t){for(var n=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:{},o=a.search,c=a.autoSelect,l=void 0!==c&&c,h=a.setValue,p=void 0===h?function(){}:h,d=a.setAttribute,u=void 0===d?function(){}:d,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,x=a.onHide,y=void 0===x?function(){}:x,C=a.onLoading,_=void 0===C?function(){}:C,k=a.onLoaded,M=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=r(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=s(o)?o:function(t){return Promise.resolve(o(t))},this.autoSelect=l,this.setValue=p,this.setAttribute=u,this.onUpdate=m,this.onSubmit=v,this.onShow=w,this.onHide=y,this.onLoading=_,this.onLoaded=M},l=0,h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(t).concat(++l)};var p=function(t,e,i,n,a,o,r,s,c,l){"boolean"!=typeof r&&(c=s,s=r,r=!1);var h,p="function"==typeof i?i.options:i;if(t&&t.render&&(p.render=t.render,p.staticRenderFns=t.staticRenderFns,p._compiled=!0,a&&(p.functional=!0)),n&&(p._scopeId=n),o?(h=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,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},p._ssrRegister=h):e&&(h=r?function(){e.call(this,l(this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),h)if(p.functional){var d=p.render;p.render=function(t,e){return h.call(e),d(t,e)}}else{var u=p.beforeCreate;p.beforeCreate=u?[].concat(u,h):[h]}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:""}},data:function(){return{core: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}),value:this.defaultValue,resultListId:h("".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 a({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 a({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},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,void 0,void 0);function d(t){d.installed||(d.installed=!0,t.component("Autocomplete",p))}var u,f={install:d};"undefined"!=typeof window?u=window.Vue:void 0!==t&&(u=t.Vue),u&&u.use(f),p.install=d,e.a=p}).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){return t("div",{style:this.containerStyle},[t("img",{ref:"img",attrs:{src:this.src,alt:this.alt||"image",style:"max-width: 100%"},style:this.imgStyle})])},props:{containerStyle:Object,src:{type:String,default:""},alt:String,imgStyle:Object,viewMode:Number,dragMode:String,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},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){for(var i=0;i0&&t<1/0};function B(t){return void 0===t}function L(e){return"object"===t(e)&&null!==e}var R=Object.prototype.hasOwnProperty;function I(t){if(!L(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&R.call(i,"isPrototypeOf")}catch(t){return!1}}function E(t){return"function"==typeof t}var P=Array.prototype.slice;function N(t){return Array.from?Array.from(t):P.call(t)}function z(t,e){return t&&E(e)&&(Array.isArray(t)||A(t.length)?N(t).forEach(function(i,n){e.call(t,i,n,t)}):L(t)&&Object.keys(t).forEach(function(i){e.call(t,t[i],i,t)})),t}var O=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n0&&i.forEach(function(e){L(e)&&Object.keys(e).forEach(function(i){t[i]=e[i]})}),t},H=/\.\d*(?:0|9){12}\d*$/;function W(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return H.test(t)?Math.round(t*e)/e:t}var j=/^width|height|left|top|marginLeft|marginTop$/;function U(t,e){var i=t.style;z(e,function(t,e){j.test(e)&&A(t)&&(t="".concat(t,"px")),i[e]=t})}function Y(t,e){if(e)if(A(t.length))z(t,function(t){Y(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 X(t,e){e&&(A(t.length)?z(t,function(t){X(t,e)}):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function V(t,e,i){e&&(A(t.length)?z(t,function(t){V(t,e,i)}):i?Y(t,e):X(t,e))}var $=/([a-z\d])([A-Z])/g;function F(t){return t.replace($,"$1-$2").toLowerCase()}function Z(t,e){return L(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(F(e)))}function q(t,e,i){L(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(F(e)),i)}var G=/\s\s*/,Q=function(){var t=!1;if(n){var e=!1,i=function(){},o=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});a.addEventListener("test",i,o),a.removeEventListener("test",i,o)}return t}();function J(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=i;e.trim().split(G).forEach(function(e){if(!Q){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 K(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=i;e.trim().split(G).forEach(function(e){if(n.once&&!Q){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),c=0;c1&&void 0!==arguments[1]?arguments[1]:"contain",o=T(n),r=T(i);if(o&&r){var s=i*e;"contain"===a&&s>n||"cover"===a&&s=8&&(o=l+p)}}}if(o){var d,u,f=i.getUint16(o,n);for(u=0;ut.width?3===i?s=t.height*r:c=t.width/r:3===i?c=t.width/r:s=t.height*r;var l={aspectRatio:r,naturalWidth:a,naturalHeight:o,width:s,height:c};l.left=(t.width-s)/2,l.top=(t.height-c)/2,l.oldLeft=l.left,l.oldTop=l.top,this.canvasData=l,this.limited=1===i||2===i,this.limitCanvas(!0,!0),this.initialImageData=O({},e),this.initialCanvasData=O({},l)},limitCanvas:function(t,e){var i=this.options,n=this.containerData,a=this.canvasData,o=this.cropBoxData,r=i.viewMode,s=a.aspectRatio,c=this.cropped&&o;if(t){var l=Number(i.minCanvasWidth)||0,h=Number(i.minCanvasHeight)||0;r>1?(l=Math.max(l,n.width),h=Math.max(h,n.height),3===r&&(h*s>l?l=h*s:h=l/s)):r>0&&(l?l=Math.max(l,c?o.width:0):h?h=Math.max(h,c?o.height:0):c&&(l=o.width,(h=o.height)*s>l?l=h*s:h=l/s));var p=ct({aspectRatio:s,width:l,height:h});l=p.width,h=p.height,a.minWidth=l,a.minHeight=h,a.maxWidth=1/0,a.maxHeight=1/0}if(e)if(r>(c?0:1)){var d=n.width-a.width,u=n.height-a.height;a.minLeft=Math.min(0,d),a.minTop=Math.min(0,u),a.maxLeft=Math.max(0,d),a.maxTop=Math.max(0,u),c&&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,d),a.maxLeft=Math.max(0,d)),a.height>=n.height&&(a.minTop=Math.min(0,u),a.maxTop=Math.max(0,u))))}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,c=e*o+i*r;return n>90?{width:c,height:s}:{width:s,height:c}}({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),c=i.height*(r/i.naturalHeight);i.left-=(s-i.width)/2,i.top-=(c-i.height)/2,i.width=s,i.height=c,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=O({},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 c=Number(i.minCropBoxWidth)||0,l=Number(i.minCropBoxHeight)||0,h=r?Math.min(n.width,a.width,a.width+a.left,n.width-a.left):n.width,p=r?Math.min(n.height,a.height,a.height+a.top,n.height-a.top):n.height;c=Math.min(c,n.width),l=Math.min(l,n.height),s&&(c&&l?l*s>c?l=c/s:c=l*s:c?l=c/s:l&&(c=l*s),p*s>h?p=h/s:h=p*s),o.minWidth=Math.min(c,h),o.minHeight=Math.min(l,p),o.maxWidth=h,o.maxHeight=p}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"),U(this.cropBox,O({width:i.width,height:i.height},rt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),tt(this.element,"crop",this.getData())}},ft={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,z(r,function(t){var i=document.createElement("img");q(t,m,{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(){z(this.previews,function(t){var e=Z(t,m);U(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(L(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(F(e)))}(t,m)})},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,c=i.top-e.top-t.top;this.cropped&&!this.disabled&&(U(this.viewBoxImage,O({width:o,height:r},rt(O({translateX:-s,translateY:-c},t)))),z(this.previews,function(e){var i=Z(e,m),l=i.width,h=i.height,p=l,d=h,u=1;n&&(d=a*(u=l/n)),a&&d>h&&(p=n*(u=h/a),d=h),U(e,{width:p,height:d}),U(e.getElementsByTagName("img")[0],O({width:o*u,height:r*u},rt(O({translateX:-s*u,translateY:-c*u},t))))}))}},mt={bind:function(){var t=this.element,e=this.options,i=this.cropper;E(e.cropstart)&&K(t,"cropstart",e.cropstart),E(e.cropmove)&&K(t,"cropmove",e.cropmove),E(e.cropend)&&K(t,"cropend",e.cropend),E(e.crop)&&K(t,"crop",e.crop),E(e.zoom)&&K(t,"zoom",e.zoom),K(i,w,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&K(i,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&K(i,"dblclick",this.onDblclick=this.dblclick.bind(this)),K(t.ownerDocument,x,this.onCropMove=this.cropMove.bind(this)),K(t.ownerDocument,y,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&K(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;E(e.cropstart)&&J(t,"cropstart",e.cropstart),E(e.cropmove)&&J(t,"cropmove",e.cropmove),E(e.cropend)&&J(t,"cropend",e.cropend),E(e.crop)&&J(t,"crop",e.crop),E(e.zoom)&&J(t,"zoom",e.zoom),J(i,w,this.onCropStart),e.zoomable&&e.zoomOnWheel&&J(i,"wheel",this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&J(i,"dblclick",this.onDblclick),J(t.ownerDocument,x,this.onCropMove),J(t.ownerDocument,y,this.onCropEnd),e.responsive&&J(window,"resize",this.onResize)}},gt={resize:function(){var t=this.options,e=this.container,i=this.containerData,n=Number(t.minContainerWidth)||200,a=Number(t.minContainerHeight)||100;if(!(this.disabled||i.width<=n||i.height<=a)){var o,r,s=e.offsetWidth/i.width;1===s&&e.offsetHeight===i.height||(t.restore&&(o=this.getCanvasData(),r=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(z(o,function(t,e){o[e]=t*s})),this.setCropBoxData(z(r,function(t,e){r[e]=t*s}))))}},dblclick:function(){var t,e;this.disabled||"none"===this.options.dragMode||this.setDragMode((t=this.dragBox,e=s,(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||A(e)&&1!==e||A(i)&&0!==i||t.ctrlKey)){var n,a=this.options,o=this.pointers;t.changedTouches?z(t.changedTouches,function(t){o[t.identifier]=st(t)}):o[t.pointerId||0]=st(t),n=Object.keys(o).length>1&&a.zoomable&&a.zoomOnTouch?"zoom":Z(t.target,f),C.test(n)&&!1!==tt(this.element,"cropstart",{originalEvent:t,action:n})&&(t.preventDefault(),this.action=n,this.cropping=!1,"crop"===n&&(this.cropping=!0,Y(this.dragBox,d)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==tt(this.element,"cropmove",{originalEvent:t,action:e})&&(t.changedTouches?z(t.changedTouches,function(t){O(i[t.identifier]||{},st(t,!0))}):O(i[t.pointerId||0]||{},st(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?z(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,V(this.dragBox,d,this.cropped&&this.options.modal)),tt(this.element,"cropend",{originalEvent:t,action:e}))}}},vt={change:function(t){var e,i=this.options,n=this.canvasData,a=this.containerData,o=this.cropBoxData,r=this.pointers,s=this.action,c=i.aspectRatio,h=o.left,p=o.top,d=o.width,u=o.height,f=h+d,m=p+u,g=0,v=0,b=a.width,w=a.height,x=!0;!c&&t.shiftKey&&(c=d&&u?d/u:1),this.limited&&(g=o.minLeft,v=o.minTop,b=g+Math.min(a.width,n.width,n.left+n.width),w=v+Math.min(a.height,n.height,n.top+n.height));var y=r[Object.keys(r)[0]],C={x:y.endX-y.startX,y:y.endY-y.startY},_=function(t){switch(t){case"e":f+C.x>b&&(C.x=b-f);break;case"w":h+C.xw&&(C.y=w-m)}};switch(s){case"all":h+=C.x,p+=C.y;break;case"e":if(C.x>=0&&(f>=b||c&&(p<=v||m>=w))){x=!1;break}_("e"),(d+=C.x)<0&&(s="w",h-=d=-d),c&&(u=d/c,p+=(o.height-u)/2);break;case"n":if(C.y<=0&&(p<=v||c&&(h<=g||f>=b))){x=!1;break}_("n"),u-=C.y,p+=C.y,u<0&&(s="s",p-=u=-u),c&&(d=u*c,h+=(o.width-d)/2);break;case"w":if(C.x<=0&&(h<=g||c&&(p<=v||m>=w))){x=!1;break}_("w"),d-=C.x,h+=C.x,d<0&&(s="e",h-=d=-d),c&&(u=d/c,p+=(o.height-u)/2);break;case"s":if(C.y>=0&&(m>=w||c&&(h<=g||f>=b))){x=!1;break}_("s"),(u+=C.y)<0&&(s="n",p-=u=-u),c&&(d=u*c,h+=(o.width-d)/2);break;case"ne":if(c){if(C.y<=0&&(p<=v||f>=b)){x=!1;break}_("n"),u-=C.y,p+=C.y,d=u*c}else _("n"),_("e"),C.x>=0?fv&&(u-=C.y,p+=C.y):(u-=C.y,p+=C.y);d<0&&u<0?(s="sw",p-=u=-u,h-=d=-d):d<0?(s="nw",h-=d=-d):u<0&&(s="se",p-=u=-u);break;case"nw":if(c){if(C.y<=0&&(p<=v||h<=g)){x=!1;break}_("n"),u-=C.y,p+=C.y,d=u*c,h+=o.width-d}else _("n"),_("w"),C.x<=0?h>g?(d-=C.x,h+=C.x):C.y<=0&&p<=v&&(x=!1):(d-=C.x,h+=C.x),C.y<=0?p>v&&(u-=C.y,p+=C.y):(u-=C.y,p+=C.y);d<0&&u<0?(s="se",p-=u=-u,h-=d=-d):d<0?(s="ne",h-=d=-d):u<0&&(s="sw",p-=u=-u);break;case"sw":if(c){if(C.x<=0&&(h<=g||m>=w)){x=!1;break}_("w"),d-=C.x,h+=C.x,u=d/c}else _("s"),_("w"),C.x<=0?h>g?(d-=C.x,h+=C.x):C.y>=0&&m>=w&&(x=!1):(d-=C.x,h+=C.x),C.y>=0?m=0&&(f>=b||m>=w)){x=!1;break}_("e"),d+=C.x,u=d/c}else _("s"),_("e"),C.x>=0?f=0&&m>=w&&(x=!1):d+=C.x,C.y>=0?m0?s=C.y>0?"se":"ne":C.x<0&&(h-=d,s=C.y>0?"sw":"nw"),C.y<0&&(p-=u),this.cropped||(X(this.cropBox,l),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}x&&(o.width=d,o.height=u,o.left=h,o.top=p,this.action=s,this.renderCropBox()),z(r,function(t){t.startX=t.endX,t.startY=t.endY})}},bt={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Y(this.dragBox,d),X(this.cropBox,l),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=O({},this.initialImageData),this.canvasData=O({},this.initialCanvasData),this.cropBoxData=O({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(O(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),X(this.dragBox,d),Y(this.cropBox,l)),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,z(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,X(this.cropper,c)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Y(this.cropper,c)),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(B(t)?t:n+Number(t),B(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&&(A(t)&&(i.left=t,n=!0),A(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,c=a.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&n.zoomable){var l=s*t,h=c*t;if(!1===tt(this.element,"zoom",{ratio:t,oldRatio:o/s,originalEvent:i}))return this;if(i){var p=this.pointers,d=et(this.cropper),u=p&&Object.keys(p).length?function(t){var e=0,i=0,n=0;return z(t,function(t){var a=t.startX,o=t.startY;e+=a,i+=o,n+=1}),{pageX:e/=n,pageY:i/=n}}(p):{pageX:i.pageX,pageY:i.pageY};a.left-=(l-o)*((u.pageX-d.left-a.left)/o),a.top-=(h-r)*((u.pageY-d.top-a.top)/r)}else I(e)&&A(e.x)&&A(e.y)?(a.left-=(l-o)*((e.x-a.left)/o),a.top-=(h-r)*((e.y-a.top)/r)):(a.left-=(l-o)/2,a.top-=(h-r)/2);a.width=l,a.height=h,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return A(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,A(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(A(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&&(A(t)&&(i.scaleX=t,n=!0),A(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(z(t,function(e,i){t[i]=e/r}),e){var s=Math.round(t.y+t.height),c=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=c-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&&I(t)){var o=!1;e.rotatable&&A(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(A(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),A(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var r=i.width/i.naturalWidth;A(t.x)&&(a.left=t.x*r+n.left),A(t.y)&&(a.top=t.y*r+n.top),A(t.width)&&(a.width=t.width*r),A(t.height)&&(a.height=t.height*r),this.setCropBoxData(a)}return this},getContainerData:function(){return this.ready?O({},this.containerData):{}},getImageData:function(){return this.sized?O({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&z(["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&&I(t)&&(A(t.left)&&(e.left=t.left),A(t.top)&&(e.top=t.top),A(t.width)?(e.width=t.width,e.height=t.width/i):A(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&&I(t)&&(A(t.left)&&(n.left=t.left),A(t.top)&&(n.top=t.top),A(t.width)&&t.width!==n.width&&(e=!0,n.width=t.width),A(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,n=lt(this.image,this.imageData,e,t);if(!this.cropped)return n;var a=this.getData(),o=a.x,r=a.y,s=a.width,c=a.height,l=n.width/Math.floor(e.naturalWidth);1!==l&&(o*=l,r*=l,s*=l,c*=l);var h=s/c,p=ct({aspectRatio:h,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),d=ct({aspectRatio:h,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=ct({aspectRatio:h,width:t.width||(1!==l?n.width:s),height:t.height||(1!==l?n.height:c)}),f=u.width,m=u.height;f=Math.min(p.width,Math.max(d.width,f)),m=Math.min(p.height,Math.max(d.height,m));var g=document.createElement("canvas"),v=g.getContext("2d");g.width=W(f),g.height=W(m),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,f,m);var b=t.imageSmoothingEnabled,w=void 0===b||b,x=t.imageSmoothingQuality;v.imageSmoothingEnabled=w,x&&(v.imageSmoothingQuality=x);var y,C,_,k,M,D,S=n.width,A=n.height,T=o,B=r;T<=-s||T>S?(T=0,y=0,_=0,M=0):T<=0?(_=-T,T=0,y=Math.min(S,s+T),M=y):T<=S&&(_=0,y=Math.min(s,S-T),M=y),y<=0||B<=-c||B>A?(B=0,C=0,k=0,D=0):B<=0?(k=-B,B=0,C=Math.min(A,c+B),D=C):B<=A&&(k=0,C=Math.min(c,A-B),D=C);var L=[T,B,y,C];if(M>0&&D>0){var R=f/s;L.push(_*R,k*R,M*R,D*R)}return v.drawImage.apply(v,[n].concat(i(L.map(function(t){return Math.floor(W(t))})))),g},setAspectRatio:function(t){var e=this.options;return this.disabled||B(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,q(i,f,t),V(i,s,a),V(i,u,o),e.cropBoxMovable||(q(n,f,t),V(n,s,a),V(n,u,o))}return this}},wt=a.Cropper,xt=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e||!M.test(e.tagName))throw new Error("The first argument is required and must be an or element.");this.element=e,this.options=O({},D,I(i)&&i),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()}return i=t,o=[{key:"noConflict",value:function(){return window.Cropper=wt,t}},{key:"setDefaults",value:function(t){O(D,I(t)&&t)}}],(n=[{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(_.test(t))k.test(t)?this.read((a=t.replace(pt,""),o=atob(a),r=new ArrayBuffer(o.length),z(s=new Uint8Array(r),function(t,e){s[e]=o.charCodeAt(e)}),r)):this.clone();else{var a,o,r,s,c=new XMLHttpRequest,l=this.clone.bind(this);this.reloading=!0,this.xhr=c,c.onabort=l,c.onerror=l,c.ontimeout=l,c.onprogress=function(){"image/jpeg"!==c.getResponseHeader("content-type")&&c.abort()},c.onload=function(){e.read(c.response)},c.onloadend=function(){e.reloading=!1,e.xhr=null},n.checkCrossOrigin&&at(t)&&i.crossOrigin&&(t=ot(t)),c.open("GET",t),c.responseType="arraybuffer",c.withCredentials="use-credentials"===i.crossOrigin,c.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,n=dt(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(ht.apply(null,N(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,e,i=this.element,n=this.url;this.options.checkCrossOrigin&&at(n)&&((t=i.crossOrigin)||(t="anonymous"),e=ot(n)),this.crossOrigin=t,this.crossOriginUrl=e;var a=document.createElement("img");t&&(a.crossOrigin=t),a.src=e||n,a.alt=i.alt||"The image to crop",this.image=a,a.onload=this.start.bind(this),a.onerror=this.stop.bind(this),Y(a,h),i.parentNode.insertBefore(a,i.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=a.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(a.navigator.userAgent),n=function(e,i){O(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var o=document.createElement("img"),r=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){n(o.width,o.height),i||r.removeChild(o)},o.src=e.src,i||(o.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;",r.appendChild(o))}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")),c=o.querySelector(".".concat("cropper","-crop-box")),d=c.querySelector(".".concat("cropper","-face"));this.container=n,this.cropper=o,this.canvas=r,this.dragBox=s,this.cropBox=c,this.viewBox=o.querySelector(".".concat("cropper","-view-box")),this.face=d,r.appendChild(i),Y(t,l),n.insertBefore(o,t.nextSibling),this.isImg||X(i,h),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,Y(c,l),e.guides||Y(c.getElementsByClassName("".concat("cropper","-dashed")),l),e.center||Y(c.getElementsByClassName("".concat("cropper","-center")),l),e.background&&Y(o,"".concat("cropper","-bg")),e.highlight||Y(d,p),e.cropBoxMovable&&(Y(d,u),q(d,f,"all")),e.cropBoxResizable||(Y(c.getElementsByClassName("".concat("cropper","-line")),l),Y(c.getElementsByClassName("".concat("cropper","-point")),l)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),E(e.ready)&&K(t,"ready",e.ready,{once:!0}),tt(t,"ready")}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),X(this.element,l))}},{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()}}])&&e(i.prototype,n),o&&e(i,o),t;var i,n,o}();return O(xt.prototype,ut,ft,mt,gt,vt,bt),xt}()},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"));i("i3gq");function r(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var s={components:{VueCropper:a.a,Autocomplete:o.a},data:function(){var t;return r(t={config:window.App.config,pageLoading:!1,profile:{},composeText:"",composeTextLength:0,nsfw:!1,filters:[],ids:[],media:[],carouselCursor:0,uploading:!1,uploadProgress:100,composeType:!1,page:1,composeState:"publish",visibility:"public",visibilityTag:"Public"},"nsfw",!1),r(t,"place",!1),r(t,"commentsDisabled",!1),r(t,"pageTitle",""),r(t,"cropper",{aspectRatio:1,viewMode:1,zoomable:!0,zoom:0}),r(t,"taggedUsernames",!1),r(t,"namedPages",["tagPeople","addLocation","advancedSettings","visibility","altText","addToCollection","schedulePost","mediaMetadata","addToStory"]),t},beforeMount:function(){this.fetchProfile(),0==this.config.uploader.media_types.includes("video/mp4")&&(this.composeType="post")},mounted:function(){this.mediaWatcher(),this.filters=[["1977","filter-1977"],["Aden","filter-aden"],["Amaro","filter-amaro"],["Ashby","filter-ashby"],["Brannan","filter-brannan"],["Brooklyn","filter-brooklyn"],["Charmes","filter-charmes"],["Clarendon","filter-clarendon"],["Crema","filter-crema"],["Dogpatch","filter-dogpatch"],["Earlybird","filter-earlybird"],["Gingham","filter-gingham"],["Ginza","filter-ginza"],["Hefe","filter-hefe"],["Helena","filter-helena"],["Hudson","filter-hudson"],["Inkwell","filter-inkwell"],["Kelvin","filter-kelvin"],["Kuno","filter-juno"],["Lark","filter-lark"],["Lo-Fi","filter-lofi"],["Ludwig","filter-ludwig"],["Maven","filter-maven"],["Mayfair","filter-mayfair"],["Moon","filter-moon"],["Nashville","filter-nashville"],["Perpetua","filter-perpetua"],["Poprocket","filter-poprocket"],["Reyes","filter-reyes"],["Rise","filter-rise"],["Sierra","filter-sierra"],["Skyline","filter-skyline"],["Slumber","filter-slumber"],["Stinson","filter-stinson"],["Sutro","filter-sutro"],["Toaster","filter-toaster"],["Valencia","filter-valencia"],["Vesper","filter-vesper"],["Walden","filter-walden"],["Willow","filter-willow"],["X-Pro II","filter-xpro-ii"]]},methods:{fetchProfile:function(){var t=this;axios.get("/api/v1/accounts/verify_credentials").then(function(e){t.profile=e.data,window.pixelfed.currentUser=e.data,1==e.data.locked&&(t.visibility="private")}).catch(function(t){})},addMedia:function(t){var e=$(t.target);e.attr("disabled",""),$('.file-input[name="media"]').trigger("click"),e.blur(),e.removeAttr("disabled")},mediaWatcher:function(){var t=this;t.mediaDragAndDrop(),$(document).on("change","#pf-dz",function(e){t.mediaUpload()})},mediaUpload:function(){var t=this;t.uploading=!0;var e=document.querySelector("#pf-dz");Array.prototype.forEach.call(e.files,function(e,i){if(t.media&&t.media.length+i>=t.config.uploader.album_limit)swal("Error","You can only upload "+t.config.uploader.album_limit+" photos per album","error");else{var n=e.type,a=t.config.uploader.media_types.split(",");if(-1!=$.inArray(n,a)){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/v1/media",o,r).then(function(e){t.uploadProgress=100,t.ids.push(e.data.id),t.media.push(e.data),t.page=2,setTimeout(function(){t.uploading=!1},1e3)}).catch(function(i){t.uploading=!1,e.value=null,swal("Oops, something went wrong!","An unexpected error occurred.","error")}),e.value=null,t.uploadProgress=0}else 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")}})},mediaDragAndDrop:function(){var t=this,e=document.getElementById("content");function i(t){t.dataTransfer.dropEffect="copy",t.preventDefault()}window.addEventListener("dragenter",function(t){}),e.addEventListener("dragenter",i),e.addEventListener("dragover",i),e.addEventListener("dragleave",function(t){}),e.addEventListener("drop",function(e){e.preventDefault(),document.querySelector("#pf-dz").files=e.dataTransfer.files,$("#composeModal").modal("show"),t.mediaUpload()})},toggleFilter:function(t,e){this.media[this.carouselCursor].filter_class=e},updateMedia:function(){this.mediaDrawer=!1},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/v1/media",{params:{id:e}}).then(function(e){1==t.media.length&&(t.mediaDrawer=!1,t.ids=[],t.media=[],t.carouselCursor=0),t.ids.splice(t.carouselCursor,1),t.media.splice(t.carouselCursor,1)}).catch(function(t){swal("Whoops!","An error occured when attempting to delete this, please try again","error")})}},mediaAltText:function(){},mediaLicense:function(){},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};return void axios.post("/api/local/status/compose",e).then(function(t){var e=t.data;window.location.href=e}).catch(function(t){swal("Oops, something went wrong!","An unexpected error occurred.","error")});case"delete":return this.mediaDrawer=!1,this.ids=[],this.media=[],this.carouselCursor=0,this.composeText="",this.composeTextLength=0,void $("#composeModal").modal("hide")}},about:function(){var t=document.createElement("div");t.innerHTML='\n\t\t\t\t

Please visit the Sharing Media page for more info.

\n\t\t\t',swal({title:"Compose UI v3",content:t,icon:"info"})},closeModal:function(){this.composeType="",$("#composeModal").modal("hide")},composeMessage:function(){var t=this.config;this.composeType;return t.uploader.media_types.includes("video/mp4")?"Click here to add photos or videos":"Click here to add photos"},createCollection:function(){window.location.href="/i/collections/create"},nextPage:function(){switch(this.page){case 1:this.page=3;break;case 2:this.pageLoading=!0;var t=this;this.$refs.cropper.getCroppedCanvas({maxWidth:4096,maxHeight:4096,fillColor:"#fff",imageSmoothingEnabled:!1,imageSmoothingQuality:"high"}).toBlob(function(e){var i=new FormData;i.append("file",e);var n="/api/local/compose/media/update/"+t.ids[t.carouselCursor];axios.post(n,i).then(function(e){t.media[t.carouselCursor].url=e.data.url,t.pageLoading=!1,t.page++}).catch(function(t){})});break;case 3:case 4:this.page++}},rotate:function(){this.$refs.cropper.rotate(90)},changeAspect:function(t){this.cropper.aspectRatio=t,this.$refs.cropper.setAspectRatio(t)},maxSize:function(){return this.config.uploader.max_photo_size/1e3+" MB"},acceptedFormats:function(){return this.config.uploader.media_types.split(",").map(function(t){return" "+t.split("/")[1]}).toString()},showTagCard:function(){this.pageTitle="Tag People",this.page="tagPeople"},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/local/compose/location/search",{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.page=4},goBack:function(){this.pageTitle="","addToStory"==this.page?this.page=1:-1!=this.namedPages.indexOf(this.page)?this.page=4:this.page--},showVisibilityCard:function(){this.pageTitle="Post Visibility",this.page="visibility"},showAddToStoryCard:function(){this.pageTitle="Add to Story",this.page="addToStory"},toggleVisibility:function(t){this.visibility=t,this.visibilityTag={public:"Public",private:"Followers Only",unlisted:"Unlisted"}[t],this.pageTitle="",this.page=4}}},c=(i("7Hs7"),i("KHd+")),l=Object(c.a)(s,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",draggable:"true",multiple:"true",accept:t.config.uploader.media_types}}),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-5",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)])]):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 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))])]):i("span",[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(" "),i("div",{staticClass:"text-right",staticStyle:{"flex-grow":"1"}},[t.pageLoading?i("span",[t._m(0)]):t._e(),t._v(" "),!t.pageLoading&&t.page>1&&t.page<=3||1==t.page&&0!=t.ids.length?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||4!=t.page?t._e():i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.compose(e)}}},[t._v("Post")])])]),t._v(" "),i("div",{staticClass:"card-body p-0 border-top"},[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"},[t._m(1),t._v(" "),i("hr"),t._v(" "),i("p",[i("button",{staticClass:"btn btn-outline-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.addMedia(e)}}},[t._v("Compose Post "),i("sup",[t._v("BETA")])])]),t._v(" "),i("p",[i("button",{staticClass:"btn btn-outline-primary font-weight-bold",on:{click:function(e){return e.preventDefault(),t.createCollection(e)}}},[t._v("New Collection")])]),t._v(" "),t._m(2),t._v(" "),i("p",{staticClass:"text-muted mb-0 small text-center"},[t._v("Formats: "),i("b",[t._v(t._s(t.acceptedFormats()))]),t._v(" up to "),i("b",[t._v(t._s(t.maxSize()))])]),t._v(" "),i("p",{staticClass:"text-muted mb-0 small text-center"},[t._v("Albums can contain up to "),i("b",[t._v(t._s(t.config.uploader.album_limit))]),t._v(" photos or videos")])])]):t._e(),t._v(" "),2==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[0].url}})],1):t._e()]):t._e(),t._v(" "),3==t.page?i("div",{staticClass:"w-100 h-100"},[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._e(),t._v(" "),4==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("textarea",{directives:[{name:"model",rawName:"v-model",value:t.composeText,expression:"composeText"}],staticClass:"form-control border-0 rounded-0 no-focus",staticStyle:{resize:"none"},attrs:{rows:"2",placeholder:"Write a caption..."},domProps:{value:t.composeText},on:{input:function(e){e.target.composing||(t.composeText=e.target.value)}}})])])])]),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"},[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:"text-muted font-weight-bold small mr-2",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showLocationCard()}}},[t._v("Change")]),t._v(" "),i("a",{staticClass:"text-muted font-weight-bold small",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",{staticClass:"text-lighter"},[t._v("Visibility:")]),t._v(" "+t._s(t.visibilityTag)+"\n\t\t\t\t\t\t\t\t"),i("span",{staticClass:"float-right"},[i("a",{staticClass:"text-muted font-weight-bold small mr-2",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[t._v("Change")])])])]),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("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):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(3),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("div",{staticClass:"list-group-item d-flex justify-content-between"},[t._m(4),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("a",{staticClass:"list-group-item",on:{click:function(e){e.preventDefault(),t.page="altText"}}},[i("div",{staticClass:"text-dark"},[t._v("Write alt text")]),t._v(" "),i("p",{staticClass:"text-muted small mb-0"},[t._v("Alt text describes your photos for people with visual impairments.")])]),t._v(" "),i("a",{staticClass:"list-group-item",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.page="addToCollection"}}},[i("div",{staticClass:"text-dark"},[t._v("Add to Collection")]),t._v(" "),i("p",{staticClass:"text-muted small mb-0"},[t._v("Add this post to a collection.")])]),t._v(" "),i("a",{staticClass:"list-group-item",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.page="schedulePost"}}},[i("div",{staticClass:"text-dark"},[t._v("Schedule")]),t._v(" "),i("p",{staticClass:"text-muted small mb-0"},[t._v("Schedule post for a future date.")])]),t._v(" "),i("a",{staticClass:"list-group-item",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.page="mediaMetadata"}}},[i("div",{staticClass:"text-dark"},[t._v("Metadata")]),t._v(" "),i("p",{staticClass:"text-muted small mb-0"},[t._v("Manage media exif and metadata.")])])])]):t._e(),t._v(" "),"visibility"==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"list-group list-group-flush"},[i("div",{class:"list-group-item lead cursor-pointer "+["public"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("public")}}},[t._v("Public")]),t._v(" "),i("div",{class:"list-group-item lead cursor-pointer "+["unlisted"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("unlisted")}}},[t._v("Unlisted")]),t._v(" "),i("div",{class:"list-group-item lead cursor-pointer "+["private"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("private")}}},[t._v("Followers Only")])])]):t._e(),t._v(" "),"altText"==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(" "),"addToCollection"==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(" "),"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(" "),2==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-undo"})])]),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:"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("p",[e("a",{staticClass:"btn btn-primary font-weight-bold",attrs:{href:"/i/compose"}},[this._v("Compose Post")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("a",{staticClass:"font-weight-bold",attrs:{href:"/site/help"}},[this._v("Need Help?")])])},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",[e("div",{staticClass:"text-dark "},[this._v("Contains NSFW Media")])])}],!1,null,"20b9b21c",null);e.default=l.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)}}',""])},"3VoG":function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"/*!\n * Cropper.js v1.5.4\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2019-07-20T02:37:43.686Z\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",""])},7:function(t,e,i){t.exports=i("K0g3")},"8grz":function(t,e,i){var n=i("USG5");"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)},"9tPo":function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var i=e.protocol+"//"+e.host,n=i+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var a,o=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(a=0===o.indexOf("//")?o:0===o.indexOf("/")?i+o:n+o.replace(/^\.\//,""),"url("+JSON.stringify(a)+")")})}},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var a=(r=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),o=n.sources.map(function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"});return[i].concat(o).concat([a]).join("\n")}var r;return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i}).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},a=0;a=0&&h.splice(e,1)}function g(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var n=function(){0;return i.nc}();n&&(t.attrs.nonce=n)}return v(e,t.attrs),f(t,e),e}function v(t,e){Object.keys(e).forEach(function(i){t.setAttribute(i,e[i])})}function b(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=l++;i=c||(c=g(e)),n=y.bind(null,i,r,!1),a=y.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",v(e,t.attrs),f(t,e),e}(e),n=function(t,e,i){var n=i.css,a=i.sourceMap,o=void 0===e.convertToAbsoluteUrls&&a;(e.convertToAbsoluteUrls||o)&&(n=p(n));a&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");var r=new Blob([n],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(r),s&&URL.revokeObjectURL(s)}.bind(null,i,e),a=function(){m(i),i.href&&URL.revokeObjectURL(i.href)}):(i=g(e),n=function(t,e){var i=e.css,n=e.media;n&&t.setAttribute("media",n);if(t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}.bind(null,i),a=function(){m(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=u(t,e);return d(i,e),function(t){for(var n=[],a=0;a0&&void 0!==arguments[0]?arguments[0]:{},o=a.search,c=a.autoSelect,l=void 0!==c&&c,h=a.setValue,p=void 0===h?function(){}:h,d=a.setAttribute,u=void 0===d?function(){}:d,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,x=a.onHide,y=void 0===x?function(){}:x,C=a.onLoading,_=void 0===C?function(){}:C,k=a.onLoaded,M=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=r(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=s(o)?o:function(t){return Promise.resolve(o(t))},this.autoSelect=l,this.setValue=p,this.setAttribute=u,this.onUpdate=m,this.onSubmit=v,this.onShow=w,this.onHide=y,this.onLoading=_,this.onLoaded=M},l=0,h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(t).concat(++l)};var p=function(t,e,i,n,a,o,r,s,c,l){"boolean"!=typeof r&&(c=s,s=r,r=!1);var h,p="function"==typeof i?i.options:i;if(t&&t.render&&(p.render=t.render,p.staticRenderFns=t.staticRenderFns,p._compiled=!0,a&&(p.functional=!0)),n&&(p._scopeId=n),o?(h=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,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},p._ssrRegister=h):e&&(h=r?function(){e.call(this,l(this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),h)if(p.functional){var d=p.render;p.render=function(t,e){return h.call(e),d(t,e)}}else{var u=p.beforeCreate;p.beforeCreate=u?[].concat(u,h):[h]}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:""}},data:function(){return{core: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}),value:this.defaultValue,resultListId:h("".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 a({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 a({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},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,void 0,void 0);function d(t){d.installed||(d.installed=!0,t.component("Autocomplete",p))}var u,f={install:d};"undefined"!=typeof window?u=window.Vue:void 0!==t&&(u=t.Vue),u&&u.use(f),p.install=d,e.a=p}).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){return t("div",{style:this.containerStyle},[t("img",{ref:"img",attrs:{src:this.src,alt:this.alt||"image",style:"max-width: 100%"},style:this.imgStyle})])},props:{containerStyle:Object,src:{type:String,default:""},alt:String,imgStyle:Object,viewMode:Number,dragMode:String,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},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)}}}},sdpe:function(t,e,i){"use strict";var n=i("8grz");i.n(n).a},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){for(var i=0;i0&&t<1/0};function B(t){return void 0===t}function L(e){return"object"===t(e)&&null!==e}var R=Object.prototype.hasOwnProperty;function I(t){if(!L(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&R.call(i,"isPrototypeOf")}catch(t){return!1}}function E(t){return"function"==typeof t}var P=Array.prototype.slice;function z(t){return Array.from?Array.from(t):P.call(t)}function N(t,e){return t&&E(e)&&(Array.isArray(t)||A(t.length)?z(t).forEach(function(i,n){e.call(t,i,n,t)}):L(t)&&Object.keys(t).forEach(function(i){e.call(t,t[i],i,t)})),t}var O=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n0&&i.forEach(function(e){L(e)&&Object.keys(e).forEach(function(i){t[i]=e[i]})}),t},H=/\.\d*(?:0|9){12}\d*$/;function W(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return H.test(t)?Math.round(t*e)/e:t}var j=/^width|height|left|top|marginLeft|marginTop$/;function U(t,e){var i=t.style;N(e,function(t,e){j.test(e)&&A(t)&&(t="".concat(t,"px")),i[e]=t})}function Y(t,e){if(e)if(A(t.length))N(t,function(t){Y(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 X(t,e){e&&(A(t.length)?N(t,function(t){X(t,e)}):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function V(t,e,i){e&&(A(t.length)?N(t,function(t){V(t,e,i)}):i?Y(t,e):X(t,e))}var $=/([a-z\d])([A-Z])/g;function F(t){return t.replace($,"$1-$2").toLowerCase()}function Z(t,e){return L(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(F(e)))}function q(t,e,i){L(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(F(e)),i)}var G=/\s\s*/,Q=function(){var t=!1;if(n){var e=!1,i=function(){},o=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});a.addEventListener("test",i,o),a.removeEventListener("test",i,o)}return t}();function J(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=i;e.trim().split(G).forEach(function(e){if(!Q){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 K(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=i;e.trim().split(G).forEach(function(e){if(n.once&&!Q){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),c=0;c1&&void 0!==arguments[1]?arguments[1]:"contain",o=T(n),r=T(i);if(o&&r){var s=i*e;"contain"===a&&s>n||"cover"===a&&s=8&&(o=l+p)}}}if(o){var d,u,f=i.getUint16(o,n);for(u=0;ut.width?3===i?s=t.height*r:c=t.width/r:3===i?c=t.width/r:s=t.height*r;var l={aspectRatio:r,naturalWidth:a,naturalHeight:o,width:s,height:c};l.left=(t.width-s)/2,l.top=(t.height-c)/2,l.oldLeft=l.left,l.oldTop=l.top,this.canvasData=l,this.limited=1===i||2===i,this.limitCanvas(!0,!0),this.initialImageData=O({},e),this.initialCanvasData=O({},l)},limitCanvas:function(t,e){var i=this.options,n=this.containerData,a=this.canvasData,o=this.cropBoxData,r=i.viewMode,s=a.aspectRatio,c=this.cropped&&o;if(t){var l=Number(i.minCanvasWidth)||0,h=Number(i.minCanvasHeight)||0;r>1?(l=Math.max(l,n.width),h=Math.max(h,n.height),3===r&&(h*s>l?l=h*s:h=l/s)):r>0&&(l?l=Math.max(l,c?o.width:0):h?h=Math.max(h,c?o.height:0):c&&(l=o.width,(h=o.height)*s>l?l=h*s:h=l/s));var p=ct({aspectRatio:s,width:l,height:h});l=p.width,h=p.height,a.minWidth=l,a.minHeight=h,a.maxWidth=1/0,a.maxHeight=1/0}if(e)if(r>(c?0:1)){var d=n.width-a.width,u=n.height-a.height;a.minLeft=Math.min(0,d),a.minTop=Math.min(0,u),a.maxLeft=Math.max(0,d),a.maxTop=Math.max(0,u),c&&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,d),a.maxLeft=Math.max(0,d)),a.height>=n.height&&(a.minTop=Math.min(0,u),a.maxTop=Math.max(0,u))))}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,c=e*o+i*r;return n>90?{width:c,height:s}:{width:s,height:c}}({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),c=i.height*(r/i.naturalHeight);i.left-=(s-i.width)/2,i.top-=(c-i.height)/2,i.width=s,i.height=c,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=O({},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 c=Number(i.minCropBoxWidth)||0,l=Number(i.minCropBoxHeight)||0,h=r?Math.min(n.width,a.width,a.width+a.left,n.width-a.left):n.width,p=r?Math.min(n.height,a.height,a.height+a.top,n.height-a.top):n.height;c=Math.min(c,n.width),l=Math.min(l,n.height),s&&(c&&l?l*s>c?l=c/s:c=l*s:c?l=c/s:l&&(c=l*s),p*s>h?p=h/s:h=p*s),o.minWidth=Math.min(c,h),o.minHeight=Math.min(l,p),o.maxWidth=h,o.maxHeight=p}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"),U(this.cropBox,O({width:i.width,height:i.height},rt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),tt(this.element,"crop",this.getData())}},ft={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,N(r,function(t){var i=document.createElement("img");q(t,m,{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(){N(this.previews,function(t){var e=Z(t,m);U(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(L(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(F(e)))}(t,m)})},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,c=i.top-e.top-t.top;this.cropped&&!this.disabled&&(U(this.viewBoxImage,O({width:o,height:r},rt(O({translateX:-s,translateY:-c},t)))),N(this.previews,function(e){var i=Z(e,m),l=i.width,h=i.height,p=l,d=h,u=1;n&&(d=a*(u=l/n)),a&&d>h&&(p=n*(u=h/a),d=h),U(e,{width:p,height:d}),U(e.getElementsByTagName("img")[0],O({width:o*u,height:r*u},rt(O({translateX:-s*u,translateY:-c*u},t))))}))}},mt={bind:function(){var t=this.element,e=this.options,i=this.cropper;E(e.cropstart)&&K(t,"cropstart",e.cropstart),E(e.cropmove)&&K(t,"cropmove",e.cropmove),E(e.cropend)&&K(t,"cropend",e.cropend),E(e.crop)&&K(t,"crop",e.crop),E(e.zoom)&&K(t,"zoom",e.zoom),K(i,w,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&K(i,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&K(i,"dblclick",this.onDblclick=this.dblclick.bind(this)),K(t.ownerDocument,x,this.onCropMove=this.cropMove.bind(this)),K(t.ownerDocument,y,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&K(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;E(e.cropstart)&&J(t,"cropstart",e.cropstart),E(e.cropmove)&&J(t,"cropmove",e.cropmove),E(e.cropend)&&J(t,"cropend",e.cropend),E(e.crop)&&J(t,"crop",e.crop),E(e.zoom)&&J(t,"zoom",e.zoom),J(i,w,this.onCropStart),e.zoomable&&e.zoomOnWheel&&J(i,"wheel",this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&J(i,"dblclick",this.onDblclick),J(t.ownerDocument,x,this.onCropMove),J(t.ownerDocument,y,this.onCropEnd),e.responsive&&J(window,"resize",this.onResize)}},gt={resize:function(){var t=this.options,e=this.container,i=this.containerData,n=Number(t.minContainerWidth)||200,a=Number(t.minContainerHeight)||100;if(!(this.disabled||i.width<=n||i.height<=a)){var o,r,s=e.offsetWidth/i.width;1===s&&e.offsetHeight===i.height||(t.restore&&(o=this.getCanvasData(),r=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(N(o,function(t,e){o[e]=t*s})),this.setCropBoxData(N(r,function(t,e){r[e]=t*s}))))}},dblclick:function(){var t,e;this.disabled||"none"===this.options.dragMode||this.setDragMode((t=this.dragBox,e=s,(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||A(e)&&1!==e||A(i)&&0!==i||t.ctrlKey)){var n,a=this.options,o=this.pointers;t.changedTouches?N(t.changedTouches,function(t){o[t.identifier]=st(t)}):o[t.pointerId||0]=st(t),n=Object.keys(o).length>1&&a.zoomable&&a.zoomOnTouch?"zoom":Z(t.target,f),C.test(n)&&!1!==tt(this.element,"cropstart",{originalEvent:t,action:n})&&(t.preventDefault(),this.action=n,this.cropping=!1,"crop"===n&&(this.cropping=!0,Y(this.dragBox,d)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==tt(this.element,"cropmove",{originalEvent:t,action:e})&&(t.changedTouches?N(t.changedTouches,function(t){O(i[t.identifier]||{},st(t,!0))}):O(i[t.pointerId||0]||{},st(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?N(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,V(this.dragBox,d,this.cropped&&this.options.modal)),tt(this.element,"cropend",{originalEvent:t,action:e}))}}},vt={change:function(t){var e,i=this.options,n=this.canvasData,a=this.containerData,o=this.cropBoxData,r=this.pointers,s=this.action,c=i.aspectRatio,h=o.left,p=o.top,d=o.width,u=o.height,f=h+d,m=p+u,g=0,v=0,b=a.width,w=a.height,x=!0;!c&&t.shiftKey&&(c=d&&u?d/u:1),this.limited&&(g=o.minLeft,v=o.minTop,b=g+Math.min(a.width,n.width,n.left+n.width),w=v+Math.min(a.height,n.height,n.top+n.height));var y=r[Object.keys(r)[0]],C={x:y.endX-y.startX,y:y.endY-y.startY},_=function(t){switch(t){case"e":f+C.x>b&&(C.x=b-f);break;case"w":h+C.xw&&(C.y=w-m)}};switch(s){case"all":h+=C.x,p+=C.y;break;case"e":if(C.x>=0&&(f>=b||c&&(p<=v||m>=w))){x=!1;break}_("e"),(d+=C.x)<0&&(s="w",h-=d=-d),c&&(u=d/c,p+=(o.height-u)/2);break;case"n":if(C.y<=0&&(p<=v||c&&(h<=g||f>=b))){x=!1;break}_("n"),u-=C.y,p+=C.y,u<0&&(s="s",p-=u=-u),c&&(d=u*c,h+=(o.width-d)/2);break;case"w":if(C.x<=0&&(h<=g||c&&(p<=v||m>=w))){x=!1;break}_("w"),d-=C.x,h+=C.x,d<0&&(s="e",h-=d=-d),c&&(u=d/c,p+=(o.height-u)/2);break;case"s":if(C.y>=0&&(m>=w||c&&(h<=g||f>=b))){x=!1;break}_("s"),(u+=C.y)<0&&(s="n",p-=u=-u),c&&(d=u*c,h+=(o.width-d)/2);break;case"ne":if(c){if(C.y<=0&&(p<=v||f>=b)){x=!1;break}_("n"),u-=C.y,p+=C.y,d=u*c}else _("n"),_("e"),C.x>=0?fv&&(u-=C.y,p+=C.y):(u-=C.y,p+=C.y);d<0&&u<0?(s="sw",p-=u=-u,h-=d=-d):d<0?(s="nw",h-=d=-d):u<0&&(s="se",p-=u=-u);break;case"nw":if(c){if(C.y<=0&&(p<=v||h<=g)){x=!1;break}_("n"),u-=C.y,p+=C.y,d=u*c,h+=o.width-d}else _("n"),_("w"),C.x<=0?h>g?(d-=C.x,h+=C.x):C.y<=0&&p<=v&&(x=!1):(d-=C.x,h+=C.x),C.y<=0?p>v&&(u-=C.y,p+=C.y):(u-=C.y,p+=C.y);d<0&&u<0?(s="se",p-=u=-u,h-=d=-d):d<0?(s="ne",h-=d=-d):u<0&&(s="sw",p-=u=-u);break;case"sw":if(c){if(C.x<=0&&(h<=g||m>=w)){x=!1;break}_("w"),d-=C.x,h+=C.x,u=d/c}else _("s"),_("w"),C.x<=0?h>g?(d-=C.x,h+=C.x):C.y>=0&&m>=w&&(x=!1):(d-=C.x,h+=C.x),C.y>=0?m=0&&(f>=b||m>=w)){x=!1;break}_("e"),d+=C.x,u=d/c}else _("s"),_("e"),C.x>=0?f=0&&m>=w&&(x=!1):d+=C.x,C.y>=0?m0?s=C.y>0?"se":"ne":C.x<0&&(h-=d,s=C.y>0?"sw":"nw"),C.y<0&&(p-=u),this.cropped||(X(this.cropBox,l),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}x&&(o.width=d,o.height=u,o.left=h,o.top=p,this.action=s,this.renderCropBox()),N(r,function(t){t.startX=t.endX,t.startY=t.endY})}},bt={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Y(this.dragBox,d),X(this.cropBox,l),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=O({},this.initialImageData),this.canvasData=O({},this.initialCanvasData),this.cropBoxData=O({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(O(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),X(this.dragBox,d),Y(this.cropBox,l)),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,N(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,X(this.cropper,c)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Y(this.cropper,c)),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(B(t)?t:n+Number(t),B(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&&(A(t)&&(i.left=t,n=!0),A(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,c=a.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&n.zoomable){var l=s*t,h=c*t;if(!1===tt(this.element,"zoom",{ratio:t,oldRatio:o/s,originalEvent:i}))return this;if(i){var p=this.pointers,d=et(this.cropper),u=p&&Object.keys(p).length?function(t){var e=0,i=0,n=0;return N(t,function(t){var a=t.startX,o=t.startY;e+=a,i+=o,n+=1}),{pageX:e/=n,pageY:i/=n}}(p):{pageX:i.pageX,pageY:i.pageY};a.left-=(l-o)*((u.pageX-d.left-a.left)/o),a.top-=(h-r)*((u.pageY-d.top-a.top)/r)}else I(e)&&A(e.x)&&A(e.y)?(a.left-=(l-o)*((e.x-a.left)/o),a.top-=(h-r)*((e.y-a.top)/r)):(a.left-=(l-o)/2,a.top-=(h-r)/2);a.width=l,a.height=h,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return A(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,A(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(A(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&&(A(t)&&(i.scaleX=t,n=!0),A(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(N(t,function(e,i){t[i]=e/r}),e){var s=Math.round(t.y+t.height),c=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=c-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&&I(t)){var o=!1;e.rotatable&&A(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(A(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),A(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var r=i.width/i.naturalWidth;A(t.x)&&(a.left=t.x*r+n.left),A(t.y)&&(a.top=t.y*r+n.top),A(t.width)&&(a.width=t.width*r),A(t.height)&&(a.height=t.height*r),this.setCropBoxData(a)}return this},getContainerData:function(){return this.ready?O({},this.containerData):{}},getImageData:function(){return this.sized?O({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&N(["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&&I(t)&&(A(t.left)&&(e.left=t.left),A(t.top)&&(e.top=t.top),A(t.width)?(e.width=t.width,e.height=t.width/i):A(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&&I(t)&&(A(t.left)&&(n.left=t.left),A(t.top)&&(n.top=t.top),A(t.width)&&t.width!==n.width&&(e=!0,n.width=t.width),A(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,n=lt(this.image,this.imageData,e,t);if(!this.cropped)return n;var a=this.getData(),o=a.x,r=a.y,s=a.width,c=a.height,l=n.width/Math.floor(e.naturalWidth);1!==l&&(o*=l,r*=l,s*=l,c*=l);var h=s/c,p=ct({aspectRatio:h,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),d=ct({aspectRatio:h,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=ct({aspectRatio:h,width:t.width||(1!==l?n.width:s),height:t.height||(1!==l?n.height:c)}),f=u.width,m=u.height;f=Math.min(p.width,Math.max(d.width,f)),m=Math.min(p.height,Math.max(d.height,m));var g=document.createElement("canvas"),v=g.getContext("2d");g.width=W(f),g.height=W(m),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,f,m);var b=t.imageSmoothingEnabled,w=void 0===b||b,x=t.imageSmoothingQuality;v.imageSmoothingEnabled=w,x&&(v.imageSmoothingQuality=x);var y,C,_,k,M,D,S=n.width,A=n.height,T=o,B=r;T<=-s||T>S?(T=0,y=0,_=0,M=0):T<=0?(_=-T,T=0,y=Math.min(S,s+T),M=y):T<=S&&(_=0,y=Math.min(s,S-T),M=y),y<=0||B<=-c||B>A?(B=0,C=0,k=0,D=0):B<=0?(k=-B,B=0,C=Math.min(A,c+B),D=C):B<=A&&(k=0,C=Math.min(c,A-B),D=C);var L=[T,B,y,C];if(M>0&&D>0){var R=f/s;L.push(_*R,k*R,M*R,D*R)}return v.drawImage.apply(v,[n].concat(i(L.map(function(t){return Math.floor(W(t))})))),g},setAspectRatio:function(t){var e=this.options;return this.disabled||B(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,q(i,f,t),V(i,s,a),V(i,u,o),e.cropBoxMovable||(q(n,f,t),V(n,s,a),V(n,u,o))}return this}},wt=a.Cropper,xt=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e||!M.test(e.tagName))throw new Error("The first argument is required and must be an or element.");this.element=e,this.options=O({},D,I(i)&&i),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()}return i=t,o=[{key:"noConflict",value:function(){return window.Cropper=wt,t}},{key:"setDefaults",value:function(t){O(D,I(t)&&t)}}],(n=[{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(_.test(t))k.test(t)?this.read((a=t.replace(pt,""),o=atob(a),r=new ArrayBuffer(o.length),N(s=new Uint8Array(r),function(t,e){s[e]=o.charCodeAt(e)}),r)):this.clone();else{var a,o,r,s,c=new XMLHttpRequest,l=this.clone.bind(this);this.reloading=!0,this.xhr=c,c.onabort=l,c.onerror=l,c.ontimeout=l,c.onprogress=function(){"image/jpeg"!==c.getResponseHeader("content-type")&&c.abort()},c.onload=function(){e.read(c.response)},c.onloadend=function(){e.reloading=!1,e.xhr=null},n.checkCrossOrigin&&at(t)&&i.crossOrigin&&(t=ot(t)),c.open("GET",t),c.responseType="arraybuffer",c.withCredentials="use-credentials"===i.crossOrigin,c.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,n=dt(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(ht.apply(null,z(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,e,i=this.element,n=this.url;this.options.checkCrossOrigin&&at(n)&&((t=i.crossOrigin)||(t="anonymous"),e=ot(n)),this.crossOrigin=t,this.crossOriginUrl=e;var a=document.createElement("img");t&&(a.crossOrigin=t),a.src=e||n,a.alt=i.alt||"The image to crop",this.image=a,a.onload=this.start.bind(this),a.onerror=this.stop.bind(this),Y(a,h),i.parentNode.insertBefore(a,i.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=a.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(a.navigator.userAgent),n=function(e,i){O(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var o=document.createElement("img"),r=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){n(o.width,o.height),i||r.removeChild(o)},o.src=e.src,i||(o.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;",r.appendChild(o))}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")),c=o.querySelector(".".concat("cropper","-crop-box")),d=c.querySelector(".".concat("cropper","-face"));this.container=n,this.cropper=o,this.canvas=r,this.dragBox=s,this.cropBox=c,this.viewBox=o.querySelector(".".concat("cropper","-view-box")),this.face=d,r.appendChild(i),Y(t,l),n.insertBefore(o,t.nextSibling),this.isImg||X(i,h),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,Y(c,l),e.guides||Y(c.getElementsByClassName("".concat("cropper","-dashed")),l),e.center||Y(c.getElementsByClassName("".concat("cropper","-center")),l),e.background&&Y(o,"".concat("cropper","-bg")),e.highlight||Y(d,p),e.cropBoxMovable&&(Y(d,u),q(d,f,"all")),e.cropBoxResizable||(Y(c.getElementsByClassName("".concat("cropper","-line")),l),Y(c.getElementsByClassName("".concat("cropper","-point")),l)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),E(e.ready)&&K(t,"ready",e.ready,{once:!0}),tt(t,"ready")}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),X(this.element,l))}},{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()}}])&&e(i.prototype,n),o&&e(i,o),t;var i,n,o}();return O(xt.prototype,ut,ft,mt,gt,vt,bt),xt}()},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"));i("i3gq");function r(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var s={components:{VueCropper:a.a,Autocomplete:o.a},data:function(){var t;return r(t={config:window.App.config,pageLoading:!1,profile:{},composeText:"",composeTextLength:0,nsfw:!1,filters:[],ids:[],media:[],carouselCursor:0,uploading:!1,uploadProgress:100,composeType:!1,page:1,composeState:"publish",visibility:"public",visibilityTag:"Public"},"nsfw",!1),r(t,"place",!1),r(t,"commentsDisabled",!1),r(t,"pageTitle",""),r(t,"cropper",{aspectRatio:1,viewMode:1,zoomable:!0,zoom:0}),r(t,"taggedUsernames",!1),r(t,"namedPages",["cropPhoto","tagPeople","addLocation","advancedSettings","visibility","altText","addToCollection","schedulePost","mediaMetadata","addToStory"]),t},beforeMount:function(){this.fetchProfile(),0==this.config.uploader.media_types.includes("video/mp4")&&(this.composeType="post")},mounted:function(){this.mediaWatcher(),this.filters=[["1977","filter-1977"],["Aden","filter-aden"],["Amaro","filter-amaro"],["Ashby","filter-ashby"],["Brannan","filter-brannan"],["Brooklyn","filter-brooklyn"],["Charmes","filter-charmes"],["Clarendon","filter-clarendon"],["Crema","filter-crema"],["Dogpatch","filter-dogpatch"],["Earlybird","filter-earlybird"],["Gingham","filter-gingham"],["Ginza","filter-ginza"],["Hefe","filter-hefe"],["Helena","filter-helena"],["Hudson","filter-hudson"],["Inkwell","filter-inkwell"],["Kelvin","filter-kelvin"],["Kuno","filter-juno"],["Lark","filter-lark"],["Lo-Fi","filter-lofi"],["Ludwig","filter-ludwig"],["Maven","filter-maven"],["Mayfair","filter-mayfair"],["Moon","filter-moon"],["Nashville","filter-nashville"],["Perpetua","filter-perpetua"],["Poprocket","filter-poprocket"],["Reyes","filter-reyes"],["Rise","filter-rise"],["Sierra","filter-sierra"],["Skyline","filter-skyline"],["Slumber","filter-slumber"],["Stinson","filter-stinson"],["Sutro","filter-sutro"],["Toaster","filter-toaster"],["Valencia","filter-valencia"],["Vesper","filter-vesper"],["Walden","filter-walden"],["Willow","filter-willow"],["X-Pro II","filter-xpro-ii"]]},methods:{fetchProfile:function(){var t=this;axios.get("/api/v1/accounts/verify_credentials").then(function(e){t.profile=e.data,window.pixelfed.currentUser=e.data,1==e.data.locked&&(t.visibility="private")}).catch(function(t){})},addMedia:function(t){var e=$(t.target);e.attr("disabled",""),$('.file-input[name="media"]').trigger("click"),e.blur(),e.removeAttr("disabled")},mediaWatcher:function(){var t=this;t.mediaDragAndDrop(),$(document).on("change","#pf-dz",function(e){t.mediaUpload()})},mediaUpload:function(){var t=this;t.uploading=!0;var e=document.querySelector("#pf-dz");Array.prototype.forEach.call(e.files,function(e,i){if(t.media&&t.media.length+i>=t.config.uploader.album_limit)swal("Error","You can only upload "+t.config.uploader.album_limit+" photos per album","error");else{var n=e.type,a=t.config.uploader.media_types.split(",");if(-1!=$.inArray(n,a)){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/v1/media",o,r).then(function(e){t.uploadProgress=100,t.ids.push(e.data.id),t.media.push(e.data),t.page=2,setTimeout(function(){t.uploading=!1},1e3)}).catch(function(i){t.uploading=!1,e.value=null,swal("Oops, something went wrong!","An unexpected error occurred.","error")}),e.value=null,t.uploadProgress=0}else 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")}})},mediaDragAndDrop:function(){var t=this,e=document.getElementById("content");function i(t){t.dataTransfer.dropEffect="copy",t.preventDefault()}window.addEventListener("dragenter",function(t){}),e.addEventListener("dragenter",i),e.addEventListener("dragover",i),e.addEventListener("dragleave",function(t){}),e.addEventListener("drop",function(e){e.preventDefault(),document.querySelector("#pf-dz").files=e.dataTransfer.files,$("#composeModal").modal("show"),t.mediaUpload()})},toggleFilter:function(t,e){this.media[this.carouselCursor].filter_class=e},updateMedia:function(){this.mediaDrawer=!1},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/v1/media",{params:{id:e}}).then(function(e){1==t.media.length&&(t.mediaDrawer=!1,t.ids=[],t.media=[],t.carouselCursor=0),t.ids.splice(t.carouselCursor,1),t.media.splice(t.carouselCursor,1)}).catch(function(t){swal("Whoops!","An error occured when attempting to delete this, please try again","error")})}},mediaAltText:function(){},mediaLicense:function(){},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};return void axios.post("/api/local/status/compose",e).then(function(t){var e=t.data;window.location.href=e}).catch(function(t){swal("Oops, something went wrong!","An unexpected error occurred.","error")});case"delete":return this.mediaDrawer=!1,this.ids=[],this.media=[],this.carouselCursor=0,this.composeText="",this.composeTextLength=0,void $("#composeModal").modal("hide")}},about:function(){var t=document.createElement("div");t.innerHTML='\n\t\t\t\t

Please visit the Sharing Media page for more info.

\n\t\t\t',swal({title:"Compose UI v3",content:t,icon:"info"})},closeModal:function(){this.composeType="",$("#composeModal").modal("hide")},composeMessage:function(){var t=this.config;this.composeType;return t.uploader.media_types.includes("video/mp4")?"Click here to add photos or videos":"Click here to add photos"},createCollection:function(){window.location.href="/i/collections/create"},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){var i=new FormData;i.append("file",e);var n="/api/local/compose/media/update/"+t.ids[t.carouselCursor];axios.post(n,i).then(function(e){t.media[t.carouselCursor].url=e.data.url,t.pageLoading=!1,t.page=2}).catch(function(t){})});break;case 2:case 3:this.page++}},rotate:function(){this.$refs.cropper.rotate(90)},changeAspect:function(t){this.cropper.aspectRatio=t,this.$refs.cropper.setAspectRatio(t)},maxSize:function(){return this.config.uploader.max_photo_size/1e3+" MB"},acceptedFormats:function(){return this.config.uploader.media_types.split(",").map(function(t){return" "+t.split("/")[1]}).toString()},showTagCard:function(){this.pageTitle="Tag People",this.page="tagPeople"},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/local/compose/location/search",{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.page=3},goBack:function(){switch(this.pageTitle="",this.page){case"addToStory":this.page=1;break;case"cropPhoto":this.page=2;break;default:-1!=this.namedPages.indexOf(this.page)?this.page=3:this.page--}},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=3}}},c=(i("sdpe"),i("KHd+")),l=Object(c.a)(s,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",draggable:"true",accept:t.config.uploader.media_types}}),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-5",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)])]):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))])]):i("span",[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",[i("a",{staticClass:"text-center text-dark",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showCropPhotoCard(e)}}},[i("i",{staticClass:"fas fa-magic fa-lg"})])]):t._e(),t._v(" "),i("div",[t.pageLoading?i("span",[t._m(0)]):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(e)}}},[t._v("Post")])])])]),t._v(" "),i("div",{staticClass:"card-body p-0 border-top"},[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"},[t._m(1),t._v(" "),i("hr"),t._v(" "),0==t.media.length?i("p",[i("button",{staticClass:"btn btn-outline-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.addMedia(e)}}},[t._v("Compose Post "),i("sup",[t._v("BETA")])])]):t._e(),t._v(" "),i("p",[i("button",{staticClass:"btn btn-outline-primary font-weight-bold",on:{click:function(e){return e.preventDefault(),t.createCollection(e)}}},[t._v("New Collection")])]),t._v(" "),t._m(2),t._v(" "),i("p",{staticClass:"text-muted mb-0 small text-center"},[t._v("Formats: "),i("b",[t._v(t._s(t.acceptedFormats()))]),t._v(" up to "),i("b",[t._v(t._s(t.maxSize()))])]),t._v(" "),i("p",{staticClass:"text-muted mb-0 small text-center"},[t._v("Albums can contain up to "),i("b",[t._v(t._s(t.config.uploader.album_limit))]),t._v(" photos or videos")])])]):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[0].url}})],1):t._e()]):t._e(),t._v(" "),2==t.page?i("div",{staticClass:"w-100 h-100"},[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._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("textarea",{directives:[{name:"model",rawName:"v-model",value:t.composeText,expression:"composeText"}],staticClass:"form-control border-0 rounded-0 no-focus",staticStyle:{resize:"none"},attrs:{rows:"2",placeholder:"Write a caption..."},domProps:{value:t.composeText},on:{input:function(e){e.target.composing||(t.composeText=e.target.value)}}})])])])]),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"},[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:"text-muted font-weight-bold small mr-2",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showLocationCard()}}},[t._v("Change")]),t._v(" "),i("a",{staticClass:"text-muted font-weight-bold small",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",{staticClass:"text-lighter"},[t._v("Visibility:")]),t._v(" "+t._s(t.visibilityTag)+"\n\t\t\t\t\t\t\t\t"),i("span",{staticClass:"float-right"},[i("a",{staticClass:"text-muted font-weight-bold small mr-2",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[t._v("Change")])])])]),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("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):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(3),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("div",{staticClass:"list-group-item d-flex justify-content-between"},[t._m(4),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("a",{staticClass:"list-group-item",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.page="altText"}}},[i("div",{staticClass:"text-dark"},[t._v("Write alt text")]),t._v(" "),i("p",{staticClass:"text-muted small mb-0"},[t._v("Alt text describes your photos for people with visual impairments.")])]),t._v(" "),i("a",{staticClass:"list-group-item",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.page="addToCollection"}}},[i("div",{staticClass:"text-dark"},[t._v("Add to Collection")]),t._v(" "),i("p",{staticClass:"text-muted small mb-0"},[t._v("Add this post to a collection.")])]),t._v(" "),i("a",{staticClass:"list-group-item",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.page="schedulePost"}}},[i("div",{staticClass:"text-dark"},[t._v("Schedule")]),t._v(" "),i("p",{staticClass:"text-muted small mb-0"},[t._v("Schedule post for a future date.")])]),t._v(" "),i("a",{staticClass:"list-group-item",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.page="mediaMetadata"}}},[i("div",{staticClass:"text-dark"},[t._v("Metadata")]),t._v(" "),i("p",{staticClass:"text-muted small mb-0"},[t._v("Manage media exif and metadata.")])])])]):t._e(),t._v(" "),"visibility"==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"list-group list-group-flush"},[i("div",{class:"list-group-item lead cursor-pointer "+["public"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("public")}}},[t._v("Public")]),t._v(" "),i("div",{class:"list-group-item lead cursor-pointer "+["unlisted"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("unlisted")}}},[t._v("Unlisted")]),t._v(" "),i("div",{class:"list-group-item lead cursor-pointer "+["private"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("private")}}},[t._v("Followers Only")])])]):t._e(),t._v(" "),"altText"==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(" "),"addToCollection"==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(" "),"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(" "),"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-undo"})])]),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:"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("p",[e("a",{staticClass:"btn btn-primary font-weight-bold",attrs:{href:"/i/compose"}},[this._v("Compose Post")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("a",{staticClass:"font-weight-bold",attrs:{href:"/site/help"}},[this._v("Need Help?")])])},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",[e("div",{staticClass:"text-dark "},[this._v("Contains NSFW Media")])])}],!1,null,"5b96e7eb",null);e.default=l.exports}},[[7,0]]]); \ No newline at end of file diff --git a/public/js/profile.js b/public/js/profile.js index 06692e5eb..852acb1df 100644 --- a/public/js/profile.js +++ b/public/js/profile.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{"+27z":function(t,e,s){(t.exports=s("I1BE")(!1)).push([t.i,"\n.text-lighter[data-v-acffc3f6] {\n\tcolor:#B8C2CC !important;\n}\n.modal-body[data-v-acffc3f6] {\n\tpadding: 0;\n}\n",""])},"1uk1":function(t,e,s){var i=s("4LQO");"string"==typeof i&&(i=[[t.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};s("aET+")(i,o);i.locals&&(t.exports=i.locals)},"2Jpm":function(t,e,s){"use strict";s.r(e);var i={props:["status"]},o=s("KHd+"),a=Object(o.a)(i,function(){var t=this,e=t.$createElement,s=t._self._c||e;return 1==t.status.sensitive?s("div",[s("details",{staticClass:"details-animated"},[s("summary",[s("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(" "),s("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),s("div",{staticClass:"embed-responsive embed-responsive-1by1"},[s("video",{staticClass:"video",attrs:{preload:"none",controls:"",loop:"",poster:t.status.media_attachments[0].preview_url}},[s("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])])])]):s("div",{staticClass:"embed-responsive embed-responsive-16by9"},[s("video",{staticClass:"video",attrs:{preload:"auto",controls:"",loop:"",poster:t.status.media_attachments[0].preview_url}},[s("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])])},[],!1,null,null,null);e.default=a.exports},"2wtg":function(t,e,s){Vue.component("photo-presenter",s("d+I4").default),Vue.component("video-presenter",s("2Jpm").default),Vue.component("photo-album-presenter",s("Mrqh").default),Vue.component("video-album-presenter",s("9wGH").default),Vue.component("mixed-album-presenter",s("exej").default),Vue.component("post-menu",s("yric").default),Vue.component("profile",s("EHjT").default)},4:function(t,e,s){t.exports=s("2wtg")},"4JdN":function(t,e,s){"use strict";var i=s("fgXz");s.n(i).a},"4LQO":function(t,e,s){(t.exports=s("I1BE")(!1)).push([t.i,"\n.card-img-top[data-v-6f591d06] {\n border-top-left-radius: 0 !important;\n border-top-right-radius: 0 !important;\n}\n",""])},"7h/i":function(t,e,s){(t.exports=s("I1BE")(!1)).push([t.i,"\n.o-square[data-v-5d3fa5b2] {\n\tmax-width: 320px;\n}\n.o-portrait[data-v-5d3fa5b2] {\n\tmax-width: 320px;\n}\n.o-landscape[data-v-5d3fa5b2] {\n\tmax-width: 320px;\n}\n.post-icon[data-v-5d3fa5b2] {\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-5d3fa5b2] {\n\tfont-size: 16px;\n}\n.profile-website[data-v-5d3fa5b2] {\n\tcolor: #003569;\n\ttext-decoration: none;\n\tfont-weight: 600;\n}\n.nav-topbar .nav-link[data-v-5d3fa5b2] {\n\tcolor: #999;\n}\n.nav-topbar .nav-link .small[data-v-5d3fa5b2] {\n\tfont-weight: 600;\n}\n",""])},"8V6C":function(t,e,s){"use strict";var i=s("1uk1");s.n(i).a},"9tPo":function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var s=e.protocol+"//"+e.host,i=s+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var o,a=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?t:(o=0===a.indexOf("//")?a:0===a.indexOf("/")?s+a:i+a.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},"9wGH":function(t,e,s){"use strict";s.r(e);var i={props:["status"]},o=s("KHd+"),a=Object(o.a)(i,function(){var t=this,e=t.$createElement,s=t._self._c||e;return 1==t.status.sensitive?s("div",[s("details",{staticClass:"details-animated"},[s("summary",[s("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(" "),s("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),s("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 s("b-carousel-slide",{key:t.id+"-media"},[s("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"},[s("source",{attrs:{src:t.url,type:t.mime}})])])}),1)],1)]):s("div",[s("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 s("b-carousel-slide",{key:t.id+"-media"},[s("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"},[s("source",{attrs:{src:t.url,type:t.mime}})])])}),1)],1)},[],!1,null,null,null);e.default=a.exports},EHjT:function(t,e,s){"use strict";s.r(e);var i=s("la7V");function o(t){return function(t){if(Array.isArray(t)){for(var e=0,s=new Array(t.length);e0}),i=s.map(function(t){return t.id});t.ids=i,t.min_id=Math.max.apply(Math,o(i)),t.max_id=Math.min.apply(Math,o(i)),t.modalStatus=_.first(e.data),t.timeline=s,t.ownerCheck(),t.loading=!1,t.loadSponsor()}).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 s="/api/v1/accounts/"+this.profileId+"/statuses";axios.get(s,{params:{only_media:!0,max_id:this.max_id}}).then(function(s){if(s.data.length&&0==e.loading){var i=s.data,a=e;i.forEach(function(t){-1==a.ids.indexOf(t.id)&&(a.timeline.push(t),a.ids.push(t.id))}),e.min_id=Math.max.apply(Math,o(e.ids)),e.max_id=Math.min.apply(Math,o(e.ids)),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)+");"},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}),"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 s=event.target.parentElement.parentElement.parentElement,i=s.getElementsByClassName("comments")[0];0==i.children.length&&(i.classList.add("mb-2"),this.fetchStatusComments(t,s));var o=s.querySelectorAll(".card-footer")[0],a=s.querySelectorAll(".status-reply-input")[0];1==o.classList.contains("d-none")?(o.classList.remove("d-none"),a.focus()):(o.classList.add("d-none"),a.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},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/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;arguments.length>0&&void 0!==arguments[0]&&arguments[0];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;arguments.length>0&&void 0!==arguments[0]&&arguments[0];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;arguments.length>0&&void 0!==arguments[0]&&arguments[0];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;arguments.length>0&&void 0!==arguments[0]&&arguments[0];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 s=this;0!=$("body").hasClass("loggedIn")&&t.account.id===this.profile.id&&axios.post("/i/delete",{type:"status",item:t.id}).then(function(t){s.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?void this.$refs.followingModal.show():(axios.get("/api/v1/accounts/"+this.profileId+"/following",{params:{page:this.followingCursor}}).then(function(e){t.following=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?void this.$refs.followerModal.show():(axios.get("/api/v1/accounts/"+this.profileId+"/followers",{params:{page:this.followerCursor}}).then(function(e){var s;(s=t.followers).push.apply(s,o(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/v1/accounts/"+this.profile.id+"/following",{params:{page:this.followingCursor}}).then(function(e){var s;e.data.length>0&&((s=t.following).push.apply(s,o(e.data)),t.followingCursor++);e.data.length<10&&(t.followingMore=!1)}):window.location.href=encodeURI("/login?next=/"+this.profile.username+"/")},followersLoadMore:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.get("/api/v1/accounts/"+this.profile.id+"/followers",{params:{page:this.followerCursor}}).then(function(e){var s;e.data.length>0&&((s=t.followers).push.apply(s,o(e.data)),t.followerCursor++);e.data.length<10&&(t.followerMore=!1)})},visitorMenu:function(){this.$refs.visitorContextMenu.show()},followModalAction:function(t,e){var s=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"following";axios.post("/i/follow",{item:t}).then(function(t){"following"==i&&(s.following.splice(e,1),s.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()}}},n=(s("4JdN"),s("KHd+")),r=Object(n.a)(a,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"w-100 h-100"},[t.isMobile?s("div",{staticClass:"bg-white p-3 border-bottom"},[s("div",{staticClass:"d-flex justify-content-between align-items-center"},[s("div",{staticClass:"cursor-pointer",on:{click:t.goBack}},[s("i",{staticClass:"fas fa-chevron-left fa-lg"})]),t._v(" "),s("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(" "),s("div",[s("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?s("div",{staticClass:"bg-white pt-3 border-bottom"},[s("div",{staticClass:"container"},[s("p",{staticClass:"text-center font-weight-bold"},[t._v("You are blocking this account")]),t._v(" "),s("p",{staticClass:"text-center font-weight-bold"},[t._v("Click "),s("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?s("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{height:"80vh"}},[s("img",{attrs:{src:"/img/pixelfed-icon-grey.svg"}})]):t._e(),t._v(" "),t.loading||t.warning?t._e():s("div",["metro"==t.layout?s("div",{staticClass:"container"},[s("div",{class:t.isMobile?"pt-5":"pt-5 border-bottom"},[s("div",{staticClass:"container px-0"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-md-4 d-md-flex"},[s("div",{staticClass:"profile-avatar mx-md-auto"},[s("div",{staticClass:"d-block d-md-none mt-n3 mb-3"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-4"},[s("img",{staticClass:"rounded-circle border mr-2",attrs:{alt:t.profileUsername+"'s profile picture",src:t.profile.avatar,width:"77px",height:"77px"}})]),t._v(" "),s("div",{staticClass:"col-8"},[s("div",{staticClass:"d-block d-md-none mt-3 py-2"},[s("ul",{staticClass:"nav d-flex justify-content-between"},[s("li",{staticClass:"nav-item"},[s("div",{staticClass:"font-weight-light"},[s("span",{staticClass:"text-dark text-center"},[s("p",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.profile.statuses_count))]),t._v(" "),s("p",{staticClass:"text-muted mb-0 small"},[t._v("Posts")])])])]),t._v(" "),s("li",{staticClass:"nav-item"},[t.profileSettings.followers.count?s("div",{staticClass:"font-weight-light"},[s("a",{staticClass:"text-dark cursor-pointer text-center",on:{click:function(e){return t.followersModal()}}},[s("p",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.profile.followers_count))]),t._v(" "),s("p",{staticClass:"text-muted mb-0 small"},[t._v("Followers")])])]):t._e()]),t._v(" "),s("li",{staticClass:"nav-item"},[t.profileSettings.following.count?s("div",{staticClass:"font-weight-light"},[s("a",{staticClass:"text-dark cursor-pointer text-center",on:{click:function(e){return t.followingModal()}}},[s("p",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.profile.following_count))]),t._v(" "),s("p",{staticClass:"text-muted mb-0 small"},[t._v("Following")])])]):t._e()])])])])])]),t._v(" "),s("div",{staticClass:"d-none d-md-block pb-5"},[s("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?s("p",{staticClass:"text-center mt-3"},[s("button",{staticClass:"btn btn-outline-secondary font-weight-bold py-0",attrs:{type:"button"},on:{click:t.showSponsorModal}},[s("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(" "),s("div",{staticClass:"col-12 col-md-8 d-flex align-items-center"},[s("div",{staticClass:"profile-details"},[s("div",{staticClass:"d-none d-md-flex username-bar pb-3 align-items-center"},[s("span",{staticClass:"font-weight-ultralight h3 mb-0"},[t._v(t._s(t.profile.username))]),t._v(" "),t.profile.is_admin?s("span",{staticClass:"pl-1 pb-2 fa-stack",attrs:{title:"Admin Account","data-toggle":"tooltip"}},[s("i",{staticClass:"fas fa-certificate fa-lg text-danger fa-stack-1x"}),t._v(" "),s("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")?s("span",[1==t.relationship.following?s("span",{staticClass:"pl-4"},[s("button",{staticClass:"btn btn-outline-secondary font-weight-bold btn-sm py-1",attrs:{type:"button","data-toggle":"tooltip",title:"Unfollow"},on:{click:t.followProfile}},[t._v("FOLLOWING")])]):t._e(),t._v(" "),t.relationship.following?t._e():s("span",{staticClass:"pl-4"},[s("button",{staticClass:"btn btn-primary font-weight-bold btn-sm py-1",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")?s("span",{staticClass:"pl-4"},[s("a",{staticClass:"btn btn-outline-secondary btn-sm",staticStyle:{"font-weight":"600"},attrs:{href:"/settings/home"}},[t._v("Edit Profile")])]):s("span",{staticClass:"pl-4"},[s("a",{staticClass:"fas fa-ellipsis-h fa-lg text-muted text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.visitorMenu(e)}}})])]),t._v(" "),s("div",{staticClass:"font-size-16px"},[s("div",{staticClass:"d-none d-md-inline-flex profile-stats pb-3"},[s("div",{staticClass:"font-weight-light pr-5"},[s("span",{staticClass:"text-dark"},[s("span",{staticClass:"font-weight-bold"},[t._v(t._s(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?s("div",{staticClass:"font-weight-light pr-5"},[s("a",{staticClass:"text-dark cursor-pointer",on:{click:function(e){return t.followersModal()}}},[s("span",{staticClass:"font-weight-bold"},[t._v(t._s(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?s("div",{staticClass:"font-weight-light"},[s("a",{staticClass:"text-dark cursor-pointer",on:{click:function(e){return t.followingModal()}}},[s("span",{staticClass:"font-weight-bold"},[t._v(t._s(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(" "),s("p",{staticClass:"mb-0 d-flex align-items-center"},[s("span",{staticClass:"font-weight-bold pr-3"},[t._v(t._s(t.profile.display_name))])]),t._v(" "),t.profile.note?s("div",{staticClass:"mb-0",domProps:{innerHTML:t._s(t.profile.note)}}):t._e(),t._v(" "),t.profile.website?s("p",{},[s("a",{staticClass:"profile-website",attrs:{href:t.profile.website,rel:"me external nofollow noopener",target:"_blank"}},[t._v(t._s(t.profile.website))])]):t._e()])])])])])]),t._v(" "),s("div",{staticClass:"d-block d-md-none my-0 pt-3 border-bottom"},[t.user&&t.user.hasOwnProperty("id")?s("p",{staticClass:"pt-3"},[t.owner?s("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?s("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():s("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(" "),s("div",{},[s("ul",{staticClass:"nav nav-topbar d-flex justify-content-center border-0"},[s("li",{staticClass:"nav-item border-top"},[s("a",{class:"grid"==this.mode?"nav-link text-dark":"nav-link",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchMode("grid")}}},[s("i",{staticClass:"fas fa-th"}),t._v(" "),s("span",{staticClass:"d-none d-md-inline-block small pl-1"},[t._v("POSTS")])])]),t._v(" "),s("li",{staticClass:"nav-item px-0 border-top"},[s("a",{class:"collections"==this.mode?"nav-link text-dark":"nav-link",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchMode("collections")}}},[s("i",{staticClass:"fas fa-images"}),t._v(" "),s("span",{staticClass:"d-none d-md-inline-block small pl-1"},[t._v("COLLECTIONS")])])]),t._v(" "),t.owner?s("li",{staticClass:"nav-item border-top"},[s("a",{class:"bookmarks"==this.mode?"nav-link text-dark":"nav-link",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchMode("bookmarks")}}},[s("i",{staticClass:"fas fa-bookmark"})])]):t._e()])]),t._v(" "),s("div",{staticClass:"container px-0"},[s("div",{staticClass:"profile-timeline mt-md-4"},["grid"==t.mode?s("div",{staticClass:"row"},[t._l(t.timeline,function(e,i){return s("div",{staticClass:"col-4 p-1 p-md-3"},[s("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:e.url}},[s("div",{class:[e.sensitive?"square":"square "+e.media_attachments[0].filter_class]},["photo:album"==e.pf_type?s("span",{staticClass:"float-right mr-3 post-icon"},[s("i",{staticClass:"fas fa-images fa-2x"})]):t._e(),t._v(" "),"video"==e.pf_type?s("span",{staticClass:"float-right mr-3 post-icon"},[s("i",{staticClass:"fas fa-video fa-2x"})]):t._e(),t._v(" "),"video:album"==e.pf_type?s("span",{staticClass:"float-right mr-3 post-icon"},[s("i",{staticClass:"fas fa-film fa-2x"})]):t._e(),t._v(" "),s("div",{staticClass:"square-content",style:t.previewBackground(e)}),t._v(" "),s("div",{staticClass:"info-overlay-text"},[s("h5",{staticClass:"text-white m-auto font-weight-bold"},[s("span",[s("span",{staticClass:"far fa-heart fa-lg p-2 d-flex-inline"}),t._v(" "),s("span",{staticClass:"d-flex-inline"},[t._v(t._s(e.favourites_count))])]),t._v(" "),s("span",[s("span",{staticClass:"fas fa-retweet fa-lg p-2 d-flex-inline"}),t._v(" "),s("span",{staticClass:"d-flex-inline"},[t._v(t._s(e.reblogs_count))])])])])])])])}),t._v(" "),0==t.timeline.length?s("div",{staticClass:"col-12"},[t._m(0)]):t._e()],2):t._e(),t._v(" "),t.timeline.length&&"grid"==t.mode?s("div",[s("infinite-loading",{on:{infinite:t.infiniteTimeline}},[s("div",{attrs:{slot:"no-more"},slot:"no-more"}),t._v(" "),s("div",{attrs:{slot:"no-results"},slot:"no-results"})])],1):t._e(),t._v(" "),"bookmarks"==t.mode?s("div",[t.bookmarks.length?s("div",{staticClass:"row"},t._l(t.bookmarks,function(e,i){return s("div",{staticClass:"col-4 p-1 p-sm-2 p-md-3"},[s("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:e.url}},[s("div",{staticClass:"square"},["photo:album"==e.pf_type?s("span",{staticClass:"float-right mr-3 post-icon"},[s("i",{staticClass:"fas fa-images fa-2x"})]):t._e(),t._v(" "),"video"==e.pf_type?s("span",{staticClass:"float-right mr-3 post-icon"},[s("i",{staticClass:"fas fa-video fa-2x"})]):t._e(),t._v(" "),"video:album"==e.pf_type?s("span",{staticClass:"float-right mr-3 post-icon"},[s("i",{staticClass:"fas fa-film fa-2x"})]):t._e(),t._v(" "),s("div",{staticClass:"square-content",style:t.previewBackground(e)}),t._v(" "),s("div",{staticClass:"info-overlay-text"},[s("h5",{staticClass:"text-white m-auto font-weight-bold"},[s("span",[s("span",{staticClass:"far fa-heart fa-lg p-2 d-flex-inline"}),t._v(" "),s("span",{staticClass:"d-flex-inline"},[t._v(t._s(e.favourites_count))])]),t._v(" "),s("span",[s("span",{staticClass:"fas fa-retweet fa-lg p-2 d-flex-inline"}),t._v(" "),s("span",{staticClass:"d-flex-inline"},[t._v(t._s(e.reblogs_count))])])])])])])])}),0):s("div",{staticClass:"col-12"},[t._m(1)])]):t._e(),t._v(" "),"collections"==t.mode?s("div",[t.collections.length?s("div",{staticClass:"row"},t._l(t.collections,function(t,e){return s("div",{staticClass:"col-4 p-1 p-sm-2 p-md-3"},[s("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:t.url}},[s("div",{staticClass:"square"},[s("div",{staticClass:"square-content",style:"background-image: url("+t.thumb+");"})])])])}),0):s("div",[t._m(2)])]):t._e()])])]):t._e(),t._v(" "),"moment"==t.layout?s("div",{staticClass:"mt-3"},[s("div",{class:t.momentBackground(),staticStyle:{width:"100%","min-height":"274px"}}),t._v(" "),s("div",{staticClass:"bg-white border-bottom"},[s("div",{staticClass:"container"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 row mx-0"},[s("div",{staticClass:"col-4 text-left mt-2"},[t.relationship&&t.relationship.followed_by?s("span",[s("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?s("span",[s("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(" "),s("div",{staticClass:"col-4 text-center"},[s("div",{staticClass:"d-block d-md-none"},[s("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(" "),s("div",{staticClass:"d-none d-md-block"},[s("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(" "),s("div",{staticClass:"col-4 text-right mt-2"},[s("span",{staticClass:"d-none d-md-inline-block pl-4"},[s("a",{staticClass:"fas fa-rss fa-lg text-muted text-decoration-none",attrs:{href:"/users/"+t.profile.username+".atom"}})]),t._v(" "),t.owner?s("span",{staticClass:"pl-md-4 pl-sm-2"},[s("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")?s("span",{staticClass:"pl-md-4 pl-sm-2"},[s("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")?s("span",[1==t.relationship.following?s("span",{staticClass:"pl-md-4 pl-sm-2"},[s("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")])]):s("span",{staticClass:"pl-md-4 pl-sm-2"},[s("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(" "),s("div",{staticClass:"col-12 text-center"},[s("div",{staticClass:"profile-details my-3"},[s("p",{staticClass:"font-weight-ultralight h2 text-center"},[t._v(t._s(t.profile.username))]),t._v(" "),t.profile.note?s("div",{staticClass:"text-center text-muted p-3",domProps:{innerHTML:t._s(t.profile.note)}}):t._e(),t._v(" "),s("div",{staticClass:"pb-3 text-muted text-center"},[s("a",{staticClass:"text-lighter",attrs:{href:t.profile.url}},[s("span",{staticClass:"font-weight-bold"},[t._v(t._s(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?s("a",{staticClass:"text-lighter cursor-pointer px-3",on:{click:function(e){return t.followersModal()}}},[s("span",{staticClass:"font-weight-bold"},[t._v(t._s(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?s("a",{staticClass:"text-lighter cursor-pointer",on:{click:function(e){return t.followingModal()}}},[s("span",{staticClass:"font-weight-bold"},[t._v(t._s(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(" "),s("div",{staticClass:"container-fluid"},[s("div",{staticClass:"profile-timeline mt-md-4"},["grid"==t.mode?s("div",{},[s("masonry",{attrs:{cols:{default:3,700:2,400:1},gutter:{default:"5px"}}},t._l(t.timeline,function(e,i){return s("div",{staticClass:"p-1"},[s("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:e.url}},[s("img",{staticClass:"img-fluid w-100",attrs:{src:t.previewUrl(e)}})])])}),0)],1):t._e(),t._v(" "),t.timeline.length?s("div",[s("infinite-loading",{on:{infinite:t.infiniteTimeline}},[s("div",{attrs:{slot:"no-more"},slot:"no-more"}),t._v(" "),s("div",{attrs:{slot:"no-results"},slot:"no-results"})])],1):t._e()])])]):t._e()]),t._v(" "),s("b-modal",{ref:"followingModal",attrs:{id:"following-modal","hide-footer":"",centered:"",title:"Following","body-class":"list-group-flush p-0"}},[s("div",{staticClass:"list-group"},[t._l(t.following,function(e,i){return s("div",{key:"following_"+i,staticClass:"list-group-item border-0"},[s("div",{staticClass:"media"},[s("a",{attrs:{href:e.url}},[s("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px",loading:"lazy"}})]),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[s("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n\t\t\t\t\t\t\t"+t._s(e.username)+"\n\t\t\t\t\t\t")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[t._v("\n\t\t\t\t\t\t"+t._s(e.display_name)+"\n\t\t\t\t\t")])]),t._v(" "),t.owner?s("div",[s("a",{staticClass:"btn btn-outline-secondary btn-sm",attrs:{href:"#"},on:{click:function(s){return s.preventDefault(),t.followModalAction(e.id,i,"following")}}},[t._v("Unfollow")])]):t._e()])])}),t._v(" "),0==t.following.length?s("div",{staticClass:"list-group-item border-0"},[s("div",{staticClass:"list-group-item border-0"},[s("p",{staticClass:"p-3 text-center mb-0 lead"})])]):t._e(),t._v(" "),t.followingMore?s("div",{staticClass:"list-group-item text-center",on:{click:function(e){return t.followingLoadMore()}}},[s("p",{staticClass:"mb-0 small text-muted font-weight-light cursor-pointer"},[t._v("Load more")])]):t._e()],2)]),t._v(" "),s("b-modal",{ref:"followerModal",attrs:{id:"follower-modal","hide-footer":"",centered:"",title:"Followers","body-class":"list-group-flush p-0"}},[s("div",{staticClass:"list-group"},[t._l(t.followers,function(e,i){return s("div",{key:"follower_"+i,staticClass:"list-group-item border-0"},[s("div",{staticClass:"media"},[s("a",{attrs:{href:e.url}},[s("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px",loading:"lazy"}})]),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[s("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n\t\t\t\t\t\t\t"+t._s(e.username)+"\n\t\t\t\t\t\t")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"14px"}},[t._v("\n\t\t\t\t\t\t"+t._s(e.display_name)+"\n\t\t\t\t\t")])])])])}),t._v(" "),t.followerMore?s("div",{staticClass:"list-group-item text-center",on:{click:function(e){return t.followersLoadMore()}}},[s("p",{staticClass:"mb-0 small text-muted font-weight-light cursor-pointer"},[t._v("Load more")])]):t._e()],2)]),t._v(" "),s("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?s("div",{staticClass:"list-group"},[s("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:t.copyProfileLink}},[t._v("\n\t\t\tCopy Link\n\t\t")]),t._v(" "),!t.user||t.owner||t.relationship.following?t._e():s("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:t.followProfile}},[t._v("\n\t\t\tFollow\n\t\t")]),t._v(" "),t.user&&!t.owner&&t.relationship.following?s("div",{staticClass:"list-group-item cursor-pointer text-center rounded",on:{click:t.followProfile}},[t._v("\n\t\t\tUnfollow\n\t\t")]):t._e(),t._v(" "),!t.user||t.owner||t.relationship.muting?t._e():s("div",{staticClass:"list-group-item cursor-pointer text-center rounded",on:{click:t.muteProfile}},[t._v("\n\t\t\tMute\n\t\t")]),t._v(" "),t.user&&!t.owner&&t.relationship.muting?s("div",{staticClass:"list-group-item cursor-pointer text-center rounded",on:{click:t.unmuteProfile}},[t._v("\n\t\t\tUnmute\n\t\t")]):t._e(),t._v(" "),t.user&&!t.owner?s("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:t.reportProfile}},[t._v("\n\t\t\tReport User\n\t\t")]):t._e(),t._v(" "),!t.user||t.owner||t.relationship.blocking?t._e():s("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:t.blockProfile}},[t._v("\n\t\t\tBlock\n\t\t")]),t._v(" "),t.user&&!t.owner&&t.relationship.blocking?s("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:t.unblockProfile}},[t._v("\n\t\t\tUnblock\n\t\t")]):t._e(),t._v(" "),t.user&&t.owner?s("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\tSettings\n\t\t")]):t._e(),t._v(" "),s("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-muted",on:{click:function(e){return t.$refs.visitorContextMenu.hide()}}},[t._v("\n\t\t\tClose\n\t\t")])]):t._e()]),t._v(" "),s("b-modal",{ref:"sponsorModal",attrs:{id:"sponsor-modal","hide-footer":"",title:"Sponsor "+t.profileUsername,centered:"",size:"md","body-class":"px-5"}},[s("div",[s("p",{staticClass:"font-weight-bold"},[t._v("External Links")]),t._v(" "),t.sponsorList.patreon?s("p",{staticClass:"pt-2"},[s("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?s("p",{staticClass:"pt-2"},[s("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?s("p",{staticClass:"pt-2"},[s("a",{staticClass:"font-weight-bold",attrs:{href:"https://"+t.sponsorList.opencollective,rel:"nofollow"}},[t._v(t._s(t.sponsorList.opencollective))])]):t._e()])])],1)},[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:"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,"5d3fa5b2",null);e.default=r.exports},GlRX:function(t,e,s){"use strict";var i=s("Kz1s");s.n(i).a},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var s=function(t,e){var s=t[1]||"",i=t[3];if(!i)return s;if(e&&"function"==typeof btoa){var o=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"});return[s].concat(a).concat([o]).join("\n")}var n;return[s].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+s+"}":s}).join("")},e.i=function(t,s){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},o=0;o