mixit/compiler/dist/mastodon/main.js

1 line
40 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=78)}([function(t,e,n){var r=n(19)("wks"),o=n(13),i=n(1).Symbol,s="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=s&&i[t]||(s?i:o)("Symbol."+t))}).store=r},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(8),o=n(18);t.exports=n(7)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(2)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(5),o=n(33),i=n(17),s=Object.defineProperty;e.f=n(7)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(1),o=n(4),i=n(3),s=n(13)("src"),a=n(46),u=(""+a).split("toString");n(12).inspectSource=function(t){return a.call(t)},(t.exports=function(t,e,n,a){var c="function"==typeof n;c&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(c&&(i(n,s)||o(n,s,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:a?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[s]||a.call(this)})},function(t,e,n){var r=n(49),o=n(16);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(1),o=n(12),i=n(4),s=n(9),a=n(35),u=function(t,e,n){var c,l,f,p,v=t&u.F,d=t&u.G,h=t&u.S,y=t&u.P,m=t&u.B,g=d?r:h?r[e]||(r[e]={}):(r[e]||{}).prototype,_=d?o:o[e]||(o[e]={}),b=_.prototype||(_.prototype={});for(c in d&&(n=e),n)f=((l=!v&&g&&void 0!==g[c])?g:n)[c],p=m&&l?a(f,r):y&&"function"==typeof f?a(Function.call,f):f,g&&s(g,c,f,t&u.U),_[c]!=f&&i(_,c,p),y&&b[c]!=f&&(b[c]=f)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e){var n=t.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(39),o=n(25);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(6);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(12),o=n(1),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(20)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!1},function(t,e,n){"use strict";var r=n(1),o=n(3),i=n(15),s=n(64),a=n(17),u=n(2),c=n(28).f,l=n(29).f,f=n(8).f,p=n(66).trim,v=r.Number,d=v,h=v.prototype,y="Number"==i(n(27)(h)),m="trim"in String.prototype,g=function(t){var e=a(t,!1);if("string"==typeof e&&e.length>2){var n,r,o,i=(e=m?e.trim():p(e,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var s,u=e.slice(2),c=0,l=u.length;c<l;c++)if((s=u.charCodeAt(c))<48||s>o)return NaN;return parseInt(u,r)}}return+e};if(!v(" 0o1")||!v("0b1")||v("+0x1")){v=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof v&&(y?u(function(){h.valueOf.call(n)}):"Number"!=i(n))?s(new d(g(e)),n,v):g(e)};for(var _,b=n(7)?c(d):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;b.length>x;x++)o(d,_=b[x])&&!o(v,_)&&f(v,_,l(d,_));v.prototype=h,h.constructor=v,n(9)(r,"Number",v)}},function(t,e,n){var r=n(8).f,o=n(3),i=n(0)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(19)("keys"),o=n(13);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(5),o=n(53),i=n(25),s=n(24)("IE_PROTO"),a=function(){},u=function(){var t,e=n(34)("iframe"),r=i.length;for(e.style.display="none",n(54).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),u=t.F;r--;)delete u.prototype[i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(a.prototype=r(t),n=new a,a.prototype=null,n[s]=t):n=u(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(39),o=n(25).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e,n){var r=n(26),o=n(18),i=n(10),s=n(17),a=n(3),u=n(33),c=Object.getOwnPropertyDescriptor;e.f=n(7)?c:function(t,e){if(t=i(t),e=s(e,!0),u)try{return c(t,e)}catch(t){}if(a(t,e))return o(!r.f.call(t,e),t[e])}},function(t,e){t.exports={}},function(t,e,n){"use strict";var r,o,i=n(74),s=RegExp.prototype.exec,a=String.prototype.replace,u=s,c=(r=/a/,o=/b*/g,s.call(r,"a"),s.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),l=void 0!==/()??/.exec("")[1];(c||l)&&(u=function(t){var e,n,r,o,u=this;return l&&(n=new RegExp("^"+u.source+"$(?!\\s)",i.call(u))),c&&(e=u.lastIndex),r=s.call(u,t),c&&r&&(u.lastIndex=u.global?r.index+r[0].length:e),l&&r&&r.length>1&&a.call(r[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)}),r}),t.exports=u},function(t,e,n){"use strict";var r=n(1),o=n(3),i=n(7),s=n(11),a=n(9),u=n(47).KEY,c=n(2),l=n(19),f=n(22),p=n(13),v=n(0),d=n(37),h=n(38),y=n(48),m=n(52),g=n(5),_=n(6),b=n(10),x=n(17),w=n(18),S=n(27),k=n(55),O=n(29),C=n(8),E=n(14),M=O.f,j=C.f,N=k.f,P=r.Symbol,T=r.JSON,A=T&&T.stringify,I=v("_hidden"),R=v("toPrimitive"),L={}.propertyIsEnumerable,F=l("symbol-registry"),K=l("symbols"),D=l("op-symbols"),$=Object.prototype,B="function"==typeof P,V=r.QObject,G=!V||!V.prototype||!V.prototype.findChild,H=i&&c(function(){return 7!=S(j({},"a",{get:function(){return j(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=M($,e);r&&delete $[e],j(t,e,n),r&&t!==$&&j($,e,r)}:j,U=function(t){var e=K[t]=S(P.prototype);return e._k=t,e},z=B&&"symbol"==typeof P.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof P},J=function(t,e,n){return t===$&&J(D,e,n),g(t),e=x(e,!0),g(n),o(K,e)?(n.enumerable?(o(t,I)&&t[I][e]&&(t[I][e]=!1),n=S(n,{enumerable:w(0,!1)})):(o(t,I)||j(t,I,w(1,{})),t[I][e]=!0),H(t,e,n)):j(t,e,n)},W=function(t,e){g(t);for(var n,r=y(e=b(e)),o=0,i=r.length;i>o;)J(t,n=r[o++],e[n]);return t},X=function(t){var e=L.call(this,t=x(t,!0));return!(this===$&&o(K,t)&&!o(D,t))&&(!(e||!o(this,t)||!o(K,t)||o(this,I)&&this[I][t])||e)},Y=function(t,e){if(t=b(t),e=x(e,!0),t!==$||!o(K,e)||o(D,e)){var n=M(t,e);return!n||!o(K,e)||o(t,I)&&t[I][e]||(n.enumerable=!0),n}},q=function(t){for(var e,n=N(b(t)),r=[],i=0;n.length>i;)o(K,e=n[i++])||e==I||e==u||r.push(e);return r},Q=function(t){for(var e,n=t===$,r=N(n?D:b(t)),i=[],s=0;r.length>s;)!o(K,e=r[s++])||n&&!o($,e)||i.push(K[e]);return i};B||(a((P=function(){if(this instanceof P)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===$&&e.call(D,n),o(this,I)&&o(this[I],t)&&(this[I][t]=!1),H(this,t,w(1,n))};return i&&G&&H($,t,{configurable:!0,set:e}),U(t)}).prototype,"toString",function(){return this._k}),O.f=Y,C.f=J,n(28).f=k.f=q,n(26).f=X,n(41).f=Q,i&&!n(20)&&a($,"propertyIsEnumerable",X,!0),d.f=function(t){return U(v(t))}),s(s.G+s.W+s.F*!B,{Symbol:P});for(var Z="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),tt=0;Z.length>tt;)v(Z[tt++]);for(var et=E(v.store),nt=0;et.length>nt;)h(et[nt++]);s(s.S+s.F*!B,"Symbol",{for:function(t){return o(F,t+="")?F[t]:F[t]=P(t)},keyFor:function(t){if(!z(t))throw TypeError(t+" is not a symbol!");for(var e in F)if(F[e]===t)return e},useSetter:function(){G=!0},useSimple:function(){G=!1}}),s(s.S+s.F*!B,"Object",{create:function(t,e){return void 0===e?S(t):W(S(t),e)},defineProperty:J,defineProperties:W,getOwnPropertyDescriptor:Y,getOwnPropertyNames:q,getOwnPropertySymbols:Q}),T&&s(s.S+s.F*(!B||c(function(){var t=P();return"[null]"!=A([t])||"{}"!=A({a:t})||"{}"!=A(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(_(e)||void 0!==t)&&!z(t))return m(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!z(e))return e}),r[1]=e,A.apply(T,r)}}),P.prototype[R]||n(4)(P.prototype,R,P.prototype.valueOf),f(P,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e,n){t.exports=!n(7)&&!n(2)(function(){return 7!=Object.defineProperty(n(34)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(6),o=n(1).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e,n){var r=n(36);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){e.f=n(0)},function(t,e,n){var r=n(1),o=n(12),i=n(20),s=n(37),a=n(8).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e,n){var r=n(3),o=n(10),i=n(50)(!1),s=n(24)("IE_PROTO");t.exports=function(t,e){var n,a=o(t),u=0,c=[];for(n in a)n!=s&&r(a,n)&&c.push(n);for(;e.length>u;)r(a,n=e[u++])&&(~i(c,n)||c.push(n));return c}},function(t,e,n){var r=n(23),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){for(var r=n(43),o=n(14),i=n(9),s=n(1),a=n(4),u=n(30),c=n(0),l=c("iterator"),f=c("toStringTag"),p=u.Array,v={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},d=o(v),h=0;h<d.length;h++){var y,m=d[h],g=v[m],_=s[m],b=_&&_.prototype;if(b&&(b[l]||a(b,l,p),b[f]||a(b,f,m),u[m]=p,g))for(y in r)b[y]||i(b,y,r[y],!0)}},function(t,e,n){"use strict";var r=n(56),o=n(57),i=n(30),s=n(10);t.exports=n(58)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e,n){var r=n(16);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(15),o=n(0)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){t.exports=n(19)("native-function-to-string",Function.toString)},function(t,e,n){var r=n(13)("meta"),o=n(6),i=n(3),s=n(8).f,a=0,u=Object.isExtensible||function(){return!0},c=!n(2)(function(){return u(Object.preventExtensions({}))}),l=function(t){s(t,r,{value:{i:"O"+ ++a,w:{}}})},f=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[r].w},onFreeze:function(t){return c&&f.NEED&&u(t)&&!i(t,r)&&l(t),t}}},function(t,e,n){var r=n(14),o=n(41),i=n(26);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var s,a=n(t),u=i.f,c=0;a.length>c;)u.call(t,s=a[c++])&&e.push(s);return e}},function(t,e,n){var r=n(15);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e,n){var r=n(10),o=n(40),i=n(51);t.exports=function(t){return function(e,n,s){var a,u=r(e),c=o(u.length),l=i(s,c);if(t&&n!=n){for(;c>l;)if((a=u[l++])!=a)return!0}else for(;c>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(23),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(15);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(8),o=n(5),i=n(14);t.exports=n(7)?Object.defineProperties:function(t,e){o(t);for(var n,s=i(e),a=s.length,u=0;a>u;)r.f(t,n=s[u++],e[n]);return t}},function(t,e,n){var r=n(1).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(10),o=n(28).f,i={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return s&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return s.slice()}}(t):o(r(t))}},function(t,e,n){var r=n(0)("unscopables"),o=Array.prototype;null==o[r]&&n(4)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r=n(20),o=n(11),i=n(9),s=n(4),a=n(30),u=n(59),c=n(22),l=n(60),f=n(0)("iterator"),p=!([].keys&&"next"in[].keys()),v=function(){return this};t.exports=function(t,e,n,d,h,y,m){u(n,e,d);var g,_,b,x=function(t){if(!p&&t in O)return O[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},w=e+" Iterator",S="values"==h,k=!1,O=t.prototype,C=O[f]||O["@@iterator"]||h&&O[h],E=C||x(h),M=h?S?x("entries"):E:void 0,j="Array"==e&&O.entries||C;if(j&&(b=l(j.call(new t)))!==Object.prototype&&b.next&&(c(b,w,!0),r||"function"==typeof b[f]||s(b,f,v)),S&&C&&"values"!==C.name&&(k=!0,E=function(){return C.call(this)}),r&&!m||!p&&!k&&O[f]||s(O,f,E),a[e]=E,a[w]=v,h)if(g={values:S?E:x("values"),keys:y?E:x("keys"),entries:M},m)for(_ in g)_ in O||i(O,_,g[_]);else o(o.P+o.F*(p||k),e,g);return g}},function(t,e,n){"use strict";var r=n(27),o=n(18),i=n(22),s={};n(4)(s,n(0)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(s,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(3),o=n(44),i=n(24)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){"use strict";var r=n(45),o={};o[n(0)("toStringTag")]="z",o+""!="[object z]"&&n(9)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(44),o=n(14);n(63)("keys",function(){return function(t){return o(r(t))}})},function(t,e,n){var r=n(11),o=n(12),i=n(2);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],s={};s[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",s)}},function(t,e,n){var r=n(6),o=n(65).set;t.exports=function(t,e,n){var i,s=e.constructor;return s!==n&&"function"==typeof s&&(i=s.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},function(t,e,n){var r=n(6),o=n(5),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(35)(Function.call,n(29).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},function(t,e,n){var r=n(11),o=n(16),i=n(2),s=n(67),a="["+s+"]",u=RegExp("^"+a+a+"*"),c=RegExp(a+a+"*$"),l=function(t,e,n){var o={},a=i(function(){return!!s[t]()||"…"!="…"[t]()}),u=o[t]=a?e(f):s[t];n&&(o[n]=u),r(r.P+r.F*a,"String",o)},f=l.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(u,"")),2&e&&(t=t.replace(c,"")),t};t.exports=l},function(t,e){t.exports="\t\n\v\f\r    \u2028\u2029\ufeff"},function(t,e,n){"use strict";var r=n(69),o=n(5),i=n(70),s=n(71),a=n(40),u=n(73),c=n(31),l=n(2),f=Math.min,p=[].push,v=!l(function(){RegExp(4294967295,"y")});n(75)("split",2,function(t,e,n,l){var d;return d="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,e){var o=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(o,t,e);for(var i,s,a,u=[],l=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,v=void 0===e?4294967295:e>>>0,d=new RegExp(t.source,l+"g");(i=c.call(d,o))&&!((s=d.lastIndex)>f&&(u.push(o.slice(f,i.index)),i.length>1&&i.index<o.length&&p.apply(u,i.slice(1)),a=i[0].length,f=s,u.length>=v));)d.lastIndex===i.index&&d.lastIndex++;return f===o.length?!a&&d.test("")||u.push(""):u.push(o.slice(f)),u.length>v?u.slice(0,v):u}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var o=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):d.call(String(o),n,r)},function(t,e){var r=l(d,t,this,e,d!==n);if(r.done)return r.value;var c=o(t),p=String(this),h=i(c,RegExp),y=c.unicode,m=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(v?"y":"g"),g=new h(v?c:"^(?:"+c.source+")",m),_=void 0===e?4294967295:e>>>0;if(0===_)return[];if(0===p.length)return null===u(g,p)?[p]:[];for(var b=0,x=0,w=[];x<p.length;){g.lastIndex=v?x:0;var S,k=u(g,v?p:p.slice(x));if(null===k||(S=f(a(g.lastIndex+(v?0:x)),p.length))===b)x=s(p,x,y);else{if(w.push(p.slice(b,x)),w.length===_)return w;for(var O=1;O<=k.length-1;O++)if(w.push(k[O]),w.length===_)return w;x=b=S}}return w.push(p.slice(b)),w}]})},function(t,e,n){var r=n(6),o=n(15),i=n(0)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,n){var r=n(5),o=n(36),i=n(0)("species");t.exports=function(t,e){var n,s=r(t).constructor;return void 0===s||null==(n=r(s)[i])?e:o(n)}},function(t,e,n){"use strict";var r=n(72)(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r=n(23),o=n(16);t.exports=function(t){return function(e,n){var i,s,a=String(o(e)),u=r(n),c=a.length;return u<0||u>=c?t?"":void 0:(i=a.charCodeAt(u))<55296||i>56319||u+1===c||(s=a.charCodeAt(u+1))<56320||s>57343?t?a.charAt(u):i:t?a.slice(u,u+2):s-56320+(i-55296<<10)+65536}}},function(t,e,n){"use strict";var r=n(45),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var i=n.call(t,e);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},function(t,e,n){"use strict";var r=n(5);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";n(76);var r=n(9),o=n(4),i=n(2),s=n(16),a=n(0),u=n(31),c=a("species"),l=!i(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),f=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=a(t),v=!i(function(){var e={};return e[p]=function(){return 7},7!=""[t](e)}),d=v?!i(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[p](""),!e}):void 0;if(!v||!d||"replace"===t&&!l||"split"===t&&!f){var h=/./[p],y=n(s,p,""[t],function(t,e,n,r,o){return e.exec===u?v&&!o?{done:!0,value:h.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),m=y[0],g=y[1];r(String.prototype,t,m),o(RegExp.prototype,p,2==e?function(t,e){return g.call(t,this,e)}:function(t){return g.call(t,this)})}}},function(t,e,n){"use strict";var r=n(31);n(11)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(t,e,n){n(38)("asyncIterator")},function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"mastodon"},[n("service-header",{attrs:{emit:t.emit},scopedSlots:t._u([{key:"title",fn:function(){return[t._v("Mastodon: "),n("span",{domProps:{innerHTML:t._s(t.parseEmojis(t.account.display_name,t.account.emojis))}}),t._v(t._s(t.server?"@"+t.server:""))]},proxy:!0},{key:"settings",fn:function(){return[n("setting-boolean",{attrs:{id:"reconnect",title:"Reconnect",value:t.reconnect},on:{change:t.saveOptionCouple}}),n("setting-boolean",{attrs:{id:"reblog",title:"Show reblogs",value:t.reblog},on:{change:t.saveOptionCouple}}),n("setting-boolean",{attrs:{id:"reply",title:"Show replies",value:t.reply},on:{change:t.saveOptionCouple}}),n("setting-int",{attrs:{id:"buffer",title:"Buffer size",value:t.buffer},on:{change:t.saveOptionCouple}}),n("setting-boolean",{attrs:{id:"showMedia",title:"Show medias",value:t.showMedia},on:{change:t.saveOptionCouple}})]},proxy:!0}])}),t.server&&t.token?n("client",t._b({},"client",t.$props,!1)):n("div",{staticClass:"auth"},[n("form",{on:{submit:function(e){return e.preventDefault(),t.setServer(e)}}},[n("p",[n("label",{attrs:{for:"server"}},[t._v("Server:")]),n("input",{directives:[{name:"model",rawName:"v-model",value:t.newServer,expression:"newServer"}],attrs:{id:"server",required:""},domProps:{value:t.newServer},on:{input:function(e){e.target.composing||(t.newServer=e.target.value)}}})]),n("p",[n("label",{attrs:{for:"token"}},[t._v("Token:")]),n("input",{directives:[{name:"model",rawName:"v-model",value:t.newToken,expression:"newToken"}],attrs:{id:"token",required:""},domProps:{value:t.newToken},on:{input:function(e){e.target.composing||(t.newToken=e.target.value)}}})]),n("p",[n("input",{attrs:{type:"submit",value:"Connect"}})])])])],1)};r._withStripped=!0;n(32),n(42),n(43),n(61),n(62),n(21);function o(t,e,n,r,o,i,s,a){var u,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),s?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},c._ssrRegister=u):o&&(u=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),u)if(c.functional){c._injectStyles=u;var l=c.render;c.render=function(t,e){return u.call(e),l(t,e)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,u):[u]}return{exports:t,options:c}}var i=o({props:{emit:Function},methods:{emitError:function(t){this.emit("error",t)},saveOptions:function(t){this.emit("saveAll",t)},saveOption:function(t,e){this.saveOptionCouple({key:t,value:e})},saveOptionCouple:function(t){this.emit("save",t)}}},void 0,void 0,!1,null,null,null);i.options.__file="src/core/serviceEmiter.vue";var s=i.exports,a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"service-header"},[n("div",{staticClass:"title",on:{click:function(e){t.showSettings=!t.showSettings}}},[t._t("title")],2),n("div",{directives:[{name:"show",rawName:"v-show",value:t.showSettings,expression:"showSettings"}],staticClass:"settings"},[n("input",{staticClass:"position",on:{keyup:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:e.ctrlKey?e.shiftKey||e.altKey||e.metaKey?null:t.onMove("x",-1):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:e.ctrlKey?e.shiftKey||e.altKey||e.metaKey?null:t.onMove("x",1):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?null:"button"in e&&0!==e.button?null:e.ctrlKey?e.shiftKey||e.altKey||e.metaKey?null:t.onMove("y",-1):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])?null:"button"in e&&2!==e.button?null:e.ctrlKey?e.shiftKey||e.altKey||e.metaKey?null:t.onMove("y",1):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"up",38,e.key,["Up","ArrowUp"])?null:e.altKey?e.ctrlKey||e.shiftKey||e.metaKey?null:t.onMove("h",-1):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"down",40,e.key,["Down","ArrowDown"])?null:e.altKey?e.ctrlKey||e.shiftKey||e.metaKey?null:t.onMove("h",1):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])?null:"button"in e&&0!==e.button?null:e.altKey?e.ctrlKey||e.shiftKey||e.metaKey?null:t.onMove("w",-1):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])?null:"button"in e&&2!==e.button?null:e.altKey?e.ctrlKey||e.shiftKey||e.metaKey?null:t.onMove("w",1):null}]}}),t._t("settings")],2)])};a._withStripped=!0;var u=o({data:function(){return{showSettings:!1}},props:{emit:Function},methods:{onMove:function(t,e){this.emit("move",{type:t,direction:e})}}},a,[],!1,null,null,null);u.options.__file="src/core/serviceHeader.vue";var c=u.exports,l=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",{staticClass:"setting"},[n("label",{attrs:{for:t.id}},[t._v(t._s(t.title)+":")]),n("input",{attrs:{id:t.id,type:"checkbox"},domProps:{checked:t.value},on:{change:function(e){return e.stopPropagation(),t.sendChange(e.target.checked)}}})])};l._withStripped=!0;var f=o({props:{id:String,title:String},methods:{sendChange:function(t){this.$emit("change",{key:this.id,value:t})}}},void 0,void 0,!1,null,null,null);f.options.__file="src/core/input/baseSetting.vue";var p=f.exports,v=o({extends:p,props:{value:Boolean}},l,[],!1,null,null,null);v.options.__file="src/core/input/settingBoolean.vue";var d=v.exports,h=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",{staticClass:"setting"},[n("label",{attrs:{for:t.id}},[t._v(t._s(t.title)+":")]),n("input",{attrs:{id:t.id,type:"number",step:"1"},domProps:{value:t.value},on:{keyup:function(e){if(!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter"))return null;t.sendChange(parseInt(e.target.value))}}})])};h._withStripped=!0;var y=o({extends:p,props:{value:Number}},h,[],!1,null,null,null);y.options.__file="src/core/input/settingInt.vue";var m=y.exports,g=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("p",{staticClass:"setting"},[n("label",{attrs:{for:t.id}},[t._v(t._s(t.title)+":")]),n("input",{attrs:{id:t.id,type:"text"},domProps:{value:t.value},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.sendChange(e.target.value)}}})])};g._withStripped=!0;var _=o({extends:p,props:{value:String}},g,[],!1,null,null,null);_.options.__file="src/core/input/settingString.vue";var b=o({extends:s,components:{serviceHeader:c,settingBoolean:d,settingInt:m,settingString:_.exports}},void 0,void 0,!1,null,null,null);b.options.__file="src/core/baseService.vue";var x=b.exports,w=(n(68),n(77),{methods:{parseEmojis:function(t,e){var n=!0,r=!1,o=void 0;try{for(var i,s=e[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var a=i.value;t=t.split(":".concat(a.shortcode,":")).join('<img draggable="false" class="icon" alt="'.concat(a.shortcode,'" title="').concat(a.shortcode,'" src="').concat(a.static_url,'">'))}}catch(t){r=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(r)throw o}}return t}}}),S=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"client",on:{"&scroll":function(e){return t.onScroll(e)}}},[n("div",{staticClass:"statues"},[t.notifications.length>0?n("div",{staticClass:"header"},[t._v("Accueil")]):t._e(),t.statues.length>0?n("div",{staticClass:"list"},[t._l(t.statues,function(e){return[t.showStatus(e)?n("status",{key:e.id,attrs:{status:e,now:t.now,showMedia:t.showMedia},on:{mark:t.onStatusMark}}):t._e()]}),n("div",{directives:[{name:"show",rawName:"v-show",value:t.loadingOlder,expression:"loadingOlder"}],staticClass:"status"},[n("div",{staticClass:"service-loader"})])],2):n("div",{staticClass:"service-loader"})]),t.notifications.length>0?n("div",{staticClass:"notifications"},[n("div",{staticClass:"header"},[t._v("Notifications"),n("span",{staticClass:"date",on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.onNotificationsClear(e)}}},[t._v("❌")])]),n("div",{staticClass:"list"},t._l(t.notifications,function(e){return n("notification",{key:e.id,attrs:{notification:e,now:t.now,showMedia:t.showMedia},on:{dismiss:t.onNotificationDismiss,mark:t.onStatusMark}})}),1)]):t._e()])};S._withStripped=!0;var k=function(){var t=this.$createElement;return(this._self._c||t)("span",[this._v(this._s(this.timeSince))])};k._withStripped=!0;var O={props:{now:{type:Number|Date,default:Date.now}}},C={created:function(){var t=this;setInterval(function(){t.now=Date.now()},3e4)},data:function(){return{now:Date.now()}}},E=o({mixins:[O],props:["date"],computed:{timeSince:function(){var t=Math.floor((this.now-new Date(this.date))/1e3),e=Math.floor(t/31536e3);return e>1?e+" years":(e=Math.floor(t/2592e3))>1?e+" months":(e=Math.floor(t/86400))>1?e+" days":(e=Math.floor(t/3600))>1?e+" hours":(e=Math.floor(t/60))>1?e+" minutes":Math.floor(t)+" seconds"}}},k,[],!1,null,null,null);E.options.__file="src/core/fromNow.vue";var M=E.exports,j=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("div",{staticClass:"status"},[t.withAccount?n("account",{attrs:{account:t.status.account,showMedia:t.showMedia}}):t._e(),t.status.reblog?n("span",{staticClass:"text-icon letter"},[t._v("⟳")]):t._e(),n("a",{staticClass:"date",attrs:{target:"_blank",href:t.status.uri}},[n("from-now",{attrs:{date:t.status.created_at,now:t.now}})],1),n("div",{staticClass:"content",class:{avatared:t.showMedia}},[t.status.reblog?n("status",{staticClass:"reblog",attrs:{status:t.status.reblog,now:t.now,showMedia:t.showMedia}}):[t.status.spoiler_text?n("div",{staticClass:"spoiler",on:{click:function(e){e.stopPropagation(),e.preventDefault(),t.status.sensitive=!t.status.sensitive}}},[t._v(t._s(t.status.spoiler_text||"Spoiler")+" "+t._s(t.status.sensitive?"→":"↓"))]):t._e(),t.status.spoiler_text&&t.status.sensitive?t._e():n("div",[n("div",{staticClass:"text",domProps:{innerHTML:t._s(t.parseEmojis(t.status.content,t.status.emojis))}}),t._l(t.status.media_attachments,function(e){return n("a",{staticClass:"media",attrs:{href:e.url,target:"_blank"}},[t.showMedia?["image"==e.type||"gifv"==e.type?n("img",{attrs:{src:e.preview_url,alt:e.description,title:e.description}}):t._e(),"gifv"==e.type?n("div",{staticClass:"gif"},[t._v("GIF")]):t._e()]:[t._v("Hidden media")]],2)})],2)]],2),t.status.reblog?t._e():n("div",{staticClass:"meta"},[n("a",{staticClass:"replies",on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.makeReply(t.status)}}},[n("span",{staticClass:"text-icon"},[t._v("✉")]),t._v(t._s(t.status.replies_count))]),n("a",{staticClass:"reblogs",class:{colored:t.status.reblogged},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.makeReblog(t.status)}}},[n("span",{staticClass:"text-icon"},[t._v("⟳")]),t._v(t._s(t.status.reblogs_count))]),n("a",{staticClass:"favourites",class:{colored:t.status.favourited},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.makeFav(t.status)}}},[n("span",{staticClass:"text-icon"},[t._v("⚝")]),t._v(t._s(t.status.favourites_count))]),t.status.in_reply_to_id?n("a",{staticClass:"fil",on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.showReply(t.status.in_reply_to_id)}}},[t._v("Voir le fil")]):t._e()])],1)])};j._withStripped=!0;var N=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("a",{staticClass:"account",attrs:{target:"_blank",href:t.account.url}},[t.showMedia?n("div",{staticClass:"avatar",style:t.avatarStyle(t.account.avatar_static)}):t._e(),n("div",{staticClass:"name",domProps:{innerHTML:t._s(t.parseEmojis(t.account.display_name,t.account.emojis))}}),n("div",{staticClass:"acct"},[t._v("@"+t._s(t.account.acct))])])};N._withStripped=!0;var P=o({mixins:[w],props:{account:Object,showMedia:{type:Boolean,default:!0}},methods:{avatarStyle:function(t){return{"background-image":"url(".concat(t,")")}}}},N,[],!1,null,null,null);P.options.__file="src/mastodon/account.vue";var T=P.exports,A=o({name:"status",mixins:[O,w],components:{account:T,fromNow:M},props:{status:Object,withAccount:{type:Boolean,default:!0},showMedia:{type:Boolean,default:!0}},methods:{showReply:function(t){console.error(t)},makeReply:function(t){console.error(t.id)},emitMark:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.$emit("mark",{id:t.id,type:(r?"un":"")+e,callback:n})},makeReblog:function(t){this.emitMark(t,"reblog",function(){t.reblogs_count+=t.reblogged?-1:1,t.reblogged=!t.reblogged},t.reblogged)},makeFav:function(t){this.emitMark(t,"favourite",function(){t.favourites_count+=t.favourited?-1:1,t.favourited=!t.favourited},t.favourited)}}},j,[],!1,null,null,null);A.options.__file="src/mastodon/status.vue";var I=A.exports,R=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"notification"},[n("account",{attrs:{account:t.notification.account,showMedia:t.showMedia}}),"mention"==t.notification.type?n("span",{staticClass:"colored text-icon letter"},[t._v("✉")]):t._e(),"reblog"==t.notification.type?n("span",{staticClass:"colored text-icon letter"},[t._v("⟳")]):t._e(),"favourite"==t.notification.type?n("span",{staticClass:"colored text-icon letter"},[t._v("⚝")]):t._e(),n("from-now",{staticClass:"date",attrs:{date:t.notification.created_at,now:t.now}}),n("div",{staticClass:"content"},["follow"==t.notification.type?[t._v("Vous suit")]:t.notification.status?n("status",{staticClass:"reblog",attrs:{status:t.notification.status,now:t.now,showMedia:t.showMedia,withAccount:"mention"!=t.notification.type},on:{mark:t.passMark}}):t._e()],2),n("a",{staticClass:"date",staticStyle:{"margin-top":"-1em"},on:{click:function(e){return e.stopPropagation(),e.preventDefault(),t.makeDismiss(e)}}},[t._v("❌")])],1)};R._withStripped=!0;var L=o({props:{notification:Object,showMedia:{type:Boolean,default:!0}},mixins:[O],components:{fromNow:M,account:T,status:I},methods:{makeDismiss:function(){this.$emit("dismiss",this.notification.id)},passMark:function(t){this.$emit("mark",t)}}},R,[],!1,null,null,null);L.options.__file="src/mastodon/notification.vue";var F=o({extends:s,mixins:[C],components:{status:I,notification:L.exports},props:{server:String,token:String,timeout:Number,reconnect:Boolean,buffer:Number,reblog:Boolean,reply:Boolean,showMedia:Boolean},data:function(){return{rest:axios.create({baseURL:"https://".concat(this.server,"/api/v1/"),timeout:this.timeout,headers:{Authorization:"Bearer "+this.token}}),statues:[],notifications:[],now:Date.now(),loadingOlder:!1}},methods:{onScroll:function(t){var e=this;!this.loadingOlder&&t.target.scrollHeight-t.target.clientHeight-t.target.scrollTop-100<0?(this.loadingOlder=!0,this.rest.get("/timelines/home",{params:{limit:this.buffer,max_id:this.statues[this.statues.length-1].id}}).then(function(t){e.statues.push.apply(e.statues,t.data),e.loadingOlder=!1}).catch(this.emitError)):t.target.scrollTop<20&&this.statues.splice(this.buffer)},removeStatus:function(t){for(var e=this.statues.length-1;e>=0;e--)if(this.statues[e].id===t){this.statues.splice(e,1);break}},removeNotification:function(t){for(var e=this.notifications.length-1;e>=0;e--)if(this.notifications[e].id===t){this.notifications.splice(e,1);break}},showStatus:function(t){return(!t.in_reply_to_id||this.reply)&&(!t.reblog||this.reblog)},onStatusMark:function(t){this.rest.post("/statuses/".concat(t.id,"/").concat(t.type)).then(t.callback).catch(this.emitError)},onNotificationDismiss:function(t){var e=this;this.rest.post("/notifications/dismiss",{id:t}).then(function(){return e.removeNotification(t)}).catch(this.emitError)},onNotificationsClear:function(){var t=this;this.rest.post("/notifications/clear").then(function(){return t.notifications.splice(0,t.notifications.length)}).catch(this.emitError)},setupStream:function(){var t=this,e=new WebSocket("wss://".concat(this.server,"/api/v1/streaming?access_token=").concat(this.token,"&stream=user"));e.onmessage=function(e){e=JSON.parse(e.data);var n=JSON.parse(e.payload);switch(e.event){case"update":t.statues.unshift(n);break;case"notification":t.notifications.unshift(n);break;case"delete":t.removeStatus(n)}},e.onerror=this.emitError,e.onclose=function(){t.emitError("Mastodon stream disconnected !"+(t.reconnect?" Reconnecting...":"")),t.reconnect&&setTimeout(function(){return t.setupStream()},t.timeout)}}},created:function(){var t=this;this.rest.get("/timelines/home",{params:{limit:this.buffer}}).then(function(e){return t.statues.push.apply(t.statues,e.data)}).catch(this.emitError),this.rest.get("/notifications",{params:{limit:this.buffer}}).then(function(e){return t.notifications.push.apply(t.notifications,e.data)}).catch(this.emitError),this.setupStream()}},S,[],!1,null,null,null);function K(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}F.options.__file="src/mastodon/client.vue";var D=o({name:"mastodon",extends:x,mixins:[w],components:{client:F.exports},props:{server:String,token:String,timeout:{default:5e3,type:Number},reconnect:{default:!1,type:Boolean},buffer:{default:20,type:Number},reblog:{default:!0,type:Boolean},reply:{default:!1,type:Boolean},showMedia:{default:!0,type:Boolean}},data:function(){return{newServer:this.server,newToken:this.token,account:{display_name:"Loading...",emojis:[]}}},methods:{setServer:function(){var t=this;axios.get("https://".concat(this.newServer,"/api/v1/accounts/verify_credentials"),{headers:{Authorization:"Bearer "+this.newToken},timeout:this.timeout}).then(function(){return t.saveOptions(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),r.forEach(function(e){K(t,e,n[e])})}return t}({},t.$props,{server:t.newServer,token:t.newToken}))}).catch(this.emitError)}},created:function(){var t=this;this.server&&this.token?axios.get("https://".concat(this.server,"/api/v1/accounts/verify_credentials"),{headers:{Authorization:"Bearer "+this.token},timeout:this.timeout}).then(function(e){return t.account=e.data}).catch(function(e){t.emitError(e),t.account.display_name="Failed"}):this.account.display_name="First connection"}},r,[],!1,null,null,null);D.options.__file="src/mastodon/main.vue";var $=D.exports;Vue.component($.name,$)}]);