Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../../chunk-Bmb41Sf3.cjs`);let t=require(`regex-combined-emojis`),n=require(`emoji-toolkit/emoji_strategy.json`);n=e.t(n);var r=new RegExp(t.emojiPattern,`g`),i=`9.0`,a=`https://cdn.jsdelivr.net/joypixels/assets/9.0/png/unicode/32/`,o=null,s=a,c=`.png`,l=a,u=`.png`,d=n.default,f=/(^| |(?<=:))(:\w+:)/g;function p(){return d}function m(e,t=`.png`){e.endsWith(`/`)||(e+=`/`),s=e,c=t}function h(e,t=`.svg`){e.endsWith(`/`)||(e+=`/`),l=e,u=t}function g(e){o=e}function _(e){v(e)}function v(e){let t=[`custom`,`date_added`,`image`],n=[`date_added`,`image`,`unicode_output`,`shortname`,`shortname_alternates`,`custom`,`name`],r=(e,n,r)=>{if(e[n]===void 0){if(!t.includes(n))return;e[n]=r}else Array.isArray(e[n])?e[n]=e[n].concat(r):e[n]=r};Object.entries(e).forEach(e=>{let[t,i]=e;if(t in d){let e=d[t];for(let t in i){let n=i[t];r(e,t,n)}}else n.every(e=>i[e]!==void 0)?d[t]=i:console.error(`The following custom emoji doesn't contain the required properties:`,i)})}function y(e){function t(r,i){if(!(!r||typeof r!=`object`)){if(`shortname`in r&&(r.shortname===e||r.shortname_alternates.includes(e)))return r.key=i,n=r,!0;Object.keys(r).some(function(e){return t(r[e],e)})}}let n;return t(p(),null),n}function b(e){return e.startsWith(`:`)?e:d[x(e)]?.shortname}function x(e){let t=``;for(let n of e){let e=n.codePointAt(0).toString(16).padStart(4,`0`);[`200d`,`fe0f`].includes(e)||(t!==``&&(t+=`-`),t+=e)}return t}function S(e){let t=e.split(`-`),n=``;return t.forEach(e=>{n+=String.fromCodePoint(parseInt(e,16))}),n}function C(e){if(e=e?.trim(),e.startsWith(`:`)&&e.endsWith(`:`))return y(e);{let t=x(e),n=d[t];return n&&(n.key=t),n}}function w(e){return T((e.match(f)||[]).map(e=>e.trim()))}function T(e){let t=e?e.filter(e=>y(e)):[];return new Set(t)}function E(e){let t=[...e.matchAll(r)],n=t.length?t.map(e=>e[0]):[];return new Set(n)}exports.codeToEmojiData=C,Object.defineProperty(exports,`customEmojiAssetUrl`,{enumerable:!0,get:function(){return o}}),exports.defaultEmojiAssetUrl=a,Object.defineProperty(exports,`emojiFileExtensionLarge`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`emojiFileExtensionSmall`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`emojiImageUrlLarge`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`emojiImageUrlSmall`,{enumerable:!0,get:function(){return s}}),exports.emojiJson=d,exports.emojiRegex=r,exports.emojiShortCodeRegex=f,exports.emojiVersion=i,exports.filterValidShortCodes=T,exports.findEmojis=E,exports.findShortCodes=w,exports.getEmojiData=p,exports.getEmojiShortCode=b,exports.setCustomEmojiJson=_,exports.setCustomEmojiUrl=g,exports.setEmojiAssetUrlLarge=h,exports.setEmojiAssetUrlSmall=m,exports.shortcodeToEmojiData=y,exports.stringToUnicode=S,exports.unicodeToString=x,exports.validateCustomEmojiJson=v;
//# sourceMappingURL=index.cjs.map