test1234

Изменяет смайлики на форуме

// ==UserScript==
// @name         test1234
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  Изменяет смайлики на форуме
// @author       S30N1K
// @match        https://dota2.ru/*
// @grant        none
// ==/UserScript==
 
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(a){return a.raw=a};$jscomp.createTemplateTagFirstArgWithRaw=function(a,c){a.raw=c;return a};$jscomp.arrayIteratorImpl=function(a){var c=0;return function(){return c<a.length?{done:!1,value:a[c++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var c="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return c?c.call(a):$jscomp.arrayIterator(a)};
$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,c,h){if(a==Array.prototype||a==Object.prototype)return a;a[c]=h.value;return a};
$jscomp.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var c=0;c<a.length;++c){var h=a[c];if(h&&h.Math==Math)return h}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};
$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(a,c){var h=$jscomp.propertyToPolyfillSymbol[c];if(null==h)return a[c];h=a[h];return void 0!==h?h:a[c]};$jscomp.polyfill=function(a,c,h,d){c&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(a,c,h,d):$jscomp.polyfillUnisolated(a,c,h,d))};
$jscomp.polyfillUnisolated=function(a,c,h,d){h=$jscomp.global;a=a.split(".");for(d=0;d<a.length-1;d++){var k=a[d];if(!(k in h))return;h=h[k]}a=a[a.length-1];d=h[a];c=c(d);c!=d&&null!=c&&$jscomp.defineProperty(h,a,{configurable:!0,writable:!0,value:c})};
$jscomp.polyfillIsolated=function(a,c,h,d){var k=a.split(".");a=1===k.length;d=k[0];d=!a&&d in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var q=0;q<k.length-1;q++){var r=k[q];if(!(r in d))return;d=d[r]}k=k[k.length-1];h=$jscomp.IS_SYMBOL_NATIVE&&"es6"===h?d[k]:null;c=c(h);null!=c&&(a?$jscomp.defineProperty($jscomp.polyfills,k,{configurable:!0,writable:!0,value:c}):c!==h&&(void 0===$jscomp.propertyToPolyfillSymbol[k]&&($jscomp.propertyToPolyfillSymbol[k]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(k):
$jscomp.POLYFILL_PREFIX+k),$jscomp.defineProperty(d,$jscomp.propertyToPolyfillSymbol[k],{configurable:!0,writable:!0,value:c})))};$jscomp.underscoreProtoCanBeSet=function(){var a={a:!0},c={};try{return c.__proto__=a,c.a}catch(h){}return!1};$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(a,c){a.__proto__=c;if(a.__proto__!==c)throw new TypeError(a+" is not extensible");return a}:null;
$jscomp.generator={};$jscomp.generator.ensureIteratorResultIsObject_=function(a){if(!(a instanceof Object))throw new TypeError("Iterator result "+a+" is not an object");};$jscomp.generator.Context=function(){this.isRunning_=!1;this.yieldAllIterator_=null;this.yieldResult=void 0;this.nextAddress=1;this.finallyAddress_=this.catchAddress_=0;this.finallyContexts_=this.abruptCompletion_=null};
$jscomp.generator.Context.prototype.start_=function(){if(this.isRunning_)throw new TypeError("Generator is already running");this.isRunning_=!0};$jscomp.generator.Context.prototype.stop_=function(){this.isRunning_=!1};$jscomp.generator.Context.prototype.jumpToErrorHandler_=function(){this.nextAddress=this.catchAddress_||this.finallyAddress_};$jscomp.generator.Context.prototype.next_=function(a){this.yieldResult=a};
$jscomp.generator.Context.prototype.throw_=function(a){this.abruptCompletion_={exception:a,isException:!0};this.jumpToErrorHandler_()};$jscomp.generator.Context.prototype["return"]=function(a){this.abruptCompletion_={"return":a};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.jumpThroughFinallyBlocks=function(a){this.abruptCompletion_={jumpTo:a};this.nextAddress=this.finallyAddress_};$jscomp.generator.Context.prototype.yield=function(a,c){this.nextAddress=c;return{value:a}};
$jscomp.generator.Context.prototype.yieldAll=function(a,c){var h=$jscomp.makeIterator(a),d=h.next();$jscomp.generator.ensureIteratorResultIsObject_(d);if(d.done)this.yieldResult=d.value,this.nextAddress=c;else return this.yieldAllIterator_=h,this.yield(d.value,c)};$jscomp.generator.Context.prototype.jumpTo=function(a){this.nextAddress=a};$jscomp.generator.Context.prototype.jumpToEnd=function(){this.nextAddress=0};
$jscomp.generator.Context.prototype.setCatchFinallyBlocks=function(a,c){this.catchAddress_=a;void 0!=c&&(this.finallyAddress_=c)};$jscomp.generator.Context.prototype.setFinallyBlock=function(a){this.catchAddress_=0;this.finallyAddress_=a||0};$jscomp.generator.Context.prototype.leaveTryBlock=function(a,c){this.nextAddress=a;this.catchAddress_=c||0};
$jscomp.generator.Context.prototype.enterCatchBlock=function(a){this.catchAddress_=a||0;a=this.abruptCompletion_.exception;this.abruptCompletion_=null;return a};$jscomp.generator.Context.prototype.enterFinallyBlock=function(a,c,h){h?this.finallyContexts_[h]=this.abruptCompletion_:this.finallyContexts_=[this.abruptCompletion_];this.catchAddress_=a||0;this.finallyAddress_=c||0};
$jscomp.generator.Context.prototype.leaveFinallyBlock=function(a,c){var h=this.finallyContexts_.splice(c||0)[0];if(h=this.abruptCompletion_=this.abruptCompletion_||h){if(h.isException)return this.jumpToErrorHandler_();void 0!=h.jumpTo&&this.finallyAddress_<h.jumpTo?(this.nextAddress=h.jumpTo,this.abruptCompletion_=null):this.nextAddress=this.finallyAddress_}else this.nextAddress=a};$jscomp.generator.Context.prototype.forIn=function(a){return new $jscomp.generator.Context.PropertyIterator(a)};
$jscomp.generator.Context.PropertyIterator=function(a){this.object_=a;this.properties_=[];for(var c in a)this.properties_.push(c);this.properties_.reverse()};$jscomp.generator.Context.PropertyIterator.prototype.getNext=function(){for(;0<this.properties_.length;){var a=this.properties_.pop();if(a in this.object_)return a}return null};$jscomp.generator.Engine_=function(a){this.context_=new $jscomp.generator.Context;this.program_=a};
$jscomp.generator.Engine_.prototype.next_=function(a){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_.next,a,this.context_.next_);this.context_.next_(a);return this.nextStep_()};
$jscomp.generator.Engine_.prototype.return_=function(a){this.context_.start_();var c=this.context_.yieldAllIterator_;if(c)return this.yieldAllStep_("return"in c?c["return"]:function(h){return{value:h,done:!0}},a,this.context_["return"]);this.context_["return"](a);return this.nextStep_()};
$jscomp.generator.Engine_.prototype.throw_=function(a){this.context_.start_();if(this.context_.yieldAllIterator_)return this.yieldAllStep_(this.context_.yieldAllIterator_["throw"],a,this.context_.next_);this.context_.throw_(a);return this.nextStep_()};
$jscomp.generator.Engine_.prototype.yieldAllStep_=function(a,c,h){try{var d=a.call(this.context_.yieldAllIterator_,c);$jscomp.generator.ensureIteratorResultIsObject_(d);if(!d.done)return this.context_.stop_(),d;var k=d.value}catch(q){return this.context_.yieldAllIterator_=null,this.context_.throw_(q),this.nextStep_()}this.context_.yieldAllIterator_=null;h.call(this.context_,k);return this.nextStep_()};
$jscomp.generator.Engine_.prototype.nextStep_=function(){for(;this.context_.nextAddress;)try{var a=this.program_(this.context_);if(a)return this.context_.stop_(),{value:a.value,done:!1}}catch(c){this.context_.yieldResult=void 0,this.context_.throw_(c)}this.context_.stop_();if(this.context_.abruptCompletion_){a=this.context_.abruptCompletion_;this.context_.abruptCompletion_=null;if(a.isException)throw a.exception;return{value:a["return"],done:!0}}return{value:void 0,done:!0}};
$jscomp.generator.Generator_=function(a){this.next=function(c){return a.next_(c)};this["throw"]=function(c){return a.throw_(c)};this["return"]=function(c){return a.return_(c)};this[Symbol.iterator]=function(){return this}};$jscomp.generator.createGenerator=function(a,c){var h=new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(c));$jscomp.setPrototypeOf&&a.prototype&&$jscomp.setPrototypeOf(h,a.prototype);return h};
$jscomp.asyncExecutePromiseGenerator=function(a){function c(d){return a.next(d)}function h(d){return a["throw"](d)}return new Promise(function(d,k){function q(r){r.done?d(r.value):Promise.resolve(r.value).then(c,h).then(q,k)}q(a.next())})};$jscomp.asyncExecutePromiseGeneratorFunction=function(a){return $jscomp.asyncExecutePromiseGenerator(a())};$jscomp.asyncExecutePromiseGeneratorProgram=function(a){return $jscomp.asyncExecutePromiseGenerator(new $jscomp.generator.Generator_(new $jscomp.generator.Engine_(a)))};
(function(){function a(d){var k=h[d];if(void 0!==k)return k.exports;k=h[d]={id:d,exports:{}};return c[d](k,k.exports,a),k.exports}var c={349:function(d,k,q){q.d(k,{Z:function(){return r}});k=q(645);q=q.n(k)()(function(y){return y[1]});q.push([d.id,"\n.search[data-v-7ba5bd90] {\r\n  padding: 10px;\n}\n.search input[data-v-7ba5bd90] {\r\n  margin-left: 6px;\r\n  background-color: transparent;\r\n  border: 0;\r\n  outline: 0;\r\n  width: 300px;\n}\n.favorites[data-v-7ba5bd90] {\r\n  padding: 30px;\r\n  text-align: center;\n}\n.favorites span[data-v-7ba5bd90] {\r\n  color: darkred;\n}\r\n",
""]);var r=q},645:function(d){d.exports=function(k){var q=[];return q.toString=function(){return this.map(function(r){var y=k(r);return r[2]?"@media ".concat(r[2]," {").concat(y,"}"):y}).join("")},q.i=function(r,y,B){"string"==typeof r&&(r=[[null,r,""]]);var C={};if(B)for(var A=0;A<this.length;A++){var b=this[A][0];null!=b&&(C[b]=!0)}for(A=0;A<r.length;A++)b=[].concat(r[A]),B&&C[b[0]]||(y&&(b[2]?b[2]="".concat(y," and ").concat(b[2]):b[2]=y),q.push(b))},q}},379:function(d,k,q){function r(l){for(var n=
-1,m=0;m<f.length;m++)if(f[m].identifier===l){n=m;break}return n}function y(l,n){for(var m={},p=[],u=0;u<l.length;u++){var v=l[u],x=n.base?v[0]+n.base:v[0],F=m[x]||0,E="".concat(x," ").concat(F);m[x]=F+1;x=r(E);v={css:v[1],media:v[2],sourceMap:v[3]};-1!==x?(f[x].references++,f[x].updater(v)):f.push({identifier:E,updater:b(v,n),references:1});p.push(E)}return p}function B(l){var n=document.createElement("style"),m=l.attributes||{};if(void 0===m.nonce){var p=q.nc;p&&(m.nonce=p)}if(Object.keys(m).forEach(function(u){n.setAttribute(u,
m[u])}),"function"==typeof l.insert)l.insert(n);else{l=g(l.insert||"head");if(!l)throw Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");l.appendChild(n)}return n}function C(l,n,m,p){m=m?"":p.media?"@media ".concat(p.media," {").concat(p.css,"}"):p.css;l.styleSheet?l.styleSheet.cssText=w(n,m):(m=document.createTextNode(m),p=l.childNodes,p[n]&&l.removeChild(p[n]),p.length?l.insertBefore(m,p[n]):l.appendChild(m))}function A(l,n,m){n=m.css;
var p=m.media;m=m.sourceMap;if(p?l.setAttribute("media",p):l.removeAttribute("media"),m&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(m))))," */")),l.styleSheet)l.styleSheet.cssText=n;else{for(;l.firstChild;)l.removeChild(l.firstChild);l.appendChild(document.createTextNode(n))}}function b(l,n){if(n.singleton){var m=D++;var p=z||(z=B(n));var u=C.bind(null,p,m,!1);var v=C.bind(null,p,m,!0)}else p=B(n),u=A.bind(null,
p,n),v=function(){if(null===p.parentNode)var x=!1;else p.parentNode.removeChild(p),x=void 0;!x};return u(l),function(x){x?(x.css!==l.css||x.media!==l.media||x.sourceMap!==l.sourceMap)&&u(l=x):v()}}var e,g=function(){var l={};return function(n){if(void 0===l[n]){var m=document.querySelector(n);if(window.HTMLIFrameElement&&m instanceof window.HTMLIFrameElement)try{m=m.contentDocument.head}catch(p){m=null}l[n]=m}return l[n]}}(),f=[],t,w=(t=[],function(l,n){return t[l]=n,t.filter(Boolean).join("\n")}),
z=null,D=0;d.exports=function(l,n){(n=n||{}).singleton||"boolean"==typeof n.singleton||(n.singleton=(void 0===e&&(e=!(!(window&&document&&document.all)||window.atob)),e));var m=y(l=l||[],n);return function(p){if(p=p||[],"[object Array]"===Object.prototype.toString.call(p)){for(var u=0;u<m.length;u++){var v=r(m[u]);f[v].references--}p=y(p,n);for(u=0;u<m.length;u++)v=r(m[u]),0===f[v].references&&(f[v].updater(),f.splice(v,1));m=p}}}}},h={};a.n=function(d){var k=d&&d.__esModule?function(){return d["default"]}:
function(){return d};return a.d(k,{a:k}),k};a.d=function(d,k){for(var q in k)a.o(k,q)&&!a.o(d,q)&&Object.defineProperty(d,q,{enumerable:!0,get:k[q]})};a.o=function(d,k){return Object.prototype.hasOwnProperty.call(d,k)};(function(){var d=function(){var b=this,e=b.$createElement,g=b._self._c||e;return g("div",{staticClass:"smiles-panel super"},[g("ul",{staticClass:"tabs"},b._l(b.categories,function(f){return g("li",{"class":{"tab-title":!0,active:f.id===b.active}},[g("a",{staticStyle:{padding:"3px 10px"},
on:{click:function(t){return b.change(f)}}},[g("img",{staticStyle:{width:"24px","vertical-align":"middle"},attrs:{src:b.getSmileUrl(parseInt(f.img_tab_smile))}})])])}),0),b._v(" "),g("div",{staticClass:"search"},[g("i",{staticClass:"fa fa-search"}),b._v(" "),g("input",{directives:[{name:"model",rawName:"v-model",value:b.search,expression:"search"}],attrs:{placeholder:"\u041f\u043e\u0438\u0441\u043a \u043f\u043e \u0441\u043c\u0430\u0439\u043b\u0430\u043c"},domProps:{value:b.search},on:{input:[function(f){f.target.composing||
(b.search=f.target.value)},b.onSearch]}})]),b._v(" "),g("div",{staticClass:"tabs-content",staticStyle:{"background-color":"rgb(13, 14, 16)"}},[g("div",[b._l(b.currentSmiles,function(f){return g("div",b._b({staticClass:"smile-content",staticStyle:{display:"inline-block",margin:"3px"}},"div",f.symbol,!1),[g("a",{on:{contextmenu:function(t){return t.preventDefault(),b.favoritesChange(f)},click:function(t){return t.preventDefault(),b.insertSmile(f)}}},[g("img",{staticStyle:{"max-height":"32px","max-width":"32px"},
attrs:{src:b.getSmileUrl(f)}})])])}),b._v(" "),"favorites"!==b.active||b.currentSmiles.length?b._e():g("div",{staticClass:"favorites"},[b._v("\n        \u0422\u0443\u0442 \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u0441\u044f \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0441\u043c\u0430\u0439\u043b\u044b. \u0414\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043e\u0435 \u043d\u0430\u0436\u043c\u0438 \u043f\u043e \u0441\u043c\u0430\u0439\u043b\u0443 "),
g("span",[b._v("\u043f\u0440\u0430\u0432\u043e\u0439 \u043a\u043d\u043e\u043f\u043a\u043e\u0439")]),b._v(" \u043c\u044b\u0448\u0438\n      ")])],2)])])};d._withStripped=!0;var k={"X-Requested-With":"XMLHttpRequest"},q=function(b,e){var g;return $jscomp.asyncExecutePromiseGeneratorProgram(function(f){return 1==f.nextAddress?f.yield(fetch(b,{method:e?"POST":"GET",headers:k,body:e?JSON.stringify(e):null}),2):3!=f.nextAddress?(g=f.yieldResult,f.yield(g.json(),3)):f["return"](f.yieldResult)})},r=Object.assign({},
{favoriteEmoticons:!0,favoriteEmoticonsList:[],emoticonsActive:"6"},JSON.parse(localStorage.getItem("SuperMegaUltraScriptConfig"))||{}),y=function(){localStorage.setItem("SuperMegaUltraScriptConfig",JSON.stringify(r))},B=a(379);B=a.n(B);var C=a(349);B()(C.Z,{insert:"head",singleton:!1});C.Z.locals;d=function(b,e,g,f,t,w,z,D){g="function"==typeof b?b.options:b;e&&(g.render=e,g.staticRenderFns=[],g._compiled=!0);g._scopeId="data-v-7ba5bd90";return{exports:b,options:g}}({mounted:function(){var b=this,
e;return $jscomp.asyncExecutePromiseGeneratorProgram(function(g){if(1==g.nextAddress)return g.yield(function(){return $jscomp.asyncExecutePromiseGeneratorProgram(function(f){return 1==f.nextAddress?f.yield(q("/replies/get_smiles"),2):f["return"](f.yieldResult)})}(),2);if(3!=g.nextAddress)return e=g.yieldResult,b.categories=e.smiles.categories,b.categories.push({id:"ban",name:"\u0417\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043a\u0430",img_tab_smile:"1388",date_created:null}),b.categories.push({id:"bttv",
name:"bttv",img_tab_smile:"1078",date_created:null}),b.categories.push({id:"favorites",name:"\u0418\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435",img_tab_smile:"729",date_created:null}),b.smiles=e.smiles.smiles,b.all=Object.values(b.smiles).flat(),b.smiles.ban=b.all.filter(function(f){return"0"===f.visible}),b.smiles.bttv=[],b.smiles.favorites=r.favoriteEmoticonsList,g.yield(b.change(b.categories.find(function(f){return f.id===b.active})),3);g.jumpToEnd()})},data:function(){return{_active:r.emoticonsActive,
active:r.emoticonsActive,categories:[],smiles:[],all:[],currentSmiles:[],search:"",bttvOffset:0}},methods:{onSearch:function(b){var e=this,g,f;return $jscomp.asyncExecutePromiseGeneratorProgram(function(t){switch(t.nextAddress){case 1:if(!(console.log(e.search),2<e.search.length&&"search"!==e.active&&(e._active=e.active,e.active="search"),2<e.search.length&&"search"===e.active)){t.jumpTo(2);break}return"bttv"===e._active?(f=e,t.yield(e.searchBttv(),6)):t.yield(function(w){return $jscomp.asyncExecutePromiseGeneratorProgram(function(z){return 1==
z.nextAddress?(console.log("search",w),z.yield(q("/forum/api/forum/getSmiles_textarea",{query:w}),2)):z["return"](z.yieldResult)})}(e.search),5);case 5:g=t.yieldResult;e.currentSmiles=g.map(function(w){return w.filename=w.path,w.symbol=w.smile,w.forum_count=1,w});t.jumpTo(2);break;case 6:f.currentSmiles=t.yieldResult;case 2:3>e.search.length&&"search"===e.active&&(e.active=e._active,e.bttvOffset=0,e.currentSmiles=e.smiles[e.active]),t.jumpToEnd()}})},favoritesChange:function(b){var e=b.symbol,g=this.isSmileBttv(b)?
b.filename:"/img/forum/emoticons/"+b.filename;b=r.favoriteEmoticonsList.findIndex(function(f){return f.f===g});-1<b?(Utils.notify("\u0421\u043c\u0430\u0439\u043b \u0443\u0434\u0430\u043b\u0435\u043d \u0438\u0437 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e","success",1E3),r.favoriteEmoticonsList.splice(b,1),"favorites"===this.active&&this.currentSmiles.splice(b,1),y()):(Utils.notify("\u0421\u043c\u0430\u0439\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u0438\u0437\u0431\u0440\u0430\u043d\u043d\u043e\u0435",
"success",1E3),r.favoriteEmoticonsList.push({s:e,f:g}))},loadBttv:function(){var b=this,e,g,f,t;return $jscomp.asyncExecutePromiseGeneratorProgram(function(w){if(1==w.nextAddress)return w.yield(function(z){z=void 0===z?0:z;return $jscomp.asyncExecutePromiseGeneratorProgram(function(D){return 1==D.nextAddress?D.yield(q("https://api.betterttv.net/3/emotes/shared/top?offset="+z+"&limit=100"),2):D["return"](D.yieldResult)})}(b.bttvOffset),2);e=w.yieldResult;g=$jscomp.makeIterator(e);for(f=g.next();!f.done;f=
g.next())t=f.value,b.smiles.bttv.push({symbol:1,filename:"https://cdn.betterttv.net/emote/"+t.emote.id+"/2x"});b.bttvOffset+=100;w.jumpToEnd()})},searchBttv:function(){var b=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(e){return 1==e.nextAddress?e.yield(function(g,f){f=void 0===f?0:f;return $jscomp.asyncExecutePromiseGeneratorProgram(function(t){return 1==t.nextAddress?t.yield(q("https://api.betterttv.net/3/emotes/shared/search?query="+g+"&offset="+f+"&limit=100"),2):t["return"](t.yieldResult)})}(b.search,
0),2):e["return"](e.yieldResult.map(function(g){return g.filename="https://cdn.betterttv.net/emote/"+g.id+"/2x",g.symbol=g.code,g}))})},change:function(b){var e=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(g){switch(g.nextAddress){case 1:if("bttv"!==b.id||e.smiles.bttv.length){g.jumpTo(2);break}return g.yield(e.loadBttv(),3);case 3:return g.yield(e.loadBttv(),4);case 4:return g.yield(e.loadBttv(),5);case 5:case 2:"favorites"===b.id&&(e.smiles.favorites=r.favoriteEmoticonsList.map(function(f){return f.symbol=
f.s,f.filename=f.f,f})),e.active=b.id,r.emoticonsActive=b.id,y(),e.currentSmiles=e.smiles[e.active],g.jumpToEnd()}})},isSmileBttv:function(b){return!b.forum_count},insertSmile:function(b){this.isSmileBttv(b)?tinyMCE.activeEditor.insertContent('<img alt="Smiley face" height="32" width="42" src="'+b.filename+'"/>'):tinyMCE.activeEditor.plugins.smileys.insert(b.symbol,this.getSmileUrl(b))},getSmileUrl:function(b){return"number"==typeof b?"/img/forum/emoticons/"+this.findSmileById(b.toString()).filename:
"object"==typeof b?this.isSmileBttv(b)?b.filename:"/img/forum/emoticons/"+b.filename:void 0},findSmileById:function(b){return this.all.find(function(e){return e.id===b})}}},d);d.options.__file="src/App.vue";var A=d.exports;new function(){"version"in this?Object.defineProperty(this,"version",{value:.1,enumerable:!0,configurable:!0,writable:!0}):this.version=.1;$("body").on("DOMNodeInserted",function(b){"smiles-panel"===b.target.className&&new Vue({el:b.target,render:function(e){return e(A)}})})}})()})();