WordPress/wp-includes/js/twemoji.min.js

1 line
11 KiB
JavaScript
Raw Normal View History

var twemoji=function(){"use strict";var f={base:"https://twemoji.maxcdn.com/v/12.1.2/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:function(d){var u="string"==typeof d?parseInt(d,16):d;if(u<65536)return a(u);return a(55296+((u-=65536)>>10),56320+(1023&u))},toCodePoint:i},onerror:function(){this.parentNode&&this.parentNode.replaceChild(C(this.alt,!1),this)},parse:function(d,u){u&&"function"!=typeof u||(u={callback:u});return("string"==typeof d?function(d,b){return o(d,function(d){var u,f,c=d,e=N(d),a=b.callback(e,b);if(e&&a){for(f in c="<img ".concat('class="',b.className,'" ','draggable="false" ','alt="',d,'"',' src="',a,'"'),u=b.attributes(d,e))u.hasOwnProperty(f)&&0!==f.indexOf("on")&&-1===c.indexOf(" "+f+"=")&&(c=c.concat(" ",f,'="',u[f].replace(t,r),'"'));c=c.concat("/>")}return c})}:function(d,u){var f,c,e,a,b,t,r,n,o,i,s,l,p,m=function d(u,f){var c,e,a=u.childNodes,b=a.length;for(;b--;)c=a[b],3===(e=c.nodeType)?f.push(c):1!==e||"ownerSVGElement"in c||x.test(c.nodeName.toLowerCase())||d(c,f);return f}(d,[]),h=m.length;for(;h--;){for(e=!1,a=document.createDocumentFragment(),b=m[h],t=b.nodeValue,n=0;r=g.exec(t);){if((o=r.index)!==n&&a.appendChild(C(t.slice(n,o),!0)),s=r[0],l=N(s),n=o+s.length,p=u.callback(l,u),l&&p){for(c in(i=new Image).onerror=u.onerror,i.setAttribute("draggable","false"),f=u.attributes(s,l))f.hasOwnProperty(c)&&0!==c.indexOf("on")&&!i.hasAttribute(c)&&i.setAttribute(c,f[c]);i.className=u.className,i.alt=s,i.src=p,e=!0,a.appendChild(i)}i||a.appendChild(C(s,!1)),i=null}e&&(n<t.length&&a.appendChild(C(t.slice(n),!0)),b.parentNode.replaceChild(a,b))}return d})(d,{callback:u.callback||b,attributes:"function"==typeof u.attributes?u.attributes:n,base:"string"==typeof u.base?u.base:f.base,ext:u.ext||f.ext,size:u.folder||function(d){return"number"==typeof d?d+"x"+d:d}(u.size||f.size),className:u.className||f.className,onerror:u.onerror||f.onerror})},replace:o,test:function(d){g.lastIndex=0;var u=g.test(d);return g.lastIndex=0,u}},u={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},g=/(?:\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c\udffb|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c\udffb|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c\udffb|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb\udffc]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udffd]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d])|(?:\ud83d[\udc68\udc69])(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6