diff --git a/extensions/emoji/js/dist/forum.js b/extensions/emoji/js/dist/forum.js index d6b52e6c40..30cf64039d 100644 --- a/extensions/emoji/js/dist/forum.js +++ b/extensions/emoji/js/dist/forum.js @@ -1,3 +1,3 @@ /*! For license information please see forum.js.LICENSE.txt */ -(()=>{var d,u,f={},e={};function c(d){var u=e[d];if(void 0!==u)return u.exports;var t=e[d]={exports:{}};return f[d](t,t.exports,c),t.exports}c.m=f,c.n=d=>{var u=d&&d.__esModule?()=>d.default:()=>d;return c.d(u,{a:u}),u},c.d=(d,u)=>{for(var f in u)c.o(u,f)&&!c.o(d,f)&&Object.defineProperty(d,f,{enumerable:!0,get:u[f]})},c.f={},c.e=d=>Promise.all(Object.keys(c.f).reduce(((u,f)=>(c.f[f](d,u),u)),[])),c.u=d=>"forum/emojiMap.js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(d){if("object"==typeof window)return window}}(),c.o=(d,u)=>Object.prototype.hasOwnProperty.call(d,u),d={},u="module.exports:",c.l=(f,e,t,o)=>{if(d[f])d[f].push(e);else{var r,n;if(void 0!==t)for(var a=document.getElementsByTagName("script"),i=0;i{r.onerror=r.onload=null,clearTimeout(m);var c=d[f];if(delete d[f],r.parentNode&&r.parentNode.removeChild(r),c&&c.forEach((d=>d(e))),u)return u(e)},m=setTimeout(b.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=b.bind(null,r.onerror),r.onload=b.bind(null,r.onload),n&&document.head.appendChild(r)}},c.r=d=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})},(()=>{var d;c.g.importScripts&&(d=c.g.location+"");var u=c.g.document;if(!d&&u&&(u.currentScript&&(d=u.currentScript.src),!d)){var f=u.getElementsByTagName("script");f.length&&(d=f[f.length-1].src)}if(!d)throw new Error("Automatic publicPath is not supported in this browser");d=d.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=d})(),c.f.compat=(d,u)=>{const f=c.l;c.l=flarum.reg.loadChunk.bind(flarum.reg,f)},(()=>{var d={315:0};c.f.j=(u,f)=>{var e=c.o(d,u)?d[u]:void 0;if(0!==e)if(e)f.push(e[2]);else{var t=new Promise(((f,c)=>e=d[u]=[f,c]));f.push(e[2]=t);var o=c.p+c.u(u),r=new Error;c.l(o,(f=>{if(c.o(d,u)&&(0!==(e=d[u])&&(d[u]=void 0),e)){var t=f&&("load"===f.type?"missing":f.type),o=f&&f.target&&f.target.src;r.message="Loading chunk "+u+" failed.\n("+t+": "+o+")",r.name="ChunkLoadError",r.type=t,r.request=o,e[1](r)}}),"chunk-"+u,u)}};var u=(u,f)=>{var e,t,[o,r,n]=f,a=0;if(o.some((u=>0!==d[u]))){for(e in r)c.o(r,e)&&(c.m[e]=r[e]);n&&n(c)}for(u&&u(f);a{"use strict";c.r(t);const d=flarum.reg.get("core","forum/app");var u=c.n(d);const f=flarum.reg.get("core","common/extend"),e=flarum.reg.get("core","common/components/TextEditorButton");var o=c.n(e);const r=flarum.reg.get("core","common/utils/KeyboardNavigatable");var n=c.n(r);const a=flarum.reg.get("core","common/components/Tooltip");var i=c.n(a);function s(d){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(d){return typeof d}:function(d){return d&&"function"==typeof Symbol&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},s(d)}function b(d,u,f){return(u=function(d){var u=function(d,u){if("object"!==s(d)||null===d)return d;var f=d[Symbol.toPrimitive];if(void 0!==f){var e=f.call(d,u);if("object"!==s(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(d)}(d,"string");return"symbol"===s(u)?u:String(u)}(u))in d?Object.defineProperty(d,u,{value:f,enumerable:!0,configurable:!0,writable:!0}):d[u]=f,d}const l=flarum.reg.get("core","common/Fragment");var p=c.n(l);class h extends(p()){constructor(){super(...arguments),b(this,"items",[]),b(this,"active",!1),b(this,"index",0),b(this,"keyWasJustPressed",!1)}view(){return m("ul",{className:"Dropdown-menu EmojiDropdown"},m("li",{className:"Dropdown-header"},app.translator.trans("flarum-emoji.forum.composer.type_to_search_text")),this.items.map((d=>m("li",{key:d.attrs.key},d))))}show(d,u){this.$().show().css({left:d+"px",top:u+"px"}),this.active=!0}hide(){this.$().hide(),this.active=!1}navigate(d){this.keyWasJustPressed=!0,this.setIndex(this.index+d,!0),clearTimeout(this.keyWasJustPressedTimeout),this.keyWasJustPressedTimeout=setTimeout((()=>this.keyWasJustPressed=!1),500)}complete(){this.$("li:not(.Dropdown-header)").eq(this.index).find("button").click()}setIndex(d,u){if(this.keyWasJustPressed&&!u)return;const f=this.$(),e=f.find("li:not(.Dropdown-header)");let c=d;c<0?c=e.length-1:c>=e.length&&(c=0),this.index=c;const t=e.removeClass("active").eq(c).addClass("active");if(u){const d=f.scrollTop(),u=f.offset().top,e=u+f.outerHeight(),c=t.offset().top,o=c+t.outerHeight();let r;ce&&(r=d-e+o+parseInt(f.css("padding-bottom"),10)),void 0!==r&&f.stop(!0).animate({scrollTop:r},100)}}}flarum.reg.add("flarum-emoji","forum/fragments/AutocompleteDropdown",h);var g=function(){var d={base:"https://twemoji.maxcdn.com/v/14.0.2/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:function(d){var u="string"==typeof d?parseInt(d,16):d;return u<65536?r(u):r(55296+((u-=65536)>>10),56320+(1023&u))},toCodePoint:g},onerror:function(){this.parentNode&&this.parentNode.replaceChild(n(this.alt,!1),this)},parse:function(u,f){return f&&"function"!=typeof f||(f={callback:f}),("string"==typeof u?m:b)(u,{callback:f.callback||a,attributes:"function"==typeof f.attributes?f.attributes:p,base:"string"==typeof f.base?f.base:d.base,ext:f.ext||d.ext,size:f.folder||(e=f.size||d.size,"number"==typeof e?e+"x"+e:e),className:f.className||d.className,onerror:f.onerror||d.onerror});var e},replace:h,test:function(d){f.lastIndex=0;var u=f.test(d);return f.lastIndex=0,u}},u={"&":"&","<":"<",">":">","'":"'",'"':"""},f=/(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\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\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\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\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\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\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\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\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83e\udef1\ud83c\udffb\u200d\ud83e\udef2\ud83c[\udffc-\udfff]|\ud83e\udef1\ud83c\udffc\u200d\ud83e\udef2\ud83c[\udffb\udffd-\udfff]|\ud83e\udef1\ud83c\udffd\u200d\ud83e\udef2\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\udef1\ud83c\udffe\u200d\ud83e\udef2\ud83c[\udffb-\udffd\udfff]|\ud83e\udef1\ud83c\udfff\u200d\ud83e\udef2\ud83c[\udffb-\udffe]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83e\udd1d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc8f\udc91]|\ud83e\udd1d)|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\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[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd\udec3-\udec5\udef0-\udef6]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udedd-\udedf\udeeb\udeec\udef4-\udefc\udfe0-\udfeb\udff0]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78-\uddb4\uddb7\uddba\uddbc-\uddcc\uddd0\uddde-\uddff\ude70-\ude74\ude78-\ude7c\ude80-\ude86\ude90-\udeac\udeb0-\udeba\udec0-\udec2\uded0-\uded9\udee0-\udee7]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g,e=/\uFE0F/g,c=String.fromCharCode(8205),t=/[&<>'"]/g,o=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,r=String.fromCharCode;return d;function n(d,u){return document.createTextNode(u?d.replace(e,""):d)}function a(d,u){return"".concat(u.base,u.size,"/",d,u.ext)}function i(d,u){for(var f,e,c=d.childNodes,t=c.length;t--;)3===(e=(f=c[t]).nodeType)?u.push(f):1!==e||"ownerSVGElement"in f||o.test(f.nodeName.toLowerCase())||i(f,u);return u}function s(d){return g(d.indexOf(c)<0?d.replace(e,""):d)}function b(d,u){for(var e,c,t,o,r,a,b,m,l,p,h,g,w,v=i(d,[]),j=v.length;j--;){for(t=!1,o=document.createDocumentFragment(),a=(r=v[j]).nodeValue,m=0;b=f.exec(a);){if((l=b.index)!==m&&o.appendChild(n(a.slice(m,l),!0)),g=s(h=b[0]),m=l+h.length,w=u.callback(g,u),g&&w){for(c in(p=new Image).onerror=u.onerror,p.setAttribute("draggable","false"),e=u.attributes(h,g))e.hasOwnProperty(c)&&0!==c.indexOf("on")&&!p.hasAttribute(c)&&p.setAttribute(c,e[c]);p.className=u.className,p.alt=h,p.src=w,t=!0,o.appendChild(p)}p||o.appendChild(n(h,!1)),p=null}t&&(m")}return c}))}function l(d){return u[d]}function p(){return null}function h(d,u){return String(d).replace(f,u)}function g(d,u){for(var f=[],e=0,c=0,t=0;t({loading:"lazy"})};u().initializers.add("flarum-emoji",(()=>{!function(){let d=null;(0,f.extend)("flarum/common/components/TextEditor","oninit",(function(){this._loaders.push((async()=>await c.e(411).then(c.bind(c,948)).then((u=>d=u.default)))),this.commonEmoji=["😀","😁","😂","😃","😄","😅","😆","😇","😈","😉","😊","😋","😌","😍","😎","😏","😐️","😑","😒","😓","😔","😕","😖","😗","😘","😙","😚","😛","😜","😝","😞","😟","😠","😡","😢","😣","😤","😥","😦","😧","😨","😩","😪","😫","😬","😭","😮","😮‍💨","😯","😰","😱","😲","😳","😴","😵","😵‍💫","😶","😶‍🌫️","😷","😸","😹","😺","😻","😼","😽","😾","😿","🙀","🙁","🙂","🙃","🙄"]})),(0,f.extend)("flarum/common/components/TextEditor","onbuild",(function(){this.emojiDropdown=new h;const d=this.$(".TextEditor-editor").wrap('
');this.navigator=new(n()),this.navigator.when((()=>this.emojiDropdown.active)).onUp((()=>this.emojiDropdown.navigate(-1))).onDown((()=>this.emojiDropdown.navigate(1))).onSelect(this.emojiDropdown.complete.bind(this.emojiDropdown)).onCancel(this.emojiDropdown.hide.bind(this.emojiDropdown)).bindTo(d),d.after($('
'))})),(0,f.extend)("flarum/common/components/TextEditor","buildEditorParams",(function(u){const f=Object.keys(d);let e,c,t;const o=d=>{this.attrs.composer.editor.replaceBeforeCursor(c-1,d+" "),this.emojiDropdown.hide()};u.inputListeners.push((()=>{const u=this.attrs.composer.editor.getSelectionRange(),r=u[0];if(u[1]-r>0)return;const n=this.attrs.composer.editor.getLastNChars(15);c=0;for(let d=n.length-1;d>=0;d--){const u=n.substr(d,1);if(!/[a-z0-9]|\+|\-|_|\:/.test(u))break;if(":"===u&&(0==d||/\s/.test(n.substr(d-1,1)))){e=d+1,c=r-n.length+d+1;break}}if(this.emojiDropdown.hide(),this.emojiDropdown.active=!1,c){t=n.substring(e).toLowerCase();const u=function(d){let{emoji:u,name:f,code:e}=d;return m(i(),{text:f},m("button",{key:u,onclick:()=>o(u),onmouseenter:function(){this.emojiDropdown.setIndex($(this).parent().index()-1)}},m("img",{alt:u,className:"emoji",draggable:"false",loading:"lazy",src:"".concat(k,"72x72/").concat(e,".png"),title:f})))};(()=>{const e=[],o=function(d){const u=new RegExp("\\((["+"+.*?[]{}()^$|\\".replace(/(.)/g,"\\$1")+"])\\)","g");return new RegExp("(.*)"+d.toLowerCase().replace(/(.)/g,"($1)(.*?)").replace(u,"(\\$1)")+"$","i")}(t);let r=40;const n=u=>{for(let c=0;c0;c++){const t=f[c];if(-1===e.indexOf(t)){const f=d[t];for(let d of f)if(u(d,t)){--r,e.push(t);break}}}};n(((d,u)=>{var f;return t?0===d.indexOf(t):null==(f=this.commonEmoji)?void 0:f.includes(u)})),n((d=>o.test(d)));const a=e.map((u=>({emoji:u,name:d[u][0],code:y(u)}))).map(u);if(a.length){this.emojiDropdown.items=a,m.render(this.$(".ComposerBody-emojiDropdownContainer")[0],this.emojiDropdown.render()),this.emojiDropdown.show();const d=this.attrs.composer.editor.getCaretCoordinates(c),u=this.emojiDropdown.$().outerWidth(),f=this.emojiDropdown.$().outerHeight(),e=this.emojiDropdown.$().offsetParent();let t=d.left,o=d.top+15;o+f>e.height()&&(o=d.top-f-15),t+u>e.width()&&(t=e.width()-u),o=Math.max(-(e.offset().top-$(document).scrollTop()),o),t=Math.max(-e.offset().left,t),this.emojiDropdown.show(t,o)}})(),this.emojiDropdown.setIndex(0),this.emojiDropdown.$().scrollTop(0),this.emojiDropdown.active=!0}}))})),(0,f.extend)("flarum/common/components/TextEditor","toolbarItems",(function(d){d.add("emoji",m(o(),{onclick:()=>this.attrs.composer.editor.insertAtCursor(" :"),icon:"far fa-smile"},app.translator.trans("flarum-emoji.forum.composer.emoji_tooltip")))}))}(),(0,f.override)(D().prototype,"contentHtml",(function(d){const u=d();if(this.oldContentHtml!==u){const d=w.parse(function(d){const u=document.implementation.createHTMLDocument();return u.body.innerHTML=d,u.body}(u),T);this.emojifiedContentHtml=d.innerHTML,this.oldContentHtml=u}return this.emojifiedContentHtml})),(0,f.override)(s9e.TextFormatter,"preview",((d,u,f)=>{d(u,f),w.parse(f,T)}))}))})(),module.exports=t})(); +(()=>{var d,u,f={},e={};function c(d){var u=e[d];if(void 0!==u)return u.exports;var t=e[d]={exports:{}};return f[d](t,t.exports,c),t.exports}c.m=f,c.n=d=>{var u=d&&d.__esModule?()=>d.default:()=>d;return c.d(u,{a:u}),u},c.d=(d,u)=>{for(var f in u)c.o(u,f)&&!c.o(d,f)&&Object.defineProperty(d,f,{enumerable:!0,get:u[f]})},c.f={},c.e=d=>Promise.all(Object.keys(c.f).reduce(((u,f)=>(c.f[f](d,u),u)),[])),c.u=d=>"forum/emojiMap.js",c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(d){if("object"==typeof window)return window}}(),c.o=(d,u)=>Object.prototype.hasOwnProperty.call(d,u),d={},u="module.exports:",c.l=(f,e,t,o)=>{if(d[f])d[f].push(e);else{var r,n;if(void 0!==t)for(var a=document.getElementsByTagName("script"),i=0;i{r.onerror=r.onload=null,clearTimeout(m);var c=d[f];if(delete d[f],r.parentNode&&r.parentNode.removeChild(r),c&&c.forEach((d=>d(e))),u)return u(e)},m=setTimeout(b.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=b.bind(null,r.onerror),r.onload=b.bind(null,r.onload),n&&document.head.appendChild(r)}},c.r=d=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})},(()=>{var d;c.g.importScripts&&(d=c.g.location+"");var u=c.g.document;if(!d&&u&&(u.currentScript&&(d=u.currentScript.src),!d)){var f=u.getElementsByTagName("script");f.length&&(d=f[f.length-1].src)}if(!d)throw new Error("Automatic publicPath is not supported in this browser");d=d.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),c.p=d})(),c.f.compat=(d,u)=>{const f=c.l;c.l=flarum.reg.loadChunk.bind(flarum.reg,f)},(()=>{var d={315:0};c.f.j=(u,f)=>{var e=c.o(d,u)?d[u]:void 0;if(0!==e)if(e)f.push(e[2]);else{var t=new Promise(((f,c)=>e=d[u]=[f,c]));f.push(e[2]=t);var o=c.p+c.u(u),r=new Error;c.l(o,(f=>{if(c.o(d,u)&&(0!==(e=d[u])&&(d[u]=void 0),e)){var t=f&&("load"===f.type?"missing":f.type),o=f&&f.target&&f.target.src;r.message="Loading chunk "+u+" failed.\n("+t+": "+o+")",r.name="ChunkLoadError",r.type=t,r.request=o,e[1](r)}}),"chunk-"+u,u)}};var u=(u,f)=>{var e,t,[o,r,n]=f,a=0;if(o.some((u=>0!==d[u]))){for(e in r)c.o(r,e)&&(c.m[e]=r[e]);n&&n(c)}for(u&&u(f);a{"use strict";c.r(t);const d=flarum.reg.get("core","forum/app");var u=c.n(d);const f=flarum.reg.get("core","common/extend"),e=flarum.reg.get("core","common/components/TextEditorButton");var o=c.n(e);const r=flarum.reg.get("core","common/utils/KeyboardNavigatable");var n=c.n(r);const a=flarum.reg.get("core","common/components/Tooltip");var i=c.n(a);const s=flarum.reg.get("core","common/utils/AutocompleteReader");var b=c.n(s);function l(d){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(d){return typeof d}:function(d){return d&&"function"==typeof Symbol&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},l(d)}function p(d,u,f){return(u=function(d){var u=function(d,u){if("object"!==l(d)||null===d)return d;var f=d[Symbol.toPrimitive];if(void 0!==f){var e=f.call(d,u);if("object"!==l(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(d)}(d,"string");return"symbol"===l(u)?u:String(u)}(u))in d?Object.defineProperty(d,u,{value:f,enumerable:!0,configurable:!0,writable:!0}):d[u]=f,d}const h=flarum.reg.get("core","common/Fragment");var g=c.n(h);class w extends(g()){constructor(){super(...arguments),p(this,"items",[]),p(this,"active",!1),p(this,"index",0),p(this,"keyWasJustPressed",!1)}view(){return m("ul",{className:"Dropdown-menu EmojiDropdown"},m("li",{className:"Dropdown-header"},app.translator.trans("flarum-emoji.forum.composer.type_to_search_text")),this.items.map((d=>m("li",{key:d.attrs.key},d))))}show(d,u){this.$().show().css({left:d+"px",top:u+"px"}),this.active=!0}hide(){this.$().hide(),this.active=!1}navigate(d){this.keyWasJustPressed=!0,this.setIndex(this.index+d,!0),clearTimeout(this.keyWasJustPressedTimeout),this.keyWasJustPressedTimeout=setTimeout((()=>this.keyWasJustPressed=!1),500)}complete(){this.$("li:not(.Dropdown-header)").eq(this.index).find("button").click()}setIndex(d,u){if(this.keyWasJustPressed&&!u)return;const f=this.$(),e=f.find("li:not(.Dropdown-header)");let c=d;c<0?c=e.length-1:c>=e.length&&(c=0),this.index=c;const t=e.removeClass("active").eq(c).addClass("active");if(u){const d=f.scrollTop(),u=f.offset().top,e=u+f.outerHeight(),c=t.offset().top,o=c+t.outerHeight();let r;ce&&(r=d-e+o+parseInt(f.css("padding-bottom"),10)),void 0!==r&&f.stop(!0).animate({scrollTop:r},100)}}}flarum.reg.add("flarum-emoji","forum/fragments/AutocompleteDropdown",w);var v=function(){var d={base:"https://twemoji.maxcdn.com/v/14.0.2/",ext:".png",size:"72x72",className:"emoji",convert:{fromCodePoint:function(d){var u="string"==typeof d?parseInt(d,16):d;return u<65536?r(u):r(55296+((u-=65536)>>10),56320+(1023&u))},toCodePoint:g},onerror:function(){this.parentNode&&this.parentNode.replaceChild(n(this.alt,!1),this)},parse:function(u,f){return f&&"function"!=typeof f||(f={callback:f}),("string"==typeof u?m:b)(u,{callback:f.callback||a,attributes:"function"==typeof f.attributes?f.attributes:p,base:"string"==typeof f.base?f.base:d.base,ext:f.ext||d.ext,size:f.folder||(e=f.size||d.size,"number"==typeof e?e+"x"+e:e),className:f.className||d.className,onerror:f.onerror||d.onerror});var e},replace:h,test:function(d){f.lastIndex=0;var u=f.test(d);return f.lastIndex=0,u}},u={"&":"&","<":"<",">":">","'":"'",'"':"""},f=/(?:\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83d\udc68\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\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\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\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\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\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\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc68\ud83c[\udffb-\udfff]|\ud83d\udc69\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83d\udc69\ud83c[\udffb-\udfff]|\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\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffc-\udfff]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffd-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffd\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\u2764\ufe0f\u200d\ud83e\uddd1\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83e\udef1\ud83c\udffb\u200d\ud83e\udef2\ud83c[\udffc-\udfff]|\ud83e\udef1\ud83c\udffc\u200d\ud83e\udef2\ud83c[\udffb\udffd-\udfff]|\ud83e\udef1\ud83c\udffd\u200d\ud83e\udef2\ud83c[\udffb\udffc\udffe\udfff]|\ud83e\udef1\ud83c\udffe\u200d\ud83e\udef2\ud83c[\udffb-\udffd\udfff]|\ud83e\udef1\ud83c\udfff\u200d\ud83e\udef2\ud83c[\udffb-\udffe]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d\udc8f\ud83c[\udffb-\udfff]|\ud83d\udc91\ud83c[\udffb-\udfff]|\ud83e\udd1d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d\udc8f\udc91]|\ud83e\udd1d)|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf7c\udf84\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[\udc6e\udc70\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd4\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83d\ude36\u200d\ud83c\udf2b\ufe0f|\u2764\ufe0f\u200d\ud83d\udd25|\u2764\ufe0f\u200d\ud83e\ude79|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc3b\u200d\u2744\ufe0f|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83d\ude2e\u200d\ud83d\udca8|\ud83d\ude35\u200d\ud83d\udcab|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f|\ud83d\udc08\u200d\u2b1b)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0c\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\udd77\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd\udec3-\udec5\udef0-\udef6]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udc8e\udc90\udc92-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5-\uded7\udedd-\udedf\udeeb\udeec\udef4-\udefc\udfe0-\udfeb\udff0]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd76\udd78-\uddb4\uddb7\uddba\uddbc-\uddcc\uddd0\uddde-\uddff\ude70-\ude74\ude78-\ude7c\ude80-\ude86\ude90-\udeac\udeb0-\udeba\udec0-\udec2\uded0-\uded9\udee0-\udee7]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g,e=/\uFE0F/g,c=String.fromCharCode(8205),t=/[&<>'"]/g,o=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,r=String.fromCharCode;return d;function n(d,u){return document.createTextNode(u?d.replace(e,""):d)}function a(d,u){return"".concat(u.base,u.size,"/",d,u.ext)}function i(d,u){for(var f,e,c=d.childNodes,t=c.length;t--;)3===(e=(f=c[t]).nodeType)?u.push(f):1!==e||"ownerSVGElement"in f||o.test(f.nodeName.toLowerCase())||i(f,u);return u}function s(d){return g(d.indexOf(c)<0?d.replace(e,""):d)}function b(d,u){for(var e,c,t,o,r,a,b,m,l,p,h,g,w,v=i(d,[]),j=v.length;j--;){for(t=!1,o=document.createDocumentFragment(),a=(r=v[j]).nodeValue,m=0;b=f.exec(a);){if((l=b.index)!==m&&o.appendChild(n(a.slice(m,l),!0)),g=s(h=b[0]),m=l+h.length,w=u.callback(g,u),g&&w){for(c in(p=new Image).onerror=u.onerror,p.setAttribute("draggable","false"),e=u.attributes(h,g))e.hasOwnProperty(c)&&0!==c.indexOf("on")&&!p.hasAttribute(c)&&p.setAttribute(c,e[c]);p.className=u.className,p.alt=h,p.src=w,t=!0,o.appendChild(p)}p||o.appendChild(n(h,!1)),p=null}t&&(m")}return c}))}function l(d){return u[d]}function p(){return null}function h(d,u){return String(d).replace(f,u)}function g(d,u){for(var f=[],e=0,c=0,t=0;t({loading:"lazy"})};u().initializers.add("flarum-emoji",(()=>{!function(){let d=null;(0,f.extend)("flarum/common/components/TextEditor","oninit",(function(){this._loaders.push((async()=>await c.e(411).then(c.bind(c,948)).then((u=>d=u.default)))),this.commonEmoji=["😀","😁","😂","😃","😄","😅","😆","😇","😈","😉","😊","😋","😌","😍","😎","😏","😐️","😑","😒","😓","😔","😕","😖","😗","😘","😙","😚","😛","😜","😝","😞","😟","😠","😡","😢","😣","😤","😥","😦","😧","😨","😩","😪","😫","😬","😭","😮","😮‍💨","😯","😰","😱","😲","😳","😴","😵","😵‍💫","😶","😶‍🌫️","😷","😸","😹","😺","😻","😼","😽","😾","😿","🙀","🙁","🙂","🙃","🙄"]})),(0,f.extend)("flarum/common/components/TextEditor","onbuild",(function(){this.emojiDropdown=new w;const d=this.$(".TextEditor-editor").wrap('
');this.navigator=new(n()),this.navigator.when((()=>this.emojiDropdown.active)).onUp((()=>this.emojiDropdown.navigate(-1))).onDown((()=>this.emojiDropdown.navigate(1))).onSelect(this.emojiDropdown.complete.bind(this.emojiDropdown)).onCancel(this.emojiDropdown.hide.bind(this.emojiDropdown)).bindTo(d),d.after($('
'))})),(0,f.extend)("flarum/common/components/TextEditor","buildEditorParams",(function(u){const f=Object.keys(d),e=new(b())(":");u.inputListeners.push((()=>{const u=this.attrs.composer.editor.getSelectionRange(),c=u[0];if(u[1]-c>0)return;const t=this.attrs.composer.editor.getLastNChars(15),o=e.check(t,c,/[a-z0-9]|\+|\-|_|\:/);if(this.emojiDropdown.hide(),this.emojiDropdown.active=!1,o){const u=o.typed,e=this.emojiDropdown,c=d=>{this.attrs.composer.editor.replaceBeforeCursor(o.absoluteStart-1,d+" "),this.emojiDropdown.hide()},t=function(d){let{emoji:u,name:f,code:t}=d;return m(i(),{text:f},m("button",{key:u,onclick:()=>c(u),onmouseenter:function(){e.setIndex($(this).parent().index()-1)}},m("img",{alt:u,className:"emoji",draggable:"false",loading:"lazy",src:"".concat(D,"72x72/").concat(t,".png"),title:f})))};(()=>{const e=[],c=function(d){const u=new RegExp("\\((["+"+.*?[]{}()^$|\\".replace(/(.)/g,"\\$1")+"])\\)","g");return new RegExp("(.*)"+d.toLowerCase().replace(/(.)/g,"($1)(.*?)").replace(u,"(\\$1)")+"$","i")}(u);let r=40;const n=u=>{for(let c=0;c0;c++){const t=f[c];if(-1===e.indexOf(t)){const f=d[t];for(let d of f)if(u(d,t)){--r,e.push(t);break}}}};n(((d,f)=>{var e;return u?0===d.indexOf(u):null==(e=this.commonEmoji)?void 0:e.includes(f)})),n((d=>c.test(d)));const a=e.map((u=>({emoji:u,name:d[u][0],code:k(u)}))).map(t);if(a.length){this.emojiDropdown.items=a,m.render(this.$(".ComposerBody-emojiDropdownContainer")[0],this.emojiDropdown.render()),this.emojiDropdown.show();const d=this.attrs.composer.editor.getCaretCoordinates(o.absoluteStart),u=this.emojiDropdown.$().outerWidth(),f=this.emojiDropdown.$().outerHeight(),e=this.emojiDropdown.$().offsetParent();let c=d.left,t=d.top+15;t+f>e.height()&&(t=d.top-f-15),c+u>e.width()&&(c=e.width()-u),t=Math.max(-(e.offset().top-$(document).scrollTop()),t),c=Math.max(-e.offset().left,c),this.emojiDropdown.show(c,t)}})(),this.emojiDropdown.setIndex(0),this.emojiDropdown.$().scrollTop(0),this.emojiDropdown.active=!0}}))})),(0,f.extend)("flarum/common/components/TextEditor","toolbarItems",(function(d){d.add("emoji",m(o(),{onclick:()=>this.attrs.composer.editor.insertAtCursor(" :"),icon:"far fa-smile"},app.translator.trans("flarum-emoji.forum.composer.emoji_tooltip")))}))}(),(0,f.override)(S().prototype,"contentHtml",(function(d){const u=d();if(this.oldContentHtml!==u){const d=j.parse(function(d){const u=document.implementation.createHTMLDocument();return u.body.innerHTML=d,u.body}(u),E);this.emojifiedContentHtml=d.innerHTML,this.oldContentHtml=u}return this.emojifiedContentHtml})),(0,f.override)(s9e.TextFormatter,"preview",((d,u,f)=>{d(u,f),j.parse(f,E)}))}))})(),module.exports=t})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/emoji/js/dist/forum.js.map b/extensions/emoji/js/dist/forum.js.map index 2a1e7b0a31..97d15e3bf0 100644 --- a/extensions/emoji/js/dist/forum.js.map +++ b/extensions/emoji/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":";UAAIA,EACAC,OCAAC,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,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AAM8K,EAASvB,EAAOuB,WACxB9K,EAAM0K,EAAY1K,IAAM8K,EAAS,IAE/B/K,EAAO6K,EAAQrB,EAAOqB,UACxB7K,EAAOwJ,EAAOqB,QAAUA,GAI1B5K,EAAMgL,KAAKC,MAAM1B,EAAO9H,SAASzB,IAAMC,EAAEjG,UAAUuH,aAAcvB,GACjED,EAAOiL,KAAKC,KAAK1B,EAAO9H,SAAS1B,KAAMA,GACvC9G,KAAKoO,cAAcvH,KAAKC,EAAMC,EAChC,GAEFkL,GACAjS,KAAKoO,cAAc7G,SAAS,GAC5BvH,KAAKoO,cAAcpH,IAAIsB,UAAU,GACjCtI,KAAKoO,cAAclH,QAAS,CAC9B,IAEJ,KACA,IAAA4G,QAAO,sCAAuC,gBAAgB,SAAUrH,GACtEA,EAAMuC,IAAI,QAASxK,EAAE,IAAkB,CACrC4R,QAAS,IAAMpQ,KAAK4G,MAAM0I,SAASC,OAAO2C,eAAe,MACzD9G,KAAM,gBACL9E,IAAIC,WAAWC,MAAM,8CAC1B,GACF,CG1JE2L,IDiBA,IAAAC,UAAS,cAAgB,eAAe,SAAUC,GAChD,MAAMC,EAAcD,IACpB,GAAIrS,KAAKuS,iBAAmBD,EAAa,CAWvC,MAAME,EAAe,QAnB3B,SAAmBzF,GACjB,MAAM0F,EAAM1R,SAAS2R,eAAeC,qBAEpC,OADAF,EAAIG,KAAKC,UAAY9F,EACd0F,EAAIG,IACb,CAeyCE,CAAUR,GAAcjH,GAG3DrL,KAAK+S,qBAAuBP,EAAaK,UACzC7S,KAAKuS,eAAiBD,CACxB,CACA,OAAOtS,KAAK+S,oBACd,KACA,IAAAX,UAASY,IAAIC,cAAe,WAAW,CAACZ,EAAU5H,EAAMyI,KACtDb,EAAS5H,EAAMyI,GACf,QAAcA,EAAS7H,EAAQ,GCrCpB","sources":["webpack://@flarum/emoji/webpack/runtime/load script","webpack://@flarum/emoji/webpack/bootstrap","webpack://@flarum/emoji/webpack/runtime/compat get default export","webpack://@flarum/emoji/webpack/runtime/define property getters","webpack://@flarum/emoji/webpack/runtime/ensure chunk","webpack://@flarum/emoji/webpack/runtime/get javascript chunk filename","webpack://@flarum/emoji/webpack/runtime/global","webpack://@flarum/emoji/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/emoji/webpack/runtime/make namespace object","webpack://@flarum/emoji/webpack/runtime/publicPath","webpack://@flarum/emoji/webpack/runtime/compat","webpack://@flarum/emoji/webpack/runtime/jsonp chunk loading","webpack://@flarum/emoji/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/emoji/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/emoji/external root \"flarum.reg.get('core', 'common/components/TextEditorButton')\"","webpack://@flarum/emoji/external root \"flarum.reg.get('core', 'common/utils/KeyboardNavigatable')\"","webpack://@flarum/emoji/external root \"flarum.reg.get('core', 'common/components/Tooltip')\"","webpack://@flarum/emoji/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/emoji/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/emoji/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/emoji/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/emoji/external root \"flarum.reg.get('core', 'common/Fragment')\"","webpack://@flarum/emoji/./src/forum/fragments/AutocompleteDropdown.js","webpack://@flarum/emoji/../../../node_modules/twemoji/dist/twemoji.esm.js","webpack://@flarum/emoji/./src/forum/helpers/getEmojiIconCode.js","webpack://@flarum/emoji/./src/forum/cdn.js","webpack://@flarum/emoji/./src/forum/addComposerAutocomplete.js","webpack://@flarum/emoji/external root \"flarum.reg.get('core', 'common/models/Post')\"","webpack://@flarum/emoji/./src/forum/renderEmoji.js","webpack://@flarum/emoji/./src/forum/index.js"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"module.exports:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t};\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + \"forum/emojiMap\" + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) scriptUrl = scripts[scripts.length - 1].src\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.f.compat = (chunkId, promises) => {\n\n\tconst originalLoadChunk = __webpack_require__.l;\n\t__webpack_require__.l = flarum.reg.loadChunk.bind(flarum.reg, originalLoadChunk);\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t315: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkmodule_exports\"] = self[\"webpackChunkmodule_exports\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/TextEditorButton');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/KeyboardNavigatable');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Tooltip');","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Fragment');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport Fragment from 'flarum/common/Fragment';\nexport default class AutocompleteDropdown extends Fragment {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"items\", []);\n _defineProperty(this, \"active\", false);\n _defineProperty(this, \"index\", 0);\n _defineProperty(this, \"keyWasJustPressed\", false);\n }\n view() {\n return m(\"ul\", {\n className: \"Dropdown-menu EmojiDropdown\"\n }, m(\"li\", {\n className: \"Dropdown-header\"\n }, app.translator.trans('flarum-emoji.forum.composer.type_to_search_text')), this.items.map(item => m(\"li\", {\n key: item.attrs.key\n }, item)));\n }\n show(left, top) {\n this.$().show().css({\n left: left + 'px',\n top: top + 'px'\n });\n this.active = true;\n }\n hide() {\n this.$().hide();\n this.active = false;\n }\n navigate(delta) {\n this.keyWasJustPressed = true;\n this.setIndex(this.index + delta, true);\n clearTimeout(this.keyWasJustPressedTimeout);\n this.keyWasJustPressedTimeout = setTimeout(() => this.keyWasJustPressed = false, 500);\n }\n complete() {\n this.$('li:not(.Dropdown-header)').eq(this.index).find('button').click();\n }\n setIndex(index, scrollToItem) {\n if (this.keyWasJustPressed && !scrollToItem) return;\n const $dropdown = this.$();\n const $items = $dropdown.find('li:not(.Dropdown-header)');\n let rangedIndex = index;\n if (rangedIndex < 0) {\n rangedIndex = $items.length - 1;\n } else if (rangedIndex >= $items.length) {\n rangedIndex = 0;\n }\n this.index = rangedIndex;\n const $item = $items.removeClass('active').eq(rangedIndex).addClass('active');\n if (scrollToItem) {\n const dropdownScroll = $dropdown.scrollTop();\n const dropdownTop = $dropdown.offset().top;\n const dropdownBottom = dropdownTop + $dropdown.outerHeight();\n const itemTop = $item.offset().top;\n const itemBottom = itemTop + $item.outerHeight();\n let scrollTop;\n if (itemTop < dropdownTop) {\n scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n } else if (itemBottom > dropdownBottom) {\n scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n }\n if (typeof scrollTop !== 'undefined') {\n $dropdown.stop(true).animate({\n scrollTop\n }, 100);\n }\n }\n }\n}\nflarum.reg.add('flarum-emoji', 'forum/fragments/AutocompleteDropdown', AutocompleteDropdown);","/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */\nvar twemoji=function(){\"use strict\";var twemoji={base:\"https://twemoji.maxcdn.com/v/14.0.2/\",ext:\".png\",size:\"72x72\",className:\"emoji\",convert:{fromCodePoint:fromCodePoint,toCodePoint:toCodePoint},onerror:function onerror(){if(this.parentNode){this.parentNode.replaceChild(createText(this.alt,false),this)}},parse:parse,replace:replace,test:test},escaper={\"&\":\"&\",\"<\":\"<\",\">\":\">\",\"'\":\"'\",'\"':\""\"},re=/(?:\\ud83d\\udc68\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffc-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83e\\uddd1\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83e\\uddd1\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udffe]|\\ud83d\\udc68\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffb\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffc-\\udfff]|\\ud83d\\udc68\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffc\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83d\\udc68\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffd\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83d\\udc68\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffe\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83d\\udc68\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udfff\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udffe]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffc-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc69\\ud83c[\\udffc-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\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\\udffd-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\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\\udffe\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\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\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\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\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffc-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffb\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffc\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83e\\uddd1\\ud83c\\udffd\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83e\\uddd1\\ud83c\\udffe\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udffe]|\\ud83e\\uddd1\\ud83c\\udfff\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68|\\ud83d\\udc69\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d[\\udc68\\udc69]|\\ud83e\\udef1\\ud83c\\udffb\\u200d\\ud83e\\udef2\\ud83c[\\udffc-\\udfff]|\\ud83e\\udef1\\ud83c\\udffc\\u200d\\ud83e\\udef2\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83e\\udef1\\ud83c\\udffd\\u200d\\ud83e\\udef2\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83e\\udef1\\ud83c\\udffe\\u200d\\ud83e\\udef2\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83e\\udef1\\ud83c\\udfff\\u200d\\ud83e\\udef2\\ud83c[\\udffb-\\udffe]|\\ud83d\\udc68\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68|\\ud83d\\udc69\\u200d\\u2764\\ufe0f\\u200d\\ud83d[\\udc68\\udc69]|\\ud83e\\uddd1\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1|\\ud83d\\udc6b\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc6c\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc6d\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc8f\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc91\\ud83c[\\udffb-\\udfff]|\\ud83e\\udd1d\\ud83c[\\udffb-\\udfff]|\\ud83d[\\udc6b-\\udc6d\\udc8f\\udc91]|\\ud83e\\udd1d)|(?:\\ud83d[\\udc68\\udc69]|\\ud83e\\uddd1)(?:\\ud83c[\\udffb-\\udfff])?\\u200d(?:\\u2695\\ufe0f|\\u2696\\ufe0f|\\u2708\\ufe0f|\\ud83c[\\udf3e\\udf73\\udf7c\\udf84\\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[\\udc6e\\udc70\\udc71\\udc73\\udc77\\udc81\\udc82\\udc86\\udc87\\ude45-\\ude47\\ude4b\\ude4d\\ude4e\\udea3\\udeb4-\\udeb6]|\\ud83e[\\udd26\\udd35\\udd37-\\udd39\\udd3d\\udd3e\\uddb8\\uddb9\\uddcd-\\uddcf\\uddd4\\uddd6-\\udddd])(?:\\ud83c[\\udffb-\\udfff])?\\u200d[\\u2640\\u2642]\\ufe0f|(?:\\ud83d\\udc68\\u200d\\ud83d\\udc68\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc68\\u200d\\ud83d\\udc68\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc68\\u200d\\ud83d\\udc69\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc68\\u200d\\ud83d\\udc69\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc69\\u200d\\ud83d\\udc69\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc69\\u200d\\ud83d\\udc69\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc68\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc68\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc68\\u200d\\ud83d\\udc68\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc68\\u200d\\ud83d\\udc69\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc69\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc69\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc69\\u200d\\ud83d\\udc69\\u200d\\ud83d[\\udc66\\udc67]|\\ud83c\\udff3\\ufe0f\\u200d\\u26a7\\ufe0f|\\ud83c\\udff3\\ufe0f\\u200d\\ud83c\\udf08|\\ud83d\\ude36\\u200d\\ud83c\\udf2b\\ufe0f|\\u2764\\ufe0f\\u200d\\ud83d\\udd25|\\u2764\\ufe0f\\u200d\\ud83e\\ude79|\\ud83c\\udff4\\u200d\\u2620\\ufe0f|\\ud83d\\udc15\\u200d\\ud83e\\uddba|\\ud83d\\udc3b\\u200d\\u2744\\ufe0f|\\ud83d\\udc41\\u200d\\ud83d\\udde8|\\ud83d\\udc68\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc69\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc6f\\u200d\\u2640\\ufe0f|\\ud83d\\udc6f\\u200d\\u2642\\ufe0f|\\ud83d\\ude2e\\u200d\\ud83d\\udca8|\\ud83d\\ude35\\u200d\\ud83d\\udcab|\\ud83e\\udd3c\\u200d\\u2640\\ufe0f|\\ud83e\\udd3c\\u200d\\u2642\\ufe0f|\\ud83e\\uddde\\u200d\\u2640\\ufe0f|\\ud83e\\uddde\\u200d\\u2642\\ufe0f|\\ud83e\\udddf\\u200d\\u2640\\ufe0f|\\ud83e\\udddf\\u200d\\u2642\\ufe0f|\\ud83d\\udc08\\u200d\\u2b1b)|[#*0-9]\\ufe0f?\\u20e3|(?:[©®\\u2122\\u265f]\\ufe0f)|(?:\\ud83c[\\udc04\\udd70\\udd71\\udd7e\\udd7f\\ude02\\ude1a\\ude2f\\ude37\\udf21\\udf24-\\udf2c\\udf36\\udf7d\\udf96\\udf97\\udf99-\\udf9b\\udf9e\\udf9f\\udfcd\\udfce\\udfd4-\\udfdf\\udff3\\udff5\\udff7]|\\ud83d[\\udc3f\\udc41\\udcfd\\udd49\\udd4a\\udd6f\\udd70\\udd73\\udd76-\\udd79\\udd87\\udd8a-\\udd8d\\udda5\\udda8\\uddb1\\uddb2\\uddbc\\uddc2-\\uddc4\\uddd1-\\uddd3\\udddc-\\uddde\\udde1\\udde3\\udde8\\uddef\\uddf3\\uddfa\\udecb\\udecd-\\udecf\\udee0-\\udee5\\udee9\\udef0\\udef3]|[\\u203c\\u2049\\u2139\\u2194-\\u2199\\u21a9\\u21aa\\u231a\\u231b\\u2328\\u23cf\\u23ed-\\u23ef\\u23f1\\u23f2\\u23f8-\\u23fa\\u24c2\\u25aa\\u25ab\\u25b6\\u25c0\\u25fb-\\u25fe\\u2600-\\u2604\\u260e\\u2611\\u2614\\u2615\\u2618\\u2620\\u2622\\u2623\\u2626\\u262a\\u262e\\u262f\\u2638-\\u263a\\u2640\\u2642\\u2648-\\u2653\\u2660\\u2663\\u2665\\u2666\\u2668\\u267b\\u267f\\u2692-\\u2697\\u2699\\u269b\\u269c\\u26a0\\u26a1\\u26a7\\u26aa\\u26ab\\u26b0\\u26b1\\u26bd\\u26be\\u26c4\\u26c5\\u26c8\\u26cf\\u26d1\\u26d3\\u26d4\\u26e9\\u26ea\\u26f0-\\u26f5\\u26f8\\u26fa\\u26fd\\u2702\\u2708\\u2709\\u270f\\u2712\\u2714\\u2716\\u271d\\u2721\\u2733\\u2734\\u2744\\u2747\\u2757\\u2763\\u2764\\u27a1\\u2934\\u2935\\u2b05-\\u2b07\\u2b1b\\u2b1c\\u2b50\\u2b55\\u3030\\u303d\\u3297\\u3299])(?:\\ufe0f|(?!\\ufe0e))|(?:(?:\\ud83c[\\udfcb\\udfcc]|\\ud83d[\\udd74\\udd75\\udd90]|[\\u261d\\u26f7\\u26f9\\u270c\\u270d])(?:\\ufe0f|(?!\\ufe0e))|(?:\\ud83c[\\udf85\\udfc2-\\udfc4\\udfc7\\udfca]|\\ud83d[\\udc42\\udc43\\udc46-\\udc50\\udc66-\\udc69\\udc6e\\udc70-\\udc78\\udc7c\\udc81-\\udc83\\udc85-\\udc87\\udcaa\\udd7a\\udd95\\udd96\\ude45-\\ude47\\ude4b-\\ude4f\\udea3\\udeb4-\\udeb6\\udec0\\udecc]|\\ud83e[\\udd0c\\udd0f\\udd18-\\udd1c\\udd1e\\udd1f\\udd26\\udd30-\\udd39\\udd3d\\udd3e\\udd77\\uddb5\\uddb6\\uddb8\\uddb9\\uddbb\\uddcd-\\uddcf\\uddd1-\\udddd\\udec3-\\udec5\\udef0-\\udef6]|[\\u270a\\u270b]))(?:\\ud83c[\\udffb-\\udfff])?|(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40\\udc65\\udb40\\udc6e\\udb40\\udc67\\udb40\\udc7f|\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40\\udc73\\udb40\\udc63\\udb40\\udc74\\udb40\\udc7f|\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40\\udc77\\udb40\\udc6c\\udb40\\udc73\\udb40\\udc7f|\\ud83c\\udde6\\ud83c[\\udde8-\\uddec\\uddee\\uddf1\\uddf2\\uddf4\\uddf6-\\uddfa\\uddfc\\uddfd\\uddff]|\\ud83c\\udde7\\ud83c[\\udde6\\udde7\\udde9-\\uddef\\uddf1-\\uddf4\\uddf6-\\uddf9\\uddfb\\uddfc\\uddfe\\uddff]|\\ud83c\\udde8\\ud83c[\\udde6\\udde8\\udde9\\uddeb-\\uddee\\uddf0-\\uddf5\\uddf7\\uddfa-\\uddff]|\\ud83c\\udde9\\ud83c[\\uddea\\uddec\\uddef\\uddf0\\uddf2\\uddf4\\uddff]|\\ud83c\\uddea\\ud83c[\\udde6\\udde8\\uddea\\uddec\\udded\\uddf7-\\uddfa]|\\ud83c\\uddeb\\ud83c[\\uddee-\\uddf0\\uddf2\\uddf4\\uddf7]|\\ud83c\\uddec\\ud83c[\\udde6\\udde7\\udde9-\\uddee\\uddf1-\\uddf3\\uddf5-\\uddfa\\uddfc\\uddfe]|\\ud83c\\udded\\ud83c[\\uddf0\\uddf2\\uddf3\\uddf7\\uddf9\\uddfa]|\\ud83c\\uddee\\ud83c[\\udde8-\\uddea\\uddf1-\\uddf4\\uddf6-\\uddf9]|\\ud83c\\uddef\\ud83c[\\uddea\\uddf2\\uddf4\\uddf5]|\\ud83c\\uddf0\\ud83c[\\uddea\\uddec-\\uddee\\uddf2\\uddf3\\uddf5\\uddf7\\uddfc\\uddfe\\uddff]|\\ud83c\\uddf1\\ud83c[\\udde6-\\udde8\\uddee\\uddf0\\uddf7-\\uddfb\\uddfe]|\\ud83c\\uddf2\\ud83c[\\udde6\\udde8-\\udded\\uddf0-\\uddff]|\\ud83c\\uddf3\\ud83c[\\udde6\\udde8\\uddea-\\uddec\\uddee\\uddf1\\uddf4\\uddf5\\uddf7\\uddfa\\uddff]|\\ud83c\\uddf4\\ud83c\\uddf2|\\ud83c\\uddf5\\ud83c[\\udde6\\uddea-\\udded\\uddf0-\\uddf3\\uddf7-\\uddf9\\uddfc\\uddfe]|\\ud83c\\uddf6\\ud83c\\udde6|\\ud83c\\uddf7\\ud83c[\\uddea\\uddf4\\uddf8\\uddfa\\uddfc]|\\ud83c\\uddf8\\ud83c[\\udde6-\\uddea\\uddec-\\uddf4\\uddf7-\\uddf9\\uddfb\\uddfd-\\uddff]|\\ud83c\\uddf9\\ud83c[\\udde6\\udde8\\udde9\\uddeb-\\udded\\uddef-\\uddf4\\uddf7\\uddf9\\uddfb\\uddfc\\uddff]|\\ud83c\\uddfa\\ud83c[\\udde6\\uddec\\uddf2\\uddf3\\uddf8\\uddfe\\uddff]|\\ud83c\\uddfb\\ud83c[\\udde6\\udde8\\uddea\\uddec\\uddee\\uddf3\\uddfa]|\\ud83c\\uddfc\\ud83c[\\uddeb\\uddf8]|\\ud83c\\uddfd\\ud83c\\uddf0|\\ud83c\\uddfe\\ud83c[\\uddea\\uddf9]|\\ud83c\\uddff\\ud83c[\\udde6\\uddf2\\uddfc]|\\ud83c[\\udccf\\udd8e\\udd91-\\udd9a\\udde6-\\uddff\\ude01\\ude32-\\ude36\\ude38-\\ude3a\\ude50\\ude51\\udf00-\\udf20\\udf2d-\\udf35\\udf37-\\udf7c\\udf7e-\\udf84\\udf86-\\udf93\\udfa0-\\udfc1\\udfc5\\udfc6\\udfc8\\udfc9\\udfcf-\\udfd3\\udfe0-\\udff0\\udff4\\udff8-\\udfff]|\\ud83d[\\udc00-\\udc3e\\udc40\\udc44\\udc45\\udc51-\\udc65\\udc6a\\udc6f\\udc79-\\udc7b\\udc7d-\\udc80\\udc84\\udc88-\\udc8e\\udc90\\udc92-\\udca9\\udcab-\\udcfc\\udcff-\\udd3d\\udd4b-\\udd4e\\udd50-\\udd67\\udda4\\uddfb-\\ude44\\ude48-\\ude4a\\ude80-\\udea2\\udea4-\\udeb3\\udeb7-\\udebf\\udec1-\\udec5\\uded0-\\uded2\\uded5-\\uded7\\udedd-\\udedf\\udeeb\\udeec\\udef4-\\udefc\\udfe0-\\udfeb\\udff0]|\\ud83e[\\udd0d\\udd0e\\udd10-\\udd17\\udd20-\\udd25\\udd27-\\udd2f\\udd3a\\udd3c\\udd3f-\\udd45\\udd47-\\udd76\\udd78-\\uddb4\\uddb7\\uddba\\uddbc-\\uddcc\\uddd0\\uddde-\\uddff\\ude70-\\ude74\\ude78-\\ude7c\\ude80-\\ude86\\ude90-\\udeac\\udeb0-\\udeba\\udec0-\\udec2\\uded0-\\uded9\\udee0-\\udee7]|[\\u23e9-\\u23ec\\u23f0\\u23f3\\u267e\\u26ce\\u2705\\u2728\\u274c\\u274e\\u2753-\\u2755\\u2795-\\u2797\\u27b0\\u27bf\\ue50a])|\\ufe0f/g,UFE0Fg=/\\uFE0F/g,U200D=String.fromCharCode(8205),rescaper=/[&<>'\"]/g,shouldntBeParsed=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,fromCharCode=String.fromCharCode;return twemoji;function createText(text,clean){return document.createTextNode(clean?text.replace(UFE0Fg,\"\"):text)}function escapeHTML(s){return s.replace(rescaper,replacer)}function defaultImageSrcGenerator(icon,options){return\"\".concat(options.base,options.size,\"/\",icon,options.ext)}function grabAllTextNodes(node,allText){var childNodes=node.childNodes,length=childNodes.length,subnode,nodeType;while(length--){subnode=childNodes[length];nodeType=subnode.nodeType;if(nodeType===3){allText.push(subnode)}else if(nodeType===1&&!(\"ownerSVGElement\"in subnode)&&!shouldntBeParsed.test(subnode.nodeName.toLowerCase())){grabAllTextNodes(subnode,allText)}}return allText}function grabTheRightIcon(rawText){return toCodePoint(rawText.indexOf(U200D)<0?rawText.replace(UFE0Fg,\"\"):rawText)}function parseNode(node,options){var allText=grabAllTextNodes(node,[]),length=allText.length,attrib,attrname,modified,fragment,subnode,text,match,i,index,img,rawText,iconId,src;while(length--){modified=false;fragment=document.createDocumentFragment();subnode=allText[length];text=subnode.nodeValue;i=0;while(match=re.exec(text)){index=match.index;if(index!==i){fragment.appendChild(createText(text.slice(i,index),true))}rawText=match[0];iconId=grabTheRightIcon(rawText);i=index+rawText.length;src=options.callback(iconId,options);if(iconId&&src){img=new Image;img.onerror=options.onerror;img.setAttribute(\"draggable\",\"false\");attrib=options.attributes(rawText,iconId);for(attrname in attrib){if(attrib.hasOwnProperty(attrname)&&attrname.indexOf(\"on\")!==0&&!img.hasAttribute(attrname)){img.setAttribute(attrname,attrib[attrname])}}img.className=options.className;img.alt=rawText;img.src=src;modified=true;fragment.appendChild(img)}if(!img)fragment.appendChild(createText(rawText,false));img=null}if(modified){if(i\")}return ret})}function replacer(m){return escaper[m]}function returnNull(){return null}function toSizeSquaredAsset(value){return typeof value===\"number\"?value+\"x\"+value:value}function fromCodePoint(codepoint){var code=typeof codepoint===\"string\"?parseInt(codepoint,16):codepoint;if(code<65536){return fromCharCode(code)}code-=65536;return fromCharCode(55296+(code>>10),56320+(code&1023))}function parse(what,how){if(!how||typeof how===\"function\"){how={callback:how}}return(typeof what===\"string\"?parseString:parseNode)(what,{callback:how.callback||defaultImageSrcGenerator,attributes:typeof how.attributes===\"function\"?how.attributes:returnNull,base:typeof how.base===\"string\"?how.base:twemoji.base,ext:how.ext||twemoji.ext,size:how.folder||toSizeSquaredAsset(how.size||twemoji.size),className:how.className||twemoji.className,onerror:how.onerror||twemoji.onerror})}function replace(text,callback){return String(text).replace(re,callback)}function test(text){re.lastIndex=0;var result=re.test(text);re.lastIndex=0;return result}function toCodePoint(unicodeSurrogates,sep){var r=[],c=0,p=0,i=0;while(i await import(/* webpackChunkName: 'forum/emojiMap', webpackMode: 'lazy-once' */ './emojiMap').then(m => emojiMap = m.default));\n // prettier-ignore\n this.commonEmoji = ['😀', '😁', '😂', '😃', '😄', '😅', '😆', '😇', '😈', '😉', '😊', '😋', '😌', '😍', '😎', '😏', '😐️', '😑', '😒', '😓', '😔', '😕', '😖', '😗', '😘', '😙', '😚', '😛', '😜', '😝', '😞', '😟', '😠', '😡', '😢', '😣', '😤', '😥', '😦', '😧', '😨', '😩', '😪', '😫', '😬', '😭', '😮', '😮‍💨', '😯', '😰', '😱', '😲', '😳', '😴', '😵', '😵‍💫', '😶', '😶‍🌫️', '😷', '😸', '😹', '😺', '😻', '😼', '😽', '😾', '😿', '🙀', '🙁', '🙂', '🙃', '🙄'];\n });\n extend('flarum/common/components/TextEditor', 'onbuild', function () {\n this.emojiDropdown = new AutocompleteDropdown();\n const $editor = this.$('.TextEditor-editor').wrap('
');\n this.navigator = new KeyboardNavigatable();\n this.navigator.when(() => this.emojiDropdown.active).onUp(() => this.emojiDropdown.navigate(-1)).onDown(() => this.emojiDropdown.navigate(1)).onSelect(this.emojiDropdown.complete.bind(this.emojiDropdown)).onCancel(this.emojiDropdown.hide.bind(this.emojiDropdown)).bindTo($editor);\n $editor.after($('
'));\n });\n extend('flarum/common/components/TextEditor', 'buildEditorParams', function (params) {\n const emojiKeys = Object.keys(emojiMap);\n let relEmojiStart;\n let absEmojiStart;\n let typed;\n const applySuggestion = replacement => {\n this.attrs.composer.editor.replaceBeforeCursor(absEmojiStart - 1, replacement + ' ');\n this.emojiDropdown.hide();\n };\n params.inputListeners.push(() => {\n const selection = this.attrs.composer.editor.getSelectionRange();\n const cursor = selection[0];\n if (selection[1] - cursor > 0) return;\n\n // Search backwards from the cursor for an ':' symbol. If we find\n // one and followed by a whitespace, we will want to show the\n // autocomplete dropdown!\n const lastChunk = this.attrs.composer.editor.getLastNChars(15);\n absEmojiStart = 0;\n for (let i = lastChunk.length - 1; i >= 0; i--) {\n const character = lastChunk.substr(i, 1);\n // check what user typed, emoji names only contains alphanumeric,\n // underline, '+' and '-'\n if (!/[a-z0-9]|\\+|\\-|_|\\:/.test(character)) break;\n // make sure ':' preceded by a whitespace or newline\n if (character === ':' && (i == 0 || /\\s/.test(lastChunk.substr(i - 1, 1)))) {\n relEmojiStart = i + 1;\n absEmojiStart = cursor - lastChunk.length + i + 1;\n break;\n }\n }\n this.emojiDropdown.hide();\n this.emojiDropdown.active = false;\n if (absEmojiStart) {\n typed = lastChunk.substring(relEmojiStart).toLowerCase();\n const makeSuggestion = function (_ref) {\n let {\n emoji,\n name,\n code\n } = _ref;\n return m(Tooltip, {\n text: name\n }, m(\"button\", {\n key: emoji,\n onclick: () => applySuggestion(emoji),\n onmouseenter: function () {\n this.emojiDropdown.setIndex($(this).parent().index() - 1);\n }\n }, m(\"img\", {\n alt: emoji,\n className: \"emoji\",\n draggable: \"false\",\n loading: \"lazy\",\n src: \"\".concat(cdn, \"72x72/\").concat(code, \".png\"),\n title: name\n })));\n };\n const buildSuggestions = () => {\n const similarEmoji = [];\n\n // Build a regular expression to do a fuzzy match of the given input string\n const fuzzyRegexp = function (str) {\n const reEscape = new RegExp('\\\\(([' + '+.*?[]{}()^$|\\\\'.replace(/(.)/g, '\\\\$1') + '])\\\\)', 'g');\n return new RegExp('(.*)' + str.toLowerCase().replace(/(.)/g, '($1)(.*?)').replace(reEscape, '(\\\\$1)') + '$', 'i');\n };\n const regTyped = fuzzyRegexp(typed);\n let maxSuggestions = 40;\n const findMatchingEmojis = matcher => {\n for (let i = 0; i < emojiKeys.length && maxSuggestions > 0; i++) {\n const curEmoji = emojiKeys[i];\n if (similarEmoji.indexOf(curEmoji) === -1) {\n const names = emojiMap[curEmoji];\n for (let name of names) {\n if (matcher(name, curEmoji)) {\n --maxSuggestions;\n similarEmoji.push(curEmoji);\n break;\n }\n }\n }\n }\n };\n\n // First, try to find all emojis starting with the given string\n findMatchingEmojis((emojiName, emoji) => {\n // If no input is provided yet, match the most common emojis.\n if (!typed) {\n var _this$commonEmoji;\n return (_this$commonEmoji = this.commonEmoji) == null ? void 0 : _this$commonEmoji.includes(emoji);\n }\n return emojiName.indexOf(typed) === 0;\n });\n\n // If there are still suggestions left, try for some fuzzy matches\n findMatchingEmojis(emojiName => regTyped.test(emojiName));\n const suggestions = similarEmoji.map(emoji => ({\n emoji,\n name: emojiMap[emoji][0],\n code: getEmojiIconCode(emoji)\n })).map(makeSuggestion);\n if (suggestions.length) {\n this.emojiDropdown.items = suggestions;\n m.render(this.$('.ComposerBody-emojiDropdownContainer')[0], this.emojiDropdown.render());\n this.emojiDropdown.show();\n const coordinates = this.attrs.composer.editor.getCaretCoordinates(absEmojiStart);\n const width = this.emojiDropdown.$().outerWidth();\n const height = this.emojiDropdown.$().outerHeight();\n const parent = this.emojiDropdown.$().offsetParent();\n let left = coordinates.left;\n let top = coordinates.top + 15;\n\n // Keep the dropdown inside the editor.\n if (top + height > parent.height()) {\n top = coordinates.top - height - 15;\n }\n if (left + width > parent.width()) {\n left = parent.width() - width;\n }\n\n // Prevent the dropdown from going off screen on mobile\n top = Math.max(-(parent.offset().top - $(document).scrollTop()), top);\n left = Math.max(-parent.offset().left, left);\n this.emojiDropdown.show(left, top);\n }\n };\n buildSuggestions();\n this.emojiDropdown.setIndex(0);\n this.emojiDropdown.$().scrollTop(0);\n this.emojiDropdown.active = true;\n }\n });\n });\n extend('flarum/common/components/TextEditor', 'toolbarItems', function (items) {\n items.add('emoji', m(TextEditorButton, {\n onclick: () => this.attrs.composer.editor.insertAtCursor(' :'),\n icon: \"far fa-smile\"\n }, app.translator.trans('flarum-emoji.forum.composer.emoji_tooltip')));\n });\n}flarum.reg.addChunkModule('411', '948', 'flarum-emoji', 'forum/emojiMap');\nflarum.reg.addChunkModule('411', '948', 'flarum-emoji', '/home/runner/work/framework/framework/extensions/emoji/js/src/forum/emojiMap.ts');\nflarum.reg.addChunkModule('411', '948', 'flarum-emoji', '/home/runner/work/framework/framework/node_modules/simple-emoji-map/index.mjs');\nflarum.reg.addChunkModule('411', '948', 'flarum-emoji', '/home/runner/work/framework/framework/node_modules/simple-emoji-map/generated/emojis.json');\nflarum.reg.addChunkModule('411', '948', 'flarum-emoji', '/home/runner/work/framework/framework/node_modules/simple-emoji-map/generated/variants.json');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Post');","import twemoji from 'twemoji';\nimport { override } from 'flarum/common/extend';\nimport Post from 'flarum/common/models/Post';\nimport base from './cdn';\nconst options = {\n base,\n attributes: () => ({\n loading: 'lazy'\n })\n};\n\n/**\n * Parses an HTML string into a `` node containing the HTML content.\n *\n * Vanilla JS implementation of jQuery's `$.parseHTML()`,\n * sourced from http://youmightnotneedjquery.com/\n */\nfunction parseHTML(str) {\n const tmp = document.implementation.createHTMLDocument();\n tmp.body.innerHTML = str;\n return tmp.body;\n}\nexport default function renderEmoji() {\n override(Post.prototype, 'contentHtml', function (original) {\n const contentHtml = original();\n if (this.oldContentHtml !== contentHtml) {\n // We need to parse the HTML string into a DOM node, then give it to Twemoji.\n //\n // This prevents some issues with the default find-replace that would be performed\n // on a string passed to `Twemoji.parse()`.\n //\n // The parse function can only handle a single DOM node provided, so we need to\n // wrap it in a node. In our `parseHTML` implementation, we wrap it in a ``\n // element. This gets stripped below.\n //\n // See https://github.com/flarum/core/issues/2958\n const emojifiedDom = twemoji.parse(parseHTML(contentHtml), options);\n\n // Steal the HTML string inside the emojified DOM `` tag.\n this.emojifiedContentHtml = emojifiedDom.innerHTML;\n this.oldContentHtml = contentHtml;\n }\n return this.emojifiedContentHtml;\n });\n override(s9e.TextFormatter, 'preview', (original, text, element) => {\n original(text, element);\n twemoji.parse(element, options);\n });\n}","import app from 'flarum/forum/app';\nimport addComposerAutocomplete from './addComposerAutocomplete';\nimport renderEmoji from './renderEmoji';\napp.initializers.add('flarum-emoji', () => {\n // After typing ':' in the composer, show a dropdown suggesting a bunch of\n // emoji that the user could use.\n addComposerAutocomplete();\n\n // render emoji as image in Posts content and title.\n renderEmoji();\n});"],"names":["inProgress","dataWebpackPrefix","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","m","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","f","e","chunkId","Promise","all","keys","reduce","promises","u","g","globalThis","this","Function","window","obj","prop","prototype","hasOwnProperty","call","l","url","done","push","script","needAttach","scripts","document","getElementsByTagName","i","length","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","forEach","fn","setTimeout","bind","type","target","head","appendChild","r","Symbol","toStringTag","value","scriptUrl","importScripts","location","currentScript","Error","replace","p","compat","originalLoadChunk","flarum","reg","loadChunk","installedChunks","j","installedChunkData","promise","resolve","reject","error","errorType","realSrc","message","name","request","webpackJsonpCallback","parentChunkLoadingFunction","data","chunkIds","moreModules","runtime","some","id","chunkLoadingGlobal","self","_typeof","iterator","constructor","_defineProperty","arg","input","hint","prim","toPrimitive","res","TypeError","String","toPropertyKey","configurable","writable","AutocompleteDropdown","super","arguments","view","className","app","translator","trans","items","map","item","attrs","show","left","top","$","css","active","hide","navigate","delta","keyWasJustPressed","setIndex","index","keyWasJustPressedTimeout","complete","eq","find","click","scrollToItem","$dropdown","$items","rangedIndex","$item","removeClass","addClass","dropdownScroll","scrollTop","dropdownTop","offset","dropdownBottom","outerHeight","itemTop","itemBottom","parseInt","stop","animate","add","twemoji","base","ext","size","convert","fromCodePoint","codepoint","code","fromCharCode","toCodePoint","replaceChild","createText","alt","parse","what","how","callback","parseString","parseNode","defaultImageSrcGenerator","attributes","returnNull","folder","test","text","re","lastIndex","result","escaper","UFE0Fg","U200D","rescaper","shouldntBeParsed","clean","createTextNode","icon","options","concat","grabAllTextNodes","node","allText","subnode","nodeType","childNodes","nodeName","toLowerCase","grabTheRightIcon","rawText","indexOf","attrib","attrname","modified","fragment","match","img","iconId","createDocumentFragment","nodeValue","exec","slice","Image","hasAttribute","str","ret","replacer","unicodeSurrogates","sep","c","charCodeAt","toString","join","getEmojiIconCode","emoji","version","addChunkModule","loading","emojiMap","extend","_loaders","async","then","default","commonEmoji","emojiDropdown","$editor","wrap","navigator","when","onUp","onDown","onSelect","onCancel","bindTo","after","params","emojiKeys","relEmojiStart","absEmojiStart","typed","applySuggestion","replacement","composer","editor","replaceBeforeCursor","inputListeners","selection","getSelectionRange","cursor","lastChunk","getLastNChars","character","substr","substring","makeSuggestion","_ref","onclick","onmouseenter","parent","draggable","cdn","title","similarEmoji","regTyped","reEscape","RegExp","fuzzyRegexp","maxSuggestions","findMatchingEmojis","matcher","curEmoji","names","emojiName","_this$commonEmoji","includes","suggestions","render","coordinates","getCaretCoordinates","width","outerWidth","height","offsetParent","Math","max","buildSuggestions","insertAtCursor","addComposerAutocomplete","override","original","contentHtml","oldContentHtml","emojifiedDom","tmp","implementation","createHTMLDocument","body","innerHTML","parseHTML","emojifiedContentHtml","s9e","TextFormatter","element"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":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EAAO4K,EAAQrB,EAAOqB,UACxB5K,EAAOuJ,EAAOqB,QAAUA,GAI1B3K,EAAM+K,KAAKC,MAAM1B,EAAO7H,SAASzB,IAAMC,EAAEjG,UAAUuH,aAAcvB,GACjED,EAAOgL,KAAKC,KAAK1B,EAAO7H,SAAS1B,KAAMA,GACvC9G,KAAKoO,cAAcvH,KAAKC,EAAMC,EAChC,GAEFiL,GACAhS,KAAKoO,cAAc7G,SAAS,GAC5BvH,KAAKoO,cAAcpH,IAAIsB,UAAU,GACjCtI,KAAKoO,cAAclH,QAAS,CAC9B,IAEJ,KACA,IAAA4G,QAAO,sCAAuC,gBAAgB,SAAUrH,GACtEA,EAAMuC,IAAI,QAASxK,EAAE,IAAkB,CACrC2R,QAAS,IAAMnQ,KAAK4G,MAAMwI,SAASC,OAAO4C,eAAe,MACzD7G,KAAM,gBACL9E,IAAIC,WAAWC,MAAM,8CAC1B,GACF,CG1IE0L,IDiBA,IAAAC,UAAS,cAAgB,eAAe,SAAUC,GAChD,MAAMC,EAAcD,IACpB,GAAIpS,KAAKsS,iBAAmBD,EAAa,CAWvC,MAAME,EAAe,QAnB3B,SAAmBxF,GACjB,MAAMyF,EAAMzR,SAAS0R,eAAeC,qBAEpC,OADAF,EAAIG,KAAKC,UAAY7F,EACdyF,EAAIG,IACb,CAeyCE,CAAUR,GAAchH,GAG3DrL,KAAK8S,qBAAuBP,EAAaK,UACzC5S,KAAKsS,eAAiBD,CACxB,CACA,OAAOrS,KAAK8S,oBACd,KACA,IAAAX,UAASY,IAAIC,cAAe,WAAW,CAACZ,EAAU3H,EAAMwI,KACtDb,EAAS3H,EAAMwI,GACf,QAAcA,EAAS5H,EAAQ,GCrCpB","sources":["webpack://@flarum/emoji/webpack/runtime/load script","webpack://@flarum/emoji/webpack/bootstrap","webpack://@flarum/emoji/webpack/runtime/compat get default export","webpack://@flarum/emoji/webpack/runtime/define property getters","webpack://@flarum/emoji/webpack/runtime/ensure chunk","webpack://@flarum/emoji/webpack/runtime/get javascript chunk filename","webpack://@flarum/emoji/webpack/runtime/global","webpack://@flarum/emoji/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/emoji/webpack/runtime/make namespace object","webpack://@flarum/emoji/webpack/runtime/publicPath","webpack://@flarum/emoji/webpack/runtime/compat","webpack://@flarum/emoji/webpack/runtime/jsonp chunk loading","webpack://@flarum/emoji/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/emoji/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/emoji/external root \"flarum.reg.get('core', 'common/components/TextEditorButton')\"","webpack://@flarum/emoji/external root \"flarum.reg.get('core', 'common/utils/KeyboardNavigatable')\"","webpack://@flarum/emoji/external root \"flarum.reg.get('core', 'common/components/Tooltip')\"","webpack://@flarum/emoji/external root \"flarum.reg.get('core', 'common/utils/AutocompleteReader')\"","webpack://@flarum/emoji/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/emoji/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/emoji/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/emoji/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/emoji/external root \"flarum.reg.get('core', 'common/Fragment')\"","webpack://@flarum/emoji/./src/forum/fragments/AutocompleteDropdown.js","webpack://@flarum/emoji/../../../node_modules/twemoji/dist/twemoji.esm.js","webpack://@flarum/emoji/./src/forum/helpers/getEmojiIconCode.js","webpack://@flarum/emoji/./src/forum/cdn.js","webpack://@flarum/emoji/./src/forum/addComposerAutocomplete.js","webpack://@flarum/emoji/external root \"flarum.reg.get('core', 'common/models/Post')\"","webpack://@flarum/emoji/./src/forum/renderEmoji.js","webpack://@flarum/emoji/./src/forum/index.js"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"module.exports:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t};\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + \"forum/emojiMap\" + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) scriptUrl = scripts[scripts.length - 1].src\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.f.compat = (chunkId, promises) => {\n\n\tconst originalLoadChunk = __webpack_require__.l;\n\t__webpack_require__.l = flarum.reg.loadChunk.bind(flarum.reg, originalLoadChunk);\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t315: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkmodule_exports\"] = self[\"webpackChunkmodule_exports\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/TextEditorButton');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/KeyboardNavigatable');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Tooltip');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/AutocompleteReader');","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Fragment');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport Fragment from 'flarum/common/Fragment';\nexport default class AutocompleteDropdown extends Fragment {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"items\", []);\n _defineProperty(this, \"active\", false);\n _defineProperty(this, \"index\", 0);\n _defineProperty(this, \"keyWasJustPressed\", false);\n }\n view() {\n return m(\"ul\", {\n className: \"Dropdown-menu EmojiDropdown\"\n }, m(\"li\", {\n className: \"Dropdown-header\"\n }, app.translator.trans('flarum-emoji.forum.composer.type_to_search_text')), this.items.map(item => m(\"li\", {\n key: item.attrs.key\n }, item)));\n }\n show(left, top) {\n this.$().show().css({\n left: left + 'px',\n top: top + 'px'\n });\n this.active = true;\n }\n hide() {\n this.$().hide();\n this.active = false;\n }\n navigate(delta) {\n this.keyWasJustPressed = true;\n this.setIndex(this.index + delta, true);\n clearTimeout(this.keyWasJustPressedTimeout);\n this.keyWasJustPressedTimeout = setTimeout(() => this.keyWasJustPressed = false, 500);\n }\n complete() {\n this.$('li:not(.Dropdown-header)').eq(this.index).find('button').click();\n }\n setIndex(index, scrollToItem) {\n if (this.keyWasJustPressed && !scrollToItem) return;\n const $dropdown = this.$();\n const $items = $dropdown.find('li:not(.Dropdown-header)');\n let rangedIndex = index;\n if (rangedIndex < 0) {\n rangedIndex = $items.length - 1;\n } else if (rangedIndex >= $items.length) {\n rangedIndex = 0;\n }\n this.index = rangedIndex;\n const $item = $items.removeClass('active').eq(rangedIndex).addClass('active');\n if (scrollToItem) {\n const dropdownScroll = $dropdown.scrollTop();\n const dropdownTop = $dropdown.offset().top;\n const dropdownBottom = dropdownTop + $dropdown.outerHeight();\n const itemTop = $item.offset().top;\n const itemBottom = itemTop + $item.outerHeight();\n let scrollTop;\n if (itemTop < dropdownTop) {\n scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n } else if (itemBottom > dropdownBottom) {\n scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n }\n if (typeof scrollTop !== 'undefined') {\n $dropdown.stop(true).animate({\n scrollTop\n }, 100);\n }\n }\n }\n}\nflarum.reg.add('flarum-emoji', 'forum/fragments/AutocompleteDropdown', AutocompleteDropdown);","/*! Copyright Twitter Inc. and other contributors. Licensed under MIT */\nvar twemoji=function(){\"use strict\";var twemoji={base:\"https://twemoji.maxcdn.com/v/14.0.2/\",ext:\".png\",size:\"72x72\",className:\"emoji\",convert:{fromCodePoint:fromCodePoint,toCodePoint:toCodePoint},onerror:function onerror(){if(this.parentNode){this.parentNode.replaceChild(createText(this.alt,false),this)}},parse:parse,replace:replace,test:test},escaper={\"&\":\"&\",\"<\":\"<\",\">\":\">\",\"'\":\"'\",'\"':\""\"},re=/(?:\\ud83d\\udc68\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffc-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83e\\uddd1\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83e\\uddd1\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udffe]|\\ud83d\\udc68\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffb\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffc-\\udfff]|\\ud83d\\udc68\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffc\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83d\\udc68\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffd\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83d\\udc68\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udffe\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83d\\udc68\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\ud83c\\udfff\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udffe]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc68\\ud83c[\\udffc-\\udfff]|\\ud83d\\udc69\\ud83c\\udffb\\u200d\\ud83e\\udd1d\\u200d\\ud83d\\udc69\\ud83c[\\udffc-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\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\\udffd-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\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\\udffe\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\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\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc69\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc69\\ud83c[\\udffb-\\udfff]|\\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\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffc-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffb\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffc\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffc\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffd\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83e\\uddd1\\ud83c\\udffd\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udffe\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83e\\uddd1\\ud83c\\udffe\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83e\\uddd1\\ud83c\\udfff\\u200d\\u2764\\ufe0f\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udffe]|\\ud83e\\uddd1\\ud83c\\udfff\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc68\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d\\udc68|\\ud83d\\udc69\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc8b\\u200d\\ud83d[\\udc68\\udc69]|\\ud83e\\udef1\\ud83c\\udffb\\u200d\\ud83e\\udef2\\ud83c[\\udffc-\\udfff]|\\ud83e\\udef1\\ud83c\\udffc\\u200d\\ud83e\\udef2\\ud83c[\\udffb\\udffd-\\udfff]|\\ud83e\\udef1\\ud83c\\udffd\\u200d\\ud83e\\udef2\\ud83c[\\udffb\\udffc\\udffe\\udfff]|\\ud83e\\udef1\\ud83c\\udffe\\u200d\\ud83e\\udef2\\ud83c[\\udffb-\\udffd\\udfff]|\\ud83e\\udef1\\ud83c\\udfff\\u200d\\ud83e\\udef2\\ud83c[\\udffb-\\udffe]|\\ud83d\\udc68\\u200d\\u2764\\ufe0f\\u200d\\ud83d\\udc68|\\ud83d\\udc69\\u200d\\u2764\\ufe0f\\u200d\\ud83d[\\udc68\\udc69]|\\ud83e\\uddd1\\u200d\\ud83e\\udd1d\\u200d\\ud83e\\uddd1|\\ud83d\\udc6b\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc6c\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc6d\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc8f\\ud83c[\\udffb-\\udfff]|\\ud83d\\udc91\\ud83c[\\udffb-\\udfff]|\\ud83e\\udd1d\\ud83c[\\udffb-\\udfff]|\\ud83d[\\udc6b-\\udc6d\\udc8f\\udc91]|\\ud83e\\udd1d)|(?:\\ud83d[\\udc68\\udc69]|\\ud83e\\uddd1)(?:\\ud83c[\\udffb-\\udfff])?\\u200d(?:\\u2695\\ufe0f|\\u2696\\ufe0f|\\u2708\\ufe0f|\\ud83c[\\udf3e\\udf73\\udf7c\\udf84\\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[\\udc6e\\udc70\\udc71\\udc73\\udc77\\udc81\\udc82\\udc86\\udc87\\ude45-\\ude47\\ude4b\\ude4d\\ude4e\\udea3\\udeb4-\\udeb6]|\\ud83e[\\udd26\\udd35\\udd37-\\udd39\\udd3d\\udd3e\\uddb8\\uddb9\\uddcd-\\uddcf\\uddd4\\uddd6-\\udddd])(?:\\ud83c[\\udffb-\\udfff])?\\u200d[\\u2640\\u2642]\\ufe0f|(?:\\ud83d\\udc68\\u200d\\ud83d\\udc68\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc68\\u200d\\ud83d\\udc68\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc68\\u200d\\ud83d\\udc69\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc68\\u200d\\ud83d\\udc69\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc69\\u200d\\ud83d\\udc69\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc69\\u200d\\ud83d\\udc69\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc68\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc68\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc68\\u200d\\ud83d\\udc68\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc68\\u200d\\ud83d\\udc69\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc69\\u200d\\ud83d\\udc66\\u200d\\ud83d\\udc66|\\ud83d\\udc69\\u200d\\ud83d\\udc67\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc69\\u200d\\ud83d\\udc69\\u200d\\ud83d[\\udc66\\udc67]|\\ud83c\\udff3\\ufe0f\\u200d\\u26a7\\ufe0f|\\ud83c\\udff3\\ufe0f\\u200d\\ud83c\\udf08|\\ud83d\\ude36\\u200d\\ud83c\\udf2b\\ufe0f|\\u2764\\ufe0f\\u200d\\ud83d\\udd25|\\u2764\\ufe0f\\u200d\\ud83e\\ude79|\\ud83c\\udff4\\u200d\\u2620\\ufe0f|\\ud83d\\udc15\\u200d\\ud83e\\uddba|\\ud83d\\udc3b\\u200d\\u2744\\ufe0f|\\ud83d\\udc41\\u200d\\ud83d\\udde8|\\ud83d\\udc68\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc69\\u200d\\ud83d[\\udc66\\udc67]|\\ud83d\\udc6f\\u200d\\u2640\\ufe0f|\\ud83d\\udc6f\\u200d\\u2642\\ufe0f|\\ud83d\\ude2e\\u200d\\ud83d\\udca8|\\ud83d\\ude35\\u200d\\ud83d\\udcab|\\ud83e\\udd3c\\u200d\\u2640\\ufe0f|\\ud83e\\udd3c\\u200d\\u2642\\ufe0f|\\ud83e\\uddde\\u200d\\u2640\\ufe0f|\\ud83e\\uddde\\u200d\\u2642\\ufe0f|\\ud83e\\udddf\\u200d\\u2640\\ufe0f|\\ud83e\\udddf\\u200d\\u2642\\ufe0f|\\ud83d\\udc08\\u200d\\u2b1b)|[#*0-9]\\ufe0f?\\u20e3|(?:[©®\\u2122\\u265f]\\ufe0f)|(?:\\ud83c[\\udc04\\udd70\\udd71\\udd7e\\udd7f\\ude02\\ude1a\\ude2f\\ude37\\udf21\\udf24-\\udf2c\\udf36\\udf7d\\udf96\\udf97\\udf99-\\udf9b\\udf9e\\udf9f\\udfcd\\udfce\\udfd4-\\udfdf\\udff3\\udff5\\udff7]|\\ud83d[\\udc3f\\udc41\\udcfd\\udd49\\udd4a\\udd6f\\udd70\\udd73\\udd76-\\udd79\\udd87\\udd8a-\\udd8d\\udda5\\udda8\\uddb1\\uddb2\\uddbc\\uddc2-\\uddc4\\uddd1-\\uddd3\\udddc-\\uddde\\udde1\\udde3\\udde8\\uddef\\uddf3\\uddfa\\udecb\\udecd-\\udecf\\udee0-\\udee5\\udee9\\udef0\\udef3]|[\\u203c\\u2049\\u2139\\u2194-\\u2199\\u21a9\\u21aa\\u231a\\u231b\\u2328\\u23cf\\u23ed-\\u23ef\\u23f1\\u23f2\\u23f8-\\u23fa\\u24c2\\u25aa\\u25ab\\u25b6\\u25c0\\u25fb-\\u25fe\\u2600-\\u2604\\u260e\\u2611\\u2614\\u2615\\u2618\\u2620\\u2622\\u2623\\u2626\\u262a\\u262e\\u262f\\u2638-\\u263a\\u2640\\u2642\\u2648-\\u2653\\u2660\\u2663\\u2665\\u2666\\u2668\\u267b\\u267f\\u2692-\\u2697\\u2699\\u269b\\u269c\\u26a0\\u26a1\\u26a7\\u26aa\\u26ab\\u26b0\\u26b1\\u26bd\\u26be\\u26c4\\u26c5\\u26c8\\u26cf\\u26d1\\u26d3\\u26d4\\u26e9\\u26ea\\u26f0-\\u26f5\\u26f8\\u26fa\\u26fd\\u2702\\u2708\\u2709\\u270f\\u2712\\u2714\\u2716\\u271d\\u2721\\u2733\\u2734\\u2744\\u2747\\u2757\\u2763\\u2764\\u27a1\\u2934\\u2935\\u2b05-\\u2b07\\u2b1b\\u2b1c\\u2b50\\u2b55\\u3030\\u303d\\u3297\\u3299])(?:\\ufe0f|(?!\\ufe0e))|(?:(?:\\ud83c[\\udfcb\\udfcc]|\\ud83d[\\udd74\\udd75\\udd90]|[\\u261d\\u26f7\\u26f9\\u270c\\u270d])(?:\\ufe0f|(?!\\ufe0e))|(?:\\ud83c[\\udf85\\udfc2-\\udfc4\\udfc7\\udfca]|\\ud83d[\\udc42\\udc43\\udc46-\\udc50\\udc66-\\udc69\\udc6e\\udc70-\\udc78\\udc7c\\udc81-\\udc83\\udc85-\\udc87\\udcaa\\udd7a\\udd95\\udd96\\ude45-\\ude47\\ude4b-\\ude4f\\udea3\\udeb4-\\udeb6\\udec0\\udecc]|\\ud83e[\\udd0c\\udd0f\\udd18-\\udd1c\\udd1e\\udd1f\\udd26\\udd30-\\udd39\\udd3d\\udd3e\\udd77\\uddb5\\uddb6\\uddb8\\uddb9\\uddbb\\uddcd-\\uddcf\\uddd1-\\udddd\\udec3-\\udec5\\udef0-\\udef6]|[\\u270a\\u270b]))(?:\\ud83c[\\udffb-\\udfff])?|(?:\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40\\udc65\\udb40\\udc6e\\udb40\\udc67\\udb40\\udc7f|\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40\\udc73\\udb40\\udc63\\udb40\\udc74\\udb40\\udc7f|\\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40\\udc77\\udb40\\udc6c\\udb40\\udc73\\udb40\\udc7f|\\ud83c\\udde6\\ud83c[\\udde8-\\uddec\\uddee\\uddf1\\uddf2\\uddf4\\uddf6-\\uddfa\\uddfc\\uddfd\\uddff]|\\ud83c\\udde7\\ud83c[\\udde6\\udde7\\udde9-\\uddef\\uddf1-\\uddf4\\uddf6-\\uddf9\\uddfb\\uddfc\\uddfe\\uddff]|\\ud83c\\udde8\\ud83c[\\udde6\\udde8\\udde9\\uddeb-\\uddee\\uddf0-\\uddf5\\uddf7\\uddfa-\\uddff]|\\ud83c\\udde9\\ud83c[\\uddea\\uddec\\uddef\\uddf0\\uddf2\\uddf4\\uddff]|\\ud83c\\uddea\\ud83c[\\udde6\\udde8\\uddea\\uddec\\udded\\uddf7-\\uddfa]|\\ud83c\\uddeb\\ud83c[\\uddee-\\uddf0\\uddf2\\uddf4\\uddf7]|\\ud83c\\uddec\\ud83c[\\udde6\\udde7\\udde9-\\uddee\\uddf1-\\uddf3\\uddf5-\\uddfa\\uddfc\\uddfe]|\\ud83c\\udded\\ud83c[\\uddf0\\uddf2\\uddf3\\uddf7\\uddf9\\uddfa]|\\ud83c\\uddee\\ud83c[\\udde8-\\uddea\\uddf1-\\uddf4\\uddf6-\\uddf9]|\\ud83c\\uddef\\ud83c[\\uddea\\uddf2\\uddf4\\uddf5]|\\ud83c\\uddf0\\ud83c[\\uddea\\uddec-\\uddee\\uddf2\\uddf3\\uddf5\\uddf7\\uddfc\\uddfe\\uddff]|\\ud83c\\uddf1\\ud83c[\\udde6-\\udde8\\uddee\\uddf0\\uddf7-\\uddfb\\uddfe]|\\ud83c\\uddf2\\ud83c[\\udde6\\udde8-\\udded\\uddf0-\\uddff]|\\ud83c\\uddf3\\ud83c[\\udde6\\udde8\\uddea-\\uddec\\uddee\\uddf1\\uddf4\\uddf5\\uddf7\\uddfa\\uddff]|\\ud83c\\uddf4\\ud83c\\uddf2|\\ud83c\\uddf5\\ud83c[\\udde6\\uddea-\\udded\\uddf0-\\uddf3\\uddf7-\\uddf9\\uddfc\\uddfe]|\\ud83c\\uddf6\\ud83c\\udde6|\\ud83c\\uddf7\\ud83c[\\uddea\\uddf4\\uddf8\\uddfa\\uddfc]|\\ud83c\\uddf8\\ud83c[\\udde6-\\uddea\\uddec-\\uddf4\\uddf7-\\uddf9\\uddfb\\uddfd-\\uddff]|\\ud83c\\uddf9\\ud83c[\\udde6\\udde8\\udde9\\uddeb-\\udded\\uddef-\\uddf4\\uddf7\\uddf9\\uddfb\\uddfc\\uddff]|\\ud83c\\uddfa\\ud83c[\\udde6\\uddec\\uddf2\\uddf3\\uddf8\\uddfe\\uddff]|\\ud83c\\uddfb\\ud83c[\\udde6\\udde8\\uddea\\uddec\\uddee\\uddf3\\uddfa]|\\ud83c\\uddfc\\ud83c[\\uddeb\\uddf8]|\\ud83c\\uddfd\\ud83c\\uddf0|\\ud83c\\uddfe\\ud83c[\\uddea\\uddf9]|\\ud83c\\uddff\\ud83c[\\udde6\\uddf2\\uddfc]|\\ud83c[\\udccf\\udd8e\\udd91-\\udd9a\\udde6-\\uddff\\ude01\\ude32-\\ude36\\ude38-\\ude3a\\ude50\\ude51\\udf00-\\udf20\\udf2d-\\udf35\\udf37-\\udf7c\\udf7e-\\udf84\\udf86-\\udf93\\udfa0-\\udfc1\\udfc5\\udfc6\\udfc8\\udfc9\\udfcf-\\udfd3\\udfe0-\\udff0\\udff4\\udff8-\\udfff]|\\ud83d[\\udc00-\\udc3e\\udc40\\udc44\\udc45\\udc51-\\udc65\\udc6a\\udc6f\\udc79-\\udc7b\\udc7d-\\udc80\\udc84\\udc88-\\udc8e\\udc90\\udc92-\\udca9\\udcab-\\udcfc\\udcff-\\udd3d\\udd4b-\\udd4e\\udd50-\\udd67\\udda4\\uddfb-\\ude44\\ude48-\\ude4a\\ude80-\\udea2\\udea4-\\udeb3\\udeb7-\\udebf\\udec1-\\udec5\\uded0-\\uded2\\uded5-\\uded7\\udedd-\\udedf\\udeeb\\udeec\\udef4-\\udefc\\udfe0-\\udfeb\\udff0]|\\ud83e[\\udd0d\\udd0e\\udd10-\\udd17\\udd20-\\udd25\\udd27-\\udd2f\\udd3a\\udd3c\\udd3f-\\udd45\\udd47-\\udd76\\udd78-\\uddb4\\uddb7\\uddba\\uddbc-\\uddcc\\uddd0\\uddde-\\uddff\\ude70-\\ude74\\ude78-\\ude7c\\ude80-\\ude86\\ude90-\\udeac\\udeb0-\\udeba\\udec0-\\udec2\\uded0-\\uded9\\udee0-\\udee7]|[\\u23e9-\\u23ec\\u23f0\\u23f3\\u267e\\u26ce\\u2705\\u2728\\u274c\\u274e\\u2753-\\u2755\\u2795-\\u2797\\u27b0\\u27bf\\ue50a])|\\ufe0f/g,UFE0Fg=/\\uFE0F/g,U200D=String.fromCharCode(8205),rescaper=/[&<>'\"]/g,shouldntBeParsed=/^(?:iframe|noframes|noscript|script|select|style|textarea)$/,fromCharCode=String.fromCharCode;return twemoji;function createText(text,clean){return document.createTextNode(clean?text.replace(UFE0Fg,\"\"):text)}function escapeHTML(s){return s.replace(rescaper,replacer)}function defaultImageSrcGenerator(icon,options){return\"\".concat(options.base,options.size,\"/\",icon,options.ext)}function grabAllTextNodes(node,allText){var childNodes=node.childNodes,length=childNodes.length,subnode,nodeType;while(length--){subnode=childNodes[length];nodeType=subnode.nodeType;if(nodeType===3){allText.push(subnode)}else if(nodeType===1&&!(\"ownerSVGElement\"in subnode)&&!shouldntBeParsed.test(subnode.nodeName.toLowerCase())){grabAllTextNodes(subnode,allText)}}return allText}function grabTheRightIcon(rawText){return toCodePoint(rawText.indexOf(U200D)<0?rawText.replace(UFE0Fg,\"\"):rawText)}function parseNode(node,options){var allText=grabAllTextNodes(node,[]),length=allText.length,attrib,attrname,modified,fragment,subnode,text,match,i,index,img,rawText,iconId,src;while(length--){modified=false;fragment=document.createDocumentFragment();subnode=allText[length];text=subnode.nodeValue;i=0;while(match=re.exec(text)){index=match.index;if(index!==i){fragment.appendChild(createText(text.slice(i,index),true))}rawText=match[0];iconId=grabTheRightIcon(rawText);i=index+rawText.length;src=options.callback(iconId,options);if(iconId&&src){img=new Image;img.onerror=options.onerror;img.setAttribute(\"draggable\",\"false\");attrib=options.attributes(rawText,iconId);for(attrname in attrib){if(attrib.hasOwnProperty(attrname)&&attrname.indexOf(\"on\")!==0&&!img.hasAttribute(attrname)){img.setAttribute(attrname,attrib[attrname])}}img.className=options.className;img.alt=rawText;img.src=src;modified=true;fragment.appendChild(img)}if(!img)fragment.appendChild(createText(rawText,false));img=null}if(modified){if(i\")}return ret})}function replacer(m){return escaper[m]}function returnNull(){return null}function toSizeSquaredAsset(value){return typeof value===\"number\"?value+\"x\"+value:value}function fromCodePoint(codepoint){var code=typeof codepoint===\"string\"?parseInt(codepoint,16):codepoint;if(code<65536){return fromCharCode(code)}code-=65536;return fromCharCode(55296+(code>>10),56320+(code&1023))}function parse(what,how){if(!how||typeof how===\"function\"){how={callback:how}}return(typeof what===\"string\"?parseString:parseNode)(what,{callback:how.callback||defaultImageSrcGenerator,attributes:typeof how.attributes===\"function\"?how.attributes:returnNull,base:typeof how.base===\"string\"?how.base:twemoji.base,ext:how.ext||twemoji.ext,size:how.folder||toSizeSquaredAsset(how.size||twemoji.size),className:how.className||twemoji.className,onerror:how.onerror||twemoji.onerror})}function replace(text,callback){return String(text).replace(re,callback)}function test(text){re.lastIndex=0;var result=re.test(text);re.lastIndex=0;return result}function toCodePoint(unicodeSurrogates,sep){var r=[],c=0,p=0,i=0;while(i await import(/* webpackChunkName: 'forum/emojiMap', webpackMode: 'lazy-once' */ './emojiMap').then(m => emojiMap = m.default));\n // prettier-ignore\n this.commonEmoji = ['😀', '😁', '😂', '😃', '😄', '😅', '😆', '😇', '😈', '😉', '😊', '😋', '😌', '😍', '😎', '😏', '😐️', '😑', '😒', '😓', '😔', '😕', '😖', '😗', '😘', '😙', '😚', '😛', '😜', '😝', '😞', '😟', '😠', '😡', '😢', '😣', '😤', '😥', '😦', '😧', '😨', '😩', '😪', '😫', '😬', '😭', '😮', '😮‍💨', '😯', '😰', '😱', '😲', '😳', '😴', '😵', '😵‍💫', '😶', '😶‍🌫️', '😷', '😸', '😹', '😺', '😻', '😼', '😽', '😾', '😿', '🙀', '🙁', '🙂', '🙃', '🙄'];\n });\n extend('flarum/common/components/TextEditor', 'onbuild', function () {\n this.emojiDropdown = new AutocompleteDropdown();\n const $editor = this.$('.TextEditor-editor').wrap('
');\n this.navigator = new KeyboardNavigatable();\n this.navigator.when(() => this.emojiDropdown.active).onUp(() => this.emojiDropdown.navigate(-1)).onDown(() => this.emojiDropdown.navigate(1)).onSelect(this.emojiDropdown.complete.bind(this.emojiDropdown)).onCancel(this.emojiDropdown.hide.bind(this.emojiDropdown)).bindTo($editor);\n $editor.after($('
'));\n });\n extend('flarum/common/components/TextEditor', 'buildEditorParams', function (params) {\n const emojiKeys = Object.keys(emojiMap);\n const autocompleteReader = new AutocompleteReader(':');\n params.inputListeners.push(() => {\n const selection = this.attrs.composer.editor.getSelectionRange();\n const cursor = selection[0];\n if (selection[1] - cursor > 0) return;\n const lastChunk = this.attrs.composer.editor.getLastNChars(15);\n const autocompleting = autocompleteReader.check(lastChunk, cursor, /[a-z0-9]|\\+|\\-|_|\\:/);\n this.emojiDropdown.hide();\n this.emojiDropdown.active = false;\n if (autocompleting) {\n const typed = autocompleting.typed;\n const emojiDropdown = this.emojiDropdown;\n const applySuggestion = replacement => {\n this.attrs.composer.editor.replaceBeforeCursor(autocompleting.absoluteStart - 1, replacement + ' ');\n this.emojiDropdown.hide();\n };\n const makeSuggestion = function (_ref) {\n let {\n emoji,\n name,\n code\n } = _ref;\n return m(Tooltip, {\n text: name\n }, m(\"button\", {\n key: emoji,\n onclick: () => applySuggestion(emoji),\n onmouseenter: function () {\n emojiDropdown.setIndex($(this).parent().index() - 1);\n }\n }, m(\"img\", {\n alt: emoji,\n className: \"emoji\",\n draggable: \"false\",\n loading: \"lazy\",\n src: \"\".concat(cdn, \"72x72/\").concat(code, \".png\"),\n title: name\n })));\n };\n const buildSuggestions = () => {\n const similarEmoji = [];\n\n // Build a regular expression to do a fuzzy match of the given input string\n const fuzzyRegexp = function (str) {\n const reEscape = new RegExp('\\\\(([' + '+.*?[]{}()^$|\\\\'.replace(/(.)/g, '\\\\$1') + '])\\\\)', 'g');\n return new RegExp('(.*)' + str.toLowerCase().replace(/(.)/g, '($1)(.*?)').replace(reEscape, '(\\\\$1)') + '$', 'i');\n };\n const regTyped = fuzzyRegexp(typed);\n let maxSuggestions = 40;\n const findMatchingEmojis = matcher => {\n for (let i = 0; i < emojiKeys.length && maxSuggestions > 0; i++) {\n const curEmoji = emojiKeys[i];\n if (similarEmoji.indexOf(curEmoji) === -1) {\n const names = emojiMap[curEmoji];\n for (let name of names) {\n if (matcher(name, curEmoji)) {\n --maxSuggestions;\n similarEmoji.push(curEmoji);\n break;\n }\n }\n }\n }\n };\n\n // First, try to find all emojis starting with the given string\n findMatchingEmojis((emojiName, emoji) => {\n // If no input is provided yet, match the most common emojis.\n if (!typed) {\n var _this$commonEmoji;\n return (_this$commonEmoji = this.commonEmoji) == null ? void 0 : _this$commonEmoji.includes(emoji);\n }\n return emojiName.indexOf(typed) === 0;\n });\n\n // If there are still suggestions left, try for some fuzzy matches\n findMatchingEmojis(emojiName => regTyped.test(emojiName));\n const suggestions = similarEmoji.map(emoji => ({\n emoji,\n name: emojiMap[emoji][0],\n code: getEmojiIconCode(emoji)\n })).map(makeSuggestion);\n if (suggestions.length) {\n this.emojiDropdown.items = suggestions;\n m.render(this.$('.ComposerBody-emojiDropdownContainer')[0], this.emojiDropdown.render());\n this.emojiDropdown.show();\n const coordinates = this.attrs.composer.editor.getCaretCoordinates(autocompleting.absoluteStart);\n const width = this.emojiDropdown.$().outerWidth();\n const height = this.emojiDropdown.$().outerHeight();\n const parent = this.emojiDropdown.$().offsetParent();\n let left = coordinates.left;\n let top = coordinates.top + 15;\n\n // Keep the dropdown inside the editor.\n if (top + height > parent.height()) {\n top = coordinates.top - height - 15;\n }\n if (left + width > parent.width()) {\n left = parent.width() - width;\n }\n\n // Prevent the dropdown from going off screen on mobile\n top = Math.max(-(parent.offset().top - $(document).scrollTop()), top);\n left = Math.max(-parent.offset().left, left);\n this.emojiDropdown.show(left, top);\n }\n };\n buildSuggestions();\n this.emojiDropdown.setIndex(0);\n this.emojiDropdown.$().scrollTop(0);\n this.emojiDropdown.active = true;\n }\n });\n });\n extend('flarum/common/components/TextEditor', 'toolbarItems', function (items) {\n items.add('emoji', m(TextEditorButton, {\n onclick: () => this.attrs.composer.editor.insertAtCursor(' :'),\n icon: \"far fa-smile\"\n }, app.translator.trans('flarum-emoji.forum.composer.emoji_tooltip')));\n });\n}flarum.reg.addChunkModule('411', '948', 'flarum-emoji', 'forum/emojiMap');\nflarum.reg.addChunkModule('411', '948', 'flarum-emoji', '/home/runner/work/framework/framework/extensions/emoji/js/src/forum/emojiMap.ts');\nflarum.reg.addChunkModule('411', '948', 'flarum-emoji', '/home/runner/work/framework/framework/node_modules/simple-emoji-map/index.mjs');\nflarum.reg.addChunkModule('411', '948', 'flarum-emoji', '/home/runner/work/framework/framework/node_modules/simple-emoji-map/generated/emojis.json');\nflarum.reg.addChunkModule('411', '948', 'flarum-emoji', '/home/runner/work/framework/framework/node_modules/simple-emoji-map/generated/variants.json');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Post');","import twemoji from 'twemoji';\nimport { override } from 'flarum/common/extend';\nimport Post from 'flarum/common/models/Post';\nimport base from './cdn';\nconst options = {\n base,\n attributes: () => ({\n loading: 'lazy'\n })\n};\n\n/**\n * Parses an HTML string into a `` node containing the HTML content.\n *\n * Vanilla JS implementation of jQuery's `$.parseHTML()`,\n * sourced from http://youmightnotneedjquery.com/\n */\nfunction parseHTML(str) {\n const tmp = document.implementation.createHTMLDocument();\n tmp.body.innerHTML = str;\n return tmp.body;\n}\nexport default function renderEmoji() {\n override(Post.prototype, 'contentHtml', function (original) {\n const contentHtml = original();\n if (this.oldContentHtml !== contentHtml) {\n // We need to parse the HTML string into a DOM node, then give it to Twemoji.\n //\n // This prevents some issues with the default find-replace that would be performed\n // on a string passed to `Twemoji.parse()`.\n //\n // The parse function can only handle a single DOM node provided, so we need to\n // wrap it in a node. In our `parseHTML` implementation, we wrap it in a ``\n // element. This gets stripped below.\n //\n // See https://github.com/flarum/core/issues/2958\n const emojifiedDom = twemoji.parse(parseHTML(contentHtml), options);\n\n // Steal the HTML string inside the emojified DOM `` tag.\n this.emojifiedContentHtml = emojifiedDom.innerHTML;\n this.oldContentHtml = contentHtml;\n }\n return this.emojifiedContentHtml;\n });\n override(s9e.TextFormatter, 'preview', (original, text, element) => {\n original(text, element);\n twemoji.parse(element, options);\n });\n}","import app from 'flarum/forum/app';\nimport addComposerAutocomplete from './addComposerAutocomplete';\nimport renderEmoji from './renderEmoji';\napp.initializers.add('flarum-emoji', () => {\n // After typing ':' in the composer, show a dropdown suggesting a bunch of\n // emoji that the user could use.\n addComposerAutocomplete();\n\n // render emoji as image in Posts content and title.\n renderEmoji();\n});"],"names":["inProgress","dataWebpackPrefix","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","m","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","f","e","chunkId","Promise","all","keys","reduce","promises","u","g","globalThis","this","Function","window","obj","prop","prototype","hasOwnProperty","call","l","url","done","push","script","needAttach","scripts","document","getElementsByTagName","i","length","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","forEach","fn","setTimeout","bind","type","target","head","appendChild","r","Symbol","toStringTag","value","scriptUrl","importScripts","location","currentScript","Error","replace","p","compat","originalLoadChunk","flarum","reg","loadChunk","installedChunks","j","installedChunkData","promise","resolve","reject","error","errorType","realSrc","message","name","request","webpackJsonpCallback","parentChunkLoadingFunction","data","chunkIds","moreModules","runtime","some","id","chunkLoadingGlobal","self","_typeof","iterator","constructor","_defineProperty","arg","input","hint","prim","toPrimitive","res","TypeError","String","toPropertyKey","configurable","writable","AutocompleteDropdown","super","arguments","view","className","app","translator","trans","items","map","item","attrs","show","left","top","$","css","active","hide","navigate","delta","keyWasJustPressed","setIndex","index","keyWasJustPressedTimeout","complete","eq","find","click","scrollToItem","$dropdown","$items","rangedIndex","$item","removeClass","addClass","dropdownScroll","scrollTop","dropdownTop","offset","dropdownBottom","outerHeight","itemTop","itemBottom","parseInt","stop","animate","add","twemoji","base","ext","size","convert","fromCodePoint","codepoint","code","fromCharCode","toCodePoint","replaceChild","createText","alt","parse","what","how","callback","parseString","parseNode","defaultImageSrcGenerator","attributes","returnNull","folder","test","text","re","lastIndex","result","escaper","UFE0Fg","U200D","rescaper","shouldntBeParsed","clean","createTextNode","icon","options","concat","grabAllTextNodes","node","allText","subnode","nodeType","childNodes","nodeName","toLowerCase","grabTheRightIcon","rawText","indexOf","attrib","attrname","modified","fragment","match","img","iconId","createDocumentFragment","nodeValue","exec","slice","Image","hasAttribute","str","ret","replacer","unicodeSurrogates","sep","c","charCodeAt","toString","join","getEmojiIconCode","emoji","version","addChunkModule","loading","emojiMap","extend","_loaders","async","then","default","commonEmoji","emojiDropdown","$editor","wrap","navigator","when","onUp","onDown","onSelect","onCancel","bindTo","after","params","emojiKeys","autocompleteReader","inputListeners","selection","composer","editor","getSelectionRange","cursor","lastChunk","getLastNChars","autocompleting","check","typed","applySuggestion","replacement","replaceBeforeCursor","absoluteStart","makeSuggestion","_ref","onclick","onmouseenter","parent","draggable","cdn","title","similarEmoji","regTyped","reEscape","RegExp","fuzzyRegexp","maxSuggestions","findMatchingEmojis","matcher","curEmoji","names","emojiName","_this$commonEmoji","includes","suggestions","render","coordinates","getCaretCoordinates","width","outerWidth","height","offsetParent","Math","max","buildSuggestions","insertAtCursor","addComposerAutocomplete","override","original","contentHtml","oldContentHtml","emojifiedDom","tmp","implementation","createHTMLDocument","body","innerHTML","parseHTML","emojifiedContentHtml","s9e","TextFormatter","element"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/lock/js/dist/admin.js b/extensions/lock/js/dist/admin.js index 6b9d95884d..8b23ea0c64 100644 --- a/extensions/lock/js/dist/admin.js +++ b/extensions/lock/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var e={n:r=>{var o=r&&r.__esModule?()=>r.default:()=>r;return e.d(o,{a:o}),o},d:(r,o)=>{for(var t in o)e.o(o,t)&&!e.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:o[t]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};(()=>{"use strict";e.r(r),e.d(r,{extend:()=>l});const o=flarum.reg.get("core","admin/app");var t=e.n(o);const n=flarum.reg.get("core","common/extenders");var a=e.n(n);class s{pattern(){return"is:locked"}toFilter(e,r){return{[(r?"-":"")+"locked"]:!0}}filterKey(){return"locked"}fromFilter(e,r){return"".concat(r?"-":"","is:locked")}}flarum.reg.add("flarum-lock","common/query/discussions/LockedGambit",s);const l=[(new(a().Search)).gambit("discussions",s)];t().initializers.add("lock",(()=>{t().extensionData.for("flarum-lock").registerPermission({icon:"fas fa-lock",label:t().translator.trans("flarum-lock.admin.permissions.lock_discussions_label"),permission:"discussion.lock"},"moderate",95)}))})(),module.exports=r})(); +(()=>{var e={n:r=>{var o=r&&r.__esModule?()=>r.default:()=>r;return e.d(o,{a:o}),o},d:(r,o)=>{for(var a in o)e.o(o,a)&&!e.o(r,a)&&Object.defineProperty(r,a,{enumerable:!0,get:o[a]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};(()=>{"use strict";e.r(r),e.d(r,{extend:()=>m});const o=flarum.reg.get("core","admin/app");var a=e.n(o);const t=flarum.reg.get("core","common/extenders");var s=e.n(t);const n=flarum.reg.get("core","common/query/IGambit"),l=flarum.reg.get("core","common/app");var i=e.n(l);class c extends n.BooleanGambit{key(){return i().translator.trans("flarum-lock.lib.gambits.discussions.locked.key",{},!0)}filterKey(){return"locked"}}flarum.reg.add("flarum-lock","common/query/discussions/LockedGambit",c);const m=[(new(s().Search)).gambit("discussions",c)];a().initializers.add("lock",(()=>{a().extensionData.for("flarum-lock").registerPermission({icon:"fas fa-lock",label:a().translator.trans("flarum-lock.admin.permissions.lock_discussions_label"),permission:"discussion.lock"},"moderate",95)}))})(),module.exports=r})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/lock/js/dist/admin.js.map b/extensions/lock/js/dist/admin.js.map index c7ffb78c43..ba11e68eb4 100644 --- a/extensions/lock/js/dist/admin.js.map +++ b/extensions/lock/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,oB,aCA7C,MAAMW,EACnBC,UACE,MAAO,WACT,CACAC,SAASC,EAAUC,GAEjB,MAAO,CACL,EAFWA,EAAS,IAAM,IAAM,WAEzB,EAEX,CACAC,YACE,MAAO,QACT,CACAC,WAAWT,EAAOO,GAChB,MAAO,GAAGG,OAAOH,EAAS,IAAM,GAAI,YACtC,EAEFN,OAAOC,IAAIS,IAAI,cAAe,wCAAyCR,GCfvE,UAAgB,IAAI,aACnBS,OAAO,cAAeT,ICDvB,qBAAqB,QAAQ,KAC3B,sBAAsB,eAAeU,mBAAmB,CACtDC,KAAM,cACNC,MAAO,qBAAqB,wDAC5BC,WAAY,mBACX,WAAY,GAAG,G","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/lock/./src/common/query/discussions/LockedGambit.ts","webpack://@flarum/lock/./src/common/extend.ts","webpack://@flarum/lock/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","export default class LockedGambit {\n pattern() {\n return 'is:locked';\n }\n toFilter(_matches, negate) {\n const key = (negate ? '-' : '') + 'locked';\n return {\n [key]: true\n };\n }\n filterKey() {\n return 'locked';\n }\n fromFilter(value, negate) {\n return \"\".concat(negate ? '-' : '', \"is:locked\");\n }\n}\nflarum.reg.add('flarum-lock', 'common/query/discussions/LockedGambit', LockedGambit);","import Extend from 'flarum/common/extenders';\nimport LockedGambit from './query/discussions/LockedGambit';\nexport default [new Extend.Search() //\n.gambit('discussions', LockedGambit)];","import app from 'flarum/admin/app';\nexport { default as extend } from './extend';\napp.initializers.add('lock', () => {\n app.extensionData.for('flarum-lock').registerPermission({\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.admin.permissions.lock_discussions_label'),\n permission: 'discussion.lock'\n }, 'moderate', 95);\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","LockedGambit","pattern","toFilter","_matches","negate","filterKey","fromFilter","concat","add","gambit","registerPermission","icon","label","permission"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,oB,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,wBCAtD,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,c,aCE7C,MAAMW,UAAqB,EAAAC,cACxCjB,MACE,OAAO,qBAAqB,iDAAkD,CAAC,GAAG,EACpF,CACAkB,YACE,MAAO,QACT,EAEFJ,OAAOC,IAAII,IAAI,cAAe,wCAAyCH,GCRvE,UAAgB,IAAI,aACnBI,OAAO,cAAeJ,ICDvB,qBAAqB,QAAQ,KAC3B,sBAAsB,eAAeK,mBAAmB,CACtDC,KAAM,cACNC,MAAO,qBAAqB,wDAC5BC,WAAY,mBACX,WAAY,GAAG,G","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'admin/app')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/query/IGambit')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/lock/./src/common/query/discussions/LockedGambit.ts","webpack://@flarum/lock/./src/common/extend.ts","webpack://@flarum/lock/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'admin/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/query/IGambit');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/app');","import { BooleanGambit } from 'flarum/common/query/IGambit';\nimport app from 'flarum/common/app';\nexport default class LockedGambit extends BooleanGambit {\n key() {\n return app.translator.trans('flarum-lock.lib.gambits.discussions.locked.key', {}, true);\n }\n filterKey() {\n return 'locked';\n }\n}\nflarum.reg.add('flarum-lock', 'common/query/discussions/LockedGambit', LockedGambit);","import Extend from 'flarum/common/extenders';\nimport LockedGambit from './query/discussions/LockedGambit';\nexport default [new Extend.Search() //\n.gambit('discussions', LockedGambit)];","import app from 'flarum/admin/app';\nexport { default as extend } from './extend';\napp.initializers.add('lock', () => {\n app.extensionData.for('flarum-lock').registerPermission({\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.admin.permissions.lock_discussions_label'),\n permission: 'discussion.lock'\n }, 'moderate', 95);\n});"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","LockedGambit","BooleanGambit","filterKey","add","gambit","registerPermission","icon","label","permission"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/lock/js/dist/forum.js b/extensions/lock/js/dist/forum.js index 92910ecaf4..68f564d678 100644 --- a/extensions/lock/js/dist/forum.js +++ b/extensions/lock/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var o={n:t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},d:(t,e)=>{for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{extend:()=>S});const e=flarum.reg.get("core","common/extend"),n=flarum.reg.get("core","forum/app");var r=o.n(n);const s=flarum.reg.get("core","forum/components/Notification");var c=o.n(s);class a extends(c()){icon(){return"fas fa-lock"}href(){const o=this.attrs.notification;return r().route.discussion(o.subject(),o.content().postNumber)}content(){return r().translator.trans("flarum-lock.forum.notifications.discussion_locked_text",{user:this.attrs.notification.fromUser()})}excerpt(){return null}}flarum.reg.add("flarum-lock","forum/components/DiscussionLockedNotification",a);const i=flarum.reg.get("core","common/models/Discussion");var l=o.n(i);const u=flarum.reg.get("core","common/components/Badge");var d=o.n(u);const f=flarum.reg.get("core","forum/utils/DiscussionControls");var k=o.n(f);const g=flarum.reg.get("core","forum/components/DiscussionPage");var p=o.n(g);const b=flarum.reg.get("core","common/components/Button");var _=o.n(b);const y=flarum.reg.get("core","common/extenders");var v=o.n(y);const L=flarum.reg.get("core","forum/components/EventPost");var h=o.n(L);class x extends(h()){icon(){return this.attrs.post.content().locked?"fas fa-lock":"fas fa-unlock"}descriptionKey(){return this.attrs.post.content().locked?"flarum-lock.forum.post_stream.discussion_locked_text":"flarum-lock.forum.post_stream.discussion_unlocked_text"}}flarum.reg.add("flarum-lock","forum/components/DiscussionLockedPost",x);class P{pattern(){return"is:locked"}toFilter(o,t){return{[(t?"-":"")+"locked"]:!0}}filterKey(){return"locked"}fromFilter(o,t){return"".concat(t?"-":"","is:locked")}}flarum.reg.add("flarum-lock","common/query/discussions/LockedGambit",P);const S=[(new(v().Search)).gambit("discussions",P),(new(v().PostTypes)).add("discussionLocked",x),new(v().Model)(l()).attribute("isLocked").attribute("canLock")];r().initializers.add("flarum-lock",(()=>{r().notificationComponents.discussionLocked=a,(0,e.extend)(l().prototype,"badges",(function(o){this.isLocked()&&o.add("locked",m(d(),{type:"locked",label:r().translator.trans("flarum-lock.forum.badge.locked_tooltip"),icon:"fas fa-lock"}))})),(0,e.extend)(k(),"moderationControls",(function(o,t){t.canLock()&&o.add("lock",m(_(),{icon:"fas fa-lock",onclick:this.lockAction.bind(t)},r().translator.trans("flarum-lock.forum.discussion_controls.".concat(t.isLocked()?"unlock":"lock","_button"))))})),k().lockAction=function(){this.save({isLocked:!this.isLocked()}).then((()=>{r().current.matches(p())&&r().current.get("stream").update(),m.redraw()}))},(0,e.extend)("flarum/forum/components/NotificationGrid","notificationTypes",(function(o){o.add("discussionLocked",{name:"discussionLocked",icon:"fas fa-lock",label:r().translator.trans("flarum-lock.forum.settings.notify_discussion_locked_label")})}))}))})(),module.exports=t})(); +(()=>{var o={n:e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},d:(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(o,e)=>Object.prototype.hasOwnProperty.call(o,e),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},e={};(()=>{"use strict";o.r(e),o.d(e,{extend:()=>D});const t=flarum.reg.get("core","common/extend"),n=flarum.reg.get("core","forum/app");var r=o.n(n);const s=flarum.reg.get("core","forum/components/Notification");var c=o.n(s);class a extends(c()){icon(){return"fas fa-lock"}href(){const o=this.attrs.notification;return r().route.discussion(o.subject(),o.content().postNumber)}content(){return r().translator.trans("flarum-lock.forum.notifications.discussion_locked_text",{user:this.attrs.notification.fromUser()})}excerpt(){return null}}flarum.reg.add("flarum-lock","forum/components/DiscussionLockedNotification",a);const i=flarum.reg.get("core","common/models/Discussion");var l=o.n(i);const u=flarum.reg.get("core","common/components/Badge");var d=o.n(u);const f=flarum.reg.get("core","forum/utils/DiscussionControls");var k=o.n(f);const g=flarum.reg.get("core","forum/components/DiscussionPage");var p=o.n(g);const b=flarum.reg.get("core","common/components/Button");var y=o.n(b);const _=flarum.reg.get("core","common/extenders");var v=o.n(_);const x=flarum.reg.get("core","forum/components/EventPost");var L=o.n(x);class h extends(L()){icon(){return this.attrs.post.content().locked?"fas fa-lock":"fas fa-unlock"}descriptionKey(){return this.attrs.post.content().locked?"flarum-lock.forum.post_stream.discussion_locked_text":"flarum-lock.forum.post_stream.discussion_unlocked_text"}}flarum.reg.add("flarum-lock","forum/components/DiscussionLockedPost",h);const P=flarum.reg.get("core","common/query/IGambit"),S=flarum.reg.get("core","common/app");var j=o.n(S);class w extends P.BooleanGambit{key(){return j().translator.trans("flarum-lock.lib.gambits.discussions.locked.key",{},!0)}filterKey(){return"locked"}}flarum.reg.add("flarum-lock","common/query/discussions/LockedGambit",w);const D=[(new(v().Search)).gambit("discussions",w),(new(v().PostTypes)).add("discussionLocked",h),new(v().Model)(l()).attribute("isLocked").attribute("canLock")];r().initializers.add("flarum-lock",(()=>{r().notificationComponents.discussionLocked=a,(0,t.extend)(l().prototype,"badges",(function(o){this.isLocked()&&o.add("locked",m(d(),{type:"locked",label:r().translator.trans("flarum-lock.forum.badge.locked_tooltip"),icon:"fas fa-lock"}))})),(0,t.extend)(k(),"moderationControls",(function(o,e){e.canLock()&&o.add("lock",m(y(),{icon:"fas fa-lock",onclick:this.lockAction.bind(e)},r().translator.trans("flarum-lock.forum.discussion_controls.".concat(e.isLocked()?"unlock":"lock","_button"))))})),k().lockAction=function(){this.save({isLocked:!this.isLocked()}).then((()=>{r().current.matches(p())&&r().current.get("stream").update(),m.redraw()}))},(0,t.extend)("flarum/forum/components/NotificationGrid","notificationTypes",(function(o){o.add("discussionLocked",{name:"discussionLocked",icon:"fas fa-lock",label:r().translator.trans("flarum-lock.forum.settings.notify_discussion_locked_label")})}))}))})(),module.exports=e})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/lock/js/dist/forum.js.map b/extensions/lock/js/dist/forum.js.map index 1f68c6c562..00e50cf7d7 100644 --- a/extensions/lock/js/dist/forum.js.map +++ b/extensions/lock/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,iBCAtD,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,iC,aCE7C,MAAMW,UAAqC,KACxDC,OACE,MAAO,aACT,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CAA8C1B,GCF9C,IAAA2B,QAAO,cAAsB,UAAU,SAAUC,GAC3CxB,KAAKyB,YACPD,EAAOhB,IAAI,SAAUkB,EAAE,IAAO,CAC5BC,KAAM,SACNC,MAAO,qBAAqB,0CAC5B/B,KAAM,gBAGZ,KCPA,IAAA0B,QAAO,IAAoB,sBAAsB,SAAUM,EAAOC,GAC5DA,EAAWC,WACbF,EAAMrB,IAAI,OAAQkB,EAAE,IAAQ,CAC1B7B,KAAM,cACNmC,QAAShC,KAAKiC,WAAWC,KAAKJ,IAC7B,qBAAqB,yCAAyCV,OAAOU,EAAWL,WAAa,SAAW,OAAQ,aAEvH,IACA,eAAgC,WAC9BzB,KAAKmC,KAAK,CACRV,UAAWzB,KAAKyB,aACfW,MAAK,KACF,oBAAoB,MACtB,gBAAgB,UAAUC,SAE5BX,EAAEY,QAAQ,GAEd,GFbA,IAAAf,QAAO,2CAA4C,qBAAqB,SAAUM,GAChFA,EAAMrB,IAAI,mBAAoB,CAC5B+B,KAAM,mBACN1C,KAAM,cACN+B,MAAO,qBAAqB,8DAEhC,GAAE,G","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/Notification')\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedNotification.js","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/DiscussionPage')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/EventPost')\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedPost.js","webpack://@flarum/lock/./src/common/query/discussions/LockedGambit.ts","webpack://@flarum/lock/./src/common/extend.ts","webpack://@flarum/lock/./src/forum/extend.ts","webpack://@flarum/lock/./src/forum/index.js","webpack://@flarum/lock/./src/forum/addLockBadge.js","webpack://@flarum/lock/./src/forum/addLockControl.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Notification');","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nexport default class DiscussionLockedNotification extends Notification {\n icon() {\n return 'fas fa-lock';\n }\n href() {\n const notification = this.attrs.notification;\n return app.route.discussion(notification.subject(), notification.content().postNumber);\n }\n content() {\n return app.translator.trans('flarum-lock.forum.notifications.discussion_locked_text', {\n user: this.attrs.notification.fromUser()\n });\n }\n excerpt() {\n return null;\n }\n}\nflarum.reg.add('flarum-lock', 'forum/components/DiscussionLockedNotification', DiscussionLockedNotification);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/EventPost');","import EventPost from 'flarum/forum/components/EventPost';\nexport default class DiscussionLockedPost extends EventPost {\n icon() {\n return this.attrs.post.content().locked ? 'fas fa-lock' : 'fas fa-unlock';\n }\n descriptionKey() {\n return this.attrs.post.content().locked ? 'flarum-lock.forum.post_stream.discussion_locked_text' : 'flarum-lock.forum.post_stream.discussion_unlocked_text';\n }\n}\nflarum.reg.add('flarum-lock', 'forum/components/DiscussionLockedPost', DiscussionLockedPost);","export default class LockedGambit {\n pattern() {\n return 'is:locked';\n }\n toFilter(_matches, negate) {\n const key = (negate ? '-' : '') + 'locked';\n return {\n [key]: true\n };\n }\n filterKey() {\n return 'locked';\n }\n fromFilter(value, negate) {\n return \"\".concat(negate ? '-' : '', \"is:locked\");\n }\n}\nflarum.reg.add('flarum-lock', 'common/query/discussions/LockedGambit', LockedGambit);","import Extend from 'flarum/common/extenders';\nimport LockedGambit from './query/discussions/LockedGambit';\nexport default [new Extend.Search() //\n.gambit('discussions', LockedGambit)];","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionLockedPost from './components/DiscussionLockedPost';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.PostTypes() //\n.add('discussionLocked', DiscussionLockedPost), new Extend.Model(Discussion) //\n.attribute('isLocked').attribute('canLock')];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport DiscussionLockedNotification from './components/DiscussionLockedNotification';\nimport addLockBadge from './addLockBadge';\nimport addLockControl from './addLockControl';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-lock', () => {\n app.notificationComponents.discussionLocked = DiscussionLockedNotification;\n addLockBadge();\n addLockControl();\n extend('flarum/forum/components/NotificationGrid', 'notificationTypes', function (items) {\n items.add('discussionLocked', {\n name: 'discussionLocked',\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.forum.settings.notify_discussion_locked_label')\n });\n });\n});","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\nexport default function addLockBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.isLocked()) {\n badges.add('locked', m(Badge, {\n type: \"locked\",\n label: app.translator.trans('flarum-lock.forum.badge.locked_tooltip'),\n icon: \"fas fa-lock\"\n }));\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\nexport default function addLockControl() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canLock()) {\n items.add('lock', m(Button, {\n icon: \"fas fa-lock\",\n onclick: this.lockAction.bind(discussion)\n }, app.translator.trans(\"flarum-lock.forum.discussion_controls.\".concat(discussion.isLocked() ? 'unlock' : 'lock', \"_button\"))));\n }\n });\n DiscussionControls.lockAction = function () {\n this.save({\n isLocked: !this.isLocked()\n }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n m.redraw();\n });\n };\n}"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","DiscussionLockedNotification","icon","href","notification","this","attrs","subject","content","postNumber","user","fromUser","excerpt","add","DiscussionLockedPost","post","locked","descriptionKey","LockedGambit","pattern","toFilter","_matches","negate","filterKey","fromFilter","concat","gambit","attribute","extend","badges","isLocked","m","type","label","items","discussion","canLock","onclick","lockAction","bind","save","then","update","redraw","name"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,iBCAtD,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,iC,aCE7C,MAAMW,UAAqC,KACxDC,OACE,MAAO,aACT,CACAC,OACE,MAAMC,EAAeC,K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cAAsB,UAAU,SAAUC,GAC3CnB,KAAKoB,YACPD,EAAOX,IAAI,SAAUa,EAAE,IAAO,CAC5BC,KAAM,SACNC,MAAO,qBAAqB,0CAC5B1B,KAAM,gBAGZ,KCPA,IAAAqB,QAAO,IAAoB,sBAAsB,SAAUM,EAAOC,GAC5DA,EAAWC,WACbF,EAAMhB,IAAI,OAAQa,EAAE,IAAQ,CAC1BxB,KAAM,cACN8B,QAAS3B,KAAK4B,WAAWC,KAAKJ,IAC7B,qBAAqB,yCAAyCK,OAAOL,EAAWL,WAAa,SAAW,OAAQ,aAEvH,IACA,eAAgC,WAC9BpB,KAAK+B,KAAK,CACRX,UAAWpB,KAAKoB,aACfY,MAAK,KACF,oBAAoB,MACtB,gBAAgB,UAAUC,SAE5BZ,EAAEa,QAAQ,GAEd,GFbA,IAAAhB,QAAO,2CAA4C,qBAAqB,SAAUM,GAChFA,EAAMhB,IAAI,mBAAoB,CAC5B2B,KAAM,mBACNtC,KAAM,cACN0B,MAAO,qBAAqB,8DAEhC,GAAE,G","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/Notification')\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedNotification.js","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/DiscussionPage')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/EventPost')\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedPost.js","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/query/IGambit')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/lock/./src/common/query/discussions/LockedGambit.ts","webpack://@flarum/lock/./src/common/extend.ts","webpack://@flarum/lock/./src/forum/extend.ts","webpack://@flarum/lock/./src/forum/index.js","webpack://@flarum/lock/./src/forum/addLockBadge.js","webpack://@flarum/lock/./src/forum/addLockControl.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Notification');","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nexport default class DiscussionLockedNotification extends Notification {\n icon() {\n return 'fas fa-lock';\n }\n href() {\n const notification = this.attrs.notification;\n return app.route.discussion(notification.subject(), notification.content().postNumber);\n }\n content() {\n return app.translator.trans('flarum-lock.forum.notifications.discussion_locked_text', {\n user: this.attrs.notification.fromUser()\n });\n }\n excerpt() {\n return null;\n }\n}\nflarum.reg.add('flarum-lock', 'forum/components/DiscussionLockedNotification', DiscussionLockedNotification);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/EventPost');","import EventPost from 'flarum/forum/components/EventPost';\nexport default class DiscussionLockedPost extends EventPost {\n icon() {\n return this.attrs.post.content().locked ? 'fas fa-lock' : 'fas fa-unlock';\n }\n descriptionKey() {\n return this.attrs.post.content().locked ? 'flarum-lock.forum.post_stream.discussion_locked_text' : 'flarum-lock.forum.post_stream.discussion_unlocked_text';\n }\n}\nflarum.reg.add('flarum-lock', 'forum/components/DiscussionLockedPost', DiscussionLockedPost);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/query/IGambit');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/app');","import { BooleanGambit } from 'flarum/common/query/IGambit';\nimport app from 'flarum/common/app';\nexport default class LockedGambit extends BooleanGambit {\n key() {\n return app.translator.trans('flarum-lock.lib.gambits.discussions.locked.key', {}, true);\n }\n filterKey() {\n return 'locked';\n }\n}\nflarum.reg.add('flarum-lock', 'common/query/discussions/LockedGambit', LockedGambit);","import Extend from 'flarum/common/extenders';\nimport LockedGambit from './query/discussions/LockedGambit';\nexport default [new Extend.Search() //\n.gambit('discussions', LockedGambit)];","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionLockedPost from './components/DiscussionLockedPost';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.PostTypes() //\n.add('discussionLocked', DiscussionLockedPost), new Extend.Model(Discussion) //\n.attribute('isLocked').attribute('canLock')];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport DiscussionLockedNotification from './components/DiscussionLockedNotification';\nimport addLockBadge from './addLockBadge';\nimport addLockControl from './addLockControl';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-lock', () => {\n app.notificationComponents.discussionLocked = DiscussionLockedNotification;\n addLockBadge();\n addLockControl();\n extend('flarum/forum/components/NotificationGrid', 'notificationTypes', function (items) {\n items.add('discussionLocked', {\n name: 'discussionLocked',\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.forum.settings.notify_discussion_locked_label')\n });\n });\n});","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\nexport default function addLockBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.isLocked()) {\n badges.add('locked', m(Badge, {\n type: \"locked\",\n label: app.translator.trans('flarum-lock.forum.badge.locked_tooltip'),\n icon: \"fas fa-lock\"\n }));\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\nexport default function addLockControl() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canLock()) {\n items.add('lock', m(Button, {\n icon: \"fas fa-lock\",\n onclick: this.lockAction.bind(discussion)\n }, app.translator.trans(\"flarum-lock.forum.discussion_controls.\".concat(discussion.isLocked() ? 'unlock' : 'lock', \"_button\"))));\n }\n });\n DiscussionControls.lockAction = function () {\n this.save({\n isLocked: !this.isLocked()\n }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n m.redraw();\n });\n };\n}"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","DiscussionLockedNotification","icon","href","notification","this","attrs","subject","content","postNumber","user","fromUser","excerpt","add","DiscussionLockedPost","post","locked","descriptionKey","LockedGambit","BooleanGambit","filterKey","gambit","attribute","extend","badges","isLocked","m","type","label","items","discussion","canLock","onclick","lockAction","bind","concat","save","then","update","redraw","name"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/mentions/js/dist/forum.js b/extensions/mentions/js/dist/forum.js index 4925789d8e..141fca3939 100644 --- a/extensions/mentions/js/dist/forum.js +++ b/extensions/mentions/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e),t.d(e,{extend:()=>Wt,filterGroupMentions:()=>Qt,filterPostMentions:()=>Jt,filterTagMentions:()=>Yt,filterUserMentions:()=>qt,postFilterGroupMentions:()=>Xt,postFilterPostMentions:()=>zt,postFilterTagMentions:()=>Kt,postFilterUserMentions:()=>Ot});const n=flarum.reg.get("core","common/extend"),o=flarum.reg.get("core","forum/app");var s=t.n(o);const r=flarum.reg.get("core","common/utils/string"),i=flarum.reg.get("core","common/helpers/textContrastClass");var a=t.n(i);const u=flarum.reg.get("core","forum/components/Post");var l=t.n(u);const c=flarum.reg.get("core","forum/components/CommentPost");var d=t.n(c);const f=flarum.reg.get("core","forum/components/PostPreview");var p=t.n(f);const h=flarum.reg.get("core","common/components/LoadingIndicator");var g=t.n(h);const b=flarum.reg.get("core","common/components/Link");var y=t.n(b);const v=flarum.reg.get("core","common/helpers/punctuateSeries");var w=t.n(v);const M=flarum.reg.get("core","common/helpers/username");var x=t.n(M);const P=flarum.reg.get("core","common/components/Icon");var C=t.n(P);const T=flarum.reg.get("core","common/components/Button");var A=t.n(T);const B=flarum.reg.get("core","common/components/Modal");var D=t.n(B);const _=flarum.reg.get("core","common/states/PaginatedListState");var N=t.n(_);class S extends(N()){constructor(t,e){void 0===e&&(e=1),t.page={...t.page||{},limit:10},super(t,e,10)}get type(){return"posts"}}flarum.reg.add("flarum-mentions","forum/state/MentionedByModalState",S);const k=flarum.reg.get("core","common/components/Form");var F=t.n(k);class I extends(D()){oninit(t){super.oninit(t),this.state=new S({filter:{mentionedPost:this.attrs.post.id()},sort:"number"}),this.state.refresh()}className(){return"MentionedByModal"}title(){return s().translator.trans("flarum-mentions.forum.mentioned_by.title")}content(){return m("[",null,m("div",{className:"Modal-body"},this.state.isInitialLoading()?m(g(),null):m("[",null,m("ul",{className:"MentionedByModal-list Dropdown-menu Dropdown-menu--inline Post-mentionedBy-preview"},this.state.getPages().map((t=>t.items.map((t=>m("li",{"data-number":t.number()},m(p(),{post:t,onclick:()=>s().modal.close()}))))))))),this.state.hasNext()&&m("div",{className:"Modal-footer"},m(F(),{className:"Form--centered"},m("div",{className:"Form-group"},m(A(),{className:"Button Button--block",onclick:()=>this.state.loadNext(),loading:this.state.isLoadingNext()},s().translator.trans("flarum-mentions.forum.mentioned_by.load_more_button"))))))}}flarum.reg.add("flarum-mentions","forum/components/MentionedByModal",I);const L=flarum.reg.get("core","forum/utils/DiscussionControls");var R=t.n(L);function U(t,e,n){return new Promise((o=>{const r=s().mentionFormats.mentionable("post").replacement(t)+" ";e.fields.content()||(e.body.attrs.originalContent=r);const i=e.editor.getSelectionRange()[0],a=e.fields.content().slice(0,i),m=0==a.length?0:3-a.match(/(\n{0,2})$/)[0].length;return e.editor.insertAtCursor(Array(m).join("\n")+(n?"> "+r+n.trim().replace(/\n/g,"\n> ")+"\n\n":r),!1),o(e)}))}function j(t,e){const n=flarum.reg.checkModule("core","forum/components/EditPostComposer");return n&&s().composer.bodyMatches(n)&&s().composer.body.attrs.post.discussion()===t.discussion()?U(t,s().composer,e):R().replyAction.call(t.discussion()).then((n=>U(t,n,e)))}flarum.reg.add("flarum-mentions","forum/utils/reply",j);const E=flarum.reg.get("core","common/Fragment");var H=t.n(E);class G extends(H()){constructor(t){super(),this.post=t}view(){return m("button",{className:"Button PostQuoteButton",onclick:()=>{j(this.post,this.content)}},m(C(),{name:"fas fa-quote-left",className:"Button-icon"}),s().translator.trans("flarum-mentions.forum.post.quote_button"))}show(t,e){const n=this.$().show(),o=n.offsetParent().offset();n.css("left",t-o.left).css("top",e-o.top),this.hideHandler=this.hide.bind(this),$(document).on("mouseup",this.hideHandler)}showStart(t,e){const n=this.$();this.show(t,$(window).scrollTop()+e-n.outerHeight()-5)}showEnd(t,e){const n=this.$();this.show(t-n.outerWidth(),$(window).scrollTop()+e+5)}hide(){this.$().hide(),$(document).off("mouseup",this.hideHandler)}}function W(t){const e=window.getSelection();if(!e.isCollapsed){const n=e.getRangeAt(0),o=n.commonAncestorContainer;if(t[0]===o||$.contains(t[0],o)){const t=$("
").append(n.cloneContents());return t.find("img.emoji").replaceWith((function(){return this.alt})),t.find("img").replaceWith((function(){return"![](".concat(this.src,")")})),t.find("a").replaceWith((function(){return"[".concat(this.innerText,"](").concat(this.href,")")})),t.text()}}return""}flarum.reg.add("flarum-mentions","forum/fragments/PostQuoteButton",G),flarum.reg.add("flarum-mentions","forum/utils/selectedText",W);const q=flarum.reg.get("core","common/components/TextEditorButton");var O=t.n(q);const J=flarum.reg.get("core","common/utils/KeyboardNavigatable");var z=t.n(J);function Q(t){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q(t)}function X(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==Q(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!==Q(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===Q(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Y extends(H()){constructor(){super(...arguments),X(this,"items",[]),X(this,"active",!1),X(this,"index",0),X(this,"keyWasJustPressed",!1)}view(){return m("ul",{className:"Dropdown-menu MentionsDropdown"},this.items.map((t=>m("li",null,t))))}show(t,e){this.$().show().css({left:t+"px",top:e+"px"}),this.active=!0}hide(){this.$().hide(),this.active=!1}navigate(t){this.keyWasJustPressed=!0,this.setIndex(this.index+t,!0),clearTimeout(this.keyWasJustPressedTimeout),this.keyWasJustPressedTimeout=setTimeout((()=>this.keyWasJustPressed=!1),500)}complete(){this.$("li").eq(this.index).find("button").click()}setIndex(t,e){if(this.keyWasJustPressed&&!e)return;const n=this.$(),o=n.find("li");let s=t;s<0?s=o.length-1:s>=o.length&&(s=0),this.index=s;const r=o.removeClass("active").eq(s).addClass("active");if(e){const t=n.scrollTop(),e=n.offset().top,o=e+n.outerHeight(),s=r.offset().top,i=s+r.outerHeight();let a;so&&(a=t-o+i+parseInt(n.css("padding-bottom"),10)),void 0!==a&&n.stop(!0).animate({scrollTop:a},100)}}}flarum.reg.add("flarum-mentions","forum/fragments/AutocompleteDropdown",Y);const K=flarum.reg.get("core","common/Component");var V=t.n(K);const Z=flarum.reg.get("core","common/utils/classList");var tt=t.n(Z);class et extends(V()){view(t){const{mentionable:e,...n}=this.attrs,o=tt()("MentionsDropdownItem","PostPreview","MentionsDropdown-".concat(e.type()));return m("button",Object.assign({className:o},n),m("span",{className:"PostPreview-content"},t.children))}}flarum.reg.add("flarum-mentions","forum/components/MentionsDropdownItem",et);const nt=flarum.reg.get("core","common/utils/throttleDebounce");class ot{constructor(t){X(this,"mentionables",void 0),X(this,"results",{}),X(this,"typed",null),X(this,"searched",[]),X(this,"dropdownItemAttrs",{}),X(this,"search",(0,nt.throttle)(250,(async()=>{if(!this.typed||this.typed.length<=1)return;const t=this.typed.toLowerCase();if(!this.searched.includes(t)){for(const e of this.mentionables)for(const n of await e.search(t))this.results[e.type()].has(n.id())||this.results[e.type()].set(n.id(),n);return this.searched.push(t),Promise.resolve()}}))),this.dropdownItemAttrs=t}init(t){this.typed=null,this.mentionables=t;for(const t of this.mentionables)this.results[t.type()]=new Map(t.initialResults().map((t=>[t.id(),t])))}matches(t,e){var n;return t.matches(e,(null==(n=this.typed)?void 0:n.toLowerCase())||"")}makeSuggestion(t,e){const n=t.suggestion(e,this.typed),o=t.replacement(e),{onclick:s,...r}=this.dropdownItemAttrs;return m(et,Object.assign({mentionable:t,onclick:()=>s(o)},r),n)}buildSuggestions(){const t=[];for(const e of this.mentionables){if(!e.enabled())continue;let n=Array.from(this.results[e.type()].values()).filter((t=>this.matches(e,t)));const o=e.maxStoreMatchedResults();o&&(n=n.splice(0,o));for(const o of n){const n=this.makeSuggestion(e,o);t.push(n)}}return t}}flarum.reg.add("flarum-mentions","forum/mentionables/MentionableModels",ot);const st=flarum.reg.get("core","forum/components/Notification");var rt=t.n(st);class it extends(rt()){icon(){return"fas fa-reply"}href(){const t=this.attrs.notification,e=t.subject(),n=t.content();return s().route.discussion(e.discussion(),n&&n.replyNumber)}content(){const t=this.attrs.notification.fromUser();return s().translator.trans("flarum-mentions.forum.notifications.post_mentioned_text",{user:t,count:1})}excerpt(){return(0,r.truncate)(this.attrs.notification.subject().contentPlain()||"",200)}}flarum.reg.add("flarum-mentions","forum/components/PostMentionedNotification",it);class at extends(rt()){icon(){return"fas fa-at"}href(){const t=this.attrs.notification.subject();return s().route.discussion(t.discussion(),t.number())}content(){const t=this.attrs.notification.fromUser();return s().translator.trans("flarum-mentions.forum.notifications.user_mentioned_text",{user:t})}excerpt(){return(0,r.truncate)(this.attrs.notification.subject().contentPlain(),200)}}flarum.reg.add("flarum-mentions","forum/components/UserMentionedNotification",at);class mt extends(rt()){icon(){return"fas fa-at"}href(){const t=this.attrs.notification.subject();return s().route.discussion(t.discussion(),t.number())}content(){const t=this.attrs.notification.fromUser();return s().translator.trans("flarum-mentions.forum.notifications.group_mentioned_text",{user:t})}excerpt(){return(0,r.truncate)(this.attrs.notification.subject().contentPlain(),200)}}flarum.reg.add("flarum-mentions","forum/components/GroupMentionedNotification",mt);class ut{constructor(){X(this,"instances",void 0),X(this,"mentionables",void 0),X(this,"extendable",void 0)}makeMentionables(){var t;return null!=(t=this.instances)?t:this.instances=this.mentionables.map((t=>new t(this)))}getMentionable(t){var e;return null!=(e=this.makeMentionables().find((e=>e.type()===t)))?e:null}extend(t){if(!this.extendable)throw new Error("This mention format does not allow extending.");this.mentionables.push(t)}}flarum.reg.add("flarum-mentions","forum/mentionables/formats/MentionFormat",ut);const lt=flarum.reg.get("core","common/components/Avatar");var ct=t.n(lt);const dt=flarum.reg.get("core","common/helpers/highlight");var ft=t.n(dt);class pt{constructor(t){X(this,"format",void 0),this.format=t}}flarum.reg.add("flarum-mentions","forum/mentionables/MentionableModel",pt);const ht=flarum.reg.get("core","common/utils/extractText");var gt=t.n(ht);const bt=()=>gt()(s().translator.trans("core.lib.username.deleted_text"));function yt(t,e){return void 0===e&&(e=!0),t?((e?t.displayName():t.username())||bt()).replace(/"#[a-z]{0,3}[0-9]+/,"_"):bt().replace(/"#[a-z]{0,3}[0-9]+/,"_")}flarum.reg.add("flarum-mentions","forum/utils/getCleanDisplayName",yt);class vt extends pt{type(){return"user"}initialResults(){return Array.from(s().store.all("users"))}replacement(t){if(s().forum.attribute("allowUsernameMentionFormat")){const e=yt(t,!1);return this.format.format(e)}const e=yt(t);return this.format.format(e,"",t.id())}suggestion(t,e){const n=x()(t,(t=>ft()(t,e)));return m("[",null,m(ct(),{user:t}),n)}matches(t,e){return!!e&&[t.username(),t.displayName()].some((t=>t.toLowerCase().substr(0,e.length)===e))}maxStoreMatchedResults(){return null}async search(t){return await s().store.find("users",{filter:{q:t},page:{limit:5}})}enabled(){return!0}}flarum.reg.add("flarum-mentions","forum/mentionables/UserMention",vt);class wt extends pt{type(){return"post"}initialResults(){const t=flarum.reg.checkModule("core","forum/components/EditPostComposer"),e=flarum.reg.checkModule("core","forum/components/ReplyComposer");if(!(e&&s().composer.bodyMatches(e)||t&&s().composer.bodyMatches(t)))return[];const n=s().composer.body.attrs,o=n.post;return(o&&o.discussion()||n.discussion).posts().filter((t=>t&&"comment"===t.contentType()&&(!o||t.number()e.createdAt().getTime()-t.createdAt().getTime()))}replacement(t){const e=yt(t.user());return this.format.format(e,"p",t.id())}suggestion(t,e){var n;const o=t.user()||null,i=x()(o,(t=>ft()(t,e)));return m("[",null,m(ct(),{user:o}),i,[s().translator.trans("flarum-mentions.forum.composer.reply_to_post_text",{number:t.number()})," — ",(0,r.truncate)(null!=(n=t.contentPlain())?n:"",200)])}matches(t,e){const n=t.user(),o=s().mentionFormats.mentionable("user");return!e||n&&o.matches(n,e)}maxStoreMatchedResults(){return 5}search(t){return Promise.resolve([])}enabled(){return!0}}flarum.reg.add("flarum-mentions","forum/mentionables/PostMention",wt);const Mt=flarum.reg.get("core","common/models/Group");var xt=t.n(Mt);const Pt=flarum.reg.get("core","common/components/Badge");var Ct=t.n(Pt);class Tt extends pt{type(){return"group"}initialResults(){return Array.from(s().store.all("groups").filter((t=>t.id()!==xt().GUEST_ID&&t.id()!==xt().MEMBER_ID)))}replacement(t){return this.format.format(t.namePlural(),"g",t.id())}suggestion(t,e){let n=t.namePlural();return e&&(n=ft()(n,e)),m("[",null,m(Ct(),{className:"Avatar Badge Badge--group--".concat(t.id()," Badge-icon"),color:t.color(),type:"group",icon:t.icon()}),m("span",{className:"username"},n))}matches(t,e){return!!e&&[t.namePlural().toLowerCase(),t.nameSingular().toLowerCase()].some((t=>t.toLowerCase().substr(0,e.length)===e))}maxStoreMatchedResults(){return null}search(t){return Promise.resolve([])}enabled(){var t,e,n;return null!=(t=null==(e=s().session)||null==(n=e.user)?void 0:n.canMentionGroups())&&t}}flarum.reg.add("flarum-mentions","forum/mentionables/GroupMention",Tt);class At extends ut{constructor(){super(...arguments),X(this,"mentionables",[vt,wt,Tt]),X(this,"extendable",!0)}trigger(){return"@"}queryFromTyped(t){const e=t.match(/^["“]?((?:(?!"#).)+)$/);return e?e[1]:null}format(t,e,n){return void 0===e&&(e=""),void 0===n&&(n=null),{simple:"@".concat(t),safe:'@"'.concat(t,'"#').concat(e).concat(n)}[n?"safe":"simple"]}}flarum.reg.add("flarum-mentions","forum/mentionables/formats/AtMentionFormat",At);class Bt extends pt{type(){return"tag"}initialResults(){return Array.from(s().store.all("tags"))}replacement(t){return this.format.format(t.slug())}matches(t,e){return!!e&&[t.name().toLowerCase()].some((t=>t.toLowerCase().substr(0,e.length)===e))}maxStoreMatchedResults(){return null}async search(t){return await s().store.find("tags",{filter:{q:t},page:{limit:5}})}suggestion(t,e){let n=t.name();return e&&(n=ft()(n,e)),m("[",null,m(Ct(),{className:"Avatar",icon:t.icon(),color:t.color(),type:"tag"}),m("span",{className:"username"},n))}enabled(){return"flarum-tags"in flarum.extensions}}flarum.reg.add("flarum-mentions","forum/mentionables/TagMention",Bt);class $t extends ut{constructor(){super(...arguments),X(this,"mentionables",[Bt]),X(this,"extendable",!0)}trigger(){return"#"}queryFromTyped(t){const e=t.match(/^[-_\p{L}\p{N}\p{M}]+$/giu);return e?e[0]:null}format(t){return"#".concat(t)}}flarum.reg.add("flarum-mentions","forum/mentionables/formats/HashMentionFormat",$t);class Dt{constructor(){X(this,"formats",[new At,new $t])}get(t){var e;return null!=(e=this.formats.find((e=>e.trigger()===t)))?e:null}mentionable(t){for(const e of this.formats){const n=e.getMentionable(t);if(n)return n}return null}extend(t){this.formats.push(new t)}}flarum.reg.add("flarum-mentions","forum/mentionables/formats/MentionFormats",Dt);const _t=flarum.reg.get("core","forum/components/UserPage");var Nt=t.n(_t);const St=flarum.reg.get("core","common/components/LinkButton");var kt=t.n(St);const Ft=flarum.reg.get("core","common/extenders");var It=t.n(Ft);const Lt=flarum.reg.get("core","common/models/Post");var Rt=t.n(Lt);const Ut=flarum.reg.get("core","common/models/User");var jt=t.n(Ut);const Et=flarum.reg.get("core","forum/components/PostsUserPage");var Ht=t.n(Et);class Gt extends(Ht()){loadResults(t){return s().store.find("posts",{filter:{type:"comment",mentioned:this.user.id()},page:{offset:t,limit:this.loadLimit},sort:"-createdAt"})}}flarum.reg.add("flarum-mentions","forum/components/MentionsUserPage",Gt);const Wt=[(new(It().Routes)).add("user.mentions","/u/:username/mentions",Gt),new(It().Model)(Rt()).hasMany("mentionedBy").attribute("mentionedByCount"),new(It().Model)(jt()).attribute("canMentionGroups")];function qt(t){let e;if(s().forum.attribute("allowUsernameMentionFormat")&&t.hasAttribute("username")?e=s().store.getBy("users","username",t.getAttribute("username")):t.hasAttribute("id")&&(e=s().store.getById("users",t.getAttribute("id"))),e)return t.setAttribute("id",e.id()),t.setAttribute("slug",e.slug()),t.setAttribute("displayname",gt()(x()(e))),!0;t.invalidate()}function Ot(t){t.setAttribute("deleted",!1)}function Jt(t){const e=s().store.getById("posts",t.getAttribute("id"));if(e)return t.setAttribute("discussionid",e.discussion().id()),t.setAttribute("number",e.number()),t.setAttribute("displayname",gt()(x()(e.user()))),!0}function zt(t){t.setAttribute("deleted",!1)}function Qt(t){var e,n;if(null!=(e=s().session)&&null!=(n=e.user)&&n.canMentionGroups()){const e=s().store.getById("groups",t.getAttribute("id"));if(e)return t.setAttribute("groupname",gt()(e.namePlural())),!0}t.invalidate()}function Xt(t){var e,n;if(null!=(e=s().session)&&null!=(n=e.user)&&n.canMentionGroups()){const e=s().store.getById("groups",t.getAttribute("id"));t.setAttribute("color",e.color()),t.setAttribute("icon",e.icon()),t.setAttribute("deleted",!1)}}function Yt(t){if("flarum-tags"in flarum.extensions){const e=s().store.getBy("tags","slug",t.getAttribute("slug"));if(e)return t.setAttribute("id",e.id()),t.setAttribute("tagname",e.name()),!0}t.invalidate()}function Kt(t){if("flarum-tags"in flarum.extensions){const e=s().store.getBy("tags","slug",t.getAttribute("slug"));t.setAttribute("icon",e.icon()),t.setAttribute("color",e.color()),t.setAttribute("deleted",!1)}}flarum.reg.add("flarum-mentions","forum/utils/textFormatter",{filterUserMentions:qt,postFilterUserMentions:Ot,filterPostMentions:Jt,postFilterPostMentions:zt,filterGroupMentions:Qt,postFilterGroupMentions:Xt,filterTagMentions:Yt,postFilterTagMentions:Kt}),flarum.reg.add("flarum-mentions","forum/extenders/Mentionables",class{constructor(){X(this,"formats",[]),X(this,"mentionables",{})}format(t){return this.formats.push(t),this}mentionable(t,e){return this.mentionables[t]||(this.mentionables[t]=[]),this.mentionables[t].push(e),this}extend(t){for(const e of this.formats)t.mentionFormats.extend(e);for(const e in this.mentionables){const n=t.mentionFormats.get(e);if(n)for(const t of this.mentionables[e])n.extend(t)}}}),s().mentionFormats=new Dt,s().initializers.add("flarum-mentions",(function(){!function(){function t(){const t=this.attrs.post.contentHtml();if(t===this.oldPostContentHtml||this.isEditing())return;this.oldPostContentHtml=t;const e=this.attrs.post,n=this.$();this.$().on("click",".UserMention:not(.UserMention--deleted), .PostMention:not(.PostMention--deleted), .TagMention:not(.TagMention--deleted)",(function(t){m.route.set(this.getAttribute("href")),t.preventDefault()})),this.$(".PostMention:not(.PostMention--deleted)").each((function(){const t=$(this),o=t.data("id");let s;const r=$('
');this.navigator=new(z()),this.navigator.when((()=>this.mentionsDropdown.active)).onUp((()=>this.mentionsDropdown.navigate(-1))).onDown((()=>this.mentionsDropdown.navigate(1))).onSelect(this.mentionsDropdown.complete.bind(this.mentionsDropdown)).onCancel(this.mentionsDropdown.hide.bind(this.mentionsDropdown)).bindTo(t),t.after($('
'))})),(0,n.extend)("flarum/common/components/TextEditor","buildEditorParams",(function(t){let e,n,o,r=new ot({onmouseenter:function(){this.mentionsDropdown.setIndex($(this).parent().index())},onclick:t=>{this.attrs.composer.editor.replaceBeforeCursor(n-1,t+" "),this.mentionsDropdown.hide()}});t.inputListeners.push((()=>{const t=this.attrs.composer.editor.getSelectionRange(),i=t[0];if(t[1]-i>0)return;const a=this.attrs.composer.editor.getLastNChars(30);n=0;let u=null;for(let t=a.length-1;t>=0;t--){const o=a.substr(t,1);if(u=s().mentionFormats.get(o),u&&(0===t||/\s/.test(a.substr(t-1,1)))){e=t+1,n=i-a.length+t+1,r.init(u.makeMentionables());break}}if(this.mentionsDropdown.hide(),this.mentionsDropdown.active=!1,n){var l;const t=a.substring(e).toLowerCase();if(o=u.queryFromTyped(t),!o)return;r.typed=o;const s=()=>{const t=r.buildSuggestions();if(t.length){this.mentionsDropdown.items=t,m.render(this.$(".ComposerBody-mentionsDropdownContainer")[0],this.mentionsDropdown.render()),this.mentionsDropdown.show();const e=this.attrs.composer.editor.getCaretCoordinates(n),o=this.mentionsDropdown.$().outerWidth(),s=this.mentionsDropdown.$().outerHeight(),r=this.mentionsDropdown.$().offsetParent();let i=e.left,a=e.top+15;a+s>r.height()&&(a=e.top-s-15),i+o>r.width()&&(i=r.width()-o),a=Math.max(-(r.offset().top-$(document).scrollTop()),a),i=Math.max(-r.offset().left,i),this.mentionsDropdown.show(i,a)}else this.mentionsDropdown.active=!1,this.mentionsDropdown.hide()};this.mentionsDropdown.active=!0,s(),this.mentionsDropdown.setIndex(0),this.mentionsDropdown.$().scrollTop(0),null==(l=r.search())||l.then(s)}}))})),(0,n.extend)("flarum/common/components/TextEditor","toolbarItems",(function(t){t.add("mention",m(O(),{onclick:()=>this.attrs.composer.editor.insertAtCursor(" @"),icon:"fas fa-at"},s().translator.trans("flarum-mentions.forum.composer.mention_tooltip")))})),s().notificationComponents.postMentioned=it,s().notificationComponents.userMentioned=at,s().notificationComponents.groupMentioned=mt,(0,n.extend)("flarum/forum/components/NotificationGrid","notificationTypes",(function(t){t.add("postMentioned",{name:"postMentioned",icon:"fas fa-reply",label:s().translator.trans("flarum-mentions.forum.settings.notify_post_mentioned_label")}),t.add("userMentioned",{name:"userMentioned",icon:"fas fa-at",label:s().translator.trans("flarum-mentions.forum.settings.notify_user_mentioned_label")}),t.add("groupMentioned",{name:"groupMentioned",icon:"fas fa-at",label:s().translator.trans("flarum-mentions.forum.settings.notify_group_mentioned_label")})})),(0,n.extend)(Nt().prototype,"navItems",(function(t){const e=this.user;t.add("mentions",m(kt(),{href:s().route("user.mentions",{username:e.slug()}),name:"mentions",icon:"fas fa-at"},s().translator.trans("flarum-mentions.forum.user.mentions_link")),80)})),r.getPlainContent.removeSelectors.push("a.PostMention"),(0,n.extend)(l().prototype,"oncreate",(function(){this.$(".GroupMention--colored, .TagMention--colored").each((function(){this.classList.add(a()(getComputedStyle(this).getPropertyValue("--color")))}))}))}))})(),module.exports=e})(); +(()=>{var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e),t.d(e,{extend:()=>Ot,filterGroupMentions:()=>Yt,filterPostMentions:()=>Qt,filterTagMentions:()=>Vt,filterUserMentions:()=>Jt,postFilterGroupMentions:()=>Kt,postFilterPostMentions:()=>Xt,postFilterTagMentions:()=>Zt,postFilterUserMentions:()=>zt});const n=flarum.reg.get("core","common/extend"),o=flarum.reg.get("core","forum/app");var s=t.n(o);const r=flarum.reg.get("core","common/utils/string"),i=flarum.reg.get("core","common/helpers/textContrastClass");var a=t.n(i);const u=flarum.reg.get("core","forum/components/Post");var l=t.n(u);const c=flarum.reg.get("core","forum/components/CommentPost");var d=t.n(c);const f=flarum.reg.get("core","forum/components/PostPreview");var p=t.n(f);const h=flarum.reg.get("core","common/components/LoadingIndicator");var g=t.n(h);const b=flarum.reg.get("core","common/components/Link");var y=t.n(b);const v=flarum.reg.get("core","common/helpers/punctuateSeries");var w=t.n(v);const M=flarum.reg.get("core","common/helpers/username");var x=t.n(M);const P=flarum.reg.get("core","common/components/Icon");var C=t.n(P);const A=flarum.reg.get("core","common/components/Button");var T=t.n(A);const B=flarum.reg.get("core","common/components/Modal");var D=t.n(B);const _=flarum.reg.get("core","common/states/PaginatedListState");var S=t.n(_);class N extends(S()){constructor(t,e){void 0===e&&(e=1),t.page={...t.page||{},limit:10},super(t,e,10)}get type(){return"posts"}}flarum.reg.add("flarum-mentions","forum/state/MentionedByModalState",N);const k=flarum.reg.get("core","common/components/Form");var F=t.n(k);class I extends(D()){oninit(t){super.oninit(t),this.state=new N({filter:{mentionedPost:this.attrs.post.id()},sort:"number"}),this.state.refresh()}className(){return"MentionedByModal"}title(){return s().translator.trans("flarum-mentions.forum.mentioned_by.title")}content(){return m("[",null,m("div",{className:"Modal-body"},this.state.isInitialLoading()?m(g(),null):m("[",null,m("ul",{className:"MentionedByModal-list Dropdown-menu Dropdown-menu--inline Post-mentionedBy-preview"},this.state.getPages().map((t=>t.items.map((t=>m("li",{"data-number":t.number()},m(p(),{post:t,onclick:()=>s().modal.close()}))))))))),this.state.hasNext()&&m("div",{className:"Modal-footer"},m(F(),{className:"Form--centered"},m("div",{className:"Form-group"},m(T(),{className:"Button Button--block",onclick:()=>this.state.loadNext(),loading:this.state.isLoadingNext()},s().translator.trans("flarum-mentions.forum.mentioned_by.load_more_button"))))))}}flarum.reg.add("flarum-mentions","forum/components/MentionedByModal",I);const R=flarum.reg.get("core","forum/utils/DiscussionControls");var L=t.n(R);function U(t,e,n){return new Promise((o=>{const r=s().mentionFormats.mentionable("post").replacement(t)+" ";e.fields.content()||(e.body.attrs.originalContent=r);const i=e.editor.getSelectionRange()[0],a=e.fields.content().slice(0,i),m=0==a.length?0:3-a.match(/(\n{0,2})$/)[0].length;return e.editor.insertAtCursor(Array(m).join("\n")+(n?"> "+r+n.trim().replace(/\n/g,"\n> ")+"\n\n":r),!1),o(e)}))}function j(t,e){const n=flarum.reg.checkModule("core","forum/components/EditPostComposer");return n&&s().composer.bodyMatches(n)&&s().composer.body.attrs.post.discussion()===t.discussion()?U(t,s().composer,e):L().replyAction.call(t.discussion()).then((n=>U(t,n,e)))}flarum.reg.add("flarum-mentions","forum/utils/reply",j);const E=flarum.reg.get("core","common/Fragment");var H=t.n(E);class G extends(H()){constructor(t){super(),this.post=t}view(){return m("button",{className:"Button PostQuoteButton",onclick:()=>{j(this.post,this.content)}},m(C(),{name:"fas fa-quote-left",className:"Button-icon"}),s().translator.trans("flarum-mentions.forum.post.quote_button"))}show(t,e){const n=this.$().show(),o=n.offsetParent().offset();n.css("left",t-o.left).css("top",e-o.top),this.hideHandler=this.hide.bind(this),$(document).on("mouseup",this.hideHandler)}showStart(t,e){const n=this.$();this.show(t,$(window).scrollTop()+e-n.outerHeight()-5)}showEnd(t,e){const n=this.$();this.show(t-n.outerWidth(),$(window).scrollTop()+e+5)}hide(){this.$().hide(),$(document).off("mouseup",this.hideHandler)}}function W(t){const e=window.getSelection();if(!e.isCollapsed){const n=e.getRangeAt(0),o=n.commonAncestorContainer;if(t[0]===o||$.contains(t[0],o)){const t=$("
").append(n.cloneContents());return t.find("img.emoji").replaceWith((function(){return this.alt})),t.find("img").replaceWith((function(){return"![](".concat(this.src,")")})),t.find("a").replaceWith((function(){return"[".concat(this.innerText,"](").concat(this.href,")")})),t.text()}}return""}flarum.reg.add("flarum-mentions","forum/fragments/PostQuoteButton",G),flarum.reg.add("flarum-mentions","forum/utils/selectedText",W);const q=flarum.reg.get("core","common/components/TextEditorButton");var O=t.n(q);const J=flarum.reg.get("core","common/utils/KeyboardNavigatable");var z=t.n(J);const Q=flarum.reg.get("core","common/utils/AutocompleteReader");var X=t.n(Q);const Y=flarum.reg.get("core","common/utils/throttleDebounce");function K(t){return K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},K(t)}function V(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==K(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!==K(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===K(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Z extends(H()){constructor(){super(...arguments),V(this,"items",[]),V(this,"active",!1),V(this,"index",0),V(this,"keyWasJustPressed",!1)}view(){return m("ul",{className:"Dropdown-menu MentionsDropdown"},this.items.map((t=>m("li",null,t))))}show(t,e){this.$().show().css({left:t+"px",top:e+"px"}),this.active=!0}hide(){this.$().hide(),this.active=!1}navigate(t){this.keyWasJustPressed=!0,this.setIndex(this.index+t,!0),clearTimeout(this.keyWasJustPressedTimeout),this.keyWasJustPressedTimeout=setTimeout((()=>this.keyWasJustPressed=!1),500)}complete(){this.$("li").eq(this.index).find("button").click()}setIndex(t,e){if(this.keyWasJustPressed&&!e)return;const n=this.$(),o=n.find("li");let s=t;s<0?s=o.length-1:s>=o.length&&(s=0),this.index=s;const r=o.removeClass("active").eq(s).addClass("active");if(e){const t=n.scrollTop(),e=n.offset().top,o=e+n.outerHeight(),s=r.offset().top,i=s+r.outerHeight();let a;so&&(a=t-o+i+parseInt(n.css("padding-bottom"),10)),void 0!==a&&n.stop(!0).animate({scrollTop:a},100)}}}flarum.reg.add("flarum-mentions","forum/fragments/AutocompleteDropdown",Z);const tt=flarum.reg.get("core","common/Component");var et=t.n(tt);const nt=flarum.reg.get("core","common/utils/classList");var ot=t.n(nt);class st extends(et()){view(t){const{mentionable:e,...n}=this.attrs,o=ot()("MentionsDropdownItem","PostPreview","MentionsDropdown-".concat(e.type()));return m("button",Object.assign({className:o},n),m("span",{className:"PostPreview-content"},t.children))}}flarum.reg.add("flarum-mentions","forum/components/MentionsDropdownItem",st);class rt{constructor(t){V(this,"mentionables",void 0),V(this,"results",{}),V(this,"typed",null),V(this,"searched",[]),V(this,"dropdownItemAttrs",{}),V(this,"search",(async()=>{if(!this.typed||this.typed.length<=1)return;const t=this.typed.toLowerCase();if(!this.searched.includes(t)){for(const e of this.mentionables)for(const n of await e.search(t))this.results[e.type()].has(n.id())||this.results[e.type()].set(n.id(),n);return this.searched.push(t),Promise.resolve()}})),this.dropdownItemAttrs=t}init(t){this.typed=null,this.mentionables=t;for(const t of this.mentionables)this.results[t.type()]=new Map(t.initialResults().map((t=>[t.id(),t])))}matches(t,e){var n;return t.matches(e,(null==(n=this.typed)?void 0:n.toLowerCase())||"")}makeSuggestion(t,e){const n=t.suggestion(e,this.typed),o=t.replacement(e),{onclick:s,...r}=this.dropdownItemAttrs;return m(st,Object.assign({mentionable:t,onclick:()=>s(o)},r),n)}buildSuggestions(){const t=[];for(const e of this.mentionables){if(!e.enabled())continue;let n=Array.from(this.results[e.type()].values()).filter((t=>this.matches(e,t)));const o=e.maxStoreMatchedResults();o&&(n=n.splice(0,o));for(const o of n){const n=this.makeSuggestion(e,o);t.push(n)}}return t}}flarum.reg.add("flarum-mentions","forum/mentionables/MentionableModels",rt);const it=flarum.reg.get("core","forum/components/Notification");var at=t.n(it);class mt extends(at()){icon(){return"fas fa-reply"}href(){const t=this.attrs.notification,e=t.subject(),n=t.content();return s().route.discussion(e.discussion(),n&&n.replyNumber)}content(){const t=this.attrs.notification.fromUser();return s().translator.trans("flarum-mentions.forum.notifications.post_mentioned_text",{user:t,count:1})}excerpt(){return(0,r.truncate)(this.attrs.notification.subject().contentPlain()||"",200)}}flarum.reg.add("flarum-mentions","forum/components/PostMentionedNotification",mt);class ut extends(at()){icon(){return"fas fa-at"}href(){const t=this.attrs.notification.subject();return s().route.discussion(t.discussion(),t.number())}content(){const t=this.attrs.notification.fromUser();return s().translator.trans("flarum-mentions.forum.notifications.user_mentioned_text",{user:t})}excerpt(){return(0,r.truncate)(this.attrs.notification.subject().contentPlain(),200)}}flarum.reg.add("flarum-mentions","forum/components/UserMentionedNotification",ut);class lt extends(at()){icon(){return"fas fa-at"}href(){const t=this.attrs.notification.subject();return s().route.discussion(t.discussion(),t.number())}content(){const t=this.attrs.notification.fromUser();return s().translator.trans("flarum-mentions.forum.notifications.group_mentioned_text",{user:t})}excerpt(){return(0,r.truncate)(this.attrs.notification.subject().contentPlain(),200)}}flarum.reg.add("flarum-mentions","forum/components/GroupMentionedNotification",lt);class ct{constructor(){V(this,"instances",void 0),V(this,"mentionables",void 0),V(this,"extendable",void 0)}makeMentionables(){var t;return null!=(t=this.instances)?t:this.instances=this.mentionables.map((t=>new t(this)))}getMentionable(t){var e;return null!=(e=this.makeMentionables().find((e=>e.type()===t)))?e:null}extend(t){if(!this.extendable)throw new Error("This mention format does not allow extending.");this.mentionables.push(t)}}flarum.reg.add("flarum-mentions","forum/mentionables/formats/MentionFormat",ct);const dt=flarum.reg.get("core","common/components/Avatar");var ft=t.n(dt);const pt=flarum.reg.get("core","common/helpers/highlight");var ht=t.n(pt);class gt{constructor(t){V(this,"format",void 0),this.format=t}}flarum.reg.add("flarum-mentions","forum/mentionables/MentionableModel",gt);const bt=flarum.reg.get("core","common/utils/extractText");var yt=t.n(bt);const vt=()=>yt()(s().translator.trans("core.lib.username.deleted_text"));function wt(t,e){return void 0===e&&(e=!0),t?((e?t.displayName():t.username())||vt()).replace(/"#[a-z]{0,3}[0-9]+/,"_"):vt().replace(/"#[a-z]{0,3}[0-9]+/,"_")}flarum.reg.add("flarum-mentions","forum/utils/getCleanDisplayName",wt);class Mt extends gt{type(){return"user"}initialResults(){return Array.from(s().store.all("users"))}replacement(t){if(s().forum.attribute("allowUsernameMentionFormat")){const e=wt(t,!1);return this.format.format(e)}const e=wt(t);return this.format.format(e,"",t.id())}suggestion(t,e){const n=x()(t,(t=>ht()(t,e)));return m("[",null,m(ft(),{user:t}),n)}matches(t,e){return!!e&&[t.username(),t.displayName()].some((t=>t.toLowerCase().substr(0,e.length)===e))}maxStoreMatchedResults(){return null}async search(t){return await s().store.find("users",{filter:{q:t},page:{limit:5}})}enabled(){return!0}}flarum.reg.add("flarum-mentions","forum/mentionables/UserMention",Mt);class xt extends gt{type(){return"post"}initialResults(){const t=flarum.reg.checkModule("core","forum/components/EditPostComposer"),e=flarum.reg.checkModule("core","forum/components/ReplyComposer");if(!(e&&s().composer.bodyMatches(e)||t&&s().composer.bodyMatches(t)))return[];const n=s().composer.body.attrs,o=n.post;return(o&&o.discussion()||n.discussion).posts().filter((t=>t&&"comment"===t.contentType()&&(!o||t.number()e.createdAt().getTime()-t.createdAt().getTime()))}replacement(t){const e=wt(t.user());return this.format.format(e,"p",t.id())}suggestion(t,e){var n;const o=t.user()||null,i=x()(o,(t=>ht()(t,e)));return m("[",null,m(ft(),{user:o}),i,[s().translator.trans("flarum-mentions.forum.composer.reply_to_post_text",{number:t.number()})," — ",(0,r.truncate)(null!=(n=t.contentPlain())?n:"",200)])}matches(t,e){const n=t.user(),o=s().mentionFormats.mentionable("user");return!e||n&&o.matches(n,e)}maxStoreMatchedResults(){return 5}search(t){return Promise.resolve([])}enabled(){return!0}}flarum.reg.add("flarum-mentions","forum/mentionables/PostMention",xt);const Pt=flarum.reg.get("core","common/models/Group");var Ct=t.n(Pt);const At=flarum.reg.get("core","common/components/Badge");var Tt=t.n(At);class Bt extends gt{type(){return"group"}initialResults(){return Array.from(s().store.all("groups").filter((t=>t.id()!==Ct().GUEST_ID&&t.id()!==Ct().MEMBER_ID)))}replacement(t){return this.format.format(t.namePlural(),"g",t.id())}suggestion(t,e){let n=t.namePlural();return e&&(n=ht()(n,e)),m("[",null,m(Tt(),{className:"Avatar Badge Badge--group--".concat(t.id()," Badge-icon"),color:t.color(),type:"group",icon:t.icon()}),m("span",{className:"username"},n))}matches(t,e){return!!e&&[t.namePlural().toLowerCase(),t.nameSingular().toLowerCase()].some((t=>t.toLowerCase().substr(0,e.length)===e))}maxStoreMatchedResults(){return null}search(t){return Promise.resolve([])}enabled(){var t,e,n;return null!=(t=null==(e=s().session)||null==(n=e.user)?void 0:n.canMentionGroups())&&t}}flarum.reg.add("flarum-mentions","forum/mentionables/GroupMention",Bt);class $t extends ct{constructor(){super(...arguments),V(this,"mentionables",[Mt,xt,Bt]),V(this,"extendable",!0)}trigger(){return"@"}queryFromTyped(t){const e=t.match(/^["“]?((?:(?!"#).)+)$/);return e?e[1]:null}format(t,e,n){return void 0===e&&(e=""),void 0===n&&(n=null),{simple:"@".concat(t),safe:'@"'.concat(t,'"#').concat(e).concat(n)}[n?"safe":"simple"]}}flarum.reg.add("flarum-mentions","forum/mentionables/formats/AtMentionFormat",$t);class Dt extends gt{type(){return"tag"}initialResults(){return Array.from(s().store.all("tags"))}replacement(t){return this.format.format(t.slug())}matches(t,e){return!!e&&[t.name().toLowerCase()].some((t=>t.toLowerCase().substr(0,e.length)===e))}maxStoreMatchedResults(){return null}async search(t){return await s().store.find("tags",{filter:{q:t},page:{limit:5}})}suggestion(t,e){let n=t.name();return e&&(n=ht()(n,e)),m("[",null,m(Tt(),{className:"Avatar",icon:t.icon(),color:t.color(),type:"tag"}),m("span",{className:"username"},n))}enabled(){return"flarum-tags"in flarum.extensions}}flarum.reg.add("flarum-mentions","forum/mentionables/TagMention",Dt);class _t extends ct{constructor(){super(...arguments),V(this,"mentionables",[Dt]),V(this,"extendable",!0)}trigger(){return"#"}queryFromTyped(t){const e=t.match(/^[-_\p{L}\p{N}\p{M}]+$/giu);return e?e[0]:null}format(t){return"#".concat(t)}}flarum.reg.add("flarum-mentions","forum/mentionables/formats/HashMentionFormat",_t);class St{constructor(){V(this,"formats",[new $t,new _t])}get(t){var e;return null!=(e=this.formats.find((e=>e.trigger()===t)))?e:null}mentionable(t){for(const e of this.formats){const n=e.getMentionable(t);if(n)return n}return null}extend(t){this.formats.push(new t)}}flarum.reg.add("flarum-mentions","forum/mentionables/formats/MentionFormats",St);const Nt=flarum.reg.get("core","forum/components/UserPage");var kt=t.n(Nt);const Ft=flarum.reg.get("core","common/components/LinkButton");var It=t.n(Ft);const Rt=flarum.reg.get("core","common/extenders");var Lt=t.n(Rt);const Ut=flarum.reg.get("core","common/models/Post");var jt=t.n(Ut);const Et=flarum.reg.get("core","common/models/User");var Ht=t.n(Et);const Gt=flarum.reg.get("core","forum/components/PostsUserPage");var Wt=t.n(Gt);class qt extends(Wt()){loadResults(t){return s().store.find("posts",{filter:{type:"comment",mentioned:this.user.id()},page:{offset:t,limit:this.loadLimit},sort:"-createdAt"})}}flarum.reg.add("flarum-mentions","forum/components/MentionsUserPage",qt);const Ot=[(new(Lt().Routes)).add("user.mentions","/u/:username/mentions",qt),new(Lt().Model)(jt()).hasMany("mentionedBy").attribute("mentionedByCount"),new(Lt().Model)(Ht()).attribute("canMentionGroups")];function Jt(t){let e;if(s().forum.attribute("allowUsernameMentionFormat")&&t.hasAttribute("username")?e=s().store.getBy("users","username",t.getAttribute("username")):t.hasAttribute("id")&&(e=s().store.getById("users",t.getAttribute("id"))),e)return t.setAttribute("id",e.id()),t.setAttribute("slug",e.slug()),t.setAttribute("displayname",yt()(x()(e))),!0;t.invalidate()}function zt(t){t.setAttribute("deleted",!1)}function Qt(t){const e=s().store.getById("posts",t.getAttribute("id"));if(e)return t.setAttribute("discussionid",e.discussion().id()),t.setAttribute("number",e.number()),t.setAttribute("displayname",yt()(x()(e.user()))),!0}function Xt(t){t.setAttribute("deleted",!1)}function Yt(t){var e,n;if(null!=(e=s().session)&&null!=(n=e.user)&&n.canMentionGroups()){const e=s().store.getById("groups",t.getAttribute("id"));if(e)return t.setAttribute("groupname",yt()(e.namePlural())),!0}t.invalidate()}function Kt(t){var e,n;if(null!=(e=s().session)&&null!=(n=e.user)&&n.canMentionGroups()){const e=s().store.getById("groups",t.getAttribute("id"));t.setAttribute("color",e.color()),t.setAttribute("icon",e.icon()),t.setAttribute("deleted",!1)}}function Vt(t){if("flarum-tags"in flarum.extensions){const e=s().store.getBy("tags","slug",t.getAttribute("slug"));if(e)return t.setAttribute("id",e.id()),t.setAttribute("tagname",e.name()),!0}t.invalidate()}function Zt(t){if("flarum-tags"in flarum.extensions){const e=s().store.getBy("tags","slug",t.getAttribute("slug"));t.setAttribute("icon",e.icon()),t.setAttribute("color",e.color()),t.setAttribute("deleted",!1)}}flarum.reg.add("flarum-mentions","forum/utils/textFormatter",{filterUserMentions:Jt,postFilterUserMentions:zt,filterPostMentions:Qt,postFilterPostMentions:Xt,filterGroupMentions:Yt,postFilterGroupMentions:Kt,filterTagMentions:Vt,postFilterTagMentions:Zt}),flarum.reg.add("flarum-mentions","forum/extenders/Mentionables",class{constructor(){V(this,"formats",[]),V(this,"mentionables",{})}format(t){return this.formats.push(t),this}mentionable(t,e){return this.mentionables[t]||(this.mentionables[t]=[]),this.mentionables[t].push(e),this}extend(t){for(const e of this.formats)t.mentionFormats.extend(e);for(const e in this.mentionables){const n=t.mentionFormats.get(e);if(n)for(const t of this.mentionables[e])n.extend(t)}}}),s().mentionFormats=new St,s().initializers.add("flarum-mentions",(function(){!function(){function t(){const t=this.attrs.post.contentHtml();if(t===this.oldPostContentHtml||this.isEditing())return;this.oldPostContentHtml=t;const e=this.attrs.post,n=this.$();this.$().on("click",".UserMention:not(.UserMention--deleted), .PostMention:not(.PostMention--deleted), .TagMention:not(.TagMention--deleted)",(function(t){m.route.set(this.getAttribute("href")),t.preventDefault()})),this.$(".PostMention:not(.PostMention--deleted)").each((function(){const t=$(this),o=t.data("id");let s;const r=$('