1const FgEmojiPicker=function(n){if(this.options=n,this.emojiJson=null,!this.options)return console.error("You must provide object as a first argument");this.init=()=>{(this.functions.generateStyle.call(this),this.selectors.trigger=this.options.hasOwnProperty("trigger")?this.options.trigger:console.error("You must proved trigger element like this - 'EmojiPicker.init({trigger: \"selector\"})' "),this.selectors.search=".fg-emoji-picker-search input",this.selectors.emojiContainer=".fg-emoji-picker-grid",this.emojiItems=undefined,this.variable.emit=this.options.emit||null,this.variable.removeOnSelection=this.options.removeOnSelection||!1,this.variable.closeButton=this.options.closeButton!=undefined?this.options.closeButton:!0,this.variable.position=this.options.position||null,this.variable.dir=this.options.dir||"",this.insertInto=this.options.insertInto||undefined,this.selectors.trigger)&&(this.bindEvents(),this.options&&this.options.preFetch&&this.functions.fetchEmojiData())};this.lib=(n=undefined)=>({el:document.querySelectorAll(n),on(n,t,i=undefined){i?this.el.forEach(r=>{r.addEventListener(n,n=>{n.target.closest(i)&&t.call(n.target.closest(i),n)})}):this.el.forEach(i=>{i.addEventListener(n,t.bind(i))})}});this.variable={position:null,dir:"",categoryIcons:{"smileys--people":'<svg width="20" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"> <g> <g> <path d="M437.02,74.98C388.667,26.629,324.38,0,256,0S123.333,26.629,74.98,74.98C26.629,123.333,0,187.62,0,256 s26.629,132.668,74.98,181.02C123.333,485.371,187.62,512,256,512s132.667-26.629,181.02-74.98 C485.371,388.668,512,324.38,512,256S485.371,123.333,437.02,74.98z M256,472c-119.103,0-216-96.897-216-216S136.897,40,256,40 s216,96.897,216,216S375.103,472,256,472z"/> <\/g> <\/g> <g> <g> <path d="M368.993,285.776c-0.072,0.214-7.298,21.626-25.02,42.393C321.419,354.599,292.628,368,258.4,368 c-34.475,0-64.195-13.561-88.333-40.303c-18.92-20.962-27.272-42.54-27.33-42.691l-37.475,13.99 c0.42,1.122,10.533,27.792,34.013,54.273C171.022,389.074,212.215,408,258.4,408c46.412,0,86.904-19.076,117.099-55.166 c22.318-26.675,31.165-53.55,31.531-54.681L368.993,285.776z"/> <\/g> <\/g> <g> <g> <circle cx="168" cy="180.12" r="32"/> <\/g> <\/g> <g> <g> <circle cx="344" cy="180.12" r="32"/> <\/g> <\/g> <g> <\/g> <g> <\/g> <g> <\/g> <\/svg>',"animals--nature":'<svg width="20" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 354.968 354.968" style="enable-background:new 0 0 354.968 354.968;" xml:space="preserve"> <g> <g> <path d="M350.775,341.319c-9.6-28.4-20.8-55.2-34.4-80.8c0.4-0.4,0.8-1.2,1.6-1.6c30.8-34.8,44-83.6,20.4-131.6 c-20.4-41.6-65.6-76.4-124.8-98.8c-57.2-22-127.6-32.4-200.4-27.2c-5.6,0.4-10,5.2-9.6,10.8c0.4,2.8,1.6,5.6,4,7.2 c36.8,31.6,50,79.2,63.6,126.8c8,28,15.6,55.6,28.4,81.2c0,0.4,0.4,0.4,0.4,0.8c30.8,59.6,78,81.2,122.8,78.4 c18.4-1.2,36-6.4,52.4-14.4c9.2-4.8,18-10.4,26-16.8c11.6,23.2,22,47.2,30.4,72.8c1.6,5.2,7.6,8,12.8,6.4 C349.975,352.119,352.775,346.519,350.775,341.319z M271.175,189.319c-34.8-44.4-78-82.4-131.6-112.4c-4.8-2.8-11.2-1.2-13.6,4 c-2.8,4.8-1.2,11.2,4,13.6c50.8,28.8,92.4,64.8,125.6,107.2c13.2,17.2,25.2,35.2,36,54c-8,7.6-16.4,13.6-25.6,18 c-14,7.2-28.8,11.6-44.4,12.4c-37.6,2.4-77.2-16-104-67.6v-0.4c-11.6-24-19.2-50.8-26.8-78c-12.4-43.2-24.4-86.4-53.6-120.4 c61.6-1.6,120.4,8.4,169.2,27.2c54.4,20.8,96,52,114,88.8c18.8,38,9.2,76.8-14.4,105.2 C295.575,222.919,283.975,205.719,271.175,189.319z"/> <\/g> <\/g> <g> <\/g> <g> <\/g> <g> <\/g> <\/svg>',"travel--places":'<svg width="20" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512.003 512.003" style="enable-background:new 0 0 512.003 512.003;" xml:space="preserve"> <g> <g> <path d="M492.638,416.168c-35.445-29.635-139.695-117.048-187.5-159.684c25.879-23.721,62.112-58.999,97.354-93.327 c40.344-39.302,78.458-76.417,95.729-91c8.76-7.385,13.781-18.24,13.781-29.781c0-14.438-7.51-27.24-20.094-34.24 c-12.521-6.958-27.26-6.615-39.438,0.948c-39.313,24.385-196.469,137.25-196.469,161.583c0,7.178-0.293,15.621-2.85,25.203 c-11.751-20.152-18.483-38.615-18.483-46.536c0-15.177-51.573-64.615-153.292-146.958c-4.219-3.427-10.385-3.115-14.25,0.75 l-64,64c-3.865,3.854-4.188,10.01-0.75,14.25c82.344,101.719,131.781,153.292,146.958,153.292c9.056,0,31.823,8.76,55.227,23.852 C157.266,300.56,60.87,381.466,19.388,416.147C7.066,426.449,0.003,441.605,0.003,457.73c0,29.927,24.344,54.271,54.271,54.271 c16.115,0,31.281-7.073,41.583-19.406c35.645-42.613,119.006-141.934,160.151-187.994 c42.456,47.553,130.417,152.456,160.172,188.035c10.292,12.313,25.448,19.365,41.552,19.365c29.927,0,54.271-24.344,54.271-54.271 C512.003,441.626,504.951,426.47,492.638,416.168z M277.336,172.543c11.219-17.521,121.354-104.99,186.385-145.333 c5.5-3.385,12.167-3.573,17.813-0.438c5.719,3.188,9.135,9.021,9.135,15.604c0,5.24-2.26,10.146-6.208,13.479 c-17.854,15.073-56.229,52.448-96.854,92.021c-35.809,34.887-72.602,70.699-98.298,94.167c-1.604-1.518-3.255-3.074-4.431-4.25 c-6.327-6.327-12.008-13.227-17.279-20.24C276.351,199.191,277.309,183.556,277.336,172.543z M79.493,478.907 c-6.24,7.479-15.438,11.76-25.219,11.76c-18.167,0-32.938-14.771-32.938-32.938c0-9.792,4.281-18.979,11.74-25.208 c42.625-35.651,143.104-119.991,189.254-161.26c5.341,4.263,10.582,8.732,15.465,13.615c1.036,1.036,2.443,2.535,3.74
16,3.905 C200.651,334.428,115.631,435.712,79.493,478.907z M457.732,490.668c-9.781,0-18.958-4.271-25.188-11.719 c-45.26-54.125-153.365-182.854-179.667-209.156c-32.146-32.146-80.802-56.208-101.417-56.208c-0.104,0-0.219,0.01-0.323,0.01 c-12.563-4.885-72.802-72.781-126.125-138.188l6.99-6.99l99.125,99.125c2.083,2.083,4.813,3.125,7.542,3.125 c2.729,0,5.458-1.042,7.542-3.125c4.167-4.167,4.167-10.917,0-15.083L47.086,53.334l6.25-6.25l99.125,99.125 c2.083,2.083,4.813,3.125,7.542,3.125s5.458-1.042,7.542-3.125c4.167-4.167,4.167-10.917,0-15.083L68.42,32.001l6.99-6.99 c65.406,53.323,133.292,113.49,137.927,124.323c0,22.229,24.146,71.229,56.458,103.542 c26.302,26.302,155.031,134.406,209.156,179.656c7.448,6.24,11.719,15.417,11.719,25.198 C490.67,475.897,475.899,490.668,457.732,490.668z"/> <\/g> <\/g> <g> <\/g> <g> <\/g> <g> <\/g> <g> <\/g> <\/svg>',activities:'<svg id="Capa_1" enable-background="new 0 0 512 512" height="20" viewBox="0 0 512 512" width="20" xmlns="http://www.w3.org/2000/svg"><path id="XMLID_272_" d="m437.02 74.98c-48.353-48.351-112.64-74.98-181.02-74.98s-132.667 26.629-181.02 74.98c-48.351 48.353-74.98 112.64-74.98 181.02s26.629 132.667 74.98 181.02c48.353 48.351 112.64 74.98 181.02 74.98s132.667-26.629 181.02-74.98c48.351-48.353 74.98-112.64 74.98-181.02s-26.629-132.667-74.98-181.02zm-407.02 181.02c0-57.102 21.297-109.316 56.352-149.142 37.143 45.142 57.438 101.499 57.438 160.409 0 53.21-16.914 105.191-47.908 148.069-40.693-40.891-65.882-97.226-65.882-159.336zm88.491 179.221c35.75-48.412 55.3-107.471 55.3-167.954 0-66.866-23.372-130.794-66.092-181.661 39.718-34.614 91.603-55.606 148.301-55.606 56.585 0 108.376 20.906 148.064 55.396-42.834 50.9-66.269 114.902-66.269 181.872 0 60.556 19.605 119.711 55.448 168.158-38.077 29.193-85.665 46.574-137.243 46.574-51.698 0-99.388-17.461-137.509-46.779zm297.392-19.645c-31.104-42.922-48.088-95.008-48.088-148.309 0-59.026 20.367-115.47 57.638-160.651 35.182 39.857 56.567 92.166 56.567 149.384 0 62.23-25.284 118.665-66.117 159.576z"/><\/svg>',objects:'<svg width="20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve"> <g><g><path d="M846.5,153.5C939,246.1,990,369.1,990,500c0,130.9-51,253.9-143.5,346.5C753.9,939,630.9,990,500,990c-130.9,0-253.9-51-346.5-143.5C61,753.9,10,630.9,10,500c0-130.9,51-253.9,143.5-346.5C246.1,61,369.1,10,500,10C630.9,10,753.9,61,846.5,153.5z M803.2,803.2c60.3-60.3,100.5-135.5,117-217.3c-12.9,19-25.2,26-32.9-16.5c-7.9-69.3-71.5-25-111.5-49.6c-42.1,28.4-136.8-55.2-120.7,39.1c24.8,42.5,134-56.9,79.6,33.1c-34.7,62.8-126.9,201.9-114.9,274c1.5,105-107.3,21.9-144.8-12.9c-25.2-69.8-8.6-191.8-74.6-225.9c-71.6-3.1-133-9.6-160.8-89.6c-16.7-57.3,17.8-142.5,79.1-155.7c89.8-56.4,121.9,66.1,206.1,68.4c26.2-27.4,97.4-36.1,103.4-66.8c-55.3-9.8,70.1-46.5-5.3-67.4c-41.6,4.9-68.4,43.1-46.3,75.6C496,410.3,493.5,274.8,416,317.6c-2,67.6-126.5,21.9-43.1,8.2c28.7-12.5-46.8-48.8-6-42.2c20-1.1,87.4-24.7,69.2-40.6c37.5-23.3,69.1,55.8,105.8-1.8c26.5-44.3-11.1-
152.5-44.4-30c-18.7-21,33.1-66.3,78.8-85.9c15.2-6.5,29.8-10.1,40.9-9.1c23,26.6,65.6,31.2,67.8-3.2c-57-27.3-119.9-41.7-185-41.7c-93.4,0-182.3,29.7-255.8,84.6c19.8,9.1,31,20.3,11.9,34.7c-14.8,44.1-74.8,103.2-127.5,94.9c-27.4,47.2-45.4,99.2-53.1,153.6c44.1,14.6,54.3,43.5,44.8,53.2c-22.5,19.6-36.3,47.4-43.4,77.8C91.3,658,132.6,739,196.8,803.2c81,81,188.6,125.6,303.2,125.6C614.5,928.8,722.2,884.2,803.2,803.2z"/><\/g><g><\/g><g><\/g><g><\/g><g><\/g><g><\/g><g><\/g><g><\/g><g><\/g><g><\/g><g><\/g><g><\/g><g><\/g><g><\/g><g><\/g><g><\/g><\/g> <\/svg>',symbols:'<svg width="20" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve"> <g> <g> <path d="M256,0C161.33,0,84.312,77.018,84.312,171.688c0,54.38,25.587,105.127,68.882,137.502c0,7.915,0,121.305,0,125.043 c0,9.22,7.475,16.696,16.696,16.696h10.168C187.72,485.81,218.85,512,256,512c37.15,0,68.28-26.19,75.943-61.072h10.168 c9.22,0,16.696-7.475,16.696-16.696c0-3.762,0-117.209,0-125.043c43.294-32.375,68.882-83.122,68.882-137.502 C427.688,77.018,350.67,0,256,0z M256,478.609c-18.567,0-34.507-11.461-41.116-27.68h82.233 C290.507,467.148,274.567,478.609,256,478.609z M325.415,417.537c-4.855,0-132.083,0-138.83,0v-39.041h138.83V417.537z M211.096,242.095h-8.057c-4.443,0-8.058-3.615-8.058-8.058s3.615-8.057,8.058-8.057c4.443,0,8.057,3.614,8.057,8.057V242.095z M244.488,345.105v-69.619h23.017v69.619H244.488z M332.824,286.684c-4.63,3.099-7.41,8.303-7.41,13.875v44.545h-24.519v-69.619 h8.058c22.855,0,41.449-18.594,41.449-41.45c0-22.855-18.593-41.449-41.449-41.449c-22.855,0-41.45,18.593-41.45,41.449v8.058 h-23.017v-8.058c0-22.855-18.593-41.449-41.449-41.449c-22.855,0-41.45,18.593-41.45,41.449s18.594,41.45,41.45,41.45h8.057 v69.619h-24.511V300.56c0-5.572-2.779-10.776-7.41-13.875c-38.491-25.759-61.472-68.748-61.472-114.996 c0-76.258,62.039-138.297,138.297-138.297S394.297,95.43,394.297,171.688C394.297,217.937,371.316,260.926,332.824,286.684z M300.896,242.095v-8.058c0-4.443,3.615-8.057,8.058-8.057c4.443,0,8.057,3.614,8.057,8.057s-3.614,8.058-8.057,8.058H300.896z"/> <\/g> <\/g> <g> <\/g> <g> <\/g> <g> <\/g> <g> <\/g> <g> <\/g> <g> <\/g> <\/svg>',search:'<svg width="20" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 511.999 511.999" style="enable-background:new 0 0 511.999 511.999;" xml:space="preserve"> <g> <g> <path d="M508.874,478.708L360.142,329.976c28.21-34.827,45.191-79.103,45.191-127.309c0-111.75-90.917-202.667-202.667-202.667 S0,90.917,0,202.667s90.917,202.667,202.667,202.667c48.206,0,92.482-16.982,127.309-45.191l148.732,148.732 c4.167,4.165,10.919,4.165,15.086,0l15.081-15.082C513.04,489.627,513.04,482.873,508.874,478.708z M202.667,362.667 c-88.229,0-160-71.771-160-160s71.771-160,160-160s160,71.771,160,160S290.896,362.667,202.667,362.667z"/> <\/g> <\/g> <g> <\/g> <g> <\/g> <g> <\/g> <g> <\/g> <\/svg>',close:'<svg width="20" viewBox="0 0 513 513" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"> <g transform="matrix(0.589845,0,0,0.589845,105,105)"> <g> <path d="M284.286,256.002L506.143,34.144C513.954,26.333 513.954,13.669 506.143,5.859C498.332,-1.951 485.668,-1.952 477.858,5.859L256,227.717L34.143,5.859C26.332,-1.952 13.668,-1.952 5.858,5.859C-1.952,13.67 -1.953,26.334 5.858,34.144L227.715,256.001L5.858,477.859C-1.953,485.67 -1.953,498.334 5.858,506.144C9.763,510.049 14.882,512.001 20.001,512.001C25.12,512.001 30.238,510.049 34.144,506.144L256,284.287L477.857,506.144C481.762,510.049 486.881,512.001 492,512.001C497.119,512.001 502.237,510.049 506.143,506.144C513.954,498.333 513.954,485.669 506.143,477.859L284.286,256.002Z" style="fill-rule:nonzero;"/> <\/g> <\/g> <\/svg>'}};this.selectors={emit:null,trigger:null,emojiPicker:".fg-emoji-picker",emojiFooter:".fg-emoji-picker-footer",emojiBody:".fg-emoji-picker-all-categories",emojiHeader:".fg-emoji-picker-categories",closeButton:".fg-emoji-picker-close-button"};this.bindEvents=()=>{this.lib("body").on("click",this.functions.removeEmojiPicker.bind(this));this.lib("body").on("click",this.functions.emitEmoji.bind(this));this.lib("body").on("click",this.functions.openEmojiSelector.bind(this),this.selectors.trigger);this.lib("body").on("input",this.functions.search.bind(this),this.selectors.search);this.lib("body").on("click",this.destroy.bind(this),this.selectors.closeButton);window.addEventListener("keydown",n=>{n.keyCode===27&&document.querySelector(this.selectors.emojiPicker)&&(document.querySelectorAll(this.selectors.emojiPicker).forEach(n=>n.remove()),this.emojiItems=undefined)})};this.html={pickerBody:()=>`<div class="fg-emoji-picker"> 2 <div style="position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center;"> 3 <div> 4 <div class="sk-chase"> 5 <div class="sk-chase-dot"></div> 6 <div class="sk-chase-dot"></div> 7 <div class="sk-chase-dot"></div> 8 <div class="sk-chase-dot"></div> 9 <div class="sk-chase-dot"></div> 10 <div class="sk-chase-dot"></div> 11 </div> 12 </div> 13 </div> 14 </div>`};this.destroy=()=>(document.querySelectorAll(this.selectors.emojiPicker).forEach(n=>
14n.remove()),this.emojiItems=undefined,!0);setCaretPosition=(n,t)=>{var i=n,r;i!=null&&(i.createTextRange?(r=i.createTextRange(),r.move("character",t),r.select()):i.selectionStart?(i.focus(),i.setSelectionRange(t,t)):i.focus())};this.functions={putInPlace(n,t){if(document.selection)n.focus(),sel=document.selection.createRange(),sel.text=t;else if(n.selectionStart||n.selectionStart=="0"){const i=n.selectionStart,r=n.selectionEnd;n.value=n.value.substring(0,i)+t+n.value.substring(r,n.value.length);setCaretPosition(n,i+2)}else n.value+=t,n.focus()},search(n){var r,u,t,f;const i=n.target.value;for($(".fg-emoji-picker-category").attr("hide-emoji",0),Array.isArray(this.emojiItems)||(this.emojiItems=Array.from(n.target.closest(this.selectors.emojiPicker).querySelectorAll(`${this.selectors.emojiBody} li`))),r=new RegExp("(^|\\s)"+i.toLowerCase()+""),u=new RegExp("(^|\\s)"+i.toUpperCase()+""),this.emojiItems.filter(n=>{if(r.test(n.getAttribute("data-keyword"))||u.test(n.getAttribute("data-keyword")))n.style.display="";else{n.style.display="none";var t=parseInt($(n).parents(".fg-emoji-picker-category").attr("hide-emoji"));$(n).parents(".fg-emoji-picker-category").attr("hide-emoji",t+1)}}),t=0;t<$(".fg-emoji-picker-category").length;t++)f=$(".fg-emoji-picker-category").eq(t).attr("id"),$(".fg-emoji-picker-category").eq(t).attr("hide-emoji")>=$(".fg-emoji-picker-category").eq(t).attr("total-emoji")?$(".fg-emoji-picker-category").eq(t).css("display","none"):$(".fg-emoji-picker-category").eq(t).css("display","block");i.length||(this.emojiItems=undefined)},fetchEmojiData:()=>{fetch(`${this.variable.dir}full-emoji-list.json`).then(n=>n.json()).then(n=>{this.emojiJson=n})},generateStyle(){document.head.insertAdjacentHTML("beforeend",` 15 <style> 16 .sk-chase { 17 width: 40px; 18 height: 40px; 19 position: relative; 20 animation: sk-chase 2.5s infinite linear both; 21 } 22 23 .sk-chase-dot { 24 width: 100%; 25 height: 100%; 26 position: absolute; 27 left: 0; 28 top: 0; 29 animation: sk-chase-dot 2.0s infinite ease-in-out both; 30 } 31 32 .sk-chase-dot:before { 33 content: ''; 34 display: block; 35 width: 25%; 36 height: 25%; 37 background-color: #9fa1a5; 38 border-radius: 100%; 39 animation: sk-chase-dot-before 2.0s infinite ease-in-out both; 40 } 41 42 .sk-chase-dot:nth-child(1) { animation-delay: -1.1s; } 43 .sk-chase-dot:nth-child(2) { animation-delay: -1.0s; } 44 .sk-chase-dot:nth-child(3) { animation-delay: -0.9s; } 45 .sk-chase-dot:nth-child(4) { animation-delay: -0.8s; } 46 .sk-chase-dot:nth-child(5) { animation-delay: -0.7s; } 47 .sk-chase-dot:nth-child(6) { animation-delay: -0.6s; } 48 .sk-chase-dot:nth-child(1):before { animation-delay: -1.1s; } 49 .sk-chase-dot:nth-child(2):before { animation-delay: -1.0s; } 50 .sk-chase-dot:nth-child(3):before { animation-delay: -0.9s; } 51 .sk-chase-dot:nth-child(4):before { animation-delay: -0.8s; } 52 .sk-chase-dot:nth-child(5):before { animation-delay: -0.7s; } 53 .sk-chase-dot:nth-child(6):before { animation-delay: -0.6s; } 54 55 @keyframes sk-chase { 56 100% { transform: rotate(360deg); } 57 } 58 59 @keyframes sk-chase-dot { 60 80%, 100% { transform: rotate(360deg); } 61 } 62 63 @keyframes sk-chase-dot-before { 64 50% { 65 transform: scale(0.4); 66 } 100%, 0% { 67 transform: scale(1.0); 68 } 69 } 70 71 72 a.fg-emoji-picker-close-button { 73 background-color: #dedede; 74 } 75 76 ${this.selectors.emojiPicker} { 77 /* position: fixed; */ 78 position: absolute; 79 z-index: 999; 80 max-width: 500px; 81 width: 100%; 82 min-height: 360px; 83 background-color: #2D3038; 84 box-shadow: 0px 2px 13px -2px rgba(0, 0, 0, 0.1803921568627451); 85 border-radius: 4px; 86 overflow: hidden; 87 } 88 89 ${this.selectors.emojiPicker} ${this.selectors.emojiBody} { 90 height: 301px; 91 overflow-y: auto; 92 padding: 0 15px 15px 15px; 93 } 94 95 ${this.selectors.emojiPicker} .fg-emoji-picker-container-title { 96 color: var(--secondary-font-color); 97 margin: 10px 0; 98 background-color: #414652; 99 } 100 101 ${this.selectors.emojiPicker} * { 102 margin: 0; 103 padding: 0; 104 text-decoration: none; 105 color: #666; 106 /*font-family: sans-serif;*/ 107 } 108 109 ${this.selectors.emojiPicker} ul { 110 list-style: none; 111 margin: 0; 112 padding: 0; 113 } 114 115 ${this.selectors.emojiPicker} .fg-emoji-picker-category { 116 margin-top: 15px; 117 /*padding-top: 15px;*/ 118 } 119 120 .fg-emoji-picker-categories svg { 121 width: 17px; 122 height: 17px; 123 } 124 125 .fg-emoji-picker-grid { 126 display: flex; 127 flex-wrap: wrap; 128 } 129 130 .fg-emoji-picker-grid > li { 131 cursor: pointer; 132 flex: 0 0 calc(100% / 5); 133 max-width: calc(100% / 5); 134 height: 48px; 135 min-width: 0; 136 display: flex; 137 justify-content: center; 138 align-items: center; 139 transition: all .2s ease; 140 background-color: #2D3038; 141 } 142 143 .fg-emoji-picker-grid > li:hover { 144 background-color: transparent; 145 } 146 147 .fg-emoji-picker-grid > li:hover a { 148 -webkit-transform: scale(1.2); 149 -ms-transform: scale(1.2); 150 -moz-transform: scale(1.2); 151 transform: scale(1.2); 152 } 153 154 .fg-emoji-picker-grid > li > a { 155 display: block; 156 font-size: 25px; 157 margin: 0; 158 padding: 25px 0px; 159 line-height: 0; 160 -webkit-transition: all .3s ease; 161 -moz-transition: all .3s ease; 162 -ms-transition: all .3s ease; 163 transition: all .3s ease; 164 } 165 166 /* FILTERS */ 167 .fg-emoji-picker-categories { 168 /*padding: 0 15px;*/ 169 /*background: #ececec*/; 170 padding: 0 15px 0 15px; 171 } 172 173 .fg-emoji-picker-categories ul { 174 display: flex; 175 flex-wrap: wrap; 176 } 177 178 .fg-emoji-picker-categories li { 179 flex: 1; 180 } 181 182 .fg-emoji-picker-categories li.active { 183 /*background-color: #99c9ef*/; 184 } 185 186 .fg-emoji-picker-categories li svg { 187 stroke: #a0a0a0; 188 fill: #a0a0a0; 189 } 190 191 .fg-emoji-picker-categories li.active svg { 192 stroke: var(--quaternary-color); 193 fill: var(--quaternary-color); 194 } 195 196 .fg-emoji-picker-categories a { 197 padding: 12px 7px; 198 display: flex; 199 text-align: center; 200 justify-content: center; 201 align-items: center; 202 transition: all .2s ease; 203 } 204 205 .fg-emoji-picker-categories a:hover { 206 /*background-color: #99c9ef;*/ 207 } 208 209 .fg-emoji-picker-search { 210 position: relative; 211 height: 40px; 212 } 213 214 .fg-emoji-picker-search input { 215 /*position: absolute;*/ 216 /*width: 85%;*/ 217 left: 0; 218 top: 0; 219 border: none; 220 padding: 5px 30px 5px 15px; 221 outline: none; 222 background-color: #414652; 223 font-size: 12px; 224 color: white; 225 border-radius: 40px; 226 line-height: normal; 227 height: 100%; 228 } 229 230 .fg-emoji-picker-search svg { 231 width: 15px; 232 height: 15px; 233 position: absolute; 234 right: 7px; 235 top: 5px; 236 fill: #333333; 237 pointer-events: none; 238 } 239 240 241 /* FOOTER */ 242 .fg-emoji-picker-footer { 243 display: flex; 244 flex-wrap: wrap; 245 align-items: center; 246 height: 50px; 247 padding: 0 15px 15px 15px; 248 } 249 250 .fg-emoji-picker-footer-icon { 251 font-size: 30px; 252 margin-right: 8px; 253 } 254 </style>`)},removeEmojiPicker(){const t=window.event.target,n=document.querySelector(this.selectors.emojiPicker);t.closest(this.selectors.emojiPicker)||(n?n.remove():!1);this.emojiItems=undefined},emitEmoji(n){const t=n.target;if(t.tagName.toLowerCase()=="a"&&t.className.includes("fg-emoji-picker-item")){n.preventDefault();let i={emoji:t.getAttribute("href"),code:t.getAttribute("data-code")};if(this.variable.emit&&this.variable.emit(i,this.triggerer),this.insertInto&&this.functions.putInPlace(this.insertInto,i.emoji),this.variable.removeOnSelection){const n=document.querySelector(this.selectors.emojiPicker);n.remove()}}},openEmojiSelector(n){let t=n.target.closest(this.selectors.trigger);if(t){n.preventDefault();let r=n.target.closest(this.selectors.trigger);typeof this.variable.emit=="function"&&(this.triggerer=r);const t=(new DOMParser).parseFromString(this.html.pickerBody.apply(this),"text/html").body.firstElementChild;document.body.insertAdjacentElement("afterbegin",t);let i={buttonTop:n.pageY,buttonWidth:r.offsetWidth,buttonFromLeft:r.getBoundingClientRect().left,bodyHeight:document.body.offsetHeight,bodyWidth:document.body.offsetWidth,windowScrollPosition:window.pageYOffset,emojiHeight:t.offsetHeight,emojiWidth:t.offsetWidth},u={top:t.style.top=i.buttonTop-i.emojiHeight,left:t.style.left=i.buttonFromLeft-i.emojiWidth,bottom:t.style.top=i.buttonTop,right:t.style.left=i.buttonFromLeft+i.buttonWidth};this.variable.position&&this.variable.position.forEach(n=>
254{n==="right"?t.style.left=u[n]+"px":n==="bottom"?t.style.top=u[n]+"px":t.style[n]=u[n]+"px"});this.emojiPicker().then(n=>{const r=(new DOMParser).parseFromString(n,"text/html").body.firstElementChild;t.innerHTML=r.innerHTML;const f=t.querySelector(this.selectors.emojiFooter),i=t.querySelector(this.selectors.emojiBody),u=t.querySelector(this.selectors.emojiHeader);t.querySelector("input").focus();document.body.querySelector(this.selectors.emojiPicker).onclick=function(n){n.preventDefault();let r=(n,t,i=100)=>{if(!(i<=0)){var u=t-n.scrollTop,f=u/i*10;setTimeout(function(){(n.scrollTop=n.scrollTop+f,n.scrollTop!==t)&&r(n,t,i-10)},10)}};const f=n.target,t=f.closest("a");if($(n.target).parents().addBack().hasClass("fg-emoji-picker-search")||document.querySelectorAll(".fg-emoji-picker-categories li").forEach(n=>n.classList.remove("active")),t&&t.closest("li")&&t.closest("li").getAttribute("data-index")){let f=t.closest("li");$(n.target).parents().addBack().hasClass("fg-emoji-picker-search")||f.classList.add("active");let e=f.getAttribute("data-index");r(i,i.querySelector(`#${e}`).offsetTop-u.offsetHeight)}}})}}};this.emojiPicker=()=>{let i=` 255 <div class="fg-emoji-picker"> 256 <div class="fg-emoji-picker-categories row align-items-center py-2"> 257 <div class="fg-emoji-picker-search col-12 col-md-6"> 258 <input class="w-100" placeholder="${$("#PlaceholderSearchEmoji").val()}" autofocus /> 259 </div> 260 %categories% 261 </div> 262 <div>%pickerContainer%</div> 263 </div>`;const f=this.variable.closeButton?`<li><a class="fg-emoji-picker-close-button" href="#">${this.variable.categoryIcons.close}</a></li>`:"";let r=`<ul class="col-12 col-md-6">%categories%${f}</ul>`,t=``,u=`<div class="fg-emoji-picker-all-categories">%outerUL%</div>`,n=``;return this.emojiJson?new Promise(f=>{let o=0,s=this.emojiJson;for(const i in s)if(s.hasOwnProperty(i)){var h=0,e="";o+=1;let r=i.split(" ").join("-").split("&").join("").toLowerCase();const u=s[i];t+=`<li class="${o===1?"active":""}" id="${r}" data-index="${r}"><a href="#${r}">${this.variable.categoryIcons[r]}</a></li>`;e+=` 264 <ul class="fg-emoji-picker-category ${o===1?"active":""}" id="${r}" category-name="${i}" total-emoji=%totalEmoji% hide-emoji=0> 265 <div class="fg-emoji-picker-container-title">${i}</div> 266 <div class="fg-emoji-picker-grid">`;u.forEach(n=>{var t="";n.keywords!=null&&n.keywords!=undefined&&n.keywords.length>0&&(t=n.keywords.join(" "));e+=`<li data-name="${n.description.toLowerCase()}" data-keyword="${t}"><a class="fg-emoji-picker-item" data-name="${n.description.toLowerCase()}" data-code="${n.code}" href="${n.emoji}">${n.emoji}</a></li>`;h+=1});e+=` 267 </div> 268 </ul>`;n+=e.replace("%totalEmoji%",h)}let c=u.replace("%outerUL%",n),l=r.replace("%categories%",t),a=i.replace("%pickerContainer%",c),v=a.replace("%categories%",l);f(v)}):fetch(`${this.variable.dir}full-emoji-list.json`).then(n=>n.json()).then(f=>{let e=0;this.emojiJson=f;for(const i in f)if(f.hasOwnProperty(i)){e+=1;let r=i.split(" ").join("-").split("&").join("").toLowerCase();const u=f[i];t+=`<li class="${e===1?"active":""}" id="${r}" data-index="${r}"><a href="#${r}">${this.variable.categoryIcons[r]}</a></li>`;n+=` 269 <ul class="fg-emoji-picker-category ${e===1?"active":""}" id="${r}" category-name="${i}"> 270 <div class="fg-emoji-picker-container-title">${i}</div> 271 <div class="fg-emoji-picker-grid">`;u.forEach(t=>{var i="";t.keywords!=null&&t.keywords!=undefined&&t.keywords.length>0&&(i=t.keywords.join(" "));n+=`<li data-name="${t.description.toLowerCase()}" data-keyword="${i}"><a class="fg-emoji-picker-item" data-name="${t.description.toLowerCase()}" data-code="${t.code}" href="${t.emoji}">${t.emoji}</a></li>`});n+=` 272 </div> 273 </ul>`}
273let o=u.replace("%outerUL%",n),s=r.replace("%categories%",t),h=i.replace("%pickerContainer%",o);return h.replace("%categories%",s)})};this.init()}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.