@ckeditor/ckeditor5-emoji 44.3.0-alpha.5 β 44.3.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/emoji.js +1 -1
- package/dist/index.js +49 -23
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/src/emojiconfig.d.ts +11 -0
- package/src/emojirepository.d.ts +9 -0
- package/src/emojirepository.js +31 -18
- package/src/emojiutils.js +18 -7
package/build/emoji.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
/*!
|
|
3
3
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
4
4
|
* For licensing, see LICENSE.md.
|
|
5
|
-
*/(()=>{var e={21:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach((function(i){e.setAttribute(i,t[i])}))}},51:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},59:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var r=i(758),n=i.n(r),o=i(935),s=i.n(o)()(n());s.push([e.id,".ck.ck-emoji__skin-tone{margin-left:var(--ck-spacing-standard)}.ck.ck-emoji__skin-tone>.ck.ck-dropdown .ck.ck-list__item{min-width:1em}.ck.ck-emoji__skin-tone>.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{width:auto}",""]);const a=s},128:e=>{"use strict";var t={};e.exports=function(e,i){var r=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(i)}},146:function(e,t){var i,r,n;r=[],void 0===(n="function"==typeof(i=e=>{"use strict";var t=e=>{"number"==typeof e?e=""+e:"string"!=typeof e&&(e="");var t=g(e);return n(e,{_targetLower:t._lower,_targetLowerCodes:t.lowerCodes,_bitflags:t.bitflags})};class i{get indexes(){return this._indexes.slice(0,this._indexes.len).sort(((e,t)=>e-t))}set indexes(e){return this._indexes=e}highlight(e,t){return((e,t="<b>",i="</b>")=>{for(var r="function"==typeof t?t:void 0,n=e.target,o=n.length,s=e.indexes,a="",c=0,l=0,u=!1,d=[],h=0;h<o;++h){var f=n[h];if(s[l]===h){if(++l,u||(u=!0,r?(d.push(a),a=""):a+=t),l===s.length){r?(a+=f,d.push(r(a,c++)),a="",d.push(n.substr(h+1))):a+=f+i+n.substr(h+1);break}}else u&&(u=!1,r?(d.push(r(a,c++)),a=""):a+=i);a+=f}return r?d:a})(this,e,t)}get score(){return o(this._score)}set score(e){this._score=s(e)}}class r extends Array{get score(){return o(this._score)}set score(e){this._score=s(e)}}var n=(e,t)=>{const r=new i;return r.target=e,r.obj=t.obj??L,r._score=t._score??P,r._indexes=t._indexes??[],r._targetLower=t._targetLower??"",r._targetLowerCodes=t._targetLowerCodes??L,r._nextBeginningIndexes=t._nextBeginningIndexes??L,r._bitflags=t._bitflags??0,r},o=e=>e===P?0:e>1?e:Math.E**(-2*((1-e)**.04307-1)),s=e=>0===e?P:e>1?e:1-Math.pow(Math.log(e)/-2+1,1/.04307),a=e=>{"number"==typeof e?e=""+e:"string"!=typeof e&&(e=""),e=e.trim();var t=g(e),i=[];if(t.containsSpace){var r=e.split(/\s+/);r=[...new Set(r)];for(var n=0;n<r.length;n++)if(""!==r[n]){var o=g(r[n]);i.push({lowerCodes:o.lowerCodes,_lower:r[n].toLowerCase(),containsSpace:!1})}}return{lowerCodes:t.lowerCodes,_lower:t._lower,containsSpace:t.containsSpace,bitflags:t.bitflags,spaceSearches:i}},c=e=>{if(e.length>999)return t(e);var i=m.get(e);return void 0!==i||(i=t(e),m.set(e,i)),i},l=e=>{if(e.length>999)return a(e);var t=_.get(e);return void 0!==t||(t=a(e),_.set(e,t)),t},u=(e,t)=>{var i=[];i.total=e.length;var o=t?.limit||E;if(t?.key)for(var s=0;s<e.length;s++){var a=e[s];if((h=T(a,t.key))!=L){V(h)||(h=c(h));var l=n(h.target,{_score:h._score,obj:a});if(i.push(l),i.length>=o)return i}}else if(t?.keys)for(s=0;s<e.length;s++){a=e[s];for(var u=new r(t.keys.length),d=t.keys.length-1;d>=0;--d)(h=T(a,t.keys[d]))?(V(h)||(h=c(h)),h._score=P,h._indexes.len=0,u[d]=h):u[d]=B;if(u.obj=a,u._score=P,i.push(u),i.length>=o)return i}else for(s=0;s<e.length;s++){var h;if((h=e[s])!=L&&(V(h)||(h=c(h)),h._score=P,h._indexes.len=0,i.push(h),i.length>=o))return i}return i},d=(e,t,r=!1,n=!1)=>{if(!1===r&&e.containsSpace)return h(e,t,n);for(var o=e._lower,s=e.lowerCodes,a=s[0],c=t._targetLowerCodes,l=s.length,u=c.length,d=0,f=0,g=0;;){if(a===c[f]){if(v[g++]=f,++d===l)break;a=s[d]}if(++f>=u)return L}d=0;var m=!1,_=0,k=t._nextBeginningIndexes;k===L&&(k=t._nextBeginningIndexes=p(t.target));var b=0;if((f=0===v[0]?0:k[v[0]-1])!==u)for(;;)if(f>=u){if(d<=0)break;if(++b>200)break;--d;var w=y[--_];f=k[w]}else if(s[d]===c[f]){if(y[_++]=f,++d===l){m=!0;break}++f}else f=k[f];var j=l<=1?-1:t._targetLower.indexOf(o,v[0]),x=!!~j,T=!!x&&(0===j||t._nextBeginningIndexes[j-1]===j);if(x&&!T)for(var V=0;V<k.length;V=k[V])if(!(V<=j)){for(var E=0;E<l&&s[E]===t._targetLowerCodes[V+E];E++);if(E===l){j=V,T=!0;break}}var P=e=>{for(var t=0,i=0,r=1;r<l;++r)e[r]-e[r-1]!=1&&(t-=e[r],++i);if(t-=(e[l-1]-e[0]-(l-1)+12)*i,0!==e[0]&&(t-=e[0]*e[0]*.2),m){var n=1;for(r=k[0];r<u;r=k[r])++n;n>24&&(t*=10*(n-24))}else t*=1e3;return t-=(u-l)/2,x&&(t/=1+l*l*1),T&&(t/=1+l*l*1),t-=(u-l)/2};if(m)if(T){for(V=0;V<l;++V)v[V]=j+V;C=v,S=P(v)}else C=y,S=P(y);else{if(x)for(var V=0;V<l;++V)v[V]=j+V;var C,S=P(C=v)}for(t._score=S,V=0;V<l;++V)t._indexes[V]=C[V];t._indexes.len=l;const O=new i;return O.target=t.target,O._score=t._score,O._indexes=t._indexes,O},h=(e,t,i)=>{for(var r=new Set,n=0,o=L,s=0,a=e.spaceSearches,c=a.length,l=0,u=()=>{for(let e=l-1;e>=0;e--)t._nextBeginningIndexes[k[2*e+0]]=k[2*e+1]},h=!1,f=0;f<c;++f){w[f]=P;var g=a[f];if(o=d(g,t),i){if(o===L)continue;h=!0}else if(o===L)return u(),L;if(f!==c-1){var p=o._indexes,m=!0;for(let e=0;e<p.len-1;e++)if(p[e+1]-p[e]!=1){m=!1;break}if(m){var _=p[p.len-1]+1,v=t._nextBeginningIndexes[_-1];for(let e=_-1;e>=0&&v===t._nextBeginningIndexes[e];e--)t._nextBeginningIndexes[e]=_,k[2*l+0]=e,k[2*l+1]=v,l++}}n+=o._score/c,w[f]=o._score/c,o._indexes[0]<s&&(n-=2*(s-o._indexes[0])),s=o._indexes[0];for(var y=0;y<o._indexes.len;++y)r.add(o._indexes[y])}if(i&&!h)return L;u();var b=d(e,t,!0);if(b!==L&&b._score>n){if(i)for(f=0;f<c;++f)w[f]=b._score/c;return b}i&&(o=t),o._score=n,f=0;for(let e of r)o._indexes[f++]=e;return o._indexes.len=f,o},f=e=>e.replace(/\p{Script=Latin}+/gu,(e=>e.normalize("NFD"))).replace(/[\u0300-\u036f]/g,""),g=e=>{for(var t=(e=f(e)).length,i=e.toLowerCase(),r=[],n=0,o=!1,s=0;s<t;++s){var a=r[s]=i.charCodeAt(s);32!==a?n|=1<<(a>=97&&a<=122?a-97:a>=48&&a<=57?26:a<=127?30:31):o=!0}return{lowerCodes:r,bitflags:n,containsSpace:o,_lower:i}},p=e=>{for(var t=(e=f(e)).length,i=(e=>{for(var t=e.length,i=[],r=0,n=!1,o=!1,s=0;s<t;++s){var a=e.charCodeAt(s),c=a>=65&&a<=90,l=c||a>=97&&a<=122||a>=48&&a<=57,u=c&&!n||!o||!l;n=c,o=l,u&&(i[r++]=s)}return i})(e),r=[],n=i[0],o=0,s=0;s<t;++s)n>s?r[s]=n:(n=i[++o],r[s]=void 0===n?t:n);return r},m=new Map,_=new Map,v=[],y=[],k=[],b=[],w=[],j=[],x=[],T=(e,t)=>{var i=e[t];if(void 0!==i)return i;if("function"==typeof t)return t(e);var r=t;Array.isArray(t)||(r=t.split("."));for(var n=r.length,o=-1;e&&++o<n;)e=e[r[o]];return e},V=e=>"object"==typeof e&&"number"==typeof e._bitflags,E=1/0,P=-E,C=[];C.total=0;var S,O,A,I,L=null,B=t(""),M=(S=[],O=0,I=e=>{for(var t=0,i=S[t],r=1;r<O;){var n=r+1;t=r,n<O&&S[n]._score<S[r]._score&&(t=n),S[t-1>>1]=S[t],r=1+(t<<1)}for(var o=t-1>>1;t>0&&i._score<S[o]._score;o=(t=o)-1>>1)S[t]=S[o];S[t]=i},(A={}).add=e=>{var t=O;S[O++]=e;for(var i=t-1>>1;t>0&&e._score<S[i]._score;i=(t=i)-1>>1)S[t]=S[i];S[t]=e},A.poll=e=>{if(0!==O){var t=S[0];return S[0]=S[--O],I(),t}},A.peek=e=>{if(0!==O)return S[0]},A.replaceTop=e=>{S[0]=e,I()},A);return{single:(e,t)=>{if(!e||!t)return L;var i=l(e);V(t)||(t=c(t));var r=i.bitflags;return(r&t._bitflags)!==r?L:d(i,t)},go:(e,t,i)=>{if(!e)return i?.all?u(t,i):C;var n=l(e),o=n.bitflags,a=n.containsSpace,h=s(i?.threshold||0),f=i?.limit||E,g=0,p=0,m=t.length;function _(e){g<f?(M.add(e),++g):(++p,e._score>M.peek()._score&&M.replaceTop(e))}if(i?.key)for(var v=i.key,y=0;y<m;++y){var k=t[y];(N=T(k,v))&&(V(N)||(N=c(N)),(o&N._bitflags)===o&&(U=d(n,N))!==L&&(U._score<h||(U.obj=k,_(U))))}else if(i?.keys){var S=i.keys,O=S.length;e:for(y=0;y<m;++y){k=t[y];for(var A=0,I=0;I<O;++I)v=S[I],(N=T(k,v))?(V(N)||(N=c(N)),j[I]=N,A|=N._bitflags):j[I]=B;if((o&A)===o){if(a)for(let e=0;e<n.spaceSearches.length;e++)b[e]=P;for(I=0;I<O;++I)if((N=j[I])!==B)if(x[I]=d(n,N,!1,a),x[I]!==L){if(a)for(let e=0;e<n.spaceSearches.length;e++)w[e]>-1e3&&b[e]>P&&(D=(b[e]+w[e])/4)>b[e]&&(b[e]=D),w[e]>b[e]&&(b[e]=w[e])}else x[I]=B;else x[I]=B;if(a){for(let e=0;e<n.spaceSearches.length;e++)if(b[e]===P)continue e}else{var F=!1;for(let e=0;e<O;e++)if(x[e]._score!==P){F=!0;break}if(!F)continue}var z=new r(O);for(let e=0;e<O;e++)z[e]=x[e];if(a){var R=0;for(let e=0;e<n.spaceSearches.length;e++)R+=b[e]}else{R=P;for(let e=0;e<O;e++){var D;(U=z[e])._score>-1e3&&R>P&&(D=(R+U._score)/4)>R&&(R=D),U._score>R&&(R=U._score)}}if(z.obj=k,z._score=R,i?.scoreFn){if(!(R=i.scoreFn(z)))continue;R=s(R),z._score=R}R<h||_(z)}}}else for(y=0;y<m;++y){var N,U;(N=t[y])&&(V(N)||(N=c(N)),(o&N._bitflags)===o&&(U=d(n,N))!==L&&(U._score<h||_(U)))}if(0===g)return C;var q=new Array(g);for(y=g-1;y>=0;--y)q[y]=M.poll();return q.total=g+p,q},prepare:t,cleanup:()=>{m.clear(),_.clear()}}})?i.apply(t,r):i)||(e.exports=n)},223:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var r=i(758),n=i.n(r),o=i(935),s=i.n(o)()(n());s.push([e.id,".ck.ck-emoji__categories-list{display:flex;justify-content:space-between;margin:0 var(--ck-spacing-large)}.ck.ck-emoji__categories-list>.ck.ck-button.ck-button_with-text{border-width:0;border-bottom:2px solid transparent;font-size:var(--ck-font-size-big);min-height:var(--ck-font-size-big);min-width:var(--ck-font-size-big);padding:0}.ck.ck-emoji__categories-list>.ck.ck-button.ck-button_with-text.ck-emoji__category-item.ck-on{border-bottom-color:var(--ck-color-base-active)}.ck.ck-emoji__categories-list>.ck.ck-button.ck-button_with-text>span{margin:auto}",""]);const a=s},237:e=>{"use strict";e.exports=CKEditor5.dll},291:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var r=i(758),n=i.n(r),o=i(935),s=i.n(o)()(n());s.push([e.id,":root{--ck-emoji-grid-tile-size:27px}.ck.ck-emoji .ck.ck-emoji__tiles{border-top:1px solid var(--ck-color-base-border);max-height:min(265px,40vh);max-width:100%;overflow-x:hidden;overflow-y:auto}.ck.ck-emoji .ck.ck-emoji__tiles .ck-emoji__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--ck-emoji-grid-tile-size),1fr));margin:var(--ck-spacing-standard) var(--ck-spacing-large);grid-gap:var(--ck-spacing-small)}.ck.ck-emoji .ck.ck-emoji__tiles .ck-emoji__tile{border:0;font-size:1.5em;height:var(--ck-emoji-grid-tile-size);min-height:var(--ck-emoji-grid-tile-size);min-width:var(--ck-emoji-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-emoji-grid-tile-size)}@media (prefers-reduced-motion:reduce){.ck.ck-emoji .ck.ck-emoji__tiles .ck-emoji__tile{transition:none}}.ck.ck-emoji .ck.ck-emoji__tiles .ck-emoji__tile:focus:not(.ck-disabled),.ck.ck-emoji .ck.ck-emoji__tiles .ck-emoji__tile:hover:not(.ck-disabled){border:0;box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-emoji .ck.ck-emoji__tiles .ck-emoji__tile .ck-button__label{line-height:var(--ck-emoji-grid-tile-size);text-align:center;width:100%}",""]);const a=s},311:(e,t,i)=>{e.exports=i(237)("./src/ui.js")},584:(e,t,i)=>{e.exports=i(237)("./src/utils.js")},591:e=>{"use strict";var t=[];function i(e){for(var i=-1,r=0;r<t.length;r++)if(t[r].identifier===e){i=r;break}return i}function r(e,r){for(var o={},s=[],a=0;a<e.length;a++){var c=e[a],l=r.base?c[0]+r.base:c[0],u=o[l]||0,d="".concat(l," ").concat(u);o[l]=u+1;var h=i(d),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var g=n(f,r);r.byIndex=a,t.splice(a,0,{identifier:d,updater:g,references:1})}s.push(d)}return s}function n(e,t){var i=t.domAPI(t);i.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,n){var o=r(e=e||[],n=n||{});return function(e){e=e||[];for(var s=0;s<o.length;s++){var a=i(o[s]);t[a].references--}for(var c=r(e,n),l=0;l<o.length;l++){var u=i(o[l]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}o=c}}},639:e=>{"use strict";var t,i=(t=[],function(e,i){return t[e]=i,t.filter(Boolean).join("\n")});function r(e,t,r,n){var o;if(r)o="";else{o="",n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var s=void 0!==n.layer;s&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,s&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}")}if(e.styleSheet)e.styleSheet.cssText=i(t,o);else{var a=document.createTextNode(o),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(a,c[t]):e.appendChild(a)}}var n={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=n.singletonCounter++,i=n.singleton||(n.singleton=e.insertStyleElement(e));return{update:function(e){r(i,t,!1,e)},remove:function(e){r(i,t,!0,e)}}}},758:e=>{"use strict";e.exports=function(e){return e[1]}},782:(e,t,i)=>{e.exports=i(237)("./src/core.js")},834:(e,t,i)=>{e.exports=i(237)("./src/typing.js")},913:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var r=i(758),n=i.n(r),o=i(935),s=i.n(o)()(n());s.push([e.id,".ck.ck-emoji{width:320px}.ck .ck.ck-emoji__search{align-items:center;display:flex;justify-content:space-between;padding:var(--ck-spacing-large);padding-bottom:var(--ck-spacing-medium)}.ck .ck-fake-emoji-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-emoji-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}",""]);const a=s},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",r=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),r&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),r&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,r,n,o){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);r&&s[u[0]]||(void 0!==o&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),i&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=i):u[2]=i),n&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=n):u[4]="".concat(n)),t.push(u))}},t}}},t={};function i(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={id:r,exports:{}};return e[r].call(o.exports,o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";i.r(r),i.d(r,{Emoji:()=>_r,EmojiCommand:()=>Ui,EmojiMention:()=>Di,EmojiPicker:()=>mr,EmojiRepository:()=>Mi,EmojiUtils:()=>Li});var e=i(782),t=i(584),n=i(834),o=i(146);const s="object"==typeof global&&global&&global.Object===Object&&global;var a="object"==typeof self&&self&&self.Object===Object&&self;const c=s||a||Function("return this")();const l=c.Symbol;var u=Object.prototype,d=u.hasOwnProperty,h=u.toString,f=l?l.toStringTag:void 0;const g=function(e){var t=d.call(e,f),i=e[f];try{e[f]=void 0;var r=!0}catch(e){}var n=h.call(e);return r&&(t?e[f]=i:delete e[f]),n};var p=Object.prototype.toString;const m=function(e){return p.call(e)};var _=l?l.toStringTag:void 0;const v=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":_&&_ in Object(e)?g(e):m(e)};const y=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const k=function(e){if(!y(e))return!1;var t=v(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const b=c["__core-js_shared__"];var w,j=(w=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"";const x=function(e){return!!j&&j in e};var T=Function.prototype.toString;const V=function(e){if(null!=e){try{return T.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var E=/^\[object .+?Constructor\]$/,P=Function.prototype,C=Object.prototype,S=P.toString,O=C.hasOwnProperty,A=RegExp("^"+S.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const I=function(e){return!(!y(e)||x(e))&&(k(e)?A:E).test(V(e))};const L=function(e,t){return null==e?void 0:e[t]};const B=function(e,t){var i=L(e,t);return I(i)?i:void 0};const M=function(){try{var e=B(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const F=function(e,t,i){"__proto__"==t&&M?M(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i};const z=function(e,t,i,r){for(var n=-1,o=null==e?0:e.length;++n<o;){var s=e[n];t(r,s,i(s),e)}return r};const R=function(e){return function(t,i,r){for(var n=-1,o=Object(t),s=r(t),a=s.length;a--;){var c=s[e?a:++n];if(!1===i(o[c],c,o))break}return t}}();const D=function(e,t){for(var i=-1,r=Array(e);++i<e;)r[i]=t(i);return r};const N=function(e){return null!=e&&"object"==typeof e};const U=function(e){return N(e)&&"[object Arguments]"==v(e)};var q=Object.prototype,$=q.hasOwnProperty,W=q.propertyIsEnumerable;const K=U(function(){return arguments}())?U:function(e){return N(e)&&$.call(e,"callee")&&!W.call(e,"callee")};const H=Array.isArray;const Q=function(){return!1};var G="object"==typeof exports&&exports&&!exports.nodeType&&exports,Z=G&&"object"==typeof module&&module&&!module.nodeType&&module,J=Z&&Z.exports===G?c.Buffer:void 0;const X=(J?J.isBuffer:void 0)||Q;var Y=/^(?:0|[1-9]\d*)$/;const ee=function(e,t){var i=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&Y.test(e))&&e>-1&&e%1==0&&e<t};const te=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var ie={};ie["[object Float32Array]"]=ie["[object Float64Array]"]=ie["[object Int8Array]"]=ie["[object Int16Array]"]=ie["[object Int32Array]"]=ie["[object Uint8Array]"]=ie["[object Uint8ClampedArray]"]=ie["[object Uint16Array]"]=ie["[object Uint32Array]"]=!0,ie["[object Arguments]"]=ie["[object Array]"]=ie["[object ArrayBuffer]"]=ie["[object Boolean]"]=ie["[object DataView]"]=ie["[object Date]"]=ie["[object Error]"]=ie["[object Function]"]=ie["[object Map]"]=ie["[object Number]"]=ie["[object Object]"]=ie["[object RegExp]"]=ie["[object Set]"]=ie["[object String]"]=ie["[object WeakMap]"]=!1;const re=function(e){return N(e)&&te(e.length)&&!!ie[v(e)]};const ne=function(e){return function(t){return e(t)}};var oe="object"==typeof exports&&exports&&!exports.nodeType&&exports,se=oe&&"object"==typeof module&&module&&!module.nodeType&&module,ae=se&&se.exports===oe&&s.process,ce=function(){try{var e=se&&se.require&&se.require("util").types;return e||ae&&ae.binding&&ae.binding("util")}catch(e){}}();var le=ce&&ce.isTypedArray;const ue=le?ne(le):re;var de=Object.prototype.hasOwnProperty;const he=function(e,t){var i=H(e),r=!i&&K(e),n=!i&&!r&&X(e),o=!i&&!r&&!n&&ue(e),s=i||r||n||o,a=s?D(e.length,String):[],c=a.length;for(var l in e)!t&&!de.call(e,l)||s&&("length"==l||n&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ee(l,c))||a.push(l);return a};var fe=Object.prototype;const ge=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||fe)};const pe=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object);var me=Object.prototype.hasOwnProperty;const _e=function(e){if(!ge(e))return pe(e);var t=[];for(var i in Object(e))me.call(e,i)&&"constructor"!=i&&t.push(i);return t};const ve=function(e){return null!=e&&te(e.length)&&!k(e)};const ye=function(e){return ve(e)?he(e):_e(e)};const ke=function(e,t){return function(i,r){if(null==i)return i;if(!ve(i))return e(i,r);for(var n=i.length,o=t?n:-1,s=Object(i);(t?o--:++o<n)&&!1!==r(s[o],o,s););return i}}((function(e,t){return e&&R(e,t,ye)}));const be=function(e,t,i,r){return ke(e,(function(e,n,o){t(r,e,i(e),o)})),r};const we=function(){this.__data__=[],this.size=0};const je=function(e,t){return e===t||e!=e&&t!=t};const xe=function(e,t){for(var i=e.length;i--;)if(je(e[i][0],t))return i;return-1};var Te=Array.prototype.splice;const Ve=function(e){var t=this.__data__,i=xe(t,e);return!(i<0)&&(i==t.length-1?t.pop():Te.call(t,i,1),--this.size,!0)};const Ee=function(e){var t=this.__data__,i=xe(t,e);return i<0?void 0:t[i][1]};const Pe=function(e){return xe(this.__data__,e)>-1};const Ce=function(e,t){var i=this.__data__,r=xe(i,e);return r<0?(++this.size,i.push([e,t])):i[r][1]=t,this};function Se(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}Se.prototype.clear=we,Se.prototype.delete=Ve,Se.prototype.get=Ee,Se.prototype.has=Pe,Se.prototype.set=Ce;const Oe=Se;const Ae=function(){this.__data__=new Oe,this.size=0};const Ie=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i};const Le=function(e){return this.__data__.get(e)};const Be=function(e){return this.__data__.has(e)};const Me=B(c,"Map");const Fe=B(Object,"create");const ze=function(){this.__data__=Fe?Fe(null):{},this.size=0};const Re=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var De=Object.prototype.hasOwnProperty;const Ne=function(e){var t=this.__data__;if(Fe){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return De.call(t,e)?t[e]:void 0};var Ue=Object.prototype.hasOwnProperty;const qe=function(e){var t=this.__data__;return Fe?void 0!==t[e]:Ue.call(t,e)};const $e=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Fe&&void 0===t?"__lodash_hash_undefined__":t,this};function We(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}We.prototype.clear=ze,We.prototype.delete=Re,We.prototype.get=Ne,We.prototype.has=qe,We.prototype.set=$e;const Ke=We;const He=function(){this.size=0,this.__data__={hash:new Ke,map:new(Me||Oe),string:new Ke}};const Qe=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const Ge=function(e,t){var i=e.__data__;return Qe(t)?i["string"==typeof t?"string":"hash"]:i.map};const Ze=function(e){var t=Ge(this,e).delete(e);return this.size-=t?1:0,t};const Je=function(e){return Ge(this,e).get(e)};const Xe=function(e){return Ge(this,e).has(e)};const Ye=function(e,t){var i=Ge(this,e),r=i.size;return i.set(e,t),this.size+=i.size==r?0:1,this};function et(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}et.prototype.clear=He,et.prototype.delete=Ze,et.prototype.get=Je,et.prototype.has=Xe,et.prototype.set=Ye;const tt=et;const it=function(e,t){var i=this.__data__;if(i instanceof Oe){var r=i.__data__;if(!Me||r.length<199)return r.push([e,t]),this.size=++i.size,this;i=this.__data__=new tt(r)}return i.set(e,t),this.size=i.size,this};function rt(e){var t=this.__data__=new Oe(e);this.size=t.size}rt.prototype.clear=Ae,rt.prototype.delete=Ie,rt.prototype.get=Le,rt.prototype.has=Be,rt.prototype.set=it;const nt=rt;const ot=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const st=function(e){return this.__data__.has(e)};function at(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new tt;++t<i;)this.add(e[t])}at.prototype.add=at.prototype.push=ot,at.prototype.has=st;const ct=at;const lt=function(e,t){for(var i=-1,r=null==e?0:e.length;++i<r;)if(t(e[i],i,e))return!0;return!1};const ut=function(e,t){return e.has(t)};const dt=function(e,t,i,r,n,o){var s=1&i,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var l=o.get(e),u=o.get(t);if(l&&u)return l==t&&u==e;var d=-1,h=!0,f=2&i?new ct:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var g=e[d],p=t[d];if(r)var m=s?r(p,g,d,t,e,o):r(g,p,d,e,t,o);if(void 0!==m){if(m)continue;h=!1;break}if(f){if(!lt(t,(function(e,t){if(!ut(f,t)&&(g===e||n(g,e,i,r,o)))return f.push(t)}))){h=!1;break}}else if(g!==p&&!n(g,p,i,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h};const ht=c.Uint8Array;const ft=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e,r){i[++t]=[r,e]})),i};const gt=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i};var pt=l?l.prototype:void 0,mt=pt?pt.valueOf:void 0;const _t=function(e,t,i,r,n,o,s){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new ht(e),new ht(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return je(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=ft;case"[object Set]":var c=1&r;if(a||(a=gt),e.size!=t.size&&!c)return!1;var l=s.get(e);if(l)return l==t;r|=2,s.set(e,t);var u=dt(a(e),a(t),r,n,o,s);return s.delete(e),u;case"[object Symbol]":if(mt)return mt.call(e)==mt.call(t)}return!1};const vt=function(e,t){for(var i=-1,r=t.length,n=e.length;++i<r;)e[n+i]=t[i];return e};const yt=function(e,t,i){var r=t(e);return H(e)?r:vt(r,i(e))};const kt=function(e,t){for(var i=-1,r=null==e?0:e.length,n=0,o=[];++i<r;){var s=e[i];t(s,i,e)&&(o[n++]=s)}return o};const bt=function(){return[]};var wt=Object.prototype.propertyIsEnumerable,jt=Object.getOwnPropertySymbols;const xt=jt?function(e){return null==e?[]:(e=Object(e),kt(jt(e),(function(t){return wt.call(e,t)})))}:bt;const Tt=function(e){return yt(e,ye,xt)};var Vt=Object.prototype.hasOwnProperty;const Et=function(e,t,i,r,n,o){var s=1&i,a=Tt(e),c=a.length;if(c!=Tt(t).length&&!s)return!1;for(var l=c;l--;){var u=a[l];if(!(s?u in t:Vt.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var f=!0;o.set(e,t),o.set(t,e);for(var g=s;++l<c;){var p=e[u=a[l]],m=t[u];if(r)var _=s?r(m,p,u,t,e,o):r(p,m,u,e,t,o);if(!(void 0===_?p===m||n(p,m,i,r,o):_)){f=!1;break}g||(g="constructor"==u)}if(f&&!g){var v=e.constructor,y=t.constructor;v==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y||(f=!1)}return o.delete(e),o.delete(t),f};const Pt=B(c,"DataView");const Ct=B(c,"Promise");const St=B(c,"Set");const Ot=B(c,"WeakMap");var At="[object Map]",It="[object Promise]",Lt="[object Set]",Bt="[object WeakMap]",Mt="[object DataView]",Ft=V(Pt),zt=V(Me),Rt=V(Ct),Dt=V(St),Nt=V(Ot),Ut=v;(Pt&&Ut(new Pt(new ArrayBuffer(1)))!=Mt||Me&&Ut(new Me)!=At||Ct&&Ut(Ct.resolve())!=It||St&&Ut(new St)!=Lt||Ot&&Ut(new Ot)!=Bt)&&(Ut=function(e){var t=v(e),i="[object Object]"==t?e.constructor:void 0,r=i?V(i):"";if(r)switch(r){case Ft:return Mt;case zt:return At;case Rt:return It;case Dt:return Lt;case Nt:return Bt}return t});const qt=Ut;var $t="[object Arguments]",Wt="[object Array]",Kt="[object Object]",Ht=Object.prototype.hasOwnProperty;const Qt=function(e,t,i,r,n,o){var s=H(e),a=H(t),c=s?Wt:qt(e),l=a?Wt:qt(t),u=(c=c==$t?Kt:c)==Kt,d=(l=l==$t?Kt:l)==Kt,h=c==l;if(h&&X(e)){if(!X(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new nt),s||ue(e)?dt(e,t,i,r,n,o):_t(e,t,c,i,r,n,o);if(!(1&i)){var f=u&&Ht.call(e,"__wrapped__"),g=d&&Ht.call(t,"__wrapped__");if(f||g){var p=f?e.value():e,m=g?t.value():t;return o||(o=new nt),n(p,m,i,r,o)}}return!!h&&(o||(o=new nt),Et(e,t,i,r,n,o))};const Gt=function e(t,i,r,n,o){return t===i||(null==t||null==i||!N(t)&&!N(i)?t!=t&&i!=i:Qt(t,i,r,n,e,o))};const Zt=function(e,t,i,r){var n=i.length,o=n,s=!r;if(null==e)return!o;for(e=Object(e);n--;){var a=i[n];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++n<o;){var c=(a=i[n])[0],l=e[c],u=a[1];if(s&&a[2]){if(void 0===l&&!(c in e))return!1}else{var d=new nt;if(r)var h=r(l,u,c,e,t,d);if(!(void 0===h?Gt(u,l,3,r,d):h))return!1}}return!0};const Jt=function(e){return e==e&&!y(e)};const Xt=function(e){for(var t=ye(e),i=t.length;i--;){var r=t[i],n=e[r];t[i]=[r,n,Jt(n)]}return t};const Yt=function(e,t){return function(i){return null!=i&&(i[e]===t&&(void 0!==t||e in Object(i)))}};const ei=function(e){var t=Xt(e);return 1==t.length&&t[0][2]?Yt(t[0][0],t[0][1]):function(i){return i===e||Zt(i,e,t)}};const ti=function(e){return"symbol"==typeof e||N(e)&&"[object Symbol]"==v(e)};var ii=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ri=/^\w*$/;const ni=function(e,t){if(H(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!ti(e))||(ri.test(e)||!ii.test(e)||null!=t&&e in Object(t))};function oi(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var r=arguments,n=t?t.apply(this,r):r[0],o=i.cache;if(o.has(n))return o.get(n);var s=e.apply(this,r);return i.cache=o.set(n,s)||o,s};return i.cache=new(oi.Cache||tt),i}oi.Cache=tt;const si=oi;var ai=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ci=/\\(\\)?/g;const li=function(e){var t=si(e,(function(e){return 500===i.size&&i.clear(),e})),i=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ai,(function(e,i,r,n){t.push(r?n.replace(ci,"$1"):i||e)})),t}));const ui=function(e,t){for(var i=-1,r=null==e?0:e.length,n=Array(r);++i<r;)n[i]=t(e[i],i,e);return n};var di=l?l.prototype:void 0,hi=di?di.toString:void 0;const fi=function e(t){if("string"==typeof t)return t;if(H(t))return ui(t,e)+"";if(ti(t))return hi?hi.call(t):"";var i=t+"";return"0"==i&&1/t==-1/0?"-0":i};const gi=function(e){return null==e?"":fi(e)};const pi=function(e,t){return H(e)?e:ni(e,t)?[e]:li(gi(e))};const mi=function(e){if("string"==typeof e||ti(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};const _i=function(e,t){for(var i=0,r=(t=pi(t,e)).length;null!=e&&i<r;)e=e[mi(t[i++])];return i&&i==r?e:void 0};const vi=function(e,t,i){var r=null==e?void 0:_i(e,t);return void 0===r?i:r};const yi=function(e,t){return null!=e&&t in Object(e)};const ki=function(e,t,i){for(var r=-1,n=(t=pi(t,e)).length,o=!1;++r<n;){var s=mi(t[r]);if(!(o=null!=e&&i(e,s)))break;e=e[s]}return o||++r!=n?o:!!(n=null==e?0:e.length)&&te(n)&&ee(s,n)&&(H(e)||K(e))};const bi=function(e,t){return null!=e&&ki(e,t,yi)};const wi=function(e,t){return ni(e)&&Jt(t)?Yt(mi(e),t):function(i){var r=vi(i,e);return void 0===r&&r===t?bi(i,e):Gt(t,r,3)}};const ji=function(e){return e};const xi=function(e){return function(t){return null==t?void 0:t[e]}};const Ti=function(e){return function(t){return _i(t,e)}};const Vi=function(e){return ni(e)?xi(mi(e)):Ti(e)};const Ei=function(e){return"function"==typeof e?e:null==e?ji:"object"==typeof e?H(e)?wi(e[0],e[1]):ei(e):Vi(e)};const Pi=function(e,t){return function(i,r){var n=H(i)?z:be,o=t?t():{};return n(i,e,Ei(r,2),o)}};var Ci=Object.prototype.hasOwnProperty;const Si=Pi((function(e,t,i){Ci.call(e,i)?e[i].push(t):F(e,i,[t])}));const Oi={0:"default",1:"light",2:"medium-light",3:"medium",4:"medium-dark",5:"dark"},Ai={"π«©":16,"π«¨":15.1};class Ii extends e.Plugin{static get pluginName(){return"EmojiUtils"}static get isOfficialPlugin(){return!0}isEmojiSupported(e,t,i){return!!(e.version<=t)&&(!this.hasZwj(e.emoji)||this.isEmojiZwjSupported(e,i))}getEmojiSupportedVersionByOs(){return Object.entries(Ai).reduce(((e,[t,i])=>i>e&&Ii._isEmojiSupported(t)?i:e),0)}hasZwj(e){return e.includes("β")}isEmojiZwjSupported(e,t){return this.getNodeWidth(t,e.emoji)<43.2}getNodeWidth(e,t){const i=document.createElement("span");i.textContent=t,e.appendChild(i);const r=i.offsetWidth;return e.removeChild(i),r}createEmojiWidthTestingContainer(){const e=document.createElement("div");return e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.whiteSpace="nowrap",e.style.fontSize="24px",e}normalizeEmojiSkinTone(e){const t={...e,skins:{default:e.emoji}};return e.skins&&e.skins.forEach((e=>{const i=Oi[e.tone];t.skins[i]=e.emoji})),t}isEmojiCategoryAllowed(e){return 2!==e.group}}Ii._isEmojiSupported=function(e){const t=function(){try{return document.createElement("canvas").getContext("2d",{willReadFrequently:!0})}catch{return null}}();if(!t)return!1;const i=20,r=Math.floor(12.5);t.font=r+"px Arial, Sans-Serif",t.textBaseline="top",t.canvas.width=40,t.canvas.height=25,t.clearRect(0,0,40,25),t.fillStyle="#FF0000",t.fillText(e,0,22),t.fillStyle="#0000FF",t.fillText(e,i,22);const n=t.getImageData(0,0,i,25).data,o=n.length;let s=0;for(;s<o&&!n[s+3];s+=4);if(s>=o)return!1;const a=i+s/4%i,c=Math.floor(s/4/i),l=t.getImageData(a,c,1,1).data;return n[s]===l[0]&&n[s+2]===l[2]&&!(t.measureText(e).width>=i)};const Li=Ii;class Bi extends e.Plugin{static get requires(){return[Li]}static get pluginName(){return"EmojiRepository"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("emoji",{version:void 0,skinTone:"default",definitionsUrl:void 0}),this._url=this._getUrl(),this._repositoryPromise=new Promise((e=>{this._repositoryPromiseResolveCallback=e})),this._items=null}async init(){return this._warnAboutCdnUse(),await this._loadAndCacheEmoji(),this._items=this._getItems(),this._items?this._repositoryPromiseResolveCallback(!0):this._repositoryPromiseResolveCallback(!1)}getEmojiByQuery(e){if(!this._items)return[];return e.split(/\s/).filter(Boolean).some((e=>e.length>=2))?o.go(e,this._items,{threshold:.6,keys:["emoticon","annotation",t=>e.split(/\s/).filter(Boolean).flatMap((e=>{var i;return null===(i=t.tags)||void 0===i?void 0:i.filter((t=>t.startsWith(e)))})).join()]}).map((e=>e.obj)):[]}getEmojiCategories(){const e=this._getItems();if(!e)return[];const{t}=this.editor.locale,i=[{title:t("Smileys & Expressions"),icon:"π",groupId:0},{title:t("Gestures & People"),icon:"π",groupId:1},{title:t("Animals & Nature"),icon:"π»",groupId:3},{title:t("Food & Drinks"),icon:"π",groupId:4},{title:t("Travel & Places"),icon:"π",groupId:5},{title:t("Activities"),icon:"π",groupId:6},{title:t("Objects"),icon:"π‘",groupId:7},{title:t("Symbols"),icon:"π’",groupId:8},{title:t("Flags"),icon:"π",groupId:9}],r=Si(e,"group");return i.map((e=>({...e,items:r[e.groupId]})))}getSkinTones(){const{t:e}=this.editor.locale;return[{id:"default",icon:"π",tooltip:e("Default skin tone")},{id:"light",icon:"ππ»",tooltip:e("Light skin tone")},{id:"medium-light",icon:"ππΌ",tooltip:e("Medium Light skin tone")},{id:"medium",icon:"ππ½",tooltip:e("Medium skin tone")},{id:"medium-dark",icon:"ππΎ",tooltip:e("Medium Dark skin tone")},{id:"dark",icon:"ππΏ",tooltip:e("Dark skin tone")}]}isReady(){return this._repositoryPromise}_getUrl(){const{definitionsUrl:e,version:i}=this.editor.config.get("emoji");if(!e||"cdn"===e){const e=new URL("https://cdn.ckeditor.com/ckeditor5/data/emoji/{version}/en.json".replace("{version}",(i||16).toString()));return e.searchParams.set("editorVersion",t.version),e}return i&&(0,t.logWarning)("emoji-repository-redundant-version"),new URL(e)}_warnAboutCdnUse(){const e=this.editor,i=e.config.get("emoji"),r=e.config.get("licenseKey"),n=window[Symbol.for("cke distribution")];"GPL"!==r&&"cloud"!==n&&(i&&i.definitionsUrl||(0,t.logWarning)("emoji-repository-cdn-use"))}_getItems(){const e=Bi._results[this._url.href];return e&&e.length?e:null}async _loadAndCacheEmoji(){if(Bi._results[this._url.href])return;const e=await fetch(this._url,{cache:"force-cache"}).then((e=>e.ok?e.json():[])).catch((()=>[]));e.length||(0,t.logWarning)("emoji-repository-load-failed"),Bi._results[this._url.href]=this._normalizeEmoji(e)}_normalizeEmoji(e){const t=this.editor.plugins.get("EmojiUtils"),i=t.getEmojiSupportedVersionByOs(),r=t.createEmojiWidthTestingContainer();document.body.appendChild(r);const n=e.filter((e=>t.isEmojiCategoryAllowed(e))).filter((e=>t.isEmojiSupported(e,i,r))).map((e=>t.normalizeEmojiSkinTone(e)));return r.remove(),n}}Bi._results={};const Mi=Bi,Fi=":",zi=":__EMOJI_SHOW_ALL:",Ri=":__EMOJI_HINT:";class Di extends e.Plugin{static get requires(){return[Mi,n.Typing,"Mention"]}static get pluginName(){return"EmojiMention"}static get isOfficialPlugin(){return!0}constructor(e){super(e),this.editor.config.define("emoji",{dropdownLimit:6}),this._emojiDropdownLimit=e.config.get("emoji.dropdownLimit"),this._skinTone=e.config.get("emoji.skinTone"),this._setupMentionConfiguration(e)}_setupMentionConfiguration(e){const i=e.config.get("mergeFields.prefix"),r=e.config.get("mention.feeds"),n=!!i&&i[0]===Fi;if(r.filter((e=>!e._isEmojiMarker)).some((e=>e.marker===Fi))||n)return void(0,t.logWarning)("emoji-config-marker-already-used",{marker:Fi});if(r.some((e=>e._isEmojiMarker)))return;const o={_isEmojiMarker:!0,marker:Fi,dropdownLimit:this._emojiDropdownLimit,itemRenderer:this._customItemRendererFactory(this.editor.t),feed:this._queryEmojiCallbackFactory()};this.editor.config.set("mention.feeds",[...r,o])}async init(){const e=this.editor;this.emojiPickerPlugin=e.plugins.has("EmojiPicker")?e.plugins.get("EmojiPicker"):null,this.emojiRepositoryPlugin=e.plugins.get("EmojiRepository"),this._isEmojiRepositoryAvailable=await this.emojiRepositoryPlugin.isReady(),this._isEmojiRepositoryAvailable&&e.once("ready",this._overrideMentionExecuteListener.bind(this))}_customItemRendererFactory(e){return t=>{const i=document.createElement("button");i.classList.add("ck"),i.classList.add("ck-button"),i.classList.add("ck-button_with-text"),i.id=`mention-list-item-id${t.id.slice(0,-1)}`,i.type="button",i.tabIndex=-1;const r=document.createElement("span");return r.classList.add("ck"),r.classList.add("ck-button__label"),i.appendChild(r),t.id===Ri?(i.classList.add("ck-list-item-button"),i.classList.add("ck-disabled"),r.textContent=e("Keep on typing to see the emoji.")):t.id===zi?r.textContent=e("Show all emoji..."):r.textContent=`${t.text} ${t.id}`,i}}_overrideMentionExecuteListener(){const e=this.editor;e.commands.get("mention").on("execute",((t,i)=>{const r=i[0];if(r.marker===Fi&&(t.stop(),r.mention.id!==Ri))if(r.mention.id===zi){const t=[...r.range.getItems()].filter((e=>e.is("$textProxy"))).map((e=>e.data)).reduce(((e,t)=>e+t),"");e.model.change((t=>{e.model.deleteContent(t.createSelection(r.range))}));const i=this.emojiPickerPlugin;i.showUI(t.slice(1)),setTimeout((()=>{i.emojiPickerView.focus()}))}else e.execute("insertText",{text:r.mention.text,range:r.range})}),{priority:"high"})}_queryEmojiCallbackFactory(){return e=>{if(e.startsWith(" "))return[];if(e.startsWith(Fi))return[];if(!this._isEmojiRepositoryAvailable)return[];const t=this.emojiRepositoryPlugin.getEmojiByQuery(e).map((e=>{let t=e.skins[this._skinTone]||e.skins.default;return this.emojiPickerPlugin&&(t=e.skins[this.emojiPickerPlugin.skinTone]||e.skins.default),{id:`:${e.annotation}:`,text:t}}));if(!this.emojiPickerPlugin)return t.slice(0,this._emojiDropdownLimit);const i={id:e.length>1?zi:Ri};return[...t.slice(0,this._emojiDropdownLimit-1),i]}}}var Ni=i(311);class Ui extends e.Command{refresh(){const e=this.editor.model,t=e.schema,i=e.document.selection;this.isEnabled=t.checkChild(i.getFirstPosition(),"$text")}execute(e=""){this.editor.plugins.get("EmojiPicker").showUI(e)}}var qi=i(591),$i=i.n(qi),Wi=i(639),Ki=i.n(Wi),Hi=i(128),Qi=i.n(Hi),Gi=i(21),Zi=i.n(Gi),Ji=i(51),Xi=i.n(Ji),Yi=i(291),er={attributes:{"data-cke":!0}};er.setAttributes=Zi(),er.insert=Qi().bind(null,"head"),er.domAPI=Ki(),er.insertStyleElement=Xi();$i()(Yi.A,er);Yi.A&&Yi.A.locals&&Yi.A.locals;class tr extends Ni.View{constructor(e,{categoryName:i,emojiCategories:r,getEmojiByQuery:n,skinTone:o}){super(e),this.set("isEmpty",!0),this.set("categoryName",i),this.set("skinTone",o),this.tiles=this.createCollection(),this.cachedTiles=this.createCollection(),this.focusTracker=new t.FocusTracker,this.keystrokes=new t.KeystrokeHandler,this._getEmojiByQuery=n,this.emojiCategories=r;const s=this.bindTemplate;this.setTemplate({tag:"div",children:[{tag:"div",attributes:{role:"grid",class:["ck","ck-emoji__grid"]},children:this.tiles}],attributes:{role:"tabpanel",class:["ck","ck-emoji__tiles",s.if("isEmpty","ck-hidden",(e=>e))]}}),(0,Ni.addKeyboardHandlingForGrid)({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.tiles,numberOfColumns:()=>t.global.window.getComputedStyle(this.element.firstChild).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.keystrokes.destroy(),this.focusTracker.destroy()}focus(){const e=this.tiles.first;e&&e.focus()}filter(e){const{matchingItems:t,allItems:i}=e?this._getItemsByQuery(e.source):this._getItemsByCategory();return this._updateGrid(t),this.set("isEmpty",0===t.length),{resultsCount:t.length,totalItemsCount:i.length}}_getItemsByQuery(e){return{matchingItems:this._getEmojiByQuery(e),allItems:this.emojiCategories.flatMap((e=>e.items))}}_getItemsByCategory(){const e=this.emojiCategories.find((e=>e.title===this.categoryName)),{items:t}=e;return{matchingItems:t,allItems:t}}_updateGrid(e){[...this.tiles].forEach((e=>{this.focusTracker.remove(e),this.tiles.remove(e)})),e.map((e=>{const t=e.skins[this.skinTone]||e.skins.default;return this.cachedTiles.get(t)||this._createTile(t,e.annotation)})).forEach((e=>{this.tiles.add(e),this.focusTracker.add(e)}))}_createTile(e,t){const i=new Ni.ButtonView(this.locale);return i.viewUid=e,i.extendTemplate({attributes:{class:["ck-emoji__tile"]}}),i.set({label:e,tooltip:t,withText:!0,ariaLabel:t,ariaLabelledBy:void 0}),i.on("execute",(()=>{this.fire("execute",{name:t,emoji:e})})),this.cachedTiles.add(i),i}}var ir=i(223),rr={attributes:{"data-cke":!0}};rr.setAttributes=Zi(),rr.insert=Qi().bind(null,"head"),rr.domAPI=Ki(),rr.insertStyleElement=Xi();$i()(ir.A,rr);ir.A&&ir.A.locals&&ir.A.locals;class nr extends Ni.View{constructor(e,{emojiCategories:i,categoryName:r}){super(e),this.buttonViews=this.createCollection(i.map((e=>this._createCategoryButton(e)))),this.focusTracker=new t.FocusTracker,this.keystrokes=new t.KeystrokeHandler,this.focusCycler=new Ni.FocusCycler({focusables:this.buttonViews,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowleft",focusNext:"arrowright"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-emoji__categories-list"],role:"tablist"},children:this.buttonViews}),this.on("change:categoryName",((e,t,i,r)=>{const n=this.buttonViews.find((e=>e.tooltip===r));n&&(n.isOn=!1);this.buttonViews.find((e=>e.tooltip===i)).isOn=!0})),this.set("categoryName",r)}render(){super.render(),this.buttonViews.forEach((e=>{this.focusTracker.add(e)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),this.buttonViews.destroy()}focus(){this.buttonViews.first.focus()}enableCategories(){this.buttonViews.forEach((e=>{e.isEnabled=!0}))}disableCategories(){this.buttonViews.forEach((e=>{e.set({class:"",isEnabled:!1,isOn:!1})}))}_createCategoryButton(e){const t=new Ni.ButtonView,i=t.bindTemplate;return t.extendTemplate({attributes:{"aria-selected":i.to("isOn",(e=>e.toString())),class:["ck-emoji__category-item"]}}),t.set({ariaLabel:e.title,label:e.icon,role:"tab",tooltip:e.title,withText:!0,ariaLabelledBy:void 0}),t.on("execute",(()=>{this.categoryName=e.title})),t.on("change:isEnabled",(()=>{t.isEnabled&&t.tooltip===this.categoryName&&(t.isOn=!0)})),t}}var or=/[\\^$.*+?()[\]{}|]/g,sr=RegExp(or.source);const ar=function(e){return(e=gi(e))&&sr.test(e)?e.replace(or,"\\$&"):e};class cr extends Ni.View{constructor(e,{gridView:t,resultsView:i}){super(e),this.gridView=t;const r=e.t;this.inputView=new Ni.SearchTextView(this.locale,{queryView:{label:r("Find an emoji (min. 2 characters)"),creator:Ni.createLabeledInputText},filteredView:this.gridView,infoView:{instance:i}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search"],tabindex:"-1"},children:[this.inputView.queryView]}),this.inputView.delegate("search").to(this)}destroy(){super.destroy(),this.inputView.destroy()}search(e){const t=e?new RegExp(ar(e),"ig"):null,i=this.gridView.filter(t);this.inputView.fire("search",{query:e,...i})}setInputValue(e){e?this.inputView.queryView.fieldView.value=e:this.inputView.queryView.fieldView.reset()}getInputValue(){return this.inputView.queryView.fieldView.element.value}focus(){this.inputView.focus()}}var lr=i(59),ur={attributes:{"data-cke":!0}};ur.setAttributes=Zi(),ur.insert=Qi().bind(null,"head"),ur.domAPI=Ki(),ur.insertStyleElement=Xi();$i()(lr.A,ur);lr.A&&lr.A.locals&&lr.A.locals;class dr extends Ni.View{constructor(e,{skinTone:i,skinTones:r}){super(e),this.set("skinTone",i),this._skinTones=r;const n=(0,e.t)("Select skin tone"),o=(0,Ni.createDropdown)(e),s=new t.Collection;for(const{id:e,icon:t,tooltip:i}of this._skinTones){const r={type:"button",model:new Ni.ViewModel({value:e,label:t,ariaLabel:i,tooltip:i,tooltipPosition:"e",role:"menuitemradio",withText:!0,ariaLabelledBy:void 0})};r.model.bind("isOn").to(this,"skinTone",(t=>t===e)),s.add(r)}(0,Ni.addListToDropdown)(o,s,{ariaLabel:n,role:"menu"}),o.buttonView.set({label:this._getSkinTone().icon,ariaLabel:n,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:n}),this.dropdownView=o,this.listenTo(o,"execute",(e=>{this.skinTone=e.source.value})),o.buttonView.bind("label").to(this,"skinTone",(()=>this._getSkinTone().icon)),o.buttonView.bind("ariaLabel").to(this,"skinTone",(()=>`${this._getSkinTone().tooltip}, ${n}`)),this.setTemplate({tag:"div",attributes:{class:["ck","ck-emoji__skin-tone"]},children:[o]})}focus(){this.dropdownView.buttonView.focus()}_getSkinTone(){return this._skinTones.find((e=>e.id===this.skinTone))}}class hr extends Ni.View{constructor(e,{emojiCategories:i,getEmojiByQuery:r,skinTone:n,skinTones:o}){super(e);const s=i[0].title;this.gridView=new tr(e,{categoryName:s,emojiCategories:i,getEmojiByQuery:r,skinTone:n}),this.infoView=new Ni.SearchInfoView,this.searchView=new cr(e,{gridView:this.gridView,resultsView:this.infoView}),this.categoriesView=new nr(e,{emojiCategories:i,categoryName:s}),this.toneView=new dr(e,{skinTone:n,skinTones:o}),this.items=this.createCollection([this.searchView,this.toneView,this.categoriesView,this.gridView,this.infoView]),this.focusTracker=new t.FocusTracker,this.keystrokes=new t.KeystrokeHandler,this.focusCycler=new Ni.FocusCycler({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",children:[{tag:"div",children:[this.searchView,this.toneView],attributes:{class:["ck","ck-emoji__search"]}},this.categoriesView,this.gridView,{tag:"div",children:[this.infoView],attributes:{class:["ck","ck-search__results"]}}],attributes:{tabindex:"-1",class:["ck","ck-emoji","ck-search"]}}),this._setupEventListeners()}render(){super.render(),this.focusTracker.add(this.searchView.element),this.focusTracker.add(this.toneView.element),this.focusTracker.add(this.categoriesView.element),this.focusTracker.add(this.gridView.element),this.focusTracker.add(this.infoView.element),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.searchView.focus()}_setupEventListeners(){const e=this.locale.t;this.searchView.on("search",((e,t)=>{t.query?this.categoriesView.disableCategories():this.categoriesView.enableCategories()})),this.searchView.on("search",((t,i)=>{1===i.query.length?this.infoView.set({primaryText:e("Keep on typing to see the emoji."),secondaryText:e("The query must contain at least two characters."),isVisible:!0}):i.resultsCount?this.infoView.set({isVisible:!1}):this.infoView.set({primaryText:e('No emojis were found matching "%0".',i.query),secondaryText:e("Please try a different phrase or check the spelling."),isVisible:!0})})),this.searchView.on("search",(()=>{this.fire("update"),this.gridView.element.scrollTo(0,0)})),this.categoriesView.on("change:categoryName",((e,t,i)=>{this.gridView.categoryName=i,this.searchView.search("")})),this.toneView.on("change:skinTone",((e,t,i)=>{this.gridView.skinTone=i,this.searchView.search(this.searchView.getInputValue())}))}}var fr=i(913),gr={attributes:{"data-cke":!0}};gr.setAttributes=Zi(),gr.insert=Qi().bind(null,"head"),gr.domAPI=Ki(),gr.insertStyleElement=Xi();$i()(fr.A,gr);fr.A&&fr.A.locals&&fr.A.locals;const pr="emoji-picker";class mr extends e.Plugin{static get requires(){return[Mi,Ni.ContextualBalloon,Ni.Dialog,n.Typing]}static get pluginName(){return"EmojiPicker"}static get isOfficialPlugin(){return!0}async init(){const e=this.editor;if(this.balloonPlugin=e.plugins.get("ContextualBalloon"),this.emojiRepositoryPlugin=e.plugins.get("EmojiRepository"),!await this.emojiRepositoryPlugin.isReady())return;const t=new Ui(e);e.commands.add("emoji",t),e.ui.componentFactory.add("emoji",(()=>{const e=this._createButton(Ni.ButtonView,t);return e.set({tooltip:!0}),e})),e.ui.componentFactory.add("menuBar:emoji",(()=>this._createButton(Ni.MenuBarMenuListItemButtonView,t))),this._setupConversion()}destroy(){super.destroy(),this.emojiPickerView&&this.emojiPickerView.destroy()}get skinTone(){return this.emojiPickerView?this.emojiPickerView.gridView.skinTone:this.editor.config.get("emoji.skinTone")}showUI(e=""){this._showFakeVisualSelection(),this.emojiPickerView||(this.emojiPickerView=this._createEmojiPickerView()),e&&this.emojiPickerView.searchView.setInputValue(e),this.emojiPickerView.searchView.search(e),this.balloonPlugin.hasView(this.emojiPickerView)||this.balloonPlugin.add({view:this.emojiPickerView,position:this._getBalloonPositionData()}),this.emojiPickerView.focus()}_createButton(t,i){const r=new t(this.editor.locale),n=this.editor.locale.t;return r.bind("isEnabled").to(i,"isEnabled"),r.set({label:n("Emoji"),icon:e.icons.emoji,isToggleable:!0}),r.on("execute",(()=>{this.showUI()})),r}_createEmojiPickerView(){const e=new hr(this.editor.locale,{emojiCategories:this.emojiRepositoryPlugin.getEmojiCategories(),skinTone:this.editor.config.get("emoji.skinTone"),skinTones:this.emojiRepositoryPlugin.getSkinTones(),getEmojiByQuery:e=>this.emojiRepositoryPlugin.getEmojiByQuery(e)});return this.listenTo(e.gridView,"execute",((e,t)=>{const i=this.editor,r=t.emoji;this._hideUI(),i.execute("insertText",{text:r})})),this.listenTo(e,"update",(()=>{this.balloonPlugin.visibleView===e&&this.balloonPlugin.updatePosition()})),e.keystrokes.set("Esc",((e,t)=>{this._hideUI(),t()})),(0,Ni.clickOutsideHandler)({emitter:e,contextElements:[this.balloonPlugin.view.element],callback:()=>this._hideUI(),activator:()=>this.balloonPlugin.visibleView===e}),e}_hideUI(){this.balloonPlugin.remove(this.emojiPickerView),this.emojiPickerView.searchView.setInputValue(""),this.editor.editing.view.focus(),this._hideFakeVisualSelection()}_setupConversion(){const e=this.editor;e.conversion.for("editingDowncast").markerToHighlight({model:pr,view:{classes:["ck-fake-emoji-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:pr,view:(e,{writer:t})=>{if(!e.markerRange.isCollapsed)return null;const i=t.createUIElement("span");return t.addClass(["ck-fake-emoji-selection","ck-fake-emoji-selection_collapsed"],i),i}})}_getBalloonPositionData(){const e=this.editor.editing.view,t=e.document;return{target:()=>e.domConverter.viewRangeToDom(t.selection.getFirstRange())}}_showFakeVisualSelection(){const e=this.editor.model;e.change((t=>{const i=e.document.selection.getFirstRange();if(e.markers.has(pr))t.updateMarker(pr,{range:i});else if(i.start.isAtEnd){const r=i.start.getLastMatchingPosition((({item:t})=>!e.schema.isContent(t)),{boundaries:i});t.addMarker(pr,{usingOperation:!1,affectsData:!1,range:t.createRange(r,i.end)})}else t.addMarker(pr,{usingOperation:!1,affectsData:!1,range:i})}))}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(pr)&&e.change((e=>{e.removeMarker(pr)}))}}class _r extends e.Plugin{static get requires(){return[Di,mr]}static get pluginName(){return"Emoji"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).emoji=r})();
|
|
5
|
+
*/(()=>{var e={21:e=>{"use strict";e.exports=function(e,t){Object.keys(t).forEach((function(i){e.setAttribute(i,t[i])}))}},51:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},59:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var r=i(758),n=i.n(r),o=i(935),s=i.n(o)()(n());s.push([e.id,".ck.ck-emoji__skin-tone{margin-left:var(--ck-spacing-standard)}.ck.ck-emoji__skin-tone>.ck.ck-dropdown .ck.ck-list__item{min-width:1em}.ck.ck-emoji__skin-tone>.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{width:auto}",""]);const a=s},128:e=>{"use strict";var t={};e.exports=function(e,i){var r=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(i)}},146:function(e,t){var i,r,n;r=[],void 0===(n="function"==typeof(i=e=>{"use strict";var t=e=>{"number"==typeof e?e=""+e:"string"!=typeof e&&(e="");var t=g(e);return n(e,{_targetLower:t._lower,_targetLowerCodes:t.lowerCodes,_bitflags:t.bitflags})};class i{get indexes(){return this._indexes.slice(0,this._indexes.len).sort(((e,t)=>e-t))}set indexes(e){return this._indexes=e}highlight(e,t){return((e,t="<b>",i="</b>")=>{for(var r="function"==typeof t?t:void 0,n=e.target,o=n.length,s=e.indexes,a="",c=0,l=0,u=!1,d=[],h=0;h<o;++h){var f=n[h];if(s[l]===h){if(++l,u||(u=!0,r?(d.push(a),a=""):a+=t),l===s.length){r?(a+=f,d.push(r(a,c++)),a="",d.push(n.substr(h+1))):a+=f+i+n.substr(h+1);break}}else u&&(u=!1,r?(d.push(r(a,c++)),a=""):a+=i);a+=f}return r?d:a})(this,e,t)}get score(){return o(this._score)}set score(e){this._score=s(e)}}class r extends Array{get score(){return o(this._score)}set score(e){this._score=s(e)}}var n=(e,t)=>{const r=new i;return r.target=e,r.obj=t.obj??L,r._score=t._score??P,r._indexes=t._indexes??[],r._targetLower=t._targetLower??"",r._targetLowerCodes=t._targetLowerCodes??L,r._nextBeginningIndexes=t._nextBeginningIndexes??L,r._bitflags=t._bitflags??0,r},o=e=>e===P?0:e>1?e:Math.E**(-2*((1-e)**.04307-1)),s=e=>0===e?P:e>1?e:1-Math.pow(Math.log(e)/-2+1,1/.04307),a=e=>{"number"==typeof e?e=""+e:"string"!=typeof e&&(e=""),e=e.trim();var t=g(e),i=[];if(t.containsSpace){var r=e.split(/\s+/);r=[...new Set(r)];for(var n=0;n<r.length;n++)if(""!==r[n]){var o=g(r[n]);i.push({lowerCodes:o.lowerCodes,_lower:r[n].toLowerCase(),containsSpace:!1})}}return{lowerCodes:t.lowerCodes,_lower:t._lower,containsSpace:t.containsSpace,bitflags:t.bitflags,spaceSearches:i}},c=e=>{if(e.length>999)return t(e);var i=m.get(e);return void 0!==i||(i=t(e),m.set(e,i)),i},l=e=>{if(e.length>999)return a(e);var t=_.get(e);return void 0!==t||(t=a(e),_.set(e,t)),t},u=(e,t)=>{var i=[];i.total=e.length;var o=t?.limit||E;if(t?.key)for(var s=0;s<e.length;s++){var a=e[s];if((h=T(a,t.key))!=L){V(h)||(h=c(h));var l=n(h.target,{_score:h._score,obj:a});if(i.push(l),i.length>=o)return i}}else if(t?.keys)for(s=0;s<e.length;s++){a=e[s];for(var u=new r(t.keys.length),d=t.keys.length-1;d>=0;--d)(h=T(a,t.keys[d]))?(V(h)||(h=c(h)),h._score=P,h._indexes.len=0,u[d]=h):u[d]=B;if(u.obj=a,u._score=P,i.push(u),i.length>=o)return i}else for(s=0;s<e.length;s++){var h;if((h=e[s])!=L&&(V(h)||(h=c(h)),h._score=P,h._indexes.len=0,i.push(h),i.length>=o))return i}return i},d=(e,t,r=!1,n=!1)=>{if(!1===r&&e.containsSpace)return h(e,t,n);for(var o=e._lower,s=e.lowerCodes,a=s[0],c=t._targetLowerCodes,l=s.length,u=c.length,d=0,f=0,g=0;;){if(a===c[f]){if(v[g++]=f,++d===l)break;a=s[d]}if(++f>=u)return L}d=0;var m=!1,_=0,k=t._nextBeginningIndexes;k===L&&(k=t._nextBeginningIndexes=p(t.target));var b=0;if((f=0===v[0]?0:k[v[0]-1])!==u)for(;;)if(f>=u){if(d<=0)break;if(++b>200)break;--d;var w=y[--_];f=k[w]}else if(s[d]===c[f]){if(y[_++]=f,++d===l){m=!0;break}++f}else f=k[f];var j=l<=1?-1:t._targetLower.indexOf(o,v[0]),x=!!~j,T=!!x&&(0===j||t._nextBeginningIndexes[j-1]===j);if(x&&!T)for(var V=0;V<k.length;V=k[V])if(!(V<=j)){for(var E=0;E<l&&s[E]===t._targetLowerCodes[V+E];E++);if(E===l){j=V,T=!0;break}}var P=e=>{for(var t=0,i=0,r=1;r<l;++r)e[r]-e[r-1]!=1&&(t-=e[r],++i);if(t-=(e[l-1]-e[0]-(l-1)+12)*i,0!==e[0]&&(t-=e[0]*e[0]*.2),m){var n=1;for(r=k[0];r<u;r=k[r])++n;n>24&&(t*=10*(n-24))}else t*=1e3;return t-=(u-l)/2,x&&(t/=1+l*l*1),T&&(t/=1+l*l*1),t-=(u-l)/2};if(m)if(T){for(V=0;V<l;++V)v[V]=j+V;C=v,S=P(v)}else C=y,S=P(y);else{if(x)for(var V=0;V<l;++V)v[V]=j+V;var C,S=P(C=v)}for(t._score=S,V=0;V<l;++V)t._indexes[V]=C[V];t._indexes.len=l;const O=new i;return O.target=t.target,O._score=t._score,O._indexes=t._indexes,O},h=(e,t,i)=>{for(var r=new Set,n=0,o=L,s=0,a=e.spaceSearches,c=a.length,l=0,u=()=>{for(let e=l-1;e>=0;e--)t._nextBeginningIndexes[k[2*e+0]]=k[2*e+1]},h=!1,f=0;f<c;++f){w[f]=P;var g=a[f];if(o=d(g,t),i){if(o===L)continue;h=!0}else if(o===L)return u(),L;if(f!==c-1){var p=o._indexes,m=!0;for(let e=0;e<p.len-1;e++)if(p[e+1]-p[e]!=1){m=!1;break}if(m){var _=p[p.len-1]+1,v=t._nextBeginningIndexes[_-1];for(let e=_-1;e>=0&&v===t._nextBeginningIndexes[e];e--)t._nextBeginningIndexes[e]=_,k[2*l+0]=e,k[2*l+1]=v,l++}}n+=o._score/c,w[f]=o._score/c,o._indexes[0]<s&&(n-=2*(s-o._indexes[0])),s=o._indexes[0];for(var y=0;y<o._indexes.len;++y)r.add(o._indexes[y])}if(i&&!h)return L;u();var b=d(e,t,!0);if(b!==L&&b._score>n){if(i)for(f=0;f<c;++f)w[f]=b._score/c;return b}i&&(o=t),o._score=n,f=0;for(let e of r)o._indexes[f++]=e;return o._indexes.len=f,o},f=e=>e.replace(/\p{Script=Latin}+/gu,(e=>e.normalize("NFD"))).replace(/[\u0300-\u036f]/g,""),g=e=>{for(var t=(e=f(e)).length,i=e.toLowerCase(),r=[],n=0,o=!1,s=0;s<t;++s){var a=r[s]=i.charCodeAt(s);32!==a?n|=1<<(a>=97&&a<=122?a-97:a>=48&&a<=57?26:a<=127?30:31):o=!0}return{lowerCodes:r,bitflags:n,containsSpace:o,_lower:i}},p=e=>{for(var t=(e=f(e)).length,i=(e=>{for(var t=e.length,i=[],r=0,n=!1,o=!1,s=0;s<t;++s){var a=e.charCodeAt(s),c=a>=65&&a<=90,l=c||a>=97&&a<=122||a>=48&&a<=57,u=c&&!n||!o||!l;n=c,o=l,u&&(i[r++]=s)}return i})(e),r=[],n=i[0],o=0,s=0;s<t;++s)n>s?r[s]=n:(n=i[++o],r[s]=void 0===n?t:n);return r},m=new Map,_=new Map,v=[],y=[],k=[],b=[],w=[],j=[],x=[],T=(e,t)=>{var i=e[t];if(void 0!==i)return i;if("function"==typeof t)return t(e);var r=t;Array.isArray(t)||(r=t.split("."));for(var n=r.length,o=-1;e&&++o<n;)e=e[r[o]];return e},V=e=>"object"==typeof e&&"number"==typeof e._bitflags,E=1/0,P=-E,C=[];C.total=0;var S,O,A,I,L=null,B=t(""),M=(S=[],O=0,I=e=>{for(var t=0,i=S[t],r=1;r<O;){var n=r+1;t=r,n<O&&S[n]._score<S[r]._score&&(t=n),S[t-1>>1]=S[t],r=1+(t<<1)}for(var o=t-1>>1;t>0&&i._score<S[o]._score;o=(t=o)-1>>1)S[t]=S[o];S[t]=i},(A={}).add=e=>{var t=O;S[O++]=e;for(var i=t-1>>1;t>0&&e._score<S[i]._score;i=(t=i)-1>>1)S[t]=S[i];S[t]=e},A.poll=e=>{if(0!==O){var t=S[0];return S[0]=S[--O],I(),t}},A.peek=e=>{if(0!==O)return S[0]},A.replaceTop=e=>{S[0]=e,I()},A);return{single:(e,t)=>{if(!e||!t)return L;var i=l(e);V(t)||(t=c(t));var r=i.bitflags;return(r&t._bitflags)!==r?L:d(i,t)},go:(e,t,i)=>{if(!e)return i?.all?u(t,i):C;var n=l(e),o=n.bitflags,a=n.containsSpace,h=s(i?.threshold||0),f=i?.limit||E,g=0,p=0,m=t.length;function _(e){g<f?(M.add(e),++g):(++p,e._score>M.peek()._score&&M.replaceTop(e))}if(i?.key)for(var v=i.key,y=0;y<m;++y){var k=t[y];(N=T(k,v))&&(V(N)||(N=c(N)),(o&N._bitflags)===o&&(U=d(n,N))!==L&&(U._score<h||(U.obj=k,_(U))))}else if(i?.keys){var S=i.keys,O=S.length;e:for(y=0;y<m;++y){k=t[y];for(var A=0,I=0;I<O;++I)v=S[I],(N=T(k,v))?(V(N)||(N=c(N)),j[I]=N,A|=N._bitflags):j[I]=B;if((o&A)===o){if(a)for(let e=0;e<n.spaceSearches.length;e++)b[e]=P;for(I=0;I<O;++I)if((N=j[I])!==B)if(x[I]=d(n,N,!1,a),x[I]!==L){if(a)for(let e=0;e<n.spaceSearches.length;e++)w[e]>-1e3&&b[e]>P&&(D=(b[e]+w[e])/4)>b[e]&&(b[e]=D),w[e]>b[e]&&(b[e]=w[e])}else x[I]=B;else x[I]=B;if(a){for(let e=0;e<n.spaceSearches.length;e++)if(b[e]===P)continue e}else{var F=!1;for(let e=0;e<O;e++)if(x[e]._score!==P){F=!0;break}if(!F)continue}var z=new r(O);for(let e=0;e<O;e++)z[e]=x[e];if(a){var R=0;for(let e=0;e<n.spaceSearches.length;e++)R+=b[e]}else{R=P;for(let e=0;e<O;e++){var D;(U=z[e])._score>-1e3&&R>P&&(D=(R+U._score)/4)>R&&(R=D),U._score>R&&(R=U._score)}}if(z.obj=k,z._score=R,i?.scoreFn){if(!(R=i.scoreFn(z)))continue;R=s(R),z._score=R}R<h||_(z)}}}else for(y=0;y<m;++y){var N,U;(N=t[y])&&(V(N)||(N=c(N)),(o&N._bitflags)===o&&(U=d(n,N))!==L&&(U._score<h||_(U)))}if(0===g)return C;var q=new Array(g);for(y=g-1;y>=0;--y)q[y]=M.poll();return q.total=g+p,q},prepare:t,cleanup:()=>{m.clear(),_.clear()}}})?i.apply(t,r):i)||(e.exports=n)},223:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var r=i(758),n=i.n(r),o=i(935),s=i.n(o)()(n());s.push([e.id,".ck.ck-emoji__categories-list{display:flex;justify-content:space-between;margin:0 var(--ck-spacing-large)}.ck.ck-emoji__categories-list>.ck.ck-button.ck-button_with-text{border-width:0;border-bottom:2px solid transparent;font-size:var(--ck-font-size-big);min-height:var(--ck-font-size-big);min-width:var(--ck-font-size-big);padding:0}.ck.ck-emoji__categories-list>.ck.ck-button.ck-button_with-text.ck-emoji__category-item.ck-on{border-bottom-color:var(--ck-color-base-active)}.ck.ck-emoji__categories-list>.ck.ck-button.ck-button_with-text>span{margin:auto}",""]);const a=s},237:e=>{"use strict";e.exports=CKEditor5.dll},291:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var r=i(758),n=i.n(r),o=i(935),s=i.n(o)()(n());s.push([e.id,":root{--ck-emoji-grid-tile-size:27px}.ck.ck-emoji .ck.ck-emoji__tiles{border-top:1px solid var(--ck-color-base-border);max-height:min(265px,40vh);max-width:100%;overflow-x:hidden;overflow-y:auto}.ck.ck-emoji .ck.ck-emoji__tiles .ck-emoji__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(var(--ck-emoji-grid-tile-size),1fr));margin:var(--ck-spacing-standard) var(--ck-spacing-large);grid-gap:var(--ck-spacing-small)}.ck.ck-emoji .ck.ck-emoji__tiles .ck-emoji__tile{border:0;font-size:1.5em;height:var(--ck-emoji-grid-tile-size);min-height:var(--ck-emoji-grid-tile-size);min-width:var(--ck-emoji-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-emoji-grid-tile-size)}@media (prefers-reduced-motion:reduce){.ck.ck-emoji .ck.ck-emoji__tiles .ck-emoji__tile{transition:none}}.ck.ck-emoji .ck.ck-emoji__tiles .ck-emoji__tile:focus:not(.ck-disabled),.ck.ck-emoji .ck.ck-emoji__tiles .ck-emoji__tile:hover:not(.ck-disabled){border:0;box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-emoji .ck.ck-emoji__tiles .ck-emoji__tile .ck-button__label{line-height:var(--ck-emoji-grid-tile-size);text-align:center;width:100%}",""]);const a=s},311:(e,t,i)=>{e.exports=i(237)("./src/ui.js")},584:(e,t,i)=>{e.exports=i(237)("./src/utils.js")},591:e=>{"use strict";var t=[];function i(e){for(var i=-1,r=0;r<t.length;r++)if(t[r].identifier===e){i=r;break}return i}function r(e,r){for(var o={},s=[],a=0;a<e.length;a++){var c=e[a],l=r.base?c[0]+r.base:c[0],u=o[l]||0,d="".concat(l," ").concat(u);o[l]=u+1;var h=i(d),f={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==h)t[h].references++,t[h].updater(f);else{var g=n(f,r);r.byIndex=a,t.splice(a,0,{identifier:d,updater:g,references:1})}s.push(d)}return s}function n(e,t){var i=t.domAPI(t);i.update(e);return function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,n){var o=r(e=e||[],n=n||{});return function(e){e=e||[];for(var s=0;s<o.length;s++){var a=i(o[s]);t[a].references--}for(var c=r(e,n),l=0;l<o.length;l++){var u=i(o[l]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}o=c}}},639:e=>{"use strict";var t,i=(t=[],function(e,i){return t[e]=i,t.filter(Boolean).join("\n")});function r(e,t,r,n){var o;if(r)o="";else{o="",n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var s=void 0!==n.layer;s&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,s&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}")}if(e.styleSheet)e.styleSheet.cssText=i(t,o);else{var a=document.createTextNode(o),c=e.childNodes;c[t]&&e.removeChild(c[t]),c.length?e.insertBefore(a,c[t]):e.appendChild(a)}}var n={singleton:null,singletonCounter:0};e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=n.singletonCounter++,i=n.singleton||(n.singleton=e.insertStyleElement(e));return{update:function(e){r(i,t,!1,e)},remove:function(e){r(i,t,!0,e)}}}},758:e=>{"use strict";e.exports=function(e){return e[1]}},782:(e,t,i)=>{e.exports=i(237)("./src/core.js")},834:(e,t,i)=>{e.exports=i(237)("./src/typing.js")},913:(e,t,i)=>{"use strict";i.d(t,{A:()=>a});var r=i(758),n=i.n(r),o=i(935),s=i.n(o)()(n());s.push([e.id,".ck.ck-emoji{width:320px}.ck .ck.ck-emoji__search{align-items:center;display:flex;justify-content:space-between;padding:var(--ck-spacing-large);padding-bottom:var(--ck-spacing-medium)}.ck .ck-fake-emoji-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-emoji-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}",""]);const a=s},935:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",r=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),r&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),r&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,r,n,o){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var c=this[a][0];null!=c&&(s[c]=!0)}for(var l=0;l<e.length;l++){var u=[].concat(e[l]);r&&s[u[0]]||(void 0!==o&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),i&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=i):u[2]=i),n&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=n):u[4]="".concat(n)),t.push(u))}},t}}},t={};function i(r){var n=t[r];if(void 0!==n)return n.exports;var o=t[r]={id:r,exports:{}};return e[r].call(o.exports,o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";i.r(r),i.d(r,{Emoji:()=>_r,EmojiCommand:()=>Ui,EmojiMention:()=>Di,EmojiPicker:()=>mr,EmojiRepository:()=>Mi,EmojiUtils:()=>Li});var e=i(782),t=i(584),n=i(834),o=i(146);const s="object"==typeof global&&global&&global.Object===Object&&global;var a="object"==typeof self&&self&&self.Object===Object&&self;const c=s||a||Function("return this")();const l=c.Symbol;var u=Object.prototype,d=u.hasOwnProperty,h=u.toString,f=l?l.toStringTag:void 0;const g=function(e){var t=d.call(e,f),i=e[f];try{e[f]=void 0;var r=!0}catch(e){}var n=h.call(e);return r&&(t?e[f]=i:delete e[f]),n};var p=Object.prototype.toString;const m=function(e){return p.call(e)};var _=l?l.toStringTag:void 0;const v=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":_&&_ in Object(e)?g(e):m(e)};const y=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const k=function(e){if(!y(e))return!1;var t=v(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const b=c["__core-js_shared__"];var w,j=(w=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"";const x=function(e){return!!j&&j in e};var T=Function.prototype.toString;const V=function(e){if(null!=e){try{return T.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var E=/^\[object .+?Constructor\]$/,P=Function.prototype,C=Object.prototype,S=P.toString,O=C.hasOwnProperty,A=RegExp("^"+S.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const I=function(e){return!(!y(e)||x(e))&&(k(e)?A:E).test(V(e))};const L=function(e,t){return null==e?void 0:e[t]};const B=function(e,t){var i=L(e,t);return I(i)?i:void 0};const M=function(){try{var e=B(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const F=function(e,t,i){"__proto__"==t&&M?M(e,t,{configurable:!0,enumerable:!0,value:i,writable:!0}):e[t]=i};const z=function(e,t,i,r){for(var n=-1,o=null==e?0:e.length;++n<o;){var s=e[n];t(r,s,i(s),e)}return r};const R=function(e){return function(t,i,r){for(var n=-1,o=Object(t),s=r(t),a=s.length;a--;){var c=s[e?a:++n];if(!1===i(o[c],c,o))break}return t}}();const D=function(e,t){for(var i=-1,r=Array(e);++i<e;)r[i]=t(i);return r};const N=function(e){return null!=e&&"object"==typeof e};const U=function(e){return N(e)&&"[object Arguments]"==v(e)};var q=Object.prototype,$=q.hasOwnProperty,W=q.propertyIsEnumerable;const K=U(function(){return arguments}())?U:function(e){return N(e)&&$.call(e,"callee")&&!W.call(e,"callee")};const H=Array.isArray;const Q=function(){return!1};var G="object"==typeof exports&&exports&&!exports.nodeType&&exports,Z=G&&"object"==typeof module&&module&&!module.nodeType&&module,J=Z&&Z.exports===G?c.Buffer:void 0;const X=(J?J.isBuffer:void 0)||Q;var Y=/^(?:0|[1-9]\d*)$/;const ee=function(e,t){var i=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==i||"symbol"!=i&&Y.test(e))&&e>-1&&e%1==0&&e<t};const te=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var ie={};ie["[object Float32Array]"]=ie["[object Float64Array]"]=ie["[object Int8Array]"]=ie["[object Int16Array]"]=ie["[object Int32Array]"]=ie["[object Uint8Array]"]=ie["[object Uint8ClampedArray]"]=ie["[object Uint16Array]"]=ie["[object Uint32Array]"]=!0,ie["[object Arguments]"]=ie["[object Array]"]=ie["[object ArrayBuffer]"]=ie["[object Boolean]"]=ie["[object DataView]"]=ie["[object Date]"]=ie["[object Error]"]=ie["[object Function]"]=ie["[object Map]"]=ie["[object Number]"]=ie["[object Object]"]=ie["[object RegExp]"]=ie["[object Set]"]=ie["[object String]"]=ie["[object WeakMap]"]=!1;const re=function(e){return N(e)&&te(e.length)&&!!ie[v(e)]};const ne=function(e){return function(t){return e(t)}};var oe="object"==typeof exports&&exports&&!exports.nodeType&&exports,se=oe&&"object"==typeof module&&module&&!module.nodeType&&module,ae=se&&se.exports===oe&&s.process,ce=function(){try{var e=se&&se.require&&se.require("util").types;return e||ae&&ae.binding&&ae.binding("util")}catch(e){}}();var le=ce&&ce.isTypedArray;const ue=le?ne(le):re;var de=Object.prototype.hasOwnProperty;const he=function(e,t){var i=H(e),r=!i&&K(e),n=!i&&!r&&X(e),o=!i&&!r&&!n&&ue(e),s=i||r||n||o,a=s?D(e.length,String):[],c=a.length;for(var l in e)!t&&!de.call(e,l)||s&&("length"==l||n&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||ee(l,c))||a.push(l);return a};var fe=Object.prototype;const ge=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||fe)};const pe=function(e,t){return function(i){return e(t(i))}}(Object.keys,Object);var me=Object.prototype.hasOwnProperty;const _e=function(e){if(!ge(e))return pe(e);var t=[];for(var i in Object(e))me.call(e,i)&&"constructor"!=i&&t.push(i);return t};const ve=function(e){return null!=e&&te(e.length)&&!k(e)};const ye=function(e){return ve(e)?he(e):_e(e)};const ke=function(e,t){return function(i,r){if(null==i)return i;if(!ve(i))return e(i,r);for(var n=i.length,o=t?n:-1,s=Object(i);(t?o--:++o<n)&&!1!==r(s[o],o,s););return i}}((function(e,t){return e&&R(e,t,ye)}));const be=function(e,t,i,r){return ke(e,(function(e,n,o){t(r,e,i(e),o)})),r};const we=function(){this.__data__=[],this.size=0};const je=function(e,t){return e===t||e!=e&&t!=t};const xe=function(e,t){for(var i=e.length;i--;)if(je(e[i][0],t))return i;return-1};var Te=Array.prototype.splice;const Ve=function(e){var t=this.__data__,i=xe(t,e);return!(i<0)&&(i==t.length-1?t.pop():Te.call(t,i,1),--this.size,!0)};const Ee=function(e){var t=this.__data__,i=xe(t,e);return i<0?void 0:t[i][1]};const Pe=function(e){return xe(this.__data__,e)>-1};const Ce=function(e,t){var i=this.__data__,r=xe(i,e);return r<0?(++this.size,i.push([e,t])):i[r][1]=t,this};function Se(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}Se.prototype.clear=we,Se.prototype.delete=Ve,Se.prototype.get=Ee,Se.prototype.has=Pe,Se.prototype.set=Ce;const Oe=Se;const Ae=function(){this.__data__=new Oe,this.size=0};const Ie=function(e){var t=this.__data__,i=t.delete(e);return this.size=t.size,i};const Le=function(e){return this.__data__.get(e)};const Be=function(e){return this.__data__.has(e)};const Me=B(c,"Map");const Fe=B(Object,"create");const ze=function(){this.__data__=Fe?Fe(null):{},this.size=0};const Re=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var De=Object.prototype.hasOwnProperty;const Ne=function(e){var t=this.__data__;if(Fe){var i=t[e];return"__lodash_hash_undefined__"===i?void 0:i}return De.call(t,e)?t[e]:void 0};var Ue=Object.prototype.hasOwnProperty;const qe=function(e){var t=this.__data__;return Fe?void 0!==t[e]:Ue.call(t,e)};const $e=function(e,t){var i=this.__data__;return this.size+=this.has(e)?0:1,i[e]=Fe&&void 0===t?"__lodash_hash_undefined__":t,this};function We(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}We.prototype.clear=ze,We.prototype.delete=Re,We.prototype.get=Ne,We.prototype.has=qe,We.prototype.set=$e;const Ke=We;const He=function(){this.size=0,this.__data__={hash:new Ke,map:new(Me||Oe),string:new Ke}};const Qe=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};const Ge=function(e,t){var i=e.__data__;return Qe(t)?i["string"==typeof t?"string":"hash"]:i.map};const Ze=function(e){var t=Ge(this,e).delete(e);return this.size-=t?1:0,t};const Je=function(e){return Ge(this,e).get(e)};const Xe=function(e){return Ge(this,e).has(e)};const Ye=function(e,t){var i=Ge(this,e),r=i.size;return i.set(e,t),this.size+=i.size==r?0:1,this};function et(e){var t=-1,i=null==e?0:e.length;for(this.clear();++t<i;){var r=e[t];this.set(r[0],r[1])}}et.prototype.clear=He,et.prototype.delete=Ze,et.prototype.get=Je,et.prototype.has=Xe,et.prototype.set=Ye;const tt=et;const it=function(e,t){var i=this.__data__;if(i instanceof Oe){var r=i.__data__;if(!Me||r.length<199)return r.push([e,t]),this.size=++i.size,this;i=this.__data__=new tt(r)}return i.set(e,t),this.size=i.size,this};function rt(e){var t=this.__data__=new Oe(e);this.size=t.size}rt.prototype.clear=Ae,rt.prototype.delete=Ie,rt.prototype.get=Le,rt.prototype.has=Be,rt.prototype.set=it;const nt=rt;const ot=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const st=function(e){return this.__data__.has(e)};function at(e){var t=-1,i=null==e?0:e.length;for(this.__data__=new tt;++t<i;)this.add(e[t])}at.prototype.add=at.prototype.push=ot,at.prototype.has=st;const ct=at;const lt=function(e,t){for(var i=-1,r=null==e?0:e.length;++i<r;)if(t(e[i],i,e))return!0;return!1};const ut=function(e,t){return e.has(t)};const dt=function(e,t,i,r,n,o){var s=1&i,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var l=o.get(e),u=o.get(t);if(l&&u)return l==t&&u==e;var d=-1,h=!0,f=2&i?new ct:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var g=e[d],p=t[d];if(r)var m=s?r(p,g,d,t,e,o):r(g,p,d,e,t,o);if(void 0!==m){if(m)continue;h=!1;break}if(f){if(!lt(t,(function(e,t){if(!ut(f,t)&&(g===e||n(g,e,i,r,o)))return f.push(t)}))){h=!1;break}}else if(g!==p&&!n(g,p,i,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h};const ht=c.Uint8Array;const ft=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e,r){i[++t]=[r,e]})),i};const gt=function(e){var t=-1,i=Array(e.size);return e.forEach((function(e){i[++t]=e})),i};var pt=l?l.prototype:void 0,mt=pt?pt.valueOf:void 0;const _t=function(e,t,i,r,n,o,s){switch(i){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new ht(e),new ht(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return je(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var a=ft;case"[object Set]":var c=1&r;if(a||(a=gt),e.size!=t.size&&!c)return!1;var l=s.get(e);if(l)return l==t;r|=2,s.set(e,t);var u=dt(a(e),a(t),r,n,o,s);return s.delete(e),u;case"[object Symbol]":if(mt)return mt.call(e)==mt.call(t)}return!1};const vt=function(e,t){for(var i=-1,r=t.length,n=e.length;++i<r;)e[n+i]=t[i];return e};const yt=function(e,t,i){var r=t(e);return H(e)?r:vt(r,i(e))};const kt=function(e,t){for(var i=-1,r=null==e?0:e.length,n=0,o=[];++i<r;){var s=e[i];t(s,i,e)&&(o[n++]=s)}return o};const bt=function(){return[]};var wt=Object.prototype.propertyIsEnumerable,jt=Object.getOwnPropertySymbols;const xt=jt?function(e){return null==e?[]:(e=Object(e),kt(jt(e),(function(t){return wt.call(e,t)})))}:bt;const Tt=function(e){return yt(e,ye,xt)};var Vt=Object.prototype.hasOwnProperty;const Et=function(e,t,i,r,n,o){var s=1&i,a=Tt(e),c=a.length;if(c!=Tt(t).length&&!s)return!1;for(var l=c;l--;){var u=a[l];if(!(s?u in t:Vt.call(t,u)))return!1}var d=o.get(e),h=o.get(t);if(d&&h)return d==t&&h==e;var f=!0;o.set(e,t),o.set(t,e);for(var g=s;++l<c;){var p=e[u=a[l]],m=t[u];if(r)var _=s?r(m,p,u,t,e,o):r(p,m,u,e,t,o);if(!(void 0===_?p===m||n(p,m,i,r,o):_)){f=!1;break}g||(g="constructor"==u)}if(f&&!g){var v=e.constructor,y=t.constructor;v==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y||(f=!1)}return o.delete(e),o.delete(t),f};const Pt=B(c,"DataView");const Ct=B(c,"Promise");const St=B(c,"Set");const Ot=B(c,"WeakMap");var At="[object Map]",It="[object Promise]",Lt="[object Set]",Bt="[object WeakMap]",Mt="[object DataView]",Ft=V(Pt),zt=V(Me),Rt=V(Ct),Dt=V(St),Nt=V(Ot),Ut=v;(Pt&&Ut(new Pt(new ArrayBuffer(1)))!=Mt||Me&&Ut(new Me)!=At||Ct&&Ut(Ct.resolve())!=It||St&&Ut(new St)!=Lt||Ot&&Ut(new Ot)!=Bt)&&(Ut=function(e){var t=v(e),i="[object Object]"==t?e.constructor:void 0,r=i?V(i):"";if(r)switch(r){case Ft:return Mt;case zt:return At;case Rt:return It;case Dt:return Lt;case Nt:return Bt}return t});const qt=Ut;var $t="[object Arguments]",Wt="[object Array]",Kt="[object Object]",Ht=Object.prototype.hasOwnProperty;const Qt=function(e,t,i,r,n,o){var s=H(e),a=H(t),c=s?Wt:qt(e),l=a?Wt:qt(t),u=(c=c==$t?Kt:c)==Kt,d=(l=l==$t?Kt:l)==Kt,h=c==l;if(h&&X(e)){if(!X(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new nt),s||ue(e)?dt(e,t,i,r,n,o):_t(e,t,c,i,r,n,o);if(!(1&i)){var f=u&&Ht.call(e,"__wrapped__"),g=d&&Ht.call(t,"__wrapped__");if(f||g){var p=f?e.value():e,m=g?t.value():t;return o||(o=new nt),n(p,m,i,r,o)}}return!!h&&(o||(o=new nt),Et(e,t,i,r,n,o))};const Gt=function e(t,i,r,n,o){return t===i||(null==t||null==i||!N(t)&&!N(i)?t!=t&&i!=i:Qt(t,i,r,n,e,o))};const Zt=function(e,t,i,r){var n=i.length,o=n,s=!r;if(null==e)return!o;for(e=Object(e);n--;){var a=i[n];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++n<o;){var c=(a=i[n])[0],l=e[c],u=a[1];if(s&&a[2]){if(void 0===l&&!(c in e))return!1}else{var d=new nt;if(r)var h=r(l,u,c,e,t,d);if(!(void 0===h?Gt(u,l,3,r,d):h))return!1}}return!0};const Jt=function(e){return e==e&&!y(e)};const Xt=function(e){for(var t=ye(e),i=t.length;i--;){var r=t[i],n=e[r];t[i]=[r,n,Jt(n)]}return t};const Yt=function(e,t){return function(i){return null!=i&&(i[e]===t&&(void 0!==t||e in Object(i)))}};const ei=function(e){var t=Xt(e);return 1==t.length&&t[0][2]?Yt(t[0][0],t[0][1]):function(i){return i===e||Zt(i,e,t)}};const ti=function(e){return"symbol"==typeof e||N(e)&&"[object Symbol]"==v(e)};var ii=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ri=/^\w*$/;const ni=function(e,t){if(H(e))return!1;var i=typeof e;return!("number"!=i&&"symbol"!=i&&"boolean"!=i&&null!=e&&!ti(e))||(ri.test(e)||!ii.test(e)||null!=t&&e in Object(t))};function oi(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var i=function(){var r=arguments,n=t?t.apply(this,r):r[0],o=i.cache;if(o.has(n))return o.get(n);var s=e.apply(this,r);return i.cache=o.set(n,s)||o,s};return i.cache=new(oi.Cache||tt),i}oi.Cache=tt;const si=oi;var ai=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ci=/\\(\\)?/g;const li=function(e){var t=si(e,(function(e){return 500===i.size&&i.clear(),e})),i=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ai,(function(e,i,r,n){t.push(r?n.replace(ci,"$1"):i||e)})),t}));const ui=function(e,t){for(var i=-1,r=null==e?0:e.length,n=Array(r);++i<r;)n[i]=t(e[i],i,e);return n};var di=l?l.prototype:void 0,hi=di?di.toString:void 0;const fi=function e(t){if("string"==typeof t)return t;if(H(t))return ui(t,e)+"";if(ti(t))return hi?hi.call(t):"";var i=t+"";return"0"==i&&1/t==-1/0?"-0":i};const gi=function(e){return null==e?"":fi(e)};const pi=function(e,t){return H(e)?e:ni(e,t)?[e]:li(gi(e))};const mi=function(e){if("string"==typeof e||ti(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};const _i=function(e,t){for(var i=0,r=(t=pi(t,e)).length;null!=e&&i<r;)e=e[mi(t[i++])];return i&&i==r?e:void 0};const vi=function(e,t,i){var r=null==e?void 0:_i(e,t);return void 0===r?i:r};const yi=function(e,t){return null!=e&&t in Object(e)};const ki=function(e,t,i){for(var r=-1,n=(t=pi(t,e)).length,o=!1;++r<n;){var s=mi(t[r]);if(!(o=null!=e&&i(e,s)))break;e=e[s]}return o||++r!=n?o:!!(n=null==e?0:e.length)&&te(n)&&ee(s,n)&&(H(e)||K(e))};const bi=function(e,t){return null!=e&&ki(e,t,yi)};const wi=function(e,t){return ni(e)&&Jt(t)?Yt(mi(e),t):function(i){var r=vi(i,e);return void 0===r&&r===t?bi(i,e):Gt(t,r,3)}};const ji=function(e){return e};const xi=function(e){return function(t){return null==t?void 0:t[e]}};const Ti=function(e){return function(t){return _i(t,e)}};const Vi=function(e){return ni(e)?xi(mi(e)):Ti(e)};const Ei=function(e){return"function"==typeof e?e:null==e?ji:"object"==typeof e?H(e)?wi(e[0],e[1]):ei(e):Vi(e)};const Pi=function(e,t){return function(i,r){var n=H(i)?z:be,o=t?t():{};return n(i,e,Ei(r,2),o)}};var Ci=Object.prototype.hasOwnProperty;const Si=Pi((function(e,t,i){Ci.call(e,i)?e[i].push(t):F(e,i,[t])}));const Oi={0:"default",1:"light",2:"medium-light",3:"medium",4:"medium-dark",5:"dark"},Ai={"π«©":16,"π«¨":15.1,"π« ":14,"πΆβπ«οΈ":13.1,"π§βπ»":12.1,"π₯°":11,"π€ͺ":5,"βοΈ":4,"π€£":3,"ππ½":2,"π":1,"π":.7,"π":.6};class Ii extends e.Plugin{static get pluginName(){return"EmojiUtils"}static get isOfficialPlugin(){return!0}isEmojiSupported(e,t,i){return!!(e.version<=t)&&(!this.hasZwj(e.emoji)||this.isEmojiZwjSupported(e,i))}getEmojiSupportedVersionByOs(){for(const[e,t]of Object.entries(Ai))if(Ii._isEmojiSupported(e))return t;return 0}hasZwj(e){return e.includes("β")}isEmojiZwjSupported(e,t){return this.getNodeWidth(t,e.emoji)<43.2}getNodeWidth(e,t){const i=document.createElement("span");i.textContent=t,e.appendChild(i);const r=i.offsetWidth;return e.removeChild(i),r}createEmojiWidthTestingContainer(){const e=document.createElement("div");return e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.whiteSpace="nowrap",e.style.fontSize="24px",e}normalizeEmojiSkinTone(e){const t={...e,skins:{default:e.emoji}};return e.skins&&e.skins.forEach((e=>{const i=Oi[e.tone];t.skins[i]=e.emoji})),t}isEmojiCategoryAllowed(e){return 2!==e.group}}Ii._isEmojiSupported=function(e){const t=function(){try{return document.createElement("canvas").getContext("2d",{willReadFrequently:!0})}catch{return null}}();if(!t)return!1;const i=20,r=Math.floor(12.5);t.font=r+"px Arial, Sans-Serif",t.textBaseline="top",t.canvas.width=40,t.canvas.height=25,t.clearRect(0,0,40,25),t.fillStyle="#FF0000",t.fillText(e,0,22),t.fillStyle="#0000FF",t.fillText(e,i,22);const n=t.getImageData(0,0,i,25).data,o=n.length;let s=0;for(;s<o&&!n[s+3];s+=4);if(s>=o)return!1;const a=i+s/4%i,c=Math.floor(s/4/i),l=t.getImageData(a,c,1,1).data;return n[s]===l[0]&&n[s+2]===l[2]&&!(t.measureText(e).width>=i)};const Li=Ii;class Bi extends e.Plugin{static get requires(){return[Li]}static get pluginName(){return"EmojiRepository"}static get isOfficialPlugin(){return!0}constructor(e){super(e),e.config.define("emoji",{version:void 0,skinTone:"default",definitionsUrl:void 0,useCustomFont:!1}),this._url=this._getUrl(),this._repositoryPromise=new Promise((e=>{this._repositoryPromiseResolveCallback=e})),this._items=null}async init(){return this._warnAboutCdnUse(),await this._loadAndCacheEmoji(),this._items=this._getItems(),this._items?this._repositoryPromiseResolveCallback(!0):((0,t.logWarning)("emoji-repository-empty"),this._repositoryPromiseResolveCallback(!1))}getEmojiByQuery(e){if(!this._items)return[];return e.split(/\s/).filter(Boolean).some((e=>e.length>=2))?o.go(e,this._items,{threshold:.6,keys:["emoticon","annotation",t=>e.split(/\s/).filter(Boolean).flatMap((e=>{var i;return null===(i=t.tags)||void 0===i?void 0:i.filter((t=>t.startsWith(e)))})).join()]}).map((e=>e.obj)):[]}getEmojiCategories(){const e=this._getItems();if(!e)return[];const{t}=this.editor.locale,i=[{title:t("Smileys & Expressions"),icon:"π",groupId:0},{title:t("Gestures & People"),icon:"π",groupId:1},{title:t("Animals & Nature"),icon:"π»",groupId:3},{title:t("Food & Drinks"),icon:"π",groupId:4},{title:t("Travel & Places"),icon:"π",groupId:5},{title:t("Activities"),icon:"π",groupId:6},{title:t("Objects"),icon:"π‘",groupId:7},{title:t("Symbols"),icon:"π΅",groupId:8},{title:t("Flags"),icon:"π",groupId:9}],r=Si(e,"group");return i.map((e=>({...e,items:r[e.groupId]})))}getSkinTones(){const{t:e}=this.editor.locale;return[{id:"default",icon:"π",tooltip:e("Default skin tone")},{id:"light",icon:"ππ»",tooltip:e("Light skin tone")},{id:"medium-light",icon:"ππΌ",tooltip:e("Medium Light skin tone")},{id:"medium",icon:"ππ½",tooltip:e("Medium skin tone")},{id:"medium-dark",icon:"ππΎ",tooltip:e("Medium Dark skin tone")},{id:"dark",icon:"ππΏ",tooltip:e("Dark skin tone")}]}isReady(){return this._repositoryPromise}_getUrl(){const{definitionsUrl:e,version:i}=this.editor.config.get("emoji");if(!e||"cdn"===e){const e=new URL("https://cdn.ckeditor.com/ckeditor5/data/emoji/{version}/en.json".replace("{version}",(i||16).toString()));return e.searchParams.set("editorVersion",t.version),e}return i&&(0,t.logWarning)("emoji-repository-redundant-version"),new URL(e)}_warnAboutCdnUse(){const e=this.editor,i=e.config.get("emoji"),r=e.config.get("licenseKey"),n=window[Symbol.for("cke distribution")];"GPL"!==r&&"cloud"!==n&&(i&&i.definitionsUrl||(0,t.logWarning)("emoji-repository-cdn-use"))}_getItems(){const e=Bi._results[this._url.href];return e&&e.length?e:null}async _loadAndCacheEmoji(){if(Bi._results[this._url.href])return;const e=await fetch(this._url,{cache:"force-cache"}).then((e=>e.ok?e.json():[])).catch((()=>[]));Bi._results[this._url.href]=this._normalizeEmoji(e)}_normalizeEmoji(e){const t=this.editor,i=t.config.get("emoji.useCustomFont"),r=t.plugins.get("EmojiUtils"),n=e.filter((e=>r.isEmojiCategoryAllowed(e)));if(i)return n.map((e=>r.normalizeEmojiSkinTone(e)));const o=r.getEmojiSupportedVersionByOs(),s=r.createEmojiWidthTestingContainer();document.body.appendChild(s);const a=n.filter((e=>r.isEmojiSupported(e,o,s))).map((e=>r.normalizeEmojiSkinTone(e)));return s.remove(),a}}Bi._results={};const Mi=Bi,Fi=":",zi=":__EMOJI_SHOW_ALL:",Ri=":__EMOJI_HINT:";class Di extends e.Plugin{static get requires(){return[Mi,n.Typing,"Mention"]}static get pluginName(){return"EmojiMention"}static get isOfficialPlugin(){return!0}constructor(e){super(e),this.editor.config.define("emoji",{dropdownLimit:6}),this._emojiDropdownLimit=e.config.get("emoji.dropdownLimit"),this._skinTone=e.config.get("emoji.skinTone"),this._setupMentionConfiguration(e)}_setupMentionConfiguration(e){const i=e.config.get("mergeFields.prefix"),r=e.config.get("mention.feeds"),n=!!i&&i[0]===Fi;if(r.filter((e=>!e._isEmojiMarker)).some((e=>e.marker===Fi))||n)return void(0,t.logWarning)("emoji-config-marker-already-used",{marker:Fi});if(r.some((e=>e._isEmojiMarker)))return;const o={_isEmojiMarker:!0,marker:Fi,dropdownLimit:this._emojiDropdownLimit,itemRenderer:this._customItemRendererFactory(this.editor.t),feed:this._queryEmojiCallbackFactory()};this.editor.config.set("mention.feeds",[...r,o])}async init(){const e=this.editor;this.emojiPickerPlugin=e.plugins.has("EmojiPicker")?e.plugins.get("EmojiPicker"):null,this.emojiRepositoryPlugin=e.plugins.get("EmojiRepository"),this._isEmojiRepositoryAvailable=await this.emojiRepositoryPlugin.isReady(),this._isEmojiRepositoryAvailable&&e.once("ready",this._overrideMentionExecuteListener.bind(this))}_customItemRendererFactory(e){return t=>{const i=document.createElement("button");i.classList.add("ck"),i.classList.add("ck-button"),i.classList.add("ck-button_with-text"),i.id=`mention-list-item-id${t.id.slice(0,-1)}`,i.type="button",i.tabIndex=-1;const r=document.createElement("span");return r.classList.add("ck"),r.classList.add("ck-button__label"),i.appendChild(r),t.id===Ri?(i.classList.add("ck-list-item-button"),i.classList.add("ck-disabled"),r.textContent=e("Keep on typing to see the emoji.")):t.id===zi?r.textContent=e("Show all emoji..."):r.textContent=`${t.text} ${t.id}`,i}}_overrideMentionExecuteListener(){const e=this.editor;e.commands.get("mention").on("execute",((t,i)=>{const r=i[0];if(r.marker===Fi&&(t.stop(),r.mention.id!==Ri))if(r.mention.id===zi){const t=[...r.range.getItems()].filter((e=>e.is("$textProxy"))).map((e=>e.data)).reduce(((e,t)=>e+t),"");e.model.change((t=>{e.model.deleteContent(t.createSelection(r.range))}));const i=this.emojiPickerPlugin;i.showUI(t.slice(1)),setTimeout((()=>{i.emojiPickerView.focus()}))}else e.execute("insertText",{text:r.mention.text,range:r.range})}),{priority:"high"})}_queryEmojiCallbackFactory(){return e=>{if(e.startsWith(" "))return[];if(e.startsWith(Fi))return[];if(!this._isEmojiRepositoryAvailable)return[];const t=this.emojiRepositoryPlugin.getEmojiByQuery(e).map((e=>{let t=e.skins[this._skinTone]||e.skins.default;return this.emojiPickerPlugin&&(t=e.skins[this.emojiPickerPlugin.skinTone]||e.skins.default),{id:`:${e.annotation}:`,text:t}}));if(!this.emojiPickerPlugin)return t.slice(0,this._emojiDropdownLimit);const i={id:e.length>1?zi:Ri};return[...t.slice(0,this._emojiDropdownLimit-1),i]}}}var Ni=i(311);class Ui extends e.Command{refresh(){const e=this.editor.model,t=e.schema,i=e.document.selection;this.isEnabled=t.checkChild(i.getFirstPosition(),"$text")}execute(e=""){this.editor.plugins.get("EmojiPicker").showUI(e)}}var qi=i(591),$i=i.n(qi),Wi=i(639),Ki=i.n(Wi),Hi=i(128),Qi=i.n(Hi),Gi=i(21),Zi=i.n(Gi),Ji=i(51),Xi=i.n(Ji),Yi=i(291),er={attributes:{"data-cke":!0}};er.setAttributes=Zi(),er.insert=Qi().bind(null,"head"),er.domAPI=Ki(),er.insertStyleElement=Xi();$i()(Yi.A,er);Yi.A&&Yi.A.locals&&Yi.A.locals;class tr extends Ni.View{constructor(e,{categoryName:i,emojiCategories:r,getEmojiByQuery:n,skinTone:o}){super(e),this.set("isEmpty",!0),this.set("categoryName",i),this.set("skinTone",o),this.tiles=this.createCollection(),this.cachedTiles=this.createCollection(),this.focusTracker=new t.FocusTracker,this.keystrokes=new t.KeystrokeHandler,this._getEmojiByQuery=n,this.emojiCategories=r;const s=this.bindTemplate;this.setTemplate({tag:"div",children:[{tag:"div",attributes:{role:"grid",class:["ck","ck-emoji__grid"]},children:this.tiles}],attributes:{role:"tabpanel",class:["ck","ck-emoji__tiles",s.if("isEmpty","ck-hidden",(e=>e))]}}),(0,Ni.addKeyboardHandlingForGrid)({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.tiles,numberOfColumns:()=>t.global.window.getComputedStyle(this.element.firstChild).getPropertyValue("grid-template-columns").split(" ").length,uiLanguageDirection:this.locale&&this.locale.uiLanguageDirection})}render(){super.render(),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.keystrokes.destroy(),this.focusTracker.destroy()}focus(){const e=this.tiles.first;e&&e.focus()}filter(e){const{matchingItems:t,allItems:i}=e?this._getItemsByQuery(e.source):this._getItemsByCategory();return this._updateGrid(t),this.set("isEmpty",0===t.length),{resultsCount:t.length,totalItemsCount:i.length}}_getItemsByQuery(e){return{matchingItems:this._getEmojiByQuery(e),allItems:this.emojiCategories.flatMap((e=>e.items))}}_getItemsByCategory(){const e=this.emojiCategories.find((e=>e.title===this.categoryName)),{items:t}=e;return{matchingItems:t,allItems:t}}_updateGrid(e){[...this.tiles].forEach((e=>{this.focusTracker.remove(e),this.tiles.remove(e)})),e.map((e=>{const t=e.skins[this.skinTone]||e.skins.default;return this.cachedTiles.get(t)||this._createTile(t,e.annotation)})).forEach((e=>{this.tiles.add(e),this.focusTracker.add(e)}))}_createTile(e,t){const i=new Ni.ButtonView(this.locale);return i.viewUid=e,i.extendTemplate({attributes:{class:["ck-emoji__tile"]}}),i.set({label:e,tooltip:t,withText:!0,ariaLabel:t,ariaLabelledBy:void 0}),i.on("execute",(()=>{this.fire("execute",{name:t,emoji:e})})),this.cachedTiles.add(i),i}}var ir=i(223),rr={attributes:{"data-cke":!0}};rr.setAttributes=Zi(),rr.insert=Qi().bind(null,"head"),rr.domAPI=Ki(),rr.insertStyleElement=Xi();$i()(ir.A,rr);ir.A&&ir.A.locals&&ir.A.locals;class nr extends Ni.View{constructor(e,{emojiCategories:i,categoryName:r}){super(e),this.buttonViews=this.createCollection(i.map((e=>this._createCategoryButton(e)))),this.focusTracker=new t.FocusTracker,this.keystrokes=new t.KeystrokeHandler,this.focusCycler=new Ni.FocusCycler({focusables:this.buttonViews,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowleft",focusNext:"arrowright"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-emoji__categories-list"],role:"tablist"},children:this.buttonViews}),this.on("change:categoryName",((e,t,i,r)=>{const n=this.buttonViews.find((e=>e.tooltip===r));n&&(n.isOn=!1);this.buttonViews.find((e=>e.tooltip===i)).isOn=!0})),this.set("categoryName",r)}render(){super.render(),this.buttonViews.forEach((e=>{this.focusTracker.add(e)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),this.buttonViews.destroy()}focus(){this.buttonViews.first.focus()}enableCategories(){this.buttonViews.forEach((e=>{e.isEnabled=!0}))}disableCategories(){this.buttonViews.forEach((e=>{e.set({class:"",isEnabled:!1,isOn:!1})}))}_createCategoryButton(e){const t=new Ni.ButtonView,i=t.bindTemplate;return t.extendTemplate({attributes:{"aria-selected":i.to("isOn",(e=>e.toString())),class:["ck-emoji__category-item"]}}),t.set({ariaLabel:e.title,label:e.icon,role:"tab",tooltip:e.title,withText:!0,ariaLabelledBy:void 0}),t.on("execute",(()=>{this.categoryName=e.title})),t.on("change:isEnabled",(()=>{t.isEnabled&&t.tooltip===this.categoryName&&(t.isOn=!0)})),t}}var or=/[\\^$.*+?()[\]{}|]/g,sr=RegExp(or.source);const ar=function(e){return(e=gi(e))&&sr.test(e)?e.replace(or,"\\$&"):e};class cr extends Ni.View{constructor(e,{gridView:t,resultsView:i}){super(e),this.gridView=t;const r=e.t;this.inputView=new Ni.SearchTextView(this.locale,{queryView:{label:r("Find an emoji (min. 2 characters)"),creator:Ni.createLabeledInputText},filteredView:this.gridView,infoView:{instance:i}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-search"],tabindex:"-1"},children:[this.inputView.queryView]}),this.inputView.delegate("search").to(this)}destroy(){super.destroy(),this.inputView.destroy()}search(e){const t=e?new RegExp(ar(e),"ig"):null,i=this.gridView.filter(t);this.inputView.fire("search",{query:e,...i})}setInputValue(e){e?this.inputView.queryView.fieldView.value=e:this.inputView.queryView.fieldView.reset()}getInputValue(){return this.inputView.queryView.fieldView.element.value}focus(){this.inputView.focus()}}var lr=i(59),ur={attributes:{"data-cke":!0}};ur.setAttributes=Zi(),ur.insert=Qi().bind(null,"head"),ur.domAPI=Ki(),ur.insertStyleElement=Xi();$i()(lr.A,ur);lr.A&&lr.A.locals&&lr.A.locals;class dr extends Ni.View{constructor(e,{skinTone:i,skinTones:r}){super(e),this.set("skinTone",i),this._skinTones=r;const n=(0,e.t)("Select skin tone"),o=(0,Ni.createDropdown)(e),s=new t.Collection;for(const{id:e,icon:t,tooltip:i}of this._skinTones){const r={type:"button",model:new Ni.ViewModel({value:e,label:t,ariaLabel:i,tooltip:i,tooltipPosition:"e",role:"menuitemradio",withText:!0,ariaLabelledBy:void 0})};r.model.bind("isOn").to(this,"skinTone",(t=>t===e)),s.add(r)}(0,Ni.addListToDropdown)(o,s,{ariaLabel:n,role:"menu"}),o.buttonView.set({label:this._getSkinTone().icon,ariaLabel:n,ariaLabelledBy:void 0,isOn:!1,withText:!0,tooltip:n}),this.dropdownView=o,this.listenTo(o,"execute",(e=>{this.skinTone=e.source.value})),o.buttonView.bind("label").to(this,"skinTone",(()=>this._getSkinTone().icon)),o.buttonView.bind("ariaLabel").to(this,"skinTone",(()=>`${this._getSkinTone().tooltip}, ${n}`)),this.setTemplate({tag:"div",attributes:{class:["ck","ck-emoji__skin-tone"]},children:[o]})}focus(){this.dropdownView.buttonView.focus()}_getSkinTone(){return this._skinTones.find((e=>e.id===this.skinTone))}}class hr extends Ni.View{constructor(e,{emojiCategories:i,getEmojiByQuery:r,skinTone:n,skinTones:o}){super(e);const s=i[0].title;this.gridView=new tr(e,{categoryName:s,emojiCategories:i,getEmojiByQuery:r,skinTone:n}),this.infoView=new Ni.SearchInfoView,this.searchView=new cr(e,{gridView:this.gridView,resultsView:this.infoView}),this.categoriesView=new nr(e,{emojiCategories:i,categoryName:s}),this.toneView=new dr(e,{skinTone:n,skinTones:o}),this.items=this.createCollection([this.searchView,this.toneView,this.categoriesView,this.gridView,this.infoView]),this.focusTracker=new t.FocusTracker,this.keystrokes=new t.KeystrokeHandler,this.focusCycler=new Ni.FocusCycler({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",children:[{tag:"div",children:[this.searchView,this.toneView],attributes:{class:["ck","ck-emoji__search"]}},this.categoriesView,this.gridView,{tag:"div",children:[this.infoView],attributes:{class:["ck","ck-search__results"]}}],attributes:{tabindex:"-1",class:["ck","ck-emoji","ck-search"]}}),this._setupEventListeners()}render(){super.render(),this.focusTracker.add(this.searchView.element),this.focusTracker.add(this.toneView.element),this.focusTracker.add(this.categoriesView.element),this.focusTracker.add(this.gridView.element),this.focusTracker.add(this.infoView.element),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.searchView.focus()}_setupEventListeners(){const e=this.locale.t;this.searchView.on("search",((e,t)=>{t.query?this.categoriesView.disableCategories():this.categoriesView.enableCategories()})),this.searchView.on("search",((t,i)=>{1===i.query.length?this.infoView.set({primaryText:e("Keep on typing to see the emoji."),secondaryText:e("The query must contain at least two characters."),isVisible:!0}):i.resultsCount?this.infoView.set({isVisible:!1}):this.infoView.set({primaryText:e('No emojis were found matching "%0".',i.query),secondaryText:e("Please try a different phrase or check the spelling."),isVisible:!0})})),this.searchView.on("search",(()=>{this.fire("update"),this.gridView.element.scrollTo(0,0)})),this.categoriesView.on("change:categoryName",((e,t,i)=>{this.gridView.categoryName=i,this.searchView.search("")})),this.toneView.on("change:skinTone",((e,t,i)=>{this.gridView.skinTone=i,this.searchView.search(this.searchView.getInputValue())}))}}var fr=i(913),gr={attributes:{"data-cke":!0}};gr.setAttributes=Zi(),gr.insert=Qi().bind(null,"head"),gr.domAPI=Ki(),gr.insertStyleElement=Xi();$i()(fr.A,gr);fr.A&&fr.A.locals&&fr.A.locals;const pr="emoji-picker";class mr extends e.Plugin{static get requires(){return[Mi,Ni.ContextualBalloon,Ni.Dialog,n.Typing]}static get pluginName(){return"EmojiPicker"}static get isOfficialPlugin(){return!0}async init(){const e=this.editor;if(this.balloonPlugin=e.plugins.get("ContextualBalloon"),this.emojiRepositoryPlugin=e.plugins.get("EmojiRepository"),!await this.emojiRepositoryPlugin.isReady())return;const t=new Ui(e);e.commands.add("emoji",t),e.ui.componentFactory.add("emoji",(()=>{const e=this._createButton(Ni.ButtonView,t);return e.set({tooltip:!0}),e})),e.ui.componentFactory.add("menuBar:emoji",(()=>this._createButton(Ni.MenuBarMenuListItemButtonView,t))),this._setupConversion()}destroy(){super.destroy(),this.emojiPickerView&&this.emojiPickerView.destroy()}get skinTone(){return this.emojiPickerView?this.emojiPickerView.gridView.skinTone:this.editor.config.get("emoji.skinTone")}showUI(e=""){this._showFakeVisualSelection(),this.emojiPickerView||(this.emojiPickerView=this._createEmojiPickerView()),e&&this.emojiPickerView.searchView.setInputValue(e),this.emojiPickerView.searchView.search(e),this.balloonPlugin.hasView(this.emojiPickerView)||this.balloonPlugin.add({view:this.emojiPickerView,position:this._getBalloonPositionData()}),this.emojiPickerView.focus()}_createButton(t,i){const r=new t(this.editor.locale),n=this.editor.locale.t;return r.bind("isEnabled").to(i,"isEnabled"),r.set({label:n("Emoji"),icon:e.icons.emoji,isToggleable:!0}),r.on("execute",(()=>{this.showUI()})),r}_createEmojiPickerView(){const e=new hr(this.editor.locale,{emojiCategories:this.emojiRepositoryPlugin.getEmojiCategories(),skinTone:this.editor.config.get("emoji.skinTone"),skinTones:this.emojiRepositoryPlugin.getSkinTones(),getEmojiByQuery:e=>this.emojiRepositoryPlugin.getEmojiByQuery(e)});return this.listenTo(e.gridView,"execute",((e,t)=>{const i=this.editor,r=t.emoji;this._hideUI(),i.execute("insertText",{text:r})})),this.listenTo(e,"update",(()=>{this.balloonPlugin.visibleView===e&&this.balloonPlugin.updatePosition()})),e.keystrokes.set("Esc",((e,t)=>{this._hideUI(),t()})),(0,Ni.clickOutsideHandler)({emitter:e,contextElements:[this.balloonPlugin.view.element],callback:()=>this._hideUI(),activator:()=>this.balloonPlugin.visibleView===e}),e}_hideUI(){this.balloonPlugin.remove(this.emojiPickerView),this.emojiPickerView.searchView.setInputValue(""),this.editor.editing.view.focus(),this._hideFakeVisualSelection()}_setupConversion(){const e=this.editor;e.conversion.for("editingDowncast").markerToHighlight({model:pr,view:{classes:["ck-fake-emoji-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:pr,view:(e,{writer:t})=>{if(!e.markerRange.isCollapsed)return null;const i=t.createUIElement("span");return t.addClass(["ck-fake-emoji-selection","ck-fake-emoji-selection_collapsed"],i),i}})}_getBalloonPositionData(){const e=this.editor.editing.view,t=e.document;return{target:()=>e.domConverter.viewRangeToDom(t.selection.getFirstRange())}}_showFakeVisualSelection(){const e=this.editor.model;e.change((t=>{const i=e.document.selection.getFirstRange();if(e.markers.has(pr))t.updateMarker(pr,{range:i});else if(i.start.isAtEnd){const r=i.start.getLastMatchingPosition((({item:t})=>!e.schema.isContent(t)),{boundaries:i});t.addMarker(pr,{usingOperation:!1,affectsData:!1,range:t.createRange(r,i.end)})}else t.addMarker(pr,{usingOperation:!1,affectsData:!1,range:i})}))}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(pr)&&e.change((e=>{e.removeMarker(pr)}))}}class _r extends e.Plugin{static get requires(){return[Di,mr]}static get pluginName(){return"Emoji"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).emoji=r})();
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
5
|
import { Plugin, Command, icons } from '@ckeditor/ckeditor5-core/dist/index.js';
|
|
6
|
-
import {
|
|
6
|
+
import { logWarning, version, FocusTracker, KeystrokeHandler, global, Collection } from '@ckeditor/ckeditor5-utils/dist/index.js';
|
|
7
7
|
import { Typing } from '@ckeditor/ckeditor5-typing/dist/index.js';
|
|
8
8
|
import fuzzysort from 'fuzzysort';
|
|
9
9
|
import { groupBy, escapeRegExp } from 'lodash-es';
|
|
@@ -83,9 +83,21 @@ function getCanvas() {
|
|
|
83
83
|
/**
|
|
84
84
|
* A map representing an emoji and its release version.
|
|
85
85
|
* It's used to identify a user's minimal supported emoji level.
|
|
86
|
+
* We skip versions with older patches, such as 15.0 instead of 15.1 etc.
|
|
86
87
|
*/ const EMOJI_SUPPORT_LEVEL = {
|
|
87
88
|
'π«©': 16,
|
|
88
|
-
'π«¨': 15.1
|
|
89
|
+
'π«¨': 15.1,
|
|
90
|
+
'π« ': 14,
|
|
91
|
+
'πΆβπ«οΈ': 13.1,
|
|
92
|
+
'π§βπ»': 12.1,
|
|
93
|
+
'π₯°': 11,
|
|
94
|
+
'π€ͺ': 5,
|
|
95
|
+
'βοΈ': 4,
|
|
96
|
+
'π€£': 3,
|
|
97
|
+
'ππ½': 2,
|
|
98
|
+
'π': 1,
|
|
99
|
+
'π': 0.7,
|
|
100
|
+
'π': 0.6 // Face with Tears of Joy.
|
|
89
101
|
};
|
|
90
102
|
const BASELINE_EMOJI_WIDTH = 24;
|
|
91
103
|
/**
|
|
@@ -117,12 +129,12 @@ const BASELINE_EMOJI_WIDTH = 24;
|
|
|
117
129
|
/**
|
|
118
130
|
* Checks the supported emoji version by the OS, by sampling some representatives from different emoji releases.
|
|
119
131
|
*/ getEmojiSupportedVersionByOs() {
|
|
120
|
-
|
|
121
|
-
if (
|
|
122
|
-
return
|
|
132
|
+
for (const [emoji, emojiVersion] of Object.entries(EMOJI_SUPPORT_LEVEL)){
|
|
133
|
+
if (EmojiUtils._isEmojiSupported(emoji)) {
|
|
134
|
+
return emojiVersion;
|
|
123
135
|
}
|
|
124
|
-
|
|
125
|
-
|
|
136
|
+
}
|
|
137
|
+
return 0;
|
|
126
138
|
}
|
|
127
139
|
/**
|
|
128
140
|
* Check for ZWJ (zero width joiner) character.
|
|
@@ -233,7 +245,8 @@ const DEFAULT_EMOJI_VERSION = 16;
|
|
|
233
245
|
editor.config.define('emoji', {
|
|
234
246
|
version: undefined,
|
|
235
247
|
skinTone: 'default',
|
|
236
|
-
definitionsUrl: undefined
|
|
248
|
+
definitionsUrl: undefined,
|
|
249
|
+
useCustomFont: false
|
|
237
250
|
});
|
|
238
251
|
this._url = this._getUrl();
|
|
239
252
|
this._repositoryPromise = new Promise((resolve)=>{
|
|
@@ -248,6 +261,14 @@ const DEFAULT_EMOJI_VERSION = 16;
|
|
|
248
261
|
await this._loadAndCacheEmoji();
|
|
249
262
|
this._items = this._getItems();
|
|
250
263
|
if (!this._items) {
|
|
264
|
+
/**
|
|
265
|
+
* Unable to identify the available emoji to display.
|
|
266
|
+
*
|
|
267
|
+
* See the {@glink features/emoji#troubleshooting troubleshooting} section in the {@glink features/emoji Emoji feature} guide
|
|
268
|
+
* for more details.
|
|
269
|
+
*
|
|
270
|
+
* @error emoji-repository-empty
|
|
271
|
+
*/ logWarning('emoji-repository-empty');
|
|
251
272
|
return this._repositoryPromiseResolveCallback(false);
|
|
252
273
|
}
|
|
253
274
|
return this._repositoryPromiseResolveCallback(true);
|
|
@@ -299,7 +320,7 @@ const DEFAULT_EMOJI_VERSION = 16;
|
|
|
299
320
|
const categories = [
|
|
300
321
|
{
|
|
301
322
|
title: t('Smileys & Expressions'),
|
|
302
|
-
icon: '
|
|
323
|
+
icon: 'π',
|
|
303
324
|
groupId: 0
|
|
304
325
|
},
|
|
305
326
|
{
|
|
@@ -334,7 +355,7 @@ const DEFAULT_EMOJI_VERSION = 16;
|
|
|
334
355
|
},
|
|
335
356
|
{
|
|
336
357
|
title: t('Symbols'),
|
|
337
|
-
icon: '
|
|
358
|
+
icon: 'π΅',
|
|
338
359
|
groupId: 8
|
|
339
360
|
},
|
|
340
361
|
{
|
|
@@ -475,17 +496,6 @@ const DEFAULT_EMOJI_VERSION = 16;
|
|
|
475
496
|
}).catch(()=>{
|
|
476
497
|
return [];
|
|
477
498
|
});
|
|
478
|
-
if (!result.length) {
|
|
479
|
-
/**
|
|
480
|
-
* Unable to load the emoji repository from the URL.
|
|
481
|
-
*
|
|
482
|
-
* If the URL works properly and there is no disruption of communication, please check your
|
|
483
|
-
* {@glink getting-started/setup/csp Content Security Policy (CSP)} setting and make sure
|
|
484
|
-
* the URL connection is allowed by the editor.
|
|
485
|
-
*
|
|
486
|
-
* @error emoji-repository-load-failed
|
|
487
|
-
*/ logWarning('emoji-repository-load-failed');
|
|
488
|
-
}
|
|
489
499
|
EmojiRepository._results[this._url.href] = this._normalizeEmoji(result);
|
|
490
500
|
}
|
|
491
501
|
/**
|
|
@@ -494,11 +504,18 @@ const DEFAULT_EMOJI_VERSION = 16;
|
|
|
494
504
|
* * Filter out unsupported emoji (these that will not render correctly),
|
|
495
505
|
* * Prepare skin tone variants if an emoji defines them.
|
|
496
506
|
*/ _normalizeEmoji(data) {
|
|
497
|
-
const
|
|
507
|
+
const editor = this.editor;
|
|
508
|
+
const useCustomFont = editor.config.get('emoji.useCustomFont');
|
|
509
|
+
const emojiUtils = editor.plugins.get('EmojiUtils');
|
|
510
|
+
const insertableEmoji = data.filter((item)=>emojiUtils.isEmojiCategoryAllowed(item));
|
|
511
|
+
// When using a custom font, the feature does not filter any emoji.
|
|
512
|
+
if (useCustomFont) {
|
|
513
|
+
return insertableEmoji.map((item)=>emojiUtils.normalizeEmojiSkinTone(item));
|
|
514
|
+
}
|
|
498
515
|
const emojiSupportedVersionByOs = emojiUtils.getEmojiSupportedVersionByOs();
|
|
499
516
|
const container = emojiUtils.createEmojiWidthTestingContainer();
|
|
500
517
|
document.body.appendChild(container);
|
|
501
|
-
const results =
|
|
518
|
+
const results = insertableEmoji.filter((item)=>emojiUtils.isEmojiSupported(item, emojiSupportedVersionByOs, container)).map((item)=>emojiUtils.normalizeEmojiSkinTone(item));
|
|
502
519
|
container.remove();
|
|
503
520
|
return results;
|
|
504
521
|
}
|
|
@@ -506,6 +523,15 @@ const DEFAULT_EMOJI_VERSION = 16;
|
|
|
506
523
|
* Versioned emoji repository.
|
|
507
524
|
*/ static _results = {};
|
|
508
525
|
}
|
|
526
|
+
/**
|
|
527
|
+
* Unable to load the emoji repository from the URL.
|
|
528
|
+
*
|
|
529
|
+
* If the URL works properly and there is no disruption of communication, please check your
|
|
530
|
+
* {@glink getting-started/setup/csp Content Security Policy (CSP)} setting and make sure
|
|
531
|
+
* the URL connection is allowed by the editor.
|
|
532
|
+
*
|
|
533
|
+
* @error emoji-repository-load-failed
|
|
534
|
+
*/
|
|
509
535
|
|
|
510
536
|
const EMOJI_MENTION_MARKER = ':';
|
|
511
537
|
const EMOJI_SHOW_ALL_OPTION_ID = ':__EMOJI_SHOW_ALL:';
|