akkoma/priv/static/packs/emoji_picker.js

2 lines
501 KiB
JavaScript
Raw Normal View History

2018-09-20 10:10:13 -06:00
(window.webpackJsonp=window.webpackJsonp||[]).push([[32],{713:function(e,i,a){"use strict";a.r(i);var _=Object.assign||function(e){for(var i=1;i<arguments.length;i++){var a=arguments[i];for(var _ in a)Object.prototype.hasOwnProperty.call(a,_)&&(e[_]=a[_])}return e},g=Object.getPrototypeOf||function(e){return"function"==typeof(e=Object(e)).constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Object.prototype:null},s=a(6),n=a.n(s),o=Object,h=function(){function e(e,i){for(var a=0;a<i.length;a++){var _=i[a];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),o.defineProperty(e,_.key,_)}}return function(i,a,_){return a&&e(i.prototype,a),_&&e(i,_),i}}();function m(e,i){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!i||"object"!=typeof i&&"function"!=typeof i?e:i}var F=Object;function t(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Super expression must either be null or a function, not "+typeof i);e.prototype=F.create(i&&i.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),i&&(F.setPrototypeOf?F.setPrototypeOf(e,i):e.__proto__=i)}var f=a(1),d=a.n(f),l=a(741),r=(a(763),a(2)),u=a.n(r),c="emoji-mart",p=JSON,b="undefined"!=typeof window&&"localStorage"in window,k=void 0,D=void 0;function w(e,i){if(D)D(e,i);else{if(!b)return;try{window.localStorage[c+"."+e]=p.stringify(i)}catch(e){}}}var y={update:function(e){for(var i in e)w(i,e[i])},set:w,get:function(e){if(k)return k(e);if(b){try{var i=window.localStorage[c+"."+e]}catch(e){return}return i?JSON.parse(i):void 0}},setNamespace:function(e){c=e},setHandlers:function(e){e||(e={}),k=e.getter,D=e.setter}},j=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart","poop"],E=void 0,C=void 0,x={};function q(){C=!0,E=y.get("frequently")}var B={add:function(e){C||q();var i=e.id;E||(E=x),E[i]||(E[i]=0),E[i]+=1,y.set("last",i),y.set("frequently",E)},get:function(e){if(C||q(),!E){x={};for(var i=[],a=0;a<e;a++)x[j[a]]=e-a,i.push(j[a]);return i}var _=4*e,g=[];for(var s in E)E.hasOwnProperty(s)&&g.push(s);var n=g.sort(function(e,i){return E[e]-E[i]}).reverse().slice(0,_),o=y.get("last");return o&&-1==n.indexOf(o)&&(n.pop(),n.push(o)),n}},v=a(762),S=a.n(v),A=a(736),M=String.fromCodePoint||function(){var e,i,a=[],_=-1,g=arguments.length;if(!g)return"";for(var s="";++_<g;){var n=Number(arguments[_]);if(!isFinite(n)||n<0||n>1114111||Math.floor(n)!=n)throw RangeError("Invalid code point: "+n);n<=65535?a.push(n):(e=55296+((n-=65536)>>10),i=n%1024+56320,a.push(e,i)),(_+1===g||a.length>16384)&&(s+=String.fromCharCode.apply(null,a),a.length=0)}return s},P=JSON,T=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/,R=["1F3FA","1F3FB","1F3FC","1F3FD","1F3FE","1F3FF"];function z(e){var i=e.split("-").map(function(e){return"0x"+e});return M.apply(null,i)}function O(){return e=H.apply(void 0,arguments),i=e.name,a=e.short_names,_=e.skin_tone,g=e.skin_variations,s=e.emoticons,n=e.unified,o=e.custom,h=e.imageUrl,m=e.id||a[0],F=":"+m+":",o?{id:m,name:i,colons:F,emoticons:s,custom:o,imageUrl:h}:(_&&(F+=":skin-tone-"+_+":"),{id:m,name:i,colons:F,emoticons:s,unified:n.toLowerCase(),skin:_||(g?1:null),native:z(n)});var e,i,a,_,g,s,n,o,h,m,F}function H(e,i,a,_){var g={};if("string"==typeof e){var s=e.match(T);if(s&&(e=s[1],s[2]&&(i=parseInt(s[2],10))),_.aliases.hasOwnProperty(e)&&(e=_.aliases[e]),!_.emojis.hasOwnProperty(e))return null;g=_.emojis[e]}else e.id&&(_.aliases.hasOwnProperty(e.id)&&(e.id=_.aliases[e.id]),_.emojis.hasOwnProperty(e.id)&&(g=_.emojis[e.id],i||(i=e.skin)));if(S()(g).length||((g=e).custom=!0,g.search||(g.search=Object(A.buildSearch)(e))),g.emoticons||(g.emoticons=[]),g.variations||(g.variations=[]),g.skin_variations&&i>1&&a){g=JSON.parse(P.stringify(g));var n=R[i-1],o=g.skin_variations[n];if(!o.variations&&g.variations&&delete g.variations,void 0==o["has_img_"+a]||o["has_img_"+a])for(var h in g.skin_tone=i,o){var m=o[h];g[h]=m}}return g.vari
//# sourceMappingURL=emoji_picker.js.map