diff --git a/dist/mailgo.dark.min.js b/dist/mailgo.dark.min.js index f08757c..86eb467 100644 --- a/dist/mailgo.dark.min.js +++ b/dist/mailgo.dark.min.js @@ -1,2 +1,2 @@ -window.mailgo=function(){var e={91:function(e,o,t){var a=t(476)((function(e){return e[1]}));a.push([e.id,'.m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:16.5px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:#20232a;opacity:.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:.95;border-radius:20px;box-shadow:0 3px 20px rgba(32,35,42,.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:24px;transition:.5s box-shadow}.m-modal .m-modal-content:hover,.m-modal .m-modal-content:focus,.m-modal .m-modal-content:active{opacity:1}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2em}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{cursor:pointer;padding:10px;color:#4a4a4a;border-radius:20px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#c0372a}.m-modal .m-modal-content a.m-gmail:hover,.m-modal .m-modal-content a.m-gmail:focus,.m-modal .m-modal-content a.m-gmail:active{background-color:rgba(192,55,42,.08);color:#c0372a}.m-modal .m-modal-content a.m-outlook{color:#0967aa}.m-modal .m-modal-content a.m-outlook:hover,.m-modal .m-modal-content a.m-outlook:focus,.m-modal .m-modal-content a.m-outlook:active{background-color:rgba(9,103,170,.08);color:#0967aa}.m-modal .m-modal-content a.m-yahoo{color:#4a00a0}.m-modal .m-modal-content a.m-yahoo:hover,.m-modal .m-modal-content a.m-yahoo:focus,.m-modal .m-modal-content a.m-yahoo:active{background-color:rgba(74,0,160,.08);color:#4a00a0}.m-modal .m-modal-content a.m-tg{color:#086da0}.m-modal .m-modal-content a.m-tg:hover,.m-modal .m-modal-content a.m-tg:focus,.m-modal .m-modal-content a.m-tg:active{background-color:rgba(8,109,160,.08);color:#086da0}.m-modal .m-modal-content a.m-wa{color:#067466}.m-modal .m-modal-content a.m-wa:hover,.m-modal .m-modal-content a.m-wa:focus,.m-modal .m-modal-content a.m-wa:active{background-color:rgba(6,116,102,.08);color:#067466}.m-modal .m-modal-content a.m-skype{color:#076d92}.m-modal .m-modal-content a.m-skype:hover,.m-modal .m-modal-content a.m-skype:focus,.m-modal .m-modal-content a.m-skype:active{background-color:rgba(7,109,146,.08);color:#076d92}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-default:focus,.m-modal .m-modal-content a.m-default:active,.m-modal .m-modal-content a.m-copy:hover,.m-modal .m-modal-content a.m-copy:focus,.m-modal .m-modal-content a.m-copy:active{background-color:rgba(0,0,0,.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:12px;margin-top:.8rem;padding:5px;color:#4a4a4a}.m-modal .m-modal-content a.m-by:hover,.m-modal .m-modal-content a.m-by:focus,.m-modal .m-modal-content a.m-by:active{color:#3d3d3d}.m-modal .m-modal-content .w-500{font-weight:500}.m-modal.m-dark .m-modal-content{background-color:#20232a}.m-modal.m-dark .m-modal-content,.m-modal.m-dark .m-modal-content p,.m-modal.m-dark .m-modal-content p span,.m-modal.m-dark .m-modal-content strong{color:#fff}.m-modal.m-dark .m-modal-content a{color:#eaeaea}.m-modal.m-dark .m-modal-content a:not(.m-by):hover,.m-modal.m-dark .m-modal-content a:not(.m-by):focus,.m-modal.m-dark .m-modal-content a:not(.m-by):active{background-color:rgba(134,134,134,.08);color:#eaeaea}.m-modal.m-dark .m-modal-content a.m-gmail{color:#e07d73}.m-modal.m-dark .m-modal-content a.m-gmail:hover,.m-modal.m-dark .m-modal-content a.m-gmail:focus,.m-modal.m-dark .m-modal-content a.m-gmail:active{background-color:rgba(224,125,115,.08);color:#e07d73}.m-modal.m-dark .m-modal-content a.m-outlook{color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-outlook:hover,.m-modal.m-dark .m-modal-content a.m-outlook:focus,.m-modal.m-dark .m-modal-content a.m-outlook:active{background-color:rgba(76,156,215,.08);color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-yahoo{color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-yahoo:hover,.m-modal.m-dark .m-modal-content a.m-yahoo:focus,.m-modal.m-dark .m-modal-content a.m-yahoo:active{background-color:rgba(172,136,211,.08);color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-tg{color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-tg:hover,.m-modal.m-dark .m-modal-content a.m-tg:focus,.m-modal.m-dark .m-modal-content a.m-tg:active{background-color:rgba(76,171,219,.08);color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-wa{color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-wa:hover,.m-modal.m-dark .m-modal-content a.m-wa:focus,.m-modal.m-dark .m-modal-content a.m-wa:active{background-color:rgba(76,210,192,.08);color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-skype{color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-skype:hover,.m-modal.m-dark .m-modal-content a.m-skype:focus,.m-modal.m-dark .m-modal-content a.m-skype:active{background-color:rgba(76,199,244,.08);color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-by:hover,.m-modal.m-dark .m-modal-content a.m-by:focus,.m-modal.m-dark .m-modal-content a.m-by:active{color:#fff}',""]),e.exports=a},476:function(e){"use strict";e.exports=function(e){var o=[];return o.toString=function(){return this.map((function(o){var t=e(o);return o[2]?"@media ".concat(o[2]," {").concat(t,"}"):t})).join("")},o.i=function(e,t,a){"string"==typeof e&&(e=[[null,e,""]]);var n={};if(a)for(var d=0;d()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},b=function(e){return e.every(g)},y=function(e){var o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style.position="absolute",o.style.left="-9999px",document.body.appendChild(o);var t=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);return o.select(),document.execCommand("copy"),document.body.removeChild(o),!!t&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(t),!0)},h=function(e){var o=e;o.querySelector(".m-modal-content a:last-of-type").addEventListener("keydown",k),o.querySelector(".m-modal-content a:first-of-type").addEventListener("keydown",_)},k=function(e){"Tab"===e.code&&!1===e.shiftKey&&(e.preventDefault(),e.target.closest("div").querySelector("a:first-of-type").focus())},_=function(e){"Tab"===e.code&&!0===e.shiftKey&&(e.preventDefault(),e.target.closest("div").querySelector("a:last-of-type").focus())},w=JSON.parse('["en","it","es","de","fr","pt","nl","ru","sv","no","dk","is","zh"]'),C=JSON.parse('{"en":{"open_in_":"open in ","cc_":"cc ","bcc_":"bcc ","subject_":"subject ","body_":"body ","gmail":"Gmail","outlook":"Outlook","yahoo":"Yahoo Mail","telegram":"Telegram","whatsapp":"WhatsApp","skype":"Skype","call":"call","open":"open","_default":" default","_as_default":" as default","copy":"copy","copied":"copied"},"it":{"open_in_":"apri con ","bcc_":"ccn ","subject_":"oggetto ","body_":"testo ","call":"chiama","open":"apri","_default":" ","_as_default":" ","copy":"copia","copied":"copiato"},"es":{"open_in_":"abrir con ","bcc_":"cco ","subject_":"asunto ","body_":"cuerpo ","call":"llamar","open":"abrir","_default":" predefinido","_as_default":" por defecto","copy":"copiar","copied":"copiado"},"de":{"open_in_":"Öffnen in ","subject_":"Betreff ","body_":"Nachricht ","call":"Anrufen","open":"Öffnen","_default":" mit Standard","_as_default":" mit Standard","copy":"kopieren","copied":"kopiert"},"pt":{"open_in_":"abrir com ","bcc_":"cco ","subject_":"assunto ","body_":"corpo ","call":"ligar","open":"abrir","_default":" padrão","_as_default":" por padrão","copy":"copiar","copied":"copiado"},"fr":{"open_in_":"Ouvrir dans ","bcc_":"cci ","subject_":"sujet ","body_":"contenu ","call":"Appeler","open":"Ouvrir","_default":" par défaut","_as_default":" par défaut","copy":"Copier","copied":"copié"},"nl":{"subject_":"onderwerp ","body_":"bericht ","call":"bellen","open":"openen","_default":" standaard","_as_default":" als standaard","copy":"kopiëren"},"ru":{"open_in_":"открыть в ","subject_":"тема ","body_":"тело ","call":"позвонить","open":"открыть","_default":" по умолчанию","_as_default":" по умолчанию","copy":"скопировать"},"sv":{"open_in_":"öppna i ","subject_":"ämne ","body_":"meddelandetext ","call":"ring","open":"öppna","_default":" förval","_as_default":" som förval","copy":"kopiera","copied":"kopierad"},"no":{"open_in_":"åpne i ","subject_":"emne ","call":"ringe","open":"åpne","_as_default":" som standard","copy":"kopiere","copied":"kopiert"},"dk":{"open_in_":"åpne i ","subject_":"emne ","call":"ringe op","open":"åben","_as_default":" som standard","copy":"kopi","copied":"kopieret"},"is":{"open_in_":"opið inn ","subject_":"viðfangsefni ","body_":"líkami ","call":"hringja","open":"opið","_default":" sjálfgefið","_as_default":" sem sjálfgefið","copy":"afrita","copied":"afritað"},"zh":{"open_in_":"開啟 ","cc_":"副本 ","bcc_":"密件副本 ","subject_":"主旨 ","body_":"內文 ","call":"通話","open":"開啟","_default":" 預設","_as_default":" 預設","copy":"複製","copied":"已複製"}}');function x(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,a)}return t}function L(e){for(var o=1;o"),to("detail","cc")&&D?(W.style.display="block",Q.innerHTML=D.split(",").join("
")):W.style.display="none",to("detail","bcc")&&T?(Z.style.display="block",V.innerHTML=T.split(",").join("
")):Z.style.display="none",to("detail","subject")&&z?($.style.display="block",X.textContent=z):$.style.display="none",to("detail","body")&&M?(G.style.display="block",ee.textContent=M):G.style.display="none",ae.addEventListener("click",Ie),ne.addEventListener("click",Ne),de.addEventListener("click",Ue),le.addEventListener("click",ze),se.addEventListener("click",Me)):o===r&&(K.innerHTML=B,to("detail","msg")&&H?(Y.style.display="block",oe.textContent=H):Y.style.display="none",me.addEventListener("click",Te),F?(document.getElementById("m-tg").style.display="block",ie.addEventListener("click",Pe)):document.getElementById("m-tg").style.display="none",re.addEventListener("click",De),ce.addEventListener("click",ze),pe.addEventListener("click",Me)),qe(o),document.addEventListener("keydown",Fe),!0)}var Ie=function(e){var o,t;e.preventDefault();var a=null===(o=R)||void 0===o?void 0:o.installation;if(a===s)try{t=I.toString()}catch(e){t=N}else a===p&&(t=U);var n="https://mail.google.com/mail/?extsrc=mailto&url="+encodeURIComponent(t);window.open(n,"_blank","noopener, noreferrer"),Je()},Ne=function(e){var o;e.preventDefault();var t="https://outlook.live.com/owa/?path=/mail/action/compose&to=";null!==(o=A)&&void 0!==o&&o.office365&&(t="https://outlook.office365.com/owa/?path=/mail/action/compose&to=");var a=t+encodeURIComponent(P);z&&(a=a.concat("&subject="+encodeURIComponent(z))),M&&(a=a.concat("&body="+encodeURIComponent(M))),window.open(a,"_blank","noopener, noreferrer"),Je()},Ue=function(e){e.preventDefault();var o="https://compose.mail.yahoo.com/?to="+P;z&&(o=o.concat("&subject="+encodeURIComponent(z))),M&&(o=o.concat("&body="+encodeURIComponent(M))),window.open(o,"_blank","noopener, noreferrer"),Je()},Pe=function(e){if(e.preventDefault(),F){var o="https://t.me/"+encodeURIComponent(F);window.open(o,"_blank","noopener, noreferrer"),Je()}},De=function(e){e.preventDefault();var o="skype:"+encodeURIComponent(q||B);window.open(o,"_blank","noopener, noreferrer"),Je()},Te=function(e){e.preventDefault();var o=B.replace(ge,"").replace(be,""),t="https://wa.me/"+encodeURIComponent(o);H&&(t=t.concat("?text="+encodeURIComponent(H))),window.open(t,"_blank","noopener, noreferrer"),Je()},ze=function(e){var o;e.preventDefault();var t=null===(o=R)||void 0===o?void 0:o.installation;t===s?window.location.href=N:t===p&&(window.location.href=U),Je()},Me=function(e){var o,t;(e.preventDefault(),Ke())&&((null===(o=R)||void 0===o?void 0:o.type)===m?(y(P),t=se):(y(B),t=pe),t.textContent=E.copied||ve.copied,setTimeout((function(){t.textContent=E.copy||ve.copy,Je()}),999))},Be=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,t=new RegExp("^"+o+"((.)+)","gi");return t.test(e)};function He(e){var o,t,u,f=e.getAttribute("href");if(null!==(o=e.classList)&&void 0!==o&&o.contains("no-mailgo"))return null;if(f||null!==(t=e.classList)&&void 0!==t&&t.contains("mailgo")){if(Be(f,a)||Be(f,n))return{type:m,installation:s};if(Be(f,d)||Be(f,l))return{type:r,installation:s};if(Be(f,i))return{type:c,installation:s}}if("#mailgo"===f||null!==(u=e.classList)&&void 0!==u&&u.contains("mailgo")){if(e.hasAttribute("data-address")&&e.hasAttribute("data-domain"))return{type:m,installation:p};if(e.hasAttribute("data-tel"))return{type:r,installation:p};if(e.hasAttribute("data-msg"))return{type:c,installation:p}}return null}var Fe=function(e){if(Ke()){var o,t=null===(o=R)||void 0===o?void 0:o.type;if(t===m)switch(e.keyCode){case 27:return Je(),!0;case 71:return Ie(),!0;case 79:return Ne(),!0;case 89:return Ue(),!0;case 32:case 13:return ze(),!0;case 67:return Me(),!0;default:return!1}else if(t===r)switch(e.keyCode){case 27:return Je(),!0;case 84:return Pe(),!0;case 87:return Te(),!0;case 83:return De(),!0;case 32:case 13:return ze(),!0;case 67:return Me(),!0;default:return!1}}return!1},qe=function(e){Qe(e,"flex")},Je=function(){Qe(m,"none"),Qe(r,"none"),document.removeEventListener("keydown",Fe)},Ke=function(){return he&&"flex"===Ye(m)||(ke||_e)&&"flex"===Ye(r)},We=function(){var e=Ze(f);return e.href="https://mailgo.dev?ref=mailgo-modal",e.className="m-by",e.target="_blank",e.rel="noopener noreferrer",e.appendChild($e("mailgo.dev")),e},Ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div";return document.createElement(e)},$e=function(e){return document.createTextNode(e)},Ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;return e===r?O:S},Ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;return Ge(e).style.display},Qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,o=arguments.length>1?arguments[1]:void 0,t=Ge(e);t&&(t.style.display=o,"flex"===o?(te=document.activeElement,t.setAttribute("aria-hidden","false"),t.setAttribute("tabindex","0"),t.focus(),h(t)):(t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex","-1"),te.focus()))},Ve=function(){var e,o=null===(e=R)||void 0===e?void 0:e.type;o&&Ge(o).classList.add("m-dark")},Xe=function(){var e,o=null===(e=R)||void 0===e?void 0:e.type;o&&Ge(o).classList.remove("m-dark")},eo=function(e){for(var o=[];e;){if(o.push(e),"HTML"===e.tagName)return o.push(document),o.push(window),o;e=e.parentElement}},oo=function(e,o){if(U=e,o&&o.length>0){var t=o.join("&");U=U.concat("?"+t)}return U},to=function(e,o){var t,a;if(!A)return!0;if(A&&(null===(t=A)||void 0===t||!t.actions))return!0;if("action"===e){if(A&&A.actions&&!1===(null===(a=A)||void 0===a?void 0:a.actions[o]))return!1}else if("detail"===e){var n;if(A&&A.details&&!1===(null===(n=A)||void 0===n?void 0:n.details[o]))return!1}return!0},ao=function(){var e,o="default lang";if(null!==(e=A)&&void 0!==e&&e.lang&&-1!==w.indexOf(A.lang))fe=A.lang,o="config lang";else{var t=document.documentElement.lang;w.forEach((function(e){new RegExp("^"+e,"gi").test(t)&&(fe=e,o="html lang")}))}return E=C[fe],o};function no(e){try{var o;if(A=L(L({},e),(null===(o=window)||void 0===o?void 0:o.mailgoConfig)||null),"undefined"!=typeof window){var t,a,n,d,l,i;if(void 0!==(null===(t=A)||void 0===t?void 0:t.loadCSS)&&(Ee=A.loadCSS),void 0!==(null===(a=A)||void 0===a?void 0:a.mailto)&&(he=A.mailto),void 0!==(null===(n=A)||void 0===n?void 0:n.tel)&&(ke=A.tel),void 0!==(null===(d=A)||void 0===d?void 0:d.sms)&&(_e=A.sms),Ee&&function(){if(!document.getElementById("mailgo-style")){var e=Ze("style");e.id="mailgo-style",e.type="text/css",e.appendChild($e(ue)),document.head.appendChild(e)}}(),null!==(l=A)&&void 0!==l&&l.initEvent)null!==(i=A)&&void 0!==i&&i.listenerOptions?document.addEventListener(A.initEvent,Ae,A.listenerOptions):document.addEventListener(A.initEvent,Ae);else Ae();return!0}}catch(e){console.log(e)}return!1}"undefined"!=typeof window&&(window.getMailgoTypeByElement=He,window.mailgoClickListener=Re,window.mailgoCheckRender=Re,window.mailgoPreRender=Se,window.mailgoDirectRender=function(e){return no(),Be(e,a)||Be(e,n)?(R={type:m,installation:s},Se(e),!0):!!(Be(e,d)||Be(e,l)||Be(e,i))&&(R={type:r,installation:s},Se(e),!0)},window.mailgoRender=Oe,window.mailgo=no);no({initEvent:"DOMContentLoaded",dark:!0})}},o={};function t(a){if(o[a])return o[a].exports;var n=o[a]={id:a,exports:{}};return e[a](n,n.exports,t),n.exports}return t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t(907)}(); +window.mailgo=function(){var e={91:function(e,o,t){var a=t(476)((function(e){return e[1]}));a.push([e.id,'.m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:16.5px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:#20232a;opacity:.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:.95;border-radius:20px;box-shadow:0 3px 20px rgba(32,35,42,.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:24px;transition:.5s box-shadow}.m-modal .m-modal-content:hover,.m-modal .m-modal-content:focus,.m-modal .m-modal-content:active{opacity:1}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2em}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{cursor:pointer;padding:10px;color:#4a4a4a;border-radius:20px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#c0372a}.m-modal .m-modal-content a.m-gmail:hover,.m-modal .m-modal-content a.m-gmail:focus,.m-modal .m-modal-content a.m-gmail:active{background-color:rgba(192,55,42,.08);color:#c0372a}.m-modal .m-modal-content a.m-outlook{color:#0967aa}.m-modal .m-modal-content a.m-outlook:hover,.m-modal .m-modal-content a.m-outlook:focus,.m-modal .m-modal-content a.m-outlook:active{background-color:rgba(9,103,170,.08);color:#0967aa}.m-modal .m-modal-content a.m-yahoo{color:#4a00a0}.m-modal .m-modal-content a.m-yahoo:hover,.m-modal .m-modal-content a.m-yahoo:focus,.m-modal .m-modal-content a.m-yahoo:active{background-color:rgba(74,0,160,.08);color:#4a00a0}.m-modal .m-modal-content a.m-tg{color:#086da0}.m-modal .m-modal-content a.m-tg:hover,.m-modal .m-modal-content a.m-tg:focus,.m-modal .m-modal-content a.m-tg:active{background-color:rgba(8,109,160,.08);color:#086da0}.m-modal .m-modal-content a.m-wa{color:#067466}.m-modal .m-modal-content a.m-wa:hover,.m-modal .m-modal-content a.m-wa:focus,.m-modal .m-modal-content a.m-wa:active{background-color:rgba(6,116,102,.08);color:#067466}.m-modal .m-modal-content a.m-skype{color:#076d92}.m-modal .m-modal-content a.m-skype:hover,.m-modal .m-modal-content a.m-skype:focus,.m-modal .m-modal-content a.m-skype:active{background-color:rgba(7,109,146,.08);color:#076d92}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-default:focus,.m-modal .m-modal-content a.m-default:active,.m-modal .m-modal-content a.m-copy:hover,.m-modal .m-modal-content a.m-copy:focus,.m-modal .m-modal-content a.m-copy:active{background-color:rgba(0,0,0,.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:12px;margin-top:.8rem;padding:5px;color:#4a4a4a}.m-modal .m-modal-content a.m-by:hover,.m-modal .m-modal-content a.m-by:focus,.m-modal .m-modal-content a.m-by:active{color:#3d3d3d}.m-modal .m-modal-content .w-500{font-weight:500}.m-modal.m-dark .m-modal-content{background-color:#20232a}.m-modal.m-dark .m-modal-content,.m-modal.m-dark .m-modal-content p,.m-modal.m-dark .m-modal-content p span,.m-modal.m-dark .m-modal-content strong{color:#fff}.m-modal.m-dark .m-modal-content a{color:#eaeaea}.m-modal.m-dark .m-modal-content a:not(.m-by):hover,.m-modal.m-dark .m-modal-content a:not(.m-by):focus,.m-modal.m-dark .m-modal-content a:not(.m-by):active{background-color:rgba(134,134,134,.08);color:#eaeaea}.m-modal.m-dark .m-modal-content a.m-gmail{color:#e07d73}.m-modal.m-dark .m-modal-content a.m-gmail:hover,.m-modal.m-dark .m-modal-content a.m-gmail:focus,.m-modal.m-dark .m-modal-content a.m-gmail:active{background-color:rgba(224,125,115,.08);color:#e07d73}.m-modal.m-dark .m-modal-content a.m-outlook{color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-outlook:hover,.m-modal.m-dark .m-modal-content a.m-outlook:focus,.m-modal.m-dark .m-modal-content a.m-outlook:active{background-color:rgba(76,156,215,.08);color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-yahoo{color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-yahoo:hover,.m-modal.m-dark .m-modal-content a.m-yahoo:focus,.m-modal.m-dark .m-modal-content a.m-yahoo:active{background-color:rgba(172,136,211,.08);color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-tg{color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-tg:hover,.m-modal.m-dark .m-modal-content a.m-tg:focus,.m-modal.m-dark .m-modal-content a.m-tg:active{background-color:rgba(76,171,219,.08);color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-wa{color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-wa:hover,.m-modal.m-dark .m-modal-content a.m-wa:focus,.m-modal.m-dark .m-modal-content a.m-wa:active{background-color:rgba(76,210,192,.08);color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-skype{color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-skype:hover,.m-modal.m-dark .m-modal-content a.m-skype:focus,.m-modal.m-dark .m-modal-content a.m-skype:active{background-color:rgba(76,199,244,.08);color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-by:hover,.m-modal.m-dark .m-modal-content a.m-by:focus,.m-modal.m-dark .m-modal-content a.m-by:active{color:#fff}',""]),e.exports=a},476:function(e){"use strict";e.exports=function(e){var o=[];return o.toString=function(){return this.map((function(o){var t=e(o);return o[2]?"@media ".concat(o[2]," {").concat(t,"}"):t})).join("")},o.i=function(e,t,a){"string"==typeof e&&(e=[[null,e,""]]);var n={};if(a)for(var d=0;d()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},h=function(e){return e.every(y)},k=function(e){var o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style.position="absolute",o.style.left="-9999px",document.body.appendChild(o);var t=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);return o.select(),document.execCommand("copy"),document.body.removeChild(o),!!t&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(t),!0)},_=function(e){var o=e;o.querySelector(".m-modal-content a:last-of-type").addEventListener("keydown",w),o.querySelector(".m-modal-content a:first-of-type").addEventListener("keydown",C)},w=function(e){"Tab"===e.code&&!1===e.shiftKey&&(e.preventDefault(),e.target.closest("div").querySelector("a:first-of-type").focus())},C=function(e){"Tab"===e.code&&!0===e.shiftKey&&(e.preventDefault(),e.target.closest("div").querySelector("a:last-of-type").focus())},x=JSON.parse('["en","it","es","de","fr","pt","nl","ru","sv","no","dk","is","zh"]'),L=JSON.parse('{"en":{"open_in_":"open in ","cc_":"cc ","bcc_":"bcc ","subject_":"subject ","body_":"body ","gmail":"Gmail","outlook":"Outlook","yahoo":"Yahoo Mail","telegram":"Telegram","whatsapp":"WhatsApp","skype":"Skype","call":"call","open":"open","_default":" default","_as_default":" as default","copy":"copy","copied":"copied"},"it":{"open_in_":"apri con ","bcc_":"ccn ","subject_":"oggetto ","body_":"testo ","call":"chiama","open":"apri","_default":" ","_as_default":" ","copy":"copia","copied":"copiato"},"es":{"open_in_":"abrir con ","bcc_":"cco ","subject_":"asunto ","body_":"cuerpo ","call":"llamar","open":"abrir","_default":" predefinido","_as_default":" por defecto","copy":"copiar","copied":"copiado"},"de":{"open_in_":"Öffnen in ","subject_":"Betreff ","body_":"Nachricht ","call":"Anrufen","open":"Öffnen","_default":" mit Standard","_as_default":" mit Standard","copy":"kopieren","copied":"kopiert"},"pt":{"open_in_":"abrir com ","bcc_":"cco ","subject_":"assunto ","body_":"corpo ","call":"ligar","open":"abrir","_default":" padrão","_as_default":" por padrão","copy":"copiar","copied":"copiado"},"fr":{"open_in_":"Ouvrir dans ","bcc_":"cci ","subject_":"sujet ","body_":"contenu ","call":"Appeler","open":"Ouvrir","_default":" par défaut","_as_default":" par défaut","copy":"Copier","copied":"copié"},"nl":{"subject_":"onderwerp ","body_":"bericht ","call":"bellen","open":"openen","_default":" standaard","_as_default":" als standaard","copy":"kopiëren"},"ru":{"open_in_":"открыть в ","subject_":"тема ","body_":"тело ","call":"позвонить","open":"открыть","_default":" по умолчанию","_as_default":" по умолчанию","copy":"скопировать"},"sv":{"open_in_":"öppna i ","subject_":"ämne ","body_":"meddelandetext ","call":"ring","open":"öppna","_default":" förval","_as_default":" som förval","copy":"kopiera","copied":"kopierad"},"no":{"open_in_":"åpne i ","subject_":"emne ","call":"ringe","open":"åpne","_as_default":" som standard","copy":"kopiere","copied":"kopiert"},"dk":{"open_in_":"åpne i ","subject_":"emne ","call":"ringe op","open":"åben","_as_default":" som standard","copy":"kopi","copied":"kopieret"},"is":{"open_in_":"opið inn ","subject_":"viðfangsefni ","body_":"líkami ","call":"hringja","open":"opið","_default":" sjálfgefið","_as_default":" sem sjálfgefið","copy":"afrita","copied":"afritað"},"zh":{"open_in_":"開啟 ","cc_":"副本 ","bcc_":"密件副本 ","subject_":"主旨 ","body_":"內文 ","call":"通話","open":"開啟","_default":" 預設","_as_default":" 預設","copy":"複製","copied":"已複製"}}');function j(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,a)}return t}function E(e){for(var o=1;o"),to("detail","cc")&&z?($.style.display="block",X.innerHTML=z.split(",").join("
")):$.style.display="none",to("detail","bcc")&&M?(G.style.display="block",ee.innerHTML=M.split(",").join("
")):G.style.display="none",to("detail","subject")&&B?(Y.style.display="block",oe.textContent=B):Y.style.display="none",to("detail","body")&&H?(Q.style.display="block",te.textContent=H):Q.style.display="none",de.addEventListener("click",Ie),le.addEventListener("click",Ne),ie.addEventListener("click",Ue),me.addEventListener("click",ze),ue.addEventListener("click",Me)):o===c&&(Z.innerHTML=F,to("detail","msg")&&q?(V.style.display="block",ae.textContent=q):V.style.display="none",re.addEventListener("click",Te),J?(document.getElementById("m-tg").style.display="block",ce.addEventListener("click",Pe)):document.getElementById("m-tg").style.display="none",se.addEventListener("click",De),pe.addEventListener("click",ze),fe.addEventListener("click",Me)),qe(o),document.addEventListener("keydown",Fe),!0)}var Ie=function(e){var o,t;e.preventDefault();var a=null===(o=O)||void 0===o?void 0:o.installation;if(a===s)try{t=U.toString()}catch(e){t=P}else a===p&&(t=D);var n="https://mail.google.com/mail/?extsrc=mailto&url="+encodeURIComponent(t);window.open(n,"_blank","noopener, noreferrer"),Je()},Ne=function(e){var o;e.preventDefault();var t="https://outlook.live.com/owa/?path=/mail/action/compose&to=";null!==(o=S)&&void 0!==o&&o.office365&&(t="https://outlook.office365.com/owa/?path=/mail/action/compose&to=");var a=t+encodeURIComponent(T);B&&(a=a.concat("&subject="+encodeURIComponent(B))),H&&(a=a.concat("&body="+encodeURIComponent(H))),window.open(a,"_blank","noopener, noreferrer"),Je()},Ue=function(e){e.preventDefault();var o="https://compose.mail.yahoo.com/?to="+T;B&&(o=o.concat("&subject="+encodeURIComponent(B))),H&&(o=o.concat("&body="+encodeURIComponent(H))),window.open(o,"_blank","noopener, noreferrer"),Je()},Pe=function(e){if(e.preventDefault(),J){var o="https://t.me/"+encodeURIComponent(J);window.open(o,"_blank","noopener, noreferrer"),Je()}},De=function(e){e.preventDefault();var o="skype:"+encodeURIComponent(K||F);window.open(o,"_blank","noopener, noreferrer"),Je()},Te=function(e){e.preventDefault();var o=F.replace(g,"").replace(b,""),t="https://wa.me/"+encodeURIComponent(o);q&&(t=t.concat("?text="+encodeURIComponent(q))),window.open(t,"_blank","noopener, noreferrer"),Je()},ze=function(e){var o;e.preventDefault();var t=null===(o=O)||void 0===o?void 0:o.installation;t===s?window.location.href=P:t===p&&(window.location.href=D),Je()},Me=function(e){var o,t;(e.preventDefault(),Ke())&&((null===(o=O)||void 0===o?void 0:o.type)===m?(k(T),t=ue):(k(F),t=fe),t.textContent=R.copied||be.copied,setTimeout((function(){t.textContent=R.copy||be.copy,Je()}),999))},Be=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,t=new RegExp("^"+o+"((.)+)","gi");return t.test(e)};function He(e){var o,t,u,f=e.getAttribute("href");if(null!==(o=e.classList)&&void 0!==o&&o.contains("no-mailgo"))return null;if(f||null!==(t=e.classList)&&void 0!==t&&t.contains("mailgo")){if(Be(f,a)||Be(f,n))return{type:m,installation:s};if(Be(f,d)||Be(f,l))return{type:c,installation:s};if(Be(f,i))return{type:r,installation:s}}if("#mailgo"===f||null!==(u=e.classList)&&void 0!==u&&u.contains("mailgo")){if(e.hasAttribute("data-address")&&e.hasAttribute("data-domain"))return{type:m,installation:p};if(e.hasAttribute("data-tel"))return{type:c,installation:p};if(e.hasAttribute("data-msg"))return{type:r,installation:p}}return null}var Fe=function(e){if(Ke()){var o,t=null===(o=O)||void 0===o?void 0:o.type;if(t===m)switch(e.keyCode){case 27:return Je(),!0;case 71:return Ie(),!0;case 79:return Ne(),!0;case 89:return Ue(),!0;case 32:case 13:return ze(),!0;case 67:return Me(),!0;default:return!1}else if(t===c)switch(e.keyCode){case 27:return Je(),!0;case 84:return Pe(),!0;case 87:return Te(),!0;case 83:return De(),!0;case 32:case 13:return ze(),!0;case 67:return Me(),!0;default:return!1}}return!1},qe=function(e){Qe(e,"flex")},Je=function(){Qe(m,"none"),Qe(c,"none"),document.removeEventListener("keydown",Fe)},Ke=function(){return he&&"flex"===Ye(m)||(ke||_e)&&"flex"===Ye(c)},We=function(){var e=Ze(f);return e.href="https://mailgo.dev?ref=mailgo-modal",e.className="m-by",e.target="_blank",e.rel="noopener noreferrer",e.appendChild($e("mailgo.dev")),e},Ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div";return document.createElement(e)},$e=function(e){return document.createTextNode(e)},Ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;return e===c?N:I},Ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;return Ge(e).style.display},Qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,o=arguments.length>1?arguments[1]:void 0,t=Ge(e);t&&(t.style.display=o,"flex"===o?(ne=document.activeElement,t.setAttribute("aria-hidden","false"),t.setAttribute("tabindex","0"),t.focus(),_(t)):(t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex","-1"),ne.focus()))},Ve=function(){var e,o=null===(e=O)||void 0===e?void 0:e.type;o&&Ge(o).classList.add("m-dark")},Xe=function(){var e,o=null===(e=O)||void 0===e?void 0:e.type;o&&Ge(o).classList.remove("m-dark")},eo=function(e){for(var o=[];e;){if(o.push(e),"HTML"===e.tagName)return o.push(document),o.push(window),o;e=e.parentElement}},oo=function(e,o){if(D=e,o&&o.length>0){var t=o.join("&");D=D.concat("?"+t)}return D},to=function(e,o){if(console.log(e),console.log(o),!S)return console.log("caso 1"),!0;if("action"===e){var t,a;if(S&&(null===(t=S)||void 0===t||!t.actions))return console.log("caso 2"),!0;if(S&&S.actions&&!1===(null===(a=S)||void 0===a?void 0:a.actions[o]))return console.log("caso 3"),!1}else if("detail"===e){var n,d;if(S&&(null===(n=S)||void 0===n||!n.details))return console.log("caso 2"),!0;if(S&&S.details&&!1===(null===(d=S)||void 0===d?void 0:d.details[o]))return console.log("caso 4"),!1}return!0},ao=function(){var e,o="default lang";if(null!==(e=S)&&void 0!==e&&e.lang&&-1!==x.indexOf(S.lang))ge=S.lang,o="config lang";else{var t=document.documentElement.lang;x.forEach((function(e){new RegExp("^"+e,"gi").test(t)&&(ge=e,o="html lang")}))}return R=L[ge],o};function no(e){try{var o;if(S=E(E({},e),(null===(o=window)||void 0===o?void 0:o.mailgoConfig)||null),"undefined"!=typeof window){var t,a,n,d,l,i;if(void 0!==(null===(t=S)||void 0===t?void 0:t.loadCSS)&&(Ee=S.loadCSS),void 0!==(null===(a=S)||void 0===a?void 0:a.mailto)&&(he=S.mailto),void 0!==(null===(n=S)||void 0===n?void 0:n.tel)&&(ke=S.tel),void 0!==(null===(d=S)||void 0===d?void 0:d.sms)&&(_e=S.sms),Ee&&function(){if(!document.getElementById("mailgo-style")){var e=Ze("style");e.id="mailgo-style",e.type="text/css",e.appendChild($e(ve)),document.head.appendChild(e)}}(),null!==(l=S)&&void 0!==l&&l.initEvent)null!==(i=S)&&void 0!==i&&i.listenerOptions?document.addEventListener(S.initEvent,Ae,S.listenerOptions):document.addEventListener(S.initEvent,Ae);else Ae();return!0}}catch(e){console.log(e)}return!1}"undefined"!=typeof window&&(window.getMailgoTypeByElement=He,window.mailgoClickListener=Re,window.mailgoCheckRender=Re,window.mailgoPreRender=Se,window.mailgoDirectRender=function(e){return no(),Be(e,a)||Be(e,n)?(O={type:m,installation:s},Se(e),!0):!!(Be(e,d)||Be(e,l)||Be(e,i))&&(O={type:c,installation:s},Se(e),!0)},window.mailgoRender=Oe,window.mailgo=no);no({initEvent:"DOMContentLoaded",dark:!0})}},o={};function t(a){if(o[a])return o[a].exports;var n=o[a]={id:a,exports:{}};return e[a](n,n.exports,t),n.exports}return t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t(907)}(); //# sourceMappingURL=mailgo.dark.min.js.map \ No newline at end of file diff --git a/dist/mailgo.dark.min.js.map b/dist/mailgo.dark.min.js.map index 4ee2ecf..b0d040d 100644 --- a/dist/mailgo.dark.min.js.map +++ b/dist/mailgo.dark.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://mailgo/../src/mailgo.scss","webpack://mailgo/../node_modules/css-loader/dist/runtime/api.js","webpack://mailgo/../src/mailgo.scss?81f2","webpack://mailgo/../src/constants.ts","webpack://mailgo/../src/utils.ts","webpack://mailgo/../src/mailgo.ts","webpack://mailgo/../src/mobile-detect.ts","webpack://mailgo/./mailgo.dist.dark.ts","webpack://mailgo/webpack/bootstrap","webpack://mailgo/webpack/startup","webpack://mailgo/webpack/runtime/make namespace object"],"names":["___CSS_LOADER_EXPORT___","___CSS_LOADER_API_IMPORT___","i","push","module","id","exports","cssWithMappingToString","list","toString","this","map","item","content","concat","join","modules","mediaQuery","dedupe","alreadyImportedModules","length","_i","result","MAILTO","MAILGO","TEL","CALLTO","SMS","MAILGO_MAIL","MAILGO_TEL","MAILGO_SMS","CLASSIC","LESS_SPAM","spanHTMLTag","aHTMLTag","pHTMLTag","validateEmail","email","test","validateEmails","arr","every","copyToClipboard","str","el","document","createElement","value","setAttribute","style","position","left","body","appendChild","selected","getSelection","rangeCount","getRangeAt","select","execCommand","removeChild","removeAllRanges","addRange","setFocusLoop","ref","modal","querySelector","addEventListener","leaveLastLink","leaveFirstLink","e","code","shiftKey","preventDefault","target","closest","focus","strings","config","activeMailgoType","modalMailto","modalTel","url","href","lessSpamHref","mail","cc","bcc","subject","bodyMail","tel","msg","telegramUsername","skypeUsername","title","titleTel","detailCc","detailBcc","detailSubject","detailBody","detailMsg","ccValue","bccValue","subjectValue","bodyValue","msgValue","activatedLink","gmail","outlook","yahoo","open","telegram","wa","skype","call","copyMail","copyTel","mailgoCSS","require","lang","defaultStrings","translations","notNumber","RegExp","leadingZeros","isMobile","mailtoEnabled","telEnabled","smsEnabled","desktopEnabled","mobileEnabled","validateEmailConfig","validateTelConfig","showFooterConfig","loadCSSConfig","mailgoInit","navigator","userAgent","desktop","mobile","mailgoSetLanguage","mailgoExists","getElementById","display","classList","add","dark","enableDarkMode","disableDarkMode","modalBackground","className","modalContent","details","ccSpan","createTextNode","cc_","bccSpan","bcc_","subjectSpan","subject_","bodySpan","body_","open_in_","gmailSpan","mailgoConfigAttributeEnabled","outlookSpan","yahooSpan","openSpan","_default","copy","showFooter","byElement","hideMailgo","mailgoTelExists","detailsTel","msgSpan","telegramSpan","waSpan","whatsapp","skypeSpan","callSpan","_as_default","mailgoClickListener","event","contains","mailgoIsShowing","path","composedPath","forEach","element","HTMLDocument","Window","localMailgoType","getMailgoTypeByElement","activeMailgoModalType","type","mailgoPreRender","mailgoElementOrUrl","mailgoElement","installation","getAttribute","validateUrl","decodeURIComponent","split","trim","urlParams","URL","searchParams","get","error","console","log","encodeURIComponent","parameters","buildLessSpamHref","validateTel","hasAttribute","mailgoRender","innerHTML","textContent","openGmail","openOutlook","openYahooMail","openDefault","openWhatsApp","openTelegram","openSkype","showMailgo","mailgoKeydown","urlString","gmailUrl","window","startingOutlookUrl","office365","outlookUrl","yahooUrl","tgUrl","skypeUrl","whatappTel","replace","waUrl","location","activeCopy","copied","setTimeout","regexValidate","elementHref","keyboardEvent","keyCode","setModalDisplay","removeEventListener","getModalDisplay","by","rel","getModalHTMLElement","activeElement","remove","tagName","parentElement","joinedParams","attribute","actions","languageType","languages","htmlLang","documentElement","language","mailgo","mailgoConfig","loadCSS","mailto","sms","mailgoCSSElement","head","mailgoStyle","initEvent","listenerOptions","mailgoCheckRender","mailgoDirectRender","directUrl","__webpack_module_cache__","__webpack_require__","moduleId","__webpack_modules__","r","Symbol","toStringTag","Object","defineProperty"],"mappings":"mDACA,IACIA,EAD8B,EAAQ,IACZC,EAA4B,SAASC,GAAG,OAAOA,EAAE,MAE/EF,EAAwBG,KAAK,CAACC,EAAOC,GAAI,47KAAq8K,KAE9+KD,EAAOE,QAAUN,G,6BCEjBI,EAAOE,QAAU,SAAUC,GACzB,IAAIC,EAAO,GAuDX,OArDAA,EAAKC,SAAW,WACd,OAAOC,KAAKC,KAAI,SAAUC,GACxB,IAAIC,EAAUN,EAAuBK,GAErC,OAAIA,EAAK,GACA,UAAUE,OAAOF,EAAK,GAAI,MAAME,OAAOD,EAAS,KAGlDA,KACNE,KAAK,KAKVP,EAAKN,EAAI,SAAUc,EAASC,EAAYC,GACf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,QCjBf,OCFAmR,EAAoBG,EAAI,SAAStR,GACX,oBAAXuR,QAA0BA,OAAOC,aAC1CC,OAAOC,eAAe1R,EAASuR,OAAOC,YAAa,CAAE/O,MAAO,WAE7DgP,OAAOC,eAAe1R,EAAS,aAAc,CAAEyC,OAAO,KDFhD0O,EAAoB,K","file":"mailgo.dark.min.js","sourcesContent":["// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:16.5px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:#20232a;opacity:.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:.95;border-radius:20px;box-shadow:0 3px 20px rgba(32,35,42,.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:24px;transition:.5s box-shadow}.m-modal .m-modal-content:hover,.m-modal .m-modal-content:focus,.m-modal .m-modal-content:active{opacity:1}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2em}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{cursor:pointer;padding:10px;color:#4a4a4a;border-radius:20px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#c0372a}.m-modal .m-modal-content a.m-gmail:hover,.m-modal .m-modal-content a.m-gmail:focus,.m-modal .m-modal-content a.m-gmail:active{background-color:rgba(192,55,42,.08);color:#c0372a}.m-modal .m-modal-content a.m-outlook{color:#0967aa}.m-modal .m-modal-content a.m-outlook:hover,.m-modal .m-modal-content a.m-outlook:focus,.m-modal .m-modal-content a.m-outlook:active{background-color:rgba(9,103,170,.08);color:#0967aa}.m-modal .m-modal-content a.m-yahoo{color:#4a00a0}.m-modal .m-modal-content a.m-yahoo:hover,.m-modal .m-modal-content a.m-yahoo:focus,.m-modal .m-modal-content a.m-yahoo:active{background-color:rgba(74,0,160,.08);color:#4a00a0}.m-modal .m-modal-content a.m-tg{color:#086da0}.m-modal .m-modal-content a.m-tg:hover,.m-modal .m-modal-content a.m-tg:focus,.m-modal .m-modal-content a.m-tg:active{background-color:rgba(8,109,160,.08);color:#086da0}.m-modal .m-modal-content a.m-wa{color:#067466}.m-modal .m-modal-content a.m-wa:hover,.m-modal .m-modal-content a.m-wa:focus,.m-modal .m-modal-content a.m-wa:active{background-color:rgba(6,116,102,.08);color:#067466}.m-modal .m-modal-content a.m-skype{color:#076d92}.m-modal .m-modal-content a.m-skype:hover,.m-modal .m-modal-content a.m-skype:focus,.m-modal .m-modal-content a.m-skype:active{background-color:rgba(7,109,146,.08);color:#076d92}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-default:focus,.m-modal .m-modal-content a.m-default:active,.m-modal .m-modal-content a.m-copy:hover,.m-modal .m-modal-content a.m-copy:focus,.m-modal .m-modal-content a.m-copy:active{background-color:rgba(0,0,0,.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:12px;margin-top:.8rem;padding:5px;color:#4a4a4a}.m-modal .m-modal-content a.m-by:hover,.m-modal .m-modal-content a.m-by:focus,.m-modal .m-modal-content a.m-by:active{color:#3d3d3d}.m-modal .m-modal-content .w-500{font-weight:500}.m-modal.m-dark .m-modal-content{background-color:#20232a}.m-modal.m-dark .m-modal-content,.m-modal.m-dark .m-modal-content p,.m-modal.m-dark .m-modal-content p span,.m-modal.m-dark .m-modal-content strong{color:#fff}.m-modal.m-dark .m-modal-content a{color:#eaeaea}.m-modal.m-dark .m-modal-content a:not(.m-by):hover,.m-modal.m-dark .m-modal-content a:not(.m-by):focus,.m-modal.m-dark .m-modal-content a:not(.m-by):active{background-color:rgba(134,134,134,.08);color:#eaeaea}.m-modal.m-dark .m-modal-content a.m-gmail{color:#e07d73}.m-modal.m-dark .m-modal-content a.m-gmail:hover,.m-modal.m-dark .m-modal-content a.m-gmail:focus,.m-modal.m-dark .m-modal-content a.m-gmail:active{background-color:rgba(224,125,115,.08);color:#e07d73}.m-modal.m-dark .m-modal-content a.m-outlook{color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-outlook:hover,.m-modal.m-dark .m-modal-content a.m-outlook:focus,.m-modal.m-dark .m-modal-content a.m-outlook:active{background-color:rgba(76,156,215,.08);color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-yahoo{color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-yahoo:hover,.m-modal.m-dark .m-modal-content a.m-yahoo:focus,.m-modal.m-dark .m-modal-content a.m-yahoo:active{background-color:rgba(172,136,211,.08);color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-tg{color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-tg:hover,.m-modal.m-dark .m-modal-content a.m-tg:focus,.m-modal.m-dark .m-modal-content a.m-tg:active{background-color:rgba(76,171,219,.08);color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-wa{color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-wa:hover,.m-modal.m-dark .m-modal-content a.m-wa:focus,.m-modal.m-dark .m-modal-content a.m-wa:active{background-color:rgba(76,210,192,.08);color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-skype{color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-skype:hover,.m-modal.m-dark .m-modal-content a.m-skype:focus,.m-modal.m-dark .m-modal-content a.m-skype:active{background-color:rgba(76,199,244,.08);color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-by:hover,.m-modal.m-dark .m-modal-content a.m-by:focus,.m-modal.m-dark .m-modal-content a.m-by:active{color:#fff}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\n var result = require(\"!!../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../node_modules/sass-loader/dist/cjs.js!./mailgo.scss\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n ","import { MailgoModalType, MailgoInstallationType } from \"mailgo\";\n\n// links\nexport const MAILTO: string = \"mailto:\";\nexport const MAILGO: string = \"mailgo:\";\nexport const TEL: string = \"tel:\";\nexport const CALLTO: string = \"callto:\";\nexport const SMS: string = \"sms:\";\n\n// deep linking\nexport const outlookDeepLink: string = \"ms-outlook://\";\n\n// no mailgo class\nexport const NO_MAILGO: string = \"no-mailgo\";\n\n// responsive settings\nexport const DESKTOP: string = \"desktop\";\nexport const MOBILE: string = \"mobile\";\n\n// mailgo modal types\nexport const MAILGO_MAIL: MailgoModalType = \"mailgo\";\nexport const MAILGO_TEL: MailgoModalType = \"mailgo-tel\";\nexport const MAILGO_SMS: MailgoModalType = \"mailgo-sms\";\n\n// mailgo installation types\nexport const CLASSIC: MailgoInstallationType = \"classic\";\nexport const LESS_SPAM: MailgoInstallationType = \"less-spam\";\n\n// useful html tags\nexport const spanHTMLTag: string = \"span\";\nexport const aHTMLTag: string = \"a\";\nexport const pHTMLTag: string = \"p\";\n\n// default lang\nexport const defaultLang: string = \"en\";\n","// validate a single email with regex\nexport const validateEmail = (email: string): boolean =>\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/.test(\n email\n );\n\n// validate an array of emails\nexport const validateEmails = (arr: string[]): boolean =>\n arr.every(validateEmail);\n\n// validate a single tel with regex\nexport const validateTel = (tel: string): boolean =>\n /^[+]{0,1}[\\s0-9]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*[p]{0,1}[\\s0-9]*$/.test(\n tel\n );\n\n// copy of a string\nexport const copyToClipboard = (str: string): boolean => {\n let el: HTMLTextAreaElement = document.createElement(\n \"textarea\"\n ) as HTMLTextAreaElement;\n el.value = str;\n el.setAttribute(\"readonly\", \"\");\n el.style.position = \"absolute\";\n el.style.left = \"-9999px\";\n document.body.appendChild(el);\n let selected: Range | boolean =\n document.getSelection().rangeCount > 0\n ? document.getSelection().getRangeAt(0)\n : false;\n el.select();\n document.execCommand(\"copy\");\n document.body.removeChild(el);\n if (selected) {\n document.getSelection().removeAllRanges();\n document.getSelection().addRange(selected);\n return true;\n }\n return false;\n};\n\n// set focus loop within modal\nexport const setFocusLoop = (ref: HTMLElement): void => {\n let modal = ref;\n modal\n .querySelector(\".m-modal-content a:last-of-type\")\n .addEventListener(\"keydown\", leaveLastLink);\n modal\n .querySelector(\".m-modal-content a:first-of-type\")\n .addEventListener(\"keydown\", leaveFirstLink);\n};\n\nexport const leaveLastLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === false) {\n e.preventDefault();\n\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:first-of-type\") as HTMLElement).focus();\n }\n};\n\nexport const leaveFirstLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === true) {\n e.preventDefault();\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:last-of-type\") as HTMLElement).focus();\n }\n};\n","import {\n MailgoConfig,\n MailgoTranslations,\n MailgoTranslation,\n MailgoAction,\n MailgoLanguages,\n MailgoType,\n MailgoDetail,\n MailgoInstallationType,\n MailgoModalType,\n} from \"mailgo\";\n\n// polyfill\n// import { mailgoPolyfill } from \"./polyfill\";\n\n// constants\nimport {\n MAILTO,\n MAILGO,\n TEL,\n CALLTO,\n SMS,\n MAILGO_MAIL,\n MAILGO_TEL,\n MAILGO_SMS,\n CLASSIC,\n LESS_SPAM,\n NO_MAILGO,\n MOBILE,\n spanHTMLTag,\n aHTMLTag,\n pHTMLTag,\n defaultLang,\n} from \"./constants\";\n\n// utils\nimport {\n validateEmails,\n validateTel,\n copyToClipboard,\n setFocusLoop,\n} from \"./utils\";\n\n// i18n for mailgo\nimport languages from \"../i18n/languages.json\";\nimport translations from \"../i18n/translations.json\";\n\n// mobile detect\nimport { userAgent } from \"./mobile-detect\";\n\n// mailgo scss, with toString (https://github.com/webpack-contrib/css-loader#tostring)\nconst mailgoCSS: string = require(\"./mailgo.scss\").toString();\n\n// default language\nlet lang: string = defaultLang;\n\n// default strings\nconst defaultStrings: MailgoTranslation = (translations as MailgoTranslations)[\n defaultLang\n];\n\n// useful regexp\nconst notNumber: RegExp = new RegExp(\"[^0-9/]\", \"gi\");\nconst leadingZeros: RegExp = new RegExp(\"^0+\", \"gi\");\n\n// translation strings\nlet strings: MailgoTranslation;\n\n// global mailgo config object\nlet config: MailgoConfig;\n\n// config to check if the client is mobile or desktop\nlet isMobile: boolean = false;\n\n// default config attributes\nlet mailtoEnabled: boolean = true;\nlet telEnabled: boolean = true;\nlet smsEnabled: boolean = false;\nlet desktopEnabled: boolean = true;\nlet mobileEnabled: boolean = true;\nlet validateEmailConfig: boolean = true;\nlet validateTelConfig: boolean = true;\nlet showFooterConfig: boolean = true;\nlet loadCSSConfig: boolean = true;\n\n// activeMailgoType\nlet activeMailgoType: MailgoType;\n\n// modals global object\nlet modalMailto: HTMLElement, modalTel: HTMLElement;\n\n// mailgo general variables\nlet url: URL, href: string, lessSpamHref: string;\n\n// mailgo mail variables\nlet mail: string, cc: string, bcc: string, subject: string, bodyMail: string;\n\n// mailgo tel variables\nlet tel: string, msg: string, telegramUsername: string, skypeUsername: string;\n\n// the DOM elements\nlet title: HTMLElement,\n titleTel: HTMLElement,\n detailCc: HTMLElement,\n detailBcc: HTMLElement,\n detailSubject: HTMLElement,\n detailBody: HTMLElement,\n detailMsg: HTMLElement,\n ccValue: HTMLElement,\n bccValue: HTMLElement,\n subjectValue: HTMLElement,\n bodyValue: HTMLElement,\n msgValue: HTMLElement,\n activatedLink: HTMLElement;\n\n// mailgo buttons (actions)\nlet gmail: HTMLLinkElement,\n outlook: HTMLLinkElement,\n yahoo: HTMLLinkElement,\n open: HTMLLinkElement,\n telegram: HTMLLinkElement,\n wa: HTMLLinkElement,\n skype: HTMLLinkElement,\n call: HTMLLinkElement,\n copyMail: HTMLLinkElement,\n copyTel: HTMLLinkElement;\n\n/**\n * mailgoInit\n * the function that creates the mailgo elements in DOM\n */\nconst mailgoInit = (): void => {\n // set the boolean for mobile/desktop\n isMobile = userAgent() === MOBILE;\n\n // responsive settings\n {\n if (typeof config?.desktop !== \"undefined\") {\n desktopEnabled = config.desktop;\n // if it is a desktop and desktop is not enabled no init mailgo\n if (!isMobile && !desktopEnabled) {\n return;\n }\n }\n if (typeof config?.mobile !== \"undefined\") {\n mobileEnabled = config.mobile;\n // if it is a mobile and mobile is not enabled no init mailgo\n if (isMobile && !mobileEnabled) {\n return;\n }\n }\n }\n\n // set the mailgo language\n mailgoSetLanguage();\n\n // mailgo, if mailgo not already exists\n let mailgoExists = !!document.getElementById(MAILGO_MAIL);\n\n // if mailgo is enabled for mailto and it not exists in DOM\n if (mailtoEnabled && !mailgoExists) {\n // modal\n modalMailto = createElement() as HTMLElement;\n modalMailto.style.display = \"none\";\n modalMailto.id = MAILGO_MAIL;\n modalMailto.classList.add(\"m-modal\");\n modalMailto.setAttribute(\"role\", \"dialog\");\n modalMailto.setAttribute(\"tabindex\", \"-1\");\n modalMailto.setAttribute(\"aria-labelledby\", \"m-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalMailto.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalMailto.appendChild(modalContent);\n\n // title (email address)\n title = createElement(\"strong\");\n title.id = \"m-title\";\n title.className = \"m-title\";\n modalContent.appendChild(title);\n\n // details\n let details: HTMLElement = createElement();\n details.id = \"m-details\";\n details.className = \"m-details\";\n\n detailCc = createElement(pHTMLTag);\n detailCc.id = \"m-cc\";\n let ccSpan: HTMLElement = createElement(spanHTMLTag);\n ccSpan.className = \"w-500\";\n ccSpan.appendChild(createTextNode(strings.cc_ || defaultStrings.cc_));\n ccValue = createElement(spanHTMLTag);\n ccValue.id = \"m-cc-value\";\n detailCc.appendChild(ccSpan);\n detailCc.appendChild(ccValue);\n details.appendChild(detailCc);\n\n detailBcc = createElement(pHTMLTag);\n detailBcc.id = \"m-bcc\";\n let bccSpan: HTMLElement = createElement(spanHTMLTag);\n bccSpan.className = \"w-500\";\n bccSpan.appendChild(createTextNode(strings.bcc_ || defaultStrings.bcc_));\n bccValue = createElement(spanHTMLTag);\n bccValue.id = \"m-bcc-value\";\n detailBcc.appendChild(bccSpan);\n detailBcc.appendChild(bccValue);\n details.appendChild(detailBcc);\n\n detailSubject = createElement(pHTMLTag);\n detailSubject.id = \"m-subject\";\n let subjectSpan: HTMLElement = createElement(spanHTMLTag);\n subjectSpan.className = \"w-500\";\n subjectSpan.appendChild(\n createTextNode(strings.subject_ || defaultStrings.subject_)\n );\n subjectValue = createElement(spanHTMLTag);\n subjectValue.id = \"m-subject-value\";\n detailSubject.appendChild(subjectSpan);\n detailSubject.appendChild(subjectValue);\n details.appendChild(detailSubject);\n\n detailBody = createElement(pHTMLTag);\n detailBody.id = \"m-body\";\n let bodySpan: HTMLElement = createElement(spanHTMLTag);\n bodySpan.className = \"w-500\";\n bodySpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n bodyValue = createElement(spanHTMLTag);\n bodyValue.id = \"m-body-value\";\n detailBody.appendChild(bodySpan);\n detailBody.appendChild(bodyValue);\n details.appendChild(detailBody);\n\n modalContent.appendChild(details);\n\n // Gmail\n gmail = createElement(aHTMLTag) as HTMLLinkElement;\n gmail.id = \"m-gmail\";\n gmail.href = \"#mailgo-gmail\";\n gmail.classList.add(\"m-open\");\n gmail.classList.add(\"m-gmail\");\n gmail.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let gmailSpan: HTMLElement = createElement(spanHTMLTag);\n gmailSpan.className = \"w-500\";\n gmailSpan.appendChild(\n createTextNode(strings.gmail || defaultStrings.gmail)\n );\n gmail.appendChild(gmailSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"gmail\")) {\n modalContent.appendChild(gmail);\n }\n\n // Outlook\n outlook = createElement(aHTMLTag) as HTMLLinkElement;\n outlook.id = \"m-outlook\";\n outlook.href = \"#mailgo-outlook\";\n outlook.classList.add(\"m-open\");\n outlook.classList.add(\"m-outlook\");\n outlook.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let outlookSpan: HTMLElement = createElement(spanHTMLTag);\n outlookSpan.className = \"w-500\";\n outlookSpan.appendChild(\n createTextNode(strings.outlook || defaultStrings.outlook)\n );\n outlook.appendChild(outlookSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"outlook\")) {\n modalContent.appendChild(outlook);\n }\n\n // Outlook\n yahoo = createElement(aHTMLTag) as HTMLLinkElement;\n yahoo.id = \"m-yahoo\";\n yahoo.href = \"#mailgo-yahoo\";\n yahoo.classList.add(\"m-open\");\n yahoo.classList.add(\"m-yahoo\");\n yahoo.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let yahooSpan: HTMLElement = createElement(spanHTMLTag);\n yahooSpan.className = \"w-500\";\n yahooSpan.appendChild(\n createTextNode(strings.yahoo || defaultStrings.yahoo)\n );\n yahoo.appendChild(yahooSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"yahoo\")) {\n modalContent.appendChild(yahoo);\n }\n\n // open default\n open = createElement(aHTMLTag) as HTMLLinkElement;\n open.id = \"m-open\";\n open.href = \"#mailgo-open\";\n open.classList.add(\"m-open\");\n open.classList.add(\"m-default\");\n let openSpan: HTMLElement = createElement(spanHTMLTag);\n openSpan.className = \"w-500\";\n openSpan.appendChild(createTextNode(strings.open || defaultStrings.open));\n open.appendChild(openSpan);\n open.appendChild(\n createTextNode(strings._default || defaultStrings._default)\n );\n\n modalContent.appendChild(open);\n\n // copy\n copyMail = createElement(aHTMLTag) as HTMLLinkElement;\n copyMail.id = \"m-copy\";\n copyMail.href = \"#mailgo-copy\";\n copyMail.classList.add(\"m-copy\");\n copyMail.classList.add(\"w-500\");\n copyMail.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyMail);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalMailto);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // mailgo tel, if mailgo-tel not already exists\n let mailgoTelExists = !!document.getElementById(MAILGO_TEL);\n\n // if mailgo is enabled for tel/callto and it not exists in DOM\n if (telEnabled && !mailgoTelExists) {\n // modal\n modalTel = createElement() as HTMLElement;\n modalTel.style.display = \"none\";\n modalTel.id = MAILGO_TEL;\n modalTel.classList.add(\"m-modal\");\n modalTel.setAttribute(\"role\", \"dialog\");\n modalTel.setAttribute(\"tabindex\", \"-1\");\n modalTel.setAttribute(\"aria-labelledby\", \"m-tel-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalTel.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalTel.appendChild(modalContent);\n\n // title (telephone number)\n titleTel = createElement(\"strong\");\n titleTel.id = \"m-tel-title\";\n titleTel.className = \"m-title\";\n modalContent.appendChild(titleTel);\n\n // details\n let detailsTel: HTMLElement = createElement();\n detailsTel.id = \"m-tel-details\";\n detailsTel.className = \"m-details\";\n\n detailMsg = createElement(pHTMLTag);\n detailMsg.id = \"m-msg\";\n let msgSpan: HTMLElement = createElement(spanHTMLTag);\n msgSpan.className = \"w-500\";\n msgSpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n msgValue = createElement(spanHTMLTag);\n msgValue.id = \"m-msg-value\";\n detailMsg.appendChild(msgSpan);\n detailMsg.appendChild(msgValue);\n detailsTel.appendChild(detailMsg);\n\n modalContent.appendChild(detailsTel);\n\n // Telegram\n telegram = createElement(aHTMLTag) as HTMLLinkElement;\n telegram.id = \"m-tg\";\n telegram.href = \"#mailgo-telegram\";\n telegram.classList.add(\"m-open\");\n telegram.classList.add(\"m-tg\");\n\n // by default not display\n telegram.style.display = \"none\";\n\n telegram.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let telegramSpan: HTMLElement = createElement(spanHTMLTag);\n telegramSpan.className = \"w-500\";\n telegramSpan.appendChild(\n createTextNode(strings.telegram || defaultStrings.telegram)\n );\n telegram.appendChild(telegramSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"telegram\")) {\n modalContent.appendChild(telegram);\n }\n\n // WhatsApp\n wa = createElement(aHTMLTag) as HTMLLinkElement;\n wa.id = \"m-wa\";\n wa.href = \"#mailgo-whatsapp\";\n wa.classList.add(\"m-open\");\n wa.classList.add(\"m-wa\");\n wa.appendChild(createTextNode(strings.open_in_ || defaultStrings.open_in_));\n let waSpan: HTMLElement = createElement(spanHTMLTag);\n waSpan.className = \"w-500\";\n waSpan.appendChild(\n createTextNode(strings.whatsapp || defaultStrings.whatsapp)\n );\n wa.appendChild(waSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"whatsapp\")) {\n modalContent.appendChild(wa);\n }\n\n // Skype\n skype = createElement(aHTMLTag) as HTMLLinkElement;\n skype.id = \"m-skype\";\n skype.href = \"#mailgo-skype\";\n skype.classList.add(\"m-open\");\n skype.classList.add(\"m-skype\");\n skype.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let skypeSpan: HTMLElement = createElement(spanHTMLTag);\n skypeSpan.className = \"w-500\";\n skypeSpan.appendChild(\n createTextNode(strings.skype || defaultStrings.skype)\n );\n skype.appendChild(skypeSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"skype\")) {\n modalContent.appendChild(skype);\n }\n\n // call default\n call = createElement(aHTMLTag) as HTMLLinkElement;\n call.id = \"m-call\";\n call.href = \"#mailgo-open\";\n call.classList.add(\"m-open\");\n call.classList.add(\"m-default\");\n let callSpan: HTMLElement = createElement(spanHTMLTag);\n callSpan.className = \"w-500\";\n callSpan.appendChild(createTextNode(strings.call || defaultStrings.call));\n call.appendChild(callSpan);\n call.appendChild(\n createTextNode(strings._as_default || defaultStrings._as_default)\n );\n\n modalContent.appendChild(call);\n\n // copy\n copyTel = createElement(aHTMLTag) as HTMLLinkElement;\n copyTel.id = \"m-tel-copy\";\n copyTel.href = \"#mailgo-copy\";\n copyTel.classList.add(\"m-copy\");\n copyTel.classList.add(\"w-500\");\n copyTel.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyTel);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalTel);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // event listener on body, if the element is mailgo-compatible the mailgo modal will be rendered\n document.addEventListener(\"click\", mailgoClickListener);\n};\n\n/**\n * mailgoClickListener\n * function to check if an element is mailgo-enabled or not referencing to\n * mail:\n * document.querySelectorAll(\n * 'a[href^=\"mailto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * tel:\n * document.querySelectorAll(\n * 'a[href^=\"tel:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"callto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"sms:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n */\nfunction mailgoClickListener(event: Event): boolean {\n // check if the mailgo HTML exists in the body\n if (\n !document.body.contains(modalMailto) &&\n !document.body.contains(modalTel)\n ) {\n return false;\n }\n\n // if a mailgo is already showing do nothing\n if (mailgoIsShowing()) {\n return false;\n }\n\n // the path of the event\n let path =\n (event.composedPath && event.composedPath()) ||\n composedPath(event.target as HTMLElement);\n\n if (path) {\n path.forEach((element: HTMLElement) => {\n if (element instanceof HTMLDocument || element instanceof Window) {\n return false;\n }\n\n // go here only if one of the mailgo modals are enabled\n if (mailtoEnabled || telEnabled || smsEnabled) {\n let localMailgoType = getMailgoTypeByElement(element);\n\n // go on if the localMailgoType is not null\n if (localMailgoType) {\n // set the active mailgo type\n activeMailgoType = localMailgoType;\n\n let activeMailgoModalType = activeMailgoType?.type;\n\n if (activeMailgoModalType) {\n // check if the setting is enabled and if so go with pre-render\n if (\n (mailtoEnabled && activeMailgoModalType === MAILGO_MAIL) ||\n (telEnabled && activeMailgoModalType === MAILGO_TEL) ||\n (smsEnabled && activeMailgoModalType === MAILGO_SMS)\n ) {\n // stop the normal execution of the element click\n event.preventDefault();\n\n // render mailgo\n mailgoPreRender(element as HTMLLinkElement);\n\n return true;\n }\n }\n }\n }\n });\n }\n\n return false;\n}\n\n/**\n * mailgoPreRender\n * function to pre-render a mailgo, it helps populating elements needed by modal\n */\nfunction mailgoPreRender(\n mailgoElementOrUrl: HTMLLinkElement | string\n): boolean {\n let mailgoElement: HTMLLinkElement;\n\n // get the type and installation from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if type is not defined return\n if (!type) return false;\n\n if (typeof mailgoElementOrUrl === \"string\") {\n // if the parameter is a string it is the url\n href = mailgoElementOrUrl as string;\n } else {\n // if the paramenter is an HTMLLinkElement get the href attribute and the element\n href = mailgoElementOrUrl.getAttribute(\"href\") as string;\n mailgoElement = mailgoElementOrUrl as HTMLLinkElement;\n }\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // if the installation is classic\n if (installation === CLASSIC) {\n if (validateUrl(href, MAILTO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILTO)[1].trim());\n } else if (validateUrl(href, MAILGO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILGO)[1].trim());\n }\n\n try {\n url = new URL(href);\n\n let urlParams: URLSearchParams = url.searchParams;\n // optional parameters for the email\n cc = urlParams.get(\"cc\");\n bcc = urlParams.get(\"bcc\");\n subject = urlParams.get(\"subject\");\n bodyMail = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam\n // mail = data-address + @ + data-domain\n mail =\n mailgoElement.getAttribute(\"data-address\") &&\n mailgoElement.getAttribute(\"data-domain\")\n ? mailgoElement.getAttribute(\"data-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-domain\")\n : null;\n\n try {\n url = new URL(MAILTO + encodeURIComponent(mail));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // cc = data-cc-address + @ + data-cc-domain\n cc = mailgoElement.getAttribute(\"data-cc-address\")\n ? mailgoElement.getAttribute(\"data-cc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-cc-domain\")\n : null;\n\n // if cc is defined add it to parameters\n if (cc) parameters.push(\"cc=\" + cc);\n\n // bcc = data-bcc-address + @ + data-bcc-domain\n bcc = mailgoElement.getAttribute(\"data-bcc-address\")\n ? mailgoElement.getAttribute(\"data-bcc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-bcc-domain\")\n : null;\n\n // if bcc is defined add it to parameters\n if (bcc) parameters.push(\"bcc=\" + bcc);\n\n // subject = data-subject\n subject = mailgoElement.getAttribute(\"data-subject\");\n\n // if subject is defined add it to parameters\n if (subject) parameters.push(\"subject=\" + subject);\n\n // body = data-body\n bodyMail = mailgoElement.getAttribute(\"data-body\");\n\n // if body is defined add it to parameters\n if (bodyMail) parameters.push(\"body=\" + bodyMail);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n MAILTO + encodeURIComponent(mail),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateEmail !== \"undefined\") {\n validateEmailConfig = config.validateEmail;\n }\n\n if (validateEmailConfig) {\n // validate the email address\n if (!validateEmails(mail.split(\",\"))) {\n return false;\n }\n\n // if cc, bcc are not valid cc, bcc = \"\"\n if (cc && !validateEmails(cc.split(\",\"))) cc = \"\";\n if (bcc && !validateEmails(bcc.split(\",\"))) bcc = \"\";\n }\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n if (installation === CLASSIC) {\n if (validateUrl(href, TEL)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(TEL)[1].trim());\n } else if (validateUrl(href, CALLTO)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(CALLTO)[1].trim());\n } else if (validateUrl(href, SMS)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(SMS)[1].trim());\n }\n\n try {\n url = new URL(href);\n let urlParams: URLSearchParams = url.searchParams;\n\n // optional parameters for the phone number\n msg = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation == LESS_SPAM) {\n tel = mailgoElement.getAttribute(\"data-tel\");\n msg = mailgoElement.getAttribute(\"data-msg\");\n\n try {\n url = new URL(TEL + encodeURIComponent(tel));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // if msg is defined add it to parameters\n if (msg) parameters.push(\"body=\" + msg);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n TEL + encodeURIComponent(tel),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateTel !== \"undefined\") {\n validateTelConfig = config.validateTel;\n }\n\n // validate the phone number\n if (validateTelConfig) {\n if (!validateTel(tel)) return;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-telegram\")) {\n telegramUsername = mailgoElement.getAttribute(\"data-telegram\");\n } else {\n telegramUsername = null;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-skype\")) {\n skypeUsername = mailgoElement.getAttribute(\"data-skype\");\n } else {\n skypeUsername = null;\n }\n }\n\n // if dark is in config or contained in the element\n if (\n mailgoElement &&\n (config?.dark || mailgoElement.classList.contains(\"dark\"))\n ) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // render mailgo\n mailgoRender();\n\n return true;\n}\n\n/**\n * mailgoDirectRender\n * function to render a mailgo directly from a URL\n */\nfunction mailgoDirectRender(directUrl: string): boolean {\n // start mailgo\n mailgo();\n\n if (validateUrl(directUrl, MAILTO) || validateUrl(directUrl, MAILGO)) {\n activeMailgoType = {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n } else if (\n validateUrl(directUrl, TEL) ||\n validateUrl(directUrl, CALLTO) ||\n validateUrl(directUrl, SMS)\n ) {\n activeMailgoType = {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n }\n return false;\n}\n\n/**\n * mailgoRender\n * function to render a mailgo (mail or tel)\n */\nfunction mailgoRender(): boolean {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n\n // if type is not defined return\n if (!type) return false;\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // the title of the modal (email address)\n title.innerHTML = mail.split(\",\").join(\"
\");\n\n // add the details if provided\n if (mailgoConfigAttributeEnabled(\"detail\", \"cc\") && cc) {\n detailCc.style.display = \"block\";\n ccValue.innerHTML = cc.split(\",\").join(\"
\");\n } else {\n detailCc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"bcc\") && bcc) {\n detailBcc.style.display = \"block\";\n bccValue.innerHTML = bcc.split(\",\").join(\"
\");\n } else {\n detailBcc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"subject\") && subject) {\n detailSubject.style.display = \"block\";\n subjectValue.textContent = subject;\n } else {\n detailSubject.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"body\") && bodyMail) {\n detailBody.style.display = \"block\";\n bodyValue.textContent = bodyMail;\n } else {\n detailBody.style.display = \"none\";\n }\n\n // add the actions\n gmail.addEventListener(\"click\", openGmail);\n\n outlook.addEventListener(\"click\", openOutlook);\n\n yahoo.addEventListener(\"click\", openYahooMail);\n\n open.addEventListener(\"click\", openDefault);\n\n copyMail.addEventListener(\"click\", copy);\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n // the title of the modal (tel)\n titleTel.innerHTML = tel;\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"msg\") && msg) {\n detailMsg.style.display = \"block\";\n msgValue.textContent = msg;\n } else {\n detailMsg.style.display = \"none\";\n }\n\n // add the actions to buttons\n wa.addEventListener(\"click\", openWhatsApp);\n\n // telegram must be shown only if data-telegram is provided\n if (telegramUsername) {\n document.getElementById(\"m-tg\").style.display = \"block\";\n telegram.addEventListener(\"click\", openTelegram);\n } else {\n document.getElementById(\"m-tg\").style.display = \"none\";\n }\n\n skype.addEventListener(\"click\", openSkype);\n\n call.addEventListener(\"click\", openDefault);\n\n copyTel.addEventListener(\"click\", copy);\n }\n\n // show the mailgo\n showMailgo(type);\n\n // add listener keyDown\n document.addEventListener(\"keydown\", mailgoKeydown);\n\n return true;\n}\n\n// actions\nconst openGmail = (event?: Event): void => {\n event.preventDefault();\n\n let urlString: string;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n if (installation === CLASSIC) {\n try {\n urlString = url.toString();\n } catch (e) {\n urlString = href;\n }\n } else if (installation === LESS_SPAM) {\n urlString = lessSpamHref;\n }\n\n // Gmail url\n let gmailUrl: string =\n \"https://mail.google.com/mail/?extsrc=mailto&url=\" +\n encodeURIComponent(urlString);\n\n // open the link\n window.open(gmailUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openOutlook = (event?: Event): void => {\n event.preventDefault();\n\n // Outlook starting url\n let startingOutlookUrl: string =\n \"https://outlook.live.com/owa/?path=/mail/action/compose&to=\";\n\n // let the user to decide to open Office365 Outlook instead of the classic outlook.live.com\n if (config?.office365) {\n startingOutlookUrl =\n \"https://outlook.office365.com/owa/?path=/mail/action/compose&to=\";\n }\n\n // Outlook url\n let outlookUrl: string = startingOutlookUrl + encodeURIComponent(mail);\n\n // the details if provided\n if (subject) {\n outlookUrl = outlookUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n\n if (bodyMail) {\n outlookUrl = outlookUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(outlookUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openYahooMail = (event?: Event): void => {\n event.preventDefault();\n\n // Yahoo url\n let yahooUrl: string = \"https://compose.mail.yahoo.com/?to=\" + mail;\n\n // the details if provided\n if (subject) {\n yahooUrl = yahooUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n if (bodyMail) {\n yahooUrl = yahooUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(yahooUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openTelegram = (event?: Event): void => {\n event.preventDefault();\n\n // check if telegramUsername exists\n if (telegramUsername) {\n // Telegram url\n let tgUrl: string = \"https://t.me/\" + encodeURIComponent(telegramUsername);\n\n // open the url\n window.open(tgUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n }\n};\n\nconst openSkype = (event?: Event): void => {\n event.preventDefault();\n\n let skype: string = skypeUsername || tel;\n\n // Telegram url\n let skypeUrl: string = \"skype:\" + encodeURIComponent(skype);\n\n // open the url\n window.open(skypeUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openWhatsApp = (event?: Event): void => {\n event.preventDefault();\n\n // WhatsApp API doesn't work with non number digits and leading 0s: https://faq.whatsapp.com/general/chats/how-to-use-click-to-chat/\n let whatappTel = tel.replace(notNumber, \"\").replace(leadingZeros, \"\");\n\n // WhatsApp url\n let waUrl: string = \"https://wa.me/\" + encodeURIComponent(whatappTel);\n\n // the details if provided\n if (msg) {\n waUrl = waUrl.concat(\"?text=\" + encodeURIComponent(msg));\n }\n\n // open the url\n window.open(waUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openDefault = (event?: Event): void => {\n event.preventDefault();\n\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if the installation is classic the browser can follow the default behaviour\n if (installation === CLASSIC) {\n window.location.href = href;\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam use the built less-spam href\n window.location.href = lessSpamHref;\n }\n\n hideMailgo();\n};\n\nconst copy = (event?: Event): void => {\n event.preventDefault();\n\n // the correct copyButton (mail or tel)\n if (mailgoIsShowing()) {\n let activeCopy: HTMLElement;\n\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n // in case it is showing mail modal copy email address\n copyToClipboard(mail);\n activeCopy = copyMail;\n } else {\n // in case it is showing tel modal copy phone number\n copyToClipboard(tel);\n activeCopy = copyTel;\n }\n\n activeCopy.textContent = strings.copied || defaultStrings.copied;\n setTimeout(() => {\n activeCopy.textContent = strings.copy || defaultStrings.copy;\n // hide after the timeout\n hideMailgo();\n }, 999);\n }\n};\n\n// function to find if a link is a mailto, tel, callto or sms\nconst validateUrl = (url: string, type: string = MAILTO) => {\n let regexValidate = new RegExp(\"^\" + type + \"((.)+)\", \"gi\");\n return regexValidate.test(url);\n};\n\n// function that returns if an element is a mailgo\nfunction getMailgoTypeByElement(element: HTMLElement): MailgoType | null {\n let elementHref: string = (element as HTMLLinkElement).getAttribute(\"href\");\n\n // return null if there is no-mailgo in class\n if (element.classList?.contains(NO_MAILGO)) {\n return null;\n }\n\n // the case of classic type of mailgo, like a href=mailto:... or a href=tel:... and the class=mailgo with a useful href\n if (elementHref || element.classList?.contains(\"mailgo\")) {\n if (validateUrl(elementHref, MAILTO) || validateUrl(elementHref, MAILGO)) {\n // a mailto: or mailgo:\n return {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n } else if (\n validateUrl(elementHref, TEL) ||\n validateUrl(elementHref, CALLTO)\n ) {\n // a tel: or callto:\n return {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n } else if (validateUrl(elementHref, SMS)) {\n // a sms:\n return {\n type: MAILGO_SMS,\n installation: CLASSIC,\n };\n }\n }\n\n if (elementHref === \"#mailgo\" || element.classList?.contains(\"mailgo\")) {\n // less-spam installation of mailgo, check to the attributes\n if (\n element.hasAttribute(\"data-address\") &&\n element.hasAttribute(\"data-domain\")\n ) {\n // less-spam mailto with data-address and data-domain\n return {\n type: MAILGO_MAIL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-tel\")) {\n // less-spam tel with data-tel\n return {\n type: MAILGO_TEL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-msg\")) {\n // less-spam sms with data-msd\n return {\n type: MAILGO_SMS,\n installation: LESS_SPAM,\n };\n }\n }\n\n return null;\n}\n\n/**\n * mailgoKeydown\n * function to manage the keydown event when the modal is showing, return a boolean that represents if a useful key has been pressed\n */\nconst mailgoKeydown = (keyboardEvent: KeyboardEvent): boolean => {\n // if mailgo is showing\n if (mailgoIsShowing()) {\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 71:\n // g -> open GMail\n openGmail();\n return true;\n case 79:\n // o -> open Outlook\n openOutlook();\n return true;\n case 89:\n // y -> open Yahoo Mail\n openYahooMail();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n } else if (type === MAILGO_TEL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 84:\n // t -> open Telegram\n openTelegram();\n return true;\n case 87:\n // w -> open WhatsApp\n openWhatsApp();\n return true;\n case 83:\n // s -> open Skype\n openSkype();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n }\n }\n return false;\n};\n\n// show the modal\nconst showMailgo = (type: MailgoModalType): void => {\n // show the correct modal\n setModalDisplay(type, \"flex\");\n};\n\n// hide the modal\nconst hideMailgo = (): void => {\n // hide all the modals\n setModalDisplay(MAILGO_MAIL, \"none\");\n setModalDisplay(MAILGO_TEL, \"none\");\n\n // remove listener keyDown\n document.removeEventListener(\"keydown\", mailgoKeydown);\n};\n\n// is the mailgo modal hidden?\nconst mailgoIsShowing = (): boolean => {\n return (\n (mailtoEnabled && getModalDisplay(MAILGO_MAIL) === \"flex\") ||\n ((telEnabled || smsEnabled) && getModalDisplay(MAILGO_TEL) === \"flex\")\n );\n};\n\nconst byElement = (): HTMLLinkElement => {\n // by element in the footer\n let by: HTMLLinkElement = createElement(aHTMLTag) as HTMLLinkElement;\n by.href = \"https://mailgo.dev?ref=mailgo-modal\";\n by.className = \"m-by\";\n by.target = \"_blank\";\n by.rel = \"noopener noreferrer\";\n by.appendChild(createTextNode(\"mailgo.dev\"));\n\n return by;\n};\n\n// create element\nconst createElement = (element: string = \"div\"): HTMLElement =>\n document.createElement(element);\n\n// create text node\nconst createTextNode = (element: string): Text =>\n document.createTextNode(element);\n\n// get the correct HTMLElement from a type\nconst getModalHTMLElement = (type: MailgoModalType = MAILGO_MAIL) => {\n if (type === MAILGO_TEL) {\n return modalTel;\n } else {\n return modalMailto;\n }\n};\n\n// get display value\nconst getModalDisplay = (ref: MailgoModalType = MAILGO_MAIL): string =>\n getModalHTMLElement(ref).style.display;\n\n// set display value\nconst setModalDisplay = (\n ref: MailgoModalType = MAILGO_MAIL,\n value: string\n): void => {\n let modal = getModalHTMLElement(ref);\n\n if (modal) {\n modal.style.display = value;\n\n if (value === \"flex\") {\n // \"save\" the activated link.\n activatedLink = document.activeElement as HTMLElement;\n modal.setAttribute(\"aria-hidden\", \"false\");\n\n // Focus on the modal container.\n modal.setAttribute(\"tabindex\", \"0\");\n modal.focus();\n setFocusLoop(modal);\n } else {\n modal.setAttribute(\"aria-hidden\", \"true\");\n\n // focus back the activated link for getting back to the context.\n modal.setAttribute(\"tabindex\", \"-1\");\n activatedLink.focus();\n }\n }\n};\n\n// enable dark mode\nconst enableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.add(\"m-dark\");\n }\n};\n\n// disable dark mode\nconst disableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.remove(\"m-dark\");\n }\n};\n\n// custom composedPath if path or event.composedPath() are not defined\nconst composedPath = (\n el: HTMLElement\n): (HTMLElement | Document | (Window & typeof globalThis))[] => {\n let path = [];\n\n while (el) {\n path.push(el);\n\n if (el.tagName === \"HTML\") {\n path.push(document);\n path.push(window);\n return path;\n }\n\n el = el.parentElement;\n }\n};\n\n// function to recreate a mailto: or tel: href from less-spam\nconst buildLessSpamHref = (type: string, parameters: string[]): string => {\n lessSpamHref = type;\n if (parameters && parameters.length > 0) {\n let joinedParams = parameters.join(\"&\");\n lessSpamHref = lessSpamHref.concat(\"?\" + joinedParams);\n }\n return lessSpamHref;\n};\n\n// function to check an attribute is enabled or not, by default considering it enabled\nconst mailgoConfigAttributeEnabled = (\n type: \"action\" | \"detail\",\n attribute: MailgoAction | MailgoDetail\n): boolean => {\n // by default all the actions and attribute are enabled\n if (!config) {\n return true;\n }\n\n if (config && !config?.actions) {\n return true;\n }\n\n // if the attribute type is action consider the actions config attribute\n if (type === \"action\") {\n if (\n config &&\n config.actions &&\n config?.actions[attribute as MailgoAction] === false\n ) {\n return false;\n }\n } else if (type === \"detail\") {\n // else consider the details attribute\n if (\n config &&\n config.details &&\n config?.details[attribute as MailgoDetail] === false\n ) {\n return false;\n }\n }\n\n return true;\n};\n\n// manage the language of mailgo\nconst mailgoSetLanguage = (): string => {\n let languageType = \"default lang\";\n\n // if a language is defined in configuration use it\n if (\n config?.lang &&\n (languages as MailgoLanguages).indexOf(config.lang) !== -1\n ) {\n lang = config.lang;\n languageType = \"config lang\";\n } else {\n // else if is defined use it!\n // keep the lang from html\n let htmlLang: string = document.documentElement.lang;\n\n // find the correct language using the lang attribute, not just a === because there a are cases like fr-FR or fr_FR in html lang attribute\n (languages as MailgoLanguages).forEach((language: any) => {\n if (new RegExp(\"^\" + language, \"gi\").test(htmlLang)) {\n lang = language;\n languageType = \"html lang\";\n }\n });\n }\n\n // strings\n strings = (translations as MailgoTranslations)[lang];\n\n return languageType;\n};\n\nconst mailgoStyle = (): void => {\n if (!document.getElementById(\"mailgo-style\")) {\n // mailgo style\n let mailgoCSSElement: HTMLStyleElement = createElement(\n \"style\"\n ) as HTMLStyleElement;\n mailgoCSSElement.id = \"mailgo-style\";\n mailgoCSSElement.type = \"text/css\";\n mailgoCSSElement.appendChild(createTextNode(mailgoCSS));\n document.head.appendChild(mailgoCSSElement);\n }\n};\n\n// mailgo\nfunction mailgo(mailgoConfig?: MailgoConfig): boolean {\n try {\n // polyfill mailgo\n // mailgoPolyfill();\n\n // set the global config merging window mailgConfig and mailgoConfig passed as a parameter\n config = { ...mailgoConfig, ...((window as any)?.mailgoConfig || null) };\n\n // if the window is defined...\n if (typeof window !== \"undefined\") {\n // if is set in config use it (load the mailgo CSS)\n if (typeof config?.loadCSS !== \"undefined\") {\n loadCSSConfig = config.loadCSS;\n }\n\n // if is set in config use it (enable mailto)\n if (typeof config?.mailto !== \"undefined\") {\n mailtoEnabled = config.mailto;\n }\n\n // if is set in config use it (enable tel)\n if (typeof config?.tel !== \"undefined\") {\n telEnabled = config.tel;\n }\n\n // if is set in config use it (enable sms)\n if (typeof config?.sms !== \"undefined\") {\n smsEnabled = config.sms;\n }\n\n // if load css enabled load it!\n if (loadCSSConfig) {\n // add the style for mailgo\n mailgoStyle();\n }\n\n // if is set an initEvent add the listener\n if (config?.initEvent) {\n if (config?.listenerOptions) {\n // listener options specified\n document.addEventListener(\n config.initEvent,\n mailgoInit,\n config.listenerOptions\n );\n } else {\n // no listener options\n document.addEventListener(config.initEvent, mailgoInit);\n }\n } else {\n mailgoInit();\n }\n\n return true;\n }\n } catch (error) {\n console.log(error);\n }\n return false;\n}\n\n// define the methods also for window element\nif (typeof window !== \"undefined\") {\n (window as any).getMailgoTypeByElement = getMailgoTypeByElement;\n (window as any).mailgoClickListener = mailgoClickListener;\n (window as any).mailgoCheckRender = mailgoClickListener; // for compatibility with old version of mailgo\n (window as any).mailgoPreRender = mailgoPreRender;\n (window as any).mailgoDirectRender = mailgoDirectRender;\n (window as any).mailgoRender = mailgoRender;\n (window as any).mailgo = mailgo;\n}\n\nexport {\n getMailgoTypeByElement,\n mailgoClickListener,\n mailgoPreRender,\n mailgoDirectRender,\n mailgoRender,\n};\n\nexport default mailgo;\n","export const userAgent = () => {\n if (\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n )\n ) {\n return \"mobile\";\n }\n return \"desktop\";\n};\n","// webpack > dist/mailgo.min.js\n\nimport mailgo from \"../src/mailgo\";\n\n// call init mailgo attached to the event DOMContentLoaded\nconst mailgoConfig = {\n initEvent: \"DOMContentLoaded\",\n dark: true,\n};\n\nmailgo(mailgoConfig);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(907);\n","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://mailgo/../src/mailgo.scss","webpack://mailgo/../node_modules/css-loader/dist/runtime/api.js","webpack://mailgo/../src/mailgo.scss?81f2","webpack://mailgo/../src/constants.ts","webpack://mailgo/../src/utils.ts","webpack://mailgo/../src/mailgo.ts","webpack://mailgo/../src/mobile-detect.ts","webpack://mailgo/./mailgo.dist.dark.ts","webpack://mailgo/webpack/bootstrap","webpack://mailgo/webpack/startup","webpack://mailgo/webpack/runtime/make namespace object"],"names":["___CSS_LOADER_EXPORT___","___CSS_LOADER_API_IMPORT___","i","push","module","id","exports","cssWithMappingToString","list","toString","this","map","item","content","concat","join","modules","mediaQuery","dedupe","alreadyImportedModules","length","_i","result","MAILTO","MAILGO","TEL","CALLTO","SMS","MAILGO_MAIL","MAILGO_TEL","MAILGO_SMS","CLASSIC","LESS_SPAM","spanHTMLTag","aHTMLTag","pHTMLTag","notNumber","RegExp","leadingZeros","validateEmail","email","test","validateEmails","arr","every","copyToClipboard","str","el","document","createElement","value","setAttribute","style","position","left","body","appendChild","selected","getSelection","rangeCount","getRangeAt","select","execCommand","removeChild","removeAllRanges","addRange","setFocusLoop","ref","modal","querySelector","addEventListener","leaveLastLink","leaveFirstLink","e","code","shiftKey","preventDefault","target","closest","focus","strings","config","activeMailgoType","modalMailto","modalTel","url","href","lessSpamHref","mail","cc","bcc","subject","bodyMail","tel","msg","telegramUsername","skypeUsername","title","titleTel","detailCc","detailBcc","detailSubject","detailBody","detailMsg","ccValue","bccValue","subjectValue","bodyValue","msgValue","activatedLink","gmail","outlook","yahoo","open","telegram","wa","skype","call","copyMail","copyTel","mailgoCSS","require","lang","defaultStrings","translations","isMobile","mailtoEnabled","telEnabled","smsEnabled","desktopEnabled","mobileEnabled","validateEmailConfig","validateTelConfig","showFooterConfig","loadCSSConfig","mailgoInit","navigator","userAgent","desktop","mobile","mailgoSetLanguage","mailgoExists","getElementById","display","classList","add","dark","enableDarkMode","disableDarkMode","modalBackground","className","modalContent","details","ccSpan","createTextNode","cc_","bccSpan","bcc_","subjectSpan","subject_","bodySpan","body_","open_in_","gmailSpan","mailgoConfigAttributeEnabled","outlookSpan","yahooSpan","openSpan","_default","copy","showFooter","byElement","hideMailgo","mailgoTelExists","detailsTel","msgSpan","telegramSpan","waSpan","whatsapp","skypeSpan","callSpan","_as_default","mailgoClickListener","event","contains","mailgoIsShowing","path","composedPath","forEach","element","HTMLDocument","Window","localMailgoType","getMailgoTypeByElement","activeMailgoModalType","type","mailgoPreRender","mailgoElementOrUrl","mailgoElement","installation","getAttribute","validateUrl","decodeURIComponent","split","trim","urlParams","URL","searchParams","get","error","console","log","encodeURIComponent","parameters","buildLessSpamHref","validateTel","hasAttribute","mailgoRender","innerHTML","textContent","openGmail","openOutlook","openYahooMail","openDefault","openWhatsApp","openTelegram","openSkype","showMailgo","mailgoKeydown","urlString","gmailUrl","window","startingOutlookUrl","office365","outlookUrl","yahooUrl","tgUrl","skypeUrl","whatappTel","replace","waUrl","location","activeCopy","copied","setTimeout","regexValidate","elementHref","keyboardEvent","keyCode","setModalDisplay","removeEventListener","getModalDisplay","by","rel","getModalHTMLElement","activeElement","remove","tagName","parentElement","joinedParams","attribute","actions","languageType","languages","htmlLang","documentElement","language","mailgo","mailgoConfig","loadCSS","mailto","sms","mailgoCSSElement","head","mailgoStyle","initEvent","listenerOptions","mailgoCheckRender","mailgoDirectRender","directUrl","__webpack_module_cache__","__webpack_require__","moduleId","__webpack_modules__","r","Symbol","toStringTag","Object","defineProperty"],"mappings":"mDACA,IACIA,EAD8B,EAAQ,IACZC,EAA4B,SAASC,GAAG,OAAOA,EAAE,MAE/EF,EAAwBG,KAAK,CAACC,EAAOC,GAAI,47KAAq8K,KAE9+KD,EAAOE,QAAUN,G,6BCEjBI,EAAOE,QAAU,SAAUC,GACzB,IAAIC,EAAO,GAuDX,OArDAA,EAAKC,SAAW,WACd,OAAOC,KAAKC,KAAI,SAAUC,GACxB,IAAIC,EAAUN,EAAuBK,GAErC,OAAIA,EAAK,GACA,UAAUE,OAAOF,EAAK,GAAI,MAAME,OAAOD,EAAS,KAGlDA,KACNE,KAAK,KAKVP,EAAKN,EAAI,SAAUc,EAASC,EAAYC,GACf,iBAAZF,IAETA,EAAU,CAAC,CAAC,KAAMA,EAAS,MAG7B,IAAIG,EAAyB,GAE7B,GAAID,EACF,IAAK,IAAIhB,EAAI,EAAGA,EAAIQ,KAAKU,OAAQlB,IAAK,CAEpC,IAAIG,EAAKK,KAAKR,GAAG,GAEP,MAANG,IACFc,EAAuBd,IAAM,GAKnC,IAAK,IAAIgB,EAAK,EAAGA,EAAKL,EAAQI,OAAQC,IAAM,CAC1C,IAAIT,EAAO,GAAGE,OAAOE,EAAQK,IAEzBH,GAAUC,EAAuBP,EAAK,MAKtCK,IACGL,EAAK,GAGRA,EAAK,GAAK,GAAGE,OAAOG,EAAY,SAASH,OAAOF,EAAK,IAFrDA,EAAK,GAAKK,GAMdT,EAAKL,KAAKS,MAIPJ,I,oBC/DD,IAAIc,EAAS,EAAQ,IAGjBlB,EAAOE,QADW,iBAAXgB,EACUA,EAEAA,EAAOb,Y,wCCH7B,IAAMc,EAAiB,UACjBC,EAAiB,UACjBC,EAAc,OACdC,EAAiB,UACjBC,E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C,QAAQC,IAAIF,GAEd,OAAO,EAIa,oBAAXsB,SACRA,OAAetC,uBAAyBA,GACxCsC,OAAejD,oBAAsBA,GACrCiD,OAAe8C,kBAAoB/F,GACnCiD,OAAenC,gBAAkBA,GACjCmC,OAAe+C,mBAluBlB,SAA4BC,GAI1B,OAFAZ,KAEIlE,GAAY8E,EAAWhQ,IAAWkL,GAAY8E,EAAW/P,IAC3D0D,EAAmB,CACjBiH,KAAMvK,EACN2K,aAAcxK,GAEhBqK,GAAgBmF,IACT,MAEP9E,GAAY8E,EAAW9P,IACvBgL,GAAY8E,EAAW7P,IACvB+K,GAAY8E,EAAW5P,MAEvBuD,EAAmB,CACjBiH,KAAMtK,EACN0K,aAAcxK,GAEhBqK,GAAgBmF,IACT,IA8sBRhD,OAAed,aAAeA,GAC9Bc,OAAeoC,OAASA,IAW3B,GEvgDqB,CACnBQ,UAAW,mBACXjI,MAAM,MCNJsI,EAA2B,GAG/B,SAASC,EAAoBC,GAE5B,GAAGF,EAAyBE,GAC3B,OAAOF,EAAyBE,GAAUpR,QAG3C,IAAIF,EAASoR,EAAyBE,GAAY,CACjDrR,GAAIqR,EAEJpR,QAAS,IAOV,OAHAqR,EAAoBD,GAAUtR,EAAQA,EAAOE,QAASmR,GAG/CrR,EAAOE,QCjBf,OCFAmR,EAAoBG,EAAI,SAAStR,GACX,oBAAXuR,QAA0BA,OAAOC,aAC1CC,OAAOC,eAAe1R,EAASuR,OAAOC,YAAa,CAAE5O,MAAO,WAE7D6O,OAAOC,eAAe1R,EAAS,aAAc,CAAE4C,OAAO,KDFhDuO,EAAoB,K","file":"mailgo.dark.min.js","sourcesContent":["// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:16.5px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:#20232a;opacity:.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:.95;border-radius:20px;box-shadow:0 3px 20px rgba(32,35,42,.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:24px;transition:.5s box-shadow}.m-modal .m-modal-content:hover,.m-modal .m-modal-content:focus,.m-modal .m-modal-content:active{opacity:1}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2em}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{cursor:pointer;padding:10px;color:#4a4a4a;border-radius:20px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#c0372a}.m-modal .m-modal-content a.m-gmail:hover,.m-modal .m-modal-content a.m-gmail:focus,.m-modal .m-modal-content a.m-gmail:active{background-color:rgba(192,55,42,.08);color:#c0372a}.m-modal .m-modal-content a.m-outlook{color:#0967aa}.m-modal .m-modal-content a.m-outlook:hover,.m-modal .m-modal-content a.m-outlook:focus,.m-modal .m-modal-content a.m-outlook:active{background-color:rgba(9,103,170,.08);color:#0967aa}.m-modal .m-modal-content a.m-yahoo{color:#4a00a0}.m-modal .m-modal-content a.m-yahoo:hover,.m-modal .m-modal-content a.m-yahoo:focus,.m-modal .m-modal-content a.m-yahoo:active{background-color:rgba(74,0,160,.08);color:#4a00a0}.m-modal .m-modal-content a.m-tg{color:#086da0}.m-modal .m-modal-content a.m-tg:hover,.m-modal .m-modal-content a.m-tg:focus,.m-modal .m-modal-content a.m-tg:active{background-color:rgba(8,109,160,.08);color:#086da0}.m-modal .m-modal-content a.m-wa{color:#067466}.m-modal .m-modal-content a.m-wa:hover,.m-modal .m-modal-content a.m-wa:focus,.m-modal .m-modal-content a.m-wa:active{background-color:rgba(6,116,102,.08);color:#067466}.m-modal .m-modal-content a.m-skype{color:#076d92}.m-modal .m-modal-content a.m-skype:hover,.m-modal .m-modal-content a.m-skype:focus,.m-modal .m-modal-content a.m-skype:active{background-color:rgba(7,109,146,.08);color:#076d92}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-default:focus,.m-modal .m-modal-content a.m-default:active,.m-modal .m-modal-content a.m-copy:hover,.m-modal .m-modal-content a.m-copy:focus,.m-modal .m-modal-content a.m-copy:active{background-color:rgba(0,0,0,.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:12px;margin-top:.8rem;padding:5px;color:#4a4a4a}.m-modal .m-modal-content a.m-by:hover,.m-modal .m-modal-content a.m-by:focus,.m-modal .m-modal-content a.m-by:active{color:#3d3d3d}.m-modal .m-modal-content .w-500{font-weight:500}.m-modal.m-dark .m-modal-content{background-color:#20232a}.m-modal.m-dark .m-modal-content,.m-modal.m-dark .m-modal-content p,.m-modal.m-dark .m-modal-content p span,.m-modal.m-dark .m-modal-content strong{color:#fff}.m-modal.m-dark .m-modal-content a{color:#eaeaea}.m-modal.m-dark .m-modal-content a:not(.m-by):hover,.m-modal.m-dark .m-modal-content a:not(.m-by):focus,.m-modal.m-dark .m-modal-content a:not(.m-by):active{background-color:rgba(134,134,134,.08);color:#eaeaea}.m-modal.m-dark .m-modal-content a.m-gmail{color:#e07d73}.m-modal.m-dark .m-modal-content a.m-gmail:hover,.m-modal.m-dark .m-modal-content a.m-gmail:focus,.m-modal.m-dark .m-modal-content a.m-gmail:active{background-color:rgba(224,125,115,.08);color:#e07d73}.m-modal.m-dark .m-modal-content a.m-outlook{color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-outlook:hover,.m-modal.m-dark .m-modal-content a.m-outlook:focus,.m-modal.m-dark .m-modal-content a.m-outlook:active{background-color:rgba(76,156,215,.08);color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-yahoo{color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-yahoo:hover,.m-modal.m-dark .m-modal-content a.m-yahoo:focus,.m-modal.m-dark .m-modal-content a.m-yahoo:active{background-color:rgba(172,136,211,.08);color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-tg{color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-tg:hover,.m-modal.m-dark .m-modal-content a.m-tg:focus,.m-modal.m-dark .m-modal-content a.m-tg:active{background-color:rgba(76,171,219,.08);color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-wa{color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-wa:hover,.m-modal.m-dark .m-modal-content a.m-wa:focus,.m-modal.m-dark .m-modal-content a.m-wa:active{background-color:rgba(76,210,192,.08);color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-skype{color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-skype:hover,.m-modal.m-dark .m-modal-content a.m-skype:focus,.m-modal.m-dark .m-modal-content a.m-skype:active{background-color:rgba(76,199,244,.08);color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-by:hover,.m-modal.m-dark .m-modal-content a.m-by:focus,.m-modal.m-dark .m-modal-content a.m-by:active{color:#fff}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\n var result = require(\"!!../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../node_modules/sass-loader/dist/cjs.js!./mailgo.scss\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n ","import { MailgoModalType, MailgoInstallationType } from \"mailgo\";\n\n// links\nexport const MAILTO: string = \"mailto:\";\nexport const MAILGO: string = \"mailgo:\";\nexport const TEL: string = \"tel:\";\nexport const CALLTO: string = \"callto:\";\nexport const SMS: string = \"sms:\";\n\n// deep linking\nexport const outlookDeepLink: string = \"ms-outlook://\";\n\n// no mailgo class\nexport const NO_MAILGO: string = \"no-mailgo\";\n\n// responsive settings\nexport const DESKTOP: string = \"desktop\";\nexport const MOBILE: string = \"mobile\";\n\n// mailgo modal types\nexport const MAILGO_MAIL: MailgoModalType = \"mailgo\";\nexport const MAILGO_TEL: MailgoModalType = \"mailgo-tel\";\nexport const MAILGO_SMS: MailgoModalType = \"mailgo-sms\";\n\n// mailgo installation types\nexport const CLASSIC: MailgoInstallationType = \"classic\";\nexport const LESS_SPAM: MailgoInstallationType = \"less-spam\";\n\n// useful html tags\nexport const spanHTMLTag: string = \"span\";\nexport const aHTMLTag: string = \"a\";\nexport const pHTMLTag: string = \"p\";\n\n// default lang\nexport const defaultLang: string = \"en\";\n\n// useful regexp\nexport const notNumber: RegExp = new RegExp(\"[^0-9/]\", \"gi\");\nexport const leadingZeros: RegExp = new RegExp(\"^0+\", \"gi\");\n","// validate a single email with regex\nexport const validateEmail = (email: string): boolean =>\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/.test(\n email\n );\n\n// validate an array of emails\nexport const validateEmails = (arr: string[]): boolean =>\n arr.every(validateEmail);\n\n// validate a single tel with regex\nexport const validateTel = (tel: string): boolean =>\n /^[+]{0,1}[\\s0-9]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*[p]{0,1}[\\s0-9]*$/.test(\n tel\n );\n\n// copy of a string\nexport const copyToClipboard = (str: string): boolean => {\n let el: HTMLTextAreaElement = document.createElement(\n \"textarea\"\n ) as HTMLTextAreaElement;\n el.value = str;\n el.setAttribute(\"readonly\", \"\");\n el.style.position = \"absolute\";\n el.style.left = \"-9999px\";\n document.body.appendChild(el);\n let selected: Range | boolean =\n document.getSelection().rangeCount > 0\n ? document.getSelection().getRangeAt(0)\n : false;\n el.select();\n document.execCommand(\"copy\");\n document.body.removeChild(el);\n if (selected) {\n document.getSelection().removeAllRanges();\n document.getSelection().addRange(selected);\n return true;\n }\n return false;\n};\n\n// set focus loop within modal\nexport const setFocusLoop = (ref: HTMLElement): void => {\n let modal = ref;\n modal\n .querySelector(\".m-modal-content a:last-of-type\")\n .addEventListener(\"keydown\", leaveLastLink);\n modal\n .querySelector(\".m-modal-content a:first-of-type\")\n .addEventListener(\"keydown\", leaveFirstLink);\n};\n\nexport const leaveLastLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === false) {\n e.preventDefault();\n\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:first-of-type\") as HTMLElement).focus();\n }\n};\n\nexport const leaveFirstLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === true) {\n e.preventDefault();\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:last-of-type\") as HTMLElement).focus();\n }\n};\n","import {\n MailgoConfig,\n MailgoTranslations,\n MailgoTranslation,\n MailgoAction,\n MailgoLanguages,\n MailgoType,\n MailgoDetail,\n MailgoInstallationType,\n MailgoModalType,\n} from \"mailgo\";\n\n// polyfill\n// import { mailgoPolyfill } from \"./polyfill\";\n\n// constants\nimport {\n MAILTO,\n MAILGO,\n TEL,\n CALLTO,\n SMS,\n MAILGO_MAIL,\n MAILGO_TEL,\n MAILGO_SMS,\n CLASSIC,\n LESS_SPAM,\n NO_MAILGO,\n MOBILE,\n spanHTMLTag,\n aHTMLTag,\n pHTMLTag,\n defaultLang,\n notNumber,\n leadingZeros,\n} from \"./constants\";\n\n// utils\nimport {\n validateEmails,\n validateTel,\n copyToClipboard,\n setFocusLoop,\n} from \"./utils\";\n\n// i18n for mailgo\nimport languages from \"../i18n/languages.json\";\nimport translations from \"../i18n/translations.json\";\n\n// mobile detect\nimport { userAgent } from \"./mobile-detect\";\n\n// mailgo scss, with toString (https://github.com/webpack-contrib/css-loader#tostring)\nconst mailgoCSS: string = require(\"./mailgo.scss\").toString();\n\n// default language\nlet lang: string = defaultLang;\n\n// default strings\nconst defaultStrings: MailgoTranslation = (translations as MailgoTranslations)[\n defaultLang\n];\n\n// translation strings\nlet strings: MailgoTranslation;\n\n// global mailgo config object\nlet config: MailgoConfig;\n\n// config to check if the client is mobile or desktop\nlet isMobile: boolean = false;\n\n// default config attributes\nlet mailtoEnabled: boolean = true;\nlet telEnabled: boolean = true;\nlet smsEnabled: boolean = false;\nlet desktopEnabled: boolean = true;\nlet mobileEnabled: boolean = true;\nlet validateEmailConfig: boolean = true;\nlet validateTelConfig: boolean = true;\nlet showFooterConfig: boolean = true;\nlet loadCSSConfig: boolean = true;\n\n// activeMailgoType\nlet activeMailgoType: MailgoType;\n\n// modals global object\nlet modalMailto: HTMLElement, modalTel: HTMLElement;\n\n// mailgo general variables\nlet url: URL, href: string, lessSpamHref: string;\n\n// mailgo mail variables\nlet mail: string, cc: string, bcc: string, subject: string, bodyMail: string;\n\n// mailgo tel variables\nlet tel: string, msg: string, telegramUsername: string, skypeUsername: string;\n\n// the DOM elements\nlet title: HTMLElement,\n titleTel: HTMLElement,\n detailCc: HTMLElement,\n detailBcc: HTMLElement,\n detailSubject: HTMLElement,\n detailBody: HTMLElement,\n detailMsg: HTMLElement,\n ccValue: HTMLElement,\n bccValue: HTMLElement,\n subjectValue: HTMLElement,\n bodyValue: HTMLElement,\n msgValue: HTMLElement,\n activatedLink: HTMLElement;\n\n// mailgo buttons (actions)\nlet gmail: HTMLLinkElement,\n outlook: HTMLLinkElement,\n yahoo: HTMLLinkElement,\n open: HTMLLinkElement,\n telegram: HTMLLinkElement,\n wa: HTMLLinkElement,\n skype: HTMLLinkElement,\n call: HTMLLinkElement,\n copyMail: HTMLLinkElement,\n copyTel: HTMLLinkElement;\n\n/**\n * mailgoInit\n * the function that creates the mailgo elements in DOM\n */\nconst mailgoInit = (): void => {\n // set the boolean for mobile/desktop\n isMobile = userAgent() === MOBILE;\n\n // responsive settings\n {\n if (typeof config?.desktop !== \"undefined\") {\n desktopEnabled = config.desktop;\n // if it is a desktop and desktop is not enabled no init mailgo\n if (!isMobile && !desktopEnabled) {\n return;\n }\n }\n if (typeof config?.mobile !== \"undefined\") {\n mobileEnabled = config.mobile;\n // if it is a mobile and mobile is not enabled no init mailgo\n if (isMobile && !mobileEnabled) {\n return;\n }\n }\n }\n\n // set the mailgo language\n mailgoSetLanguage();\n\n // mailgo, if mailgo not already exists\n let mailgoExists = !!document.getElementById(MAILGO_MAIL);\n\n // if mailgo is enabled for mailto and it not exists in DOM\n if (mailtoEnabled && !mailgoExists) {\n // modal\n modalMailto = createElement() as HTMLElement;\n modalMailto.style.display = \"none\";\n modalMailto.id = MAILGO_MAIL;\n modalMailto.classList.add(\"m-modal\");\n modalMailto.setAttribute(\"role\", \"dialog\");\n modalMailto.setAttribute(\"tabindex\", \"-1\");\n modalMailto.setAttribute(\"aria-labelledby\", \"m-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalMailto.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalMailto.appendChild(modalContent);\n\n // title (email address)\n title = createElement(\"strong\");\n title.id = \"m-title\";\n title.className = \"m-title\";\n modalContent.appendChild(title);\n\n // details\n let details: HTMLElement = createElement();\n details.id = \"m-details\";\n details.className = \"m-details\";\n\n detailCc = createElement(pHTMLTag);\n detailCc.id = \"m-cc\";\n let ccSpan: HTMLElement = createElement(spanHTMLTag);\n ccSpan.className = \"w-500\";\n ccSpan.appendChild(createTextNode(strings.cc_ || defaultStrings.cc_));\n ccValue = createElement(spanHTMLTag);\n ccValue.id = \"m-cc-value\";\n detailCc.appendChild(ccSpan);\n detailCc.appendChild(ccValue);\n details.appendChild(detailCc);\n\n detailBcc = createElement(pHTMLTag);\n detailBcc.id = \"m-bcc\";\n let bccSpan: HTMLElement = createElement(spanHTMLTag);\n bccSpan.className = \"w-500\";\n bccSpan.appendChild(createTextNode(strings.bcc_ || defaultStrings.bcc_));\n bccValue = createElement(spanHTMLTag);\n bccValue.id = \"m-bcc-value\";\n detailBcc.appendChild(bccSpan);\n detailBcc.appendChild(bccValue);\n details.appendChild(detailBcc);\n\n detailSubject = createElement(pHTMLTag);\n detailSubject.id = \"m-subject\";\n let subjectSpan: HTMLElement = createElement(spanHTMLTag);\n subjectSpan.className = \"w-500\";\n subjectSpan.appendChild(\n createTextNode(strings.subject_ || defaultStrings.subject_)\n );\n subjectValue = createElement(spanHTMLTag);\n subjectValue.id = \"m-subject-value\";\n detailSubject.appendChild(subjectSpan);\n detailSubject.appendChild(subjectValue);\n details.appendChild(detailSubject);\n\n detailBody = createElement(pHTMLTag);\n detailBody.id = \"m-body\";\n let bodySpan: HTMLElement = createElement(spanHTMLTag);\n bodySpan.className = \"w-500\";\n bodySpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n bodyValue = createElement(spanHTMLTag);\n bodyValue.id = \"m-body-value\";\n detailBody.appendChild(bodySpan);\n detailBody.appendChild(bodyValue);\n details.appendChild(detailBody);\n\n modalContent.appendChild(details);\n\n // Gmail\n gmail = createElement(aHTMLTag) as HTMLLinkElement;\n gmail.id = \"m-gmail\";\n gmail.href = \"#mailgo-gmail\";\n gmail.classList.add(\"m-open\");\n gmail.classList.add(\"m-gmail\");\n gmail.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let gmailSpan: HTMLElement = createElement(spanHTMLTag);\n gmailSpan.className = \"w-500\";\n gmailSpan.appendChild(\n createTextNode(strings.gmail || defaultStrings.gmail)\n );\n gmail.appendChild(gmailSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"gmail\")) {\n modalContent.appendChild(gmail);\n }\n\n // Outlook\n outlook = createElement(aHTMLTag) as HTMLLinkElement;\n outlook.id = \"m-outlook\";\n outlook.href = \"#mailgo-outlook\";\n outlook.classList.add(\"m-open\");\n outlook.classList.add(\"m-outlook\");\n outlook.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let outlookSpan: HTMLElement = createElement(spanHTMLTag);\n outlookSpan.className = \"w-500\";\n outlookSpan.appendChild(\n createTextNode(strings.outlook || defaultStrings.outlook)\n );\n outlook.appendChild(outlookSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"outlook\")) {\n modalContent.appendChild(outlook);\n }\n\n // Outlook\n yahoo = createElement(aHTMLTag) as HTMLLinkElement;\n yahoo.id = \"m-yahoo\";\n yahoo.href = \"#mailgo-yahoo\";\n yahoo.classList.add(\"m-open\");\n yahoo.classList.add(\"m-yahoo\");\n yahoo.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let yahooSpan: HTMLElement = createElement(spanHTMLTag);\n yahooSpan.className = \"w-500\";\n yahooSpan.appendChild(\n createTextNode(strings.yahoo || defaultStrings.yahoo)\n );\n yahoo.appendChild(yahooSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"yahoo\")) {\n modalContent.appendChild(yahoo);\n }\n\n // open default\n open = createElement(aHTMLTag) as HTMLLinkElement;\n open.id = \"m-open\";\n open.href = \"#mailgo-open\";\n open.classList.add(\"m-open\");\n open.classList.add(\"m-default\");\n let openSpan: HTMLElement = createElement(spanHTMLTag);\n openSpan.className = \"w-500\";\n openSpan.appendChild(createTextNode(strings.open || defaultStrings.open));\n open.appendChild(openSpan);\n open.appendChild(\n createTextNode(strings._default || defaultStrings._default)\n );\n\n modalContent.appendChild(open);\n\n // copy\n copyMail = createElement(aHTMLTag) as HTMLLinkElement;\n copyMail.id = \"m-copy\";\n copyMail.href = \"#mailgo-copy\";\n copyMail.classList.add(\"m-copy\");\n copyMail.classList.add(\"w-500\");\n copyMail.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyMail);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalMailto);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // mailgo tel, if mailgo-tel not already exists\n let mailgoTelExists = !!document.getElementById(MAILGO_TEL);\n\n // if mailgo is enabled for tel/callto and it not exists in DOM\n if (telEnabled && !mailgoTelExists) {\n // modal\n modalTel = createElement() as HTMLElement;\n modalTel.style.display = \"none\";\n modalTel.id = MAILGO_TEL;\n modalTel.classList.add(\"m-modal\");\n modalTel.setAttribute(\"role\", \"dialog\");\n modalTel.setAttribute(\"tabindex\", \"-1\");\n modalTel.setAttribute(\"aria-labelledby\", \"m-tel-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalTel.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalTel.appendChild(modalContent);\n\n // title (telephone number)\n titleTel = createElement(\"strong\");\n titleTel.id = \"m-tel-title\";\n titleTel.className = \"m-title\";\n modalContent.appendChild(titleTel);\n\n // details\n let detailsTel: HTMLElement = createElement();\n detailsTel.id = \"m-tel-details\";\n detailsTel.className = \"m-details\";\n\n detailMsg = createElement(pHTMLTag);\n detailMsg.id = \"m-msg\";\n let msgSpan: HTMLElement = createElement(spanHTMLTag);\n msgSpan.className = \"w-500\";\n msgSpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n msgValue = createElement(spanHTMLTag);\n msgValue.id = \"m-msg-value\";\n detailMsg.appendChild(msgSpan);\n detailMsg.appendChild(msgValue);\n detailsTel.appendChild(detailMsg);\n\n modalContent.appendChild(detailsTel);\n\n // Telegram\n telegram = createElement(aHTMLTag) as HTMLLinkElement;\n telegram.id = \"m-tg\";\n telegram.href = \"#mailgo-telegram\";\n telegram.classList.add(\"m-open\");\n telegram.classList.add(\"m-tg\");\n\n // by default not display\n telegram.style.display = \"none\";\n\n telegram.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let telegramSpan: HTMLElement = createElement(spanHTMLTag);\n telegramSpan.className = \"w-500\";\n telegramSpan.appendChild(\n createTextNode(strings.telegram || defaultStrings.telegram)\n );\n telegram.appendChild(telegramSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"telegram\")) {\n modalContent.appendChild(telegram);\n }\n\n // WhatsApp\n wa = createElement(aHTMLTag) as HTMLLinkElement;\n wa.id = \"m-wa\";\n wa.href = \"#mailgo-whatsapp\";\n wa.classList.add(\"m-open\");\n wa.classList.add(\"m-wa\");\n wa.appendChild(createTextNode(strings.open_in_ || defaultStrings.open_in_));\n let waSpan: HTMLElement = createElement(spanHTMLTag);\n waSpan.className = \"w-500\";\n waSpan.appendChild(\n createTextNode(strings.whatsapp || defaultStrings.whatsapp)\n );\n wa.appendChild(waSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"whatsapp\")) {\n modalContent.appendChild(wa);\n }\n\n // Skype\n skype = createElement(aHTMLTag) as HTMLLinkElement;\n skype.id = \"m-skype\";\n skype.href = \"#mailgo-skype\";\n skype.classList.add(\"m-open\");\n skype.classList.add(\"m-skype\");\n skype.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let skypeSpan: HTMLElement = createElement(spanHTMLTag);\n skypeSpan.className = \"w-500\";\n skypeSpan.appendChild(\n createTextNode(strings.skype || defaultStrings.skype)\n );\n skype.appendChild(skypeSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"skype\")) {\n modalContent.appendChild(skype);\n }\n\n // call default\n call = createElement(aHTMLTag) as HTMLLinkElement;\n call.id = \"m-call\";\n call.href = \"#mailgo-open\";\n call.classList.add(\"m-open\");\n call.classList.add(\"m-default\");\n let callSpan: HTMLElement = createElement(spanHTMLTag);\n callSpan.className = \"w-500\";\n callSpan.appendChild(createTextNode(strings.call || defaultStrings.call));\n call.appendChild(callSpan);\n call.appendChild(\n createTextNode(strings._as_default || defaultStrings._as_default)\n );\n\n modalContent.appendChild(call);\n\n // copy\n copyTel = createElement(aHTMLTag) as HTMLLinkElement;\n copyTel.id = \"m-tel-copy\";\n copyTel.href = \"#mailgo-copy\";\n copyTel.classList.add(\"m-copy\");\n copyTel.classList.add(\"w-500\");\n copyTel.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyTel);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalTel);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // event listener on body, if the element is mailgo-compatible the mailgo modal will be rendered\n document.addEventListener(\"click\", mailgoClickListener);\n};\n\n/**\n * mailgoClickListener\n * function to check if an element is mailgo-enabled or not referencing to\n * mail:\n * document.querySelectorAll(\n * 'a[href^=\"mailto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * tel:\n * document.querySelectorAll(\n * 'a[href^=\"tel:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"callto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"sms:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n */\nfunction mailgoClickListener(event: Event): boolean {\n // check if the mailgo HTML exists in the body\n if (\n !document.body.contains(modalMailto) &&\n !document.body.contains(modalTel)\n ) {\n return false;\n }\n\n // if a mailgo is already showing do nothing\n if (mailgoIsShowing()) {\n return false;\n }\n\n // the path of the event\n let path =\n (event.composedPath && event.composedPath()) ||\n composedPath(event.target as HTMLElement);\n\n if (path) {\n path.forEach((element: HTMLElement) => {\n if (element instanceof HTMLDocument || element instanceof Window) {\n return false;\n }\n\n // go here only if one of the mailgo modals are enabled\n if (mailtoEnabled || telEnabled || smsEnabled) {\n let localMailgoType = getMailgoTypeByElement(element);\n\n // go on if the localMailgoType is not null\n if (localMailgoType) {\n // set the active mailgo type\n activeMailgoType = localMailgoType;\n\n let activeMailgoModalType = activeMailgoType?.type;\n\n if (activeMailgoModalType) {\n // check if the setting is enabled and if so go with pre-render\n if (\n (mailtoEnabled && activeMailgoModalType === MAILGO_MAIL) ||\n (telEnabled && activeMailgoModalType === MAILGO_TEL) ||\n (smsEnabled && activeMailgoModalType === MAILGO_SMS)\n ) {\n // stop the normal execution of the element click\n event.preventDefault();\n\n // render mailgo\n mailgoPreRender(element as HTMLLinkElement);\n\n return true;\n }\n }\n }\n }\n });\n }\n\n return false;\n}\n\n/**\n * mailgoPreRender\n * function to pre-render a mailgo, it helps populating elements needed by modal\n */\nfunction mailgoPreRender(\n mailgoElementOrUrl: HTMLLinkElement | string\n): boolean {\n let mailgoElement: HTMLLinkElement;\n\n // get the type and installation from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if type is not defined return\n if (!type) return false;\n\n if (typeof mailgoElementOrUrl === \"string\") {\n // if the parameter is a string it is the url\n href = mailgoElementOrUrl as string;\n } else {\n // if the paramenter is an HTMLLinkElement get the href attribute and the element\n href = mailgoElementOrUrl.getAttribute(\"href\") as string;\n mailgoElement = mailgoElementOrUrl as HTMLLinkElement;\n }\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // if the installation is classic\n if (installation === CLASSIC) {\n if (validateUrl(href, MAILTO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILTO)[1].trim());\n } else if (validateUrl(href, MAILGO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILGO)[1].trim());\n }\n\n try {\n url = new URL(href);\n\n let urlParams: URLSearchParams = url.searchParams;\n // optional parameters for the email\n cc = urlParams.get(\"cc\");\n bcc = urlParams.get(\"bcc\");\n subject = urlParams.get(\"subject\");\n bodyMail = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam\n // mail = data-address + @ + data-domain\n mail =\n mailgoElement.getAttribute(\"data-address\") &&\n mailgoElement.getAttribute(\"data-domain\")\n ? mailgoElement.getAttribute(\"data-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-domain\")\n : null;\n\n try {\n url = new URL(MAILTO + encodeURIComponent(mail));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // cc = data-cc-address + @ + data-cc-domain\n cc = mailgoElement.getAttribute(\"data-cc-address\")\n ? mailgoElement.getAttribute(\"data-cc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-cc-domain\")\n : null;\n\n // if cc is defined add it to parameters\n if (cc) parameters.push(\"cc=\" + cc);\n\n // bcc = data-bcc-address + @ + data-bcc-domain\n bcc = mailgoElement.getAttribute(\"data-bcc-address\")\n ? mailgoElement.getAttribute(\"data-bcc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-bcc-domain\")\n : null;\n\n // if bcc is defined add it to parameters\n if (bcc) parameters.push(\"bcc=\" + bcc);\n\n // subject = data-subject\n subject = mailgoElement.getAttribute(\"data-subject\");\n\n // if subject is defined add it to parameters\n if (subject) parameters.push(\"subject=\" + subject);\n\n // body = data-body\n bodyMail = mailgoElement.getAttribute(\"data-body\");\n\n // if body is defined add it to parameters\n if (bodyMail) parameters.push(\"body=\" + bodyMail);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n MAILTO + encodeURIComponent(mail),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateEmail !== \"undefined\") {\n validateEmailConfig = config.validateEmail;\n }\n\n if (validateEmailConfig) {\n // validate the email address\n if (!validateEmails(mail.split(\",\"))) {\n return false;\n }\n\n // if cc, bcc are not valid cc, bcc = \"\"\n if (cc && !validateEmails(cc.split(\",\"))) cc = \"\";\n if (bcc && !validateEmails(bcc.split(\",\"))) bcc = \"\";\n }\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n if (installation === CLASSIC) {\n if (validateUrl(href, TEL)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(TEL)[1].trim());\n } else if (validateUrl(href, CALLTO)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(CALLTO)[1].trim());\n } else if (validateUrl(href, SMS)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(SMS)[1].trim());\n }\n\n try {\n url = new URL(href);\n let urlParams: URLSearchParams = url.searchParams;\n\n // optional parameters for the phone number\n msg = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation == LESS_SPAM) {\n tel = mailgoElement.getAttribute(\"data-tel\");\n msg = mailgoElement.getAttribute(\"data-msg\");\n\n try {\n url = new URL(TEL + encodeURIComponent(tel));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // if msg is defined add it to parameters\n if (msg) parameters.push(\"body=\" + msg);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n TEL + encodeURIComponent(tel),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateTel !== \"undefined\") {\n validateTelConfig = config.validateTel;\n }\n\n // validate the phone number\n if (validateTelConfig) {\n if (!validateTel(tel)) return;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-telegram\")) {\n telegramUsername = mailgoElement.getAttribute(\"data-telegram\");\n } else {\n telegramUsername = null;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-skype\")) {\n skypeUsername = mailgoElement.getAttribute(\"data-skype\");\n } else {\n skypeUsername = null;\n }\n }\n\n // if dark is in config or contained in the element\n if (\n mailgoElement &&\n (config?.dark || mailgoElement.classList.contains(\"dark\"))\n ) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // render mailgo\n mailgoRender();\n\n return true;\n}\n\n/**\n * mailgoDirectRender\n * function to render a mailgo directly from a URL\n */\nfunction mailgoDirectRender(directUrl: string): boolean {\n // start mailgo\n mailgo();\n\n if (validateUrl(directUrl, MAILTO) || validateUrl(directUrl, MAILGO)) {\n activeMailgoType = {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n } else if (\n validateUrl(directUrl, TEL) ||\n validateUrl(directUrl, CALLTO) ||\n validateUrl(directUrl, SMS)\n ) {\n activeMailgoType = {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n }\n return false;\n}\n\n/**\n * mailgoRender\n * function to render a mailgo (mail or tel)\n */\nfunction mailgoRender(): boolean {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n\n // if type is not defined return\n if (!type) return false;\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // the title of the modal (email address)\n title.innerHTML = mail.split(\",\").join(\"
\");\n\n // add the details if provided\n if (mailgoConfigAttributeEnabled(\"detail\", \"cc\") && cc) {\n detailCc.style.display = \"block\";\n ccValue.innerHTML = cc.split(\",\").join(\"
\");\n } else {\n detailCc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"bcc\") && bcc) {\n detailBcc.style.display = \"block\";\n bccValue.innerHTML = bcc.split(\",\").join(\"
\");\n } else {\n detailBcc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"subject\") && subject) {\n detailSubject.style.display = \"block\";\n subjectValue.textContent = subject;\n } else {\n detailSubject.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"body\") && bodyMail) {\n detailBody.style.display = \"block\";\n bodyValue.textContent = bodyMail;\n } else {\n detailBody.style.display = \"none\";\n }\n\n // add the actions\n gmail.addEventListener(\"click\", openGmail);\n\n outlook.addEventListener(\"click\", openOutlook);\n\n yahoo.addEventListener(\"click\", openYahooMail);\n\n open.addEventListener(\"click\", openDefault);\n\n copyMail.addEventListener(\"click\", copy);\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n // the title of the modal (tel)\n titleTel.innerHTML = tel;\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"msg\") && msg) {\n detailMsg.style.display = \"block\";\n msgValue.textContent = msg;\n } else {\n detailMsg.style.display = \"none\";\n }\n\n // add the actions to buttons\n wa.addEventListener(\"click\", openWhatsApp);\n\n // telegram must be shown only if data-telegram is provided\n if (telegramUsername) {\n document.getElementById(\"m-tg\").style.display = \"block\";\n telegram.addEventListener(\"click\", openTelegram);\n } else {\n document.getElementById(\"m-tg\").style.display = \"none\";\n }\n\n skype.addEventListener(\"click\", openSkype);\n\n call.addEventListener(\"click\", openDefault);\n\n copyTel.addEventListener(\"click\", copy);\n }\n\n // show the mailgo\n showMailgo(type);\n\n // add listener keyDown\n document.addEventListener(\"keydown\", mailgoKeydown);\n\n return true;\n}\n\n// actions\nconst openGmail = (event?: Event): void => {\n event.preventDefault();\n\n let urlString: string;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n if (installation === CLASSIC) {\n try {\n urlString = url.toString();\n } catch (e) {\n urlString = href;\n }\n } else if (installation === LESS_SPAM) {\n urlString = lessSpamHref;\n }\n\n // Gmail url\n let gmailUrl: string =\n \"https://mail.google.com/mail/?extsrc=mailto&url=\" +\n encodeURIComponent(urlString);\n\n // open the link\n window.open(gmailUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openOutlook = (event?: Event): void => {\n event.preventDefault();\n\n // Outlook starting url\n let startingOutlookUrl: string =\n \"https://outlook.live.com/owa/?path=/mail/action/compose&to=\";\n\n // let the user to decide to open Office365 Outlook instead of the classic outlook.live.com\n if (config?.office365) {\n startingOutlookUrl =\n \"https://outlook.office365.com/owa/?path=/mail/action/compose&to=\";\n }\n\n // Outlook url\n let outlookUrl: string = startingOutlookUrl + encodeURIComponent(mail);\n\n // the details if provided\n if (subject) {\n outlookUrl = outlookUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n\n if (bodyMail) {\n outlookUrl = outlookUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(outlookUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openYahooMail = (event?: Event): void => {\n event.preventDefault();\n\n // Yahoo url\n let yahooUrl: string = \"https://compose.mail.yahoo.com/?to=\" + mail;\n\n // the details if provided\n if (subject) {\n yahooUrl = yahooUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n if (bodyMail) {\n yahooUrl = yahooUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(yahooUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openTelegram = (event?: Event): void => {\n event.preventDefault();\n\n // check if telegramUsername exists\n if (telegramUsername) {\n // Telegram url\n let tgUrl: string = \"https://t.me/\" + encodeURIComponent(telegramUsername);\n\n // open the url\n window.open(tgUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n }\n};\n\nconst openSkype = (event?: Event): void => {\n event.preventDefault();\n\n let skype: string = skypeUsername || tel;\n\n // Telegram url\n let skypeUrl: string = \"skype:\" + encodeURIComponent(skype);\n\n // open the url\n window.open(skypeUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openWhatsApp = (event?: Event): void => {\n event.preventDefault();\n\n // WhatsApp API doesn't work with non number digits and leading 0s: https://faq.whatsapp.com/general/chats/how-to-use-click-to-chat/\n let whatappTel = tel.replace(notNumber, \"\").replace(leadingZeros, \"\");\n\n // WhatsApp url\n let waUrl: string = \"https://wa.me/\" + encodeURIComponent(whatappTel);\n\n // the details if provided\n if (msg) {\n waUrl = waUrl.concat(\"?text=\" + encodeURIComponent(msg));\n }\n\n // open the url\n window.open(waUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openDefault = (event?: Event): void => {\n event.preventDefault();\n\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if the installation is classic the browser can follow the default behaviour\n if (installation === CLASSIC) {\n window.location.href = href;\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam use the built less-spam href\n window.location.href = lessSpamHref;\n }\n\n hideMailgo();\n};\n\nconst copy = (event?: Event): void => {\n event.preventDefault();\n\n // the correct copyButton (mail or tel)\n if (mailgoIsShowing()) {\n let activeCopy: HTMLElement;\n\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n // in case it is showing mail modal copy email address\n copyToClipboard(mail);\n activeCopy = copyMail;\n } else {\n // in case it is showing tel modal copy phone number\n copyToClipboard(tel);\n activeCopy = copyTel;\n }\n\n activeCopy.textContent = strings.copied || defaultStrings.copied;\n setTimeout(() => {\n activeCopy.textContent = strings.copy || defaultStrings.copy;\n // hide after the timeout\n hideMailgo();\n }, 999);\n }\n};\n\n// function to find if a link is a mailto, tel, callto or sms\nconst validateUrl = (url: string, type: string = MAILTO) => {\n let regexValidate = new RegExp(\"^\" + type + \"((.)+)\", \"gi\");\n return regexValidate.test(url);\n};\n\n// function that returns if an element is a mailgo\nfunction getMailgoTypeByElement(element: HTMLElement): MailgoType | null {\n let elementHref: string = (element as HTMLLinkElement).getAttribute(\"href\");\n\n // return null if there is no-mailgo in class\n if (element.classList?.contains(NO_MAILGO)) {\n return null;\n }\n\n // the case of classic type of mailgo, like a href=mailto:... or a href=tel:... and the class=mailgo with a useful href\n if (elementHref || element.classList?.contains(\"mailgo\")) {\n if (validateUrl(elementHref, MAILTO) || validateUrl(elementHref, MAILGO)) {\n // a mailto: or mailgo:\n return {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n } else if (\n validateUrl(elementHref, TEL) ||\n validateUrl(elementHref, CALLTO)\n ) {\n // a tel: or callto:\n return {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n } else if (validateUrl(elementHref, SMS)) {\n // a sms:\n return {\n type: MAILGO_SMS,\n installation: CLASSIC,\n };\n }\n }\n\n if (elementHref === \"#mailgo\" || element.classList?.contains(\"mailgo\")) {\n // less-spam installation of mailgo, check to the attributes\n if (\n element.hasAttribute(\"data-address\") &&\n element.hasAttribute(\"data-domain\")\n ) {\n // less-spam mailto with data-address and data-domain\n return {\n type: MAILGO_MAIL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-tel\")) {\n // less-spam tel with data-tel\n return {\n type: MAILGO_TEL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-msg\")) {\n // less-spam sms with data-msd\n return {\n type: MAILGO_SMS,\n installation: LESS_SPAM,\n };\n }\n }\n\n return null;\n}\n\n/**\n * mailgoKeydown\n * function to manage the keydown event when the modal is showing, return a boolean that represents if a useful key has been pressed\n */\nconst mailgoKeydown = (keyboardEvent: KeyboardEvent): boolean => {\n // if mailgo is showing\n if (mailgoIsShowing()) {\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 71:\n // g -> open GMail\n openGmail();\n return true;\n case 79:\n // o -> open Outlook\n openOutlook();\n return true;\n case 89:\n // y -> open Yahoo Mail\n openYahooMail();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n } else if (type === MAILGO_TEL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 84:\n // t -> open Telegram\n openTelegram();\n return true;\n case 87:\n // w -> open WhatsApp\n openWhatsApp();\n return true;\n case 83:\n // s -> open Skype\n openSkype();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n }\n }\n return false;\n};\n\n// show the modal\nconst showMailgo = (type: MailgoModalType): void => {\n // show the correct modal\n setModalDisplay(type, \"flex\");\n};\n\n// hide the modal\nconst hideMailgo = (): void => {\n // hide all the modals\n setModalDisplay(MAILGO_MAIL, \"none\");\n setModalDisplay(MAILGO_TEL, \"none\");\n\n // remove listener keyDown\n document.removeEventListener(\"keydown\", mailgoKeydown);\n};\n\n// is the mailgo modal hidden?\nconst mailgoIsShowing = (): boolean => {\n return (\n (mailtoEnabled && getModalDisplay(MAILGO_MAIL) === \"flex\") ||\n ((telEnabled || smsEnabled) && getModalDisplay(MAILGO_TEL) === \"flex\")\n );\n};\n\nconst byElement = (): HTMLLinkElement => {\n // by element in the footer\n let by: HTMLLinkElement = createElement(aHTMLTag) as HTMLLinkElement;\n by.href = \"https://mailgo.dev?ref=mailgo-modal\";\n by.className = \"m-by\";\n by.target = \"_blank\";\n by.rel = \"noopener noreferrer\";\n by.appendChild(createTextNode(\"mailgo.dev\"));\n\n return by;\n};\n\n// create element\nconst createElement = (element: string = \"div\"): HTMLElement =>\n document.createElement(element);\n\n// create text node\nconst createTextNode = (element: string): Text =>\n document.createTextNode(element);\n\n// get the correct HTMLElement from a type\nconst getModalHTMLElement = (type: MailgoModalType = MAILGO_MAIL) => {\n if (type === MAILGO_TEL) {\n return modalTel;\n } else {\n return modalMailto;\n }\n};\n\n// get display value\nconst getModalDisplay = (ref: MailgoModalType = MAILGO_MAIL): string =>\n getModalHTMLElement(ref).style.display;\n\n// set display value\nconst setModalDisplay = (\n ref: MailgoModalType = MAILGO_MAIL,\n value: string\n): void => {\n let modal = getModalHTMLElement(ref);\n\n if (modal) {\n modal.style.display = value;\n\n if (value === \"flex\") {\n // \"save\" the activated link.\n activatedLink = document.activeElement as HTMLElement;\n modal.setAttribute(\"aria-hidden\", \"false\");\n\n // Focus on the modal container.\n modal.setAttribute(\"tabindex\", \"0\");\n modal.focus();\n setFocusLoop(modal);\n } else {\n modal.setAttribute(\"aria-hidden\", \"true\");\n\n // focus back the activated link for getting back to the context.\n modal.setAttribute(\"tabindex\", \"-1\");\n activatedLink.focus();\n }\n }\n};\n\n// enable dark mode\nconst enableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.add(\"m-dark\");\n }\n};\n\n// disable dark mode\nconst disableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.remove(\"m-dark\");\n }\n};\n\n// custom composedPath if path or event.composedPath() are not defined\nconst composedPath = (\n el: HTMLElement\n): (HTMLElement | Document | (Window & typeof globalThis))[] => {\n let path = [];\n\n while (el) {\n path.push(el);\n\n if (el.tagName === \"HTML\") {\n path.push(document);\n path.push(window);\n return path;\n }\n\n el = el.parentElement;\n }\n};\n\n// function to recreate a mailto: or tel: href from less-spam\nconst buildLessSpamHref = (type: string, parameters: string[]): string => {\n lessSpamHref = type;\n if (parameters && parameters.length > 0) {\n let joinedParams = parameters.join(\"&\");\n lessSpamHref = lessSpamHref.concat(\"?\" + joinedParams);\n }\n return lessSpamHref;\n};\n\n// function to check an attribute is enabled or not, by default considering it enabled\nconst mailgoConfigAttributeEnabled = (\n type: \"action\" | \"detail\",\n attribute: MailgoAction | MailgoDetail\n): boolean => {\n console.log(type);\n console.log(attribute);\n\n // by default all the actions and attribute are enabled\n if (!config) {\n console.log(\"caso 1\");\n return true;\n }\n\n // if the attribute type is action consider the actions config attribute\n if (type === \"action\") {\n if (config && !config?.actions) {\n console.log(\"caso 2\");\n return true;\n }\n\n if (\n config &&\n config.actions &&\n config?.actions[attribute as MailgoAction] === false\n ) {\n console.log(\"caso 3\");\n return false;\n }\n } else if (type === \"detail\") {\n // else consider the details attribute\n\n if (config && !config?.details) {\n console.log(\"caso 2\");\n return true;\n }\n\n if (\n config &&\n config.details &&\n config?.details[attribute as MailgoDetail] === false\n ) {\n console.log(\"caso 4\");\n return false;\n }\n }\n\n return true;\n};\n\n// manage the language of mailgo\nconst mailgoSetLanguage = (): string => {\n let languageType = \"default lang\";\n\n // if a language is defined in configuration use it\n if (\n config?.lang &&\n (languages as MailgoLanguages).indexOf(config.lang) !== -1\n ) {\n lang = config.lang;\n languageType = \"config lang\";\n } else {\n // else if is defined use it!\n // keep the lang from html\n let htmlLang: string = document.documentElement.lang;\n\n // find the correct language using the lang attribute, not just a === because there a are cases like fr-FR or fr_FR in html lang attribute\n (languages as MailgoLanguages).forEach((language: any) => {\n if (new RegExp(\"^\" + language, \"gi\").test(htmlLang)) {\n lang = language;\n languageType = \"html lang\";\n }\n });\n }\n\n // strings\n strings = (translations as MailgoTranslations)[lang];\n\n return languageType;\n};\n\nconst mailgoStyle = (): void => {\n if (!document.getElementById(\"mailgo-style\")) {\n // mailgo style\n let mailgoCSSElement: HTMLStyleElement = createElement(\n \"style\"\n ) as HTMLStyleElement;\n mailgoCSSElement.id = \"mailgo-style\";\n mailgoCSSElement.type = \"text/css\";\n mailgoCSSElement.appendChild(createTextNode(mailgoCSS));\n document.head.appendChild(mailgoCSSElement);\n }\n};\n\n// mailgo\nfunction mailgo(mailgoConfig?: MailgoConfig): boolean {\n try {\n // polyfill mailgo\n // mailgoPolyfill();\n\n // set the global config merging window mailgConfig and mailgoConfig passed as a parameter\n config = { ...mailgoConfig, ...((window as any)?.mailgoConfig || null) };\n\n // if the window is defined...\n if (typeof window !== \"undefined\") {\n // if is set in config use it (load the mailgo CSS)\n if (typeof config?.loadCSS !== \"undefined\") {\n loadCSSConfig = config.loadCSS;\n }\n\n // if is set in config use it (enable mailto)\n if (typeof config?.mailto !== \"undefined\") {\n mailtoEnabled = config.mailto;\n }\n\n // if is set in config use it (enable tel)\n if (typeof config?.tel !== \"undefined\") {\n telEnabled = config.tel;\n }\n\n // if is set in config use it (enable sms)\n if (typeof config?.sms !== \"undefined\") {\n smsEnabled = config.sms;\n }\n\n // if load css enabled load it!\n if (loadCSSConfig) {\n // add the style for mailgo\n mailgoStyle();\n }\n\n // if is set an initEvent add the listener\n if (config?.initEvent) {\n if (config?.listenerOptions) {\n // listener options specified\n document.addEventListener(\n config.initEvent,\n mailgoInit,\n config.listenerOptions\n );\n } else {\n // no listener options\n document.addEventListener(config.initEvent, mailgoInit);\n }\n } else {\n mailgoInit();\n }\n\n return true;\n }\n } catch (error) {\n console.log(error);\n }\n return false;\n}\n\n// define the methods also for window element\nif (typeof window !== \"undefined\") {\n (window as any).getMailgoTypeByElement = getMailgoTypeByElement;\n (window as any).mailgoClickListener = mailgoClickListener;\n (window as any).mailgoCheckRender = mailgoClickListener; // for compatibility with old version of mailgo\n (window as any).mailgoPreRender = mailgoPreRender;\n (window as any).mailgoDirectRender = mailgoDirectRender;\n (window as any).mailgoRender = mailgoRender;\n (window as any).mailgo = mailgo;\n}\n\nexport {\n getMailgoTypeByElement,\n mailgoClickListener,\n mailgoPreRender,\n mailgoDirectRender,\n mailgoRender,\n};\n\nexport default mailgo;\n","export const userAgent = () => {\n if (\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n )\n ) {\n return \"mobile\";\n }\n return \"desktop\";\n};\n","// webpack > dist/mailgo.min.js\n\nimport mailgo from \"../src/mailgo\";\n\n// call init mailgo attached to the event DOMContentLoaded\nconst mailgoConfig = {\n initEvent: \"DOMContentLoaded\",\n dark: true,\n};\n\nmailgo(mailgoConfig);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(907);\n","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/mailgo.js b/dist/mailgo.js index d4e87d5..1632746 100644 --- a/dist/mailgo.js +++ b/dist/mailgo.js @@ -137,7 +137,10 @@ var spanHTMLTag = "span"; var aHTMLTag = "a"; var pHTMLTag = "p"; // default lang -var defaultLang = "en"; +var defaultLang = "en"; // useful regexp + +var notNumber = new RegExp("[^0-9/]", "gi"); +var leadingZeros = new RegExp("^0+", "gi"); ;// CONCATENATED MODULE: ../src/utils.ts // validate a single email with regex var validateEmail = function validateEmail(email) { @@ -228,10 +231,7 @@ var mailgoCSS = __webpack_require__(801).toString(); // default language var lang = defaultLang; // default strings -var defaultStrings = translations_namespaceObject[defaultLang]; // useful regexp - -var notNumber = new RegExp("[^0-9/]", "gi"); -var leadingZeros = new RegExp("^0+", "gi"); // translation strings +var defaultStrings = translations_namespaceObject[defaultLang]; // translation strings var strings; // global mailgo config object @@ -1408,29 +1408,38 @@ var buildLessSpamHref = function buildLessSpamHref(type, parameters) { var mailgoConfigAttributeEnabled = function mailgoConfigAttributeEnabled(type, attribute) { - var _config11; + console.log(type); + console.log(attribute); // by default all the actions and attribute are enabled - // by default all the actions and attribute are enabled if (!config) { - return true; - } - - if (config && !((_config11 = config) !== null && _config11 !== void 0 && _config11.actions)) { + console.log("caso 1"); return true; } // if the attribute type is action consider the actions config attribute if (type === "action") { - var _config12; + var _config11, _config12; + + if (config && !((_config11 = config) !== null && _config11 !== void 0 && _config11.actions)) { + console.log("caso 2"); + return true; + } if (config && config.actions && ((_config12 = config) === null || _config12 === void 0 ? void 0 : _config12.actions[attribute]) === false) { + console.log("caso 3"); return false; } } else if (type === "detail") { - var _config13; + var _config13, _config14; // else consider the details attribute - if (config && config.details && ((_config13 = config) === null || _config13 === void 0 ? void 0 : _config13.details[attribute]) === false) { + if (config && !((_config13 = config) !== null && _config13 !== void 0 && _config13.details)) { + console.log("caso 2"); + return true; + } + + if (config && config.details && ((_config14 = config) === null || _config14 === void 0 ? void 0 : _config14.details[attribute]) === false) { + console.log("caso 4"); return false; } } @@ -1440,11 +1449,11 @@ var mailgoConfigAttributeEnabled = function mailgoConfigAttributeEnabled(type, a var mailgoSetLanguage = function mailgoSetLanguage() { - var _config14; + var _config15; var languageType = "default lang"; // if a language is defined in configuration use it - if ((_config14 = config) !== null && _config14 !== void 0 && _config14.lang && languages_namespaceObject.indexOf(config.lang) !== -1) { + if ((_config15 = config) !== null && _config15 !== void 0 && _config15.lang && languages_namespaceObject.indexOf(config.lang) !== -1) { lang = config.lang; languageType = "config lang"; } else { @@ -1487,25 +1496,25 @@ function mailgo(mailgoConfig) { config = _objectSpread(_objectSpread({}, mailgoConfig), ((_window = window) === null || _window === void 0 ? void 0 : _window.mailgoConfig) || null); // if the window is defined... if (typeof window !== "undefined") { - var _config15, _config16, _config17, _config18, _config19; + var _config16, _config17, _config18, _config19, _config20; // if is set in config use it (load the mailgo CSS) - if (typeof ((_config15 = config) === null || _config15 === void 0 ? void 0 : _config15.loadCSS) !== "undefined") { + if (typeof ((_config16 = config) === null || _config16 === void 0 ? void 0 : _config16.loadCSS) !== "undefined") { loadCSSConfig = config.loadCSS; } // if is set in config use it (enable mailto) - if (typeof ((_config16 = config) === null || _config16 === void 0 ? void 0 : _config16.mailto) !== "undefined") { + if (typeof ((_config17 = config) === null || _config17 === void 0 ? void 0 : _config17.mailto) !== "undefined") { mailtoEnabled = config.mailto; } // if is set in config use it (enable tel) - if (typeof ((_config17 = config) === null || _config17 === void 0 ? void 0 : _config17.tel) !== "undefined") { + if (typeof ((_config18 = config) === null || _config18 === void 0 ? void 0 : _config18.tel) !== "undefined") { telEnabled = config.tel; } // if is set in config use it (enable sms) - if (typeof ((_config18 = config) === null || _config18 === void 0 ? void 0 : _config18.sms) !== "undefined") { + if (typeof ((_config19 = config) === null || _config19 === void 0 ? void 0 : _config19.sms) !== "undefined") { smsEnabled = config.sms; } // if load css enabled load it! @@ -1516,10 +1525,10 @@ function mailgo(mailgoConfig) { } // if is set an initEvent add the listener - if ((_config19 = config) !== null && _config19 !== void 0 && _config19.initEvent) { - var _config20; + if ((_config20 = config) !== null && _config20 !== void 0 && _config20.initEvent) { + var _config21; - if ((_config20 = config) !== null && _config20 !== void 0 && _config20.listenerOptions) { + if ((_config21 = config) !== null && _config21 !== void 0 && _config21.listenerOptions) { // listener options specified document.addEventListener(config.initEvent, mailgoInit, config.listenerOptions); } else { diff --git a/dist/mailgo.js.map b/dist/mailgo.js.map index ea764fd..22327db 100644 --- a/dist/mailgo.js.map +++ b/dist/mailgo.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://mailgo/../src/mailgo.scss","webpack://mailgo/../node_modules/css-loader/dist/runtime/api.js","webpack://mailgo/../src/mailgo.scss?81f2","webpack://mailgo/../src/constants.ts","webpack://mailgo/../src/utils.ts","webpack://mailgo/../src/mobile-detect.ts","webpack://mailgo/../src/mailgo.ts","webpack://mailgo/./mailgo.dist.ts","webpack://mailgo/webpack/bootstrap","webpack://mailgo/webpack/runtime/make namespace object","webpack://mailgo/webpack/startup"],"names":["MAILTO","MAILGO","TEL","CALLTO","SMS","outlookDeepLink","NO_MAILGO","DESKTOP","MOBILE","MAILGO_MAIL","MAILGO_TEL","MAILGO_SMS","CLASSIC","LESS_SPAM","spanHTMLTag","aHTMLTag","pHTMLTag","defaultLang","validateEmail","email","test","validateEmails","arr","every","validateTel","tel","copyToClipboard","str","el","document","createElement","value","setAttribute","style","position","left","body","appendChild","selected","getSelection","rangeCount","getRangeAt","select","execCommand","removeChild","removeAllRanges","addRange","setFocusLoop","ref","modal","querySelector","addEventListener","leaveLastLink","leaveFirstLink","e","code","shiftKey","preventDefault","target","closest","focus","userAgent","navigator","mailgoCSS","require","lang","defaultStrings","translations","notNumber","RegExp","leadingZeros","strings","config","isMobile","mailtoEnabled","telEnabled","smsEnabled","desktopEnabled","mobileEnabled","validateEmailConfig","validateTelConfig","showFooterConfig","loadCSSConfig","activeMailgoType","modalMailto","modalTel","url","href","lessSpamHref","mail","cc","bcc","subject","bodyMail","msg","telegramUsername","skypeUsername","title","titleTel","detailCc","detailBcc","detailSubject","detailBody","detailMsg","ccValue","bccValue","subjectValue","bodyValue","msgValue","activatedLink","gmail","outlook","yahoo","open","telegram","wa","skype","call","copyMail","copyTel","mailgoInit","desktop","mobile","mailgoSetLanguage","mailgoExists","getElementById","display","id","classList","add","dark","enableDarkMode","disableDarkMode","modalBackground","className","modalContent","details","ccSpan","createTextNode","cc_","bccSpan","bcc_","subjectSpan","subject_","bodySpan","body_","open_in_","gmailSpan","mailgoConfigAttributeEnabled","outlookSpan","yahooSpan","openSpan","_default","copy","showFooter","byElement","hideMailgo","mailgoTelExists","detailsTel","msgSpan","telegramSpan","waSpan","whatsapp","skypeSpan","callSpan","_as_default","mailgoClickListener","event","contains","mailgoIsShowing","path","composedPath","forEach","element","HTMLDocument","Window","localMailgoType","getMailgoTypeByElement","activeMailgoModalType","type","mailgoPreRender","mailgoElementOrUrl","mailgoElement","installation","getAttribute","validateUrl","decodeURIComponent","split","trim","URL","urlParams","searchParams","get","error","console","log","encodeURIComponent","parameters","push","buildLessSpamHref","hasAttribute","mailgoRender","mailgoDirectRender","directUrl","mailgo","innerHTML","join","textContent","openGmail","openOutlook","openYahooMail","openDefault","openWhatsApp","openTelegram","openSkype","showMailgo","mailgoKeydown","urlString","toString","gmailUrl","window","startingOutlookUrl","office365","outlookUrl","concat","yahooUrl","tgUrl","skypeUrl","whatappTel","replace","waUrl","location","activeCopy","copied","setTimeout","regexValidate","elementHref","keyboardEvent","keyCode","setModalDisplay","removeEventListener","getModalDisplay","by","rel","getModalHTMLElement","activeElement","remove","tagName","parentElement","length","joinedParams","attribute","actions","languageType","languages","htmlLang","documentElement","language","mailg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O,CAACC,GAAR,CAAYF,KAAZ;AACD;;AACD,SAAO,KAAP;AACD,C,CAED;;;AACA,IAAI,OAAO2B,MAAP,KAAkB,WAAtB,EAAmC;AAChCA,QAAD,CAAgB3C,sBAAhB,GAAyCA,sBAAzC;AACC2C,QAAD,CAAgBtD,mBAAhB,GAAsCA,mBAAtC;AACCsD,QAAD,CAAgB+C,iBAAhB,GAAoCrG,mBAApC,CAHiC,CAGwB;;AACxDsD,QAAD,CAAgBxC,eAAhB,GAAkCA,eAAlC;AACCwC,QAAD,CAAgBlB,kBAAhB,GAAqCA,kBAArC;AACCkB,QAAD,CAAgBnB,YAAhB,GAA+BA,YAA/B;AACCmB,QAAD,CAAgBhB,MAAhB,GAAyBA,MAAzB;AACD;;AAED;AAQA,+CAAeA,MAAf,E;;ACjgDA;;AAEmC;;AAEnC;AACA;AACA;AACA;;AAEA,UAAM;;;;;;;UCTN;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCrBA;WACA;WACA;WACA,sDAAsD,kBAAkB;WACxE;WACA,+CAA+C,cAAc;WAC7D,E;;;;UCNA;UACA;UACA;UACA","file":"mailgo.js","sourcesContent":["// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:16.5px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:#20232a;opacity:.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:.95;border-radius:20px;box-shadow:0 3px 20px rgba(32,35,42,.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:24px;transition:.5s box-shadow}.m-modal .m-modal-content:hover,.m-modal .m-modal-content:focus,.m-modal .m-modal-content:active{opacity:1}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2em}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{cursor:pointer;padding:10px;color:#4a4a4a;border-radius:20px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#c0372a}.m-modal .m-modal-content a.m-gmail:hover,.m-modal .m-modal-content a.m-gmail:focus,.m-modal .m-modal-content a.m-gmail:active{background-color:rgba(192,55,42,.08);color:#c0372a}.m-modal .m-modal-content a.m-outlook{color:#0967aa}.m-modal .m-modal-content a.m-outlook:hover,.m-modal .m-modal-content a.m-outlook:focus,.m-modal .m-modal-content a.m-outlook:active{background-color:rgba(9,103,170,.08);color:#0967aa}.m-modal .m-modal-content a.m-yahoo{color:#4a00a0}.m-modal .m-modal-content a.m-yahoo:hover,.m-modal .m-modal-content a.m-yahoo:focus,.m-modal .m-modal-content a.m-yahoo:active{background-color:rgba(74,0,160,.08);color:#4a00a0}.m-modal .m-modal-content a.m-tg{color:#086da0}.m-modal .m-modal-content a.m-tg:hover,.m-modal .m-modal-content a.m-tg:focus,.m-modal .m-modal-content a.m-tg:active{background-color:rgba(8,109,160,.08);color:#086da0}.m-modal .m-modal-content a.m-wa{color:#067466}.m-modal .m-modal-content a.m-wa:hover,.m-modal .m-modal-content a.m-wa:focus,.m-modal .m-modal-content a.m-wa:active{background-color:rgba(6,116,102,.08);color:#067466}.m-modal .m-modal-content a.m-skype{color:#076d92}.m-modal .m-modal-content a.m-skype:hover,.m-modal .m-modal-content a.m-skype:focus,.m-modal .m-modal-content a.m-skype:active{background-color:rgba(7,109,146,.08);color:#076d92}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-default:focus,.m-modal .m-modal-content a.m-default:active,.m-modal .m-modal-content a.m-copy:hover,.m-modal .m-modal-content a.m-copy:focus,.m-modal .m-modal-content a.m-copy:active{background-color:rgba(0,0,0,.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:12px;margin-top:.8rem;padding:5px;color:#4a4a4a}.m-modal .m-modal-content a.m-by:hover,.m-modal .m-modal-content a.m-by:focus,.m-modal .m-modal-content a.m-by:active{color:#3d3d3d}.m-modal .m-modal-content .w-500{font-weight:500}.m-modal.m-dark .m-modal-content{background-color:#20232a}.m-modal.m-dark .m-modal-content,.m-modal.m-dark .m-modal-content p,.m-modal.m-dark .m-modal-content p span,.m-modal.m-dark .m-modal-content strong{color:#fff}.m-modal.m-dark .m-modal-content a{color:#eaeaea}.m-modal.m-dark .m-modal-content a:not(.m-by):hover,.m-modal.m-dark .m-modal-content a:not(.m-by):focus,.m-modal.m-dark .m-modal-content a:not(.m-by):active{background-color:rgba(134,134,134,.08);color:#eaeaea}.m-modal.m-dark .m-modal-content a.m-gmail{color:#e07d73}.m-modal.m-dark .m-modal-content a.m-gmail:hover,.m-modal.m-dark .m-modal-content a.m-gmail:focus,.m-modal.m-dark .m-modal-content a.m-gmail:active{background-color:rgba(224,125,115,.08);color:#e07d73}.m-modal.m-dark .m-modal-content a.m-outlook{color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-outlook:hover,.m-modal.m-dark .m-modal-content a.m-outlook:focus,.m-modal.m-dark .m-modal-content a.m-outlook:active{background-color:rgba(76,156,215,.08);color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-yahoo{color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-yahoo:hover,.m-modal.m-dark .m-modal-content a.m-yahoo:focus,.m-modal.m-dark .m-modal-content a.m-yahoo:active{background-color:rgba(172,136,211,.08);color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-tg{color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-tg:hover,.m-modal.m-dark .m-modal-content a.m-tg:focus,.m-modal.m-dark .m-modal-content a.m-tg:active{background-color:rgba(76,171,219,.08);color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-wa{color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-wa:hover,.m-modal.m-dark .m-modal-content a.m-wa:focus,.m-modal.m-dark .m-modal-content a.m-wa:active{background-color:rgba(76,210,192,.08);color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-skype{color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-skype:hover,.m-modal.m-dark .m-modal-content a.m-skype:focus,.m-modal.m-dark .m-modal-content a.m-skype:active{background-color:rgba(76,199,244,.08);color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-by:hover,.m-modal.m-dark .m-modal-content a.m-by:focus,.m-modal.m-dark .m-modal-content a.m-by:active{color:#fff}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\n var result = require(\"!!../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../node_modules/sass-loader/dist/cjs.js!./mailgo.scss\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n ","import { MailgoModalType, MailgoInstallationType } from \"mailgo\";\n\n// links\nexport const MAILTO: string = \"mailto:\";\nexport const MAILGO: string = \"mailgo:\";\nexport const TEL: string = \"tel:\";\nexport const CALLTO: string = \"callto:\";\nexport const SMS: string = \"sms:\";\n\n// deep linking\nexport const outlookDeepLink: string = \"ms-outlook://\";\n\n// no mailgo class\nexport const NO_MAILGO: string = \"no-mailgo\";\n\n// responsive settings\nexport const DESKTOP: string = \"desktop\";\nexport const MOBILE: string = \"mobile\";\n\n// mailgo modal types\nexport const MAILGO_MAIL: MailgoModalType = \"mailgo\";\nexport const MAILGO_TEL: MailgoModalType = \"mailgo-tel\";\nexport const MAILGO_SMS: MailgoModalType = \"mailgo-sms\";\n\n// mailgo installation types\nexport const CLASSIC: MailgoInstallationType = \"classic\";\nexport const LESS_SPAM: MailgoInstallationType = \"less-spam\";\n\n// useful html tags\nexport const spanHTMLTag: string = \"span\";\nexport const aHTMLTag: string = \"a\";\nexport const pHTMLTag: string = \"p\";\n\n// default lang\nexport const defaultLang: string = \"en\";\n","// validate a single email with regex\nexport const validateEmail = (email: string): boolean =>\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/.test(\n email\n );\n\n// validate an array of emails\nexport const validateEmails = (arr: string[]): boolean =>\n arr.every(validateEmail);\n\n// validate a single tel with regex\nexport const validateTel = (tel: string): boolean =>\n /^[+]{0,1}[\\s0-9]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*[p]{0,1}[\\s0-9]*$/.test(\n tel\n );\n\n// copy of a string\nexport const copyToClipboard = (str: string): boolean => {\n let el: HTMLTextAreaElement = document.createElement(\n \"textarea\"\n ) as HTMLTextAreaElement;\n el.value = str;\n el.setAttribute(\"readonly\", \"\");\n el.style.position = \"absolute\";\n el.style.left = \"-9999px\";\n document.body.appendChild(el);\n let selected: Range | boolean =\n document.getSelection().rangeCount > 0\n ? document.getSelection().getRangeAt(0)\n : false;\n el.select();\n document.execCommand(\"copy\");\n document.body.removeChild(el);\n if (selected) {\n document.getSelection().removeAllRanges();\n document.getSelection().addRange(selected);\n return true;\n }\n return false;\n};\n\n// set focus loop within modal\nexport const setFocusLoop = (ref: HTMLElement): void => {\n let modal = ref;\n modal\n .querySelector(\".m-modal-content a:last-of-type\")\n .addEventListener(\"keydown\", leaveLastLink);\n modal\n .querySelector(\".m-modal-content a:first-of-type\")\n .addEventListener(\"keydown\", leaveFirstLink);\n};\n\nexport const leaveLastLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === false) {\n e.preventDefault();\n\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:first-of-type\") as HTMLElement).focus();\n }\n};\n\nexport const leaveFirstLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === true) {\n e.preventDefault();\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:last-of-type\") as HTMLElement).focus();\n }\n};\n","export const userAgent = () => {\n if (\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n )\n ) {\n return \"mobile\";\n }\n return \"desktop\";\n};\n","import {\n MailgoConfig,\n MailgoTranslations,\n MailgoTranslation,\n MailgoAction,\n MailgoLanguages,\n MailgoType,\n MailgoDetail,\n MailgoInstallationType,\n MailgoModalType,\n} from \"mailgo\";\n\n// polyfill\n// import { mailgoPolyfill } from \"./polyfill\";\n\n// constants\nimport {\n MAILTO,\n MAILGO,\n TEL,\n CALLTO,\n SMS,\n MAILGO_MAIL,\n MAILGO_TEL,\n MAILGO_SMS,\n CLASSIC,\n LESS_SPAM,\n NO_MAILGO,\n MOBILE,\n spanHTMLTag,\n aHTMLTag,\n pHTMLTag,\n defaultLang,\n} from \"./constants\";\n\n// utils\nimport {\n validateEmails,\n validateTel,\n copyToClipboard,\n setFocusLoop,\n} from \"./utils\";\n\n// i18n for mailgo\nimport languages from \"../i18n/languages.json\";\nimport translations from \"../i18n/translations.json\";\n\n// mobile detect\nimport { userAgent } from \"./mobile-detect\";\n\n// mailgo scss, with toString (https://github.com/webpack-contrib/css-loader#tostring)\nconst mailgoCSS: string = require(\"./mailgo.scss\").toString();\n\n// default language\nlet lang: string = defaultLang;\n\n// default strings\nconst defaultStrings: MailgoTranslation = (translations as MailgoTranslations)[\n defaultLang\n];\n\n// useful regexp\nconst notNumber: RegExp = new RegExp(\"[^0-9/]\", \"gi\");\nconst leadingZeros: RegExp = new RegExp(\"^0+\", \"gi\");\n\n// translation strings\nlet strings: MailgoTranslation;\n\n// global mailgo config object\nlet config: MailgoConfig;\n\n// config to check if the client is mobile or desktop\nlet isMobile: boolean = false;\n\n// default config attributes\nlet mailtoEnabled: boolean = true;\nlet telEnabled: boolean = true;\nlet smsEnabled: boolean = false;\nlet desktopEnabled: boolean = true;\nlet mobileEnabled: boolean = true;\nlet validateEmailConfig: boolean = true;\nlet validateTelConfig: boolean = true;\nlet showFooterConfig: boolean = true;\nlet loadCSSConfig: boolean = true;\n\n// activeMailgoType\nlet activeMailgoType: MailgoType;\n\n// modals global object\nlet modalMailto: HTMLElement, modalTel: HTMLElement;\n\n// mailgo general variables\nlet url: URL, href: string, lessSpamHref: string;\n\n// mailgo mail variables\nlet mail: string, cc: string, bcc: string, subject: string, bodyMail: string;\n\n// mailgo tel variables\nlet tel: string, msg: string, telegramUsername: string, skypeUsername: string;\n\n// the DOM elements\nlet title: HTMLElement,\n titleTel: HTMLElement,\n detailCc: HTMLElement,\n detailBcc: HTMLElement,\n detailSubject: HTMLElement,\n detailBody: HTMLElement,\n detailMsg: HTMLElement,\n ccValue: HTMLElement,\n bccValue: HTMLElement,\n subjectValue: HTMLElement,\n bodyValue: HTMLElement,\n msgValue: HTMLElement,\n activatedLink: HTMLElement;\n\n// mailgo buttons (actions)\nlet gmail: HTMLLinkElement,\n outlook: HTMLLinkElement,\n yahoo: HTMLLinkElement,\n open: HTMLLinkElement,\n telegram: HTMLLinkElement,\n wa: HTMLLinkElement,\n skype: HTMLLinkElement,\n call: HTMLLinkElement,\n copyMail: HTMLLinkElement,\n copyTel: HTMLLinkElement;\n\n/**\n * mailgoInit\n * the function that creates the mailgo elements in DOM\n */\nconst mailgoInit = (): void => {\n // set the boolean for mobile/desktop\n isMobile = userAgent() === MOBILE;\n\n // responsive settings\n {\n if (typeof config?.desktop !== \"undefined\") {\n desktopEnabled = config.desktop;\n // if it is a desktop and desktop is not enabled no init mailgo\n if (!isMobile && !desktopEnabled) {\n return;\n }\n }\n if (typeof config?.mobile !== \"undefined\") {\n mobileEnabled = config.mobile;\n // if it is a mobile and mobile is not enabled no init mailgo\n if (isMobile && !mobileEnabled) {\n return;\n }\n }\n }\n\n // set the mailgo language\n mailgoSetLanguage();\n\n // mailgo, if mailgo not already exists\n let mailgoExists = !!document.getElementById(MAILGO_MAIL);\n\n // if mailgo is enabled for mailto and it not exists in DOM\n if (mailtoEnabled && !mailgoExists) {\n // modal\n modalMailto = createElement() as HTMLElement;\n modalMailto.style.display = \"none\";\n modalMailto.id = MAILGO_MAIL;\n modalMailto.classList.add(\"m-modal\");\n modalMailto.setAttribute(\"role\", \"dialog\");\n modalMailto.setAttribute(\"tabindex\", \"-1\");\n modalMailto.setAttribute(\"aria-labelledby\", \"m-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalMailto.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalMailto.appendChild(modalContent);\n\n // title (email address)\n title = createElement(\"strong\");\n title.id = \"m-title\";\n title.className = \"m-title\";\n modalContent.appendChild(title);\n\n // details\n let details: HTMLElement = createElement();\n details.id = \"m-details\";\n details.className = \"m-details\";\n\n detailCc = createElement(pHTMLTag);\n detailCc.id = \"m-cc\";\n let ccSpan: HTMLElement = createElement(spanHTMLTag);\n ccSpan.className = \"w-500\";\n ccSpan.appendChild(createTextNode(strings.cc_ || defaultStrings.cc_));\n ccValue = createElement(spanHTMLTag);\n ccValue.id = \"m-cc-value\";\n detailCc.appendChild(ccSpan);\n detailCc.appendChild(ccValue);\n details.appendChild(detailCc);\n\n detailBcc = createElement(pHTMLTag);\n detailBcc.id = \"m-bcc\";\n let bccSpan: HTMLElement = createElement(spanHTMLTag);\n bccSpan.className = \"w-500\";\n bccSpan.appendChild(createTextNode(strings.bcc_ || defaultStrings.bcc_));\n bccValue = createElement(spanHTMLTag);\n bccValue.id = \"m-bcc-value\";\n detailBcc.appendChild(bccSpan);\n detailBcc.appendChild(bccValue);\n details.appendChild(detailBcc);\n\n detailSubject = createElement(pHTMLTag);\n detailSubject.id = \"m-subject\";\n let subjectSpan: HTMLElement = createElement(spanHTMLTag);\n subjectSpan.className = \"w-500\";\n subjectSpan.appendChild(\n createTextNode(strings.subject_ || defaultStrings.subject_)\n );\n subjectValue = createElement(spanHTMLTag);\n subjectValue.id = \"m-subject-value\";\n detailSubject.appendChild(subjectSpan);\n detailSubject.appendChild(subjectValue);\n details.appendChild(detailSubject);\n\n detailBody = createElement(pHTMLTag);\n detailBody.id = \"m-body\";\n let bodySpan: HTMLElement = createElement(spanHTMLTag);\n bodySpan.className = \"w-500\";\n bodySpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n bodyValue = createElement(spanHTMLTag);\n bodyValue.id = \"m-body-value\";\n detailBody.appendChild(bodySpan);\n detailBody.appendChild(bodyValue);\n details.appendChild(detailBody);\n\n modalContent.appendChild(details);\n\n // Gmail\n gmail = createElement(aHTMLTag) as HTMLLinkElement;\n gmail.id = \"m-gmail\";\n gmail.href = \"#mailgo-gmail\";\n gmail.classList.add(\"m-open\");\n gmail.classList.add(\"m-gmail\");\n gmail.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let gmailSpan: HTMLElement = createElement(spanHTMLTag);\n gmailSpan.className = \"w-500\";\n gmailSpan.appendChild(\n createTextNode(strings.gmail || defaultStrings.gmail)\n );\n gmail.appendChild(gmailSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"gmail\")) {\n modalContent.appendChild(gmail);\n }\n\n // Outlook\n outlook = createElement(aHTMLTag) as HTMLLinkElement;\n outlook.id = \"m-outlook\";\n outlook.href = \"#mailgo-outlook\";\n outlook.classList.add(\"m-open\");\n outlook.classList.add(\"m-outlook\");\n outlook.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let outlookSpan: HTMLElement = createElement(spanHTMLTag);\n outlookSpan.className = \"w-500\";\n outlookSpan.appendChild(\n createTextNode(strings.outlook || defaultStrings.outlook)\n );\n outlook.appendChild(outlookSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"outlook\")) {\n modalContent.appendChild(outlook);\n }\n\n // Outlook\n yahoo = createElement(aHTMLTag) as HTMLLinkElement;\n yahoo.id = \"m-yahoo\";\n yahoo.href = \"#mailgo-yahoo\";\n yahoo.classList.add(\"m-open\");\n yahoo.classList.add(\"m-yahoo\");\n yahoo.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let yahooSpan: HTMLElement = createElement(spanHTMLTag);\n yahooSpan.className = \"w-500\";\n yahooSpan.appendChild(\n createTextNode(strings.yahoo || defaultStrings.yahoo)\n );\n yahoo.appendChild(yahooSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"yahoo\")) {\n modalContent.appendChild(yahoo);\n }\n\n // open default\n open = createElement(aHTMLTag) as HTMLLinkElement;\n open.id = \"m-open\";\n open.href = \"#mailgo-open\";\n open.classList.add(\"m-open\");\n open.classList.add(\"m-default\");\n let openSpan: HTMLElement = createElement(spanHTMLTag);\n openSpan.className = \"w-500\";\n openSpan.appendChild(createTextNode(strings.open || defaultStrings.open));\n open.appendChild(openSpan);\n open.appendChild(\n createTextNode(strings._default || defaultStrings._default)\n );\n\n modalContent.appendChild(open);\n\n // copy\n copyMail = createElement(aHTMLTag) as HTMLLinkElement;\n copyMail.id = \"m-copy\";\n copyMail.href = \"#mailgo-copy\";\n copyMail.classList.add(\"m-copy\");\n copyMail.classList.add(\"w-500\");\n copyMail.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyMail);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalMailto);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // mailgo tel, if mailgo-tel not already exists\n let mailgoTelExists = !!document.getElementById(MAILGO_TEL);\n\n // if mailgo is enabled for tel/callto and it not exists in DOM\n if (telEnabled && !mailgoTelExists) {\n // modal\n modalTel = createElement() as HTMLElement;\n modalTel.style.display = \"none\";\n modalTel.id = MAILGO_TEL;\n modalTel.classList.add(\"m-modal\");\n modalTel.setAttribute(\"role\", \"dialog\");\n modalTel.setAttribute(\"tabindex\", \"-1\");\n modalTel.setAttribute(\"aria-labelledby\", \"m-tel-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalTel.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalTel.appendChild(modalContent);\n\n // title (telephone number)\n titleTel = createElement(\"strong\");\n titleTel.id = \"m-tel-title\";\n titleTel.className = \"m-title\";\n modalContent.appendChild(titleTel);\n\n // details\n let detailsTel: HTMLElement = createElement();\n detailsTel.id = \"m-tel-details\";\n detailsTel.className = \"m-details\";\n\n detailMsg = createElement(pHTMLTag);\n detailMsg.id = \"m-msg\";\n let msgSpan: HTMLElement = createElement(spanHTMLTag);\n msgSpan.className = \"w-500\";\n msgSpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n msgValue = createElement(spanHTMLTag);\n msgValue.id = \"m-msg-value\";\n detailMsg.appendChild(msgSpan);\n detailMsg.appendChild(msgValue);\n detailsTel.appendChild(detailMsg);\n\n modalContent.appendChild(detailsTel);\n\n // Telegram\n telegram = createElement(aHTMLTag) as HTMLLinkElement;\n telegram.id = \"m-tg\";\n telegram.href = \"#mailgo-telegram\";\n telegram.classList.add(\"m-open\");\n telegram.classList.add(\"m-tg\");\n\n // by default not display\n telegram.style.display = \"none\";\n\n telegram.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let telegramSpan: HTMLElement = createElement(spanHTMLTag);\n telegramSpan.className = \"w-500\";\n telegramSpan.appendChild(\n createTextNode(strings.telegram || defaultStrings.telegram)\n );\n telegram.appendChild(telegramSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"telegram\")) {\n modalContent.appendChild(telegram);\n }\n\n // WhatsApp\n wa = createElement(aHTMLTag) as HTMLLinkElement;\n wa.id = \"m-wa\";\n wa.href = \"#mailgo-whatsapp\";\n wa.classList.add(\"m-open\");\n wa.classList.add(\"m-wa\");\n wa.appendChild(createTextNode(strings.open_in_ || defaultStrings.open_in_));\n let waSpan: HTMLElement = createElement(spanHTMLTag);\n waSpan.className = \"w-500\";\n waSpan.appendChild(\n createTextNode(strings.whatsapp || defaultStrings.whatsapp)\n );\n wa.appendChild(waSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"whatsapp\")) {\n modalContent.appendChild(wa);\n }\n\n // Skype\n skype = createElement(aHTMLTag) as HTMLLinkElement;\n skype.id = \"m-skype\";\n skype.href = \"#mailgo-skype\";\n skype.classList.add(\"m-open\");\n skype.classList.add(\"m-skype\");\n skype.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let skypeSpan: HTMLElement = createElement(spanHTMLTag);\n skypeSpan.className = \"w-500\";\n skypeSpan.appendChild(\n createTextNode(strings.skype || defaultStrings.skype)\n );\n skype.appendChild(skypeSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"skype\")) {\n modalContent.appendChild(skype);\n }\n\n // call default\n call = createElement(aHTMLTag) as HTMLLinkElement;\n call.id = \"m-call\";\n call.href = \"#mailgo-open\";\n call.classList.add(\"m-open\");\n call.classList.add(\"m-default\");\n let callSpan: HTMLElement = createElement(spanHTMLTag);\n callSpan.className = \"w-500\";\n callSpan.appendChild(createTextNode(strings.call || defaultStrings.call));\n call.appendChild(callSpan);\n call.appendChild(\n createTextNode(strings._as_default || defaultStrings._as_default)\n );\n\n modalContent.appendChild(call);\n\n // copy\n copyTel = createElement(aHTMLTag) as HTMLLinkElement;\n copyTel.id = \"m-tel-copy\";\n copyTel.href = \"#mailgo-copy\";\n copyTel.classList.add(\"m-copy\");\n copyTel.classList.add(\"w-500\");\n copyTel.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyTel);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalTel);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // event listener on body, if the element is mailgo-compatible the mailgo modal will be rendered\n document.addEventListener(\"click\", mailgoClickListener);\n};\n\n/**\n * mailgoClickListener\n * function to check if an element is mailgo-enabled or not referencing to\n * mail:\n * document.querySelectorAll(\n * 'a[href^=\"mailto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * tel:\n * document.querySelectorAll(\n * 'a[href^=\"tel:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"callto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"sms:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n */\nfunction mailgoClickListener(event: Event): boolean {\n // check if the mailgo HTML exists in the body\n if (\n !document.body.contains(modalMailto) &&\n !document.body.contains(modalTel)\n ) {\n return false;\n }\n\n // if a mailgo is already showing do nothing\n if (mailgoIsShowing()) {\n return false;\n }\n\n // the path of the event\n let path =\n (event.composedPath && event.composedPath()) ||\n composedPath(event.target as HTMLElement);\n\n if (path) {\n path.forEach((element: HTMLElement) => {\n if (element instanceof HTMLDocument || element instanceof Window) {\n return false;\n }\n\n // go here only if one of the mailgo modals are enabled\n if (mailtoEnabled || telEnabled || smsEnabled) {\n let localMailgoType = getMailgoTypeByElement(element);\n\n // go on if the localMailgoType is not null\n if (localMailgoType) {\n // set the active mailgo type\n activeMailgoType = localMailgoType;\n\n let activeMailgoModalType = activeMailgoType?.type;\n\n if (activeMailgoModalType) {\n // check if the setting is enabled and if so go with pre-render\n if (\n (mailtoEnabled && activeMailgoModalType === MAILGO_MAIL) ||\n (telEnabled && activeMailgoModalType === MAILGO_TEL) ||\n (smsEnabled && activeMailgoModalType === MAILGO_SMS)\n ) {\n // stop the normal execution of the element click\n event.preventDefault();\n\n // render mailgo\n mailgoPreRender(element as HTMLLinkElement);\n\n return true;\n }\n }\n }\n }\n });\n }\n\n return false;\n}\n\n/**\n * mailgoPreRender\n * function to pre-render a mailgo, it helps populating elements needed by modal\n */\nfunction mailgoPreRender(\n mailgoElementOrUrl: HTMLLinkElement | string\n): boolean {\n let mailgoElement: HTMLLinkElement;\n\n // get the type and installation from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if type is not defined return\n if (!type) return false;\n\n if (typeof mailgoElementOrUrl === \"string\") {\n // if the parameter is a string it is the url\n href = mailgoElementOrUrl as string;\n } else {\n // if the paramenter is an HTMLLinkElement get the href attribute and the element\n href = mailgoElementOrUrl.getAttribute(\"href\") as string;\n mailgoElement = mailgoElementOrUrl as HTMLLinkElement;\n }\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // if the installation is classic\n if (installation === CLASSIC) {\n if (validateUrl(href, MAILTO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILTO)[1].trim());\n } else if (validateUrl(href, MAILGO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILGO)[1].trim());\n }\n\n try {\n url = new URL(href);\n\n let urlParams: URLSearchParams = url.searchParams;\n // optional parameters for the email\n cc = urlParams.get(\"cc\");\n bcc = urlParams.get(\"bcc\");\n subject = urlParams.get(\"subject\");\n bodyMail = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam\n // mail = data-address + @ + data-domain\n mail =\n mailgoElement.getAttribute(\"data-address\") &&\n mailgoElement.getAttribute(\"data-domain\")\n ? mailgoElement.getAttribute(\"data-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-domain\")\n : null;\n\n try {\n url = new URL(MAILTO + encodeURIComponent(mail));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // cc = data-cc-address + @ + data-cc-domain\n cc = mailgoElement.getAttribute(\"data-cc-address\")\n ? mailgoElement.getAttribute(\"data-cc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-cc-domain\")\n : null;\n\n // if cc is defined add it to parameters\n if (cc) parameters.push(\"cc=\" + cc);\n\n // bcc = data-bcc-address + @ + data-bcc-domain\n bcc = mailgoElement.getAttribute(\"data-bcc-address\")\n ? mailgoElement.getAttribute(\"data-bcc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-bcc-domain\")\n : null;\n\n // if bcc is defined add it to parameters\n if (bcc) parameters.push(\"bcc=\" + bcc);\n\n // subject = data-subject\n subject = mailgoElement.getAttribute(\"data-subject\");\n\n // if subject is defined add it to parameters\n if (subject) parameters.push(\"subject=\" + subject);\n\n // body = data-body\n bodyMail = mailgoElement.getAttribute(\"data-body\");\n\n // if body is defined add it to parameters\n if (bodyMail) parameters.push(\"body=\" + bodyMail);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n MAILTO + encodeURIComponent(mail),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateEmail !== \"undefined\") {\n validateEmailConfig = config.validateEmail;\n }\n\n if (validateEmailConfig) {\n // validate the email address\n if (!validateEmails(mail.split(\",\"))) {\n return false;\n }\n\n // if cc, bcc are not valid cc, bcc = \"\"\n if (cc && !validateEmails(cc.split(\",\"))) cc = \"\";\n if (bcc && !validateEmails(bcc.split(\",\"))) bcc = \"\";\n }\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n if (installation === CLASSIC) {\n if (validateUrl(href, TEL)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(TEL)[1].trim());\n } else if (validateUrl(href, CALLTO)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(CALLTO)[1].trim());\n } else if (validateUrl(href, SMS)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(SMS)[1].trim());\n }\n\n try {\n url = new URL(href);\n let urlParams: URLSearchParams = url.searchParams;\n\n // optional parameters for the phone number\n msg = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation == LESS_SPAM) {\n tel = mailgoElement.getAttribute(\"data-tel\");\n msg = mailgoElement.getAttribute(\"data-msg\");\n\n try {\n url = new URL(TEL + encodeURIComponent(tel));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // if msg is defined add it to parameters\n if (msg) parameters.push(\"body=\" + msg);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n TEL + encodeURIComponent(tel),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateTel !== \"undefined\") {\n validateTelConfig = config.validateTel;\n }\n\n // validate the phone number\n if (validateTelConfig) {\n if (!validateTel(tel)) return;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-telegram\")) {\n telegramUsername = mailgoElement.getAttribute(\"data-telegram\");\n } else {\n telegramUsername = null;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-skype\")) {\n skypeUsername = mailgoElement.getAttribute(\"data-skype\");\n } else {\n skypeUsername = null;\n }\n }\n\n // if dark is in config or contained in the element\n if (\n mailgoElement &&\n (config?.dark || mailgoElement.classList.contains(\"dark\"))\n ) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // render mailgo\n mailgoRender();\n\n return true;\n}\n\n/**\n * mailgoDirectRender\n * function to render a mailgo directly from a URL\n */\nfunction mailgoDirectRender(directUrl: string): boolean {\n // start mailgo\n mailgo();\n\n if (validateUrl(directUrl, MAILTO) || validateUrl(directUrl, MAILGO)) {\n activeMailgoType = {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n } else if (\n validateUrl(directUrl, TEL) ||\n validateUrl(directUrl, CALLTO) ||\n validateUrl(directUrl, SMS)\n ) {\n activeMailgoType = {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n }\n return false;\n}\n\n/**\n * mailgoRender\n * function to render a mailgo (mail or tel)\n */\nfunction mailgoRender(): boolean {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n\n // if type is not defined return\n if (!type) return false;\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // the title of the modal (email address)\n title.innerHTML = mail.split(\",\").join(\"
\");\n\n // add the details if provided\n if (mailgoConfigAttributeEnabled(\"detail\", \"cc\") && cc) {\n detailCc.style.display = \"block\";\n ccValue.innerHTML = cc.split(\",\").join(\"
\");\n } else {\n detailCc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"bcc\") && bcc) {\n detailBcc.style.display = \"block\";\n bccValue.innerHTML = bcc.split(\",\").join(\"
\");\n } else {\n detailBcc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"subject\") && subject) {\n detailSubject.style.display = \"block\";\n subjectValue.textContent = subject;\n } else {\n detailSubject.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"body\") && bodyMail) {\n detailBody.style.display = \"block\";\n bodyValue.textContent = bodyMail;\n } else {\n detailBody.style.display = \"none\";\n }\n\n // add the actions\n gmail.addEventListener(\"click\", openGmail);\n\n outlook.addEventListener(\"click\", openOutlook);\n\n yahoo.addEventListener(\"click\", openYahooMail);\n\n open.addEventListener(\"click\", openDefault);\n\n copyMail.addEventListener(\"click\", copy);\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n // the title of the modal (tel)\n titleTel.innerHTML = tel;\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"msg\") && msg) {\n detailMsg.style.display = \"block\";\n msgValue.textContent = msg;\n } else {\n detailMsg.style.display = \"none\";\n }\n\n // add the actions to buttons\n wa.addEventListener(\"click\", openWhatsApp);\n\n // telegram must be shown only if data-telegram is provided\n if (telegramUsername) {\n document.getElementById(\"m-tg\").style.display = \"block\";\n telegram.addEventListener(\"click\", openTelegram);\n } else {\n document.getElementById(\"m-tg\").style.display = \"none\";\n }\n\n skype.addEventListener(\"click\", openSkype);\n\n call.addEventListener(\"click\", openDefault);\n\n copyTel.addEventListener(\"click\", copy);\n }\n\n // show the mailgo\n showMailgo(type);\n\n // add listener keyDown\n document.addEventListener(\"keydown\", mailgoKeydown);\n\n return true;\n}\n\n// actions\nconst openGmail = (event?: Event): void => {\n event.preventDefault();\n\n let urlString: string;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n if (installation === CLASSIC) {\n try {\n urlString = url.toString();\n } catch (e) {\n urlString = href;\n }\n } else if (installation === LESS_SPAM) {\n urlString = lessSpamHref;\n }\n\n // Gmail url\n let gmailUrl: string =\n \"https://mail.google.com/mail/?extsrc=mailto&url=\" +\n encodeURIComponent(urlString);\n\n // open the link\n window.open(gmailUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openOutlook = (event?: Event): void => {\n event.preventDefault();\n\n // Outlook starting url\n let startingOutlookUrl: string =\n \"https://outlook.live.com/owa/?path=/mail/action/compose&to=\";\n\n // let the user to decide to open Office365 Outlook instead of the classic outlook.live.com\n if (config?.office365) {\n startingOutlookUrl =\n \"https://outlook.office365.com/owa/?path=/mail/action/compose&to=\";\n }\n\n // Outlook url\n let outlookUrl: string = startingOutlookUrl + encodeURIComponent(mail);\n\n // the details if provided\n if (subject) {\n outlookUrl = outlookUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n\n if (bodyMail) {\n outlookUrl = outlookUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(outlookUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openYahooMail = (event?: Event): void => {\n event.preventDefault();\n\n // Yahoo url\n let yahooUrl: string = \"https://compose.mail.yahoo.com/?to=\" + mail;\n\n // the details if provided\n if (subject) {\n yahooUrl = yahooUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n if (bodyMail) {\n yahooUrl = yahooUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(yahooUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openTelegram = (event?: Event): void => {\n event.preventDefault();\n\n // check if telegramUsername exists\n if (telegramUsername) {\n // Telegram url\n let tgUrl: string = \"https://t.me/\" + encodeURIComponent(telegramUsername);\n\n // open the url\n window.open(tgUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n }\n};\n\nconst openSkype = (event?: Event): void => {\n event.preventDefault();\n\n let skype: string = skypeUsername || tel;\n\n // Telegram url\n let skypeUrl: string = \"skype:\" + encodeURIComponent(skype);\n\n // open the url\n window.open(skypeUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openWhatsApp = (event?: Event): void => {\n event.preventDefault();\n\n // WhatsApp API doesn't work with non number digits and leading 0s: https://faq.whatsapp.com/general/chats/how-to-use-click-to-chat/\n let whatappTel = tel.replace(notNumber, \"\").replace(leadingZeros, \"\");\n\n // WhatsApp url\n let waUrl: string = \"https://wa.me/\" + encodeURIComponent(whatappTel);\n\n // the details if provided\n if (msg) {\n waUrl = waUrl.concat(\"?text=\" + encodeURIComponent(msg));\n }\n\n // open the url\n window.open(waUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openDefault = (event?: Event): void => {\n event.preventDefault();\n\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if the installation is classic the browser can follow the default behaviour\n if (installation === CLASSIC) {\n window.location.href = href;\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam use the built less-spam href\n window.location.href = lessSpamHref;\n }\n\n hideMailgo();\n};\n\nconst copy = (event?: Event): void => {\n event.preventDefault();\n\n // the correct copyButton (mail or tel)\n if (mailgoIsShowing()) {\n let activeCopy: HTMLElement;\n\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n // in case it is showing mail modal copy email address\n copyToClipboard(mail);\n activeCopy = copyMail;\n } else {\n // in case it is showing tel modal copy phone number\n copyToClipboard(tel);\n activeCopy = copyTel;\n }\n\n activeCopy.textContent = strings.copied || defaultStrings.copied;\n setTimeout(() => {\n activeCopy.textContent = strings.copy || defaultStrings.copy;\n // hide after the timeout\n hideMailgo();\n }, 999);\n }\n};\n\n// function to find if a link is a mailto, tel, callto or sms\nconst validateUrl = (url: string, type: string = MAILTO) => {\n let regexValidate = new RegExp(\"^\" + type + \"((.)+)\", \"gi\");\n return regexValidate.test(url);\n};\n\n// function that returns if an element is a mailgo\nfunction getMailgoTypeByElement(element: HTMLElement): MailgoType | null {\n let elementHref: string = (element as HTMLLinkElement).getAttribute(\"href\");\n\n // return null if there is no-mailgo in class\n if (element.classList?.contains(NO_MAILGO)) {\n return null;\n }\n\n // the case of classic type of mailgo, like a href=mailto:... or a href=tel:... and the class=mailgo with a useful href\n if (elementHref || element.classList?.contains(\"mailgo\")) {\n if (validateUrl(elementHref, MAILTO) || validateUrl(elementHref, MAILGO)) {\n // a mailto: or mailgo:\n return {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n } else if (\n validateUrl(elementHref, TEL) ||\n validateUrl(elementHref, CALLTO)\n ) {\n // a tel: or callto:\n return {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n } else if (validateUrl(elementHref, SMS)) {\n // a sms:\n return {\n type: MAILGO_SMS,\n installation: CLASSIC,\n };\n }\n }\n\n if (elementHref === \"#mailgo\" || element.classList?.contains(\"mailgo\")) {\n // less-spam installation of mailgo, check to the attributes\n if (\n element.hasAttribute(\"data-address\") &&\n element.hasAttribute(\"data-domain\")\n ) {\n // less-spam mailto with data-address and data-domain\n return {\n type: MAILGO_MAIL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-tel\")) {\n // less-spam tel with data-tel\n return {\n type: MAILGO_TEL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-msg\")) {\n // less-spam sms with data-msd\n return {\n type: MAILGO_SMS,\n installation: LESS_SPAM,\n };\n }\n }\n\n return null;\n}\n\n/**\n * mailgoKeydown\n * function to manage the keydown event when the modal is showing, return a boolean that represents if a useful key has been pressed\n */\nconst mailgoKeydown = (keyboardEvent: KeyboardEvent): boolean => {\n // if mailgo is showing\n if (mailgoIsShowing()) {\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 71:\n // g -> open GMail\n openGmail();\n return true;\n case 79:\n // o -> open Outlook\n openOutlook();\n return true;\n case 89:\n // y -> open Yahoo Mail\n openYahooMail();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n } else if (type === MAILGO_TEL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 84:\n // t -> open Telegram\n openTelegram();\n return true;\n case 87:\n // w -> open WhatsApp\n openWhatsApp();\n return true;\n case 83:\n // s -> open Skype\n openSkype();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n }\n }\n return false;\n};\n\n// show the modal\nconst showMailgo = (type: MailgoModalType): void => {\n // show the correct modal\n setModalDisplay(type, \"flex\");\n};\n\n// hide the modal\nconst hideMailgo = (): void => {\n // hide all the modals\n setModalDisplay(MAILGO_MAIL, \"none\");\n setModalDisplay(MAILGO_TEL, \"none\");\n\n // remove listener keyDown\n document.removeEventListener(\"keydown\", mailgoKeydown);\n};\n\n// is the mailgo modal hidden?\nconst mailgoIsShowing = (): boolean => {\n return (\n (mailtoEnabled && getModalDisplay(MAILGO_MAIL) === \"flex\") ||\n ((telEnabled || smsEnabled) && getModalDisplay(MAILGO_TEL) === \"flex\")\n );\n};\n\nconst byElement = (): HTMLLinkElement => {\n // by element in the footer\n let by: HTMLLinkElement = createElement(aHTMLTag) as HTMLLinkElement;\n by.href = \"https://mailgo.dev?ref=mailgo-modal\";\n by.className = \"m-by\";\n by.target = \"_blank\";\n by.rel = \"noopener noreferrer\";\n by.appendChild(createTextNode(\"mailgo.dev\"));\n\n return by;\n};\n\n// create element\nconst createElement = (element: string = \"div\"): HTMLElement =>\n document.createElement(element);\n\n// create text node\nconst createTextNode = (element: string): Text =>\n document.createTextNode(element);\n\n// get the correct HTMLElement from a type\nconst getModalHTMLElement = (type: MailgoModalType = MAILGO_MAIL) => {\n if (type === MAILGO_TEL) {\n return modalTel;\n } else {\n return modalMailto;\n }\n};\n\n// get display value\nconst getModalDisplay = (ref: MailgoModalType = MAILGO_MAIL): string =>\n getModalHTMLElement(ref).style.display;\n\n// set display value\nconst setModalDisplay = (\n ref: MailgoModalType = MAILGO_MAIL,\n value: string\n): void => {\n let modal = getModalHTMLElement(ref);\n\n if (modal) {\n modal.style.display = value;\n\n if (value === \"flex\") {\n // \"save\" the activated link.\n activatedLink = document.activeElement as HTMLElement;\n modal.setAttribute(\"aria-hidden\", \"false\");\n\n // Focus on the modal container.\n modal.setAttribute(\"tabindex\", \"0\");\n modal.focus();\n setFocusLoop(modal);\n } else {\n modal.setAttribute(\"aria-hidden\", \"true\");\n\n // focus back the activated link for getting back to the context.\n modal.setAttribute(\"tabindex\", \"-1\");\n activatedLink.focus();\n }\n }\n};\n\n// enable dark mode\nconst enableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.add(\"m-dark\");\n }\n};\n\n// disable dark mode\nconst disableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.remove(\"m-dark\");\n }\n};\n\n// custom composedPath if path or event.composedPath() are not defined\nconst composedPath = (\n el: HTMLElement\n): (HTMLElement | Document | (Window & typeof globalThis))[] => {\n let path = [];\n\n while (el) {\n path.push(el);\n\n if (el.tagName === \"HTML\") {\n path.push(document);\n path.push(window);\n return path;\n }\n\n el = el.parentElement;\n }\n};\n\n// function to recreate a mailto: or tel: href from less-spam\nconst buildLessSpamHref = (type: string, parameters: string[]): string => {\n lessSpamHref = type;\n if (parameters && parameters.length > 0) {\n let joinedParams = parameters.join(\"&\");\n lessSpamHref = lessSpamHref.concat(\"?\" + joinedParams);\n }\n return lessSpamHref;\n};\n\n// function to check an attribute is enabled or not, by default considering it enabled\nconst mailgoConfigAttributeEnabled = (\n type: \"action\" | \"detail\",\n attribute: MailgoAction | MailgoDetail\n): boolean => {\n // by default all the actions and attribute are enabled\n if (!config) {\n return true;\n }\n\n if (config && !config?.actions) {\n return true;\n }\n\n // if the attribute type is action consider the actions config attribute\n if (type === \"action\") {\n if (\n config &&\n config.actions &&\n config?.actions[attribute as MailgoAction] === false\n ) {\n return false;\n }\n } else if (type === \"detail\") {\n // else consider the details attribute\n if (\n config &&\n config.details &&\n config?.details[attribute as MailgoDetail] === false\n ) {\n return false;\n }\n }\n\n return true;\n};\n\n// manage the language of mailgo\nconst mailgoSetLanguage = (): string => {\n let languageType = \"default lang\";\n\n // if a language is defined in configuration use it\n if (\n config?.lang &&\n (languages as MailgoLanguages).indexOf(config.lang) !== -1\n ) {\n lang = config.lang;\n languageType = \"config lang\";\n } else {\n // else if is defined use it!\n // keep the lang from html\n let htmlLang: string = document.documentElement.lang;\n\n // find the correct language using the lang attribute, not just a === because there a are cases like fr-FR or fr_FR in html lang attribute\n (languages as MailgoLanguages).forEach((language: any) => {\n if (new RegExp(\"^\" + language, \"gi\").test(htmlLang)) {\n lang = language;\n languageType = \"html lang\";\n }\n });\n }\n\n // strings\n strings = (translations as MailgoTranslations)[lang];\n\n return languageType;\n};\n\nconst mailgoStyle = (): void => {\n if (!document.getElementById(\"mailgo-style\")) {\n // mailgo style\n let mailgoCSSElement: HTMLStyleElement = createElement(\n \"style\"\n ) as HTMLStyleElement;\n mailgoCSSElement.id = \"mailgo-style\";\n mailgoCSSElement.type = \"text/css\";\n mailgoCSSElement.appendChild(createTextNode(mailgoCSS));\n document.head.appendChild(mailgoCSSElement);\n }\n};\n\n// mailgo\nfunction mailgo(mailgoConfig?: MailgoConfig): boolean {\n try {\n // polyfill mailgo\n // mailgoPolyfill();\n\n // set the global config merging window mailgConfig and mailgoConfig passed as a parameter\n config = { ...mailgoConfig, ...((window as any)?.mailgoConfig || null) };\n\n // if the window is defined...\n if (typeof window !== \"undefined\") {\n // if is set in config use it (load the mailgo CSS)\n if (typeof config?.loadCSS !== \"undefined\") {\n loadCSSConfig = config.loadCSS;\n }\n\n // if is set in config use it (enable mailto)\n if (typeof config?.mailto !== \"undefined\") {\n mailtoEnabled = config.mailto;\n }\n\n // if is set in config use it (enable tel)\n if (typeof config?.tel !== \"undefined\") {\n telEnabled = config.tel;\n }\n\n // if is set in config use it (enable sms)\n if (typeof config?.sms !== \"undefined\") {\n smsEnabled = config.sms;\n }\n\n // if load css enabled load it!\n if (loadCSSConfig) {\n // add the style for mailgo\n mailgoStyle();\n }\n\n // if is set an initEvent add the listener\n if (config?.initEvent) {\n if (config?.listenerOptions) {\n // listener options specified\n document.addEventListener(\n config.initEvent,\n mailgoInit,\n config.listenerOptions\n );\n } else {\n // no listener options\n document.addEventListener(config.initEvent, mailgoInit);\n }\n } else {\n mailgoInit();\n }\n\n return true;\n }\n } catch (error) {\n console.log(error);\n }\n return false;\n}\n\n// define the methods also for window element\nif (typeof window !== \"undefined\") {\n (window as any).getMailgoTypeByElement = getMailgoTypeByElement;\n (window as any).mailgoClickListener = mailgoClickListener;\n (window as any).mailgoCheckRender = mailgoClickListener; // for compatibility with old version of mailgo\n (window as any).mailgoPreRender = mailgoPreRender;\n (window as any).mailgoDirectRender = mailgoDirectRender;\n (window as any).mailgoRender = mailgoRender;\n (window as any).mailgo = mailgo;\n}\n\nexport {\n getMailgoTypeByElement,\n mailgoClickListener,\n mailgoPreRender,\n mailgoDirectRender,\n mailgoRender,\n};\n\nexport default mailgo;\n","// webpack > dist/mailgo.min.js\n\nimport mailgo from \"../src/mailgo\";\n\n// call init mailgo attached to the event DOMContentLoaded\nconst mailgoConfig = {\n initEvent: \"DOMContentLoaded\",\n};\n\nmailgo(mailgoConfig);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(474);\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://mailgo/../src/mailgo.scss","webpack://mailgo/../node_modules/css-loader/dist/runtime/api.js","webpack://mailgo/../src/mailgo.scss?81f2","webpack://mailgo/../src/constants.ts","webpack://mailgo/../src/utils.ts","webpack://mailgo/../src/mobile-detect.ts","webpack://mailgo/../src/mailgo.ts","webpack://mailgo/./mailgo.dist.ts","webpack://mailgo/webpack/bootstrap","webpack://mailgo/webpack/runtime/make namespace object","webpack://mailgo/webpack/startup"],"names":["MAILTO","MAILGO","TEL","CALLTO","SMS","outlookDeepLink","NO_MAILGO","DESKTOP","MOBILE","MAILGO_MAIL","MAILGO_TEL","MAILGO_SMS","CLASSIC","LESS_SPAM","spanHTMLTag","aHTMLTag","pHTMLTag","defaultLang","notNumber","RegExp","leadingZeros","validateEmail","email","test","validateEmails","arr","every","validateTel","tel","copyToClipboard","str","el","document","createElement","value","setAttribute","style","position","left","body","appendChild","selected","getSelection","rangeCount","getRangeAt","select","execCommand","removeChild","removeAllRanges","addRange","setFocusLoop","ref","modal","querySelector","addEventListener","leaveLastLink","leaveFirstLink","e","code","shiftKey","preventDefault","target","closest","focus","userAgent","navigator","mailgoCSS","require","lang","defaultStrings","translations","strings","config","isMobile","mailtoEnabled","telEnabled","smsEnabled","desktopEnabled","mobileEnabled","validateEmailConfig","validateTelConfig","showFooterConfig","loadCSSConfig","activeMailgoType","modalMailto","modalTel","url","href","lessSpamHref","mail","cc","bcc","subject","bodyMail","msg","telegramUsername","skypeUsername","title","titleTel","detailCc","detailBcc","detailSubject","detailBody","detailMsg","ccValue","bccValue","subjectValue","bodyValue","msgValue","activatedLink","gmail","outlook","yahoo","open","telegram","wa","skype","call","copyMail","copyTel","mailgoInit","desktop","mobile","mailgoSetLanguage","mailgoExists","getElementById","display","id","classList","add","dark","enableDarkMode","disableDarkMode","modalBackground","className","modalContent","details","ccSpan","createTextNode","cc_","bccSpan","bcc_","subjectSpan","subject_","bodySpan","body_","open_in_","gmailSpan","mailgoConfigAttributeEnabled","outlookSpan","yahooSpan","openSpan","_default","copy","showFooter","byElement","hideMailgo","mailgoTelExists","detailsTel","msgSpan","telegramSpan","waSpan","whatsapp","skypeSpan","callSpan","_as_default","mailgoClickListener","event","contains","mailgoIsShowing","path","composedPath","forEach","element","HTMLDocument","Window","localMailgoType","getMailgoTypeByElement","activeMailgoModalType","type","mailgoPreRender","mailgoElementOrUrl","mailgoElement","installation","getAttribute","validateUrl","decodeURIComponent","split","trim","URL","urlParams","searchParams","get","error","console","log","encodeURIComponent","parameters","push","buildLessSpamHref","hasAttribute","mailgoRender","mailgoDirectRender","directUrl","mailgo","innerHTML","join","textContent","openGmail","openOutlook","openYahooMail","openDefault","openWhatsApp","openTelegram","openSkype","showMailgo","mailgoKeydown","urlString","toString","gmailUrl","window","startingOutlookUrl","office365","outlookUrl","concat","yahooUrl","tgUrl","skypeUrl","whatappTel","replace","waUrl","location","activeCopy","copied","setTimeout","regexValidate","elementHref","keyboardEvent","keyCode","setModalDisplay","removeEventListener","getModalDisplay","by","rel","getModalHTMLElement","activeElement","remove","tagName","parentElement","length","joinedParams","attribute","actions","languageType","languages","htmlLang","documentElement","language","mailgoStyle","mailgoCSSElement","head","mailgoConfig","loadCSS","mailto","sms","initEvent","listenerOptions","mailgoCheckRender"],"mappings":";;;;;;;AAAA;AACA,kCAAkC,mBAAO,CAAC,GAAgD;AAC1F,sEAAsE,YAAY;AAClF;AACA,mDAAmD,eAAe,MAAM,QAAQ,SAAS,OAAO,uBAAuB,mBAAmB,sBAAsB,gBAAgB,iBAAiB,cAAc,oDAAoD,SAAS,UAAU,eAAe,cAAc,yJAAyJ,kCAAkC,gBAAgB,gBAAgB,uBAAuB,kBAAkB,cAAc,MAAM,QAAQ,SAAS,OAAO,yBAAyB,WAAW,0BAA0B,kBAAkB,cAAc,uBAAuB,kBAAkB,gBAAgB,gBAAgB,sBAAsB,YAAY,mBAAmB,wCAAwC,cAAc,aAAa,sBAAsB,cAAc,aAAa,0BAA0B,iGAAiG,UAAU,mCAAmC,kBAAkB,gBAAgB,mBAAmB,uBAAuB,kBAAkB,qCAAqC,mBAAmB,uCAAuC,eAAe,eAAe,kBAAkB,4BAA4B,eAAe,aAAa,cAAc,mBAAmB,qBAAqB,oCAAoC,cAAc,+HAA+H,qCAAqC,cAAc,sCAAsC,cAAc,qIAAqI,qCAAqC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C,eAAhB,GAAkCA,eAAlC;AACCwC,QAAD,CAAgBlB,kBAAhB,GAAqCA,kBAArC;AACCkB,QAAD,CAAgBnB,YAAhB,GAA+BA,YAA/B;AACCmB,QAAD,CAAgBhB,MAAhB,GAAyBA,MAAzB;AACD;;AAED;AAQA,+CAAeA,MAAf,E;;AC5gDA;;AAEmC;;AAEnC;AACA;AACA;AACA;;AAEA,UAAM;;;;;;;UCTN;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCrBA;WACA;WACA;WACA,sDAAsD,kBAAkB;WACxE;WACA,+CAA+C,cAAc;WAC7D,E;;;;UCNA;UACA;UACA;UACA","file":"mailgo.js","sourcesContent":["// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:16.5px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:#20232a;opacity:.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:.95;border-radius:20px;box-shadow:0 3px 20px rgba(32,35,42,.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:24px;transition:.5s box-shadow}.m-modal .m-modal-content:hover,.m-modal .m-modal-content:focus,.m-modal .m-modal-content:active{opacity:1}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2em}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{cursor:pointer;padding:10px;color:#4a4a4a;border-radius:20px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#c0372a}.m-modal .m-modal-content a.m-gmail:hover,.m-modal .m-modal-content a.m-gmail:focus,.m-modal .m-modal-content a.m-gmail:active{background-color:rgba(192,55,42,.08);color:#c0372a}.m-modal .m-modal-content a.m-outlook{color:#0967aa}.m-modal .m-modal-content a.m-outlook:hover,.m-modal .m-modal-content a.m-outlook:focus,.m-modal .m-modal-content a.m-outlook:active{background-color:rgba(9,103,170,.08);color:#0967aa}.m-modal .m-modal-content a.m-yahoo{color:#4a00a0}.m-modal .m-modal-content a.m-yahoo:hover,.m-modal .m-modal-content a.m-yahoo:focus,.m-modal .m-modal-content a.m-yahoo:active{background-color:rgba(74,0,160,.08);color:#4a00a0}.m-modal .m-modal-content a.m-tg{color:#086da0}.m-modal .m-modal-content a.m-tg:hover,.m-modal .m-modal-content a.m-tg:focus,.m-modal .m-modal-content a.m-tg:active{background-color:rgba(8,109,160,.08);color:#086da0}.m-modal .m-modal-content a.m-wa{color:#067466}.m-modal .m-modal-content a.m-wa:hover,.m-modal .m-modal-content a.m-wa:focus,.m-modal .m-modal-content a.m-wa:active{background-color:rgba(6,116,102,.08);color:#067466}.m-modal .m-modal-content a.m-skype{color:#076d92}.m-modal .m-modal-content a.m-skype:hover,.m-modal .m-modal-content a.m-skype:focus,.m-modal .m-modal-content a.m-skype:active{background-color:rgba(7,109,146,.08);color:#076d92}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-default:focus,.m-modal .m-modal-content a.m-default:active,.m-modal .m-modal-content a.m-copy:hover,.m-modal .m-modal-content a.m-copy:focus,.m-modal .m-modal-content a.m-copy:active{background-color:rgba(0,0,0,.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:12px;margin-top:.8rem;padding:5px;color:#4a4a4a}.m-modal .m-modal-content a.m-by:hover,.m-modal .m-modal-content a.m-by:focus,.m-modal .m-modal-content a.m-by:active{color:#3d3d3d}.m-modal .m-modal-content .w-500{font-weight:500}.m-modal.m-dark .m-modal-content{background-color:#20232a}.m-modal.m-dark .m-modal-content,.m-modal.m-dark .m-modal-content p,.m-modal.m-dark .m-modal-content p span,.m-modal.m-dark .m-modal-content strong{color:#fff}.m-modal.m-dark .m-modal-content a{color:#eaeaea}.m-modal.m-dark .m-modal-content a:not(.m-by):hover,.m-modal.m-dark .m-modal-content a:not(.m-by):focus,.m-modal.m-dark .m-modal-content a:not(.m-by):active{background-color:rgba(134,134,134,.08);color:#eaeaea}.m-modal.m-dark .m-modal-content a.m-gmail{color:#e07d73}.m-modal.m-dark .m-modal-content a.m-gmail:hover,.m-modal.m-dark .m-modal-content a.m-gmail:focus,.m-modal.m-dark .m-modal-content a.m-gmail:active{background-color:rgba(224,125,115,.08);color:#e07d73}.m-modal.m-dark .m-modal-content a.m-outlook{color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-outlook:hover,.m-modal.m-dark .m-modal-content a.m-outlook:focus,.m-modal.m-dark .m-modal-content a.m-outlook:active{background-color:rgba(76,156,215,.08);color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-yahoo{color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-yahoo:hover,.m-modal.m-dark .m-modal-content a.m-yahoo:focus,.m-modal.m-dark .m-modal-content a.m-yahoo:active{background-color:rgba(172,136,211,.08);color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-tg{color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-tg:hover,.m-modal.m-dark .m-modal-content a.m-tg:focus,.m-modal.m-dark .m-modal-content a.m-tg:active{background-color:rgba(76,171,219,.08);color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-wa{color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-wa:hover,.m-modal.m-dark .m-modal-content a.m-wa:focus,.m-modal.m-dark .m-modal-content a.m-wa:active{background-color:rgba(76,210,192,.08);color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-skype{color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-skype:hover,.m-modal.m-dark .m-modal-content a.m-skype:focus,.m-modal.m-dark .m-modal-content a.m-skype:active{background-color:rgba(76,199,244,.08);color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-by:hover,.m-modal.m-dark .m-modal-content a.m-by:focus,.m-modal.m-dark .m-modal-content a.m-by:active{color:#fff}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\n var result = require(\"!!../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../node_modules/sass-loader/dist/cjs.js!./mailgo.scss\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n ","import { MailgoModalType, MailgoInstallationType } from \"mailgo\";\n\n// links\nexport const MAILTO: string = \"mailto:\";\nexport const MAILGO: string = \"mailgo:\";\nexport const TEL: string = \"tel:\";\nexport const CALLTO: string = \"callto:\";\nexport const SMS: string = \"sms:\";\n\n// deep linking\nexport const outlookDeepLink: string = \"ms-outlook://\";\n\n// no mailgo class\nexport const NO_MAILGO: string = \"no-mailgo\";\n\n// responsive settings\nexport const DESKTOP: string = \"desktop\";\nexport const MOBILE: string = \"mobile\";\n\n// mailgo modal types\nexport const MAILGO_MAIL: MailgoModalType = \"mailgo\";\nexport const MAILGO_TEL: MailgoModalType = \"mailgo-tel\";\nexport const MAILGO_SMS: MailgoModalType = \"mailgo-sms\";\n\n// mailgo installation types\nexport const CLASSIC: MailgoInstallationType = \"classic\";\nexport const LESS_SPAM: MailgoInstallationType = \"less-spam\";\n\n// useful html tags\nexport const spanHTMLTag: string = \"span\";\nexport const aHTMLTag: string = \"a\";\nexport const pHTMLTag: string = \"p\";\n\n// default lang\nexport const defaultLang: string = \"en\";\n\n// useful regexp\nexport const notNumber: RegExp = new RegExp(\"[^0-9/]\", \"gi\");\nexport const leadingZeros: RegExp = new RegExp(\"^0+\", \"gi\");\n","// validate a single email with regex\nexport const validateEmail = (email: string): boolean =>\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/.test(\n email\n );\n\n// validate an array of emails\nexport const validateEmails = (arr: string[]): boolean =>\n arr.every(validateEmail);\n\n// validate a single tel with regex\nexport const validateTel = (tel: string): boolean =>\n /^[+]{0,1}[\\s0-9]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*[p]{0,1}[\\s0-9]*$/.test(\n tel\n );\n\n// copy of a string\nexport const copyToClipboard = (str: string): boolean => {\n let el: HTMLTextAreaElement = document.createElement(\n \"textarea\"\n ) as HTMLTextAreaElement;\n el.value = str;\n el.setAttribute(\"readonly\", \"\");\n el.style.position = \"absolute\";\n el.style.left = \"-9999px\";\n document.body.appendChild(el);\n let selected: Range | boolean =\n document.getSelection().rangeCount > 0\n ? document.getSelection().getRangeAt(0)\n : false;\n el.select();\n document.execCommand(\"copy\");\n document.body.removeChild(el);\n if (selected) {\n document.getSelection().removeAllRanges();\n document.getSelection().addRange(selected);\n return true;\n }\n return false;\n};\n\n// set focus loop within modal\nexport const setFocusLoop = (ref: HTMLElement): void => {\n let modal = ref;\n modal\n .querySelector(\".m-modal-content a:last-of-type\")\n .addEventListener(\"keydown\", leaveLastLink);\n modal\n .querySelector(\".m-modal-content a:first-of-type\")\n .addEventListener(\"keydown\", leaveFirstLink);\n};\n\nexport const leaveLastLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === false) {\n e.preventDefault();\n\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:first-of-type\") as HTMLElement).focus();\n }\n};\n\nexport const leaveFirstLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === true) {\n e.preventDefault();\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:last-of-type\") as HTMLElement).focus();\n }\n};\n","export const userAgent = () => {\n if (\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n )\n ) {\n return \"mobile\";\n }\n return \"desktop\";\n};\n","import {\n MailgoConfig,\n MailgoTranslations,\n MailgoTranslation,\n MailgoAction,\n MailgoLanguages,\n MailgoType,\n MailgoDetail,\n MailgoInstallationType,\n MailgoModalType,\n} from \"mailgo\";\n\n// polyfill\n// import { mailgoPolyfill } from \"./polyfill\";\n\n// constants\nimport {\n MAILTO,\n MAILGO,\n TEL,\n CALLTO,\n SMS,\n MAILGO_MAIL,\n MAILGO_TEL,\n MAILGO_SMS,\n CLASSIC,\n LESS_SPAM,\n NO_MAILGO,\n MOBILE,\n spanHTMLTag,\n aHTMLTag,\n pHTMLTag,\n defaultLang,\n notNumber,\n leadingZeros,\n} from \"./constants\";\n\n// utils\nimport {\n validateEmails,\n validateTel,\n copyToClipboard,\n setFocusLoop,\n} from \"./utils\";\n\n// i18n for mailgo\nimport languages from \"../i18n/languages.json\";\nimport translations from \"../i18n/translations.json\";\n\n// mobile detect\nimport { userAgent } from \"./mobile-detect\";\n\n// mailgo scss, with toString (https://github.com/webpack-contrib/css-loader#tostring)\nconst mailgoCSS: string = require(\"./mailgo.scss\").toString();\n\n// default language\nlet lang: string = defaultLang;\n\n// default strings\nconst defaultStrings: MailgoTranslation = (translations as MailgoTranslations)[\n defaultLang\n];\n\n// translation strings\nlet strings: MailgoTranslation;\n\n// global mailgo config object\nlet config: MailgoConfig;\n\n// config to check if the client is mobile or desktop\nlet isMobile: boolean = false;\n\n// default config attributes\nlet mailtoEnabled: boolean = true;\nlet telEnabled: boolean = true;\nlet smsEnabled: boolean = false;\nlet desktopEnabled: boolean = true;\nlet mobileEnabled: boolean = true;\nlet validateEmailConfig: boolean = true;\nlet validateTelConfig: boolean = true;\nlet showFooterConfig: boolean = true;\nlet loadCSSConfig: boolean = true;\n\n// activeMailgoType\nlet activeMailgoType: MailgoType;\n\n// modals global object\nlet modalMailto: HTMLElement, modalTel: HTMLElement;\n\n// mailgo general variables\nlet url: URL, href: string, lessSpamHref: string;\n\n// mailgo mail variables\nlet mail: string, cc: string, bcc: string, subject: string, bodyMail: string;\n\n// mailgo tel variables\nlet tel: string, msg: string, telegramUsername: string, skypeUsername: string;\n\n// the DOM elements\nlet title: HTMLElement,\n titleTel: HTMLElement,\n detailCc: HTMLElement,\n detailBcc: HTMLElement,\n detailSubject: HTMLElement,\n detailBody: HTMLElement,\n detailMsg: HTMLElement,\n ccValue: HTMLElement,\n bccValue: HTMLElement,\n subjectValue: HTMLElement,\n bodyValue: HTMLElement,\n msgValue: HTMLElement,\n activatedLink: HTMLElement;\n\n// mailgo buttons (actions)\nlet gmail: HTMLLinkElement,\n outlook: HTMLLinkElement,\n yahoo: HTMLLinkElement,\n open: HTMLLinkElement,\n telegram: HTMLLinkElement,\n wa: HTMLLinkElement,\n skype: HTMLLinkElement,\n call: HTMLLinkElement,\n copyMail: HTMLLinkElement,\n copyTel: HTMLLinkElement;\n\n/**\n * mailgoInit\n * the function that creates the mailgo elements in DOM\n */\nconst mailgoInit = (): void => {\n // set the boolean for mobile/desktop\n isMobile = userAgent() === MOBILE;\n\n // responsive settings\n {\n if (typeof config?.desktop !== \"undefined\") {\n desktopEnabled = config.desktop;\n // if it is a desktop and desktop is not enabled no init mailgo\n if (!isMobile && !desktopEnabled) {\n return;\n }\n }\n if (typeof config?.mobile !== \"undefined\") {\n mobileEnabled = config.mobile;\n // if it is a mobile and mobile is not enabled no init mailgo\n if (isMobile && !mobileEnabled) {\n return;\n }\n }\n }\n\n // set the mailgo language\n mailgoSetLanguage();\n\n // mailgo, if mailgo not already exists\n let mailgoExists = !!document.getElementById(MAILGO_MAIL);\n\n // if mailgo is enabled for mailto and it not exists in DOM\n if (mailtoEnabled && !mailgoExists) {\n // modal\n modalMailto = createElement() as HTMLElement;\n modalMailto.style.display = \"none\";\n modalMailto.id = MAILGO_MAIL;\n modalMailto.classList.add(\"m-modal\");\n modalMailto.setAttribute(\"role\", \"dialog\");\n modalMailto.setAttribute(\"tabindex\", \"-1\");\n modalMailto.setAttribute(\"aria-labelledby\", \"m-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalMailto.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalMailto.appendChild(modalContent);\n\n // title (email address)\n title = createElement(\"strong\");\n title.id = \"m-title\";\n title.className = \"m-title\";\n modalContent.appendChild(title);\n\n // details\n let details: HTMLElement = createElement();\n details.id = \"m-details\";\n details.className = \"m-details\";\n\n detailCc = createElement(pHTMLTag);\n detailCc.id = \"m-cc\";\n let ccSpan: HTMLElement = createElement(spanHTMLTag);\n ccSpan.className = \"w-500\";\n ccSpan.appendChild(createTextNode(strings.cc_ || defaultStrings.cc_));\n ccValue = createElement(spanHTMLTag);\n ccValue.id = \"m-cc-value\";\n detailCc.appendChild(ccSpan);\n detailCc.appendChild(ccValue);\n details.appendChild(detailCc);\n\n detailBcc = createElement(pHTMLTag);\n detailBcc.id = \"m-bcc\";\n let bccSpan: HTMLElement = createElement(spanHTMLTag);\n bccSpan.className = \"w-500\";\n bccSpan.appendChild(createTextNode(strings.bcc_ || defaultStrings.bcc_));\n bccValue = createElement(spanHTMLTag);\n bccValue.id = \"m-bcc-value\";\n detailBcc.appendChild(bccSpan);\n detailBcc.appendChild(bccValue);\n details.appendChild(detailBcc);\n\n detailSubject = createElement(pHTMLTag);\n detailSubject.id = \"m-subject\";\n let subjectSpan: HTMLElement = createElement(spanHTMLTag);\n subjectSpan.className = \"w-500\";\n subjectSpan.appendChild(\n createTextNode(strings.subject_ || defaultStrings.subject_)\n );\n subjectValue = createElement(spanHTMLTag);\n subjectValue.id = \"m-subject-value\";\n detailSubject.appendChild(subjectSpan);\n detailSubject.appendChild(subjectValue);\n details.appendChild(detailSubject);\n\n detailBody = createElement(pHTMLTag);\n detailBody.id = \"m-body\";\n let bodySpan: HTMLElement = createElement(spanHTMLTag);\n bodySpan.className = \"w-500\";\n bodySpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n bodyValue = createElement(spanHTMLTag);\n bodyValue.id = \"m-body-value\";\n detailBody.appendChild(bodySpan);\n detailBody.appendChild(bodyValue);\n details.appendChild(detailBody);\n\n modalContent.appendChild(details);\n\n // Gmail\n gmail = createElement(aHTMLTag) as HTMLLinkElement;\n gmail.id = \"m-gmail\";\n gmail.href = \"#mailgo-gmail\";\n gmail.classList.add(\"m-open\");\n gmail.classList.add(\"m-gmail\");\n gmail.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let gmailSpan: HTMLElement = createElement(spanHTMLTag);\n gmailSpan.className = \"w-500\";\n gmailSpan.appendChild(\n createTextNode(strings.gmail || defaultStrings.gmail)\n );\n gmail.appendChild(gmailSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"gmail\")) {\n modalContent.appendChild(gmail);\n }\n\n // Outlook\n outlook = createElement(aHTMLTag) as HTMLLinkElement;\n outlook.id = \"m-outlook\";\n outlook.href = \"#mailgo-outlook\";\n outlook.classList.add(\"m-open\");\n outlook.classList.add(\"m-outlook\");\n outlook.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let outlookSpan: HTMLElement = createElement(spanHTMLTag);\n outlookSpan.className = \"w-500\";\n outlookSpan.appendChild(\n createTextNode(strings.outlook || defaultStrings.outlook)\n );\n outlook.appendChild(outlookSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"outlook\")) {\n modalContent.appendChild(outlook);\n }\n\n // Outlook\n yahoo = createElement(aHTMLTag) as HTMLLinkElement;\n yahoo.id = \"m-yahoo\";\n yahoo.href = \"#mailgo-yahoo\";\n yahoo.classList.add(\"m-open\");\n yahoo.classList.add(\"m-yahoo\");\n yahoo.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let yahooSpan: HTMLElement = createElement(spanHTMLTag);\n yahooSpan.className = \"w-500\";\n yahooSpan.appendChild(\n createTextNode(strings.yahoo || defaultStrings.yahoo)\n );\n yahoo.appendChild(yahooSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"yahoo\")) {\n modalContent.appendChild(yahoo);\n }\n\n // open default\n open = createElement(aHTMLTag) as HTMLLinkElement;\n open.id = \"m-open\";\n open.href = \"#mailgo-open\";\n open.classList.add(\"m-open\");\n open.classList.add(\"m-default\");\n let openSpan: HTMLElement = createElement(spanHTMLTag);\n openSpan.className = \"w-500\";\n openSpan.appendChild(createTextNode(strings.open || defaultStrings.open));\n open.appendChild(openSpan);\n open.appendChild(\n createTextNode(strings._default || defaultStrings._default)\n );\n\n modalContent.appendChild(open);\n\n // copy\n copyMail = createElement(aHTMLTag) as HTMLLinkElement;\n copyMail.id = \"m-copy\";\n copyMail.href = \"#mailgo-copy\";\n copyMail.classList.add(\"m-copy\");\n copyMail.classList.add(\"w-500\");\n copyMail.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyMail);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalMailto);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // mailgo tel, if mailgo-tel not already exists\n let mailgoTelExists = !!document.getElementById(MAILGO_TEL);\n\n // if mailgo is enabled for tel/callto and it not exists in DOM\n if (telEnabled && !mailgoTelExists) {\n // modal\n modalTel = createElement() as HTMLElement;\n modalTel.style.display = \"none\";\n modalTel.id = MAILGO_TEL;\n modalTel.classList.add(\"m-modal\");\n modalTel.setAttribute(\"role\", \"dialog\");\n modalTel.setAttribute(\"tabindex\", \"-1\");\n modalTel.setAttribute(\"aria-labelledby\", \"m-tel-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalTel.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalTel.appendChild(modalContent);\n\n // title (telephone number)\n titleTel = createElement(\"strong\");\n titleTel.id = \"m-tel-title\";\n titleTel.className = \"m-title\";\n modalContent.appendChild(titleTel);\n\n // details\n let detailsTel: HTMLElement = createElement();\n detailsTel.id = \"m-tel-details\";\n detailsTel.className = \"m-details\";\n\n detailMsg = createElement(pHTMLTag);\n detailMsg.id = \"m-msg\";\n let msgSpan: HTMLElement = createElement(spanHTMLTag);\n msgSpan.className = \"w-500\";\n msgSpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n msgValue = createElement(spanHTMLTag);\n msgValue.id = \"m-msg-value\";\n detailMsg.appendChild(msgSpan);\n detailMsg.appendChild(msgValue);\n detailsTel.appendChild(detailMsg);\n\n modalContent.appendChild(detailsTel);\n\n // Telegram\n telegram = createElement(aHTMLTag) as HTMLLinkElement;\n telegram.id = \"m-tg\";\n telegram.href = \"#mailgo-telegram\";\n telegram.classList.add(\"m-open\");\n telegram.classList.add(\"m-tg\");\n\n // by default not display\n telegram.style.display = \"none\";\n\n telegram.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let telegramSpan: HTMLElement = createElement(spanHTMLTag);\n telegramSpan.className = \"w-500\";\n telegramSpan.appendChild(\n createTextNode(strings.telegram || defaultStrings.telegram)\n );\n telegram.appendChild(telegramSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"telegram\")) {\n modalContent.appendChild(telegram);\n }\n\n // WhatsApp\n wa = createElement(aHTMLTag) as HTMLLinkElement;\n wa.id = \"m-wa\";\n wa.href = \"#mailgo-whatsapp\";\n wa.classList.add(\"m-open\");\n wa.classList.add(\"m-wa\");\n wa.appendChild(createTextNode(strings.open_in_ || defaultStrings.open_in_));\n let waSpan: HTMLElement = createElement(spanHTMLTag);\n waSpan.className = \"w-500\";\n waSpan.appendChild(\n createTextNode(strings.whatsapp || defaultStrings.whatsapp)\n );\n wa.appendChild(waSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"whatsapp\")) {\n modalContent.appendChild(wa);\n }\n\n // Skype\n skype = createElement(aHTMLTag) as HTMLLinkElement;\n skype.id = \"m-skype\";\n skype.href = \"#mailgo-skype\";\n skype.classList.add(\"m-open\");\n skype.classList.add(\"m-skype\");\n skype.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let skypeSpan: HTMLElement = createElement(spanHTMLTag);\n skypeSpan.className = \"w-500\";\n skypeSpan.appendChild(\n createTextNode(strings.skype || defaultStrings.skype)\n );\n skype.appendChild(skypeSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"skype\")) {\n modalContent.appendChild(skype);\n }\n\n // call default\n call = createElement(aHTMLTag) as HTMLLinkElement;\n call.id = \"m-call\";\n call.href = \"#mailgo-open\";\n call.classList.add(\"m-open\");\n call.classList.add(\"m-default\");\n let callSpan: HTMLElement = createElement(spanHTMLTag);\n callSpan.className = \"w-500\";\n callSpan.appendChild(createTextNode(strings.call || defaultStrings.call));\n call.appendChild(callSpan);\n call.appendChild(\n createTextNode(strings._as_default || defaultStrings._as_default)\n );\n\n modalContent.appendChild(call);\n\n // copy\n copyTel = createElement(aHTMLTag) as HTMLLinkElement;\n copyTel.id = \"m-tel-copy\";\n copyTel.href = \"#mailgo-copy\";\n copyTel.classList.add(\"m-copy\");\n copyTel.classList.add(\"w-500\");\n copyTel.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyTel);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalTel);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // event listener on body, if the element is mailgo-compatible the mailgo modal will be rendered\n document.addEventListener(\"click\", mailgoClickListener);\n};\n\n/**\n * mailgoClickListener\n * function to check if an element is mailgo-enabled or not referencing to\n * mail:\n * document.querySelectorAll(\n * 'a[href^=\"mailto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * tel:\n * document.querySelectorAll(\n * 'a[href^=\"tel:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"callto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"sms:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n */\nfunction mailgoClickListener(event: Event): boolean {\n // check if the mailgo HTML exists in the body\n if (\n !document.body.contains(modalMailto) &&\n !document.body.contains(modalTel)\n ) {\n return false;\n }\n\n // if a mailgo is already showing do nothing\n if (mailgoIsShowing()) {\n return false;\n }\n\n // the path of the event\n let path =\n (event.composedPath && event.composedPath()) ||\n composedPath(event.target as HTMLElement);\n\n if (path) {\n path.forEach((element: HTMLElement) => {\n if (element instanceof HTMLDocument || element instanceof Window) {\n return false;\n }\n\n // go here only if one of the mailgo modals are enabled\n if (mailtoEnabled || telEnabled || smsEnabled) {\n let localMailgoType = getMailgoTypeByElement(element);\n\n // go on if the localMailgoType is not null\n if (localMailgoType) {\n // set the active mailgo type\n activeMailgoType = localMailgoType;\n\n let activeMailgoModalType = activeMailgoType?.type;\n\n if (activeMailgoModalType) {\n // check if the setting is enabled and if so go with pre-render\n if (\n (mailtoEnabled && activeMailgoModalType === MAILGO_MAIL) ||\n (telEnabled && activeMailgoModalType === MAILGO_TEL) ||\n (smsEnabled && activeMailgoModalType === MAILGO_SMS)\n ) {\n // stop the normal execution of the element click\n event.preventDefault();\n\n // render mailgo\n mailgoPreRender(element as HTMLLinkElement);\n\n return true;\n }\n }\n }\n }\n });\n }\n\n return false;\n}\n\n/**\n * mailgoPreRender\n * function to pre-render a mailgo, it helps populating elements needed by modal\n */\nfunction mailgoPreRender(\n mailgoElementOrUrl: HTMLLinkElement | string\n): boolean {\n let mailgoElement: HTMLLinkElement;\n\n // get the type and installation from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if type is not defined return\n if (!type) return false;\n\n if (typeof mailgoElementOrUrl === \"string\") {\n // if the parameter is a string it is the url\n href = mailgoElementOrUrl as string;\n } else {\n // if the paramenter is an HTMLLinkElement get the href attribute and the element\n href = mailgoElementOrUrl.getAttribute(\"href\") as string;\n mailgoElement = mailgoElementOrUrl as HTMLLinkElement;\n }\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // if the installation is classic\n if (installation === CLASSIC) {\n if (validateUrl(href, MAILTO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILTO)[1].trim());\n } else if (validateUrl(href, MAILGO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILGO)[1].trim());\n }\n\n try {\n url = new URL(href);\n\n let urlParams: URLSearchParams = url.searchParams;\n // optional parameters for the email\n cc = urlParams.get(\"cc\");\n bcc = urlParams.get(\"bcc\");\n subject = urlParams.get(\"subject\");\n bodyMail = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam\n // mail = data-address + @ + data-domain\n mail =\n mailgoElement.getAttribute(\"data-address\") &&\n mailgoElement.getAttribute(\"data-domain\")\n ? mailgoElement.getAttribute(\"data-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-domain\")\n : null;\n\n try {\n url = new URL(MAILTO + encodeURIComponent(mail));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // cc = data-cc-address + @ + data-cc-domain\n cc = mailgoElement.getAttribute(\"data-cc-address\")\n ? mailgoElement.getAttribute(\"data-cc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-cc-domain\")\n : null;\n\n // if cc is defined add it to parameters\n if (cc) parameters.push(\"cc=\" + cc);\n\n // bcc = data-bcc-address + @ + data-bcc-domain\n bcc = mailgoElement.getAttribute(\"data-bcc-address\")\n ? mailgoElement.getAttribute(\"data-bcc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-bcc-domain\")\n : null;\n\n // if bcc is defined add it to parameters\n if (bcc) parameters.push(\"bcc=\" + bcc);\n\n // subject = data-subject\n subject = mailgoElement.getAttribute(\"data-subject\");\n\n // if subject is defined add it to parameters\n if (subject) parameters.push(\"subject=\" + subject);\n\n // body = data-body\n bodyMail = mailgoElement.getAttribute(\"data-body\");\n\n // if body is defined add it to parameters\n if (bodyMail) parameters.push(\"body=\" + bodyMail);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n MAILTO + encodeURIComponent(mail),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateEmail !== \"undefined\") {\n validateEmailConfig = config.validateEmail;\n }\n\n if (validateEmailConfig) {\n // validate the email address\n if (!validateEmails(mail.split(\",\"))) {\n return false;\n }\n\n // if cc, bcc are not valid cc, bcc = \"\"\n if (cc && !validateEmails(cc.split(\",\"))) cc = \"\";\n if (bcc && !validateEmails(bcc.split(\",\"))) bcc = \"\";\n }\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n if (installation === CLASSIC) {\n if (validateUrl(href, TEL)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(TEL)[1].trim());\n } else if (validateUrl(href, CALLTO)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(CALLTO)[1].trim());\n } else if (validateUrl(href, SMS)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(SMS)[1].trim());\n }\n\n try {\n url = new URL(href);\n let urlParams: URLSearchParams = url.searchParams;\n\n // optional parameters for the phone number\n msg = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation == LESS_SPAM) {\n tel = mailgoElement.getAttribute(\"data-tel\");\n msg = mailgoElement.getAttribute(\"data-msg\");\n\n try {\n url = new URL(TEL + encodeURIComponent(tel));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // if msg is defined add it to parameters\n if (msg) parameters.push(\"body=\" + msg);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n TEL + encodeURIComponent(tel),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateTel !== \"undefined\") {\n validateTelConfig = config.validateTel;\n }\n\n // validate the phone number\n if (validateTelConfig) {\n if (!validateTel(tel)) return;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-telegram\")) {\n telegramUsername = mailgoElement.getAttribute(\"data-telegram\");\n } else {\n telegramUsername = null;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-skype\")) {\n skypeUsername = mailgoElement.getAttribute(\"data-skype\");\n } else {\n skypeUsername = null;\n }\n }\n\n // if dark is in config or contained in the element\n if (\n mailgoElement &&\n (config?.dark || mailgoElement.classList.contains(\"dark\"))\n ) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // render mailgo\n mailgoRender();\n\n return true;\n}\n\n/**\n * mailgoDirectRender\n * function to render a mailgo directly from a URL\n */\nfunction mailgoDirectRender(directUrl: string): boolean {\n // start mailgo\n mailgo();\n\n if (validateUrl(directUrl, MAILTO) || validateUrl(directUrl, MAILGO)) {\n activeMailgoType = {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n } else if (\n validateUrl(directUrl, TEL) ||\n validateUrl(directUrl, CALLTO) ||\n validateUrl(directUrl, SMS)\n ) {\n activeMailgoType = {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n }\n return false;\n}\n\n/**\n * mailgoRender\n * function to render a mailgo (mail or tel)\n */\nfunction mailgoRender(): boolean {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n\n // if type is not defined return\n if (!type) return false;\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // the title of the modal (email address)\n title.innerHTML = mail.split(\",\").join(\"
\");\n\n // add the details if provided\n if (mailgoConfigAttributeEnabled(\"detail\", \"cc\") && cc) {\n detailCc.style.display = \"block\";\n ccValue.innerHTML = cc.split(\",\").join(\"
\");\n } else {\n detailCc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"bcc\") && bcc) {\n detailBcc.style.display = \"block\";\n bccValue.innerHTML = bcc.split(\",\").join(\"
\");\n } else {\n detailBcc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"subject\") && subject) {\n detailSubject.style.display = \"block\";\n subjectValue.textContent = subject;\n } else {\n detailSubject.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"body\") && bodyMail) {\n detailBody.style.display = \"block\";\n bodyValue.textContent = bodyMail;\n } else {\n detailBody.style.display = \"none\";\n }\n\n // add the actions\n gmail.addEventListener(\"click\", openGmail);\n\n outlook.addEventListener(\"click\", openOutlook);\n\n yahoo.addEventListener(\"click\", openYahooMail);\n\n open.addEventListener(\"click\", openDefault);\n\n copyMail.addEventListener(\"click\", copy);\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n // the title of the modal (tel)\n titleTel.innerHTML = tel;\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"msg\") && msg) {\n detailMsg.style.display = \"block\";\n msgValue.textContent = msg;\n } else {\n detailMsg.style.display = \"none\";\n }\n\n // add the actions to buttons\n wa.addEventListener(\"click\", openWhatsApp);\n\n // telegram must be shown only if data-telegram is provided\n if (telegramUsername) {\n document.getElementById(\"m-tg\").style.display = \"block\";\n telegram.addEventListener(\"click\", openTelegram);\n } else {\n document.getElementById(\"m-tg\").style.display = \"none\";\n }\n\n skype.addEventListener(\"click\", openSkype);\n\n call.addEventListener(\"click\", openDefault);\n\n copyTel.addEventListener(\"click\", copy);\n }\n\n // show the mailgo\n showMailgo(type);\n\n // add listener keyDown\n document.addEventListener(\"keydown\", mailgoKeydown);\n\n return true;\n}\n\n// actions\nconst openGmail = (event?: Event): void => {\n event.preventDefault();\n\n let urlString: string;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n if (installation === CLASSIC) {\n try {\n urlString = url.toString();\n } catch (e) {\n urlString = href;\n }\n } else if (installation === LESS_SPAM) {\n urlString = lessSpamHref;\n }\n\n // Gmail url\n let gmailUrl: string =\n \"https://mail.google.com/mail/?extsrc=mailto&url=\" +\n encodeURIComponent(urlString);\n\n // open the link\n window.open(gmailUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openOutlook = (event?: Event): void => {\n event.preventDefault();\n\n // Outlook starting url\n let startingOutlookUrl: string =\n \"https://outlook.live.com/owa/?path=/mail/action/compose&to=\";\n\n // let the user to decide to open Office365 Outlook instead of the classic outlook.live.com\n if (config?.office365) {\n startingOutlookUrl =\n \"https://outlook.office365.com/owa/?path=/mail/action/compose&to=\";\n }\n\n // Outlook url\n let outlookUrl: string = startingOutlookUrl + encodeURIComponent(mail);\n\n // the details if provided\n if (subject) {\n outlookUrl = outlookUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n\n if (bodyMail) {\n outlookUrl = outlookUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(outlookUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openYahooMail = (event?: Event): void => {\n event.preventDefault();\n\n // Yahoo url\n let yahooUrl: string = \"https://compose.mail.yahoo.com/?to=\" + mail;\n\n // the details if provided\n if (subject) {\n yahooUrl = yahooUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n if (bodyMail) {\n yahooUrl = yahooUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(yahooUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openTelegram = (event?: Event): void => {\n event.preventDefault();\n\n // check if telegramUsername exists\n if (telegramUsername) {\n // Telegram url\n let tgUrl: string = \"https://t.me/\" + encodeURIComponent(telegramUsername);\n\n // open the url\n window.open(tgUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n }\n};\n\nconst openSkype = (event?: Event): void => {\n event.preventDefault();\n\n let skype: string = skypeUsername || tel;\n\n // Telegram url\n let skypeUrl: string = \"skype:\" + encodeURIComponent(skype);\n\n // open the url\n window.open(skypeUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openWhatsApp = (event?: Event): void => {\n event.preventDefault();\n\n // WhatsApp API doesn't work with non number digits and leading 0s: https://faq.whatsapp.com/general/chats/how-to-use-click-to-chat/\n let whatappTel = tel.replace(notNumber, \"\").replace(leadingZeros, \"\");\n\n // WhatsApp url\n let waUrl: string = \"https://wa.me/\" + encodeURIComponent(whatappTel);\n\n // the details if provided\n if (msg) {\n waUrl = waUrl.concat(\"?text=\" + encodeURIComponent(msg));\n }\n\n // open the url\n window.open(waUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openDefault = (event?: Event): void => {\n event.preventDefault();\n\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if the installation is classic the browser can follow the default behaviour\n if (installation === CLASSIC) {\n window.location.href = href;\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam use the built less-spam href\n window.location.href = lessSpamHref;\n }\n\n hideMailgo();\n};\n\nconst copy = (event?: Event): void => {\n event.preventDefault();\n\n // the correct copyButton (mail or tel)\n if (mailgoIsShowing()) {\n let activeCopy: HTMLElement;\n\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n // in case it is showing mail modal copy email address\n copyToClipboard(mail);\n activeCopy = copyMail;\n } else {\n // in case it is showing tel modal copy phone number\n copyToClipboard(tel);\n activeCopy = copyTel;\n }\n\n activeCopy.textContent = strings.copied || defaultStrings.copied;\n setTimeout(() => {\n activeCopy.textContent = strings.copy || defaultStrings.copy;\n // hide after the timeout\n hideMailgo();\n }, 999);\n }\n};\n\n// function to find if a link is a mailto, tel, callto or sms\nconst validateUrl = (url: string, type: string = MAILTO) => {\n let regexValidate = new RegExp(\"^\" + type + \"((.)+)\", \"gi\");\n return regexValidate.test(url);\n};\n\n// function that returns if an element is a mailgo\nfunction getMailgoTypeByElement(element: HTMLElement): MailgoType | null {\n let elementHref: string = (element as HTMLLinkElement).getAttribute(\"href\");\n\n // return null if there is no-mailgo in class\n if (element.classList?.contains(NO_MAILGO)) {\n return null;\n }\n\n // the case of classic type of mailgo, like a href=mailto:... or a href=tel:... and the class=mailgo with a useful href\n if (elementHref || element.classList?.contains(\"mailgo\")) {\n if (validateUrl(elementHref, MAILTO) || validateUrl(elementHref, MAILGO)) {\n // a mailto: or mailgo:\n return {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n } else if (\n validateUrl(elementHref, TEL) ||\n validateUrl(elementHref, CALLTO)\n ) {\n // a tel: or callto:\n return {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n } else if (validateUrl(elementHref, SMS)) {\n // a sms:\n return {\n type: MAILGO_SMS,\n installation: CLASSIC,\n };\n }\n }\n\n if (elementHref === \"#mailgo\" || element.classList?.contains(\"mailgo\")) {\n // less-spam installation of mailgo, check to the attributes\n if (\n element.hasAttribute(\"data-address\") &&\n element.hasAttribute(\"data-domain\")\n ) {\n // less-spam mailto with data-address and data-domain\n return {\n type: MAILGO_MAIL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-tel\")) {\n // less-spam tel with data-tel\n return {\n type: MAILGO_TEL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-msg\")) {\n // less-spam sms with data-msd\n return {\n type: MAILGO_SMS,\n installation: LESS_SPAM,\n };\n }\n }\n\n return null;\n}\n\n/**\n * mailgoKeydown\n * function to manage the keydown event when the modal is showing, return a boolean that represents if a useful key has been pressed\n */\nconst mailgoKeydown = (keyboardEvent: KeyboardEvent): boolean => {\n // if mailgo is showing\n if (mailgoIsShowing()) {\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 71:\n // g -> open GMail\n openGmail();\n return true;\n case 79:\n // o -> open Outlook\n openOutlook();\n return true;\n case 89:\n // y -> open Yahoo Mail\n openYahooMail();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n } else if (type === MAILGO_TEL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 84:\n // t -> open Telegram\n openTelegram();\n return true;\n case 87:\n // w -> open WhatsApp\n openWhatsApp();\n return true;\n case 83:\n // s -> open Skype\n openSkype();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n }\n }\n return false;\n};\n\n// show the modal\nconst showMailgo = (type: MailgoModalType): void => {\n // show the correct modal\n setModalDisplay(type, \"flex\");\n};\n\n// hide the modal\nconst hideMailgo = (): void => {\n // hide all the modals\n setModalDisplay(MAILGO_MAIL, \"none\");\n setModalDisplay(MAILGO_TEL, \"none\");\n\n // remove listener keyDown\n document.removeEventListener(\"keydown\", mailgoKeydown);\n};\n\n// is the mailgo modal hidden?\nconst mailgoIsShowing = (): boolean => {\n return (\n (mailtoEnabled && getModalDisplay(MAILGO_MAIL) === \"flex\") ||\n ((telEnabled || smsEnabled) && getModalDisplay(MAILGO_TEL) === \"flex\")\n );\n};\n\nconst byElement = (): HTMLLinkElement => {\n // by element in the footer\n let by: HTMLLinkElement = createElement(aHTMLTag) as HTMLLinkElement;\n by.href = \"https://mailgo.dev?ref=mailgo-modal\";\n by.className = \"m-by\";\n by.target = \"_blank\";\n by.rel = \"noopener noreferrer\";\n by.appendChild(createTextNode(\"mailgo.dev\"));\n\n return by;\n};\n\n// create element\nconst createElement = (element: string = \"div\"): HTMLElement =>\n document.createElement(element);\n\n// create text node\nconst createTextNode = (element: string): Text =>\n document.createTextNode(element);\n\n// get the correct HTMLElement from a type\nconst getModalHTMLElement = (type: MailgoModalType = MAILGO_MAIL) => {\n if (type === MAILGO_TEL) {\n return modalTel;\n } else {\n return modalMailto;\n }\n};\n\n// get display value\nconst getModalDisplay = (ref: MailgoModalType = MAILGO_MAIL): string =>\n getModalHTMLElement(ref).style.display;\n\n// set display value\nconst setModalDisplay = (\n ref: MailgoModalType = MAILGO_MAIL,\n value: string\n): void => {\n let modal = getModalHTMLElement(ref);\n\n if (modal) {\n modal.style.display = value;\n\n if (value === \"flex\") {\n // \"save\" the activated link.\n activatedLink = document.activeElement as HTMLElement;\n modal.setAttribute(\"aria-hidden\", \"false\");\n\n // Focus on the modal container.\n modal.setAttribute(\"tabindex\", \"0\");\n modal.focus();\n setFocusLoop(modal);\n } else {\n modal.setAttribute(\"aria-hidden\", \"true\");\n\n // focus back the activated link for getting back to the context.\n modal.setAttribute(\"tabindex\", \"-1\");\n activatedLink.focus();\n }\n }\n};\n\n// enable dark mode\nconst enableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.add(\"m-dark\");\n }\n};\n\n// disable dark mode\nconst disableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.remove(\"m-dark\");\n }\n};\n\n// custom composedPath if path or event.composedPath() are not defined\nconst composedPath = (\n el: HTMLElement\n): (HTMLElement | Document | (Window & typeof globalThis))[] => {\n let path = [];\n\n while (el) {\n path.push(el);\n\n if (el.tagName === \"HTML\") {\n path.push(document);\n path.push(window);\n return path;\n }\n\n el = el.parentElement;\n }\n};\n\n// function to recreate a mailto: or tel: href from less-spam\nconst buildLessSpamHref = (type: string, parameters: string[]): string => {\n lessSpamHref = type;\n if (parameters && parameters.length > 0) {\n let joinedParams = parameters.join(\"&\");\n lessSpamHref = lessSpamHref.concat(\"?\" + joinedParams);\n }\n return lessSpamHref;\n};\n\n// function to check an attribute is enabled or not, by default considering it enabled\nconst mailgoConfigAttributeEnabled = (\n type: \"action\" | \"detail\",\n attribute: MailgoAction | MailgoDetail\n): boolean => {\n console.log(type);\n console.log(attribute);\n\n // by default all the actions and attribute are enabled\n if (!config) {\n console.log(\"caso 1\");\n return true;\n }\n\n // if the attribute type is action consider the actions config attribute\n if (type === \"action\") {\n if (config && !config?.actions) {\n console.log(\"caso 2\");\n return true;\n }\n\n if (\n config &&\n config.actions &&\n config?.actions[attribute as MailgoAction] === false\n ) {\n console.log(\"caso 3\");\n return false;\n }\n } else if (type === \"detail\") {\n // else consider the details attribute\n\n if (config && !config?.details) {\n console.log(\"caso 2\");\n return true;\n }\n\n if (\n config &&\n config.details &&\n config?.details[attribute as MailgoDetail] === false\n ) {\n console.log(\"caso 4\");\n return false;\n }\n }\n\n return true;\n};\n\n// manage the language of mailgo\nconst mailgoSetLanguage = (): string => {\n let languageType = \"default lang\";\n\n // if a language is defined in configuration use it\n if (\n config?.lang &&\n (languages as MailgoLanguages).indexOf(config.lang) !== -1\n ) {\n lang = config.lang;\n languageType = \"config lang\";\n } else {\n // else if is defined use it!\n // keep the lang from html\n let htmlLang: string = document.documentElement.lang;\n\n // find the correct language using the lang attribute, not just a === because there a are cases like fr-FR or fr_FR in html lang attribute\n (languages as MailgoLanguages).forEach((language: any) => {\n if (new RegExp(\"^\" + language, \"gi\").test(htmlLang)) {\n lang = language;\n languageType = \"html lang\";\n }\n });\n }\n\n // strings\n strings = (translations as MailgoTranslations)[lang];\n\n return languageType;\n};\n\nconst mailgoStyle = (): void => {\n if (!document.getElementById(\"mailgo-style\")) {\n // mailgo style\n let mailgoCSSElement: HTMLStyleElement = createElement(\n \"style\"\n ) as HTMLStyleElement;\n mailgoCSSElement.id = \"mailgo-style\";\n mailgoCSSElement.type = \"text/css\";\n mailgoCSSElement.appendChild(createTextNode(mailgoCSS));\n document.head.appendChild(mailgoCSSElement);\n }\n};\n\n// mailgo\nfunction mailgo(mailgoConfig?: MailgoConfig): boolean {\n try {\n // polyfill mailgo\n // mailgoPolyfill();\n\n // set the global config merging window mailgConfig and mailgoConfig passed as a parameter\n config = { ...mailgoConfig, ...((window as any)?.mailgoConfig || null) };\n\n // if the window is defined...\n if (typeof window !== \"undefined\") {\n // if is set in config use it (load the mailgo CSS)\n if (typeof config?.loadCSS !== \"undefined\") {\n loadCSSConfig = config.loadCSS;\n }\n\n // if is set in config use it (enable mailto)\n if (typeof config?.mailto !== \"undefined\") {\n mailtoEnabled = config.mailto;\n }\n\n // if is set in config use it (enable tel)\n if (typeof config?.tel !== \"undefined\") {\n telEnabled = config.tel;\n }\n\n // if is set in config use it (enable sms)\n if (typeof config?.sms !== \"undefined\") {\n smsEnabled = config.sms;\n }\n\n // if load css enabled load it!\n if (loadCSSConfig) {\n // add the style for mailgo\n mailgoStyle();\n }\n\n // if is set an initEvent add the listener\n if (config?.initEvent) {\n if (config?.listenerOptions) {\n // listener options specified\n document.addEventListener(\n config.initEvent,\n mailgoInit,\n config.listenerOptions\n );\n } else {\n // no listener options\n document.addEventListener(config.initEvent, mailgoInit);\n }\n } else {\n mailgoInit();\n }\n\n return true;\n }\n } catch (error) {\n console.log(error);\n }\n return false;\n}\n\n// define the methods also for window element\nif (typeof window !== \"undefined\") {\n (window as any).getMailgoTypeByElement = getMailgoTypeByElement;\n (window as any).mailgoClickListener = mailgoClickListener;\n (window as any).mailgoCheckRender = mailgoClickListener; // for compatibility with old version of mailgo\n (window as any).mailgoPreRender = mailgoPreRender;\n (window as any).mailgoDirectRender = mailgoDirectRender;\n (window as any).mailgoRender = mailgoRender;\n (window as any).mailgo = mailgo;\n}\n\nexport {\n getMailgoTypeByElement,\n mailgoClickListener,\n mailgoPreRender,\n mailgoDirectRender,\n mailgoRender,\n};\n\nexport default mailgo;\n","// webpack > dist/mailgo.min.js\n\nimport mailgo from \"../src/mailgo\";\n\n// call init mailgo attached to the event DOMContentLoaded\nconst mailgoConfig = {\n initEvent: \"DOMContentLoaded\",\n};\n\nmailgo(mailgoConfig);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(474);\n"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/mailgo.min.js b/dist/mailgo.min.js index 4c21aeb..87f5979 100644 --- a/dist/mailgo.min.js +++ b/dist/mailgo.min.js @@ -1,2 +1,2 @@ -window.mailgo=function(){var e={91:function(e,o,t){var a=t(476)((function(e){return e[1]}));a.push([e.id,'.m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:16.5px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:#20232a;opacity:.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:.95;border-radius:20px;box-shadow:0 3px 20px rgba(32,35,42,.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:24px;transition:.5s box-shadow}.m-modal .m-modal-content:hover,.m-modal .m-modal-content:focus,.m-modal .m-modal-content:active{opacity:1}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2em}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{cursor:pointer;padding:10px;color:#4a4a4a;border-radius:20px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#c0372a}.m-modal .m-modal-content a.m-gmail:hover,.m-modal .m-modal-content a.m-gmail:focus,.m-modal .m-modal-content a.m-gmail:active{background-color:rgba(192,55,42,.08);color:#c0372a}.m-modal .m-modal-content a.m-outlook{color:#0967aa}.m-modal .m-modal-content a.m-outlook:hover,.m-modal .m-modal-content a.m-outlook:focus,.m-modal .m-modal-content a.m-outlook:active{background-color:rgba(9,103,170,.08);color:#0967aa}.m-modal .m-modal-content a.m-yahoo{color:#4a00a0}.m-modal .m-modal-content a.m-yahoo:hover,.m-modal .m-modal-content a.m-yahoo:focus,.m-modal .m-modal-content a.m-yahoo:active{background-color:rgba(74,0,160,.08);color:#4a00a0}.m-modal .m-modal-content a.m-tg{color:#086da0}.m-modal .m-modal-content a.m-tg:hover,.m-modal .m-modal-content a.m-tg:focus,.m-modal .m-modal-content a.m-tg:active{background-color:rgba(8,109,160,.08);color:#086da0}.m-modal .m-modal-content a.m-wa{color:#067466}.m-modal .m-modal-content a.m-wa:hover,.m-modal .m-modal-content a.m-wa:focus,.m-modal .m-modal-content a.m-wa:active{background-color:rgba(6,116,102,.08);color:#067466}.m-modal .m-modal-content a.m-skype{color:#076d92}.m-modal .m-modal-content a.m-skype:hover,.m-modal .m-modal-content a.m-skype:focus,.m-modal .m-modal-content a.m-skype:active{background-color:rgba(7,109,146,.08);color:#076d92}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-default:focus,.m-modal .m-modal-content a.m-default:active,.m-modal .m-modal-content a.m-copy:hover,.m-modal .m-modal-content a.m-copy:focus,.m-modal .m-modal-content a.m-copy:active{background-color:rgba(0,0,0,.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:12px;margin-top:.8rem;padding:5px;color:#4a4a4a}.m-modal .m-modal-content a.m-by:hover,.m-modal .m-modal-content a.m-by:focus,.m-modal .m-modal-content a.m-by:active{color:#3d3d3d}.m-modal .m-modal-content .w-500{font-weight:500}.m-modal.m-dark .m-modal-content{background-color:#20232a}.m-modal.m-dark .m-modal-content,.m-modal.m-dark .m-modal-content p,.m-modal.m-dark .m-modal-content p span,.m-modal.m-dark .m-modal-content strong{color:#fff}.m-modal.m-dark .m-modal-content a{color:#eaeaea}.m-modal.m-dark .m-modal-content a:not(.m-by):hover,.m-modal.m-dark .m-modal-content a:not(.m-by):focus,.m-modal.m-dark .m-modal-content a:not(.m-by):active{background-color:rgba(134,134,134,.08);color:#eaeaea}.m-modal.m-dark .m-modal-content a.m-gmail{color:#e07d73}.m-modal.m-dark .m-modal-content a.m-gmail:hover,.m-modal.m-dark .m-modal-content a.m-gmail:focus,.m-modal.m-dark .m-modal-content a.m-gmail:active{background-color:rgba(224,125,115,.08);color:#e07d73}.m-modal.m-dark .m-modal-content a.m-outlook{color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-outlook:hover,.m-modal.m-dark .m-modal-content a.m-outlook:focus,.m-modal.m-dark .m-modal-content a.m-outlook:active{background-color:rgba(76,156,215,.08);color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-yahoo{color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-yahoo:hover,.m-modal.m-dark .m-modal-content a.m-yahoo:focus,.m-modal.m-dark .m-modal-content a.m-yahoo:active{background-color:rgba(172,136,211,.08);color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-tg{color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-tg:hover,.m-modal.m-dark .m-modal-content a.m-tg:focus,.m-modal.m-dark .m-modal-content a.m-tg:active{background-color:rgba(76,171,219,.08);color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-wa{color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-wa:hover,.m-modal.m-dark .m-modal-content a.m-wa:focus,.m-modal.m-dark .m-modal-content a.m-wa:active{background-color:rgba(76,210,192,.08);color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-skype{color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-skype:hover,.m-modal.m-dark .m-modal-content a.m-skype:focus,.m-modal.m-dark .m-modal-content a.m-skype:active{background-color:rgba(76,199,244,.08);color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-by:hover,.m-modal.m-dark .m-modal-content a.m-by:focus,.m-modal.m-dark .m-modal-content a.m-by:active{color:#fff}',""]),e.exports=a},476:function(e){"use strict";e.exports=function(e){var o=[];return o.toString=function(){return this.map((function(o){var t=e(o);return o[2]?"@media ".concat(o[2]," {").concat(t,"}"):t})).join("")},o.i=function(e,t,a){"string"==typeof e&&(e=[[null,e,""]]);var n={};if(a)for(var d=0;d()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},b=function(e){return e.every(g)},y=function(e){var o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style.position="absolute",o.style.left="-9999px",document.body.appendChild(o);var t=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);return o.select(),document.execCommand("copy"),document.body.removeChild(o),!!t&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(t),!0)},h=function(e){var o=e;o.querySelector(".m-modal-content a:last-of-type").addEventListener("keydown",k),o.querySelector(".m-modal-content a:first-of-type").addEventListener("keydown",_)},k=function(e){"Tab"===e.code&&!1===e.shiftKey&&(e.preventDefault(),e.target.closest("div").querySelector("a:first-of-type").focus())},_=function(e){"Tab"===e.code&&!0===e.shiftKey&&(e.preventDefault(),e.target.closest("div").querySelector("a:last-of-type").focus())},w=JSON.parse('["en","it","es","de","fr","pt","nl","ru","sv","no","dk","is","zh"]'),C=JSON.parse('{"en":{"open_in_":"open in ","cc_":"cc ","bcc_":"bcc ","subject_":"subject ","body_":"body ","gmail":"Gmail","outlook":"Outlook","yahoo":"Yahoo Mail","telegram":"Telegram","whatsapp":"WhatsApp","skype":"Skype","call":"call","open":"open","_default":" default","_as_default":" as default","copy":"copy","copied":"copied"},"it":{"open_in_":"apri con ","bcc_":"ccn ","subject_":"oggetto ","body_":"testo ","call":"chiama","open":"apri","_default":" ","_as_default":" ","copy":"copia","copied":"copiato"},"es":{"open_in_":"abrir con ","bcc_":"cco ","subject_":"asunto ","body_":"cuerpo ","call":"llamar","open":"abrir","_default":" predefinido","_as_default":" por defecto","copy":"copiar","copied":"copiado"},"de":{"open_in_":"Öffnen in ","subject_":"Betreff ","body_":"Nachricht ","call":"Anrufen","open":"Öffnen","_default":" mit Standard","_as_default":" mit Standard","copy":"kopieren","copied":"kopiert"},"pt":{"open_in_":"abrir com ","bcc_":"cco ","subject_":"assunto ","body_":"corpo ","call":"ligar","open":"abrir","_default":" padrão","_as_default":" por padrão","copy":"copiar","copied":"copiado"},"fr":{"open_in_":"Ouvrir dans ","bcc_":"cci ","subject_":"sujet ","body_":"contenu ","call":"Appeler","open":"Ouvrir","_default":" par défaut","_as_default":" par défaut","copy":"Copier","copied":"copié"},"nl":{"subject_":"onderwerp ","body_":"bericht ","call":"bellen","open":"openen","_default":" standaard","_as_default":" als standaard","copy":"kopiëren"},"ru":{"open_in_":"открыть в ","subject_":"тема ","body_":"тело ","call":"позвонить","open":"открыть","_default":" по умолчанию","_as_default":" по умолчанию","copy":"скопировать"},"sv":{"open_in_":"öppna i ","subject_":"ämne ","body_":"meddelandetext ","call":"ring","open":"öppna","_default":" förval","_as_default":" som förval","copy":"kopiera","copied":"kopierad"},"no":{"open_in_":"åpne i ","subject_":"emne ","call":"ringe","open":"åpne","_as_default":" som standard","copy":"kopiere","copied":"kopiert"},"dk":{"open_in_":"åpne i ","subject_":"emne ","call":"ringe op","open":"åben","_as_default":" som standard","copy":"kopi","copied":"kopieret"},"is":{"open_in_":"opið inn ","subject_":"viðfangsefni ","body_":"líkami ","call":"hringja","open":"opið","_default":" sjálfgefið","_as_default":" sem sjálfgefið","copy":"afrita","copied":"afritað"},"zh":{"open_in_":"開啟 ","cc_":"副本 ","bcc_":"密件副本 ","subject_":"主旨 ","body_":"內文 ","call":"通話","open":"開啟","_default":" 預設","_as_default":" 預設","copy":"複製","copied":"已複製"}}');function x(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,a)}return t}function L(e){for(var o=1;o"),to("detail","cc")&&D?(W.style.display="block",Q.innerHTML=D.split(",").join("
")):W.style.display="none",to("detail","bcc")&&T?(Z.style.display="block",V.innerHTML=T.split(",").join("
")):Z.style.display="none",to("detail","subject")&&z?($.style.display="block",X.textContent=z):$.style.display="none",to("detail","body")&&M?(G.style.display="block",ee.textContent=M):G.style.display="none",ae.addEventListener("click",Ie),ne.addEventListener("click",Ne),de.addEventListener("click",Ue),le.addEventListener("click",ze),se.addEventListener("click",Me)):o===r&&(K.innerHTML=B,to("detail","msg")&&H?(Y.style.display="block",oe.textContent=H):Y.style.display="none",me.addEventListener("click",Te),F?(document.getElementById("m-tg").style.display="block",ie.addEventListener("click",Pe)):document.getElementById("m-tg").style.display="none",re.addEventListener("click",De),ce.addEventListener("click",ze),pe.addEventListener("click",Me)),qe(o),document.addEventListener("keydown",Fe),!0)}var Ie=function(e){var o,t;e.preventDefault();var a=null===(o=R)||void 0===o?void 0:o.installation;if(a===s)try{t=I.toString()}catch(e){t=N}else a===p&&(t=U);var n="https://mail.google.com/mail/?extsrc=mailto&url="+encodeURIComponent(t);window.open(n,"_blank","noopener, noreferrer"),Je()},Ne=function(e){var o;e.preventDefault();var t="https://outlook.live.com/owa/?path=/mail/action/compose&to=";null!==(o=A)&&void 0!==o&&o.office365&&(t="https://outlook.office365.com/owa/?path=/mail/action/compose&to=");var a=t+encodeURIComponent(P);z&&(a=a.concat("&subject="+encodeURIComponent(z))),M&&(a=a.concat("&body="+encodeURIComponent(M))),window.open(a,"_blank","noopener, noreferrer"),Je()},Ue=function(e){e.preventDefault();var o="https://compose.mail.yahoo.com/?to="+P;z&&(o=o.concat("&subject="+encodeURIComponent(z))),M&&(o=o.concat("&body="+encodeURIComponent(M))),window.open(o,"_blank","noopener, noreferrer"),Je()},Pe=function(e){if(e.preventDefault(),F){var o="https://t.me/"+encodeURIComponent(F);window.open(o,"_blank","noopener, noreferrer"),Je()}},De=function(e){e.preventDefault();var o="skype:"+encodeURIComponent(q||B);window.open(o,"_blank","noopener, noreferrer"),Je()},Te=function(e){e.preventDefault();var o=B.replace(ge,"").replace(be,""),t="https://wa.me/"+encodeURIComponent(o);H&&(t=t.concat("?text="+encodeURIComponent(H))),window.open(t,"_blank","noopener, noreferrer"),Je()},ze=function(e){var o;e.preventDefault();var t=null===(o=R)||void 0===o?void 0:o.installation;t===s?window.location.href=N:t===p&&(window.location.href=U),Je()},Me=function(e){var o,t;(e.preventDefault(),Ke())&&((null===(o=R)||void 0===o?void 0:o.type)===m?(y(P),t=se):(y(B),t=pe),t.textContent=E.copied||ve.copied,setTimeout((function(){t.textContent=E.copy||ve.copy,Je()}),999))},Be=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,t=new RegExp("^"+o+"((.)+)","gi");return t.test(e)};function He(e){var o,t,u,f=e.getAttribute("href");if(null!==(o=e.classList)&&void 0!==o&&o.contains("no-mailgo"))return null;if(f||null!==(t=e.classList)&&void 0!==t&&t.contains("mailgo")){if(Be(f,a)||Be(f,n))return{type:m,installation:s};if(Be(f,d)||Be(f,l))return{type:r,installation:s};if(Be(f,i))return{type:c,installation:s}}if("#mailgo"===f||null!==(u=e.classList)&&void 0!==u&&u.contains("mailgo")){if(e.hasAttribute("data-address")&&e.hasAttribute("data-domain"))return{type:m,installation:p};if(e.hasAttribute("data-tel"))return{type:r,installation:p};if(e.hasAttribute("data-msg"))return{type:c,installation:p}}return null}var Fe=function(e){if(Ke()){var o,t=null===(o=R)||void 0===o?void 0:o.type;if(t===m)switch(e.keyCode){case 27:return Je(),!0;case 71:return Ie(),!0;case 79:return Ne(),!0;case 89:return Ue(),!0;case 32:case 13:return ze(),!0;case 67:return Me(),!0;default:return!1}else if(t===r)switch(e.keyCode){case 27:return Je(),!0;case 84:return Pe(),!0;case 87:return Te(),!0;case 83:return De(),!0;case 32:case 13:return ze(),!0;case 67:return Me(),!0;default:return!1}}return!1},qe=function(e){Qe(e,"flex")},Je=function(){Qe(m,"none"),Qe(r,"none"),document.removeEventListener("keydown",Fe)},Ke=function(){return he&&"flex"===Ye(m)||(ke||_e)&&"flex"===Ye(r)},We=function(){var e=Ze(f);return e.href="https://mailgo.dev?ref=mailgo-modal",e.className="m-by",e.target="_blank",e.rel="noopener noreferrer",e.appendChild($e("mailgo.dev")),e},Ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div";return document.createElement(e)},$e=function(e){return document.createTextNode(e)},Ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;return e===r?O:S},Ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;return Ge(e).style.display},Qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,o=arguments.length>1?arguments[1]:void 0,t=Ge(e);t&&(t.style.display=o,"flex"===o?(te=document.activeElement,t.setAttribute("aria-hidden","false"),t.setAttribute("tabindex","0"),t.focus(),h(t)):(t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex","-1"),te.focus()))},Ve=function(){var e,o=null===(e=R)||void 0===e?void 0:e.type;o&&Ge(o).classList.add("m-dark")},Xe=function(){var e,o=null===(e=R)||void 0===e?void 0:e.type;o&&Ge(o).classList.remove("m-dark")},eo=function(e){for(var o=[];e;){if(o.push(e),"HTML"===e.tagName)return o.push(document),o.push(window),o;e=e.parentElement}},oo=function(e,o){if(U=e,o&&o.length>0){var t=o.join("&");U=U.concat("?"+t)}return U},to=function(e,o){var t,a;if(!A)return!0;if(A&&(null===(t=A)||void 0===t||!t.actions))return!0;if("action"===e){if(A&&A.actions&&!1===(null===(a=A)||void 0===a?void 0:a.actions[o]))return!1}else if("detail"===e){var n;if(A&&A.details&&!1===(null===(n=A)||void 0===n?void 0:n.details[o]))return!1}return!0},ao=function(){var e,o="default lang";if(null!==(e=A)&&void 0!==e&&e.lang&&-1!==w.indexOf(A.lang))fe=A.lang,o="config lang";else{var t=document.documentElement.lang;w.forEach((function(e){new RegExp("^"+e,"gi").test(t)&&(fe=e,o="html lang")}))}return E=C[fe],o};function no(e){try{var o;if(A=L(L({},e),(null===(o=window)||void 0===o?void 0:o.mailgoConfig)||null),"undefined"!=typeof window){var t,a,n,d,l,i;if(void 0!==(null===(t=A)||void 0===t?void 0:t.loadCSS)&&(Ee=A.loadCSS),void 0!==(null===(a=A)||void 0===a?void 0:a.mailto)&&(he=A.mailto),void 0!==(null===(n=A)||void 0===n?void 0:n.tel)&&(ke=A.tel),void 0!==(null===(d=A)||void 0===d?void 0:d.sms)&&(_e=A.sms),Ee&&function(){if(!document.getElementById("mailgo-style")){var e=Ze("style");e.id="mailgo-style",e.type="text/css",e.appendChild($e(ue)),document.head.appendChild(e)}}(),null!==(l=A)&&void 0!==l&&l.initEvent)null!==(i=A)&&void 0!==i&&i.listenerOptions?document.addEventListener(A.initEvent,Ae,A.listenerOptions):document.addEventListener(A.initEvent,Ae);else Ae();return!0}}catch(e){console.log(e)}return!1}"undefined"!=typeof window&&(window.getMailgoTypeByElement=He,window.mailgoClickListener=Re,window.mailgoCheckRender=Re,window.mailgoPreRender=Se,window.mailgoDirectRender=function(e){return no(),Be(e,a)||Be(e,n)?(R={type:m,installation:s},Se(e),!0):!!(Be(e,d)||Be(e,l)||Be(e,i))&&(R={type:r,installation:s},Se(e),!0)},window.mailgoRender=Oe,window.mailgo=no);no({initEvent:"DOMContentLoaded"})}},o={};function t(a){if(o[a])return o[a].exports;var n=o[a]={id:a,exports:{}};return e[a](n,n.exports,t),n.exports}return t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t(474)}(); +window.mailgo=function(){var e={91:function(e,o,t){var a=t(476)((function(e){return e[1]}));a.push([e.id,'.m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:16.5px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:#20232a;opacity:.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:.95;border-radius:20px;box-shadow:0 3px 20px rgba(32,35,42,.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:24px;transition:.5s box-shadow}.m-modal .m-modal-content:hover,.m-modal .m-modal-content:focus,.m-modal .m-modal-content:active{opacity:1}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2em}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{cursor:pointer;padding:10px;color:#4a4a4a;border-radius:20px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#c0372a}.m-modal .m-modal-content a.m-gmail:hover,.m-modal .m-modal-content a.m-gmail:focus,.m-modal .m-modal-content a.m-gmail:active{background-color:rgba(192,55,42,.08);color:#c0372a}.m-modal .m-modal-content a.m-outlook{color:#0967aa}.m-modal .m-modal-content a.m-outlook:hover,.m-modal .m-modal-content a.m-outlook:focus,.m-modal .m-modal-content a.m-outlook:active{background-color:rgba(9,103,170,.08);color:#0967aa}.m-modal .m-modal-content a.m-yahoo{color:#4a00a0}.m-modal .m-modal-content a.m-yahoo:hover,.m-modal .m-modal-content a.m-yahoo:focus,.m-modal .m-modal-content a.m-yahoo:active{background-color:rgba(74,0,160,.08);color:#4a00a0}.m-modal .m-modal-content a.m-tg{color:#086da0}.m-modal .m-modal-content a.m-tg:hover,.m-modal .m-modal-content a.m-tg:focus,.m-modal .m-modal-content a.m-tg:active{background-color:rgba(8,109,160,.08);color:#086da0}.m-modal .m-modal-content a.m-wa{color:#067466}.m-modal .m-modal-content a.m-wa:hover,.m-modal .m-modal-content a.m-wa:focus,.m-modal .m-modal-content a.m-wa:active{background-color:rgba(6,116,102,.08);color:#067466}.m-modal .m-modal-content a.m-skype{color:#076d92}.m-modal .m-modal-content a.m-skype:hover,.m-modal .m-modal-content a.m-skype:focus,.m-modal .m-modal-content a.m-skype:active{background-color:rgba(7,109,146,.08);color:#076d92}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-default:focus,.m-modal .m-modal-content a.m-default:active,.m-modal .m-modal-content a.m-copy:hover,.m-modal .m-modal-content a.m-copy:focus,.m-modal .m-modal-content a.m-copy:active{background-color:rgba(0,0,0,.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:12px;margin-top:.8rem;padding:5px;color:#4a4a4a}.m-modal .m-modal-content a.m-by:hover,.m-modal .m-modal-content a.m-by:focus,.m-modal .m-modal-content a.m-by:active{color:#3d3d3d}.m-modal .m-modal-content .w-500{font-weight:500}.m-modal.m-dark .m-modal-content{background-color:#20232a}.m-modal.m-dark .m-modal-content,.m-modal.m-dark .m-modal-content p,.m-modal.m-dark .m-modal-content p span,.m-modal.m-dark .m-modal-content strong{color:#fff}.m-modal.m-dark .m-modal-content a{color:#eaeaea}.m-modal.m-dark .m-modal-content a:not(.m-by):hover,.m-modal.m-dark .m-modal-content a:not(.m-by):focus,.m-modal.m-dark .m-modal-content a:not(.m-by):active{background-color:rgba(134,134,134,.08);color:#eaeaea}.m-modal.m-dark .m-modal-content a.m-gmail{color:#e07d73}.m-modal.m-dark .m-modal-content a.m-gmail:hover,.m-modal.m-dark .m-modal-content a.m-gmail:focus,.m-modal.m-dark .m-modal-content a.m-gmail:active{background-color:rgba(224,125,115,.08);color:#e07d73}.m-modal.m-dark .m-modal-content a.m-outlook{color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-outlook:hover,.m-modal.m-dark .m-modal-content a.m-outlook:focus,.m-modal.m-dark .m-modal-content a.m-outlook:active{background-color:rgba(76,156,215,.08);color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-yahoo{color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-yahoo:hover,.m-modal.m-dark .m-modal-content a.m-yahoo:focus,.m-modal.m-dark .m-modal-content a.m-yahoo:active{background-color:rgba(172,136,211,.08);color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-tg{color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-tg:hover,.m-modal.m-dark .m-modal-content a.m-tg:focus,.m-modal.m-dark .m-modal-content a.m-tg:active{background-color:rgba(76,171,219,.08);color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-wa{color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-wa:hover,.m-modal.m-dark .m-modal-content a.m-wa:focus,.m-modal.m-dark .m-modal-content a.m-wa:active{background-color:rgba(76,210,192,.08);color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-skype{color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-skype:hover,.m-modal.m-dark .m-modal-content a.m-skype:focus,.m-modal.m-dark .m-modal-content a.m-skype:active{background-color:rgba(76,199,244,.08);color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-by:hover,.m-modal.m-dark .m-modal-content a.m-by:focus,.m-modal.m-dark .m-modal-content a.m-by:active{color:#fff}',""]),e.exports=a},476:function(e){"use strict";e.exports=function(e){var o=[];return o.toString=function(){return this.map((function(o){var t=e(o);return o[2]?"@media ".concat(o[2]," {").concat(t,"}"):t})).join("")},o.i=function(e,t,a){"string"==typeof e&&(e=[[null,e,""]]);var n={};if(a)for(var d=0;d()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},h=function(e){return e.every(y)},k=function(e){var o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style.position="absolute",o.style.left="-9999px",document.body.appendChild(o);var t=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);return o.select(),document.execCommand("copy"),document.body.removeChild(o),!!t&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(t),!0)},_=function(e){var o=e;o.querySelector(".m-modal-content a:last-of-type").addEventListener("keydown",w),o.querySelector(".m-modal-content a:first-of-type").addEventListener("keydown",C)},w=function(e){"Tab"===e.code&&!1===e.shiftKey&&(e.preventDefault(),e.target.closest("div").querySelector("a:first-of-type").focus())},C=function(e){"Tab"===e.code&&!0===e.shiftKey&&(e.preventDefault(),e.target.closest("div").querySelector("a:last-of-type").focus())},x=JSON.parse('["en","it","es","de","fr","pt","nl","ru","sv","no","dk","is","zh"]'),L=JSON.parse('{"en":{"open_in_":"open in ","cc_":"cc ","bcc_":"bcc ","subject_":"subject ","body_":"body ","gmail":"Gmail","outlook":"Outlook","yahoo":"Yahoo Mail","telegram":"Telegram","whatsapp":"WhatsApp","skype":"Skype","call":"call","open":"open","_default":" default","_as_default":" as default","copy":"copy","copied":"copied"},"it":{"open_in_":"apri con ","bcc_":"ccn ","subject_":"oggetto ","body_":"testo ","call":"chiama","open":"apri","_default":" ","_as_default":" ","copy":"copia","copied":"copiato"},"es":{"open_in_":"abrir con ","bcc_":"cco ","subject_":"asunto ","body_":"cuerpo ","call":"llamar","open":"abrir","_default":" predefinido","_as_default":" por defecto","copy":"copiar","copied":"copiado"},"de":{"open_in_":"Öffnen in ","subject_":"Betreff ","body_":"Nachricht ","call":"Anrufen","open":"Öffnen","_default":" mit Standard","_as_default":" mit Standard","copy":"kopieren","copied":"kopiert"},"pt":{"open_in_":"abrir com ","bcc_":"cco ","subject_":"assunto ","body_":"corpo ","call":"ligar","open":"abrir","_default":" padrão","_as_default":" por padrão","copy":"copiar","copied":"copiado"},"fr":{"open_in_":"Ouvrir dans ","bcc_":"cci ","subject_":"sujet ","body_":"contenu ","call":"Appeler","open":"Ouvrir","_default":" par défaut","_as_default":" par défaut","copy":"Copier","copied":"copié"},"nl":{"subject_":"onderwerp ","body_":"bericht ","call":"bellen","open":"openen","_default":" standaard","_as_default":" als standaard","copy":"kopiëren"},"ru":{"open_in_":"открыть в ","subject_":"тема ","body_":"тело ","call":"позвонить","open":"открыть","_default":" по умолчанию","_as_default":" по умолчанию","copy":"скопировать"},"sv":{"open_in_":"öppna i ","subject_":"ämne ","body_":"meddelandetext ","call":"ring","open":"öppna","_default":" förval","_as_default":" som förval","copy":"kopiera","copied":"kopierad"},"no":{"open_in_":"åpne i ","subject_":"emne ","call":"ringe","open":"åpne","_as_default":" som standard","copy":"kopiere","copied":"kopiert"},"dk":{"open_in_":"åpne i ","subject_":"emne ","call":"ringe op","open":"åben","_as_default":" som standard","copy":"kopi","copied":"kopieret"},"is":{"open_in_":"opið inn ","subject_":"viðfangsefni ","body_":"líkami ","call":"hringja","open":"opið","_default":" sjálfgefið","_as_default":" sem sjálfgefið","copy":"afrita","copied":"afritað"},"zh":{"open_in_":"開啟 ","cc_":"副本 ","bcc_":"密件副本 ","subject_":"主旨 ","body_":"內文 ","call":"通話","open":"開啟","_default":" 預設","_as_default":" 預設","copy":"複製","copied":"已複製"}}');function j(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,a)}return t}function E(e){for(var o=1;o"),to("detail","cc")&&z?($.style.display="block",X.innerHTML=z.split(",").join("
")):$.style.display="none",to("detail","bcc")&&M?(G.style.display="block",ee.innerHTML=M.split(",").join("
")):G.style.display="none",to("detail","subject")&&B?(Y.style.display="block",oe.textContent=B):Y.style.display="none",to("detail","body")&&H?(Q.style.display="block",te.textContent=H):Q.style.display="none",de.addEventListener("click",Ie),le.addEventListener("click",Ne),ie.addEventListener("click",Ue),me.addEventListener("click",ze),ue.addEventListener("click",Me)):o===c&&(Z.innerHTML=F,to("detail","msg")&&q?(V.style.display="block",ae.textContent=q):V.style.display="none",re.addEventListener("click",Te),J?(document.getElementById("m-tg").style.display="block",ce.addEventListener("click",Pe)):document.getElementById("m-tg").style.display="none",se.addEventListener("click",De),pe.addEventListener("click",ze),fe.addEventListener("click",Me)),qe(o),document.addEventListener("keydown",Fe),!0)}var Ie=function(e){var o,t;e.preventDefault();var a=null===(o=O)||void 0===o?void 0:o.installation;if(a===s)try{t=U.toString()}catch(e){t=P}else a===p&&(t=D);var n="https://mail.google.com/mail/?extsrc=mailto&url="+encodeURIComponent(t);window.open(n,"_blank","noopener, noreferrer"),Je()},Ne=function(e){var o;e.preventDefault();var t="https://outlook.live.com/owa/?path=/mail/action/compose&to=";null!==(o=S)&&void 0!==o&&o.office365&&(t="https://outlook.office365.com/owa/?path=/mail/action/compose&to=");var a=t+encodeURIComponent(T);B&&(a=a.concat("&subject="+encodeURIComponent(B))),H&&(a=a.concat("&body="+encodeURIComponent(H))),window.open(a,"_blank","noopener, noreferrer"),Je()},Ue=function(e){e.preventDefault();var o="https://compose.mail.yahoo.com/?to="+T;B&&(o=o.concat("&subject="+encodeURIComponent(B))),H&&(o=o.concat("&body="+encodeURIComponent(H))),window.open(o,"_blank","noopener, noreferrer"),Je()},Pe=function(e){if(e.preventDefault(),J){var o="https://t.me/"+encodeURIComponent(J);window.open(o,"_blank","noopener, noreferrer"),Je()}},De=function(e){e.preventDefault();var o="skype:"+encodeURIComponent(K||F);window.open(o,"_blank","noopener, noreferrer"),Je()},Te=function(e){e.preventDefault();var o=F.replace(g,"").replace(b,""),t="https://wa.me/"+encodeURIComponent(o);q&&(t=t.concat("?text="+encodeURIComponent(q))),window.open(t,"_blank","noopener, noreferrer"),Je()},ze=function(e){var o;e.preventDefault();var t=null===(o=O)||void 0===o?void 0:o.installation;t===s?window.location.href=P:t===p&&(window.location.href=D),Je()},Me=function(e){var o,t;(e.preventDefault(),Ke())&&((null===(o=O)||void 0===o?void 0:o.type)===m?(k(T),t=ue):(k(F),t=fe),t.textContent=R.copied||be.copied,setTimeout((function(){t.textContent=R.copy||be.copy,Je()}),999))},Be=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,t=new RegExp("^"+o+"((.)+)","gi");return t.test(e)};function He(e){var o,t,u,f=e.getAttribute("href");if(null!==(o=e.classList)&&void 0!==o&&o.contains("no-mailgo"))return null;if(f||null!==(t=e.classList)&&void 0!==t&&t.contains("mailgo")){if(Be(f,a)||Be(f,n))return{type:m,installation:s};if(Be(f,d)||Be(f,l))return{type:c,installation:s};if(Be(f,i))return{type:r,installation:s}}if("#mailgo"===f||null!==(u=e.classList)&&void 0!==u&&u.contains("mailgo")){if(e.hasAttribute("data-address")&&e.hasAttribute("data-domain"))return{type:m,installation:p};if(e.hasAttribute("data-tel"))return{type:c,installation:p};if(e.hasAttribute("data-msg"))return{type:r,installation:p}}return null}var Fe=function(e){if(Ke()){var o,t=null===(o=O)||void 0===o?void 0:o.type;if(t===m)switch(e.keyCode){case 27:return Je(),!0;case 71:return Ie(),!0;case 79:return Ne(),!0;case 89:return Ue(),!0;case 32:case 13:return ze(),!0;case 67:return Me(),!0;default:return!1}else if(t===c)switch(e.keyCode){case 27:return Je(),!0;case 84:return Pe(),!0;case 87:return Te(),!0;case 83:return De(),!0;case 32:case 13:return ze(),!0;case 67:return Me(),!0;default:return!1}}return!1},qe=function(e){Qe(e,"flex")},Je=function(){Qe(m,"none"),Qe(c,"none"),document.removeEventListener("keydown",Fe)},Ke=function(){return he&&"flex"===Ye(m)||(ke||_e)&&"flex"===Ye(c)},We=function(){var e=Ze(f);return e.href="https://mailgo.dev?ref=mailgo-modal",e.className="m-by",e.target="_blank",e.rel="noopener noreferrer",e.appendChild($e("mailgo.dev")),e},Ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div";return document.createElement(e)},$e=function(e){return document.createTextNode(e)},Ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;return e===c?N:I},Ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;return Ge(e).style.display},Qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,o=arguments.length>1?arguments[1]:void 0,t=Ge(e);t&&(t.style.display=o,"flex"===o?(ne=document.activeElement,t.setAttribute("aria-hidden","false"),t.setAttribute("tabindex","0"),t.focus(),_(t)):(t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex","-1"),ne.focus()))},Ve=function(){var e,o=null===(e=O)||void 0===e?void 0:e.type;o&&Ge(o).classList.add("m-dark")},Xe=function(){var e,o=null===(e=O)||void 0===e?void 0:e.type;o&&Ge(o).classList.remove("m-dark")},eo=function(e){for(var o=[];e;){if(o.push(e),"HTML"===e.tagName)return o.push(document),o.push(window),o;e=e.parentElement}},oo=function(e,o){if(D=e,o&&o.length>0){var t=o.join("&");D=D.concat("?"+t)}return D},to=function(e,o){if(console.log(e),console.log(o),!S)return console.log("caso 1"),!0;if("action"===e){var t,a;if(S&&(null===(t=S)||void 0===t||!t.actions))return console.log("caso 2"),!0;if(S&&S.actions&&!1===(null===(a=S)||void 0===a?void 0:a.actions[o]))return console.log("caso 3"),!1}else if("detail"===e){var n,d;if(S&&(null===(n=S)||void 0===n||!n.details))return console.log("caso 2"),!0;if(S&&S.details&&!1===(null===(d=S)||void 0===d?void 0:d.details[o]))return console.log("caso 4"),!1}return!0},ao=function(){var e,o="default lang";if(null!==(e=S)&&void 0!==e&&e.lang&&-1!==x.indexOf(S.lang))ge=S.lang,o="config lang";else{var t=document.documentElement.lang;x.forEach((function(e){new RegExp("^"+e,"gi").test(t)&&(ge=e,o="html lang")}))}return R=L[ge],o};function no(e){try{var o;if(S=E(E({},e),(null===(o=window)||void 0===o?void 0:o.mailgoConfig)||null),"undefined"!=typeof window){var t,a,n,d,l,i;if(void 0!==(null===(t=S)||void 0===t?void 0:t.loadCSS)&&(Ee=S.loadCSS),void 0!==(null===(a=S)||void 0===a?void 0:a.mailto)&&(he=S.mailto),void 0!==(null===(n=S)||void 0===n?void 0:n.tel)&&(ke=S.tel),void 0!==(null===(d=S)||void 0===d?void 0:d.sms)&&(_e=S.sms),Ee&&function(){if(!document.getElementById("mailgo-style")){var e=Ze("style");e.id="mailgo-style",e.type="text/css",e.appendChild($e(ve)),document.head.appendChild(e)}}(),null!==(l=S)&&void 0!==l&&l.initEvent)null!==(i=S)&&void 0!==i&&i.listenerOptions?document.addEventListener(S.initEvent,Ae,S.listenerOptions):document.addEventListener(S.initEvent,Ae);else Ae();return!0}}catch(e){console.log(e)}return!1}"undefined"!=typeof window&&(window.getMailgoTypeByElement=He,window.mailgoClickListener=Re,window.mailgoCheckRender=Re,window.mailgoPreRender=Se,window.mailgoDirectRender=function(e){return no(),Be(e,a)||Be(e,n)?(O={type:m,installation:s},Se(e),!0):!!(Be(e,d)||Be(e,l)||Be(e,i))&&(O={type:c,installation:s},Se(e),!0)},window.mailgoRender=Oe,window.mailgo=no);no({initEvent:"DOMContentLoaded"})}},o={};function t(a){if(o[a])return o[a].exports;var n=o[a]={id:a,exports:{}};return e[a](n,n.exports,t),n.exports}return t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t(474)}(); //# sourceMappingURL=mailgo.min.js.map \ No newline at end of file diff --git a/dist/mailgo.min.js.map b/dist/mailgo.min.js.map index 0caf3cc..cccc798 100644 --- a/dist/mailgo.min.js.map +++ b/dist/mailgo.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://mailgo/../src/mailgo.scss","webpack://mailgo/../node_modules/css-loader/dist/runtime/api.js","webpack://mailgo/../src/mailgo.scss?81f2","webpack://mailgo/../src/constants.ts","webpack://mailgo/../src/utils.ts","webpack://mailgo/../src/mailgo.ts","webpack://mailgo/../src/mobile-detect.ts","webpack://mailgo/./mailgo.dist.ts","webpack://mailgo/webpack/bootstrap","webpack://mailgo/webpack/startup","webpack://mailgo/webpack/runtime/make namespace object"],"names":["___CSS_LOADER_EXPORT___","___CSS_LOADER_API_IMPORT___","i","push","module","id","exports","cssWithMappingToString","list","toString","this","map","item","content","concat","join","modules","mediaQuery","dedupe","alreadyImportedModules","length","_i","result","MAILTO","MAILGO","TEL","CALLTO","SMS","MAILGO_MAIL","MAILGO_TEL","MAILGO_SMS","CLASSIC","LESS_SPAM","spanHTMLTag","aHTMLTag","pHTMLTag","validateEmail","email","test","validateEmails","arr","every","copyToClipboard","str","el","document","createElement","value","setAttribute","style","position","left","body","appendChild","selected","getSelection","rangeCount","getRangeAt","select","execCommand","removeChild","removeAllRanges","addRange","setFocusLoop","ref","modal","querySelector","addEventListener","leaveLastLink","leaveFirstLink","e","code","shiftKey","preventDefault","target","closest","focus","strings","config","activeMailgoType","modalMailto","modalTel","url","href","lessSpamHref","mail","cc","bcc","subject","bodyMail","tel","msg","telegramUsername","skypeUsername","title","titleTel","detailCc","detailBcc","detailSubject","detailBody","detailMsg","ccValue","bccValue","subjectValue","bodyValue","msgValue","activatedLink","gmail","outlook","yahoo","open","telegram","wa","skype","call","copyMail","copyTel","mailgoCSS","require","lang","defaultStrings","translations","notNumber","RegExp","leadingZeros","isMobile","mailtoEnabled","telEnabled","smsEnabled","desktopEnabled","mobileEnabled","validateEmailConfig","validateTelConfig","showFooterConfig","loadCSSConfig","mailgoInit","navigator","userAgent","desktop","mobile","mailgoSetLanguage","mailgoExists","getElementById","display","classList","add","dark","enableDarkMode","disableDarkMode","modalBackground","className","modalContent","details","ccSpan","createTextNode","cc_","bccSpan","bcc_","subjectSpan","subject_","bodySpan","body_","open_in_","gmailSpan","mailgoConfigAttributeEnabled","outlookSpan","yahooSpan","openSpan","_default","copy","showFooter","byElement","hideMailgo","mailgoTelExists","detailsTel","msgSpan","telegramSpan","waSpan","whatsapp","skypeSpan","callSpan","_as_default","mailgoClickListener","event","contains","mailgoIsShowing","path","composedPath","forEach","element","HTMLDocument","Window","localMailgoType","getMailgoTypeByElement","activeMailgoModalType","type","mailgoPreRender","mailgoElementOrUrl","mailgoElement","installation","getAttribute","validateUrl","decodeURIComponent","split","trim","urlParams","URL","searchParams","get","error","console","log","encodeURIComponent","parameters","buildLessSpamHref","validateTel","hasAttribute","mailgoRender","innerHTML","textContent","openGmail","openOutlook","openYahooMail","openDefault","openWhatsApp","openTelegram","openSkype","showMailgo","mailgoKeydown","urlString","gmailUrl","window","startingOutlookUrl","office365","outlookUrl","yahooUrl","tgUrl","skypeUrl","whatappTel","replace","waUrl","location","activeCopy","copied","setTimeout","regexValidate","elementHref","keyboardEvent","keyCode","setModalDisplay","removeEventListener","getModalDisplay","by","rel","getModalHTMLElement","activeElement","remove","tagName","parentElement","joinedParams","attribute","actions","languageType","languages","htmlLang","documentElement","language","mailgo","mailgoConfig","loadCSS","mailto","sms","mailgoCSSElement","head","mailgoStyle","initEvent","listenerOptions","mailgoCheckRender","mailgoDirectRender","directUrl","__webpack_module_cache__","__webpack_require__","moduleId","__webpack_modules__","r","Symbol","toStringTag","Object","defineProperty"],"mappings":"mDACA,IACIA,EAD8B,EAAQ,IACZC,EAA4B,SAASC,GAAG,OAAOA,EAAE,MAE/EF,EAAwBG,KAAK,CAACC,EAAOC,GAAI,47KAAq8K,KAE9+KD,EAAOE,QAAUN,G,6BCEjBI,EAAOE,QAAU,SAAUC,GACzB,IAAIC,EAAO,GAuDX,OArDAA,EAAKC,SAAW,WACd,OAAOC,KAAKC,KAAI,SAAUC,GACxB,IAAIC,EAAUN,EAAuBK,GAErC,OAAIA,EAAK,GACA,UAAUE,OAAOF,EAAK,GAAI,MAAME,OAAOD,EAAS,KAGlDA,KACNE,KAAK,KAKVP,EAAKN,EAAI,SAAUc,EAASC,EAAYC,GACf,iBAAZF,IAETA,EAAU,CAAC,CAAC,KAAMA,EAAS,MAG7B,IAAIG,EAAyB,GAE7B,GAAID,EACF,IAAK,IAAIhB,EAAI,EAAGA,EAAIQ,KAAKU,OAAQlB,IAAK,CAEpC,IAAIG,EAAKK,KAAKR,GAAG,GAEP,MAANG,IACFc,EAAuBd,IAAM,GAKnC,IAAK,IAAIgB,EAAK,EAAGA,EAAKL,EAAQI,OAAQC,IAAM,CAC1C,IAAIT,EAAO,GAAGE,OAAOE,EAAQK,IAEzBH,GAAUC,EAAuBP,EAAK,MAKtCK,IACGL,EAAK,GAGRA,EAAK,GAA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BW,EAAOqM,UAAW5I,SAG9CA,KAGF,OAAO,GAET,MAAO0E,GACPC,QAAQC,IAAIF,GAEd,OAAO,EAIa,oBAAXsB,SACRA,OAAetC,uBAAyBA,GACxCsC,OAAejD,oBAAsBA,GACrCiD,OAAe8C,kBAAoB/F,GACnCiD,OAAenC,gBAAkBA,GACjCmC,OAAe+C,mBArtBlB,SAA4BC,GAI1B,OAFAZ,KAEIlE,GAAY8E,EAAWhQ,IAAWkL,GAAY8E,EAAW/P,IAC3DuD,EAAmB,CACjBoH,KAAMvK,EACN2K,aAAcxK,GAEhBqK,GAAgBmF,IACT,MAEP9E,GAAY8E,EAAW9P,IACvBgL,GAAY8E,EAAW7P,IACvB+K,GAAY8E,EAAW5P,MAEvBoD,EAAmB,CACjBoH,KAAMtK,EACN0K,aAAcxK,GAEhBqK,GAAgBmF,IACT,IAisBRhD,OAAed,aAAeA,GAC9Bc,OAAeoC,OAASA,IAW3B,GE5/CqB,CACnBQ,UAAW,uBCLTK,EAA2B,GAG/B,SAASC,EAAoBC,GAE5B,GAAGF,EAAyBE,GAC3B,OAAOF,EAAyBE,GAAUpR,QAG3C,IAAIF,EAASoR,EAAyBE,GAAY,CACjDrR,GAAIqR,EAEJpR,QAAS,IAOV,OAHAqR,EAAoBD,GAAUtR,EAAQA,EAAOE,QAASmR,GAG/CrR,EAAOE,QCjBf,OCFAmR,EAAoBG,EAAI,SAAStR,GACX,oBAAXuR,QAA0BA,OAAOC,aAC1CC,OAAOC,eAAe1R,EAASuR,OAAOC,YAAa,CAAE/O,MAAO,WAE7DgP,OAAOC,eAAe1R,EAAS,aAAc,CAAEyC,OAAO,KDFhD0O,EAAoB,K","file":"mailgo.min.js","sourcesContent":["// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:16.5px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:#20232a;opacity:.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:.95;border-radius:20px;box-shadow:0 3px 20px rgba(32,35,42,.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:24px;transition:.5s box-shadow}.m-modal .m-modal-content:hover,.m-modal .m-modal-content:focus,.m-modal .m-modal-content:active{opacity:1}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2em}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{cursor:pointer;padding:10px;color:#4a4a4a;border-radius:20px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#c0372a}.m-modal .m-modal-content a.m-gmail:hover,.m-modal .m-modal-content a.m-gmail:focus,.m-modal .m-modal-content a.m-gmail:active{background-color:rgba(192,55,42,.08);color:#c0372a}.m-modal .m-modal-content a.m-outlook{color:#0967aa}.m-modal .m-modal-content a.m-outlook:hover,.m-modal .m-modal-content a.m-outlook:focus,.m-modal .m-modal-content a.m-outlook:active{background-color:rgba(9,103,170,.08);color:#0967aa}.m-modal .m-modal-content a.m-yahoo{color:#4a00a0}.m-modal .m-modal-content a.m-yahoo:hover,.m-modal .m-modal-content a.m-yahoo:focus,.m-modal .m-modal-content a.m-yahoo:active{background-color:rgba(74,0,160,.08);color:#4a00a0}.m-modal .m-modal-content a.m-tg{color:#086da0}.m-modal .m-modal-content a.m-tg:hover,.m-modal .m-modal-content a.m-tg:focus,.m-modal .m-modal-content a.m-tg:active{background-color:rgba(8,109,160,.08);color:#086da0}.m-modal .m-modal-content a.m-wa{color:#067466}.m-modal .m-modal-content a.m-wa:hover,.m-modal .m-modal-content a.m-wa:focus,.m-modal .m-modal-content a.m-wa:active{background-color:rgba(6,116,102,.08);color:#067466}.m-modal .m-modal-content a.m-skype{color:#076d92}.m-modal .m-modal-content a.m-skype:hover,.m-modal .m-modal-content a.m-skype:focus,.m-modal .m-modal-content a.m-skype:active{background-color:rgba(7,109,146,.08);color:#076d92}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-default:focus,.m-modal .m-modal-content a.m-default:active,.m-modal .m-modal-content a.m-copy:hover,.m-modal .m-modal-content a.m-copy:focus,.m-modal .m-modal-content a.m-copy:active{background-color:rgba(0,0,0,.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:12px;margin-top:.8rem;padding:5px;color:#4a4a4a}.m-modal .m-modal-content a.m-by:hover,.m-modal .m-modal-content a.m-by:focus,.m-modal .m-modal-content a.m-by:active{color:#3d3d3d}.m-modal .m-modal-content .w-500{font-weight:500}.m-modal.m-dark .m-modal-content{background-color:#20232a}.m-modal.m-dark .m-modal-content,.m-modal.m-dark .m-modal-content p,.m-modal.m-dark .m-modal-content p span,.m-modal.m-dark .m-modal-content strong{color:#fff}.m-modal.m-dark .m-modal-content a{color:#eaeaea}.m-modal.m-dark .m-modal-content a:not(.m-by):hover,.m-modal.m-dark .m-modal-content a:not(.m-by):focus,.m-modal.m-dark .m-modal-content a:not(.m-by):active{background-color:rgba(134,134,134,.08);color:#eaeaea}.m-modal.m-dark .m-modal-content a.m-gmail{color:#e07d73}.m-modal.m-dark .m-modal-content a.m-gmail:hover,.m-modal.m-dark .m-modal-content a.m-gmail:focus,.m-modal.m-dark .m-modal-content a.m-gmail:active{background-color:rgba(224,125,115,.08);color:#e07d73}.m-modal.m-dark .m-modal-content a.m-outlook{color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-outlook:hover,.m-modal.m-dark .m-modal-content a.m-outlook:focus,.m-modal.m-dark .m-modal-content a.m-outlook:active{background-color:rgba(76,156,215,.08);color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-yahoo{color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-yahoo:hover,.m-modal.m-dark .m-modal-content a.m-yahoo:focus,.m-modal.m-dark .m-modal-content a.m-yahoo:active{background-color:rgba(172,136,211,.08);color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-tg{color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-tg:hover,.m-modal.m-dark .m-modal-content a.m-tg:focus,.m-modal.m-dark .m-modal-content a.m-tg:active{background-color:rgba(76,171,219,.08);color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-wa{color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-wa:hover,.m-modal.m-dark .m-modal-content a.m-wa:focus,.m-modal.m-dark .m-modal-content a.m-wa:active{background-color:rgba(76,210,192,.08);color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-skype{color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-skype:hover,.m-modal.m-dark .m-modal-content a.m-skype:focus,.m-modal.m-dark .m-modal-content a.m-skype:active{background-color:rgba(76,199,244,.08);color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-by:hover,.m-modal.m-dark .m-modal-content a.m-by:focus,.m-modal.m-dark .m-modal-content a.m-by:active{color:#fff}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\n var result = require(\"!!../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../node_modules/sass-loader/dist/cjs.js!./mailgo.scss\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n ","import { MailgoModalType, MailgoInstallationType } from \"mailgo\";\n\n// links\nexport const MAILTO: string = \"mailto:\";\nexport const MAILGO: string = \"mailgo:\";\nexport const TEL: string = \"tel:\";\nexport const CALLTO: string = \"callto:\";\nexport const SMS: string = \"sms:\";\n\n// deep linking\nexport const outlookDeepLink: string = \"ms-outlook://\";\n\n// no mailgo class\nexport const NO_MAILGO: string = \"no-mailgo\";\n\n// responsive settings\nexport const DESKTOP: string = \"desktop\";\nexport const MOBILE: string = \"mobile\";\n\n// mailgo modal types\nexport const MAILGO_MAIL: MailgoModalType = \"mailgo\";\nexport const MAILGO_TEL: MailgoModalType = \"mailgo-tel\";\nexport const MAILGO_SMS: MailgoModalType = \"mailgo-sms\";\n\n// mailgo installation types\nexport const CLASSIC: MailgoInstallationType = \"classic\";\nexport const LESS_SPAM: MailgoInstallationType = \"less-spam\";\n\n// useful html tags\nexport const spanHTMLTag: string = \"span\";\nexport const aHTMLTag: string = \"a\";\nexport const pHTMLTag: string = \"p\";\n\n// default lang\nexport const defaultLang: string = \"en\";\n","// validate a single email with regex\nexport const validateEmail = (email: string): boolean =>\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/.test(\n email\n );\n\n// validate an array of emails\nexport const validateEmails = (arr: string[]): boolean =>\n arr.every(validateEmail);\n\n// validate a single tel with regex\nexport const validateTel = (tel: string): boolean =>\n /^[+]{0,1}[\\s0-9]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*[p]{0,1}[\\s0-9]*$/.test(\n tel\n );\n\n// copy of a string\nexport const copyToClipboard = (str: string): boolean => {\n let el: HTMLTextAreaElement = document.createElement(\n \"textarea\"\n ) as HTMLTextAreaElement;\n el.value = str;\n el.setAttribute(\"readonly\", \"\");\n el.style.position = \"absolute\";\n el.style.left = \"-9999px\";\n document.body.appendChild(el);\n let selected: Range | boolean =\n document.getSelection().rangeCount > 0\n ? document.getSelection().getRangeAt(0)\n : false;\n el.select();\n document.execCommand(\"copy\");\n document.body.removeChild(el);\n if (selected) {\n document.getSelection().removeAllRanges();\n document.getSelection().addRange(selected);\n return true;\n }\n return false;\n};\n\n// set focus loop within modal\nexport const setFocusLoop = (ref: HTMLElement): void => {\n let modal = ref;\n modal\n .querySelector(\".m-modal-content a:last-of-type\")\n .addEventListener(\"keydown\", leaveLastLink);\n modal\n .querySelector(\".m-modal-content a:first-of-type\")\n .addEventListener(\"keydown\", leaveFirstLink);\n};\n\nexport const leaveLastLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === false) {\n e.preventDefault();\n\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:first-of-type\") as HTMLElement).focus();\n }\n};\n\nexport const leaveFirstLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === true) {\n e.preventDefault();\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:last-of-type\") as HTMLElement).focus();\n }\n};\n","import {\n MailgoConfig,\n MailgoTranslations,\n MailgoTranslation,\n MailgoAction,\n MailgoLanguages,\n MailgoType,\n MailgoDetail,\n MailgoInstallationType,\n MailgoModalType,\n} from \"mailgo\";\n\n// polyfill\n// import { mailgoPolyfill } from \"./polyfill\";\n\n// constants\nimport {\n MAILTO,\n MAILGO,\n TEL,\n CALLTO,\n SMS,\n MAILGO_MAIL,\n MAILGO_TEL,\n MAILGO_SMS,\n CLASSIC,\n LESS_SPAM,\n NO_MAILGO,\n MOBILE,\n spanHTMLTag,\n aHTMLTag,\n pHTMLTag,\n defaultLang,\n} from \"./constants\";\n\n// utils\nimport {\n validateEmails,\n validateTel,\n copyToClipboard,\n setFocusLoop,\n} from \"./utils\";\n\n// i18n for mailgo\nimport languages from \"../i18n/languages.json\";\nimport translations from \"../i18n/translations.json\";\n\n// mobile detect\nimport { userAgent } from \"./mobile-detect\";\n\n// mailgo scss, with toString (https://github.com/webpack-contrib/css-loader#tostring)\nconst mailgoCSS: string = require(\"./mailgo.scss\").toString();\n\n// default language\nlet lang: string = defaultLang;\n\n// default strings\nconst defaultStrings: MailgoTranslation = (translations as MailgoTranslations)[\n defaultLang\n];\n\n// useful regexp\nconst notNumber: RegExp = new RegExp(\"[^0-9/]\", \"gi\");\nconst leadingZeros: RegExp = new RegExp(\"^0+\", \"gi\");\n\n// translation strings\nlet strings: MailgoTranslation;\n\n// global mailgo config object\nlet config: MailgoConfig;\n\n// config to check if the client is mobile or desktop\nlet isMobile: boolean = false;\n\n// default config attributes\nlet mailtoEnabled: boolean = true;\nlet telEnabled: boolean = true;\nlet smsEnabled: boolean = false;\nlet desktopEnabled: boolean = true;\nlet mobileEnabled: boolean = true;\nlet validateEmailConfig: boolean = true;\nlet validateTelConfig: boolean = true;\nlet showFooterConfig: boolean = true;\nlet loadCSSConfig: boolean = true;\n\n// activeMailgoType\nlet activeMailgoType: MailgoType;\n\n// modals global object\nlet modalMailto: HTMLElement, modalTel: HTMLElement;\n\n// mailgo general variables\nlet url: URL, href: string, lessSpamHref: string;\n\n// mailgo mail variables\nlet mail: string, cc: string, bcc: string, subject: string, bodyMail: string;\n\n// mailgo tel variables\nlet tel: string, msg: string, telegramUsername: string, skypeUsername: string;\n\n// the DOM elements\nlet title: HTMLElement,\n titleTel: HTMLElement,\n detailCc: HTMLElement,\n detailBcc: HTMLElement,\n detailSubject: HTMLElement,\n detailBody: HTMLElement,\n detailMsg: HTMLElement,\n ccValue: HTMLElement,\n bccValue: HTMLElement,\n subjectValue: HTMLElement,\n bodyValue: HTMLElement,\n msgValue: HTMLElement,\n activatedLink: HTMLElement;\n\n// mailgo buttons (actions)\nlet gmail: HTMLLinkElement,\n outlook: HTMLLinkElement,\n yahoo: HTMLLinkElement,\n open: HTMLLinkElement,\n telegram: HTMLLinkElement,\n wa: HTMLLinkElement,\n skype: HTMLLinkElement,\n call: HTMLLinkElement,\n copyMail: HTMLLinkElement,\n copyTel: HTMLLinkElement;\n\n/**\n * mailgoInit\n * the function that creates the mailgo elements in DOM\n */\nconst mailgoInit = (): void => {\n // set the boolean for mobile/desktop\n isMobile = userAgent() === MOBILE;\n\n // responsive settings\n {\n if (typeof config?.desktop !== \"undefined\") {\n desktopEnabled = config.desktop;\n // if it is a desktop and desktop is not enabled no init mailgo\n if (!isMobile && !desktopEnabled) {\n return;\n }\n }\n if (typeof config?.mobile !== \"undefined\") {\n mobileEnabled = config.mobile;\n // if it is a mobile and mobile is not enabled no init mailgo\n if (isMobile && !mobileEnabled) {\n return;\n }\n }\n }\n\n // set the mailgo language\n mailgoSetLanguage();\n\n // mailgo, if mailgo not already exists\n let mailgoExists = !!document.getElementById(MAILGO_MAIL);\n\n // if mailgo is enabled for mailto and it not exists in DOM\n if (mailtoEnabled && !mailgoExists) {\n // modal\n modalMailto = createElement() as HTMLElement;\n modalMailto.style.display = \"none\";\n modalMailto.id = MAILGO_MAIL;\n modalMailto.classList.add(\"m-modal\");\n modalMailto.setAttribute(\"role\", \"dialog\");\n modalMailto.setAttribute(\"tabindex\", \"-1\");\n modalMailto.setAttribute(\"aria-labelledby\", \"m-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalMailto.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalMailto.appendChild(modalContent);\n\n // title (email address)\n title = createElement(\"strong\");\n title.id = \"m-title\";\n title.className = \"m-title\";\n modalContent.appendChild(title);\n\n // details\n let details: HTMLElement = createElement();\n details.id = \"m-details\";\n details.className = \"m-details\";\n\n detailCc = createElement(pHTMLTag);\n detailCc.id = \"m-cc\";\n let ccSpan: HTMLElement = createElement(spanHTMLTag);\n ccSpan.className = \"w-500\";\n ccSpan.appendChild(createTextNode(strings.cc_ || defaultStrings.cc_));\n ccValue = createElement(spanHTMLTag);\n ccValue.id = \"m-cc-value\";\n detailCc.appendChild(ccSpan);\n detailCc.appendChild(ccValue);\n details.appendChild(detailCc);\n\n detailBcc = createElement(pHTMLTag);\n detailBcc.id = \"m-bcc\";\n let bccSpan: HTMLElement = createElement(spanHTMLTag);\n bccSpan.className = \"w-500\";\n bccSpan.appendChild(createTextNode(strings.bcc_ || defaultStrings.bcc_));\n bccValue = createElement(spanHTMLTag);\n bccValue.id = \"m-bcc-value\";\n detailBcc.appendChild(bccSpan);\n detailBcc.appendChild(bccValue);\n details.appendChild(detailBcc);\n\n detailSubject = createElement(pHTMLTag);\n detailSubject.id = \"m-subject\";\n let subjectSpan: HTMLElement = createElement(spanHTMLTag);\n subjectSpan.className = \"w-500\";\n subjectSpan.appendChild(\n createTextNode(strings.subject_ || defaultStrings.subject_)\n );\n subjectValue = createElement(spanHTMLTag);\n subjectValue.id = \"m-subject-value\";\n detailSubject.appendChild(subjectSpan);\n detailSubject.appendChild(subjectValue);\n details.appendChild(detailSubject);\n\n detailBody = createElement(pHTMLTag);\n detailBody.id = \"m-body\";\n let bodySpan: HTMLElement = createElement(spanHTMLTag);\n bodySpan.className = \"w-500\";\n bodySpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n bodyValue = createElement(spanHTMLTag);\n bodyValue.id = \"m-body-value\";\n detailBody.appendChild(bodySpan);\n detailBody.appendChild(bodyValue);\n details.appendChild(detailBody);\n\n modalContent.appendChild(details);\n\n // Gmail\n gmail = createElement(aHTMLTag) as HTMLLinkElement;\n gmail.id = \"m-gmail\";\n gmail.href = \"#mailgo-gmail\";\n gmail.classList.add(\"m-open\");\n gmail.classList.add(\"m-gmail\");\n gmail.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let gmailSpan: HTMLElement = createElement(spanHTMLTag);\n gmailSpan.className = \"w-500\";\n gmailSpan.appendChild(\n createTextNode(strings.gmail || defaultStrings.gmail)\n );\n gmail.appendChild(gmailSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"gmail\")) {\n modalContent.appendChild(gmail);\n }\n\n // Outlook\n outlook = createElement(aHTMLTag) as HTMLLinkElement;\n outlook.id = \"m-outlook\";\n outlook.href = \"#mailgo-outlook\";\n outlook.classList.add(\"m-open\");\n outlook.classList.add(\"m-outlook\");\n outlook.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let outlookSpan: HTMLElement = createElement(spanHTMLTag);\n outlookSpan.className = \"w-500\";\n outlookSpan.appendChild(\n createTextNode(strings.outlook || defaultStrings.outlook)\n );\n outlook.appendChild(outlookSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"outlook\")) {\n modalContent.appendChild(outlook);\n }\n\n // Outlook\n yahoo = createElement(aHTMLTag) as HTMLLinkElement;\n yahoo.id = \"m-yahoo\";\n yahoo.href = \"#mailgo-yahoo\";\n yahoo.classList.add(\"m-open\");\n yahoo.classList.add(\"m-yahoo\");\n yahoo.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let yahooSpan: HTMLElement = createElement(spanHTMLTag);\n yahooSpan.className = \"w-500\";\n yahooSpan.appendChild(\n createTextNode(strings.yahoo || defaultStrings.yahoo)\n );\n yahoo.appendChild(yahooSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"yahoo\")) {\n modalContent.appendChild(yahoo);\n }\n\n // open default\n open = createElement(aHTMLTag) as HTMLLinkElement;\n open.id = \"m-open\";\n open.href = \"#mailgo-open\";\n open.classList.add(\"m-open\");\n open.classList.add(\"m-default\");\n let openSpan: HTMLElement = createElement(spanHTMLTag);\n openSpan.className = \"w-500\";\n openSpan.appendChild(createTextNode(strings.open || defaultStrings.open));\n open.appendChild(openSpan);\n open.appendChild(\n createTextNode(strings._default || defaultStrings._default)\n );\n\n modalContent.appendChild(open);\n\n // copy\n copyMail = createElement(aHTMLTag) as HTMLLinkElement;\n copyMail.id = \"m-copy\";\n copyMail.href = \"#mailgo-copy\";\n copyMail.classList.add(\"m-copy\");\n copyMail.classList.add(\"w-500\");\n copyMail.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyMail);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalMailto);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // mailgo tel, if mailgo-tel not already exists\n let mailgoTelExists = !!document.getElementById(MAILGO_TEL);\n\n // if mailgo is enabled for tel/callto and it not exists in DOM\n if (telEnabled && !mailgoTelExists) {\n // modal\n modalTel = createElement() as HTMLElement;\n modalTel.style.display = \"none\";\n modalTel.id = MAILGO_TEL;\n modalTel.classList.add(\"m-modal\");\n modalTel.setAttribute(\"role\", \"dialog\");\n modalTel.setAttribute(\"tabindex\", \"-1\");\n modalTel.setAttribute(\"aria-labelledby\", \"m-tel-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalTel.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalTel.appendChild(modalContent);\n\n // title (telephone number)\n titleTel = createElement(\"strong\");\n titleTel.id = \"m-tel-title\";\n titleTel.className = \"m-title\";\n modalContent.appendChild(titleTel);\n\n // details\n let detailsTel: HTMLElement = createElement();\n detailsTel.id = \"m-tel-details\";\n detailsTel.className = \"m-details\";\n\n detailMsg = createElement(pHTMLTag);\n detailMsg.id = \"m-msg\";\n let msgSpan: HTMLElement = createElement(spanHTMLTag);\n msgSpan.className = \"w-500\";\n msgSpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n msgValue = createElement(spanHTMLTag);\n msgValue.id = \"m-msg-value\";\n detailMsg.appendChild(msgSpan);\n detailMsg.appendChild(msgValue);\n detailsTel.appendChild(detailMsg);\n\n modalContent.appendChild(detailsTel);\n\n // Telegram\n telegram = createElement(aHTMLTag) as HTMLLinkElement;\n telegram.id = \"m-tg\";\n telegram.href = \"#mailgo-telegram\";\n telegram.classList.add(\"m-open\");\n telegram.classList.add(\"m-tg\");\n\n // by default not display\n telegram.style.display = \"none\";\n\n telegram.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let telegramSpan: HTMLElement = createElement(spanHTMLTag);\n telegramSpan.className = \"w-500\";\n telegramSpan.appendChild(\n createTextNode(strings.telegram || defaultStrings.telegram)\n );\n telegram.appendChild(telegramSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"telegram\")) {\n modalContent.appendChild(telegram);\n }\n\n // WhatsApp\n wa = createElement(aHTMLTag) as HTMLLinkElement;\n wa.id = \"m-wa\";\n wa.href = \"#mailgo-whatsapp\";\n wa.classList.add(\"m-open\");\n wa.classList.add(\"m-wa\");\n wa.appendChild(createTextNode(strings.open_in_ || defaultStrings.open_in_));\n let waSpan: HTMLElement = createElement(spanHTMLTag);\n waSpan.className = \"w-500\";\n waSpan.appendChild(\n createTextNode(strings.whatsapp || defaultStrings.whatsapp)\n );\n wa.appendChild(waSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"whatsapp\")) {\n modalContent.appendChild(wa);\n }\n\n // Skype\n skype = createElement(aHTMLTag) as HTMLLinkElement;\n skype.id = \"m-skype\";\n skype.href = \"#mailgo-skype\";\n skype.classList.add(\"m-open\");\n skype.classList.add(\"m-skype\");\n skype.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let skypeSpan: HTMLElement = createElement(spanHTMLTag);\n skypeSpan.className = \"w-500\";\n skypeSpan.appendChild(\n createTextNode(strings.skype || defaultStrings.skype)\n );\n skype.appendChild(skypeSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"skype\")) {\n modalContent.appendChild(skype);\n }\n\n // call default\n call = createElement(aHTMLTag) as HTMLLinkElement;\n call.id = \"m-call\";\n call.href = \"#mailgo-open\";\n call.classList.add(\"m-open\");\n call.classList.add(\"m-default\");\n let callSpan: HTMLElement = createElement(spanHTMLTag);\n callSpan.className = \"w-500\";\n callSpan.appendChild(createTextNode(strings.call || defaultStrings.call));\n call.appendChild(callSpan);\n call.appendChild(\n createTextNode(strings._as_default || defaultStrings._as_default)\n );\n\n modalContent.appendChild(call);\n\n // copy\n copyTel = createElement(aHTMLTag) as HTMLLinkElement;\n copyTel.id = \"m-tel-copy\";\n copyTel.href = \"#mailgo-copy\";\n copyTel.classList.add(\"m-copy\");\n copyTel.classList.add(\"w-500\");\n copyTel.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyTel);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalTel);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // event listener on body, if the element is mailgo-compatible the mailgo modal will be rendered\n document.addEventListener(\"click\", mailgoClickListener);\n};\n\n/**\n * mailgoClickListener\n * function to check if an element is mailgo-enabled or not referencing to\n * mail:\n * document.querySelectorAll(\n * 'a[href^=\"mailto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * tel:\n * document.querySelectorAll(\n * 'a[href^=\"tel:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"callto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"sms:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n */\nfunction mailgoClickListener(event: Event): boolean {\n // check if the mailgo HTML exists in the body\n if (\n !document.body.contains(modalMailto) &&\n !document.body.contains(modalTel)\n ) {\n return false;\n }\n\n // if a mailgo is already showing do nothing\n if (mailgoIsShowing()) {\n return false;\n }\n\n // the path of the event\n let path =\n (event.composedPath && event.composedPath()) ||\n composedPath(event.target as HTMLElement);\n\n if (path) {\n path.forEach((element: HTMLElement) => {\n if (element instanceof HTMLDocument || element instanceof Window) {\n return false;\n }\n\n // go here only if one of the mailgo modals are enabled\n if (mailtoEnabled || telEnabled || smsEnabled) {\n let localMailgoType = getMailgoTypeByElement(element);\n\n // go on if the localMailgoType is not null\n if (localMailgoType) {\n // set the active mailgo type\n activeMailgoType = localMailgoType;\n\n let activeMailgoModalType = activeMailgoType?.type;\n\n if (activeMailgoModalType) {\n // check if the setting is enabled and if so go with pre-render\n if (\n (mailtoEnabled && activeMailgoModalType === MAILGO_MAIL) ||\n (telEnabled && activeMailgoModalType === MAILGO_TEL) ||\n (smsEnabled && activeMailgoModalType === MAILGO_SMS)\n ) {\n // stop the normal execution of the element click\n event.preventDefault();\n\n // render mailgo\n mailgoPreRender(element as HTMLLinkElement);\n\n return true;\n }\n }\n }\n }\n });\n }\n\n return false;\n}\n\n/**\n * mailgoPreRender\n * function to pre-render a mailgo, it helps populating elements needed by modal\n */\nfunction mailgoPreRender(\n mailgoElementOrUrl: HTMLLinkElement | string\n): boolean {\n let mailgoElement: HTMLLinkElement;\n\n // get the type and installation from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if type is not defined return\n if (!type) return false;\n\n if (typeof mailgoElementOrUrl === \"string\") {\n // if the parameter is a string it is the url\n href = mailgoElementOrUrl as string;\n } else {\n // if the paramenter is an HTMLLinkElement get the href attribute and the element\n href = mailgoElementOrUrl.getAttribute(\"href\") as string;\n mailgoElement = mailgoElementOrUrl as HTMLLinkElement;\n }\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // if the installation is classic\n if (installation === CLASSIC) {\n if (validateUrl(href, MAILTO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILTO)[1].trim());\n } else if (validateUrl(href, MAILGO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILGO)[1].trim());\n }\n\n try {\n url = new URL(href);\n\n let urlParams: URLSearchParams = url.searchParams;\n // optional parameters for the email\n cc = urlParams.get(\"cc\");\n bcc = urlParams.get(\"bcc\");\n subject = urlParams.get(\"subject\");\n bodyMail = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam\n // mail = data-address + @ + data-domain\n mail =\n mailgoElement.getAttribute(\"data-address\") &&\n mailgoElement.getAttribute(\"data-domain\")\n ? mailgoElement.getAttribute(\"data-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-domain\")\n : null;\n\n try {\n url = new URL(MAILTO + encodeURIComponent(mail));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // cc = data-cc-address + @ + data-cc-domain\n cc = mailgoElement.getAttribute(\"data-cc-address\")\n ? mailgoElement.getAttribute(\"data-cc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-cc-domain\")\n : null;\n\n // if cc is defined add it to parameters\n if (cc) parameters.push(\"cc=\" + cc);\n\n // bcc = data-bcc-address + @ + data-bcc-domain\n bcc = mailgoElement.getAttribute(\"data-bcc-address\")\n ? mailgoElement.getAttribute(\"data-bcc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-bcc-domain\")\n : null;\n\n // if bcc is defined add it to parameters\n if (bcc) parameters.push(\"bcc=\" + bcc);\n\n // subject = data-subject\n subject = mailgoElement.getAttribute(\"data-subject\");\n\n // if subject is defined add it to parameters\n if (subject) parameters.push(\"subject=\" + subject);\n\n // body = data-body\n bodyMail = mailgoElement.getAttribute(\"data-body\");\n\n // if body is defined add it to parameters\n if (bodyMail) parameters.push(\"body=\" + bodyMail);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n MAILTO + encodeURIComponent(mail),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateEmail !== \"undefined\") {\n validateEmailConfig = config.validateEmail;\n }\n\n if (validateEmailConfig) {\n // validate the email address\n if (!validateEmails(mail.split(\",\"))) {\n return false;\n }\n\n // if cc, bcc are not valid cc, bcc = \"\"\n if (cc && !validateEmails(cc.split(\",\"))) cc = \"\";\n if (bcc && !validateEmails(bcc.split(\",\"))) bcc = \"\";\n }\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n if (installation === CLASSIC) {\n if (validateUrl(href, TEL)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(TEL)[1].trim());\n } else if (validateUrl(href, CALLTO)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(CALLTO)[1].trim());\n } else if (validateUrl(href, SMS)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(SMS)[1].trim());\n }\n\n try {\n url = new URL(href);\n let urlParams: URLSearchParams = url.searchParams;\n\n // optional parameters for the phone number\n msg = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation == LESS_SPAM) {\n tel = mailgoElement.getAttribute(\"data-tel\");\n msg = mailgoElement.getAttribute(\"data-msg\");\n\n try {\n url = new URL(TEL + encodeURIComponent(tel));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // if msg is defined add it to parameters\n if (msg) parameters.push(\"body=\" + msg);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n TEL + encodeURIComponent(tel),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateTel !== \"undefined\") {\n validateTelConfig = config.validateTel;\n }\n\n // validate the phone number\n if (validateTelConfig) {\n if (!validateTel(tel)) return;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-telegram\")) {\n telegramUsername = mailgoElement.getAttribute(\"data-telegram\");\n } else {\n telegramUsername = null;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-skype\")) {\n skypeUsername = mailgoElement.getAttribute(\"data-skype\");\n } else {\n skypeUsername = null;\n }\n }\n\n // if dark is in config or contained in the element\n if (\n mailgoElement &&\n (config?.dark || mailgoElement.classList.contains(\"dark\"))\n ) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // render mailgo\n mailgoRender();\n\n return true;\n}\n\n/**\n * mailgoDirectRender\n * function to render a mailgo directly from a URL\n */\nfunction mailgoDirectRender(directUrl: string): boolean {\n // start mailgo\n mailgo();\n\n if (validateUrl(directUrl, MAILTO) || validateUrl(directUrl, MAILGO)) {\n activeMailgoType = {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n } else if (\n validateUrl(directUrl, TEL) ||\n validateUrl(directUrl, CALLTO) ||\n validateUrl(directUrl, SMS)\n ) {\n activeMailgoType = {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n }\n return false;\n}\n\n/**\n * mailgoRender\n * function to render a mailgo (mail or tel)\n */\nfunction mailgoRender(): boolean {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n\n // if type is not defined return\n if (!type) return false;\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // the title of the modal (email address)\n title.innerHTML = mail.split(\",\").join(\"
\");\n\n // add the details if provided\n if (mailgoConfigAttributeEnabled(\"detail\", \"cc\") && cc) {\n detailCc.style.display = \"block\";\n ccValue.innerHTML = cc.split(\",\").join(\"
\");\n } else {\n detailCc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"bcc\") && bcc) {\n detailBcc.style.display = \"block\";\n bccValue.innerHTML = bcc.split(\",\").join(\"
\");\n } else {\n detailBcc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"subject\") && subject) {\n detailSubject.style.display = \"block\";\n subjectValue.textContent = subject;\n } else {\n detailSubject.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"body\") && bodyMail) {\n detailBody.style.display = \"block\";\n bodyValue.textContent = bodyMail;\n } else {\n detailBody.style.display = \"none\";\n }\n\n // add the actions\n gmail.addEventListener(\"click\", openGmail);\n\n outlook.addEventListener(\"click\", openOutlook);\n\n yahoo.addEventListener(\"click\", openYahooMail);\n\n open.addEventListener(\"click\", openDefault);\n\n copyMail.addEventListener(\"click\", copy);\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n // the title of the modal (tel)\n titleTel.innerHTML = tel;\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"msg\") && msg) {\n detailMsg.style.display = \"block\";\n msgValue.textContent = msg;\n } else {\n detailMsg.style.display = \"none\";\n }\n\n // add the actions to buttons\n wa.addEventListener(\"click\", openWhatsApp);\n\n // telegram must be shown only if data-telegram is provided\n if (telegramUsername) {\n document.getElementById(\"m-tg\").style.display = \"block\";\n telegram.addEventListener(\"click\", openTelegram);\n } else {\n document.getElementById(\"m-tg\").style.display = \"none\";\n }\n\n skype.addEventListener(\"click\", openSkype);\n\n call.addEventListener(\"click\", openDefault);\n\n copyTel.addEventListener(\"click\", copy);\n }\n\n // show the mailgo\n showMailgo(type);\n\n // add listener keyDown\n document.addEventListener(\"keydown\", mailgoKeydown);\n\n return true;\n}\n\n// actions\nconst openGmail = (event?: Event): void => {\n event.preventDefault();\n\n let urlString: string;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n if (installation === CLASSIC) {\n try {\n urlString = url.toString();\n } catch (e) {\n urlString = href;\n }\n } else if (installation === LESS_SPAM) {\n urlString = lessSpamHref;\n }\n\n // Gmail url\n let gmailUrl: string =\n \"https://mail.google.com/mail/?extsrc=mailto&url=\" +\n encodeURIComponent(urlString);\n\n // open the link\n window.open(gmailUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openOutlook = (event?: Event): void => {\n event.preventDefault();\n\n // Outlook starting url\n let startingOutlookUrl: string =\n \"https://outlook.live.com/owa/?path=/mail/action/compose&to=\";\n\n // let the user to decide to open Office365 Outlook instead of the classic outlook.live.com\n if (config?.office365) {\n startingOutlookUrl =\n \"https://outlook.office365.com/owa/?path=/mail/action/compose&to=\";\n }\n\n // Outlook url\n let outlookUrl: string = startingOutlookUrl + encodeURIComponent(mail);\n\n // the details if provided\n if (subject) {\n outlookUrl = outlookUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n\n if (bodyMail) {\n outlookUrl = outlookUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(outlookUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openYahooMail = (event?: Event): void => {\n event.preventDefault();\n\n // Yahoo url\n let yahooUrl: string = \"https://compose.mail.yahoo.com/?to=\" + mail;\n\n // the details if provided\n if (subject) {\n yahooUrl = yahooUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n if (bodyMail) {\n yahooUrl = yahooUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(yahooUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openTelegram = (event?: Event): void => {\n event.preventDefault();\n\n // check if telegramUsername exists\n if (telegramUsername) {\n // Telegram url\n let tgUrl: string = \"https://t.me/\" + encodeURIComponent(telegramUsername);\n\n // open the url\n window.open(tgUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n }\n};\n\nconst openSkype = (event?: Event): void => {\n event.preventDefault();\n\n let skype: string = skypeUsername || tel;\n\n // Telegram url\n let skypeUrl: string = \"skype:\" + encodeURIComponent(skype);\n\n // open the url\n window.open(skypeUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openWhatsApp = (event?: Event): void => {\n event.preventDefault();\n\n // WhatsApp API doesn't work with non number digits and leading 0s: https://faq.whatsapp.com/general/chats/how-to-use-click-to-chat/\n let whatappTel = tel.replace(notNumber, \"\").replace(leadingZeros, \"\");\n\n // WhatsApp url\n let waUrl: string = \"https://wa.me/\" + encodeURIComponent(whatappTel);\n\n // the details if provided\n if (msg) {\n waUrl = waUrl.concat(\"?text=\" + encodeURIComponent(msg));\n }\n\n // open the url\n window.open(waUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openDefault = (event?: Event): void => {\n event.preventDefault();\n\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if the installation is classic the browser can follow the default behaviour\n if (installation === CLASSIC) {\n window.location.href = href;\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam use the built less-spam href\n window.location.href = lessSpamHref;\n }\n\n hideMailgo();\n};\n\nconst copy = (event?: Event): void => {\n event.preventDefault();\n\n // the correct copyButton (mail or tel)\n if (mailgoIsShowing()) {\n let activeCopy: HTMLElement;\n\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n // in case it is showing mail modal copy email address\n copyToClipboard(mail);\n activeCopy = copyMail;\n } else {\n // in case it is showing tel modal copy phone number\n copyToClipboard(tel);\n activeCopy = copyTel;\n }\n\n activeCopy.textContent = strings.copied || defaultStrings.copied;\n setTimeout(() => {\n activeCopy.textContent = strings.copy || defaultStrings.copy;\n // hide after the timeout\n hideMailgo();\n }, 999);\n }\n};\n\n// function to find if a link is a mailto, tel, callto or sms\nconst validateUrl = (url: string, type: string = MAILTO) => {\n let regexValidate = new RegExp(\"^\" + type + \"((.)+)\", \"gi\");\n return regexValidate.test(url);\n};\n\n// function that returns if an element is a mailgo\nfunction getMailgoTypeByElement(element: HTMLElement): MailgoType | null {\n let elementHref: string = (element as HTMLLinkElement).getAttribute(\"href\");\n\n // return null if there is no-mailgo in class\n if (element.classList?.contains(NO_MAILGO)) {\n return null;\n }\n\n // the case of classic type of mailgo, like a href=mailto:... or a href=tel:... and the class=mailgo with a useful href\n if (elementHref || element.classList?.contains(\"mailgo\")) {\n if (validateUrl(elementHref, MAILTO) || validateUrl(elementHref, MAILGO)) {\n // a mailto: or mailgo:\n return {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n } else if (\n validateUrl(elementHref, TEL) ||\n validateUrl(elementHref, CALLTO)\n ) {\n // a tel: or callto:\n return {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n } else if (validateUrl(elementHref, SMS)) {\n // a sms:\n return {\n type: MAILGO_SMS,\n installation: CLASSIC,\n };\n }\n }\n\n if (elementHref === \"#mailgo\" || element.classList?.contains(\"mailgo\")) {\n // less-spam installation of mailgo, check to the attributes\n if (\n element.hasAttribute(\"data-address\") &&\n element.hasAttribute(\"data-domain\")\n ) {\n // less-spam mailto with data-address and data-domain\n return {\n type: MAILGO_MAIL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-tel\")) {\n // less-spam tel with data-tel\n return {\n type: MAILGO_TEL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-msg\")) {\n // less-spam sms with data-msd\n return {\n type: MAILGO_SMS,\n installation: LESS_SPAM,\n };\n }\n }\n\n return null;\n}\n\n/**\n * mailgoKeydown\n * function to manage the keydown event when the modal is showing, return a boolean that represents if a useful key has been pressed\n */\nconst mailgoKeydown = (keyboardEvent: KeyboardEvent): boolean => {\n // if mailgo is showing\n if (mailgoIsShowing()) {\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 71:\n // g -> open GMail\n openGmail();\n return true;\n case 79:\n // o -> open Outlook\n openOutlook();\n return true;\n case 89:\n // y -> open Yahoo Mail\n openYahooMail();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n } else if (type === MAILGO_TEL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 84:\n // t -> open Telegram\n openTelegram();\n return true;\n case 87:\n // w -> open WhatsApp\n openWhatsApp();\n return true;\n case 83:\n // s -> open Skype\n openSkype();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n }\n }\n return false;\n};\n\n// show the modal\nconst showMailgo = (type: MailgoModalType): void => {\n // show the correct modal\n setModalDisplay(type, \"flex\");\n};\n\n// hide the modal\nconst hideMailgo = (): void => {\n // hide all the modals\n setModalDisplay(MAILGO_MAIL, \"none\");\n setModalDisplay(MAILGO_TEL, \"none\");\n\n // remove listener keyDown\n document.removeEventListener(\"keydown\", mailgoKeydown);\n};\n\n// is the mailgo modal hidden?\nconst mailgoIsShowing = (): boolean => {\n return (\n (mailtoEnabled && getModalDisplay(MAILGO_MAIL) === \"flex\") ||\n ((telEnabled || smsEnabled) && getModalDisplay(MAILGO_TEL) === \"flex\")\n );\n};\n\nconst byElement = (): HTMLLinkElement => {\n // by element in the footer\n let by: HTMLLinkElement = createElement(aHTMLTag) as HTMLLinkElement;\n by.href = \"https://mailgo.dev?ref=mailgo-modal\";\n by.className = \"m-by\";\n by.target = \"_blank\";\n by.rel = \"noopener noreferrer\";\n by.appendChild(createTextNode(\"mailgo.dev\"));\n\n return by;\n};\n\n// create element\nconst createElement = (element: string = \"div\"): HTMLElement =>\n document.createElement(element);\n\n// create text node\nconst createTextNode = (element: string): Text =>\n document.createTextNode(element);\n\n// get the correct HTMLElement from a type\nconst getModalHTMLElement = (type: MailgoModalType = MAILGO_MAIL) => {\n if (type === MAILGO_TEL) {\n return modalTel;\n } else {\n return modalMailto;\n }\n};\n\n// get display value\nconst getModalDisplay = (ref: MailgoModalType = MAILGO_MAIL): string =>\n getModalHTMLElement(ref).style.display;\n\n// set display value\nconst setModalDisplay = (\n ref: MailgoModalType = MAILGO_MAIL,\n value: string\n): void => {\n let modal = getModalHTMLElement(ref);\n\n if (modal) {\n modal.style.display = value;\n\n if (value === \"flex\") {\n // \"save\" the activated link.\n activatedLink = document.activeElement as HTMLElement;\n modal.setAttribute(\"aria-hidden\", \"false\");\n\n // Focus on the modal container.\n modal.setAttribute(\"tabindex\", \"0\");\n modal.focus();\n setFocusLoop(modal);\n } else {\n modal.setAttribute(\"aria-hidden\", \"true\");\n\n // focus back the activated link for getting back to the context.\n modal.setAttribute(\"tabindex\", \"-1\");\n activatedLink.focus();\n }\n }\n};\n\n// enable dark mode\nconst enableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.add(\"m-dark\");\n }\n};\n\n// disable dark mode\nconst disableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.remove(\"m-dark\");\n }\n};\n\n// custom composedPath if path or event.composedPath() are not defined\nconst composedPath = (\n el: HTMLElement\n): (HTMLElement | Document | (Window & typeof globalThis))[] => {\n let path = [];\n\n while (el) {\n path.push(el);\n\n if (el.tagName === \"HTML\") {\n path.push(document);\n path.push(window);\n return path;\n }\n\n el = el.parentElement;\n }\n};\n\n// function to recreate a mailto: or tel: href from less-spam\nconst buildLessSpamHref = (type: string, parameters: string[]): string => {\n lessSpamHref = type;\n if (parameters && parameters.length > 0) {\n let joinedParams = parameters.join(\"&\");\n lessSpamHref = lessSpamHref.concat(\"?\" + joinedParams);\n }\n return lessSpamHref;\n};\n\n// function to check an attribute is enabled or not, by default considering it enabled\nconst mailgoConfigAttributeEnabled = (\n type: \"action\" | \"detail\",\n attribute: MailgoAction | MailgoDetail\n): boolean => {\n // by default all the actions and attribute are enabled\n if (!config) {\n return true;\n }\n\n if (config && !config?.actions) {\n return true;\n }\n\n // if the attribute type is action consider the actions config attribute\n if (type === \"action\") {\n if (\n config &&\n config.actions &&\n config?.actions[attribute as MailgoAction] === false\n ) {\n return false;\n }\n } else if (type === \"detail\") {\n // else consider the details attribute\n if (\n config &&\n config.details &&\n config?.details[attribute as MailgoDetail] === false\n ) {\n return false;\n }\n }\n\n return true;\n};\n\n// manage the language of mailgo\nconst mailgoSetLanguage = (): string => {\n let languageType = \"default lang\";\n\n // if a language is defined in configuration use it\n if (\n config?.lang &&\n (languages as MailgoLanguages).indexOf(config.lang) !== -1\n ) {\n lang = config.lang;\n languageType = \"config lang\";\n } else {\n // else if is defined use it!\n // keep the lang from html\n let htmlLang: string = document.documentElement.lang;\n\n // find the correct language using the lang attribute, not just a === because there a are cases like fr-FR or fr_FR in html lang attribute\n (languages as MailgoLanguages).forEach((language: any) => {\n if (new RegExp(\"^\" + language, \"gi\").test(htmlLang)) {\n lang = language;\n languageType = \"html lang\";\n }\n });\n }\n\n // strings\n strings = (translations as MailgoTranslations)[lang];\n\n return languageType;\n};\n\nconst mailgoStyle = (): void => {\n if (!document.getElementById(\"mailgo-style\")) {\n // mailgo style\n let mailgoCSSElement: HTMLStyleElement = createElement(\n \"style\"\n ) as HTMLStyleElement;\n mailgoCSSElement.id = \"mailgo-style\";\n mailgoCSSElement.type = \"text/css\";\n mailgoCSSElement.appendChild(createTextNode(mailgoCSS));\n document.head.appendChild(mailgoCSSElement);\n }\n};\n\n// mailgo\nfunction mailgo(mailgoConfig?: MailgoConfig): boolean {\n try {\n // polyfill mailgo\n // mailgoPolyfill();\n\n // set the global config merging window mailgConfig and mailgoConfig passed as a parameter\n config = { ...mailgoConfig, ...((window as any)?.mailgoConfig || null) };\n\n // if the window is defined...\n if (typeof window !== \"undefined\") {\n // if is set in config use it (load the mailgo CSS)\n if (typeof config?.loadCSS !== \"undefined\") {\n loadCSSConfig = config.loadCSS;\n }\n\n // if is set in config use it (enable mailto)\n if (typeof config?.mailto !== \"undefined\") {\n mailtoEnabled = config.mailto;\n }\n\n // if is set in config use it (enable tel)\n if (typeof config?.tel !== \"undefined\") {\n telEnabled = config.tel;\n }\n\n // if is set in config use it (enable sms)\n if (typeof config?.sms !== \"undefined\") {\n smsEnabled = config.sms;\n }\n\n // if load css enabled load it!\n if (loadCSSConfig) {\n // add the style for mailgo\n mailgoStyle();\n }\n\n // if is set an initEvent add the listener\n if (config?.initEvent) {\n if (config?.listenerOptions) {\n // listener options specified\n document.addEventListener(\n config.initEvent,\n mailgoInit,\n config.listenerOptions\n );\n } else {\n // no listener options\n document.addEventListener(config.initEvent, mailgoInit);\n }\n } else {\n mailgoInit();\n }\n\n return true;\n }\n } catch (error) {\n console.log(error);\n }\n return false;\n}\n\n// define the methods also for window element\nif (typeof window !== \"undefined\") {\n (window as any).getMailgoTypeByElement = getMailgoTypeByElement;\n (window as any).mailgoClickListener = mailgoClickListener;\n (window as any).mailgoCheckRender = mailgoClickListener; // for compatibility with old version of mailgo\n (window as any).mailgoPreRender = mailgoPreRender;\n (window as any).mailgoDirectRender = mailgoDirectRender;\n (window as any).mailgoRender = mailgoRender;\n (window as any).mailgo = mailgo;\n}\n\nexport {\n getMailgoTypeByElement,\n mailgoClickListener,\n mailgoPreRender,\n mailgoDirectRender,\n mailgoRender,\n};\n\nexport default mailgo;\n","export const userAgent = () => {\n if (\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n )\n ) {\n return \"mobile\";\n }\n return \"desktop\";\n};\n","// webpack > dist/mailgo.min.js\n\nimport mailgo from \"../src/mailgo\";\n\n// call init mailgo attached to the event DOMContentLoaded\nconst mailgoConfig = {\n initEvent: \"DOMContentLoaded\",\n};\n\nmailgo(mailgoConfig);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(474);\n","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://mailgo/../src/mailgo.scss","webpack://mailgo/../node_modules/css-loader/dist/runtime/api.js","webpack://mailgo/../src/mailgo.scss?81f2","webpack://mailgo/../src/constants.ts","webpack://mailgo/../src/utils.ts","webpack://mailgo/../src/mailgo.ts","webpack://mailgo/../src/mobile-detect.ts","webpack://mailgo/./mailgo.dist.ts","webpack://mailgo/webpack/bootstrap","webpack://mailgo/webpack/startup","webpack://mailgo/webpack/runtime/make namespace object"],"names":["___CSS_LOADER_EXPORT___","___CSS_LOADER_API_IMPORT___","i","push","module","id","exports","cssWithMappingToString","list","toString","this","map","item","content","concat","join","modules","mediaQuery","dedupe","alreadyImportedModules","length","_i","result","MAILTO","MAILGO","TEL","CALLTO","SMS","MAILGO_MAIL","MAILGO_TEL","MAILGO_SMS","CLASSIC","LESS_SPAM","spanHTMLTag","aHTMLTag","pHTMLTag","notNumber","RegExp","leadingZeros","validateEmail","email","test","validateEmails","arr","every","copyToClipboard","str","el","document","createElement","value","setAttribute","style","position","left","body","appendChild","selected","getSelection","rangeCount","getRangeAt","select","execCommand","removeChild","removeAllRanges","addRange","setFocusLoop","ref","modal","querySelector","addEventListener","leaveLastLink","leaveFirstLink","e","code","shiftKey","preventDefault","target","closest","focus","strings","config","activeMailgoType","modalMailto","modalTel","url","href","lessSpamHref","mail","cc","bcc","subject","bodyMail","tel","msg","telegramUsername","skypeUsername","title","titleTel","detailCc","detailBcc","detailSubject","detailBody","detailMsg","ccValue","bccValue","subjectValue","bodyValue","msgValue","activatedLink","gmail","outlook","yahoo","open","telegram","wa","skype","call","copyMail","copyTel","mailgoCSS","require","lang","defaultStrings","translations","isMobile","mailtoEnabled","telEnabled","smsEnabled","desktopEnabled","mobileEnabled","validateEmailConfig","validateTelConfig","showFooterConfig","loadCSSConfig","mailgoInit","navigator","userAgent","desktop","mobile","mailgoSetLanguage","mailgoExists","getElementById","display","classList","add","dark","enableDarkMode","disableDarkMode","modalBackground","className","modalContent","details","ccSpan","createTextNode","cc_","bccSpan","bcc_","subjectSpan","subject_","bodySpan","body_","open_in_","gmailSpan","mailgoConfigAttributeEnabled","outlookSpan","yahooSpan","openSpan","_default","copy","showFooter","byElement","hideMailgo","mailgoTelExists","detailsTel","msgSpan","telegramSpan","waSpan","whatsapp","skypeSpan","callSpan","_as_default","mailgoClickListener","event","contains","mailgoIsShowing","path","composedPath","forEach","element","HTMLDocument","Window","localMailgoType","getMailgoTypeByElement","activeMailgoModalType","type","mailgoPreRender","mailgoElementOrUrl","mailgoElement","installation","getAttribute","validateUrl","decodeURIComponent","split","trim","urlParams","URL","searchParams","get","error","console","log","encodeURIComponent","parameters","buildLessSpamHref","validateTel","hasAttribute","mailgoRender","innerHTML","textContent","openGmail","openOutlook","openYahooMail","openDefault","openWhatsApp","openTelegram","openSkype","showMailgo","mailgoKeydown","urlString","gmailUrl","window","startingOutlookUrl","office365","outlookUrl","yahooUrl","tgUrl","skypeUrl","whatappTel","replace","waUrl","location","activeCopy","copied","setTimeout","regexValidate","elementHref","keyboardEvent","keyCode","setModalDisplay","removeEventListener","getModalDisplay","by","rel","getModalHTMLElement","activeElement","remove","tagName","parentElement","joinedParams","attribute","actions","languageType","languages","htmlLang","documentElement","language","mailgo","mailgoConfig","loadCSS","mailto","sms","mailgoCSSElement","head","mailgoStyle","initEvent","listenerOptions","mailgoCheckRender","mailgoDirectRender","directUrl","__webpack_module_cache__","__webpack_require__","moduleId","__webpack_modules__","r","Symbol","toStringTag","Object","defineProperty"],"mappings":"mDACA,IACIA,EAD8B,EAAQ,IACZC,EAA4B,SAASC,GAAG,OAAOA,EAAE,MAE/EF,EAAwBG,KAAK,CAACC,EAAOC,GAAI,47KAAq8K,KAE9+KD,EAAOE,QAAUN,G,6BCEjBI,EAAOE,QAAU,SAAUC,GACzB,IAAIC,EAAO,GAuDX,OArDAA,EAAKC,SAAW,WACd,OAAOC,KA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CACjBiH,KAAMtK,EACN0K,aAAcxK,GAEhBqK,GAAgBmF,IACT,IA8sBRhD,OAAed,aAAeA,GAC9Bc,OAAeoC,OAASA,IAW3B,GEvgDqB,CACnBQ,UAAW,uBCLTK,EAA2B,GAG/B,SAASC,EAAoBC,GAE5B,GAAGF,EAAyBE,GAC3B,OAAOF,EAAyBE,GAAUpR,QAG3C,IAAIF,EAASoR,EAAyBE,GAAY,CACjDrR,GAAIqR,EAEJpR,QAAS,IAOV,OAHAqR,EAAoBD,GAAUtR,EAAQA,EAAOE,QAASmR,GAG/CrR,EAAOE,QCjBf,OCFAmR,EAAoBG,EAAI,SAAStR,GACX,oBAAXuR,QAA0BA,OAAOC,aAC1CC,OAAOC,eAAe1R,EAASuR,OAAOC,YAAa,CAAE5O,MAAO,WAE7D6O,OAAOC,eAAe1R,EAAS,aAAc,CAAE4C,OAAO,KDFhDuO,EAAoB,K","file":"mailgo.min.js","sourcesContent":["// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:16.5px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:#20232a;opacity:.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:.95;border-radius:20px;box-shadow:0 3px 20px rgba(32,35,42,.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:24px;transition:.5s box-shadow}.m-modal .m-modal-content:hover,.m-modal .m-modal-content:focus,.m-modal .m-modal-content:active{opacity:1}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2em}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{cursor:pointer;padding:10px;color:#4a4a4a;border-radius:20px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#c0372a}.m-modal .m-modal-content a.m-gmail:hover,.m-modal .m-modal-content a.m-gmail:focus,.m-modal .m-modal-content a.m-gmail:active{background-color:rgba(192,55,42,.08);color:#c0372a}.m-modal .m-modal-content a.m-outlook{color:#0967aa}.m-modal .m-modal-content a.m-outlook:hover,.m-modal .m-modal-content a.m-outlook:focus,.m-modal .m-modal-content a.m-outlook:active{background-color:rgba(9,103,170,.08);color:#0967aa}.m-modal .m-modal-content a.m-yahoo{color:#4a00a0}.m-modal .m-modal-content a.m-yahoo:hover,.m-modal .m-modal-content a.m-yahoo:focus,.m-modal .m-modal-content a.m-yahoo:active{background-color:rgba(74,0,160,.08);color:#4a00a0}.m-modal .m-modal-content a.m-tg{color:#086da0}.m-modal .m-modal-content a.m-tg:hover,.m-modal .m-modal-content a.m-tg:focus,.m-modal .m-modal-content a.m-tg:active{background-color:rgba(8,109,160,.08);color:#086da0}.m-modal .m-modal-content a.m-wa{color:#067466}.m-modal .m-modal-content a.m-wa:hover,.m-modal .m-modal-content a.m-wa:focus,.m-modal .m-modal-content a.m-wa:active{background-color:rgba(6,116,102,.08);color:#067466}.m-modal .m-modal-content a.m-skype{color:#076d92}.m-modal .m-modal-content a.m-skype:hover,.m-modal .m-modal-content a.m-skype:focus,.m-modal .m-modal-content a.m-skype:active{background-color:rgba(7,109,146,.08);color:#076d92}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-default:focus,.m-modal .m-modal-content a.m-default:active,.m-modal .m-modal-content a.m-copy:hover,.m-modal .m-modal-content a.m-copy:focus,.m-modal .m-modal-content a.m-copy:active{background-color:rgba(0,0,0,.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:12px;margin-top:.8rem;padding:5px;color:#4a4a4a}.m-modal .m-modal-content a.m-by:hover,.m-modal .m-modal-content a.m-by:focus,.m-modal .m-modal-content a.m-by:active{color:#3d3d3d}.m-modal .m-modal-content .w-500{font-weight:500}.m-modal.m-dark .m-modal-content{background-color:#20232a}.m-modal.m-dark .m-modal-content,.m-modal.m-dark .m-modal-content p,.m-modal.m-dark .m-modal-content p span,.m-modal.m-dark .m-modal-content strong{color:#fff}.m-modal.m-dark .m-modal-content a{color:#eaeaea}.m-modal.m-dark .m-modal-content a:not(.m-by):hover,.m-modal.m-dark .m-modal-content a:not(.m-by):focus,.m-modal.m-dark .m-modal-content a:not(.m-by):active{background-color:rgba(134,134,134,.08);color:#eaeaea}.m-modal.m-dark .m-modal-content a.m-gmail{color:#e07d73}.m-modal.m-dark .m-modal-content a.m-gmail:hover,.m-modal.m-dark .m-modal-content a.m-gmail:focus,.m-modal.m-dark .m-modal-content a.m-gmail:active{background-color:rgba(224,125,115,.08);color:#e07d73}.m-modal.m-dark .m-modal-content a.m-outlook{color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-outlook:hover,.m-modal.m-dark .m-modal-content a.m-outlook:focus,.m-modal.m-dark .m-modal-content a.m-outlook:active{background-color:rgba(76,156,215,.08);color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-yahoo{color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-yahoo:hover,.m-modal.m-dark .m-modal-content a.m-yahoo:focus,.m-modal.m-dark .m-modal-content a.m-yahoo:active{background-color:rgba(172,136,211,.08);color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-tg{color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-tg:hover,.m-modal.m-dark .m-modal-content a.m-tg:focus,.m-modal.m-dark .m-modal-content a.m-tg:active{background-color:rgba(76,171,219,.08);color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-wa{color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-wa:hover,.m-modal.m-dark .m-modal-content a.m-wa:focus,.m-modal.m-dark .m-modal-content a.m-wa:active{background-color:rgba(76,210,192,.08);color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-skype{color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-skype:hover,.m-modal.m-dark .m-modal-content a.m-skype:focus,.m-modal.m-dark .m-modal-content a.m-skype:active{background-color:rgba(76,199,244,.08);color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-by:hover,.m-modal.m-dark .m-modal-content a.m-by:focus,.m-modal.m-dark .m-modal-content a.m-by:active{color:#fff}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\n var result = require(\"!!../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../node_modules/sass-loader/dist/cjs.js!./mailgo.scss\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n ","import { MailgoModalType, MailgoInstallationType } from \"mailgo\";\n\n// links\nexport const MAILTO: string = \"mailto:\";\nexport const MAILGO: string = \"mailgo:\";\nexport const TEL: string = \"tel:\";\nexport const CALLTO: string = \"callto:\";\nexport const SMS: string = \"sms:\";\n\n// deep linking\nexport const outlookDeepLink: string = \"ms-outlook://\";\n\n// no mailgo class\nexport const NO_MAILGO: string = \"no-mailgo\";\n\n// responsive settings\nexport const DESKTOP: string = \"desktop\";\nexport const MOBILE: string = \"mobile\";\n\n// mailgo modal types\nexport const MAILGO_MAIL: MailgoModalType = \"mailgo\";\nexport const MAILGO_TEL: MailgoModalType = \"mailgo-tel\";\nexport const MAILGO_SMS: MailgoModalType = \"mailgo-sms\";\n\n// mailgo installation types\nexport const CLASSIC: MailgoInstallationType = \"classic\";\nexport const LESS_SPAM: MailgoInstallationType = \"less-spam\";\n\n// useful html tags\nexport const spanHTMLTag: string = \"span\";\nexport const aHTMLTag: string = \"a\";\nexport const pHTMLTag: string = \"p\";\n\n// default lang\nexport const defaultLang: string = \"en\";\n\n// useful regexp\nexport const notNumber: RegExp = new RegExp(\"[^0-9/]\", \"gi\");\nexport const leadingZeros: RegExp = new RegExp(\"^0+\", \"gi\");\n","// validate a single email with regex\nexport const validateEmail = (email: string): boolean =>\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/.test(\n email\n );\n\n// validate an array of emails\nexport const validateEmails = (arr: string[]): boolean =>\n arr.every(validateEmail);\n\n// validate a single tel with regex\nexport const validateTel = (tel: string): boolean =>\n /^[+]{0,1}[\\s0-9]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*[p]{0,1}[\\s0-9]*$/.test(\n tel\n );\n\n// copy of a string\nexport const copyToClipboard = (str: string): boolean => {\n let el: HTMLTextAreaElement = document.createElement(\n \"textarea\"\n ) as HTMLTextAreaElement;\n el.value = str;\n el.setAttribute(\"readonly\", \"\");\n el.style.position = \"absolute\";\n el.style.left = \"-9999px\";\n document.body.appendChild(el);\n let selected: Range | boolean =\n document.getSelection().rangeCount > 0\n ? document.getSelection().getRangeAt(0)\n : false;\n el.select();\n document.execCommand(\"copy\");\n document.body.removeChild(el);\n if (selected) {\n document.getSelection().removeAllRanges();\n document.getSelection().addRange(selected);\n return true;\n }\n return false;\n};\n\n// set focus loop within modal\nexport const setFocusLoop = (ref: HTMLElement): void => {\n let modal = ref;\n modal\n .querySelector(\".m-modal-content a:last-of-type\")\n .addEventListener(\"keydown\", leaveLastLink);\n modal\n .querySelector(\".m-modal-content a:first-of-type\")\n .addEventListener(\"keydown\", leaveFirstLink);\n};\n\nexport const leaveLastLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === false) {\n e.preventDefault();\n\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:first-of-type\") as HTMLElement).focus();\n }\n};\n\nexport const leaveFirstLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === true) {\n e.preventDefault();\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:last-of-type\") as HTMLElement).focus();\n }\n};\n","import {\n MailgoConfig,\n MailgoTranslations,\n MailgoTranslation,\n MailgoAction,\n MailgoLanguages,\n MailgoType,\n MailgoDetail,\n MailgoInstallationType,\n MailgoModalType,\n} from \"mailgo\";\n\n// polyfill\n// import { mailgoPolyfill } from \"./polyfill\";\n\n// constants\nimport {\n MAILTO,\n MAILGO,\n TEL,\n CALLTO,\n SMS,\n MAILGO_MAIL,\n MAILGO_TEL,\n MAILGO_SMS,\n CLASSIC,\n LESS_SPAM,\n NO_MAILGO,\n MOBILE,\n spanHTMLTag,\n aHTMLTag,\n pHTMLTag,\n defaultLang,\n notNumber,\n leadingZeros,\n} from \"./constants\";\n\n// utils\nimport {\n validateEmails,\n validateTel,\n copyToClipboard,\n setFocusLoop,\n} from \"./utils\";\n\n// i18n for mailgo\nimport languages from \"../i18n/languages.json\";\nimport translations from \"../i18n/translations.json\";\n\n// mobile detect\nimport { userAgent } from \"./mobile-detect\";\n\n// mailgo scss, with toString (https://github.com/webpack-contrib/css-loader#tostring)\nconst mailgoCSS: string = require(\"./mailgo.scss\").toString();\n\n// default language\nlet lang: string = defaultLang;\n\n// default strings\nconst defaultStrings: MailgoTranslation = (translations as MailgoTranslations)[\n defaultLang\n];\n\n// translation strings\nlet strings: MailgoTranslation;\n\n// global mailgo config object\nlet config: MailgoConfig;\n\n// config to check if the client is mobile or desktop\nlet isMobile: boolean = false;\n\n// default config attributes\nlet mailtoEnabled: boolean = true;\nlet telEnabled: boolean = true;\nlet smsEnabled: boolean = false;\nlet desktopEnabled: boolean = true;\nlet mobileEnabled: boolean = true;\nlet validateEmailConfig: boolean = true;\nlet validateTelConfig: boolean = true;\nlet showFooterConfig: boolean = true;\nlet loadCSSConfig: boolean = true;\n\n// activeMailgoType\nlet activeMailgoType: MailgoType;\n\n// modals global object\nlet modalMailto: HTMLElement, modalTel: HTMLElement;\n\n// mailgo general variables\nlet url: URL, href: string, lessSpamHref: string;\n\n// mailgo mail variables\nlet mail: string, cc: string, bcc: string, subject: string, bodyMail: string;\n\n// mailgo tel variables\nlet tel: string, msg: string, telegramUsername: string, skypeUsername: string;\n\n// the DOM elements\nlet title: HTMLElement,\n titleTel: HTMLElement,\n detailCc: HTMLElement,\n detailBcc: HTMLElement,\n detailSubject: HTMLElement,\n detailBody: HTMLElement,\n detailMsg: HTMLElement,\n ccValue: HTMLElement,\n bccValue: HTMLElement,\n subjectValue: HTMLElement,\n bodyValue: HTMLElement,\n msgValue: HTMLElement,\n activatedLink: HTMLElement;\n\n// mailgo buttons (actions)\nlet gmail: HTMLLinkElement,\n outlook: HTMLLinkElement,\n yahoo: HTMLLinkElement,\n open: HTMLLinkElement,\n telegram: HTMLLinkElement,\n wa: HTMLLinkElement,\n skype: HTMLLinkElement,\n call: HTMLLinkElement,\n copyMail: HTMLLinkElement,\n copyTel: HTMLLinkElement;\n\n/**\n * mailgoInit\n * the function that creates the mailgo elements in DOM\n */\nconst mailgoInit = (): void => {\n // set the boolean for mobile/desktop\n isMobile = userAgent() === MOBILE;\n\n // responsive settings\n {\n if (typeof config?.desktop !== \"undefined\") {\n desktopEnabled = config.desktop;\n // if it is a desktop and desktop is not enabled no init mailgo\n if (!isMobile && !desktopEnabled) {\n return;\n }\n }\n if (typeof config?.mobile !== \"undefined\") {\n mobileEnabled = config.mobile;\n // if it is a mobile and mobile is not enabled no init mailgo\n if (isMobile && !mobileEnabled) {\n return;\n }\n }\n }\n\n // set the mailgo language\n mailgoSetLanguage();\n\n // mailgo, if mailgo not already exists\n let mailgoExists = !!document.getElementById(MAILGO_MAIL);\n\n // if mailgo is enabled for mailto and it not exists in DOM\n if (mailtoEnabled && !mailgoExists) {\n // modal\n modalMailto = createElement() as HTMLElement;\n modalMailto.style.display = \"none\";\n modalMailto.id = MAILGO_MAIL;\n modalMailto.classList.add(\"m-modal\");\n modalMailto.setAttribute(\"role\", \"dialog\");\n modalMailto.setAttribute(\"tabindex\", \"-1\");\n modalMailto.setAttribute(\"aria-labelledby\", \"m-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalMailto.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalMailto.appendChild(modalContent);\n\n // title (email address)\n title = createElement(\"strong\");\n title.id = \"m-title\";\n title.className = \"m-title\";\n modalContent.appendChild(title);\n\n // details\n let details: HTMLElement = createElement();\n details.id = \"m-details\";\n details.className = \"m-details\";\n\n detailCc = createElement(pHTMLTag);\n detailCc.id = \"m-cc\";\n let ccSpan: HTMLElement = createElement(spanHTMLTag);\n ccSpan.className = \"w-500\";\n ccSpan.appendChild(createTextNode(strings.cc_ || defaultStrings.cc_));\n ccValue = createElement(spanHTMLTag);\n ccValue.id = \"m-cc-value\";\n detailCc.appendChild(ccSpan);\n detailCc.appendChild(ccValue);\n details.appendChild(detailCc);\n\n detailBcc = createElement(pHTMLTag);\n detailBcc.id = \"m-bcc\";\n let bccSpan: HTMLElement = createElement(spanHTMLTag);\n bccSpan.className = \"w-500\";\n bccSpan.appendChild(createTextNode(strings.bcc_ || defaultStrings.bcc_));\n bccValue = createElement(spanHTMLTag);\n bccValue.id = \"m-bcc-value\";\n detailBcc.appendChild(bccSpan);\n detailBcc.appendChild(bccValue);\n details.appendChild(detailBcc);\n\n detailSubject = createElement(pHTMLTag);\n detailSubject.id = \"m-subject\";\n let subjectSpan: HTMLElement = createElement(spanHTMLTag);\n subjectSpan.className = \"w-500\";\n subjectSpan.appendChild(\n createTextNode(strings.subject_ || defaultStrings.subject_)\n );\n subjectValue = createElement(spanHTMLTag);\n subjectValue.id = \"m-subject-value\";\n detailSubject.appendChild(subjectSpan);\n detailSubject.appendChild(subjectValue);\n details.appendChild(detailSubject);\n\n detailBody = createElement(pHTMLTag);\n detailBody.id = \"m-body\";\n let bodySpan: HTMLElement = createElement(spanHTMLTag);\n bodySpan.className = \"w-500\";\n bodySpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n bodyValue = createElement(spanHTMLTag);\n bodyValue.id = \"m-body-value\";\n detailBody.appendChild(bodySpan);\n detailBody.appendChild(bodyValue);\n details.appendChild(detailBody);\n\n modalContent.appendChild(details);\n\n // Gmail\n gmail = createElement(aHTMLTag) as HTMLLinkElement;\n gmail.id = \"m-gmail\";\n gmail.href = \"#mailgo-gmail\";\n gmail.classList.add(\"m-open\");\n gmail.classList.add(\"m-gmail\");\n gmail.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let gmailSpan: HTMLElement = createElement(spanHTMLTag);\n gmailSpan.className = \"w-500\";\n gmailSpan.appendChild(\n createTextNode(strings.gmail || defaultStrings.gmail)\n );\n gmail.appendChild(gmailSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"gmail\")) {\n modalContent.appendChild(gmail);\n }\n\n // Outlook\n outlook = createElement(aHTMLTag) as HTMLLinkElement;\n outlook.id = \"m-outlook\";\n outlook.href = \"#mailgo-outlook\";\n outlook.classList.add(\"m-open\");\n outlook.classList.add(\"m-outlook\");\n outlook.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let outlookSpan: HTMLElement = createElement(spanHTMLTag);\n outlookSpan.className = \"w-500\";\n outlookSpan.appendChild(\n createTextNode(strings.outlook || defaultStrings.outlook)\n );\n outlook.appendChild(outlookSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"outlook\")) {\n modalContent.appendChild(outlook);\n }\n\n // Outlook\n yahoo = createElement(aHTMLTag) as HTMLLinkElement;\n yahoo.id = \"m-yahoo\";\n yahoo.href = \"#mailgo-yahoo\";\n yahoo.classList.add(\"m-open\");\n yahoo.classList.add(\"m-yahoo\");\n yahoo.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let yahooSpan: HTMLElement = createElement(spanHTMLTag);\n yahooSpan.className = \"w-500\";\n yahooSpan.appendChild(\n createTextNode(strings.yahoo || defaultStrings.yahoo)\n );\n yahoo.appendChild(yahooSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"yahoo\")) {\n modalContent.appendChild(yahoo);\n }\n\n // open default\n open = createElement(aHTMLTag) as HTMLLinkElement;\n open.id = \"m-open\";\n open.href = \"#mailgo-open\";\n open.classList.add(\"m-open\");\n open.classList.add(\"m-default\");\n let openSpan: HTMLElement = createElement(spanHTMLTag);\n openSpan.className = \"w-500\";\n openSpan.appendChild(createTextNode(strings.open || defaultStrings.open));\n open.appendChild(openSpan);\n open.appendChild(\n createTextNode(strings._default || defaultStrings._default)\n );\n\n modalContent.appendChild(open);\n\n // copy\n copyMail = createElement(aHTMLTag) as HTMLLinkElement;\n copyMail.id = \"m-copy\";\n copyMail.href = \"#mailgo-copy\";\n copyMail.classList.add(\"m-copy\");\n copyMail.classList.add(\"w-500\");\n copyMail.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyMail);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalMailto);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // mailgo tel, if mailgo-tel not already exists\n let mailgoTelExists = !!document.getElementById(MAILGO_TEL);\n\n // if mailgo is enabled for tel/callto and it not exists in DOM\n if (telEnabled && !mailgoTelExists) {\n // modal\n modalTel = createElement() as HTMLElement;\n modalTel.style.display = \"none\";\n modalTel.id = MAILGO_TEL;\n modalTel.classList.add(\"m-modal\");\n modalTel.setAttribute(\"role\", \"dialog\");\n modalTel.setAttribute(\"tabindex\", \"-1\");\n modalTel.setAttribute(\"aria-labelledby\", \"m-tel-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalTel.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalTel.appendChild(modalContent);\n\n // title (telephone number)\n titleTel = createElement(\"strong\");\n titleTel.id = \"m-tel-title\";\n titleTel.className = \"m-title\";\n modalContent.appendChild(titleTel);\n\n // details\n let detailsTel: HTMLElement = createElement();\n detailsTel.id = \"m-tel-details\";\n detailsTel.className = \"m-details\";\n\n detailMsg = createElement(pHTMLTag);\n detailMsg.id = \"m-msg\";\n let msgSpan: HTMLElement = createElement(spanHTMLTag);\n msgSpan.className = \"w-500\";\n msgSpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n msgValue = createElement(spanHTMLTag);\n msgValue.id = \"m-msg-value\";\n detailMsg.appendChild(msgSpan);\n detailMsg.appendChild(msgValue);\n detailsTel.appendChild(detailMsg);\n\n modalContent.appendChild(detailsTel);\n\n // Telegram\n telegram = createElement(aHTMLTag) as HTMLLinkElement;\n telegram.id = \"m-tg\";\n telegram.href = \"#mailgo-telegram\";\n telegram.classList.add(\"m-open\");\n telegram.classList.add(\"m-tg\");\n\n // by default not display\n telegram.style.display = \"none\";\n\n telegram.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let telegramSpan: HTMLElement = createElement(spanHTMLTag);\n telegramSpan.className = \"w-500\";\n telegramSpan.appendChild(\n createTextNode(strings.telegram || defaultStrings.telegram)\n );\n telegram.appendChild(telegramSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"telegram\")) {\n modalContent.appendChild(telegram);\n }\n\n // WhatsApp\n wa = createElement(aHTMLTag) as HTMLLinkElement;\n wa.id = \"m-wa\";\n wa.href = \"#mailgo-whatsapp\";\n wa.classList.add(\"m-open\");\n wa.classList.add(\"m-wa\");\n wa.appendChild(createTextNode(strings.open_in_ || defaultStrings.open_in_));\n let waSpan: HTMLElement = createElement(spanHTMLTag);\n waSpan.className = \"w-500\";\n waSpan.appendChild(\n createTextNode(strings.whatsapp || defaultStrings.whatsapp)\n );\n wa.appendChild(waSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"whatsapp\")) {\n modalContent.appendChild(wa);\n }\n\n // Skype\n skype = createElement(aHTMLTag) as HTMLLinkElement;\n skype.id = \"m-skype\";\n skype.href = \"#mailgo-skype\";\n skype.classList.add(\"m-open\");\n skype.classList.add(\"m-skype\");\n skype.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let skypeSpan: HTMLElement = createElement(spanHTMLTag);\n skypeSpan.className = \"w-500\";\n skypeSpan.appendChild(\n createTextNode(strings.skype || defaultStrings.skype)\n );\n skype.appendChild(skypeSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"skype\")) {\n modalContent.appendChild(skype);\n }\n\n // call default\n call = createElement(aHTMLTag) as HTMLLinkElement;\n call.id = \"m-call\";\n call.href = \"#mailgo-open\";\n call.classList.add(\"m-open\");\n call.classList.add(\"m-default\");\n let callSpan: HTMLElement = createElement(spanHTMLTag);\n callSpan.className = \"w-500\";\n callSpan.appendChild(createTextNode(strings.call || defaultStrings.call));\n call.appendChild(callSpan);\n call.appendChild(\n createTextNode(strings._as_default || defaultStrings._as_default)\n );\n\n modalContent.appendChild(call);\n\n // copy\n copyTel = createElement(aHTMLTag) as HTMLLinkElement;\n copyTel.id = \"m-tel-copy\";\n copyTel.href = \"#mailgo-copy\";\n copyTel.classList.add(\"m-copy\");\n copyTel.classList.add(\"w-500\");\n copyTel.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyTel);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalTel);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // event listener on body, if the element is mailgo-compatible the mailgo modal will be rendered\n document.addEventListener(\"click\", mailgoClickListener);\n};\n\n/**\n * mailgoClickListener\n * function to check if an element is mailgo-enabled or not referencing to\n * mail:\n * document.querySelectorAll(\n * 'a[href^=\"mailto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * tel:\n * document.querySelectorAll(\n * 'a[href^=\"tel:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"callto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"sms:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n */\nfunction mailgoClickListener(event: Event): boolean {\n // check if the mailgo HTML exists in the body\n if (\n !document.body.contains(modalMailto) &&\n !document.body.contains(modalTel)\n ) {\n return false;\n }\n\n // if a mailgo is already showing do nothing\n if (mailgoIsShowing()) {\n return false;\n }\n\n // the path of the event\n let path =\n (event.composedPath && event.composedPath()) ||\n composedPath(event.target as HTMLElement);\n\n if (path) {\n path.forEach((element: HTMLElement) => {\n if (element instanceof HTMLDocument || element instanceof Window) {\n return false;\n }\n\n // go here only if one of the mailgo modals are enabled\n if (mailtoEnabled || telEnabled || smsEnabled) {\n let localMailgoType = getMailgoTypeByElement(element);\n\n // go on if the localMailgoType is not null\n if (localMailgoType) {\n // set the active mailgo type\n activeMailgoType = localMailgoType;\n\n let activeMailgoModalType = activeMailgoType?.type;\n\n if (activeMailgoModalType) {\n // check if the setting is enabled and if so go with pre-render\n if (\n (mailtoEnabled && activeMailgoModalType === MAILGO_MAIL) ||\n (telEnabled && activeMailgoModalType === MAILGO_TEL) ||\n (smsEnabled && activeMailgoModalType === MAILGO_SMS)\n ) {\n // stop the normal execution of the element click\n event.preventDefault();\n\n // render mailgo\n mailgoPreRender(element as HTMLLinkElement);\n\n return true;\n }\n }\n }\n }\n });\n }\n\n return false;\n}\n\n/**\n * mailgoPreRender\n * function to pre-render a mailgo, it helps populating elements needed by modal\n */\nfunction mailgoPreRender(\n mailgoElementOrUrl: HTMLLinkElement | string\n): boolean {\n let mailgoElement: HTMLLinkElement;\n\n // get the type and installation from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if type is not defined return\n if (!type) return false;\n\n if (typeof mailgoElementOrUrl === \"string\") {\n // if the parameter is a string it is the url\n href = mailgoElementOrUrl as string;\n } else {\n // if the paramenter is an HTMLLinkElement get the href attribute and the element\n href = mailgoElementOrUrl.getAttribute(\"href\") as string;\n mailgoElement = mailgoElementOrUrl as HTMLLinkElement;\n }\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // if the installation is classic\n if (installation === CLASSIC) {\n if (validateUrl(href, MAILTO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILTO)[1].trim());\n } else if (validateUrl(href, MAILGO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILGO)[1].trim());\n }\n\n try {\n url = new URL(href);\n\n let urlParams: URLSearchParams = url.searchParams;\n // optional parameters for the email\n cc = urlParams.get(\"cc\");\n bcc = urlParams.get(\"bcc\");\n subject = urlParams.get(\"subject\");\n bodyMail = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam\n // mail = data-address + @ + data-domain\n mail =\n mailgoElement.getAttribute(\"data-address\") &&\n mailgoElement.getAttribute(\"data-domain\")\n ? mailgoElement.getAttribute(\"data-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-domain\")\n : null;\n\n try {\n url = new URL(MAILTO + encodeURIComponent(mail));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // cc = data-cc-address + @ + data-cc-domain\n cc = mailgoElement.getAttribute(\"data-cc-address\")\n ? mailgoElement.getAttribute(\"data-cc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-cc-domain\")\n : null;\n\n // if cc is defined add it to parameters\n if (cc) parameters.push(\"cc=\" + cc);\n\n // bcc = data-bcc-address + @ + data-bcc-domain\n bcc = mailgoElement.getAttribute(\"data-bcc-address\")\n ? mailgoElement.getAttribute(\"data-bcc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-bcc-domain\")\n : null;\n\n // if bcc is defined add it to parameters\n if (bcc) parameters.push(\"bcc=\" + bcc);\n\n // subject = data-subject\n subject = mailgoElement.getAttribute(\"data-subject\");\n\n // if subject is defined add it to parameters\n if (subject) parameters.push(\"subject=\" + subject);\n\n // body = data-body\n bodyMail = mailgoElement.getAttribute(\"data-body\");\n\n // if body is defined add it to parameters\n if (bodyMail) parameters.push(\"body=\" + bodyMail);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n MAILTO + encodeURIComponent(mail),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateEmail !== \"undefined\") {\n validateEmailConfig = config.validateEmail;\n }\n\n if (validateEmailConfig) {\n // validate the email address\n if (!validateEmails(mail.split(\",\"))) {\n return false;\n }\n\n // if cc, bcc are not valid cc, bcc = \"\"\n if (cc && !validateEmails(cc.split(\",\"))) cc = \"\";\n if (bcc && !validateEmails(bcc.split(\",\"))) bcc = \"\";\n }\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n if (installation === CLASSIC) {\n if (validateUrl(href, TEL)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(TEL)[1].trim());\n } else if (validateUrl(href, CALLTO)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(CALLTO)[1].trim());\n } else if (validateUrl(href, SMS)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(SMS)[1].trim());\n }\n\n try {\n url = new URL(href);\n let urlParams: URLSearchParams = url.searchParams;\n\n // optional parameters for the phone number\n msg = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation == LESS_SPAM) {\n tel = mailgoElement.getAttribute(\"data-tel\");\n msg = mailgoElement.getAttribute(\"data-msg\");\n\n try {\n url = new URL(TEL + encodeURIComponent(tel));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // if msg is defined add it to parameters\n if (msg) parameters.push(\"body=\" + msg);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n TEL + encodeURIComponent(tel),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateTel !== \"undefined\") {\n validateTelConfig = config.validateTel;\n }\n\n // validate the phone number\n if (validateTelConfig) {\n if (!validateTel(tel)) return;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-telegram\")) {\n telegramUsername = mailgoElement.getAttribute(\"data-telegram\");\n } else {\n telegramUsername = null;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-skype\")) {\n skypeUsername = mailgoElement.getAttribute(\"data-skype\");\n } else {\n skypeUsername = null;\n }\n }\n\n // if dark is in config or contained in the element\n if (\n mailgoElement &&\n (config?.dark || mailgoElement.classList.contains(\"dark\"))\n ) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // render mailgo\n mailgoRender();\n\n return true;\n}\n\n/**\n * mailgoDirectRender\n * function to render a mailgo directly from a URL\n */\nfunction mailgoDirectRender(directUrl: string): boolean {\n // start mailgo\n mailgo();\n\n if (validateUrl(directUrl, MAILTO) || validateUrl(directUrl, MAILGO)) {\n activeMailgoType = {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n } else if (\n validateUrl(directUrl, TEL) ||\n validateUrl(directUrl, CALLTO) ||\n validateUrl(directUrl, SMS)\n ) {\n activeMailgoType = {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n }\n return false;\n}\n\n/**\n * mailgoRender\n * function to render a mailgo (mail or tel)\n */\nfunction mailgoRender(): boolean {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n\n // if type is not defined return\n if (!type) return false;\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // the title of the modal (email address)\n title.innerHTML = mail.split(\",\").join(\"
\");\n\n // add the details if provided\n if (mailgoConfigAttributeEnabled(\"detail\", \"cc\") && cc) {\n detailCc.style.display = \"block\";\n ccValue.innerHTML = cc.split(\",\").join(\"
\");\n } else {\n detailCc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"bcc\") && bcc) {\n detailBcc.style.display = \"block\";\n bccValue.innerHTML = bcc.split(\",\").join(\"
\");\n } else {\n detailBcc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"subject\") && subject) {\n detailSubject.style.display = \"block\";\n subjectValue.textContent = subject;\n } else {\n detailSubject.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"body\") && bodyMail) {\n detailBody.style.display = \"block\";\n bodyValue.textContent = bodyMail;\n } else {\n detailBody.style.display = \"none\";\n }\n\n // add the actions\n gmail.addEventListener(\"click\", openGmail);\n\n outlook.addEventListener(\"click\", openOutlook);\n\n yahoo.addEventListener(\"click\", openYahooMail);\n\n open.addEventListener(\"click\", openDefault);\n\n copyMail.addEventListener(\"click\", copy);\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n // the title of the modal (tel)\n titleTel.innerHTML = tel;\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"msg\") && msg) {\n detailMsg.style.display = \"block\";\n msgValue.textContent = msg;\n } else {\n detailMsg.style.display = \"none\";\n }\n\n // add the actions to buttons\n wa.addEventListener(\"click\", openWhatsApp);\n\n // telegram must be shown only if data-telegram is provided\n if (telegramUsername) {\n document.getElementById(\"m-tg\").style.display = \"block\";\n telegram.addEventListener(\"click\", openTelegram);\n } else {\n document.getElementById(\"m-tg\").style.display = \"none\";\n }\n\n skype.addEventListener(\"click\", openSkype);\n\n call.addEventListener(\"click\", openDefault);\n\n copyTel.addEventListener(\"click\", copy);\n }\n\n // show the mailgo\n showMailgo(type);\n\n // add listener keyDown\n document.addEventListener(\"keydown\", mailgoKeydown);\n\n return true;\n}\n\n// actions\nconst openGmail = (event?: Event): void => {\n event.preventDefault();\n\n let urlString: string;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n if (installation === CLASSIC) {\n try {\n urlString = url.toString();\n } catch (e) {\n urlString = href;\n }\n } else if (installation === LESS_SPAM) {\n urlString = lessSpamHref;\n }\n\n // Gmail url\n let gmailUrl: string =\n \"https://mail.google.com/mail/?extsrc=mailto&url=\" +\n encodeURIComponent(urlString);\n\n // open the link\n window.open(gmailUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openOutlook = (event?: Event): void => {\n event.preventDefault();\n\n // Outlook starting url\n let startingOutlookUrl: string =\n \"https://outlook.live.com/owa/?path=/mail/action/compose&to=\";\n\n // let the user to decide to open Office365 Outlook instead of the classic outlook.live.com\n if (config?.office365) {\n startingOutlookUrl =\n \"https://outlook.office365.com/owa/?path=/mail/action/compose&to=\";\n }\n\n // Outlook url\n let outlookUrl: string = startingOutlookUrl + encodeURIComponent(mail);\n\n // the details if provided\n if (subject) {\n outlookUrl = outlookUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n\n if (bodyMail) {\n outlookUrl = outlookUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(outlookUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openYahooMail = (event?: Event): void => {\n event.preventDefault();\n\n // Yahoo url\n let yahooUrl: string = \"https://compose.mail.yahoo.com/?to=\" + mail;\n\n // the details if provided\n if (subject) {\n yahooUrl = yahooUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n if (bodyMail) {\n yahooUrl = yahooUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(yahooUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openTelegram = (event?: Event): void => {\n event.preventDefault();\n\n // check if telegramUsername exists\n if (telegramUsername) {\n // Telegram url\n let tgUrl: string = \"https://t.me/\" + encodeURIComponent(telegramUsername);\n\n // open the url\n window.open(tgUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n }\n};\n\nconst openSkype = (event?: Event): void => {\n event.preventDefault();\n\n let skype: string = skypeUsername || tel;\n\n // Telegram url\n let skypeUrl: string = \"skype:\" + encodeURIComponent(skype);\n\n // open the url\n window.open(skypeUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openWhatsApp = (event?: Event): void => {\n event.preventDefault();\n\n // WhatsApp API doesn't work with non number digits and leading 0s: https://faq.whatsapp.com/general/chats/how-to-use-click-to-chat/\n let whatappTel = tel.replace(notNumber, \"\").replace(leadingZeros, \"\");\n\n // WhatsApp url\n let waUrl: string = \"https://wa.me/\" + encodeURIComponent(whatappTel);\n\n // the details if provided\n if (msg) {\n waUrl = waUrl.concat(\"?text=\" + encodeURIComponent(msg));\n }\n\n // open the url\n window.open(waUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openDefault = (event?: Event): void => {\n event.preventDefault();\n\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if the installation is classic the browser can follow the default behaviour\n if (installation === CLASSIC) {\n window.location.href = href;\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam use the built less-spam href\n window.location.href = lessSpamHref;\n }\n\n hideMailgo();\n};\n\nconst copy = (event?: Event): void => {\n event.preventDefault();\n\n // the correct copyButton (mail or tel)\n if (mailgoIsShowing()) {\n let activeCopy: HTMLElement;\n\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n // in case it is showing mail modal copy email address\n copyToClipboard(mail);\n activeCopy = copyMail;\n } else {\n // in case it is showing tel modal copy phone number\n copyToClipboard(tel);\n activeCopy = copyTel;\n }\n\n activeCopy.textContent = strings.copied || defaultStrings.copied;\n setTimeout(() => {\n activeCopy.textContent = strings.copy || defaultStrings.copy;\n // hide after the timeout\n hideMailgo();\n }, 999);\n }\n};\n\n// function to find if a link is a mailto, tel, callto or sms\nconst validateUrl = (url: string, type: string = MAILTO) => {\n let regexValidate = new RegExp(\"^\" + type + \"((.)+)\", \"gi\");\n return regexValidate.test(url);\n};\n\n// function that returns if an element is a mailgo\nfunction getMailgoTypeByElement(element: HTMLElement): MailgoType | null {\n let elementHref: string = (element as HTMLLinkElement).getAttribute(\"href\");\n\n // return null if there is no-mailgo in class\n if (element.classList?.contains(NO_MAILGO)) {\n return null;\n }\n\n // the case of classic type of mailgo, like a href=mailto:... or a href=tel:... and the class=mailgo with a useful href\n if (elementHref || element.classList?.contains(\"mailgo\")) {\n if (validateUrl(elementHref, MAILTO) || validateUrl(elementHref, MAILGO)) {\n // a mailto: or mailgo:\n return {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n } else if (\n validateUrl(elementHref, TEL) ||\n validateUrl(elementHref, CALLTO)\n ) {\n // a tel: or callto:\n return {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n } else if (validateUrl(elementHref, SMS)) {\n // a sms:\n return {\n type: MAILGO_SMS,\n installation: CLASSIC,\n };\n }\n }\n\n if (elementHref === \"#mailgo\" || element.classList?.contains(\"mailgo\")) {\n // less-spam installation of mailgo, check to the attributes\n if (\n element.hasAttribute(\"data-address\") &&\n element.hasAttribute(\"data-domain\")\n ) {\n // less-spam mailto with data-address and data-domain\n return {\n type: MAILGO_MAIL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-tel\")) {\n // less-spam tel with data-tel\n return {\n type: MAILGO_TEL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-msg\")) {\n // less-spam sms with data-msd\n return {\n type: MAILGO_SMS,\n installation: LESS_SPAM,\n };\n }\n }\n\n return null;\n}\n\n/**\n * mailgoKeydown\n * function to manage the keydown event when the modal is showing, return a boolean that represents if a useful key has been pressed\n */\nconst mailgoKeydown = (keyboardEvent: KeyboardEvent): boolean => {\n // if mailgo is showing\n if (mailgoIsShowing()) {\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 71:\n // g -> open GMail\n openGmail();\n return true;\n case 79:\n // o -> open Outlook\n openOutlook();\n return true;\n case 89:\n // y -> open Yahoo Mail\n openYahooMail();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n } else if (type === MAILGO_TEL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 84:\n // t -> open Telegram\n openTelegram();\n return true;\n case 87:\n // w -> open WhatsApp\n openWhatsApp();\n return true;\n case 83:\n // s -> open Skype\n openSkype();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n }\n }\n return false;\n};\n\n// show the modal\nconst showMailgo = (type: MailgoModalType): void => {\n // show the correct modal\n setModalDisplay(type, \"flex\");\n};\n\n// hide the modal\nconst hideMailgo = (): void => {\n // hide all the modals\n setModalDisplay(MAILGO_MAIL, \"none\");\n setModalDisplay(MAILGO_TEL, \"none\");\n\n // remove listener keyDown\n document.removeEventListener(\"keydown\", mailgoKeydown);\n};\n\n// is the mailgo modal hidden?\nconst mailgoIsShowing = (): boolean => {\n return (\n (mailtoEnabled && getModalDisplay(MAILGO_MAIL) === \"flex\") ||\n ((telEnabled || smsEnabled) && getModalDisplay(MAILGO_TEL) === \"flex\")\n );\n};\n\nconst byElement = (): HTMLLinkElement => {\n // by element in the footer\n let by: HTMLLinkElement = createElement(aHTMLTag) as HTMLLinkElement;\n by.href = \"https://mailgo.dev?ref=mailgo-modal\";\n by.className = \"m-by\";\n by.target = \"_blank\";\n by.rel = \"noopener noreferrer\";\n by.appendChild(createTextNode(\"mailgo.dev\"));\n\n return by;\n};\n\n// create element\nconst createElement = (element: string = \"div\"): HTMLElement =>\n document.createElement(element);\n\n// create text node\nconst createTextNode = (element: string): Text =>\n document.createTextNode(element);\n\n// get the correct HTMLElement from a type\nconst getModalHTMLElement = (type: MailgoModalType = MAILGO_MAIL) => {\n if (type === MAILGO_TEL) {\n return modalTel;\n } else {\n return modalMailto;\n }\n};\n\n// get display value\nconst getModalDisplay = (ref: MailgoModalType = MAILGO_MAIL): string =>\n getModalHTMLElement(ref).style.display;\n\n// set display value\nconst setModalDisplay = (\n ref: MailgoModalType = MAILGO_MAIL,\n value: string\n): void => {\n let modal = getModalHTMLElement(ref);\n\n if (modal) {\n modal.style.display = value;\n\n if (value === \"flex\") {\n // \"save\" the activated link.\n activatedLink = document.activeElement as HTMLElement;\n modal.setAttribute(\"aria-hidden\", \"false\");\n\n // Focus on the modal container.\n modal.setAttribute(\"tabindex\", \"0\");\n modal.focus();\n setFocusLoop(modal);\n } else {\n modal.setAttribute(\"aria-hidden\", \"true\");\n\n // focus back the activated link for getting back to the context.\n modal.setAttribute(\"tabindex\", \"-1\");\n activatedLink.focus();\n }\n }\n};\n\n// enable dark mode\nconst enableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.add(\"m-dark\");\n }\n};\n\n// disable dark mode\nconst disableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.remove(\"m-dark\");\n }\n};\n\n// custom composedPath if path or event.composedPath() are not defined\nconst composedPath = (\n el: HTMLElement\n): (HTMLElement | Document | (Window & typeof globalThis))[] => {\n let path = [];\n\n while (el) {\n path.push(el);\n\n if (el.tagName === \"HTML\") {\n path.push(document);\n path.push(window);\n return path;\n }\n\n el = el.parentElement;\n }\n};\n\n// function to recreate a mailto: or tel: href from less-spam\nconst buildLessSpamHref = (type: string, parameters: string[]): string => {\n lessSpamHref = type;\n if (parameters && parameters.length > 0) {\n let joinedParams = parameters.join(\"&\");\n lessSpamHref = lessSpamHref.concat(\"?\" + joinedParams);\n }\n return lessSpamHref;\n};\n\n// function to check an attribute is enabled or not, by default considering it enabled\nconst mailgoConfigAttributeEnabled = (\n type: \"action\" | \"detail\",\n attribute: MailgoAction | MailgoDetail\n): boolean => {\n console.log(type);\n console.log(attribute);\n\n // by default all the actions and attribute are enabled\n if (!config) {\n console.log(\"caso 1\");\n return true;\n }\n\n // if the attribute type is action consider the actions config attribute\n if (type === \"action\") {\n if (config && !config?.actions) {\n console.log(\"caso 2\");\n return true;\n }\n\n if (\n config &&\n config.actions &&\n config?.actions[attribute as MailgoAction] === false\n ) {\n console.log(\"caso 3\");\n return false;\n }\n } else if (type === \"detail\") {\n // else consider the details attribute\n\n if (config && !config?.details) {\n console.log(\"caso 2\");\n return true;\n }\n\n if (\n config &&\n config.details &&\n config?.details[attribute as MailgoDetail] === false\n ) {\n console.log(\"caso 4\");\n return false;\n }\n }\n\n return true;\n};\n\n// manage the language of mailgo\nconst mailgoSetLanguage = (): string => {\n let languageType = \"default lang\";\n\n // if a language is defined in configuration use it\n if (\n config?.lang &&\n (languages as MailgoLanguages).indexOf(config.lang) !== -1\n ) {\n lang = config.lang;\n languageType = \"config lang\";\n } else {\n // else if is defined use it!\n // keep the lang from html\n let htmlLang: string = document.documentElement.lang;\n\n // find the correct language using the lang attribute, not just a === because there a are cases like fr-FR or fr_FR in html lang attribute\n (languages as MailgoLanguages).forEach((language: any) => {\n if (new RegExp(\"^\" + language, \"gi\").test(htmlLang)) {\n lang = language;\n languageType = \"html lang\";\n }\n });\n }\n\n // strings\n strings = (translations as MailgoTranslations)[lang];\n\n return languageType;\n};\n\nconst mailgoStyle = (): void => {\n if (!document.getElementById(\"mailgo-style\")) {\n // mailgo style\n let mailgoCSSElement: HTMLStyleElement = createElement(\n \"style\"\n ) as HTMLStyleElement;\n mailgoCSSElement.id = \"mailgo-style\";\n mailgoCSSElement.type = \"text/css\";\n mailgoCSSElement.appendChild(createTextNode(mailgoCSS));\n document.head.appendChild(mailgoCSSElement);\n }\n};\n\n// mailgo\nfunction mailgo(mailgoConfig?: MailgoConfig): boolean {\n try {\n // polyfill mailgo\n // mailgoPolyfill();\n\n // set the global config merging window mailgConfig and mailgoConfig passed as a parameter\n config = { ...mailgoConfig, ...((window as any)?.mailgoConfig || null) };\n\n // if the window is defined...\n if (typeof window !== \"undefined\") {\n // if is set in config use it (load the mailgo CSS)\n if (typeof config?.loadCSS !== \"undefined\") {\n loadCSSConfig = config.loadCSS;\n }\n\n // if is set in config use it (enable mailto)\n if (typeof config?.mailto !== \"undefined\") {\n mailtoEnabled = config.mailto;\n }\n\n // if is set in config use it (enable tel)\n if (typeof config?.tel !== \"undefined\") {\n telEnabled = config.tel;\n }\n\n // if is set in config use it (enable sms)\n if (typeof config?.sms !== \"undefined\") {\n smsEnabled = config.sms;\n }\n\n // if load css enabled load it!\n if (loadCSSConfig) {\n // add the style for mailgo\n mailgoStyle();\n }\n\n // if is set an initEvent add the listener\n if (config?.initEvent) {\n if (config?.listenerOptions) {\n // listener options specified\n document.addEventListener(\n config.initEvent,\n mailgoInit,\n config.listenerOptions\n );\n } else {\n // no listener options\n document.addEventListener(config.initEvent, mailgoInit);\n }\n } else {\n mailgoInit();\n }\n\n return true;\n }\n } catch (error) {\n console.log(error);\n }\n return false;\n}\n\n// define the methods also for window element\nif (typeof window !== \"undefined\") {\n (window as any).getMailgoTypeByElement = getMailgoTypeByElement;\n (window as any).mailgoClickListener = mailgoClickListener;\n (window as any).mailgoCheckRender = mailgoClickListener; // for compatibility with old version of mailgo\n (window as any).mailgoPreRender = mailgoPreRender;\n (window as any).mailgoDirectRender = mailgoDirectRender;\n (window as any).mailgoRender = mailgoRender;\n (window as any).mailgo = mailgo;\n}\n\nexport {\n getMailgoTypeByElement,\n mailgoClickListener,\n mailgoPreRender,\n mailgoDirectRender,\n mailgoRender,\n};\n\nexport default mailgo;\n","export const userAgent = () => {\n if (\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n )\n ) {\n return \"mobile\";\n }\n return \"desktop\";\n};\n","// webpack > dist/mailgo.min.js\n\nimport mailgo from \"../src/mailgo\";\n\n// call init mailgo attached to the event DOMContentLoaded\nconst mailgoConfig = {\n initEvent: \"DOMContentLoaded\",\n};\n\nmailgo(mailgoConfig);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(474);\n","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/mailgo.nocss.min.js b/dist/mailgo.nocss.min.js index fd798f3..5069ca5 100644 --- a/dist/mailgo.nocss.min.js +++ b/dist/mailgo.nocss.min.js @@ -1,2 +1,2 @@ -window.mailgo=function(){var e={91:function(e,o,t){var a=t(476)((function(e){return e[1]}));a.push([e.id,'.m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:16.5px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:#20232a;opacity:.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:.95;border-radius:20px;box-shadow:0 3px 20px rgba(32,35,42,.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:24px;transition:.5s box-shadow}.m-modal .m-modal-content:hover,.m-modal .m-modal-content:focus,.m-modal .m-modal-content:active{opacity:1}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2em}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{cursor:pointer;padding:10px;color:#4a4a4a;border-radius:20px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#c0372a}.m-modal .m-modal-content a.m-gmail:hover,.m-modal .m-modal-content a.m-gmail:focus,.m-modal .m-modal-content a.m-gmail:active{background-color:rgba(192,55,42,.08);color:#c0372a}.m-modal .m-modal-content a.m-outlook{color:#0967aa}.m-modal .m-modal-content a.m-outlook:hover,.m-modal .m-modal-content a.m-outlook:focus,.m-modal .m-modal-content a.m-outlook:active{background-color:rgba(9,103,170,.08);color:#0967aa}.m-modal .m-modal-content a.m-yahoo{color:#4a00a0}.m-modal .m-modal-content a.m-yahoo:hover,.m-modal .m-modal-content a.m-yahoo:focus,.m-modal .m-modal-content a.m-yahoo:active{background-color:rgba(74,0,160,.08);color:#4a00a0}.m-modal .m-modal-content a.m-tg{color:#086da0}.m-modal .m-modal-content a.m-tg:hover,.m-modal .m-modal-content a.m-tg:focus,.m-modal .m-modal-content a.m-tg:active{background-color:rgba(8,109,160,.08);color:#086da0}.m-modal .m-modal-content a.m-wa{color:#067466}.m-modal .m-modal-content a.m-wa:hover,.m-modal .m-modal-content a.m-wa:focus,.m-modal .m-modal-content a.m-wa:active{background-color:rgba(6,116,102,.08);color:#067466}.m-modal .m-modal-content a.m-skype{color:#076d92}.m-modal .m-modal-content a.m-skype:hover,.m-modal .m-modal-content a.m-skype:focus,.m-modal .m-modal-content a.m-skype:active{background-color:rgba(7,109,146,.08);color:#076d92}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-default:focus,.m-modal .m-modal-content a.m-default:active,.m-modal .m-modal-content a.m-copy:hover,.m-modal .m-modal-content a.m-copy:focus,.m-modal .m-modal-content a.m-copy:active{background-color:rgba(0,0,0,.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:12px;margin-top:.8rem;padding:5px;color:#4a4a4a}.m-modal .m-modal-content a.m-by:hover,.m-modal .m-modal-content a.m-by:focus,.m-modal .m-modal-content a.m-by:active{color:#3d3d3d}.m-modal .m-modal-content .w-500{font-weight:500}.m-modal.m-dark .m-modal-content{background-color:#20232a}.m-modal.m-dark .m-modal-content,.m-modal.m-dark .m-modal-content p,.m-modal.m-dark .m-modal-content p span,.m-modal.m-dark .m-modal-content strong{color:#fff}.m-modal.m-dark .m-modal-content a{color:#eaeaea}.m-modal.m-dark .m-modal-content a:not(.m-by):hover,.m-modal.m-dark .m-modal-content a:not(.m-by):focus,.m-modal.m-dark .m-modal-content a:not(.m-by):active{background-color:rgba(134,134,134,.08);color:#eaeaea}.m-modal.m-dark .m-modal-content a.m-gmail{color:#e07d73}.m-modal.m-dark .m-modal-content a.m-gmail:hover,.m-modal.m-dark .m-modal-content a.m-gmail:focus,.m-modal.m-dark .m-modal-content a.m-gmail:active{background-color:rgba(224,125,115,.08);color:#e07d73}.m-modal.m-dark .m-modal-content a.m-outlook{color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-outlook:hover,.m-modal.m-dark .m-modal-content a.m-outlook:focus,.m-modal.m-dark .m-modal-content a.m-outlook:active{background-color:rgba(76,156,215,.08);color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-yahoo{color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-yahoo:hover,.m-modal.m-dark .m-modal-content a.m-yahoo:focus,.m-modal.m-dark .m-modal-content a.m-yahoo:active{background-color:rgba(172,136,211,.08);color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-tg{color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-tg:hover,.m-modal.m-dark .m-modal-content a.m-tg:focus,.m-modal.m-dark .m-modal-content a.m-tg:active{background-color:rgba(76,171,219,.08);color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-wa{color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-wa:hover,.m-modal.m-dark .m-modal-content a.m-wa:focus,.m-modal.m-dark .m-modal-content a.m-wa:active{background-color:rgba(76,210,192,.08);color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-skype{color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-skype:hover,.m-modal.m-dark .m-modal-content a.m-skype:focus,.m-modal.m-dark .m-modal-content a.m-skype:active{background-color:rgba(76,199,244,.08);color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-by:hover,.m-modal.m-dark .m-modal-content a.m-by:focus,.m-modal.m-dark .m-modal-content a.m-by:active{color:#fff}',""]),e.exports=a},476:function(e){"use strict";e.exports=function(e){var o=[];return o.toString=function(){return this.map((function(o){var t=e(o);return o[2]?"@media ".concat(o[2]," {").concat(t,"}"):t})).join("")},o.i=function(e,t,a){"string"==typeof e&&(e=[[null,e,""]]);var n={};if(a)for(var d=0;d()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},b=function(e){return e.every(g)},y=function(e){var o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style.position="absolute",o.style.left="-9999px",document.body.appendChild(o);var t=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);return o.select(),document.execCommand("copy"),document.body.removeChild(o),!!t&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(t),!0)},h=function(e){var o=e;o.querySelector(".m-modal-content a:last-of-type").addEventListener("keydown",k),o.querySelector(".m-modal-content a:first-of-type").addEventListener("keydown",_)},k=function(e){"Tab"===e.code&&!1===e.shiftKey&&(e.preventDefault(),e.target.closest("div").querySelector("a:first-of-type").focus())},_=function(e){"Tab"===e.code&&!0===e.shiftKey&&(e.preventDefault(),e.target.closest("div").querySelector("a:last-of-type").focus())},w=JSON.parse('["en","it","es","de","fr","pt","nl","ru","sv","no","dk","is","zh"]'),C=JSON.parse('{"en":{"open_in_":"open in ","cc_":"cc ","bcc_":"bcc ","subject_":"subject ","body_":"body ","gmail":"Gmail","outlook":"Outlook","yahoo":"Yahoo Mail","telegram":"Telegram","whatsapp":"WhatsApp","skype":"Skype","call":"call","open":"open","_default":" default","_as_default":" as default","copy":"copy","copied":"copied"},"it":{"open_in_":"apri con ","bcc_":"ccn ","subject_":"oggetto ","body_":"testo ","call":"chiama","open":"apri","_default":" ","_as_default":" ","copy":"copia","copied":"copiato"},"es":{"open_in_":"abrir con ","bcc_":"cco ","subject_":"asunto ","body_":"cuerpo ","call":"llamar","open":"abrir","_default":" predefinido","_as_default":" por defecto","copy":"copiar","copied":"copiado"},"de":{"open_in_":"Öffnen in ","subject_":"Betreff ","body_":"Nachricht ","call":"Anrufen","open":"Öffnen","_default":" mit Standard","_as_default":" mit Standard","copy":"kopieren","copied":"kopiert"},"pt":{"open_in_":"abrir com ","bcc_":"cco ","subject_":"assunto ","body_":"corpo ","call":"ligar","open":"abrir","_default":" padrão","_as_default":" por padrão","copy":"copiar","copied":"copiado"},"fr":{"open_in_":"Ouvrir dans ","bcc_":"cci ","subject_":"sujet ","body_":"contenu ","call":"Appeler","open":"Ouvrir","_default":" par défaut","_as_default":" par défaut","copy":"Copier","copied":"copié"},"nl":{"subject_":"onderwerp ","body_":"bericht ","call":"bellen","open":"openen","_default":" standaard","_as_default":" als standaard","copy":"kopiëren"},"ru":{"open_in_":"открыть в ","subject_":"тема ","body_":"тело ","call":"позвонить","open":"открыть","_default":" по умолчанию","_as_default":" по умолчанию","copy":"скопировать"},"sv":{"open_in_":"öppna i ","subject_":"ämne ","body_":"meddelandetext ","call":"ring","open":"öppna","_default":" förval","_as_default":" som förval","copy":"kopiera","copied":"kopierad"},"no":{"open_in_":"åpne i ","subject_":"emne ","call":"ringe","open":"åpne","_as_default":" som standard","copy":"kopiere","copied":"kopiert"},"dk":{"open_in_":"åpne i ","subject_":"emne ","call":"ringe op","open":"åben","_as_default":" som standard","copy":"kopi","copied":"kopieret"},"is":{"open_in_":"opið inn ","subject_":"viðfangsefni ","body_":"líkami ","call":"hringja","open":"opið","_default":" sjálfgefið","_as_default":" sem sjálfgefið","copy":"afrita","copied":"afritað"},"zh":{"open_in_":"開啟 ","cc_":"副本 ","bcc_":"密件副本 ","subject_":"主旨 ","body_":"內文 ","call":"通話","open":"開啟","_default":" 預設","_as_default":" 預設","copy":"複製","copied":"已複製"}}');function x(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,a)}return t}function L(e){for(var o=1;o"),to("detail","cc")&&D?(W.style.display="block",Q.innerHTML=D.split(",").join("
")):W.style.display="none",to("detail","bcc")&&T?(Z.style.display="block",V.innerHTML=T.split(",").join("
")):Z.style.display="none",to("detail","subject")&&z?($.style.display="block",X.textContent=z):$.style.display="none",to("detail","body")&&M?(G.style.display="block",ee.textContent=M):G.style.display="none",ae.addEventListener("click",Ie),ne.addEventListener("click",Ne),de.addEventListener("click",Ue),le.addEventListener("click",ze),se.addEventListener("click",Me)):o===r&&(K.innerHTML=B,to("detail","msg")&&H?(Y.style.display="block",oe.textContent=H):Y.style.display="none",me.addEventListener("click",Te),F?(document.getElementById("m-tg").style.display="block",ie.addEventListener("click",Pe)):document.getElementById("m-tg").style.display="none",re.addEventListener("click",De),ce.addEventListener("click",ze),pe.addEventListener("click",Me)),qe(o),document.addEventListener("keydown",Fe),!0)}var Ie=function(e){var o,t;e.preventDefault();var a=null===(o=S)||void 0===o?void 0:o.installation;if(a===s)try{t=I.toString()}catch(e){t=N}else a===p&&(t=U);var n="https://mail.google.com/mail/?extsrc=mailto&url="+encodeURIComponent(t);window.open(n,"_blank","noopener, noreferrer"),Je()},Ne=function(e){var o;e.preventDefault();var t="https://outlook.live.com/owa/?path=/mail/action/compose&to=";null!==(o=A)&&void 0!==o&&o.office365&&(t="https://outlook.office365.com/owa/?path=/mail/action/compose&to=");var a=t+encodeURIComponent(P);z&&(a=a.concat("&subject="+encodeURIComponent(z))),M&&(a=a.concat("&body="+encodeURIComponent(M))),window.open(a,"_blank","noopener, noreferrer"),Je()},Ue=function(e){e.preventDefault();var o="https://compose.mail.yahoo.com/?to="+P;z&&(o=o.concat("&subject="+encodeURIComponent(z))),M&&(o=o.concat("&body="+encodeURIComponent(M))),window.open(o,"_blank","noopener, noreferrer"),Je()},Pe=function(e){if(e.preventDefault(),F){var o="https://t.me/"+encodeURIComponent(F);window.open(o,"_blank","noopener, noreferrer"),Je()}},De=function(e){e.preventDefault();var o="skype:"+encodeURIComponent(q||B);window.open(o,"_blank","noopener, noreferrer"),Je()},Te=function(e){e.preventDefault();var o=B.replace(ge,"").replace(be,""),t="https://wa.me/"+encodeURIComponent(o);H&&(t=t.concat("?text="+encodeURIComponent(H))),window.open(t,"_blank","noopener, noreferrer"),Je()},ze=function(e){var o;e.preventDefault();var t=null===(o=S)||void 0===o?void 0:o.installation;t===s?window.location.href=N:t===p&&(window.location.href=U),Je()},Me=function(e){var o,t;(e.preventDefault(),Ke())&&((null===(o=S)||void 0===o?void 0:o.type)===m?(y(P),t=se):(y(B),t=pe),t.textContent=E.copied||ve.copied,setTimeout((function(){t.textContent=E.copy||ve.copy,Je()}),999))},Be=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,t=new RegExp("^"+o+"((.)+)","gi");return t.test(e)};function He(e){var o,t,u,f=e.getAttribute("href");if(null!==(o=e.classList)&&void 0!==o&&o.contains("no-mailgo"))return null;if(f||null!==(t=e.classList)&&void 0!==t&&t.contains("mailgo")){if(Be(f,a)||Be(f,n))return{type:m,installation:s};if(Be(f,d)||Be(f,l))return{type:r,installation:s};if(Be(f,i))return{type:c,installation:s}}if("#mailgo"===f||null!==(u=e.classList)&&void 0!==u&&u.contains("mailgo")){if(e.hasAttribute("data-address")&&e.hasAttribute("data-domain"))return{type:m,installation:p};if(e.hasAttribute("data-tel"))return{type:r,installation:p};if(e.hasAttribute("data-msg"))return{type:c,installation:p}}return null}var Fe=function(e){if(Ke()){var o,t=null===(o=S)||void 0===o?void 0:o.type;if(t===m)switch(e.keyCode){case 27:return Je(),!0;case 71:return Ie(),!0;case 79:return Ne(),!0;case 89:return Ue(),!0;case 32:case 13:return ze(),!0;case 67:return Me(),!0;default:return!1}else if(t===r)switch(e.keyCode){case 27:return Je(),!0;case 84:return Pe(),!0;case 87:return Te(),!0;case 83:return De(),!0;case 32:case 13:return ze(),!0;case 67:return Me(),!0;default:return!1}}return!1},qe=function(e){Qe(e,"flex")},Je=function(){Qe(m,"none"),Qe(r,"none"),document.removeEventListener("keydown",Fe)},Ke=function(){return he&&"flex"===Ye(m)||(ke||_e)&&"flex"===Ye(r)},We=function(){var e=Ze(f);return e.href="https://mailgo.dev?ref=mailgo-modal",e.className="m-by",e.target="_blank",e.rel="noopener noreferrer",e.appendChild($e("mailgo.dev")),e},Ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div";return document.createElement(e)},$e=function(e){return document.createTextNode(e)},Ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;return e===r?O:R},Ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;return Ge(e).style.display},Qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,o=arguments.length>1?arguments[1]:void 0,t=Ge(e);t&&(t.style.display=o,"flex"===o?(te=document.activeElement,t.setAttribute("aria-hidden","false"),t.setAttribute("tabindex","0"),t.focus(),h(t)):(t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex","-1"),te.focus()))},Ve=function(){var e,o=null===(e=S)||void 0===e?void 0:e.type;o&&Ge(o).classList.add("m-dark")},Xe=function(){var e,o=null===(e=S)||void 0===e?void 0:e.type;o&&Ge(o).classList.remove("m-dark")},eo=function(e){for(var o=[];e;){if(o.push(e),"HTML"===e.tagName)return o.push(document),o.push(window),o;e=e.parentElement}},oo=function(e,o){if(U=e,o&&o.length>0){var t=o.join("&");U=U.concat("?"+t)}return U},to=function(e,o){var t,a;if(!A)return!0;if(A&&(null===(t=A)||void 0===t||!t.actions))return!0;if("action"===e){if(A&&A.actions&&!1===(null===(a=A)||void 0===a?void 0:a.actions[o]))return!1}else if("detail"===e){var n;if(A&&A.details&&!1===(null===(n=A)||void 0===n?void 0:n.details[o]))return!1}return!0},ao=function(){var e,o="default lang";if(null!==(e=A)&&void 0!==e&&e.lang&&-1!==w.indexOf(A.lang))fe=A.lang,o="config lang";else{var t=document.documentElement.lang;w.forEach((function(e){new RegExp("^"+e,"gi").test(t)&&(fe=e,o="html lang")}))}return E=C[fe],o};function no(e){try{var o;if(A=L(L({},e),(null===(o=window)||void 0===o?void 0:o.mailgoConfig)||null),"undefined"!=typeof window){var t,a,n,d,l,i;if(void 0!==(null===(t=A)||void 0===t?void 0:t.loadCSS)&&(Ee=A.loadCSS),void 0!==(null===(a=A)||void 0===a?void 0:a.mailto)&&(he=A.mailto),void 0!==(null===(n=A)||void 0===n?void 0:n.tel)&&(ke=A.tel),void 0!==(null===(d=A)||void 0===d?void 0:d.sms)&&(_e=A.sms),Ee&&function(){if(!document.getElementById("mailgo-style")){var e=Ze("style");e.id="mailgo-style",e.type="text/css",e.appendChild($e(ue)),document.head.appendChild(e)}}(),null!==(l=A)&&void 0!==l&&l.initEvent)null!==(i=A)&&void 0!==i&&i.listenerOptions?document.addEventListener(A.initEvent,Ae,A.listenerOptions):document.addEventListener(A.initEvent,Ae);else Ae();return!0}}catch(e){console.log(e)}return!1}"undefined"!=typeof window&&(window.getMailgoTypeByElement=He,window.mailgoClickListener=Se,window.mailgoCheckRender=Se,window.mailgoPreRender=Re,window.mailgoDirectRender=function(e){return no(),Be(e,a)||Be(e,n)?(S={type:m,installation:s},Re(e),!0):!!(Be(e,d)||Be(e,l)||Be(e,i))&&(S={type:r,installation:s},Re(e),!0)},window.mailgoRender=Oe,window.mailgo=no);no({initEvent:"DOMContentLoaded",loadCSS:!1})}},o={};function t(a){if(o[a])return o[a].exports;var n=o[a]={id:a,exports:{}};return e[a](n,n.exports,t),n.exports}return t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t(331)}(); +window.mailgo=function(){var e={91:function(e,o,t){var a=t(476)((function(e){return e[1]}));a.push([e.id,'.m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:16.5px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:#20232a;opacity:.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:.95;border-radius:20px;box-shadow:0 3px 20px rgba(32,35,42,.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:24px;transition:.5s box-shadow}.m-modal .m-modal-content:hover,.m-modal .m-modal-content:focus,.m-modal .m-modal-content:active{opacity:1}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2em}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{cursor:pointer;padding:10px;color:#4a4a4a;border-radius:20px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#c0372a}.m-modal .m-modal-content a.m-gmail:hover,.m-modal .m-modal-content a.m-gmail:focus,.m-modal .m-modal-content a.m-gmail:active{background-color:rgba(192,55,42,.08);color:#c0372a}.m-modal .m-modal-content a.m-outlook{color:#0967aa}.m-modal .m-modal-content a.m-outlook:hover,.m-modal .m-modal-content a.m-outlook:focus,.m-modal .m-modal-content a.m-outlook:active{background-color:rgba(9,103,170,.08);color:#0967aa}.m-modal .m-modal-content a.m-yahoo{color:#4a00a0}.m-modal .m-modal-content a.m-yahoo:hover,.m-modal .m-modal-content a.m-yahoo:focus,.m-modal .m-modal-content a.m-yahoo:active{background-color:rgba(74,0,160,.08);color:#4a00a0}.m-modal .m-modal-content a.m-tg{color:#086da0}.m-modal .m-modal-content a.m-tg:hover,.m-modal .m-modal-content a.m-tg:focus,.m-modal .m-modal-content a.m-tg:active{background-color:rgba(8,109,160,.08);color:#086da0}.m-modal .m-modal-content a.m-wa{color:#067466}.m-modal .m-modal-content a.m-wa:hover,.m-modal .m-modal-content a.m-wa:focus,.m-modal .m-modal-content a.m-wa:active{background-color:rgba(6,116,102,.08);color:#067466}.m-modal .m-modal-content a.m-skype{color:#076d92}.m-modal .m-modal-content a.m-skype:hover,.m-modal .m-modal-content a.m-skype:focus,.m-modal .m-modal-content a.m-skype:active{background-color:rgba(7,109,146,.08);color:#076d92}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-default:focus,.m-modal .m-modal-content a.m-default:active,.m-modal .m-modal-content a.m-copy:hover,.m-modal .m-modal-content a.m-copy:focus,.m-modal .m-modal-content a.m-copy:active{background-color:rgba(0,0,0,.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:12px;margin-top:.8rem;padding:5px;color:#4a4a4a}.m-modal .m-modal-content a.m-by:hover,.m-modal .m-modal-content a.m-by:focus,.m-modal .m-modal-content a.m-by:active{color:#3d3d3d}.m-modal .m-modal-content .w-500{font-weight:500}.m-modal.m-dark .m-modal-content{background-color:#20232a}.m-modal.m-dark .m-modal-content,.m-modal.m-dark .m-modal-content p,.m-modal.m-dark .m-modal-content p span,.m-modal.m-dark .m-modal-content strong{color:#fff}.m-modal.m-dark .m-modal-content a{color:#eaeaea}.m-modal.m-dark .m-modal-content a:not(.m-by):hover,.m-modal.m-dark .m-modal-content a:not(.m-by):focus,.m-modal.m-dark .m-modal-content a:not(.m-by):active{background-color:rgba(134,134,134,.08);color:#eaeaea}.m-modal.m-dark .m-modal-content a.m-gmail{color:#e07d73}.m-modal.m-dark .m-modal-content a.m-gmail:hover,.m-modal.m-dark .m-modal-content a.m-gmail:focus,.m-modal.m-dark .m-modal-content a.m-gmail:active{background-color:rgba(224,125,115,.08);color:#e07d73}.m-modal.m-dark .m-modal-content a.m-outlook{color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-outlook:hover,.m-modal.m-dark .m-modal-content a.m-outlook:focus,.m-modal.m-dark .m-modal-content a.m-outlook:active{background-color:rgba(76,156,215,.08);color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-yahoo{color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-yahoo:hover,.m-modal.m-dark .m-modal-content a.m-yahoo:focus,.m-modal.m-dark .m-modal-content a.m-yahoo:active{background-color:rgba(172,136,211,.08);color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-tg{color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-tg:hover,.m-modal.m-dark .m-modal-content a.m-tg:focus,.m-modal.m-dark .m-modal-content a.m-tg:active{background-color:rgba(76,171,219,.08);color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-wa{color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-wa:hover,.m-modal.m-dark .m-modal-content a.m-wa:focus,.m-modal.m-dark .m-modal-content a.m-wa:active{background-color:rgba(76,210,192,.08);color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-skype{color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-skype:hover,.m-modal.m-dark .m-modal-content a.m-skype:focus,.m-modal.m-dark .m-modal-content a.m-skype:active{background-color:rgba(76,199,244,.08);color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-by:hover,.m-modal.m-dark .m-modal-content a.m-by:focus,.m-modal.m-dark .m-modal-content a.m-by:active{color:#fff}',""]),e.exports=a},476:function(e){"use strict";e.exports=function(e){var o=[];return o.toString=function(){return this.map((function(o){var t=e(o);return o[2]?"@media ".concat(o[2]," {").concat(t,"}"):t})).join("")},o.i=function(e,t,a){"string"==typeof e&&(e=[[null,e,""]]);var n={};if(a)for(var d=0;d()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},h=function(e){return e.every(y)},k=function(e){var o=document.createElement("textarea");o.value=e,o.setAttribute("readonly",""),o.style.position="absolute",o.style.left="-9999px",document.body.appendChild(o);var t=document.getSelection().rangeCount>0&&document.getSelection().getRangeAt(0);return o.select(),document.execCommand("copy"),document.body.removeChild(o),!!t&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(t),!0)},_=function(e){var o=e;o.querySelector(".m-modal-content a:last-of-type").addEventListener("keydown",w),o.querySelector(".m-modal-content a:first-of-type").addEventListener("keydown",C)},w=function(e){"Tab"===e.code&&!1===e.shiftKey&&(e.preventDefault(),e.target.closest("div").querySelector("a:first-of-type").focus())},C=function(e){"Tab"===e.code&&!0===e.shiftKey&&(e.preventDefault(),e.target.closest("div").querySelector("a:last-of-type").focus())},x=JSON.parse('["en","it","es","de","fr","pt","nl","ru","sv","no","dk","is","zh"]'),L=JSON.parse('{"en":{"open_in_":"open in ","cc_":"cc ","bcc_":"bcc ","subject_":"subject ","body_":"body ","gmail":"Gmail","outlook":"Outlook","yahoo":"Yahoo Mail","telegram":"Telegram","whatsapp":"WhatsApp","skype":"Skype","call":"call","open":"open","_default":" default","_as_default":" as default","copy":"copy","copied":"copied"},"it":{"open_in_":"apri con ","bcc_":"ccn ","subject_":"oggetto ","body_":"testo ","call":"chiama","open":"apri","_default":" ","_as_default":" ","copy":"copia","copied":"copiato"},"es":{"open_in_":"abrir con ","bcc_":"cco ","subject_":"asunto ","body_":"cuerpo ","call":"llamar","open":"abrir","_default":" predefinido","_as_default":" por defecto","copy":"copiar","copied":"copiado"},"de":{"open_in_":"Öffnen in ","subject_":"Betreff ","body_":"Nachricht ","call":"Anrufen","open":"Öffnen","_default":" mit Standard","_as_default":" mit Standard","copy":"kopieren","copied":"kopiert"},"pt":{"open_in_":"abrir com ","bcc_":"cco ","subject_":"assunto ","body_":"corpo ","call":"ligar","open":"abrir","_default":" padrão","_as_default":" por padrão","copy":"copiar","copied":"copiado"},"fr":{"open_in_":"Ouvrir dans ","bcc_":"cci ","subject_":"sujet ","body_":"contenu ","call":"Appeler","open":"Ouvrir","_default":" par défaut","_as_default":" par défaut","copy":"Copier","copied":"copié"},"nl":{"subject_":"onderwerp ","body_":"bericht ","call":"bellen","open":"openen","_default":" standaard","_as_default":" als standaard","copy":"kopiëren"},"ru":{"open_in_":"открыть в ","subject_":"тема ","body_":"тело ","call":"позвонить","open":"открыть","_default":" по умолчанию","_as_default":" по умолчанию","copy":"скопировать"},"sv":{"open_in_":"öppna i ","subject_":"ämne ","body_":"meddelandetext ","call":"ring","open":"öppna","_default":" förval","_as_default":" som förval","copy":"kopiera","copied":"kopierad"},"no":{"open_in_":"åpne i ","subject_":"emne ","call":"ringe","open":"åpne","_as_default":" som standard","copy":"kopiere","copied":"kopiert"},"dk":{"open_in_":"åpne i ","subject_":"emne ","call":"ringe op","open":"åben","_as_default":" som standard","copy":"kopi","copied":"kopieret"},"is":{"open_in_":"opið inn ","subject_":"viðfangsefni ","body_":"líkami ","call":"hringja","open":"opið","_default":" sjálfgefið","_as_default":" sem sjálfgefið","copy":"afrita","copied":"afritað"},"zh":{"open_in_":"開啟 ","cc_":"副本 ","bcc_":"密件副本 ","subject_":"主旨 ","body_":"內文 ","call":"通話","open":"開啟","_default":" 預設","_as_default":" 預設","copy":"複製","copied":"已複製"}}');function j(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);o&&(a=a.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,a)}return t}function E(e){for(var o=1;o"),to("detail","cc")&&z?($.style.display="block",X.innerHTML=z.split(",").join("
")):$.style.display="none",to("detail","bcc")&&M?(G.style.display="block",ee.innerHTML=M.split(",").join("
")):G.style.display="none",to("detail","subject")&&B?(Y.style.display="block",oe.textContent=B):Y.style.display="none",to("detail","body")&&H?(Q.style.display="block",te.textContent=H):Q.style.display="none",de.addEventListener("click",Ie),le.addEventListener("click",Ne),ie.addEventListener("click",Ue),me.addEventListener("click",ze),ue.addEventListener("click",Me)):o===c&&(Z.innerHTML=F,to("detail","msg")&&q?(V.style.display="block",ae.textContent=q):V.style.display="none",re.addEventListener("click",Te),J?(document.getElementById("m-tg").style.display="block",ce.addEventListener("click",Pe)):document.getElementById("m-tg").style.display="none",se.addEventListener("click",De),pe.addEventListener("click",ze),fe.addEventListener("click",Me)),qe(o),document.addEventListener("keydown",Fe),!0)}var Ie=function(e){var o,t;e.preventDefault();var a=null===(o=O)||void 0===o?void 0:o.installation;if(a===s)try{t=U.toString()}catch(e){t=P}else a===p&&(t=D);var n="https://mail.google.com/mail/?extsrc=mailto&url="+encodeURIComponent(t);window.open(n,"_blank","noopener, noreferrer"),Je()},Ne=function(e){var o;e.preventDefault();var t="https://outlook.live.com/owa/?path=/mail/action/compose&to=";null!==(o=R)&&void 0!==o&&o.office365&&(t="https://outlook.office365.com/owa/?path=/mail/action/compose&to=");var a=t+encodeURIComponent(T);B&&(a=a.concat("&subject="+encodeURIComponent(B))),H&&(a=a.concat("&body="+encodeURIComponent(H))),window.open(a,"_blank","noopener, noreferrer"),Je()},Ue=function(e){e.preventDefault();var o="https://compose.mail.yahoo.com/?to="+T;B&&(o=o.concat("&subject="+encodeURIComponent(B))),H&&(o=o.concat("&body="+encodeURIComponent(H))),window.open(o,"_blank","noopener, noreferrer"),Je()},Pe=function(e){if(e.preventDefault(),J){var o="https://t.me/"+encodeURIComponent(J);window.open(o,"_blank","noopener, noreferrer"),Je()}},De=function(e){e.preventDefault();var o="skype:"+encodeURIComponent(K||F);window.open(o,"_blank","noopener, noreferrer"),Je()},Te=function(e){e.preventDefault();var o=F.replace(g,"").replace(b,""),t="https://wa.me/"+encodeURIComponent(o);q&&(t=t.concat("?text="+encodeURIComponent(q))),window.open(t,"_blank","noopener, noreferrer"),Je()},ze=function(e){var o;e.preventDefault();var t=null===(o=O)||void 0===o?void 0:o.installation;t===s?window.location.href=P:t===p&&(window.location.href=D),Je()},Me=function(e){var o,t;(e.preventDefault(),Ke())&&((null===(o=O)||void 0===o?void 0:o.type)===m?(k(T),t=ue):(k(F),t=fe),t.textContent=S.copied||be.copied,setTimeout((function(){t.textContent=S.copy||be.copy,Je()}),999))},Be=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a,t=new RegExp("^"+o+"((.)+)","gi");return t.test(e)};function He(e){var o,t,u,f=e.getAttribute("href");if(null!==(o=e.classList)&&void 0!==o&&o.contains("no-mailgo"))return null;if(f||null!==(t=e.classList)&&void 0!==t&&t.contains("mailgo")){if(Be(f,a)||Be(f,n))return{type:m,installation:s};if(Be(f,d)||Be(f,l))return{type:c,installation:s};if(Be(f,i))return{type:r,installation:s}}if("#mailgo"===f||null!==(u=e.classList)&&void 0!==u&&u.contains("mailgo")){if(e.hasAttribute("data-address")&&e.hasAttribute("data-domain"))return{type:m,installation:p};if(e.hasAttribute("data-tel"))return{type:c,installation:p};if(e.hasAttribute("data-msg"))return{type:r,installation:p}}return null}var Fe=function(e){if(Ke()){var o,t=null===(o=O)||void 0===o?void 0:o.type;if(t===m)switch(e.keyCode){case 27:return Je(),!0;case 71:return Ie(),!0;case 79:return Ne(),!0;case 89:return Ue(),!0;case 32:case 13:return ze(),!0;case 67:return Me(),!0;default:return!1}else if(t===c)switch(e.keyCode){case 27:return Je(),!0;case 84:return Pe(),!0;case 87:return Te(),!0;case 83:return De(),!0;case 32:case 13:return ze(),!0;case 67:return Me(),!0;default:return!1}}return!1},qe=function(e){Qe(e,"flex")},Je=function(){Qe(m,"none"),Qe(c,"none"),document.removeEventListener("keydown",Fe)},Ke=function(){return he&&"flex"===Ye(m)||(ke||_e)&&"flex"===Ye(c)},We=function(){var e=Ze(f);return e.href="https://mailgo.dev?ref=mailgo-modal",e.className="m-by",e.target="_blank",e.rel="noopener noreferrer",e.appendChild($e("mailgo.dev")),e},Ze=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div";return document.createElement(e)},$e=function(e){return document.createTextNode(e)},Ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;return e===c?N:I},Ye=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;return Ge(e).style.display},Qe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m,o=arguments.length>1?arguments[1]:void 0,t=Ge(e);t&&(t.style.display=o,"flex"===o?(ne=document.activeElement,t.setAttribute("aria-hidden","false"),t.setAttribute("tabindex","0"),t.focus(),_(t)):(t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex","-1"),ne.focus()))},Ve=function(){var e,o=null===(e=O)||void 0===e?void 0:e.type;o&&Ge(o).classList.add("m-dark")},Xe=function(){var e,o=null===(e=O)||void 0===e?void 0:e.type;o&&Ge(o).classList.remove("m-dark")},eo=function(e){for(var o=[];e;){if(o.push(e),"HTML"===e.tagName)return o.push(document),o.push(window),o;e=e.parentElement}},oo=function(e,o){if(D=e,o&&o.length>0){var t=o.join("&");D=D.concat("?"+t)}return D},to=function(e,o){if(console.log(e),console.log(o),!R)return console.log("caso 1"),!0;if("action"===e){var t,a;if(R&&(null===(t=R)||void 0===t||!t.actions))return console.log("caso 2"),!0;if(R&&R.actions&&!1===(null===(a=R)||void 0===a?void 0:a.actions[o]))return console.log("caso 3"),!1}else if("detail"===e){var n,d;if(R&&(null===(n=R)||void 0===n||!n.details))return console.log("caso 2"),!0;if(R&&R.details&&!1===(null===(d=R)||void 0===d?void 0:d.details[o]))return console.log("caso 4"),!1}return!0},ao=function(){var e,o="default lang";if(null!==(e=R)&&void 0!==e&&e.lang&&-1!==x.indexOf(R.lang))ge=R.lang,o="config lang";else{var t=document.documentElement.lang;x.forEach((function(e){new RegExp("^"+e,"gi").test(t)&&(ge=e,o="html lang")}))}return S=L[ge],o};function no(e){try{var o;if(R=E(E({},e),(null===(o=window)||void 0===o?void 0:o.mailgoConfig)||null),"undefined"!=typeof window){var t,a,n,d,l,i;if(void 0!==(null===(t=R)||void 0===t?void 0:t.loadCSS)&&(Ee=R.loadCSS),void 0!==(null===(a=R)||void 0===a?void 0:a.mailto)&&(he=R.mailto),void 0!==(null===(n=R)||void 0===n?void 0:n.tel)&&(ke=R.tel),void 0!==(null===(d=R)||void 0===d?void 0:d.sms)&&(_e=R.sms),Ee&&function(){if(!document.getElementById("mailgo-style")){var e=Ze("style");e.id="mailgo-style",e.type="text/css",e.appendChild($e(ve)),document.head.appendChild(e)}}(),null!==(l=R)&&void 0!==l&&l.initEvent)null!==(i=R)&&void 0!==i&&i.listenerOptions?document.addEventListener(R.initEvent,Ae,R.listenerOptions):document.addEventListener(R.initEvent,Ae);else Ae();return!0}}catch(e){console.log(e)}return!1}"undefined"!=typeof window&&(window.getMailgoTypeByElement=He,window.mailgoClickListener=Se,window.mailgoCheckRender=Se,window.mailgoPreRender=Re,window.mailgoDirectRender=function(e){return no(),Be(e,a)||Be(e,n)?(O={type:m,installation:s},Re(e),!0):!!(Be(e,d)||Be(e,l)||Be(e,i))&&(O={type:c,installation:s},Re(e),!0)},window.mailgoRender=Oe,window.mailgo=no);no({initEvent:"DOMContentLoaded",loadCSS:!1})}},o={};function t(a){if(o[a])return o[a].exports;var n=o[a]={id:a,exports:{}};return e[a](n,n.exports,t),n.exports}return t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t(331)}(); //# sourceMappingURL=mailgo.nocss.min.js.map \ No newline at end of file diff --git a/dist/mailgo.nocss.min.js.map b/dist/mailgo.nocss.min.js.map index 00f5482..48eadff 100644 --- a/dist/mailgo.nocss.min.js.map +++ b/dist/mailgo.nocss.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://mailgo/../src/mailgo.scss","webpack://mailgo/../node_modules/css-loader/dist/runtime/api.js","webpack://mailgo/../src/mailgo.scss?81f2","webpack://mailgo/../src/constants.ts","webpack://mailgo/../src/utils.ts","webpack://mailgo/../src/mailgo.ts","webpack://mailgo/../src/mobile-detect.ts","webpack://mailgo/./mailgo.dist.nocss.ts","webpack://mailgo/webpack/bootstrap","webpack://mailgo/webpack/startup","webpack://mailgo/webpack/runtime/make namespace object"],"names":["___CSS_LOADER_EXPORT___","___CSS_LOADER_API_IMPORT___","i","push","module","id","exports","cssWithMappingToString","list","toString","this","map","item","content","concat","join","modules","mediaQuery","dedupe","alreadyImportedModules","length","_i","result","MAILTO","MAILGO","TEL","CALLTO","SMS","MAILGO_MAIL","MAILGO_TEL","MAILGO_SMS","CLASSIC","LESS_SPAM","spanHTMLTag","aHTMLTag","pHTMLTag","validateEmail","email","test","validateEmails","arr","every","copyToClipboard","str","el","document","createElement","value","setAttribute","style","position","left","body","appendChild","selected","getSelection","rangeCount","getRangeAt","select","execCommand","removeChild","removeAllRanges","addRange","setFocusLoop","ref","modal","querySelector","addEventListener","leaveLastLink","leaveFirstLink","e","code","shiftKey","preventDefault","target","closest","focus","strings","config","activeMailgoType","modalMailto","modalTel","url","href","lessSpamHref","mail","cc","bcc","subject","bodyMail","tel","msg","telegramUsername","skypeUsername","title","titleTel","detailCc","detailBcc","detailSubject","detailBody","detailMsg","ccValue","bccValue","subjectValue","bodyValue","msgValue","activatedLink","gmail","outlook","yahoo","open","telegram","wa","skype","call","copyMail","copyTel","mailgoCSS","require","lang","defaultStrings","translations","notNumber","RegExp","leadingZeros","isMobile","mailtoEnabled","telEnabled","smsEnabled","desktopEnabled","mobileEnabled","validateEmailConfig","validateTelConfig","showFooterConfig","loadCSSConfig","mailgoInit","navigator","userAgent","desktop","mobile","mailgoSetLanguage","mailgoExists","getElementById","display","classList","add","dark","enableDarkMode","disableDarkMode","modalBackground","className","modalContent","details","ccSpan","createTextNode","cc_","bccSpan","bcc_","subjectSpan","subject_","bodySpan","body_","open_in_","gmailSpan","mailgoConfigAttributeEnabled","outlookSpan","yahooSpan","openSpan","_default","copy","showFooter","byElement","hideMailgo","mailgoTelExists","detailsTel","msgSpan","telegramSpan","waSpan","whatsapp","skypeSpan","callSpan","_as_default","mailgoClickListener","event","contains","mailgoIsShowing","path","composedPath","forEach","element","HTMLDocument","Window","localMailgoType","getMailgoTypeByElement","activeMailgoModalType","type","mailgoPreRender","mailgoElementOrUrl","mailgoElement","installation","getAttribute","validateUrl","decodeURIComponent","split","trim","urlParams","URL","searchParams","get","error","console","log","encodeURIComponent","parameters","buildLessSpamHref","validateTel","hasAttribute","mailgoRender","innerHTML","textContent","openGmail","openOutlook","openYahooMail","openDefault","openWhatsApp","openTelegram","openSkype","showMailgo","mailgoKeydown","urlString","gmailUrl","window","startingOutlookUrl","office365","outlookUrl","yahooUrl","tgUrl","skypeUrl","whatappTel","replace","waUrl","location","activeCopy","copied","setTimeout","regexValidate","elementHref","keyboardEvent","keyCode","setModalDisplay","removeEventListener","getModalDisplay","by","rel","getModalHTMLElement","activeElement","remove","tagName","parentElement","joinedParams","attribute","actions","languageType","languages","htmlLang","documentElement","language","mailgo","mailgoConfig","loadCSS","mailto","sms","mailgoCSSElement","head","mailgoStyle","initEvent","listenerOptions","mailgoCheckRender","mailgoDirectRender","directUrl","__webpack_module_cache__","__webpack_require__","moduleId","__webpack_modules__","r","Symbol","toStringTag","Object","defineProperty"],"mappings":"mDACA,IACIA,EAD8B,EAAQ,IACZC,EAA4B,SAASC,GAAG,OAAOA,EAAE,MAE/EF,EAAwBG,KAAK,CAACC,EAAOC,GAAI,47KAAq8K,KAE9+KD,EAAOE,QAAUN,G,6BCEjBI,EAAOE,QAAU,SAAUC,GACzB,IAAIC,EAAO,GAuDX,OArDAA,EAAKC,SAAW,WACd,OAAOC,KAAKC,KAAI,SAAUC,GACxB,IAAIC,EAAUN,EAAuBK,GAErC,OAAIA,EAAK,GACA,UAAUE,OAAOF,EAAK,GAAI,MAAME,OAAOD,EAAS,KAGlDA,KACNE,KAAK,KAKVP,EAAKN,EAAI,SAAUc,EAASC,EAAYC,GACf,iBAAZF,IAETA,EAAU,CAAC,CAAC,KAAMA,EAAS,MAG7B,IAAIG,EAAyB,GAE7B,GAAID,EACF,IAAK,IAAIhB,EAAI,EAAGA,EAAIQ,KAAKU,OAAQlB,IAAK,CAEpC,IAAIG,EAAKK,KAAKR,GAAG,GAEP,MAANG,IACFc,EAAuBd,IAAM,GAKn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ourcesContent":["// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:16.5px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:#20232a;opacity:.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:.95;border-radius:20px;box-shadow:0 3px 20px rgba(32,35,42,.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:24px;transition:.5s box-shadow}.m-modal .m-modal-content:hover,.m-modal .m-modal-content:focus,.m-modal .m-modal-content:active{opacity:1}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2em}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{cursor:pointer;padding:10px;color:#4a4a4a;border-radius:20px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#c0372a}.m-modal .m-modal-content a.m-gmail:hover,.m-modal .m-modal-content a.m-gmail:focus,.m-modal .m-modal-content a.m-gmail:active{background-color:rgba(192,55,42,.08);color:#c0372a}.m-modal .m-modal-content a.m-outlook{color:#0967aa}.m-modal .m-modal-content a.m-outlook:hover,.m-modal .m-modal-content a.m-outlook:focus,.m-modal .m-modal-content a.m-outlook:active{background-color:rgba(9,103,170,.08);color:#0967aa}.m-modal .m-modal-content a.m-yahoo{color:#4a00a0}.m-modal .m-modal-content a.m-yahoo:hover,.m-modal .m-modal-content a.m-yahoo:focus,.m-modal .m-modal-content a.m-yahoo:active{background-color:rgba(74,0,160,.08);color:#4a00a0}.m-modal .m-modal-content a.m-tg{color:#086da0}.m-modal .m-modal-content a.m-tg:hover,.m-modal .m-modal-content a.m-tg:focus,.m-modal .m-modal-content a.m-tg:active{background-color:rgba(8,109,160,.08);color:#086da0}.m-modal .m-modal-content a.m-wa{color:#067466}.m-modal .m-modal-content a.m-wa:hover,.m-modal .m-modal-content a.m-wa:focus,.m-modal .m-modal-content a.m-wa:active{background-color:rgba(6,116,102,.08);color:#067466}.m-modal .m-modal-content a.m-skype{color:#076d92}.m-modal .m-modal-content a.m-skype:hover,.m-modal .m-modal-content a.m-skype:focus,.m-modal .m-modal-content a.m-skype:active{background-color:rgba(7,109,146,.08);color:#076d92}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-default:focus,.m-modal .m-modal-content a.m-default:active,.m-modal .m-modal-content a.m-copy:hover,.m-modal .m-modal-content a.m-copy:focus,.m-modal .m-modal-content a.m-copy:active{background-color:rgba(0,0,0,.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:12px;margin-top:.8rem;padding:5px;color:#4a4a4a}.m-modal .m-modal-content a.m-by:hover,.m-modal .m-modal-content a.m-by:focus,.m-modal .m-modal-content a.m-by:active{color:#3d3d3d}.m-modal .m-modal-content .w-500{font-weight:500}.m-modal.m-dark .m-modal-content{background-color:#20232a}.m-modal.m-dark .m-modal-content,.m-modal.m-dark .m-modal-content p,.m-modal.m-dark .m-modal-content p span,.m-modal.m-dark .m-modal-content strong{color:#fff}.m-modal.m-dark .m-modal-content a{color:#eaeaea}.m-modal.m-dark .m-modal-content a:not(.m-by):hover,.m-modal.m-dark .m-modal-content a:not(.m-by):focus,.m-modal.m-dark .m-modal-content a:not(.m-by):active{background-color:rgba(134,134,134,.08);color:#eaeaea}.m-modal.m-dark .m-modal-content a.m-gmail{color:#e07d73}.m-modal.m-dark .m-modal-content a.m-gmail:hover,.m-modal.m-dark .m-modal-content a.m-gmail:focus,.m-modal.m-dark .m-modal-content a.m-gmail:active{background-color:rgba(224,125,115,.08);color:#e07d73}.m-modal.m-dark .m-modal-content a.m-outlook{color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-outlook:hover,.m-modal.m-dark .m-modal-content a.m-outlook:focus,.m-modal.m-dark .m-modal-content a.m-outlook:active{background-color:rgba(76,156,215,.08);color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-yahoo{color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-yahoo:hover,.m-modal.m-dark .m-modal-content a.m-yahoo:focus,.m-modal.m-dark .m-modal-content a.m-yahoo:active{background-color:rgba(172,136,211,.08);color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-tg{color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-tg:hover,.m-modal.m-dark .m-modal-content a.m-tg:focus,.m-modal.m-dark .m-modal-content a.m-tg:active{background-color:rgba(76,171,219,.08);color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-wa{color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-wa:hover,.m-modal.m-dark .m-modal-content a.m-wa:focus,.m-modal.m-dark .m-modal-content a.m-wa:active{background-color:rgba(76,210,192,.08);color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-skype{color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-skype:hover,.m-modal.m-dark .m-modal-content a.m-skype:focus,.m-modal.m-dark .m-modal-content a.m-skype:active{background-color:rgba(76,199,244,.08);color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-by:hover,.m-modal.m-dark .m-modal-content a.m-by:focus,.m-modal.m-dark .m-modal-content a.m-by:active{color:#fff}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\n var result = require(\"!!../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../node_modules/sass-loader/dist/cjs.js!./mailgo.scss\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n ","import { MailgoModalType, MailgoInstallationType } from \"mailgo\";\n\n// links\nexport const MAILTO: string = \"mailto:\";\nexport const MAILGO: string = \"mailgo:\";\nexport const TEL: string = \"tel:\";\nexport const CALLTO: string = \"callto:\";\nexport const SMS: string = \"sms:\";\n\n// deep linking\nexport const outlookDeepLink: string = \"ms-outlook://\";\n\n// no mailgo class\nexport const NO_MAILGO: string = \"no-mailgo\";\n\n// responsive settings\nexport const DESKTOP: string = \"desktop\";\nexport const MOBILE: string = \"mobile\";\n\n// mailgo modal types\nexport const MAILGO_MAIL: MailgoModalType = \"mailgo\";\nexport const MAILGO_TEL: MailgoModalType = \"mailgo-tel\";\nexport const MAILGO_SMS: MailgoModalType = \"mailgo-sms\";\n\n// mailgo installation types\nexport const CLASSIC: MailgoInstallationType = \"classic\";\nexport const LESS_SPAM: MailgoInstallationType = \"less-spam\";\n\n// useful html tags\nexport const spanHTMLTag: string = \"span\";\nexport const aHTMLTag: string = \"a\";\nexport const pHTMLTag: string = \"p\";\n\n// default lang\nexport const defaultLang: string = \"en\";\n","// validate a single email with regex\nexport const validateEmail = (email: string): boolean =>\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/.test(\n email\n );\n\n// validate an array of emails\nexport const validateEmails = (arr: string[]): boolean =>\n arr.every(validateEmail);\n\n// validate a single tel with regex\nexport const validateTel = (tel: string): boolean =>\n /^[+]{0,1}[\\s0-9]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*[p]{0,1}[\\s0-9]*$/.test(\n tel\n );\n\n// copy of a string\nexport const copyToClipboard = (str: string): boolean => {\n let el: HTMLTextAreaElement = document.createElement(\n \"textarea\"\n ) as HTMLTextAreaElement;\n el.value = str;\n el.setAttribute(\"readonly\", \"\");\n el.style.position = \"absolute\";\n el.style.left = \"-9999px\";\n document.body.appendChild(el);\n let selected: Range | boolean =\n document.getSelection().rangeCount > 0\n ? document.getSelection().getRangeAt(0)\n : false;\n el.select();\n document.execCommand(\"copy\");\n document.body.removeChild(el);\n if (selected) {\n document.getSelection().removeAllRanges();\n document.getSelection().addRange(selected);\n return true;\n }\n return false;\n};\n\n// set focus loop within modal\nexport const setFocusLoop = (ref: HTMLElement): void => {\n let modal = ref;\n modal\n .querySelector(\".m-modal-content a:last-of-type\")\n .addEventListener(\"keydown\", leaveLastLink);\n modal\n .querySelector(\".m-modal-content a:first-of-type\")\n .addEventListener(\"keydown\", leaveFirstLink);\n};\n\nexport const leaveLastLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === false) {\n e.preventDefault();\n\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:first-of-type\") as HTMLElement).focus();\n }\n};\n\nexport const leaveFirstLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === true) {\n e.preventDefault();\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:last-of-type\") as HTMLElement).focus();\n }\n};\n","import {\n MailgoConfig,\n MailgoTranslations,\n MailgoTranslation,\n MailgoAction,\n MailgoLanguages,\n MailgoType,\n MailgoDetail,\n MailgoInstallationType,\n MailgoModalType,\n} from \"mailgo\";\n\n// polyfill\n// import { mailgoPolyfill } from \"./polyfill\";\n\n// constants\nimport {\n MAILTO,\n MAILGO,\n TEL,\n CALLTO,\n SMS,\n MAILGO_MAIL,\n MAILGO_TEL,\n MAILGO_SMS,\n CLASSIC,\n LESS_SPAM,\n NO_MAILGO,\n MOBILE,\n spanHTMLTag,\n aHTMLTag,\n pHTMLTag,\n defaultLang,\n} from \"./constants\";\n\n// utils\nimport {\n validateEmails,\n validateTel,\n copyToClipboard,\n setFocusLoop,\n} from \"./utils\";\n\n// i18n for mailgo\nimport languages from \"../i18n/languages.json\";\nimport translations from \"../i18n/translations.json\";\n\n// mobile detect\nimport { userAgent } from \"./mobile-detect\";\n\n// mailgo scss, with toString (https://github.com/webpack-contrib/css-loader#tostring)\nconst mailgoCSS: string = require(\"./mailgo.scss\").toString();\n\n// default language\nlet lang: string = defaultLang;\n\n// default strings\nconst defaultStrings: MailgoTranslation = (translations as MailgoTranslations)[\n defaultLang\n];\n\n// useful regexp\nconst notNumber: RegExp = new RegExp(\"[^0-9/]\", \"gi\");\nconst leadingZeros: RegExp = new RegExp(\"^0+\", \"gi\");\n\n// translation strings\nlet strings: MailgoTranslation;\n\n// global mailgo config object\nlet config: MailgoConfig;\n\n// config to check if the client is mobile or desktop\nlet isMobile: boolean = false;\n\n// default config attributes\nlet mailtoEnabled: boolean = true;\nlet telEnabled: boolean = true;\nlet smsEnabled: boolean = false;\nlet desktopEnabled: boolean = true;\nlet mobileEnabled: boolean = true;\nlet validateEmailConfig: boolean = true;\nlet validateTelConfig: boolean = true;\nlet showFooterConfig: boolean = true;\nlet loadCSSConfig: boolean = true;\n\n// activeMailgoType\nlet activeMailgoType: MailgoType;\n\n// modals global object\nlet modalMailto: HTMLElement, modalTel: HTMLElement;\n\n// mailgo general variables\nlet url: URL, href: string, lessSpamHref: string;\n\n// mailgo mail variables\nlet mail: string, cc: string, bcc: string, subject: string, bodyMail: string;\n\n// mailgo tel variables\nlet tel: string, msg: string, telegramUsername: string, skypeUsername: string;\n\n// the DOM elements\nlet title: HTMLElement,\n titleTel: HTMLElement,\n detailCc: HTMLElement,\n detailBcc: HTMLElement,\n detailSubject: HTMLElement,\n detailBody: HTMLElement,\n detailMsg: HTMLElement,\n ccValue: HTMLElement,\n bccValue: HTMLElement,\n subjectValue: HTMLElement,\n bodyValue: HTMLElement,\n msgValue: HTMLElement,\n activatedLink: HTMLElement;\n\n// mailgo buttons (actions)\nlet gmail: HTMLLinkElement,\n outlook: HTMLLinkElement,\n yahoo: HTMLLinkElement,\n open: HTMLLinkElement,\n telegram: HTMLLinkElement,\n wa: HTMLLinkElement,\n skype: HTMLLinkElement,\n call: HTMLLinkElement,\n copyMail: HTMLLinkElement,\n copyTel: HTMLLinkElement;\n\n/**\n * mailgoInit\n * the function that creates the mailgo elements in DOM\n */\nconst mailgoInit = (): void => {\n // set the boolean for mobile/desktop\n isMobile = userAgent() === MOBILE;\n\n // responsive settings\n {\n if (typeof config?.desktop !== \"undefined\") {\n desktopEnabled = config.desktop;\n // if it is a desktop and desktop is not enabled no init mailgo\n if (!isMobile && !desktopEnabled) {\n return;\n }\n }\n if (typeof config?.mobile !== \"undefined\") {\n mobileEnabled = config.mobile;\n // if it is a mobile and mobile is not enabled no init mailgo\n if (isMobile && !mobileEnabled) {\n return;\n }\n }\n }\n\n // set the mailgo language\n mailgoSetLanguage();\n\n // mailgo, if mailgo not already exists\n let mailgoExists = !!document.getElementById(MAILGO_MAIL);\n\n // if mailgo is enabled for mailto and it not exists in DOM\n if (mailtoEnabled && !mailgoExists) {\n // modal\n modalMailto = createElement() as HTMLElement;\n modalMailto.style.display = \"none\";\n modalMailto.id = MAILGO_MAIL;\n modalMailto.classList.add(\"m-modal\");\n modalMailto.setAttribute(\"role\", \"dialog\");\n modalMailto.setAttribute(\"tabindex\", \"-1\");\n modalMailto.setAttribute(\"aria-labelledby\", \"m-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalMailto.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalMailto.appendChild(modalContent);\n\n // title (email address)\n title = createElement(\"strong\");\n title.id = \"m-title\";\n title.className = \"m-title\";\n modalContent.appendChild(title);\n\n // details\n let details: HTMLElement = createElement();\n details.id = \"m-details\";\n details.className = \"m-details\";\n\n detailCc = createElement(pHTMLTag);\n detailCc.id = \"m-cc\";\n let ccSpan: HTMLElement = createElement(spanHTMLTag);\n ccSpan.className = \"w-500\";\n ccSpan.appendChild(createTextNode(strings.cc_ || defaultStrings.cc_));\n ccValue = createElement(spanHTMLTag);\n ccValue.id = \"m-cc-value\";\n detailCc.appendChild(ccSpan);\n detailCc.appendChild(ccValue);\n details.appendChild(detailCc);\n\n detailBcc = createElement(pHTMLTag);\n detailBcc.id = \"m-bcc\";\n let bccSpan: HTMLElement = createElement(spanHTMLTag);\n bccSpan.className = \"w-500\";\n bccSpan.appendChild(createTextNode(strings.bcc_ || defaultStrings.bcc_));\n bccValue = createElement(spanHTMLTag);\n bccValue.id = \"m-bcc-value\";\n detailBcc.appendChild(bccSpan);\n detailBcc.appendChild(bccValue);\n details.appendChild(detailBcc);\n\n detailSubject = createElement(pHTMLTag);\n detailSubject.id = \"m-subject\";\n let subjectSpan: HTMLElement = createElement(spanHTMLTag);\n subjectSpan.className = \"w-500\";\n subjectSpan.appendChild(\n createTextNode(strings.subject_ || defaultStrings.subject_)\n );\n subjectValue = createElement(spanHTMLTag);\n subjectValue.id = \"m-subject-value\";\n detailSubject.appendChild(subjectSpan);\n detailSubject.appendChild(subjectValue);\n details.appendChild(detailSubject);\n\n detailBody = createElement(pHTMLTag);\n detailBody.id = \"m-body\";\n let bodySpan: HTMLElement = createElement(spanHTMLTag);\n bodySpan.className = \"w-500\";\n bodySpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n bodyValue = createElement(spanHTMLTag);\n bodyValue.id = \"m-body-value\";\n detailBody.appendChild(bodySpan);\n detailBody.appendChild(bodyValue);\n details.appendChild(detailBody);\n\n modalContent.appendChild(details);\n\n // Gmail\n gmail = createElement(aHTMLTag) as HTMLLinkElement;\n gmail.id = \"m-gmail\";\n gmail.href = \"#mailgo-gmail\";\n gmail.classList.add(\"m-open\");\n gmail.classList.add(\"m-gmail\");\n gmail.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let gmailSpan: HTMLElement = createElement(spanHTMLTag);\n gmailSpan.className = \"w-500\";\n gmailSpan.appendChild(\n createTextNode(strings.gmail || defaultStrings.gmail)\n );\n gmail.appendChild(gmailSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"gmail\")) {\n modalContent.appendChild(gmail);\n }\n\n // Outlook\n outlook = createElement(aHTMLTag) as HTMLLinkElement;\n outlook.id = \"m-outlook\";\n outlook.href = \"#mailgo-outlook\";\n outlook.classList.add(\"m-open\");\n outlook.classList.add(\"m-outlook\");\n outlook.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let outlookSpan: HTMLElement = createElement(spanHTMLTag);\n outlookSpan.className = \"w-500\";\n outlookSpan.appendChild(\n createTextNode(strings.outlook || defaultStrings.outlook)\n );\n outlook.appendChild(outlookSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"outlook\")) {\n modalContent.appendChild(outlook);\n }\n\n // Outlook\n yahoo = createElement(aHTMLTag) as HTMLLinkElement;\n yahoo.id = \"m-yahoo\";\n yahoo.href = \"#mailgo-yahoo\";\n yahoo.classList.add(\"m-open\");\n yahoo.classList.add(\"m-yahoo\");\n yahoo.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let yahooSpan: HTMLElement = createElement(spanHTMLTag);\n yahooSpan.className = \"w-500\";\n yahooSpan.appendChild(\n createTextNode(strings.yahoo || defaultStrings.yahoo)\n );\n yahoo.appendChild(yahooSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"yahoo\")) {\n modalContent.appendChild(yahoo);\n }\n\n // open default\n open = createElement(aHTMLTag) as HTMLLinkElement;\n open.id = \"m-open\";\n open.href = \"#mailgo-open\";\n open.classList.add(\"m-open\");\n open.classList.add(\"m-default\");\n let openSpan: HTMLElement = createElement(spanHTMLTag);\n openSpan.className = \"w-500\";\n openSpan.appendChild(createTextNode(strings.open || defaultStrings.open));\n open.appendChild(openSpan);\n open.appendChild(\n createTextNode(strings._default || defaultStrings._default)\n );\n\n modalContent.appendChild(open);\n\n // copy\n copyMail = createElement(aHTMLTag) as HTMLLinkElement;\n copyMail.id = \"m-copy\";\n copyMail.href = \"#mailgo-copy\";\n copyMail.classList.add(\"m-copy\");\n copyMail.classList.add(\"w-500\");\n copyMail.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyMail);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalMailto);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // mailgo tel, if mailgo-tel not already exists\n let mailgoTelExists = !!document.getElementById(MAILGO_TEL);\n\n // if mailgo is enabled for tel/callto and it not exists in DOM\n if (telEnabled && !mailgoTelExists) {\n // modal\n modalTel = createElement() as HTMLElement;\n modalTel.style.display = \"none\";\n modalTel.id = MAILGO_TEL;\n modalTel.classList.add(\"m-modal\");\n modalTel.setAttribute(\"role\", \"dialog\");\n modalTel.setAttribute(\"tabindex\", \"-1\");\n modalTel.setAttribute(\"aria-labelledby\", \"m-tel-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalTel.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalTel.appendChild(modalContent);\n\n // title (telephone number)\n titleTel = createElement(\"strong\");\n titleTel.id = \"m-tel-title\";\n titleTel.className = \"m-title\";\n modalContent.appendChild(titleTel);\n\n // details\n let detailsTel: HTMLElement = createElement();\n detailsTel.id = \"m-tel-details\";\n detailsTel.className = \"m-details\";\n\n detailMsg = createElement(pHTMLTag);\n detailMsg.id = \"m-msg\";\n let msgSpan: HTMLElement = createElement(spanHTMLTag);\n msgSpan.className = \"w-500\";\n msgSpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n msgValue = createElement(spanHTMLTag);\n msgValue.id = \"m-msg-value\";\n detailMsg.appendChild(msgSpan);\n detailMsg.appendChild(msgValue);\n detailsTel.appendChild(detailMsg);\n\n modalContent.appendChild(detailsTel);\n\n // Telegram\n telegram = createElement(aHTMLTag) as HTMLLinkElement;\n telegram.id = \"m-tg\";\n telegram.href = \"#mailgo-telegram\";\n telegram.classList.add(\"m-open\");\n telegram.classList.add(\"m-tg\");\n\n // by default not display\n telegram.style.display = \"none\";\n\n telegram.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let telegramSpan: HTMLElement = createElement(spanHTMLTag);\n telegramSpan.className = \"w-500\";\n telegramSpan.appendChild(\n createTextNode(strings.telegram || defaultStrings.telegram)\n );\n telegram.appendChild(telegramSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"telegram\")) {\n modalContent.appendChild(telegram);\n }\n\n // WhatsApp\n wa = createElement(aHTMLTag) as HTMLLinkElement;\n wa.id = \"m-wa\";\n wa.href = \"#mailgo-whatsapp\";\n wa.classList.add(\"m-open\");\n wa.classList.add(\"m-wa\");\n wa.appendChild(createTextNode(strings.open_in_ || defaultStrings.open_in_));\n let waSpan: HTMLElement = createElement(spanHTMLTag);\n waSpan.className = \"w-500\";\n waSpan.appendChild(\n createTextNode(strings.whatsapp || defaultStrings.whatsapp)\n );\n wa.appendChild(waSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"whatsapp\")) {\n modalContent.appendChild(wa);\n }\n\n // Skype\n skype = createElement(aHTMLTag) as HTMLLinkElement;\n skype.id = \"m-skype\";\n skype.href = \"#mailgo-skype\";\n skype.classList.add(\"m-open\");\n skype.classList.add(\"m-skype\");\n skype.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let skypeSpan: HTMLElement = createElement(spanHTMLTag);\n skypeSpan.className = \"w-500\";\n skypeSpan.appendChild(\n createTextNode(strings.skype || defaultStrings.skype)\n );\n skype.appendChild(skypeSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"skype\")) {\n modalContent.appendChild(skype);\n }\n\n // call default\n call = createElement(aHTMLTag) as HTMLLinkElement;\n call.id = \"m-call\";\n call.href = \"#mailgo-open\";\n call.classList.add(\"m-open\");\n call.classList.add(\"m-default\");\n let callSpan: HTMLElement = createElement(spanHTMLTag);\n callSpan.className = \"w-500\";\n callSpan.appendChild(createTextNode(strings.call || defaultStrings.call));\n call.appendChild(callSpan);\n call.appendChild(\n createTextNode(strings._as_default || defaultStrings._as_default)\n );\n\n modalContent.appendChild(call);\n\n // copy\n copyTel = createElement(aHTMLTag) as HTMLLinkElement;\n copyTel.id = \"m-tel-copy\";\n copyTel.href = \"#mailgo-copy\";\n copyTel.classList.add(\"m-copy\");\n copyTel.classList.add(\"w-500\");\n copyTel.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyTel);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalTel);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // event listener on body, if the element is mailgo-compatible the mailgo modal will be rendered\n document.addEventListener(\"click\", mailgoClickListener);\n};\n\n/**\n * mailgoClickListener\n * function to check if an element is mailgo-enabled or not referencing to\n * mail:\n * document.querySelectorAll(\n * 'a[href^=\"mailto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * tel:\n * document.querySelectorAll(\n * 'a[href^=\"tel:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"callto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"sms:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n */\nfunction mailgoClickListener(event: Event): boolean {\n // check if the mailgo HTML exists in the body\n if (\n !document.body.contains(modalMailto) &&\n !document.body.contains(modalTel)\n ) {\n return false;\n }\n\n // if a mailgo is already showing do nothing\n if (mailgoIsShowing()) {\n return false;\n }\n\n // the path of the event\n let path =\n (event.composedPath && event.composedPath()) ||\n composedPath(event.target as HTMLElement);\n\n if (path) {\n path.forEach((element: HTMLElement) => {\n if (element instanceof HTMLDocument || element instanceof Window) {\n return false;\n }\n\n // go here only if one of the mailgo modals are enabled\n if (mailtoEnabled || telEnabled || smsEnabled) {\n let localMailgoType = getMailgoTypeByElement(element);\n\n // go on if the localMailgoType is not null\n if (localMailgoType) {\n // set the active mailgo type\n activeMailgoType = localMailgoType;\n\n let activeMailgoModalType = activeMailgoType?.type;\n\n if (activeMailgoModalType) {\n // check if the setting is enabled and if so go with pre-render\n if (\n (mailtoEnabled && activeMailgoModalType === MAILGO_MAIL) ||\n (telEnabled && activeMailgoModalType === MAILGO_TEL) ||\n (smsEnabled && activeMailgoModalType === MAILGO_SMS)\n ) {\n // stop the normal execution of the element click\n event.preventDefault();\n\n // render mailgo\n mailgoPreRender(element as HTMLLinkElement);\n\n return true;\n }\n }\n }\n }\n });\n }\n\n return false;\n}\n\n/**\n * mailgoPreRender\n * function to pre-render a mailgo, it helps populating elements needed by modal\n */\nfunction mailgoPreRender(\n mailgoElementOrUrl: HTMLLinkElement | string\n): boolean {\n let mailgoElement: HTMLLinkElement;\n\n // get the type and installation from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if type is not defined return\n if (!type) return false;\n\n if (typeof mailgoElementOrUrl === \"string\") {\n // if the parameter is a string it is the url\n href = mailgoElementOrUrl as string;\n } else {\n // if the paramenter is an HTMLLinkElement get the href attribute and the element\n href = mailgoElementOrUrl.getAttribute(\"href\") as string;\n mailgoElement = mailgoElementOrUrl as HTMLLinkElement;\n }\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // if the installation is classic\n if (installation === CLASSIC) {\n if (validateUrl(href, MAILTO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILTO)[1].trim());\n } else if (validateUrl(href, MAILGO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILGO)[1].trim());\n }\n\n try {\n url = new URL(href);\n\n let urlParams: URLSearchParams = url.searchParams;\n // optional parameters for the email\n cc = urlParams.get(\"cc\");\n bcc = urlParams.get(\"bcc\");\n subject = urlParams.get(\"subject\");\n bodyMail = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam\n // mail = data-address + @ + data-domain\n mail =\n mailgoElement.getAttribute(\"data-address\") &&\n mailgoElement.getAttribute(\"data-domain\")\n ? mailgoElement.getAttribute(\"data-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-domain\")\n : null;\n\n try {\n url = new URL(MAILTO + encodeURIComponent(mail));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // cc = data-cc-address + @ + data-cc-domain\n cc = mailgoElement.getAttribute(\"data-cc-address\")\n ? mailgoElement.getAttribute(\"data-cc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-cc-domain\")\n : null;\n\n // if cc is defined add it to parameters\n if (cc) parameters.push(\"cc=\" + cc);\n\n // bcc = data-bcc-address + @ + data-bcc-domain\n bcc = mailgoElement.getAttribute(\"data-bcc-address\")\n ? mailgoElement.getAttribute(\"data-bcc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-bcc-domain\")\n : null;\n\n // if bcc is defined add it to parameters\n if (bcc) parameters.push(\"bcc=\" + bcc);\n\n // subject = data-subject\n subject = mailgoElement.getAttribute(\"data-subject\");\n\n // if subject is defined add it to parameters\n if (subject) parameters.push(\"subject=\" + subject);\n\n // body = data-body\n bodyMail = mailgoElement.getAttribute(\"data-body\");\n\n // if body is defined add it to parameters\n if (bodyMail) parameters.push(\"body=\" + bodyMail);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n MAILTO + encodeURIComponent(mail),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateEmail !== \"undefined\") {\n validateEmailConfig = config.validateEmail;\n }\n\n if (validateEmailConfig) {\n // validate the email address\n if (!validateEmails(mail.split(\",\"))) {\n return false;\n }\n\n // if cc, bcc are not valid cc, bcc = \"\"\n if (cc && !validateEmails(cc.split(\",\"))) cc = \"\";\n if (bcc && !validateEmails(bcc.split(\",\"))) bcc = \"\";\n }\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n if (installation === CLASSIC) {\n if (validateUrl(href, TEL)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(TEL)[1].trim());\n } else if (validateUrl(href, CALLTO)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(CALLTO)[1].trim());\n } else if (validateUrl(href, SMS)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(SMS)[1].trim());\n }\n\n try {\n url = new URL(href);\n let urlParams: URLSearchParams = url.searchParams;\n\n // optional parameters for the phone number\n msg = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation == LESS_SPAM) {\n tel = mailgoElement.getAttribute(\"data-tel\");\n msg = mailgoElement.getAttribute(\"data-msg\");\n\n try {\n url = new URL(TEL + encodeURIComponent(tel));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // if msg is defined add it to parameters\n if (msg) parameters.push(\"body=\" + msg);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n TEL + encodeURIComponent(tel),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateTel !== \"undefined\") {\n validateTelConfig = config.validateTel;\n }\n\n // validate the phone number\n if (validateTelConfig) {\n if (!validateTel(tel)) return;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-telegram\")) {\n telegramUsername = mailgoElement.getAttribute(\"data-telegram\");\n } else {\n telegramUsername = null;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-skype\")) {\n skypeUsername = mailgoElement.getAttribute(\"data-skype\");\n } else {\n skypeUsername = null;\n }\n }\n\n // if dark is in config or contained in the element\n if (\n mailgoElement &&\n (config?.dark || mailgoElement.classList.contains(\"dark\"))\n ) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // render mailgo\n mailgoRender();\n\n return true;\n}\n\n/**\n * mailgoDirectRender\n * function to render a mailgo directly from a URL\n */\nfunction mailgoDirectRender(directUrl: string): boolean {\n // start mailgo\n mailgo();\n\n if (validateUrl(directUrl, MAILTO) || validateUrl(directUrl, MAILGO)) {\n activeMailgoType = {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n } else if (\n validateUrl(directUrl, TEL) ||\n validateUrl(directUrl, CALLTO) ||\n validateUrl(directUrl, SMS)\n ) {\n activeMailgoType = {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n }\n return false;\n}\n\n/**\n * mailgoRender\n * function to render a mailgo (mail or tel)\n */\nfunction mailgoRender(): boolean {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n\n // if type is not defined return\n if (!type) return false;\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // the title of the modal (email address)\n title.innerHTML = mail.split(\",\").join(\"
\");\n\n // add the details if provided\n if (mailgoConfigAttributeEnabled(\"detail\", \"cc\") && cc) {\n detailCc.style.display = \"block\";\n ccValue.innerHTML = cc.split(\",\").join(\"
\");\n } else {\n detailCc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"bcc\") && bcc) {\n detailBcc.style.display = \"block\";\n bccValue.innerHTML = bcc.split(\",\").join(\"
\");\n } else {\n detailBcc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"subject\") && subject) {\n detailSubject.style.display = \"block\";\n subjectValue.textContent = subject;\n } else {\n detailSubject.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"body\") && bodyMail) {\n detailBody.style.display = \"block\";\n bodyValue.textContent = bodyMail;\n } else {\n detailBody.style.display = \"none\";\n }\n\n // add the actions\n gmail.addEventListener(\"click\", openGmail);\n\n outlook.addEventListener(\"click\", openOutlook);\n\n yahoo.addEventListener(\"click\", openYahooMail);\n\n open.addEventListener(\"click\", openDefault);\n\n copyMail.addEventListener(\"click\", copy);\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n // the title of the modal (tel)\n titleTel.innerHTML = tel;\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"msg\") && msg) {\n detailMsg.style.display = \"block\";\n msgValue.textContent = msg;\n } else {\n detailMsg.style.display = \"none\";\n }\n\n // add the actions to buttons\n wa.addEventListener(\"click\", openWhatsApp);\n\n // telegram must be shown only if data-telegram is provided\n if (telegramUsername) {\n document.getElementById(\"m-tg\").style.display = \"block\";\n telegram.addEventListener(\"click\", openTelegram);\n } else {\n document.getElementById(\"m-tg\").style.display = \"none\";\n }\n\n skype.addEventListener(\"click\", openSkype);\n\n call.addEventListener(\"click\", openDefault);\n\n copyTel.addEventListener(\"click\", copy);\n }\n\n // show the mailgo\n showMailgo(type);\n\n // add listener keyDown\n document.addEventListener(\"keydown\", mailgoKeydown);\n\n return true;\n}\n\n// actions\nconst openGmail = (event?: Event): void => {\n event.preventDefault();\n\n let urlString: string;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n if (installation === CLASSIC) {\n try {\n urlString = url.toString();\n } catch (e) {\n urlString = href;\n }\n } else if (installation === LESS_SPAM) {\n urlString = lessSpamHref;\n }\n\n // Gmail url\n let gmailUrl: string =\n \"https://mail.google.com/mail/?extsrc=mailto&url=\" +\n encodeURIComponent(urlString);\n\n // open the link\n window.open(gmailUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openOutlook = (event?: Event): void => {\n event.preventDefault();\n\n // Outlook starting url\n let startingOutlookUrl: string =\n \"https://outlook.live.com/owa/?path=/mail/action/compose&to=\";\n\n // let the user to decide to open Office365 Outlook instead of the classic outlook.live.com\n if (config?.office365) {\n startingOutlookUrl =\n \"https://outlook.office365.com/owa/?path=/mail/action/compose&to=\";\n }\n\n // Outlook url\n let outlookUrl: string = startingOutlookUrl + encodeURIComponent(mail);\n\n // the details if provided\n if (subject) {\n outlookUrl = outlookUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n\n if (bodyMail) {\n outlookUrl = outlookUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(outlookUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openYahooMail = (event?: Event): void => {\n event.preventDefault();\n\n // Yahoo url\n let yahooUrl: string = \"https://compose.mail.yahoo.com/?to=\" + mail;\n\n // the details if provided\n if (subject) {\n yahooUrl = yahooUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n if (bodyMail) {\n yahooUrl = yahooUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(yahooUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openTelegram = (event?: Event): void => {\n event.preventDefault();\n\n // check if telegramUsername exists\n if (telegramUsername) {\n // Telegram url\n let tgUrl: string = \"https://t.me/\" + encodeURIComponent(telegramUsername);\n\n // open the url\n window.open(tgUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n }\n};\n\nconst openSkype = (event?: Event): void => {\n event.preventDefault();\n\n let skype: string = skypeUsername || tel;\n\n // Telegram url\n let skypeUrl: string = \"skype:\" + encodeURIComponent(skype);\n\n // open the url\n window.open(skypeUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openWhatsApp = (event?: Event): void => {\n event.preventDefault();\n\n // WhatsApp API doesn't work with non number digits and leading 0s: https://faq.whatsapp.com/general/chats/how-to-use-click-to-chat/\n let whatappTel = tel.replace(notNumber, \"\").replace(leadingZeros, \"\");\n\n // WhatsApp url\n let waUrl: string = \"https://wa.me/\" + encodeURIComponent(whatappTel);\n\n // the details if provided\n if (msg) {\n waUrl = waUrl.concat(\"?text=\" + encodeURIComponent(msg));\n }\n\n // open the url\n window.open(waUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openDefault = (event?: Event): void => {\n event.preventDefault();\n\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if the installation is classic the browser can follow the default behaviour\n if (installation === CLASSIC) {\n window.location.href = href;\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam use the built less-spam href\n window.location.href = lessSpamHref;\n }\n\n hideMailgo();\n};\n\nconst copy = (event?: Event): void => {\n event.preventDefault();\n\n // the correct copyButton (mail or tel)\n if (mailgoIsShowing()) {\n let activeCopy: HTMLElement;\n\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n // in case it is showing mail modal copy email address\n copyToClipboard(mail);\n activeCopy = copyMail;\n } else {\n // in case it is showing tel modal copy phone number\n copyToClipboard(tel);\n activeCopy = copyTel;\n }\n\n activeCopy.textContent = strings.copied || defaultStrings.copied;\n setTimeout(() => {\n activeCopy.textContent = strings.copy || defaultStrings.copy;\n // hide after the timeout\n hideMailgo();\n }, 999);\n }\n};\n\n// function to find if a link is a mailto, tel, callto or sms\nconst validateUrl = (url: string, type: string = MAILTO) => {\n let regexValidate = new RegExp(\"^\" + type + \"((.)+)\", \"gi\");\n return regexValidate.test(url);\n};\n\n// function that returns if an element is a mailgo\nfunction getMailgoTypeByElement(element: HTMLElement): MailgoType | null {\n let elementHref: string = (element as HTMLLinkElement).getAttribute(\"href\");\n\n // return null if there is no-mailgo in class\n if (element.classList?.contains(NO_MAILGO)) {\n return null;\n }\n\n // the case of classic type of mailgo, like a href=mailto:... or a href=tel:... and the class=mailgo with a useful href\n if (elementHref || element.classList?.contains(\"mailgo\")) {\n if (validateUrl(elementHref, MAILTO) || validateUrl(elementHref, MAILGO)) {\n // a mailto: or mailgo:\n return {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n } else if (\n validateUrl(elementHref, TEL) ||\n validateUrl(elementHref, CALLTO)\n ) {\n // a tel: or callto:\n return {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n } else if (validateUrl(elementHref, SMS)) {\n // a sms:\n return {\n type: MAILGO_SMS,\n installation: CLASSIC,\n };\n }\n }\n\n if (elementHref === \"#mailgo\" || element.classList?.contains(\"mailgo\")) {\n // less-spam installation of mailgo, check to the attributes\n if (\n element.hasAttribute(\"data-address\") &&\n element.hasAttribute(\"data-domain\")\n ) {\n // less-spam mailto with data-address and data-domain\n return {\n type: MAILGO_MAIL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-tel\")) {\n // less-spam tel with data-tel\n return {\n type: MAILGO_TEL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-msg\")) {\n // less-spam sms with data-msd\n return {\n type: MAILGO_SMS,\n installation: LESS_SPAM,\n };\n }\n }\n\n return null;\n}\n\n/**\n * mailgoKeydown\n * function to manage the keydown event when the modal is showing, return a boolean that represents if a useful key has been pressed\n */\nconst mailgoKeydown = (keyboardEvent: KeyboardEvent): boolean => {\n // if mailgo is showing\n if (mailgoIsShowing()) {\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 71:\n // g -> open GMail\n openGmail();\n return true;\n case 79:\n // o -> open Outlook\n openOutlook();\n return true;\n case 89:\n // y -> open Yahoo Mail\n openYahooMail();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n } else if (type === MAILGO_TEL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 84:\n // t -> open Telegram\n openTelegram();\n return true;\n case 87:\n // w -> open WhatsApp\n openWhatsApp();\n return true;\n case 83:\n // s -> open Skype\n openSkype();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n }\n }\n return false;\n};\n\n// show the modal\nconst showMailgo = (type: MailgoModalType): void => {\n // show the correct modal\n setModalDisplay(type, \"flex\");\n};\n\n// hide the modal\nconst hideMailgo = (): void => {\n // hide all the modals\n setModalDisplay(MAILGO_MAIL, \"none\");\n setModalDisplay(MAILGO_TEL, \"none\");\n\n // remove listener keyDown\n document.removeEventListener(\"keydown\", mailgoKeydown);\n};\n\n// is the mailgo modal hidden?\nconst mailgoIsShowing = (): boolean => {\n return (\n (mailtoEnabled && getModalDisplay(MAILGO_MAIL) === \"flex\") ||\n ((telEnabled || smsEnabled) && getModalDisplay(MAILGO_TEL) === \"flex\")\n );\n};\n\nconst byElement = (): HTMLLinkElement => {\n // by element in the footer\n let by: HTMLLinkElement = createElement(aHTMLTag) as HTMLLinkElement;\n by.href = \"https://mailgo.dev?ref=mailgo-modal\";\n by.className = \"m-by\";\n by.target = \"_blank\";\n by.rel = \"noopener noreferrer\";\n by.appendChild(createTextNode(\"mailgo.dev\"));\n\n return by;\n};\n\n// create element\nconst createElement = (element: string = \"div\"): HTMLElement =>\n document.createElement(element);\n\n// create text node\nconst createTextNode = (element: string): Text =>\n document.createTextNode(element);\n\n// get the correct HTMLElement from a type\nconst getModalHTMLElement = (type: MailgoModalType = MAILGO_MAIL) => {\n if (type === MAILGO_TEL) {\n return modalTel;\n } else {\n return modalMailto;\n }\n};\n\n// get display value\nconst getModalDisplay = (ref: MailgoModalType = MAILGO_MAIL): string =>\n getModalHTMLElement(ref).style.display;\n\n// set display value\nconst setModalDisplay = (\n ref: MailgoModalType = MAILGO_MAIL,\n value: string\n): void => {\n let modal = getModalHTMLElement(ref);\n\n if (modal) {\n modal.style.display = value;\n\n if (value === \"flex\") {\n // \"save\" the activated link.\n activatedLink = document.activeElement as HTMLElement;\n modal.setAttribute(\"aria-hidden\", \"false\");\n\n // Focus on the modal container.\n modal.setAttribute(\"tabindex\", \"0\");\n modal.focus();\n setFocusLoop(modal);\n } else {\n modal.setAttribute(\"aria-hidden\", \"true\");\n\n // focus back the activated link for getting back to the context.\n modal.setAttribute(\"tabindex\", \"-1\");\n activatedLink.focus();\n }\n }\n};\n\n// enable dark mode\nconst enableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.add(\"m-dark\");\n }\n};\n\n// disable dark mode\nconst disableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.remove(\"m-dark\");\n }\n};\n\n// custom composedPath if path or event.composedPath() are not defined\nconst composedPath = (\n el: HTMLElement\n): (HTMLElement | Document | (Window & typeof globalThis))[] => {\n let path = [];\n\n while (el) {\n path.push(el);\n\n if (el.tagName === \"HTML\") {\n path.push(document);\n path.push(window);\n return path;\n }\n\n el = el.parentElement;\n }\n};\n\n// function to recreate a mailto: or tel: href from less-spam\nconst buildLessSpamHref = (type: string, parameters: string[]): string => {\n lessSpamHref = type;\n if (parameters && parameters.length > 0) {\n let joinedParams = parameters.join(\"&\");\n lessSpamHref = lessSpamHref.concat(\"?\" + joinedParams);\n }\n return lessSpamHref;\n};\n\n// function to check an attribute is enabled or not, by default considering it enabled\nconst mailgoConfigAttributeEnabled = (\n type: \"action\" | \"detail\",\n attribute: MailgoAction | MailgoDetail\n): boolean => {\n // by default all the actions and attribute are enabled\n if (!config) {\n return true;\n }\n\n if (config && !config?.actions) {\n return true;\n }\n\n // if the attribute type is action consider the actions config attribute\n if (type === \"action\") {\n if (\n config &&\n config.actions &&\n config?.actions[attribute as MailgoAction] === false\n ) {\n return false;\n }\n } else if (type === \"detail\") {\n // else consider the details attribute\n if (\n config &&\n config.details &&\n config?.details[attribute as MailgoDetail] === false\n ) {\n return false;\n }\n }\n\n return true;\n};\n\n// manage the language of mailgo\nconst mailgoSetLanguage = (): string => {\n let languageType = \"default lang\";\n\n // if a language is defined in configuration use it\n if (\n config?.lang &&\n (languages as MailgoLanguages).indexOf(config.lang) !== -1\n ) {\n lang = config.lang;\n languageType = \"config lang\";\n } else {\n // else if is defined use it!\n // keep the lang from html\n let htmlLang: string = document.documentElement.lang;\n\n // find the correct language using the lang attribute, not just a === because there a are cases like fr-FR or fr_FR in html lang attribute\n (languages as MailgoLanguages).forEach((language: any) => {\n if (new RegExp(\"^\" + language, \"gi\").test(htmlLang)) {\n lang = language;\n languageType = \"html lang\";\n }\n });\n }\n\n // strings\n strings = (translations as MailgoTranslations)[lang];\n\n return languageType;\n};\n\nconst mailgoStyle = (): void => {\n if (!document.getElementById(\"mailgo-style\")) {\n // mailgo style\n let mailgoCSSElement: HTMLStyleElement = createElement(\n \"style\"\n ) as HTMLStyleElement;\n mailgoCSSElement.id = \"mailgo-style\";\n mailgoCSSElement.type = \"text/css\";\n mailgoCSSElement.appendChild(createTextNode(mailgoCSS));\n document.head.appendChild(mailgoCSSElement);\n }\n};\n\n// mailgo\nfunction mailgo(mailgoConfig?: MailgoConfig): boolean {\n try {\n // polyfill mailgo\n // mailgoPolyfill();\n\n // set the global config merging window mailgConfig and mailgoConfig passed as a parameter\n config = { ...mailgoConfig, ...((window as any)?.mailgoConfig || null) };\n\n // if the window is defined...\n if (typeof window !== \"undefined\") {\n // if is set in config use it (load the mailgo CSS)\n if (typeof config?.loadCSS !== \"undefined\") {\n loadCSSConfig = config.loadCSS;\n }\n\n // if is set in config use it (enable mailto)\n if (typeof config?.mailto !== \"undefined\") {\n mailtoEnabled = config.mailto;\n }\n\n // if is set in config use it (enable tel)\n if (typeof config?.tel !== \"undefined\") {\n telEnabled = config.tel;\n }\n\n // if is set in config use it (enable sms)\n if (typeof config?.sms !== \"undefined\") {\n smsEnabled = config.sms;\n }\n\n // if load css enabled load it!\n if (loadCSSConfig) {\n // add the style for mailgo\n mailgoStyle();\n }\n\n // if is set an initEvent add the listener\n if (config?.initEvent) {\n if (config?.listenerOptions) {\n // listener options specified\n document.addEventListener(\n config.initEvent,\n mailgoInit,\n config.listenerOptions\n );\n } else {\n // no listener options\n document.addEventListener(config.initEvent, mailgoInit);\n }\n } else {\n mailgoInit();\n }\n\n return true;\n }\n } catch (error) {\n console.log(error);\n }\n return false;\n}\n\n// define the methods also for window element\nif (typeof window !== \"undefined\") {\n (window as any).getMailgoTypeByElement = getMailgoTypeByElement;\n (window as any).mailgoClickListener = mailgoClickListener;\n (window as any).mailgoCheckRender = mailgoClickListener; // for compatibility with old version of mailgo\n (window as any).mailgoPreRender = mailgoPreRender;\n (window as any).mailgoDirectRender = mailgoDirectRender;\n (window as any).mailgoRender = mailgoRender;\n (window as any).mailgo = mailgo;\n}\n\nexport {\n getMailgoTypeByElement,\n mailgoClickListener,\n mailgoPreRender,\n mailgoDirectRender,\n mailgoRender,\n};\n\nexport default mailgo;\n","export const userAgent = () => {\n if (\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n )\n ) {\n return \"mobile\";\n }\n return \"desktop\";\n};\n","// webpack > dist/mailgo.nocss.min.js\n\nimport mailgo from \"../src/mailgo\";\n\n// call init mailgo attached to the event DOMContentLoaded\nconst mailgoConfig = {\n initEvent: \"DOMContentLoaded\",\n loadCSS: false,\n};\n\nmailgo(mailgoConfig);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(331);\n","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://mailgo/../src/mailgo.scss","webpack://mailgo/../node_modules/css-loader/dist/runtime/api.js","webpack://mailgo/../src/mailgo.scss?81f2","webpack://mailgo/../src/constants.ts","webpack://mailgo/../src/utils.ts","webpack://mailgo/../src/mailgo.ts","webpack://mailgo/../src/mobile-detect.ts","webpack://mailgo/./mailgo.dist.nocss.ts","webpack://mailgo/webpack/bootstrap","webpack://mailgo/webpack/startup","webpack://mailgo/webpack/runtime/make namespace object"],"names":["___CSS_LOADER_EXPORT___","___CSS_LOADER_API_IMPORT___","i","push","module","id","exports","cssWithMappingToString","list","toString","this","map","item","content","concat","join","modules","mediaQuery","dedupe","alreadyImportedModules","length","_i","result","MAILTO","MAILGO","TEL","CALLTO","SMS","MAILGO_MAIL","MAILGO_TEL","MAILGO_SMS","CLASSIC","LESS_SPAM","spanHTMLTag","aHTMLTag","pHTMLTag","notNumber","RegExp","leadingZeros","validateEmail","email","test","validateEmails","arr","every","copyToClipboard","str","el","document","createElement","value","setAttribute","style","position","left","body","appendChild","selected","getSelection","rangeCount","getRangeAt","select","execCommand","removeChild","removeAllRanges","addRange","setFocusLoop","ref","modal","querySelector","addEventListener","leaveLastLink","leaveFirstLink","e","code","shiftKey","preventDefault","target","closest","focus","strings","config","activeMailgoType","modalMailto","modalTel","url","href","lessSpamHref","mail","cc","bcc","subject","bodyMail","tel","msg","telegramUsername","skypeUsername","title","titleTel","detailCc","detailBcc","detailSubject","detailBody","detailMsg","ccValue","bccValue","subjectValue","bodyValue","msgValue","activatedLink","gmail","outlook","yahoo","open","telegram","wa","skype","call","copyMail","copyTel","mailgoCSS","require","lang","defaultStrings","translations","isMobile","mailtoEnabled","telEnabled","smsEnabled","desktopEnabled","mobileEnabled","validateEmailConfig","validateTelConfig","showFooterConfig","loadCSSConfig","mailgoInit","navigator","userAgent","desktop","mobile","mailgoSetLanguage","mailgoExists","getElementById","display","classList","add","dark","enableDarkMode","disableDarkMode","modalBackground","className","modalContent","details","ccSpan","createTextNode","cc_","bccSpan","bcc_","subjectSpan","subject_","bodySpan","body_","open_in_","gmailSpan","mailgoConfigAttributeEnabled","outlookSpan","yahooSpan","openSpan","_default","copy","showFooter","byElement","hideMailgo","mailgoTelExists","detailsTel","msgSpan","telegramSpan","waSpan","whatsapp","skypeSpan","callSpan","_as_default","mailgoClickListener","event","contains","mailgoIsShowing","path","composedPath","forEach","element","HTMLDocument","Window","localMailgoType","getMailgoTypeByElement","activeMailgoModalType","type","mailgoPreRender","mailgoElementOrUrl","mailgoElement","installation","getAttribute","validateUrl","decodeURIComponent","split","trim","urlParams","URL","searchParams","get","error","console","log","encodeURIComponent","parameters","buildLessSpamHref","validateTel","hasAttribute","mailgoRender","innerHTML","textContent","openGmail","openOutlook","openYahooMail","openDefault","openWhatsApp","openTelegram","openSkype","showMailgo","mailgoKeydown","urlString","gmailUrl","window","startingOutlookUrl","office365","outlookUrl","yahooUrl","tgUrl","skypeUrl","whatappTel","replace","waUrl","location","activeCopy","copied","setTimeout","regexValidate","elementHref","keyboardEvent","keyCode","setModalDisplay","removeEventListener","getModalDisplay","by","rel","getModalHTMLElement","activeElement","remove","tagName","parentElement","joinedParams","attribute","actions","languageType","languages","htmlLang","documentElement","language","mailgo","mailgoConfig","loadCSS","mailto","sms","mailgoCSSElement","head","mailgoStyle","initEvent","listenerOptions","mailgoCheckRender","mailgoDirectRender","directUrl","__webpack_module_cache__","__webpack_require__","moduleId","__webpack_modules__","r","Symbol","toStringTag","Object","defineProperty"],"mappings":"mDACA,IACIA,EAD8B,EAAQ,IAC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Y8E,EAAWhQ,IAAWkL,GAAY8E,EAAW/P,IAC3D0D,EAAmB,CACjBiH,KAAMvK,EACN2K,aAAcxK,GAEhBqK,GAAgBmF,IACT,MAEP9E,GAAY8E,EAAW9P,IACvBgL,GAAY8E,EAAW7P,IACvB+K,GAAY8E,EAAW5P,MAEvBuD,EAAmB,CACjBiH,KAAMtK,EACN0K,aAAcxK,GAEhBqK,GAAgBmF,IACT,IA8sBRhD,OAAed,aAAeA,GAC9Bc,OAAeoC,OAASA,IAW3B,GEvgDqB,CACnBQ,UAAW,mBACXN,SAAS,MCNPW,EAA2B,GAG/B,SAASC,EAAoBC,GAE5B,GAAGF,EAAyBE,GAC3B,OAAOF,EAAyBE,GAAUpR,QAG3C,IAAIF,EAASoR,EAAyBE,GAAY,CACjDrR,GAAIqR,EAEJpR,QAAS,IAOV,OAHAqR,EAAoBD,GAAUtR,EAAQA,EAAOE,QAASmR,GAG/CrR,EAAOE,QCjBf,OCFAmR,EAAoBG,EAAI,SAAStR,GACX,oBAAXuR,QAA0BA,OAAOC,aAC1CC,OAAOC,eAAe1R,EAASuR,OAAOC,YAAa,CAAE5O,MAAO,WAE7D6O,OAAOC,eAAe1R,EAAS,aAAc,CAAE4C,OAAO,KDFhDuO,EAAoB,K","file":"mailgo.nocss.min.js","sourcesContent":["// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:16.5px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:#20232a;opacity:.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:.95;border-radius:20px;box-shadow:0 3px 20px rgba(32,35,42,.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:24px;transition:.5s box-shadow}.m-modal .m-modal-content:hover,.m-modal .m-modal-content:focus,.m-modal .m-modal-content:active{opacity:1}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2em}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{cursor:pointer;padding:10px;color:#4a4a4a;border-radius:20px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#c0372a}.m-modal .m-modal-content a.m-gmail:hover,.m-modal .m-modal-content a.m-gmail:focus,.m-modal .m-modal-content a.m-gmail:active{background-color:rgba(192,55,42,.08);color:#c0372a}.m-modal .m-modal-content a.m-outlook{color:#0967aa}.m-modal .m-modal-content a.m-outlook:hover,.m-modal .m-modal-content a.m-outlook:focus,.m-modal .m-modal-content a.m-outlook:active{background-color:rgba(9,103,170,.08);color:#0967aa}.m-modal .m-modal-content a.m-yahoo{color:#4a00a0}.m-modal .m-modal-content a.m-yahoo:hover,.m-modal .m-modal-content a.m-yahoo:focus,.m-modal .m-modal-content a.m-yahoo:active{background-color:rgba(74,0,160,.08);color:#4a00a0}.m-modal .m-modal-content a.m-tg{color:#086da0}.m-modal .m-modal-content a.m-tg:hover,.m-modal .m-modal-content a.m-tg:focus,.m-modal .m-modal-content a.m-tg:active{background-color:rgba(8,109,160,.08);color:#086da0}.m-modal .m-modal-content a.m-wa{color:#067466}.m-modal .m-modal-content a.m-wa:hover,.m-modal .m-modal-content a.m-wa:focus,.m-modal .m-modal-content a.m-wa:active{background-color:rgba(6,116,102,.08);color:#067466}.m-modal .m-modal-content a.m-skype{color:#076d92}.m-modal .m-modal-content a.m-skype:hover,.m-modal .m-modal-content a.m-skype:focus,.m-modal .m-modal-content a.m-skype:active{background-color:rgba(7,109,146,.08);color:#076d92}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-default:focus,.m-modal .m-modal-content a.m-default:active,.m-modal .m-modal-content a.m-copy:hover,.m-modal .m-modal-content a.m-copy:focus,.m-modal .m-modal-content a.m-copy:active{background-color:rgba(0,0,0,.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:12px;margin-top:.8rem;padding:5px;color:#4a4a4a}.m-modal .m-modal-content a.m-by:hover,.m-modal .m-modal-content a.m-by:focus,.m-modal .m-modal-content a.m-by:active{color:#3d3d3d}.m-modal .m-modal-content .w-500{font-weight:500}.m-modal.m-dark .m-modal-content{background-color:#20232a}.m-modal.m-dark .m-modal-content,.m-modal.m-dark .m-modal-content p,.m-modal.m-dark .m-modal-content p span,.m-modal.m-dark .m-modal-content strong{color:#fff}.m-modal.m-dark .m-modal-content a{color:#eaeaea}.m-modal.m-dark .m-modal-content a:not(.m-by):hover,.m-modal.m-dark .m-modal-content a:not(.m-by):focus,.m-modal.m-dark .m-modal-content a:not(.m-by):active{background-color:rgba(134,134,134,.08);color:#eaeaea}.m-modal.m-dark .m-modal-content a.m-gmail{color:#e07d73}.m-modal.m-dark .m-modal-content a.m-gmail:hover,.m-modal.m-dark .m-modal-content a.m-gmail:focus,.m-modal.m-dark .m-modal-content a.m-gmail:active{background-color:rgba(224,125,115,.08);color:#e07d73}.m-modal.m-dark .m-modal-content a.m-outlook{color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-outlook:hover,.m-modal.m-dark .m-modal-content a.m-outlook:focus,.m-modal.m-dark .m-modal-content a.m-outlook:active{background-color:rgba(76,156,215,.08);color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-yahoo{color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-yahoo:hover,.m-modal.m-dark .m-modal-content a.m-yahoo:focus,.m-modal.m-dark .m-modal-content a.m-yahoo:active{background-color:rgba(172,136,211,.08);color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-tg{color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-tg:hover,.m-modal.m-dark .m-modal-content a.m-tg:focus,.m-modal.m-dark .m-modal-content a.m-tg:active{background-color:rgba(76,171,219,.08);color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-wa{color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-wa:hover,.m-modal.m-dark .m-modal-content a.m-wa:focus,.m-modal.m-dark .m-modal-content a.m-wa:active{background-color:rgba(76,210,192,.08);color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-skype{color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-skype:hover,.m-modal.m-dark .m-modal-content a.m-skype:focus,.m-modal.m-dark .m-modal-content a.m-skype:active{background-color:rgba(76,199,244,.08);color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-by:hover,.m-modal.m-dark .m-modal-content a.m-by:focus,.m-modal.m-dark .m-modal-content a.m-by:active{color:#fff}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\n var result = require(\"!!../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../node_modules/sass-loader/dist/cjs.js!./mailgo.scss\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n ","import { MailgoModalType, MailgoInstallationType } from \"mailgo\";\n\n// links\nexport const MAILTO: string = \"mailto:\";\nexport const MAILGO: string = \"mailgo:\";\nexport const TEL: string = \"tel:\";\nexport const CALLTO: string = \"callto:\";\nexport const SMS: string = \"sms:\";\n\n// deep linking\nexport const outlookDeepLink: string = \"ms-outlook://\";\n\n// no mailgo class\nexport const NO_MAILGO: string = \"no-mailgo\";\n\n// responsive settings\nexport const DESKTOP: string = \"desktop\";\nexport const MOBILE: string = \"mobile\";\n\n// mailgo modal types\nexport const MAILGO_MAIL: MailgoModalType = \"mailgo\";\nexport const MAILGO_TEL: MailgoModalType = \"mailgo-tel\";\nexport const MAILGO_SMS: MailgoModalType = \"mailgo-sms\";\n\n// mailgo installation types\nexport const CLASSIC: MailgoInstallationType = \"classic\";\nexport const LESS_SPAM: MailgoInstallationType = \"less-spam\";\n\n// useful html tags\nexport const spanHTMLTag: string = \"span\";\nexport const aHTMLTag: string = \"a\";\nexport const pHTMLTag: string = \"p\";\n\n// default lang\nexport const defaultLang: string = \"en\";\n\n// useful regexp\nexport const notNumber: RegExp = new RegExp(\"[^0-9/]\", \"gi\");\nexport const leadingZeros: RegExp = new RegExp(\"^0+\", \"gi\");\n","// validate a single email with regex\nexport const validateEmail = (email: string): boolean =>\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/.test(\n email\n );\n\n// validate an array of emails\nexport const validateEmails = (arr: string[]): boolean =>\n arr.every(validateEmail);\n\n// validate a single tel with regex\nexport const validateTel = (tel: string): boolean =>\n /^[+]{0,1}[\\s0-9]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*[p]{0,1}[\\s0-9]*$/.test(\n tel\n );\n\n// copy of a string\nexport const copyToClipboard = (str: string): boolean => {\n let el: HTMLTextAreaElement = document.createElement(\n \"textarea\"\n ) as HTMLTextAreaElement;\n el.value = str;\n el.setAttribute(\"readonly\", \"\");\n el.style.position = \"absolute\";\n el.style.left = \"-9999px\";\n document.body.appendChild(el);\n let selected: Range | boolean =\n document.getSelection().rangeCount > 0\n ? document.getSelection().getRangeAt(0)\n : false;\n el.select();\n document.execCommand(\"copy\");\n document.body.removeChild(el);\n if (selected) {\n document.getSelection().removeAllRanges();\n document.getSelection().addRange(selected);\n return true;\n }\n return false;\n};\n\n// set focus loop within modal\nexport const setFocusLoop = (ref: HTMLElement): void => {\n let modal = ref;\n modal\n .querySelector(\".m-modal-content a:last-of-type\")\n .addEventListener(\"keydown\", leaveLastLink);\n modal\n .querySelector(\".m-modal-content a:first-of-type\")\n .addEventListener(\"keydown\", leaveFirstLink);\n};\n\nexport const leaveLastLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === false) {\n e.preventDefault();\n\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:first-of-type\") as HTMLElement).focus();\n }\n};\n\nexport const leaveFirstLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === true) {\n e.preventDefault();\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:last-of-type\") as HTMLElement).focus();\n }\n};\n","import {\n MailgoConfig,\n MailgoTranslations,\n MailgoTranslation,\n MailgoAction,\n MailgoLanguages,\n MailgoType,\n MailgoDetail,\n MailgoInstallationType,\n MailgoModalType,\n} from \"mailgo\";\n\n// polyfill\n// import { mailgoPolyfill } from \"./polyfill\";\n\n// constants\nimport {\n MAILTO,\n MAILGO,\n TEL,\n CALLTO,\n SMS,\n MAILGO_MAIL,\n MAILGO_TEL,\n MAILGO_SMS,\n CLASSIC,\n LESS_SPAM,\n NO_MAILGO,\n MOBILE,\n spanHTMLTag,\n aHTMLTag,\n pHTMLTag,\n defaultLang,\n notNumber,\n leadingZeros,\n} from \"./constants\";\n\n// utils\nimport {\n validateEmails,\n validateTel,\n copyToClipboard,\n setFocusLoop,\n} from \"./utils\";\n\n// i18n for mailgo\nimport languages from \"../i18n/languages.json\";\nimport translations from \"../i18n/translations.json\";\n\n// mobile detect\nimport { userAgent } from \"./mobile-detect\";\n\n// mailgo scss, with toString (https://github.com/webpack-contrib/css-loader#tostring)\nconst mailgoCSS: string = require(\"./mailgo.scss\").toString();\n\n// default language\nlet lang: string = defaultLang;\n\n// default strings\nconst defaultStrings: MailgoTranslation = (translations as MailgoTranslations)[\n defaultLang\n];\n\n// translation strings\nlet strings: MailgoTranslation;\n\n// global mailgo config object\nlet config: MailgoConfig;\n\n// config to check if the client is mobile or desktop\nlet isMobile: boolean = false;\n\n// default config attributes\nlet mailtoEnabled: boolean = true;\nlet telEnabled: boolean = true;\nlet smsEnabled: boolean = false;\nlet desktopEnabled: boolean = true;\nlet mobileEnabled: boolean = true;\nlet validateEmailConfig: boolean = true;\nlet validateTelConfig: boolean = true;\nlet showFooterConfig: boolean = true;\nlet loadCSSConfig: boolean = true;\n\n// activeMailgoType\nlet activeMailgoType: MailgoType;\n\n// modals global object\nlet modalMailto: HTMLElement, modalTel: HTMLElement;\n\n// mailgo general variables\nlet url: URL, href: string, lessSpamHref: string;\n\n// mailgo mail variables\nlet mail: string, cc: string, bcc: string, subject: string, bodyMail: string;\n\n// mailgo tel variables\nlet tel: string, msg: string, telegramUsername: string, skypeUsername: string;\n\n// the DOM elements\nlet title: HTMLElement,\n titleTel: HTMLElement,\n detailCc: HTMLElement,\n detailBcc: HTMLElement,\n detailSubject: HTMLElement,\n detailBody: HTMLElement,\n detailMsg: HTMLElement,\n ccValue: HTMLElement,\n bccValue: HTMLElement,\n subjectValue: HTMLElement,\n bodyValue: HTMLElement,\n msgValue: HTMLElement,\n activatedLink: HTMLElement;\n\n// mailgo buttons (actions)\nlet gmail: HTMLLinkElement,\n outlook: HTMLLinkElement,\n yahoo: HTMLLinkElement,\n open: HTMLLinkElement,\n telegram: HTMLLinkElement,\n wa: HTMLLinkElement,\n skype: HTMLLinkElement,\n call: HTMLLinkElement,\n copyMail: HTMLLinkElement,\n copyTel: HTMLLinkElement;\n\n/**\n * mailgoInit\n * the function that creates the mailgo elements in DOM\n */\nconst mailgoInit = (): void => {\n // set the boolean for mobile/desktop\n isMobile = userAgent() === MOBILE;\n\n // responsive settings\n {\n if (typeof config?.desktop !== \"undefined\") {\n desktopEnabled = config.desktop;\n // if it is a desktop and desktop is not enabled no init mailgo\n if (!isMobile && !desktopEnabled) {\n return;\n }\n }\n if (typeof config?.mobile !== \"undefined\") {\n mobileEnabled = config.mobile;\n // if it is a mobile and mobile is not enabled no init mailgo\n if (isMobile && !mobileEnabled) {\n return;\n }\n }\n }\n\n // set the mailgo language\n mailgoSetLanguage();\n\n // mailgo, if mailgo not already exists\n let mailgoExists = !!document.getElementById(MAILGO_MAIL);\n\n // if mailgo is enabled for mailto and it not exists in DOM\n if (mailtoEnabled && !mailgoExists) {\n // modal\n modalMailto = createElement() as HTMLElement;\n modalMailto.style.display = \"none\";\n modalMailto.id = MAILGO_MAIL;\n modalMailto.classList.add(\"m-modal\");\n modalMailto.setAttribute(\"role\", \"dialog\");\n modalMailto.setAttribute(\"tabindex\", \"-1\");\n modalMailto.setAttribute(\"aria-labelledby\", \"m-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalMailto.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalMailto.appendChild(modalContent);\n\n // title (email address)\n title = createElement(\"strong\");\n title.id = \"m-title\";\n title.className = \"m-title\";\n modalContent.appendChild(title);\n\n // details\n let details: HTMLElement = createElement();\n details.id = \"m-details\";\n details.className = \"m-details\";\n\n detailCc = createElement(pHTMLTag);\n detailCc.id = \"m-cc\";\n let ccSpan: HTMLElement = createElement(spanHTMLTag);\n ccSpan.className = \"w-500\";\n ccSpan.appendChild(createTextNode(strings.cc_ || defaultStrings.cc_));\n ccValue = createElement(spanHTMLTag);\n ccValue.id = \"m-cc-value\";\n detailCc.appendChild(ccSpan);\n detailCc.appendChild(ccValue);\n details.appendChild(detailCc);\n\n detailBcc = createElement(pHTMLTag);\n detailBcc.id = \"m-bcc\";\n let bccSpan: HTMLElement = createElement(spanHTMLTag);\n bccSpan.className = \"w-500\";\n bccSpan.appendChild(createTextNode(strings.bcc_ || defaultStrings.bcc_));\n bccValue = createElement(spanHTMLTag);\n bccValue.id = \"m-bcc-value\";\n detailBcc.appendChild(bccSpan);\n detailBcc.appendChild(bccValue);\n details.appendChild(detailBcc);\n\n detailSubject = createElement(pHTMLTag);\n detailSubject.id = \"m-subject\";\n let subjectSpan: HTMLElement = createElement(spanHTMLTag);\n subjectSpan.className = \"w-500\";\n subjectSpan.appendChild(\n createTextNode(strings.subject_ || defaultStrings.subject_)\n );\n subjectValue = createElement(spanHTMLTag);\n subjectValue.id = \"m-subject-value\";\n detailSubject.appendChild(subjectSpan);\n detailSubject.appendChild(subjectValue);\n details.appendChild(detailSubject);\n\n detailBody = createElement(pHTMLTag);\n detailBody.id = \"m-body\";\n let bodySpan: HTMLElement = createElement(spanHTMLTag);\n bodySpan.className = \"w-500\";\n bodySpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n bodyValue = createElement(spanHTMLTag);\n bodyValue.id = \"m-body-value\";\n detailBody.appendChild(bodySpan);\n detailBody.appendChild(bodyValue);\n details.appendChild(detailBody);\n\n modalContent.appendChild(details);\n\n // Gmail\n gmail = createElement(aHTMLTag) as HTMLLinkElement;\n gmail.id = \"m-gmail\";\n gmail.href = \"#mailgo-gmail\";\n gmail.classList.add(\"m-open\");\n gmail.classList.add(\"m-gmail\");\n gmail.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let gmailSpan: HTMLElement = createElement(spanHTMLTag);\n gmailSpan.className = \"w-500\";\n gmailSpan.appendChild(\n createTextNode(strings.gmail || defaultStrings.gmail)\n );\n gmail.appendChild(gmailSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"gmail\")) {\n modalContent.appendChild(gmail);\n }\n\n // Outlook\n outlook = createElement(aHTMLTag) as HTMLLinkElement;\n outlook.id = \"m-outlook\";\n outlook.href = \"#mailgo-outlook\";\n outlook.classList.add(\"m-open\");\n outlook.classList.add(\"m-outlook\");\n outlook.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let outlookSpan: HTMLElement = createElement(spanHTMLTag);\n outlookSpan.className = \"w-500\";\n outlookSpan.appendChild(\n createTextNode(strings.outlook || defaultStrings.outlook)\n );\n outlook.appendChild(outlookSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"outlook\")) {\n modalContent.appendChild(outlook);\n }\n\n // Outlook\n yahoo = createElement(aHTMLTag) as HTMLLinkElement;\n yahoo.id = \"m-yahoo\";\n yahoo.href = \"#mailgo-yahoo\";\n yahoo.classList.add(\"m-open\");\n yahoo.classList.add(\"m-yahoo\");\n yahoo.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let yahooSpan: HTMLElement = createElement(spanHTMLTag);\n yahooSpan.className = \"w-500\";\n yahooSpan.appendChild(\n createTextNode(strings.yahoo || defaultStrings.yahoo)\n );\n yahoo.appendChild(yahooSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"yahoo\")) {\n modalContent.appendChild(yahoo);\n }\n\n // open default\n open = createElement(aHTMLTag) as HTMLLinkElement;\n open.id = \"m-open\";\n open.href = \"#mailgo-open\";\n open.classList.add(\"m-open\");\n open.classList.add(\"m-default\");\n let openSpan: HTMLElement = createElement(spanHTMLTag);\n openSpan.className = \"w-500\";\n openSpan.appendChild(createTextNode(strings.open || defaultStrings.open));\n open.appendChild(openSpan);\n open.appendChild(\n createTextNode(strings._default || defaultStrings._default)\n );\n\n modalContent.appendChild(open);\n\n // copy\n copyMail = createElement(aHTMLTag) as HTMLLinkElement;\n copyMail.id = \"m-copy\";\n copyMail.href = \"#mailgo-copy\";\n copyMail.classList.add(\"m-copy\");\n copyMail.classList.add(\"w-500\");\n copyMail.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyMail);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalMailto);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // mailgo tel, if mailgo-tel not already exists\n let mailgoTelExists = !!document.getElementById(MAILGO_TEL);\n\n // if mailgo is enabled for tel/callto and it not exists in DOM\n if (telEnabled && !mailgoTelExists) {\n // modal\n modalTel = createElement() as HTMLElement;\n modalTel.style.display = \"none\";\n modalTel.id = MAILGO_TEL;\n modalTel.classList.add(\"m-modal\");\n modalTel.setAttribute(\"role\", \"dialog\");\n modalTel.setAttribute(\"tabindex\", \"-1\");\n modalTel.setAttribute(\"aria-labelledby\", \"m-tel-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalTel.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalTel.appendChild(modalContent);\n\n // title (telephone number)\n titleTel = createElement(\"strong\");\n titleTel.id = \"m-tel-title\";\n titleTel.className = \"m-title\";\n modalContent.appendChild(titleTel);\n\n // details\n let detailsTel: HTMLElement = createElement();\n detailsTel.id = \"m-tel-details\";\n detailsTel.className = \"m-details\";\n\n detailMsg = createElement(pHTMLTag);\n detailMsg.id = \"m-msg\";\n let msgSpan: HTMLElement = createElement(spanHTMLTag);\n msgSpan.className = \"w-500\";\n msgSpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n msgValue = createElement(spanHTMLTag);\n msgValue.id = \"m-msg-value\";\n detailMsg.appendChild(msgSpan);\n detailMsg.appendChild(msgValue);\n detailsTel.appendChild(detailMsg);\n\n modalContent.appendChild(detailsTel);\n\n // Telegram\n telegram = createElement(aHTMLTag) as HTMLLinkElement;\n telegram.id = \"m-tg\";\n telegram.href = \"#mailgo-telegram\";\n telegram.classList.add(\"m-open\");\n telegram.classList.add(\"m-tg\");\n\n // by default not display\n telegram.style.display = \"none\";\n\n telegram.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let telegramSpan: HTMLElement = createElement(spanHTMLTag);\n telegramSpan.className = \"w-500\";\n telegramSpan.appendChild(\n createTextNode(strings.telegram || defaultStrings.telegram)\n );\n telegram.appendChild(telegramSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"telegram\")) {\n modalContent.appendChild(telegram);\n }\n\n // WhatsApp\n wa = createElement(aHTMLTag) as HTMLLinkElement;\n wa.id = \"m-wa\";\n wa.href = \"#mailgo-whatsapp\";\n wa.classList.add(\"m-open\");\n wa.classList.add(\"m-wa\");\n wa.appendChild(createTextNode(strings.open_in_ || defaultStrings.open_in_));\n let waSpan: HTMLElement = createElement(spanHTMLTag);\n waSpan.className = \"w-500\";\n waSpan.appendChild(\n createTextNode(strings.whatsapp || defaultStrings.whatsapp)\n );\n wa.appendChild(waSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"whatsapp\")) {\n modalContent.appendChild(wa);\n }\n\n // Skype\n skype = createElement(aHTMLTag) as HTMLLinkElement;\n skype.id = \"m-skype\";\n skype.href = \"#mailgo-skype\";\n skype.classList.add(\"m-open\");\n skype.classList.add(\"m-skype\");\n skype.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let skypeSpan: HTMLElement = createElement(spanHTMLTag);\n skypeSpan.className = \"w-500\";\n skypeSpan.appendChild(\n createTextNode(strings.skype || defaultStrings.skype)\n );\n skype.appendChild(skypeSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"skype\")) {\n modalContent.appendChild(skype);\n }\n\n // call default\n call = createElement(aHTMLTag) as HTMLLinkElement;\n call.id = \"m-call\";\n call.href = \"#mailgo-open\";\n call.classList.add(\"m-open\");\n call.classList.add(\"m-default\");\n let callSpan: HTMLElement = createElement(spanHTMLTag);\n callSpan.className = \"w-500\";\n callSpan.appendChild(createTextNode(strings.call || defaultStrings.call));\n call.appendChild(callSpan);\n call.appendChild(\n createTextNode(strings._as_default || defaultStrings._as_default)\n );\n\n modalContent.appendChild(call);\n\n // copy\n copyTel = createElement(aHTMLTag) as HTMLLinkElement;\n copyTel.id = \"m-tel-copy\";\n copyTel.href = \"#mailgo-copy\";\n copyTel.classList.add(\"m-copy\");\n copyTel.classList.add(\"w-500\");\n copyTel.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyTel);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalTel);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // event listener on body, if the element is mailgo-compatible the mailgo modal will be rendered\n document.addEventListener(\"click\", mailgoClickListener);\n};\n\n/**\n * mailgoClickListener\n * function to check if an element is mailgo-enabled or not referencing to\n * mail:\n * document.querySelectorAll(\n * 'a[href^=\"mailto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * tel:\n * document.querySelectorAll(\n * 'a[href^=\"tel:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"callto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"sms:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n */\nfunction mailgoClickListener(event: Event): boolean {\n // check if the mailgo HTML exists in the body\n if (\n !document.body.contains(modalMailto) &&\n !document.body.contains(modalTel)\n ) {\n return false;\n }\n\n // if a mailgo is already showing do nothing\n if (mailgoIsShowing()) {\n return false;\n }\n\n // the path of the event\n let path =\n (event.composedPath && event.composedPath()) ||\n composedPath(event.target as HTMLElement);\n\n if (path) {\n path.forEach((element: HTMLElement) => {\n if (element instanceof HTMLDocument || element instanceof Window) {\n return false;\n }\n\n // go here only if one of the mailgo modals are enabled\n if (mailtoEnabled || telEnabled || smsEnabled) {\n let localMailgoType = getMailgoTypeByElement(element);\n\n // go on if the localMailgoType is not null\n if (localMailgoType) {\n // set the active mailgo type\n activeMailgoType = localMailgoType;\n\n let activeMailgoModalType = activeMailgoType?.type;\n\n if (activeMailgoModalType) {\n // check if the setting is enabled and if so go with pre-render\n if (\n (mailtoEnabled && activeMailgoModalType === MAILGO_MAIL) ||\n (telEnabled && activeMailgoModalType === MAILGO_TEL) ||\n (smsEnabled && activeMailgoModalType === MAILGO_SMS)\n ) {\n // stop the normal execution of the element click\n event.preventDefault();\n\n // render mailgo\n mailgoPreRender(element as HTMLLinkElement);\n\n return true;\n }\n }\n }\n }\n });\n }\n\n return false;\n}\n\n/**\n * mailgoPreRender\n * function to pre-render a mailgo, it helps populating elements needed by modal\n */\nfunction mailgoPreRender(\n mailgoElementOrUrl: HTMLLinkElement | string\n): boolean {\n let mailgoElement: HTMLLinkElement;\n\n // get the type and installation from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if type is not defined return\n if (!type) return false;\n\n if (typeof mailgoElementOrUrl === \"string\") {\n // if the parameter is a string it is the url\n href = mailgoElementOrUrl as string;\n } else {\n // if the paramenter is an HTMLLinkElement get the href attribute and the element\n href = mailgoElementOrUrl.getAttribute(\"href\") as string;\n mailgoElement = mailgoElementOrUrl as HTMLLinkElement;\n }\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // if the installation is classic\n if (installation === CLASSIC) {\n if (validateUrl(href, MAILTO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILTO)[1].trim());\n } else if (validateUrl(href, MAILGO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILGO)[1].trim());\n }\n\n try {\n url = new URL(href);\n\n let urlParams: URLSearchParams = url.searchParams;\n // optional parameters for the email\n cc = urlParams.get(\"cc\");\n bcc = urlParams.get(\"bcc\");\n subject = urlParams.get(\"subject\");\n bodyMail = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam\n // mail = data-address + @ + data-domain\n mail =\n mailgoElement.getAttribute(\"data-address\") &&\n mailgoElement.getAttribute(\"data-domain\")\n ? mailgoElement.getAttribute(\"data-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-domain\")\n : null;\n\n try {\n url = new URL(MAILTO + encodeURIComponent(mail));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // cc = data-cc-address + @ + data-cc-domain\n cc = mailgoElement.getAttribute(\"data-cc-address\")\n ? mailgoElement.getAttribute(\"data-cc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-cc-domain\")\n : null;\n\n // if cc is defined add it to parameters\n if (cc) parameters.push(\"cc=\" + cc);\n\n // bcc = data-bcc-address + @ + data-bcc-domain\n bcc = mailgoElement.getAttribute(\"data-bcc-address\")\n ? mailgoElement.getAttribute(\"data-bcc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-bcc-domain\")\n : null;\n\n // if bcc is defined add it to parameters\n if (bcc) parameters.push(\"bcc=\" + bcc);\n\n // subject = data-subject\n subject = mailgoElement.getAttribute(\"data-subject\");\n\n // if subject is defined add it to parameters\n if (subject) parameters.push(\"subject=\" + subject);\n\n // body = data-body\n bodyMail = mailgoElement.getAttribute(\"data-body\");\n\n // if body is defined add it to parameters\n if (bodyMail) parameters.push(\"body=\" + bodyMail);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n MAILTO + encodeURIComponent(mail),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateEmail !== \"undefined\") {\n validateEmailConfig = config.validateEmail;\n }\n\n if (validateEmailConfig) {\n // validate the email address\n if (!validateEmails(mail.split(\",\"))) {\n return false;\n }\n\n // if cc, bcc are not valid cc, bcc = \"\"\n if (cc && !validateEmails(cc.split(\",\"))) cc = \"\";\n if (bcc && !validateEmails(bcc.split(\",\"))) bcc = \"\";\n }\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n if (installation === CLASSIC) {\n if (validateUrl(href, TEL)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(TEL)[1].trim());\n } else if (validateUrl(href, CALLTO)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(CALLTO)[1].trim());\n } else if (validateUrl(href, SMS)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(SMS)[1].trim());\n }\n\n try {\n url = new URL(href);\n let urlParams: URLSearchParams = url.searchParams;\n\n // optional parameters for the phone number\n msg = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation == LESS_SPAM) {\n tel = mailgoElement.getAttribute(\"data-tel\");\n msg = mailgoElement.getAttribute(\"data-msg\");\n\n try {\n url = new URL(TEL + encodeURIComponent(tel));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // if msg is defined add it to parameters\n if (msg) parameters.push(\"body=\" + msg);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n TEL + encodeURIComponent(tel),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateTel !== \"undefined\") {\n validateTelConfig = config.validateTel;\n }\n\n // validate the phone number\n if (validateTelConfig) {\n if (!validateTel(tel)) return;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-telegram\")) {\n telegramUsername = mailgoElement.getAttribute(\"data-telegram\");\n } else {\n telegramUsername = null;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-skype\")) {\n skypeUsername = mailgoElement.getAttribute(\"data-skype\");\n } else {\n skypeUsername = null;\n }\n }\n\n // if dark is in config or contained in the element\n if (\n mailgoElement &&\n (config?.dark || mailgoElement.classList.contains(\"dark\"))\n ) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // render mailgo\n mailgoRender();\n\n return true;\n}\n\n/**\n * mailgoDirectRender\n * function to render a mailgo directly from a URL\n */\nfunction mailgoDirectRender(directUrl: string): boolean {\n // start mailgo\n mailgo();\n\n if (validateUrl(directUrl, MAILTO) || validateUrl(directUrl, MAILGO)) {\n activeMailgoType = {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n } else if (\n validateUrl(directUrl, TEL) ||\n validateUrl(directUrl, CALLTO) ||\n validateUrl(directUrl, SMS)\n ) {\n activeMailgoType = {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n }\n return false;\n}\n\n/**\n * mailgoRender\n * function to render a mailgo (mail or tel)\n */\nfunction mailgoRender(): boolean {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n\n // if type is not defined return\n if (!type) return false;\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // the title of the modal (email address)\n title.innerHTML = mail.split(\",\").join(\"
\");\n\n // add the details if provided\n if (mailgoConfigAttributeEnabled(\"detail\", \"cc\") && cc) {\n detailCc.style.display = \"block\";\n ccValue.innerHTML = cc.split(\",\").join(\"
\");\n } else {\n detailCc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"bcc\") && bcc) {\n detailBcc.style.display = \"block\";\n bccValue.innerHTML = bcc.split(\",\").join(\"
\");\n } else {\n detailBcc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"subject\") && subject) {\n detailSubject.style.display = \"block\";\n subjectValue.textContent = subject;\n } else {\n detailSubject.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"body\") && bodyMail) {\n detailBody.style.display = \"block\";\n bodyValue.textContent = bodyMail;\n } else {\n detailBody.style.display = \"none\";\n }\n\n // add the actions\n gmail.addEventListener(\"click\", openGmail);\n\n outlook.addEventListener(\"click\", openOutlook);\n\n yahoo.addEventListener(\"click\", openYahooMail);\n\n open.addEventListener(\"click\", openDefault);\n\n copyMail.addEventListener(\"click\", copy);\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n // the title of the modal (tel)\n titleTel.innerHTML = tel;\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"msg\") && msg) {\n detailMsg.style.display = \"block\";\n msgValue.textContent = msg;\n } else {\n detailMsg.style.display = \"none\";\n }\n\n // add the actions to buttons\n wa.addEventListener(\"click\", openWhatsApp);\n\n // telegram must be shown only if data-telegram is provided\n if (telegramUsername) {\n document.getElementById(\"m-tg\").style.display = \"block\";\n telegram.addEventListener(\"click\", openTelegram);\n } else {\n document.getElementById(\"m-tg\").style.display = \"none\";\n }\n\n skype.addEventListener(\"click\", openSkype);\n\n call.addEventListener(\"click\", openDefault);\n\n copyTel.addEventListener(\"click\", copy);\n }\n\n // show the mailgo\n showMailgo(type);\n\n // add listener keyDown\n document.addEventListener(\"keydown\", mailgoKeydown);\n\n return true;\n}\n\n// actions\nconst openGmail = (event?: Event): void => {\n event.preventDefault();\n\n let urlString: string;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n if (installation === CLASSIC) {\n try {\n urlString = url.toString();\n } catch (e) {\n urlString = href;\n }\n } else if (installation === LESS_SPAM) {\n urlString = lessSpamHref;\n }\n\n // Gmail url\n let gmailUrl: string =\n \"https://mail.google.com/mail/?extsrc=mailto&url=\" +\n encodeURIComponent(urlString);\n\n // open the link\n window.open(gmailUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openOutlook = (event?: Event): void => {\n event.preventDefault();\n\n // Outlook starting url\n let startingOutlookUrl: string =\n \"https://outlook.live.com/owa/?path=/mail/action/compose&to=\";\n\n // let the user to decide to open Office365 Outlook instead of the classic outlook.live.com\n if (config?.office365) {\n startingOutlookUrl =\n \"https://outlook.office365.com/owa/?path=/mail/action/compose&to=\";\n }\n\n // Outlook url\n let outlookUrl: string = startingOutlookUrl + encodeURIComponent(mail);\n\n // the details if provided\n if (subject) {\n outlookUrl = outlookUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n\n if (bodyMail) {\n outlookUrl = outlookUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(outlookUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openYahooMail = (event?: Event): void => {\n event.preventDefault();\n\n // Yahoo url\n let yahooUrl: string = \"https://compose.mail.yahoo.com/?to=\" + mail;\n\n // the details if provided\n if (subject) {\n yahooUrl = yahooUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n if (bodyMail) {\n yahooUrl = yahooUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(yahooUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openTelegram = (event?: Event): void => {\n event.preventDefault();\n\n // check if telegramUsername exists\n if (telegramUsername) {\n // Telegram url\n let tgUrl: string = \"https://t.me/\" + encodeURIComponent(telegramUsername);\n\n // open the url\n window.open(tgUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n }\n};\n\nconst openSkype = (event?: Event): void => {\n event.preventDefault();\n\n let skype: string = skypeUsername || tel;\n\n // Telegram url\n let skypeUrl: string = \"skype:\" + encodeURIComponent(skype);\n\n // open the url\n window.open(skypeUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openWhatsApp = (event?: Event): void => {\n event.preventDefault();\n\n // WhatsApp API doesn't work with non number digits and leading 0s: https://faq.whatsapp.com/general/chats/how-to-use-click-to-chat/\n let whatappTel = tel.replace(notNumber, \"\").replace(leadingZeros, \"\");\n\n // WhatsApp url\n let waUrl: string = \"https://wa.me/\" + encodeURIComponent(whatappTel);\n\n // the details if provided\n if (msg) {\n waUrl = waUrl.concat(\"?text=\" + encodeURIComponent(msg));\n }\n\n // open the url\n window.open(waUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openDefault = (event?: Event): void => {\n event.preventDefault();\n\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if the installation is classic the browser can follow the default behaviour\n if (installation === CLASSIC) {\n window.location.href = href;\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam use the built less-spam href\n window.location.href = lessSpamHref;\n }\n\n hideMailgo();\n};\n\nconst copy = (event?: Event): void => {\n event.preventDefault();\n\n // the correct copyButton (mail or tel)\n if (mailgoIsShowing()) {\n let activeCopy: HTMLElement;\n\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n // in case it is showing mail modal copy email address\n copyToClipboard(mail);\n activeCopy = copyMail;\n } else {\n // in case it is showing tel modal copy phone number\n copyToClipboard(tel);\n activeCopy = copyTel;\n }\n\n activeCopy.textContent = strings.copied || defaultStrings.copied;\n setTimeout(() => {\n activeCopy.textContent = strings.copy || defaultStrings.copy;\n // hide after the timeout\n hideMailgo();\n }, 999);\n }\n};\n\n// function to find if a link is a mailto, tel, callto or sms\nconst validateUrl = (url: string, type: string = MAILTO) => {\n let regexValidate = new RegExp(\"^\" + type + \"((.)+)\", \"gi\");\n return regexValidate.test(url);\n};\n\n// function that returns if an element is a mailgo\nfunction getMailgoTypeByElement(element: HTMLElement): MailgoType | null {\n let elementHref: string = (element as HTMLLinkElement).getAttribute(\"href\");\n\n // return null if there is no-mailgo in class\n if (element.classList?.contains(NO_MAILGO)) {\n return null;\n }\n\n // the case of classic type of mailgo, like a href=mailto:... or a href=tel:... and the class=mailgo with a useful href\n if (elementHref || element.classList?.contains(\"mailgo\")) {\n if (validateUrl(elementHref, MAILTO) || validateUrl(elementHref, MAILGO)) {\n // a mailto: or mailgo:\n return {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n } else if (\n validateUrl(elementHref, TEL) ||\n validateUrl(elementHref, CALLTO)\n ) {\n // a tel: or callto:\n return {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n } else if (validateUrl(elementHref, SMS)) {\n // a sms:\n return {\n type: MAILGO_SMS,\n installation: CLASSIC,\n };\n }\n }\n\n if (elementHref === \"#mailgo\" || element.classList?.contains(\"mailgo\")) {\n // less-spam installation of mailgo, check to the attributes\n if (\n element.hasAttribute(\"data-address\") &&\n element.hasAttribute(\"data-domain\")\n ) {\n // less-spam mailto with data-address and data-domain\n return {\n type: MAILGO_MAIL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-tel\")) {\n // less-spam tel with data-tel\n return {\n type: MAILGO_TEL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-msg\")) {\n // less-spam sms with data-msd\n return {\n type: MAILGO_SMS,\n installation: LESS_SPAM,\n };\n }\n }\n\n return null;\n}\n\n/**\n * mailgoKeydown\n * function to manage the keydown event when the modal is showing, return a boolean that represents if a useful key has been pressed\n */\nconst mailgoKeydown = (keyboardEvent: KeyboardEvent): boolean => {\n // if mailgo is showing\n if (mailgoIsShowing()) {\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 71:\n // g -> open GMail\n openGmail();\n return true;\n case 79:\n // o -> open Outlook\n openOutlook();\n return true;\n case 89:\n // y -> open Yahoo Mail\n openYahooMail();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n } else if (type === MAILGO_TEL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 84:\n // t -> open Telegram\n openTelegram();\n return true;\n case 87:\n // w -> open WhatsApp\n openWhatsApp();\n return true;\n case 83:\n // s -> open Skype\n openSkype();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n }\n }\n return false;\n};\n\n// show the modal\nconst showMailgo = (type: MailgoModalType): void => {\n // show the correct modal\n setModalDisplay(type, \"flex\");\n};\n\n// hide the modal\nconst hideMailgo = (): void => {\n // hide all the modals\n setModalDisplay(MAILGO_MAIL, \"none\");\n setModalDisplay(MAILGO_TEL, \"none\");\n\n // remove listener keyDown\n document.removeEventListener(\"keydown\", mailgoKeydown);\n};\n\n// is the mailgo modal hidden?\nconst mailgoIsShowing = (): boolean => {\n return (\n (mailtoEnabled && getModalDisplay(MAILGO_MAIL) === \"flex\") ||\n ((telEnabled || smsEnabled) && getModalDisplay(MAILGO_TEL) === \"flex\")\n );\n};\n\nconst byElement = (): HTMLLinkElement => {\n // by element in the footer\n let by: HTMLLinkElement = createElement(aHTMLTag) as HTMLLinkElement;\n by.href = \"https://mailgo.dev?ref=mailgo-modal\";\n by.className = \"m-by\";\n by.target = \"_blank\";\n by.rel = \"noopener noreferrer\";\n by.appendChild(createTextNode(\"mailgo.dev\"));\n\n return by;\n};\n\n// create element\nconst createElement = (element: string = \"div\"): HTMLElement =>\n document.createElement(element);\n\n// create text node\nconst createTextNode = (element: string): Text =>\n document.createTextNode(element);\n\n// get the correct HTMLElement from a type\nconst getModalHTMLElement = (type: MailgoModalType = MAILGO_MAIL) => {\n if (type === MAILGO_TEL) {\n return modalTel;\n } else {\n return modalMailto;\n }\n};\n\n// get display value\nconst getModalDisplay = (ref: MailgoModalType = MAILGO_MAIL): string =>\n getModalHTMLElement(ref).style.display;\n\n// set display value\nconst setModalDisplay = (\n ref: MailgoModalType = MAILGO_MAIL,\n value: string\n): void => {\n let modal = getModalHTMLElement(ref);\n\n if (modal) {\n modal.style.display = value;\n\n if (value === \"flex\") {\n // \"save\" the activated link.\n activatedLink = document.activeElement as HTMLElement;\n modal.setAttribute(\"aria-hidden\", \"false\");\n\n // Focus on the modal container.\n modal.setAttribute(\"tabindex\", \"0\");\n modal.focus();\n setFocusLoop(modal);\n } else {\n modal.setAttribute(\"aria-hidden\", \"true\");\n\n // focus back the activated link for getting back to the context.\n modal.setAttribute(\"tabindex\", \"-1\");\n activatedLink.focus();\n }\n }\n};\n\n// enable dark mode\nconst enableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.add(\"m-dark\");\n }\n};\n\n// disable dark mode\nconst disableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.remove(\"m-dark\");\n }\n};\n\n// custom composedPath if path or event.composedPath() are not defined\nconst composedPath = (\n el: HTMLElement\n): (HTMLElement | Document | (Window & typeof globalThis))[] => {\n let path = [];\n\n while (el) {\n path.push(el);\n\n if (el.tagName === \"HTML\") {\n path.push(document);\n path.push(window);\n return path;\n }\n\n el = el.parentElement;\n }\n};\n\n// function to recreate a mailto: or tel: href from less-spam\nconst buildLessSpamHref = (type: string, parameters: string[]): string => {\n lessSpamHref = type;\n if (parameters && parameters.length > 0) {\n let joinedParams = parameters.join(\"&\");\n lessSpamHref = lessSpamHref.concat(\"?\" + joinedParams);\n }\n return lessSpamHref;\n};\n\n// function to check an attribute is enabled or not, by default considering it enabled\nconst mailgoConfigAttributeEnabled = (\n type: \"action\" | \"detail\",\n attribute: MailgoAction | MailgoDetail\n): boolean => {\n console.log(type);\n console.log(attribute);\n\n // by default all the actions and attribute are enabled\n if (!config) {\n console.log(\"caso 1\");\n return true;\n }\n\n // if the attribute type is action consider the actions config attribute\n if (type === \"action\") {\n if (config && !config?.actions) {\n console.log(\"caso 2\");\n return true;\n }\n\n if (\n config &&\n config.actions &&\n config?.actions[attribute as MailgoAction] === false\n ) {\n console.log(\"caso 3\");\n return false;\n }\n } else if (type === \"detail\") {\n // else consider the details attribute\n\n if (config && !config?.details) {\n console.log(\"caso 2\");\n return true;\n }\n\n if (\n config &&\n config.details &&\n config?.details[attribute as MailgoDetail] === false\n ) {\n console.log(\"caso 4\");\n return false;\n }\n }\n\n return true;\n};\n\n// manage the language of mailgo\nconst mailgoSetLanguage = (): string => {\n let languageType = \"default lang\";\n\n // if a language is defined in configuration use it\n if (\n config?.lang &&\n (languages as MailgoLanguages).indexOf(config.lang) !== -1\n ) {\n lang = config.lang;\n languageType = \"config lang\";\n } else {\n // else if is defined use it!\n // keep the lang from html\n let htmlLang: string = document.documentElement.lang;\n\n // find the correct language using the lang attribute, not just a === because there a are cases like fr-FR or fr_FR in html lang attribute\n (languages as MailgoLanguages).forEach((language: any) => {\n if (new RegExp(\"^\" + language, \"gi\").test(htmlLang)) {\n lang = language;\n languageType = \"html lang\";\n }\n });\n }\n\n // strings\n strings = (translations as MailgoTranslations)[lang];\n\n return languageType;\n};\n\nconst mailgoStyle = (): void => {\n if (!document.getElementById(\"mailgo-style\")) {\n // mailgo style\n let mailgoCSSElement: HTMLStyleElement = createElement(\n \"style\"\n ) as HTMLStyleElement;\n mailgoCSSElement.id = \"mailgo-style\";\n mailgoCSSElement.type = \"text/css\";\n mailgoCSSElement.appendChild(createTextNode(mailgoCSS));\n document.head.appendChild(mailgoCSSElement);\n }\n};\n\n// mailgo\nfunction mailgo(mailgoConfig?: MailgoConfig): boolean {\n try {\n // polyfill mailgo\n // mailgoPolyfill();\n\n // set the global config merging window mailgConfig and mailgoConfig passed as a parameter\n config = { ...mailgoConfig, ...((window as any)?.mailgoConfig || null) };\n\n // if the window is defined...\n if (typeof window !== \"undefined\") {\n // if is set in config use it (load the mailgo CSS)\n if (typeof config?.loadCSS !== \"undefined\") {\n loadCSSConfig = config.loadCSS;\n }\n\n // if is set in config use it (enable mailto)\n if (typeof config?.mailto !== \"undefined\") {\n mailtoEnabled = config.mailto;\n }\n\n // if is set in config use it (enable tel)\n if (typeof config?.tel !== \"undefined\") {\n telEnabled = config.tel;\n }\n\n // if is set in config use it (enable sms)\n if (typeof config?.sms !== \"undefined\") {\n smsEnabled = config.sms;\n }\n\n // if load css enabled load it!\n if (loadCSSConfig) {\n // add the style for mailgo\n mailgoStyle();\n }\n\n // if is set an initEvent add the listener\n if (config?.initEvent) {\n if (config?.listenerOptions) {\n // listener options specified\n document.addEventListener(\n config.initEvent,\n mailgoInit,\n config.listenerOptions\n );\n } else {\n // no listener options\n document.addEventListener(config.initEvent, mailgoInit);\n }\n } else {\n mailgoInit();\n }\n\n return true;\n }\n } catch (error) {\n console.log(error);\n }\n return false;\n}\n\n// define the methods also for window element\nif (typeof window !== \"undefined\") {\n (window as any).getMailgoTypeByElement = getMailgoTypeByElement;\n (window as any).mailgoClickListener = mailgoClickListener;\n (window as any).mailgoCheckRender = mailgoClickListener; // for compatibility with old version of mailgo\n (window as any).mailgoPreRender = mailgoPreRender;\n (window as any).mailgoDirectRender = mailgoDirectRender;\n (window as any).mailgoRender = mailgoRender;\n (window as any).mailgo = mailgo;\n}\n\nexport {\n getMailgoTypeByElement,\n mailgoClickListener,\n mailgoPreRender,\n mailgoDirectRender,\n mailgoRender,\n};\n\nexport default mailgo;\n","export const userAgent = () => {\n if (\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n )\n ) {\n return \"mobile\";\n }\n return \"desktop\";\n};\n","// webpack > dist/mailgo.nocss.min.js\n\nimport mailgo from \"../src/mailgo\";\n\n// call init mailgo attached to the event DOMContentLoaded\nconst mailgoConfig = {\n initEvent: \"DOMContentLoaded\",\n loadCSS: false,\n};\n\nmailgo(mailgoConfig);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(331);\n","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"sourceRoot":""} \ No newline at end of file diff --git a/examples/README.md b/examples/README.md index 2c3c943..33175c5 100644 --- a/examples/README.md +++ b/examples/README.md @@ -63,3 +63,11 @@ Simple example of mailgo with a test of desktop/mobile settings ### `index.skypack.html` Simple example of mailgo using + +### `index.office365.html` + +Simple example of mailgo that uses Office365 instead the classic Outlook Live for Outlook link + +### `index.detailshidden.html` + +Simple example of mailgo with subject and body of the email hidden diff --git a/examples/index.detailshidden.html b/examples/index.detailshidden.html new file mode 100644 index 0000000..3db37e4 --- /dev/null +++ b/examples/index.detailshidden.html @@ -0,0 +1,107 @@ + + + + + + mailgo examples with Office365 setting enabled + + +

mailto

+

matteo@manzinello.dev

+

+ matteo@manzinello.dev (with subelement of a tag) +

+

+ mailto with more "to" and a "cc" +

+

+ mailto with more "to" and a "cc" not valid +

+

+ example with a subject +

+

+ example with a subject and a body +

+

+ example with a cc, a subject and a body +

+

+ example with a cc, a bcc, a subject and a body +

+

+ less-spam example (with class=mailgo) +

+

+ less-spam example (with href=#mailgo) +

+

Dark mode

+

+ matteo@manzinello.dev (single dark mode, class=dark) +

+

+ mailto with a cc and single dark mode + +

+

+ example with a cc, a bcc, a subject and a body and single dark mode +

+

+ less-spam dark mode example (with class=mailgo) +

+ +
+
+

mailgo.dev

+ + + + + + diff --git a/lib/mailgo.js b/lib/mailgo.js index 5896d9d..2890c1f 100644 --- a/lib/mailgo.js +++ b/lib/mailgo.js @@ -159,7 +159,10 @@ var spanHTMLTag = "span"; var aHTMLTag = "a"; var pHTMLTag = "p"; // default lang -var defaultLang = "en"; +var defaultLang = "en"; // useful regexp + +var notNumber = new RegExp("[^0-9/]", "gi"); +var leadingZeros = new RegExp("^0+", "gi"); ;// CONCATENATED MODULE: ../src/utils.ts // validate a single email with regex var validateEmail = function validateEmail(email) { @@ -250,10 +253,7 @@ var mailgoCSS = __webpack_require__(801).toString(); // default language var lang = defaultLang; // default strings -var defaultStrings = translations_namespaceObject[defaultLang]; // useful regexp - -var notNumber = new RegExp("[^0-9/]", "gi"); -var leadingZeros = new RegExp("^0+", "gi"); // translation strings +var defaultStrings = translations_namespaceObject[defaultLang]; // translation strings var strings; // global mailgo config object @@ -1430,29 +1430,38 @@ var buildLessSpamHref = function buildLessSpamHref(type, parameters) { var mailgoConfigAttributeEnabled = function mailgoConfigAttributeEnabled(type, attribute) { - var _config11; + console.log(type); + console.log(attribute); // by default all the actions and attribute are enabled - // by default all the actions and attribute are enabled if (!config) { - return true; - } - - if (config && !((_config11 = config) !== null && _config11 !== void 0 && _config11.actions)) { + console.log("caso 1"); return true; } // if the attribute type is action consider the actions config attribute if (type === "action") { - var _config12; + var _config11, _config12; + + if (config && !((_config11 = config) !== null && _config11 !== void 0 && _config11.actions)) { + console.log("caso 2"); + return true; + } if (config && config.actions && ((_config12 = config) === null || _config12 === void 0 ? void 0 : _config12.actions[attribute]) === false) { + console.log("caso 3"); return false; } } else if (type === "detail") { - var _config13; + var _config13, _config14; // else consider the details attribute - if (config && config.details && ((_config13 = config) === null || _config13 === void 0 ? void 0 : _config13.details[attribute]) === false) { + if (config && !((_config13 = config) !== null && _config13 !== void 0 && _config13.details)) { + console.log("caso 2"); + return true; + } + + if (config && config.details && ((_config14 = config) === null || _config14 === void 0 ? void 0 : _config14.details[attribute]) === false) { + console.log("caso 4"); return false; } } @@ -1462,11 +1471,11 @@ var mailgoConfigAttributeEnabled = function mailgoConfigAttributeEnabled(type, a var mailgoSetLanguage = function mailgoSetLanguage() { - var _config14; + var _config15; var languageType = "default lang"; // if a language is defined in configuration use it - if ((_config14 = config) !== null && _config14 !== void 0 && _config14.lang && languages_namespaceObject.indexOf(config.lang) !== -1) { + if ((_config15 = config) !== null && _config15 !== void 0 && _config15.lang && languages_namespaceObject.indexOf(config.lang) !== -1) { lang = config.lang; languageType = "config lang"; } else { @@ -1509,25 +1518,25 @@ function mailgo(mailgoConfig) { config = _objectSpread(_objectSpread({}, mailgoConfig), ((_window = window) === null || _window === void 0 ? void 0 : _window.mailgoConfig) || null); // if the window is defined... if (typeof window !== "undefined") { - var _config15, _config16, _config17, _config18, _config19; + var _config16, _config17, _config18, _config19, _config20; // if is set in config use it (load the mailgo CSS) - if (typeof ((_config15 = config) === null || _config15 === void 0 ? void 0 : _config15.loadCSS) !== "undefined") { + if (typeof ((_config16 = config) === null || _config16 === void 0 ? void 0 : _config16.loadCSS) !== "undefined") { loadCSSConfig = config.loadCSS; } // if is set in config use it (enable mailto) - if (typeof ((_config16 = config) === null || _config16 === void 0 ? void 0 : _config16.mailto) !== "undefined") { + if (typeof ((_config17 = config) === null || _config17 === void 0 ? void 0 : _config17.mailto) !== "undefined") { mailtoEnabled = config.mailto; } // if is set in config use it (enable tel) - if (typeof ((_config17 = config) === null || _config17 === void 0 ? void 0 : _config17.tel) !== "undefined") { + if (typeof ((_config18 = config) === null || _config18 === void 0 ? void 0 : _config18.tel) !== "undefined") { telEnabled = config.tel; } // if is set in config use it (enable sms) - if (typeof ((_config18 = config) === null || _config18 === void 0 ? void 0 : _config18.sms) !== "undefined") { + if (typeof ((_config19 = config) === null || _config19 === void 0 ? void 0 : _config19.sms) !== "undefined") { smsEnabled = config.sms; } // if load css enabled load it! @@ -1538,10 +1547,10 @@ function mailgo(mailgoConfig) { } // if is set an initEvent add the listener - if ((_config19 = config) !== null && _config19 !== void 0 && _config19.initEvent) { - var _config20; + if ((_config20 = config) !== null && _config20 !== void 0 && _config20.initEvent) { + var _config21; - if ((_config20 = config) !== null && _config20 !== void 0 && _config20.listenerOptions) { + if ((_config21 = config) !== null && _config21 !== void 0 && _config21.listenerOptions) { // listener options specified document.addEventListener(config.initEvent, mailgoInit, config.listenerOptions); } else { diff --git a/lib/mailgo.js.map b/lib/mailgo.js.map index 7f15745..e89185d 100644 --- a/lib/mailgo.js.map +++ b/lib/mailgo.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://mailgo/webpack/universalModuleDefinition","webpack://mailgo/../src/mailgo.scss","webpack://mailgo/../node_modules/css-loader/dist/runtime/api.js","webpack://mailgo/../src/mailgo.scss?81f2","webpack://mailgo/../src/constants.ts","webpack://mailgo/../src/utils.ts","webpack://mailgo/../src/mobile-detect.ts","webpack://mailgo/../src/mailgo.ts","webpack://mailgo/./mailgo.lib.ts","webpack://mailgo/webpack/bootstrap","webpack://mailgo/webpack/runtime/define property getters","webpack://mailgo/webpack/runtime/hasOwnProperty shorthand","webpack://mailgo/webpack/runtime/make namespace object","webpack://mailgo/webpack/startup"],"names":["MAILTO","MAILGO","TEL","CALLTO","SMS","outlookDeepLink","NO_MAILGO","DESKTOP","MOBILE","MAILGO_MAIL","MAILGO_TEL","MAILGO_SMS","CLASSIC","LESS_SPAM","spanHTMLTag","aHTMLTag","pHTMLTag","defaultLang","validateEmail","email","test","validateEmails","arr","every","validateTel","tel","copyToClipboard","str","el","document","createElement","value","setAttribute","style","position","left","body","appendChild","selected","getSelection","rangeCount","getRangeAt","select","execCommand","removeChild","removeAllRanges","addRange","setFocusLoop","ref","modal","querySelector","addEventListener","leaveLastLink","leaveFirstLink","e","code","shiftKey","preventDefault","target","closest","focus","userAgent","navigator","mailgoCSS","require","lang","defaultStrings","translations","notNumber","RegExp","leadingZeros","strings","config","isMobile","mailtoEnabled","telEnabled","smsEnabled","desktopEnabled","mobileEnabled","validateEmailConfig","validateTelConfig","showFooterConfig","loadCSSConfig","activeMailgoType","modalMailto","modalTel","url","href","lessSpamHref","mail","cc","bcc","subject","bodyMail","msg","telegramUsername","skypeUsername","title","titleTel","detailCc","detailBcc","detailSubject","detailBody","detailMsg","ccValue","bccValue","subjectValue","bodyValue","msgValue","activatedLink","gmail","outlook","yahoo","open","telegram","wa","skype","call","copyMail","copyTel","mailgoInit","desktop","mobile","mailgoSetLanguage","mailgoExists","getElementById","display","id","classList","add","dark","enableDarkMode","disableDarkMode","modalBackground","className","modalContent","details","ccSpan","createTextNode","cc_","bccSpan","bcc_","subjectSpan","subject_","bodySpan","body_","open_in_","gmailSpan","mailgoConfigAttributeEnabled","outlookSpan","yahooSpan","openSpan","_default","copy","showFooter","byElement","hideMailgo","mailgoTelExists","detailsTel","msgSpan","telegramSpan","waSpan","whatsapp","skypeSpan","callSpan","_as_default","mailgoClickListener","event","contains","mailgoIsShowing","path","composedPath","forEach","element","HTMLDocument","Window","localMailgoType","getMailgoTypeByElement","activeMailgoModalType","type","mailgoPreRender","mailgoElementOrUrl","mailgoElement","installation","getAttribute","validateUrl","decodeURIComponent","split","trim","URL","urlParams","searchParams","get","error","console","log","encodeURIComponent","parameters","push","buildLessSpamHref","hasAttribute","mailgoRender","mailgoDirectRender","directUrl","mailgo","innerHTML","join","textContent","openGmail","openOutlook","openYahooMail","openDefault","openWhatsApp","openTelegram","openSkype","showMailgo","mailgoKeydown","urlString","toString","gmailUrl","window","startingOutlookUrl","office365","outlookUrl","concat","yahooUrl","tgUrl","skypeUrl","whatappTel","replace","waUrl","location","activeCopy","copied","setTimeout","regexValidate","elementHref","keyboardEvent","keyCode","setModalDisplay","removeEventListener","getModalDisplay","by","rel","getModalHTMLElement","activeElement","remove","tagName","parentElement","length","joinedParams","attribute","actions","languageType","languages","htmlLang","documentElement","language","mailgoStyle","mailgoCSSElement","head","mailgoConfig","loadCSS","mailto","sms","initEvent","listenerOptions","mailgoCheckRender"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;ACVA;AACA,kCAAkC,mBAAO,CAAC,GAAgD;AAC1F,sEAAsE,YAAY;AAClF;AACA,mDAAmD,eAAe,MAAM,QAAQ,SAAS,OAAO,uBAAuB,mBAAmB,sBAAsB,gBAAgB,iBAAiB,cAAc,oDAAoD,SAAS,UAAU,eAAe,cAAc,yJAAyJ,kCAAkC,gBAAgB,gBAAgB,uBAAuB,kBAAkB,cAAc,MAAM,QAAQ,SAAS,OAAO,yBAAyB,WAAW,0BAA0B,kBAAkB,cAAc,uBAAuB,kBAAkB,gBAAgB,gBAAgB,sBAAsB,YAAY,mBAAmB,wCAAwC,cAAc,aAAa,sBAAsB,cAAc,aAAa,0BAA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f,E;;ACjgDA;;AAQuB;;AAEvB;AACA,cAAc,UAAM;;AAEpB;AACA,0BAA0B,mBAAmB;;AAW3C;;AAEF,+CAAe,UAAM,EAAC;;;;;;;UC3BtB;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCrBA;WACA;WACA;WACA;WACA,wCAAwC,yCAAyC;WACjF;WACA;WACA,E;;;;;WCPA,6CAA6C,wDAAwD,E;;;;;WCArG;WACA;WACA;WACA,sDAAsD,kBAAkB;WACxE;WACA,+CAA+C,cAAc;WAC7D,E;;;;UCNA;UACA;UACA;UACA","file":"mailgo.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"mailgo\"] = factory();\n\telse\n\t\troot[\"mailgo\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn ","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:16.5px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:#20232a;opacity:.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:.95;border-radius:20px;box-shadow:0 3px 20px rgba(32,35,42,.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:24px;transition:.5s box-shadow}.m-modal .m-modal-content:hover,.m-modal .m-modal-content:focus,.m-modal .m-modal-content:active{opacity:1}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2em}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{cursor:pointer;padding:10px;color:#4a4a4a;border-radius:20px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#c0372a}.m-modal .m-modal-content a.m-gmail:hover,.m-modal .m-modal-content a.m-gmail:focus,.m-modal .m-modal-content a.m-gmail:active{background-color:rgba(192,55,42,.08);color:#c0372a}.m-modal .m-modal-content a.m-outlook{color:#0967aa}.m-modal .m-modal-content a.m-outlook:hover,.m-modal .m-modal-content a.m-outlook:focus,.m-modal .m-modal-content a.m-outlook:active{background-color:rgba(9,103,170,.08);color:#0967aa}.m-modal .m-modal-content a.m-yahoo{color:#4a00a0}.m-modal .m-modal-content a.m-yahoo:hover,.m-modal .m-modal-content a.m-yahoo:focus,.m-modal .m-modal-content a.m-yahoo:active{background-color:rgba(74,0,160,.08);color:#4a00a0}.m-modal .m-modal-content a.m-tg{color:#086da0}.m-modal .m-modal-content a.m-tg:hover,.m-modal .m-modal-content a.m-tg:focus,.m-modal .m-modal-content a.m-tg:active{background-color:rgba(8,109,160,.08);color:#086da0}.m-modal .m-modal-content a.m-wa{color:#067466}.m-modal .m-modal-content a.m-wa:hover,.m-modal .m-modal-content a.m-wa:focus,.m-modal .m-modal-content a.m-wa:active{background-color:rgba(6,116,102,.08);color:#067466}.m-modal .m-modal-content a.m-skype{color:#076d92}.m-modal .m-modal-content a.m-skype:hover,.m-modal .m-modal-content a.m-skype:focus,.m-modal .m-modal-content a.m-skype:active{background-color:rgba(7,109,146,.08);color:#076d92}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-default:focus,.m-modal .m-modal-content a.m-default:active,.m-modal .m-modal-content a.m-copy:hover,.m-modal .m-modal-content a.m-copy:focus,.m-modal .m-modal-content a.m-copy:active{background-color:rgba(0,0,0,.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:12px;margin-top:.8rem;padding:5px;color:#4a4a4a}.m-modal .m-modal-content a.m-by:hover,.m-modal .m-modal-content a.m-by:focus,.m-modal .m-modal-content a.m-by:active{color:#3d3d3d}.m-modal .m-modal-content .w-500{font-weight:500}.m-modal.m-dark .m-modal-content{background-color:#20232a}.m-modal.m-dark .m-modal-content,.m-modal.m-dark .m-modal-content p,.m-modal.m-dark .m-modal-content p span,.m-modal.m-dark .m-modal-content strong{color:#fff}.m-modal.m-dark .m-modal-content a{color:#eaeaea}.m-modal.m-dark .m-modal-content a:not(.m-by):hover,.m-modal.m-dark .m-modal-content a:not(.m-by):focus,.m-modal.m-dark .m-modal-content a:not(.m-by):active{background-color:rgba(134,134,134,.08);color:#eaeaea}.m-modal.m-dark .m-modal-content a.m-gmail{color:#e07d73}.m-modal.m-dark .m-modal-content a.m-gmail:hover,.m-modal.m-dark .m-modal-content a.m-gmail:focus,.m-modal.m-dark .m-modal-content a.m-gmail:active{background-color:rgba(224,125,115,.08);color:#e07d73}.m-modal.m-dark .m-modal-content a.m-outlook{color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-outlook:hover,.m-modal.m-dark .m-modal-content a.m-outlook:focus,.m-modal.m-dark .m-modal-content a.m-outlook:active{background-color:rgba(76,156,215,.08);color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-yahoo{color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-yahoo:hover,.m-modal.m-dark .m-modal-content a.m-yahoo:focus,.m-modal.m-dark .m-modal-content a.m-yahoo:active{background-color:rgba(172,136,211,.08);color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-tg{color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-tg:hover,.m-modal.m-dark .m-modal-content a.m-tg:focus,.m-modal.m-dark .m-modal-content a.m-tg:active{background-color:rgba(76,171,219,.08);color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-wa{color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-wa:hover,.m-modal.m-dark .m-modal-content a.m-wa:focus,.m-modal.m-dark .m-modal-content a.m-wa:active{background-color:rgba(76,210,192,.08);color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-skype{color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-skype:hover,.m-modal.m-dark .m-modal-content a.m-skype:focus,.m-modal.m-dark .m-modal-content a.m-skype:active{background-color:rgba(76,199,244,.08);color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-by:hover,.m-modal.m-dark .m-modal-content a.m-by:focus,.m-modal.m-dark .m-modal-content a.m-by:active{color:#fff}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\n var result = require(\"!!../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../node_modules/sass-loader/dist/cjs.js!./mailgo.scss\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n ","import { MailgoModalType, MailgoInstallationType } from \"mailgo\";\n\n// links\nexport const MAILTO: string = \"mailto:\";\nexport const MAILGO: string = \"mailgo:\";\nexport const TEL: string = \"tel:\";\nexport const CALLTO: string = \"callto:\";\nexport const SMS: string = \"sms:\";\n\n// deep linking\nexport const outlookDeepLink: string = \"ms-outlook://\";\n\n// no mailgo class\nexport const NO_MAILGO: string = \"no-mailgo\";\n\n// responsive settings\nexport const DESKTOP: string = \"desktop\";\nexport const MOBILE: string = \"mobile\";\n\n// mailgo modal types\nexport const MAILGO_MAIL: MailgoModalType = \"mailgo\";\nexport const MAILGO_TEL: MailgoModalType = \"mailgo-tel\";\nexport const MAILGO_SMS: MailgoModalType = \"mailgo-sms\";\n\n// mailgo installation types\nexport const CLASSIC: MailgoInstallationType = \"classic\";\nexport const LESS_SPAM: MailgoInstallationType = \"less-spam\";\n\n// useful html tags\nexport const spanHTMLTag: string = \"span\";\nexport const aHTMLTag: string = \"a\";\nexport const pHTMLTag: string = \"p\";\n\n// default lang\nexport const defaultLang: string = \"en\";\n","// validate a single email with regex\nexport const validateEmail = (email: string): boolean =>\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/.test(\n email\n );\n\n// validate an array of emails\nexport const validateEmails = (arr: string[]): boolean =>\n arr.every(validateEmail);\n\n// validate a single tel with regex\nexport const validateTel = (tel: string): boolean =>\n /^[+]{0,1}[\\s0-9]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*[p]{0,1}[\\s0-9]*$/.test(\n tel\n );\n\n// copy of a string\nexport const copyToClipboard = (str: string): boolean => {\n let el: HTMLTextAreaElement = document.createElement(\n \"textarea\"\n ) as HTMLTextAreaElement;\n el.value = str;\n el.setAttribute(\"readonly\", \"\");\n el.style.position = \"absolute\";\n el.style.left = \"-9999px\";\n document.body.appendChild(el);\n let selected: Range | boolean =\n document.getSelection().rangeCount > 0\n ? document.getSelection().getRangeAt(0)\n : false;\n el.select();\n document.execCommand(\"copy\");\n document.body.removeChild(el);\n if (selected) {\n document.getSelection().removeAllRanges();\n document.getSelection().addRange(selected);\n return true;\n }\n return false;\n};\n\n// set focus loop within modal\nexport const setFocusLoop = (ref: HTMLElement): void => {\n let modal = ref;\n modal\n .querySelector(\".m-modal-content a:last-of-type\")\n .addEventListener(\"keydown\", leaveLastLink);\n modal\n .querySelector(\".m-modal-content a:first-of-type\")\n .addEventListener(\"keydown\", leaveFirstLink);\n};\n\nexport const leaveLastLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === false) {\n e.preventDefault();\n\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:first-of-type\") as HTMLElement).focus();\n }\n};\n\nexport const leaveFirstLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === true) {\n e.preventDefault();\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:last-of-type\") as HTMLElement).focus();\n }\n};\n","export const userAgent = () => {\n if (\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n )\n ) {\n return \"mobile\";\n }\n return \"desktop\";\n};\n","import {\n MailgoConfig,\n MailgoTranslations,\n MailgoTranslation,\n MailgoAction,\n MailgoLanguages,\n MailgoType,\n MailgoDetail,\n MailgoInstallationType,\n MailgoModalType,\n} from \"mailgo\";\n\n// polyfill\n// import { mailgoPolyfill } from \"./polyfill\";\n\n// constants\nimport {\n MAILTO,\n MAILGO,\n TEL,\n CALLTO,\n SMS,\n MAILGO_MAIL,\n MAILGO_TEL,\n MAILGO_SMS,\n CLASSIC,\n LESS_SPAM,\n NO_MAILGO,\n MOBILE,\n spanHTMLTag,\n aHTMLTag,\n pHTMLTag,\n defaultLang,\n} from \"./constants\";\n\n// utils\nimport {\n validateEmails,\n validateTel,\n copyToClipboard,\n setFocusLoop,\n} from \"./utils\";\n\n// i18n for mailgo\nimport languages from \"../i18n/languages.json\";\nimport translations from \"../i18n/translations.json\";\n\n// mobile detect\nimport { userAgent } from \"./mobile-detect\";\n\n// mailgo scss, with toString (https://github.com/webpack-contrib/css-loader#tostring)\nconst mailgoCSS: string = require(\"./mailgo.scss\").toString();\n\n// default language\nlet lang: string = defaultLang;\n\n// default strings\nconst defaultStrings: MailgoTranslation = (translations as MailgoTranslations)[\n defaultLang\n];\n\n// useful regexp\nconst notNumber: RegExp = new RegExp(\"[^0-9/]\", \"gi\");\nconst leadingZeros: RegExp = new RegExp(\"^0+\", \"gi\");\n\n// translation strings\nlet strings: MailgoTranslation;\n\n// global mailgo config object\nlet config: MailgoConfig;\n\n// config to check if the client is mobile or desktop\nlet isMobile: boolean = false;\n\n// default config attributes\nlet mailtoEnabled: boolean = true;\nlet telEnabled: boolean = true;\nlet smsEnabled: boolean = false;\nlet desktopEnabled: boolean = true;\nlet mobileEnabled: boolean = true;\nlet validateEmailConfig: boolean = true;\nlet validateTelConfig: boolean = true;\nlet showFooterConfig: boolean = true;\nlet loadCSSConfig: boolean = true;\n\n// activeMailgoType\nlet activeMailgoType: MailgoType;\n\n// modals global object\nlet modalMailto: HTMLElement, modalTel: HTMLElement;\n\n// mailgo general variables\nlet url: URL, href: string, lessSpamHref: string;\n\n// mailgo mail variables\nlet mail: string, cc: string, bcc: string, subject: string, bodyMail: string;\n\n// mailgo tel variables\nlet tel: string, msg: string, telegramUsername: string, skypeUsername: string;\n\n// the DOM elements\nlet title: HTMLElement,\n titleTel: HTMLElement,\n detailCc: HTMLElement,\n detailBcc: HTMLElement,\n detailSubject: HTMLElement,\n detailBody: HTMLElement,\n detailMsg: HTMLElement,\n ccValue: HTMLElement,\n bccValue: HTMLElement,\n subjectValue: HTMLElement,\n bodyValue: HTMLElement,\n msgValue: HTMLElement,\n activatedLink: HTMLElement;\n\n// mailgo buttons (actions)\nlet gmail: HTMLLinkElement,\n outlook: HTMLLinkElement,\n yahoo: HTMLLinkElement,\n open: HTMLLinkElement,\n telegram: HTMLLinkElement,\n wa: HTMLLinkElement,\n skype: HTMLLinkElement,\n call: HTMLLinkElement,\n copyMail: HTMLLinkElement,\n copyTel: HTMLLinkElement;\n\n/**\n * mailgoInit\n * the function that creates the mailgo elements in DOM\n */\nconst mailgoInit = (): void => {\n // set the boolean for mobile/desktop\n isMobile = userAgent() === MOBILE;\n\n // responsive settings\n {\n if (typeof config?.desktop !== \"undefined\") {\n desktopEnabled = config.desktop;\n // if it is a desktop and desktop is not enabled no init mailgo\n if (!isMobile && !desktopEnabled) {\n return;\n }\n }\n if (typeof config?.mobile !== \"undefined\") {\n mobileEnabled = config.mobile;\n // if it is a mobile and mobile is not enabled no init mailgo\n if (isMobile && !mobileEnabled) {\n return;\n }\n }\n }\n\n // set the mailgo language\n mailgoSetLanguage();\n\n // mailgo, if mailgo not already exists\n let mailgoExists = !!document.getElementById(MAILGO_MAIL);\n\n // if mailgo is enabled for mailto and it not exists in DOM\n if (mailtoEnabled && !mailgoExists) {\n // modal\n modalMailto = createElement() as HTMLElement;\n modalMailto.style.display = \"none\";\n modalMailto.id = MAILGO_MAIL;\n modalMailto.classList.add(\"m-modal\");\n modalMailto.setAttribute(\"role\", \"dialog\");\n modalMailto.setAttribute(\"tabindex\", \"-1\");\n modalMailto.setAttribute(\"aria-labelledby\", \"m-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalMailto.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalMailto.appendChild(modalContent);\n\n // title (email address)\n title = createElement(\"strong\");\n title.id = \"m-title\";\n title.className = \"m-title\";\n modalContent.appendChild(title);\n\n // details\n let details: HTMLElement = createElement();\n details.id = \"m-details\";\n details.className = \"m-details\";\n\n detailCc = createElement(pHTMLTag);\n detailCc.id = \"m-cc\";\n let ccSpan: HTMLElement = createElement(spanHTMLTag);\n ccSpan.className = \"w-500\";\n ccSpan.appendChild(createTextNode(strings.cc_ || defaultStrings.cc_));\n ccValue = createElement(spanHTMLTag);\n ccValue.id = \"m-cc-value\";\n detailCc.appendChild(ccSpan);\n detailCc.appendChild(ccValue);\n details.appendChild(detailCc);\n\n detailBcc = createElement(pHTMLTag);\n detailBcc.id = \"m-bcc\";\n let bccSpan: HTMLElement = createElement(spanHTMLTag);\n bccSpan.className = \"w-500\";\n bccSpan.appendChild(createTextNode(strings.bcc_ || defaultStrings.bcc_));\n bccValue = createElement(spanHTMLTag);\n bccValue.id = \"m-bcc-value\";\n detailBcc.appendChild(bccSpan);\n detailBcc.appendChild(bccValue);\n details.appendChild(detailBcc);\n\n detailSubject = createElement(pHTMLTag);\n detailSubject.id = \"m-subject\";\n let subjectSpan: HTMLElement = createElement(spanHTMLTag);\n subjectSpan.className = \"w-500\";\n subjectSpan.appendChild(\n createTextNode(strings.subject_ || defaultStrings.subject_)\n );\n subjectValue = createElement(spanHTMLTag);\n subjectValue.id = \"m-subject-value\";\n detailSubject.appendChild(subjectSpan);\n detailSubject.appendChild(subjectValue);\n details.appendChild(detailSubject);\n\n detailBody = createElement(pHTMLTag);\n detailBody.id = \"m-body\";\n let bodySpan: HTMLElement = createElement(spanHTMLTag);\n bodySpan.className = \"w-500\";\n bodySpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n bodyValue = createElement(spanHTMLTag);\n bodyValue.id = \"m-body-value\";\n detailBody.appendChild(bodySpan);\n detailBody.appendChild(bodyValue);\n details.appendChild(detailBody);\n\n modalContent.appendChild(details);\n\n // Gmail\n gmail = createElement(aHTMLTag) as HTMLLinkElement;\n gmail.id = \"m-gmail\";\n gmail.href = \"#mailgo-gmail\";\n gmail.classList.add(\"m-open\");\n gmail.classList.add(\"m-gmail\");\n gmail.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let gmailSpan: HTMLElement = createElement(spanHTMLTag);\n gmailSpan.className = \"w-500\";\n gmailSpan.appendChild(\n createTextNode(strings.gmail || defaultStrings.gmail)\n );\n gmail.appendChild(gmailSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"gmail\")) {\n modalContent.appendChild(gmail);\n }\n\n // Outlook\n outlook = createElement(aHTMLTag) as HTMLLinkElement;\n outlook.id = \"m-outlook\";\n outlook.href = \"#mailgo-outlook\";\n outlook.classList.add(\"m-open\");\n outlook.classList.add(\"m-outlook\");\n outlook.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let outlookSpan: HTMLElement = createElement(spanHTMLTag);\n outlookSpan.className = \"w-500\";\n outlookSpan.appendChild(\n createTextNode(strings.outlook || defaultStrings.outlook)\n );\n outlook.appendChild(outlookSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"outlook\")) {\n modalContent.appendChild(outlook);\n }\n\n // Outlook\n yahoo = createElement(aHTMLTag) as HTMLLinkElement;\n yahoo.id = \"m-yahoo\";\n yahoo.href = \"#mailgo-yahoo\";\n yahoo.classList.add(\"m-open\");\n yahoo.classList.add(\"m-yahoo\");\n yahoo.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let yahooSpan: HTMLElement = createElement(spanHTMLTag);\n yahooSpan.className = \"w-500\";\n yahooSpan.appendChild(\n createTextNode(strings.yahoo || defaultStrings.yahoo)\n );\n yahoo.appendChild(yahooSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"yahoo\")) {\n modalContent.appendChild(yahoo);\n }\n\n // open default\n open = createElement(aHTMLTag) as HTMLLinkElement;\n open.id = \"m-open\";\n open.href = \"#mailgo-open\";\n open.classList.add(\"m-open\");\n open.classList.add(\"m-default\");\n let openSpan: HTMLElement = createElement(spanHTMLTag);\n openSpan.className = \"w-500\";\n openSpan.appendChild(createTextNode(strings.open || defaultStrings.open));\n open.appendChild(openSpan);\n open.appendChild(\n createTextNode(strings._default || defaultStrings._default)\n );\n\n modalContent.appendChild(open);\n\n // copy\n copyMail = createElement(aHTMLTag) as HTMLLinkElement;\n copyMail.id = \"m-copy\";\n copyMail.href = \"#mailgo-copy\";\n copyMail.classList.add(\"m-copy\");\n copyMail.classList.add(\"w-500\");\n copyMail.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyMail);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalMailto);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // mailgo tel, if mailgo-tel not already exists\n let mailgoTelExists = !!document.getElementById(MAILGO_TEL);\n\n // if mailgo is enabled for tel/callto and it not exists in DOM\n if (telEnabled && !mailgoTelExists) {\n // modal\n modalTel = createElement() as HTMLElement;\n modalTel.style.display = \"none\";\n modalTel.id = MAILGO_TEL;\n modalTel.classList.add(\"m-modal\");\n modalTel.setAttribute(\"role\", \"dialog\");\n modalTel.setAttribute(\"tabindex\", \"-1\");\n modalTel.setAttribute(\"aria-labelledby\", \"m-tel-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalTel.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalTel.appendChild(modalContent);\n\n // title (telephone number)\n titleTel = createElement(\"strong\");\n titleTel.id = \"m-tel-title\";\n titleTel.className = \"m-title\";\n modalContent.appendChild(titleTel);\n\n // details\n let detailsTel: HTMLElement = createElement();\n detailsTel.id = \"m-tel-details\";\n detailsTel.className = \"m-details\";\n\n detailMsg = createElement(pHTMLTag);\n detailMsg.id = \"m-msg\";\n let msgSpan: HTMLElement = createElement(spanHTMLTag);\n msgSpan.className = \"w-500\";\n msgSpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n msgValue = createElement(spanHTMLTag);\n msgValue.id = \"m-msg-value\";\n detailMsg.appendChild(msgSpan);\n detailMsg.appendChild(msgValue);\n detailsTel.appendChild(detailMsg);\n\n modalContent.appendChild(detailsTel);\n\n // Telegram\n telegram = createElement(aHTMLTag) as HTMLLinkElement;\n telegram.id = \"m-tg\";\n telegram.href = \"#mailgo-telegram\";\n telegram.classList.add(\"m-open\");\n telegram.classList.add(\"m-tg\");\n\n // by default not display\n telegram.style.display = \"none\";\n\n telegram.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let telegramSpan: HTMLElement = createElement(spanHTMLTag);\n telegramSpan.className = \"w-500\";\n telegramSpan.appendChild(\n createTextNode(strings.telegram || defaultStrings.telegram)\n );\n telegram.appendChild(telegramSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"telegram\")) {\n modalContent.appendChild(telegram);\n }\n\n // WhatsApp\n wa = createElement(aHTMLTag) as HTMLLinkElement;\n wa.id = \"m-wa\";\n wa.href = \"#mailgo-whatsapp\";\n wa.classList.add(\"m-open\");\n wa.classList.add(\"m-wa\");\n wa.appendChild(createTextNode(strings.open_in_ || defaultStrings.open_in_));\n let waSpan: HTMLElement = createElement(spanHTMLTag);\n waSpan.className = \"w-500\";\n waSpan.appendChild(\n createTextNode(strings.whatsapp || defaultStrings.whatsapp)\n );\n wa.appendChild(waSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"whatsapp\")) {\n modalContent.appendChild(wa);\n }\n\n // Skype\n skype = createElement(aHTMLTag) as HTMLLinkElement;\n skype.id = \"m-skype\";\n skype.href = \"#mailgo-skype\";\n skype.classList.add(\"m-open\");\n skype.classList.add(\"m-skype\");\n skype.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let skypeSpan: HTMLElement = createElement(spanHTMLTag);\n skypeSpan.className = \"w-500\";\n skypeSpan.appendChild(\n createTextNode(strings.skype || defaultStrings.skype)\n );\n skype.appendChild(skypeSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"skype\")) {\n modalContent.appendChild(skype);\n }\n\n // call default\n call = createElement(aHTMLTag) as HTMLLinkElement;\n call.id = \"m-call\";\n call.href = \"#mailgo-open\";\n call.classList.add(\"m-open\");\n call.classList.add(\"m-default\");\n let callSpan: HTMLElement = createElement(spanHTMLTag);\n callSpan.className = \"w-500\";\n callSpan.appendChild(createTextNode(strings.call || defaultStrings.call));\n call.appendChild(callSpan);\n call.appendChild(\n createTextNode(strings._as_default || defaultStrings._as_default)\n );\n\n modalContent.appendChild(call);\n\n // copy\n copyTel = createElement(aHTMLTag) as HTMLLinkElement;\n copyTel.id = \"m-tel-copy\";\n copyTel.href = \"#mailgo-copy\";\n copyTel.classList.add(\"m-copy\");\n copyTel.classList.add(\"w-500\");\n copyTel.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyTel);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalTel);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // event listener on body, if the element is mailgo-compatible the mailgo modal will be rendered\n document.addEventListener(\"click\", mailgoClickListener);\n};\n\n/**\n * mailgoClickListener\n * function to check if an element is mailgo-enabled or not referencing to\n * mail:\n * document.querySelectorAll(\n * 'a[href^=\"mailto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * tel:\n * document.querySelectorAll(\n * 'a[href^=\"tel:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"callto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"sms:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n */\nfunction mailgoClickListener(event: Event): boolean {\n // check if the mailgo HTML exists in the body\n if (\n !document.body.contains(modalMailto) &&\n !document.body.contains(modalTel)\n ) {\n return false;\n }\n\n // if a mailgo is already showing do nothing\n if (mailgoIsShowing()) {\n return false;\n }\n\n // the path of the event\n let path =\n (event.composedPath && event.composedPath()) ||\n composedPath(event.target as HTMLElement);\n\n if (path) {\n path.forEach((element: HTMLElement) => {\n if (element instanceof HTMLDocument || element instanceof Window) {\n return false;\n }\n\n // go here only if one of the mailgo modals are enabled\n if (mailtoEnabled || telEnabled || smsEnabled) {\n let localMailgoType = getMailgoTypeByElement(element);\n\n // go on if the localMailgoType is not null\n if (localMailgoType) {\n // set the active mailgo type\n activeMailgoType = localMailgoType;\n\n let activeMailgoModalType = activeMailgoType?.type;\n\n if (activeMailgoModalType) {\n // check if the setting is enabled and if so go with pre-render\n if (\n (mailtoEnabled && activeMailgoModalType === MAILGO_MAIL) ||\n (telEnabled && activeMailgoModalType === MAILGO_TEL) ||\n (smsEnabled && activeMailgoModalType === MAILGO_SMS)\n ) {\n // stop the normal execution of the element click\n event.preventDefault();\n\n // render mailgo\n mailgoPreRender(element as HTMLLinkElement);\n\n return true;\n }\n }\n }\n }\n });\n }\n\n return false;\n}\n\n/**\n * mailgoPreRender\n * function to pre-render a mailgo, it helps populating elements needed by modal\n */\nfunction mailgoPreRender(\n mailgoElementOrUrl: HTMLLinkElement | string\n): boolean {\n let mailgoElement: HTMLLinkElement;\n\n // get the type and installation from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if type is not defined return\n if (!type) return false;\n\n if (typeof mailgoElementOrUrl === \"string\") {\n // if the parameter is a string it is the url\n href = mailgoElementOrUrl as string;\n } else {\n // if the paramenter is an HTMLLinkElement get the href attribute and the element\n href = mailgoElementOrUrl.getAttribute(\"href\") as string;\n mailgoElement = mailgoElementOrUrl as HTMLLinkElement;\n }\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // if the installation is classic\n if (installation === CLASSIC) {\n if (validateUrl(href, MAILTO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILTO)[1].trim());\n } else if (validateUrl(href, MAILGO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILGO)[1].trim());\n }\n\n try {\n url = new URL(href);\n\n let urlParams: URLSearchParams = url.searchParams;\n // optional parameters for the email\n cc = urlParams.get(\"cc\");\n bcc = urlParams.get(\"bcc\");\n subject = urlParams.get(\"subject\");\n bodyMail = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam\n // mail = data-address + @ + data-domain\n mail =\n mailgoElement.getAttribute(\"data-address\") &&\n mailgoElement.getAttribute(\"data-domain\")\n ? mailgoElement.getAttribute(\"data-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-domain\")\n : null;\n\n try {\n url = new URL(MAILTO + encodeURIComponent(mail));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // cc = data-cc-address + @ + data-cc-domain\n cc = mailgoElement.getAttribute(\"data-cc-address\")\n ? mailgoElement.getAttribute(\"data-cc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-cc-domain\")\n : null;\n\n // if cc is defined add it to parameters\n if (cc) parameters.push(\"cc=\" + cc);\n\n // bcc = data-bcc-address + @ + data-bcc-domain\n bcc = mailgoElement.getAttribute(\"data-bcc-address\")\n ? mailgoElement.getAttribute(\"data-bcc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-bcc-domain\")\n : null;\n\n // if bcc is defined add it to parameters\n if (bcc) parameters.push(\"bcc=\" + bcc);\n\n // subject = data-subject\n subject = mailgoElement.getAttribute(\"data-subject\");\n\n // if subject is defined add it to parameters\n if (subject) parameters.push(\"subject=\" + subject);\n\n // body = data-body\n bodyMail = mailgoElement.getAttribute(\"data-body\");\n\n // if body is defined add it to parameters\n if (bodyMail) parameters.push(\"body=\" + bodyMail);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n MAILTO + encodeURIComponent(mail),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateEmail !== \"undefined\") {\n validateEmailConfig = config.validateEmail;\n }\n\n if (validateEmailConfig) {\n // validate the email address\n if (!validateEmails(mail.split(\",\"))) {\n return false;\n }\n\n // if cc, bcc are not valid cc, bcc = \"\"\n if (cc && !validateEmails(cc.split(\",\"))) cc = \"\";\n if (bcc && !validateEmails(bcc.split(\",\"))) bcc = \"\";\n }\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n if (installation === CLASSIC) {\n if (validateUrl(href, TEL)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(TEL)[1].trim());\n } else if (validateUrl(href, CALLTO)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(CALLTO)[1].trim());\n } else if (validateUrl(href, SMS)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(SMS)[1].trim());\n }\n\n try {\n url = new URL(href);\n let urlParams: URLSearchParams = url.searchParams;\n\n // optional parameters for the phone number\n msg = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation == LESS_SPAM) {\n tel = mailgoElement.getAttribute(\"data-tel\");\n msg = mailgoElement.getAttribute(\"data-msg\");\n\n try {\n url = new URL(TEL + encodeURIComponent(tel));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // if msg is defined add it to parameters\n if (msg) parameters.push(\"body=\" + msg);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n TEL + encodeURIComponent(tel),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateTel !== \"undefined\") {\n validateTelConfig = config.validateTel;\n }\n\n // validate the phone number\n if (validateTelConfig) {\n if (!validateTel(tel)) return;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-telegram\")) {\n telegramUsername = mailgoElement.getAttribute(\"data-telegram\");\n } else {\n telegramUsername = null;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-skype\")) {\n skypeUsername = mailgoElement.getAttribute(\"data-skype\");\n } else {\n skypeUsername = null;\n }\n }\n\n // if dark is in config or contained in the element\n if (\n mailgoElement &&\n (config?.dark || mailgoElement.classList.contains(\"dark\"))\n ) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // render mailgo\n mailgoRender();\n\n return true;\n}\n\n/**\n * mailgoDirectRender\n * function to render a mailgo directly from a URL\n */\nfunction mailgoDirectRender(directUrl: string): boolean {\n // start mailgo\n mailgo();\n\n if (validateUrl(directUrl, MAILTO) || validateUrl(directUrl, MAILGO)) {\n activeMailgoType = {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n } else if (\n validateUrl(directUrl, TEL) ||\n validateUrl(directUrl, CALLTO) ||\n validateUrl(directUrl, SMS)\n ) {\n activeMailgoType = {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n }\n return false;\n}\n\n/**\n * mailgoRender\n * function to render a mailgo (mail or tel)\n */\nfunction mailgoRender(): boolean {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n\n // if type is not defined return\n if (!type) return false;\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // the title of the modal (email address)\n title.innerHTML = mail.split(\",\").join(\"
\");\n\n // add the details if provided\n if (mailgoConfigAttributeEnabled(\"detail\", \"cc\") && cc) {\n detailCc.style.display = \"block\";\n ccValue.innerHTML = cc.split(\",\").join(\"
\");\n } else {\n detailCc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"bcc\") && bcc) {\n detailBcc.style.display = \"block\";\n bccValue.innerHTML = bcc.split(\",\").join(\"
\");\n } else {\n detailBcc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"subject\") && subject) {\n detailSubject.style.display = \"block\";\n subjectValue.textContent = subject;\n } else {\n detailSubject.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"body\") && bodyMail) {\n detailBody.style.display = \"block\";\n bodyValue.textContent = bodyMail;\n } else {\n detailBody.style.display = \"none\";\n }\n\n // add the actions\n gmail.addEventListener(\"click\", openGmail);\n\n outlook.addEventListener(\"click\", openOutlook);\n\n yahoo.addEventListener(\"click\", openYahooMail);\n\n open.addEventListener(\"click\", openDefault);\n\n copyMail.addEventListener(\"click\", copy);\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n // the title of the modal (tel)\n titleTel.innerHTML = tel;\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"msg\") && msg) {\n detailMsg.style.display = \"block\";\n msgValue.textContent = msg;\n } else {\n detailMsg.style.display = \"none\";\n }\n\n // add the actions to buttons\n wa.addEventListener(\"click\", openWhatsApp);\n\n // telegram must be shown only if data-telegram is provided\n if (telegramUsername) {\n document.getElementById(\"m-tg\").style.display = \"block\";\n telegram.addEventListener(\"click\", openTelegram);\n } else {\n document.getElementById(\"m-tg\").style.display = \"none\";\n }\n\n skype.addEventListener(\"click\", openSkype);\n\n call.addEventListener(\"click\", openDefault);\n\n copyTel.addEventListener(\"click\", copy);\n }\n\n // show the mailgo\n showMailgo(type);\n\n // add listener keyDown\n document.addEventListener(\"keydown\", mailgoKeydown);\n\n return true;\n}\n\n// actions\nconst openGmail = (event?: Event): void => {\n event.preventDefault();\n\n let urlString: string;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n if (installation === CLASSIC) {\n try {\n urlString = url.toString();\n } catch (e) {\n urlString = href;\n }\n } else if (installation === LESS_SPAM) {\n urlString = lessSpamHref;\n }\n\n // Gmail url\n let gmailUrl: string =\n \"https://mail.google.com/mail/?extsrc=mailto&url=\" +\n encodeURIComponent(urlString);\n\n // open the link\n window.open(gmailUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openOutlook = (event?: Event): void => {\n event.preventDefault();\n\n // Outlook starting url\n let startingOutlookUrl: string =\n \"https://outlook.live.com/owa/?path=/mail/action/compose&to=\";\n\n // let the user to decide to open Office365 Outlook instead of the classic outlook.live.com\n if (config?.office365) {\n startingOutlookUrl =\n \"https://outlook.office365.com/owa/?path=/mail/action/compose&to=\";\n }\n\n // Outlook url\n let outlookUrl: string = startingOutlookUrl + encodeURIComponent(mail);\n\n // the details if provided\n if (subject) {\n outlookUrl = outlookUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n\n if (bodyMail) {\n outlookUrl = outlookUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(outlookUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openYahooMail = (event?: Event): void => {\n event.preventDefault();\n\n // Yahoo url\n let yahooUrl: string = \"https://compose.mail.yahoo.com/?to=\" + mail;\n\n // the details if provided\n if (subject) {\n yahooUrl = yahooUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n if (bodyMail) {\n yahooUrl = yahooUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(yahooUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openTelegram = (event?: Event): void => {\n event.preventDefault();\n\n // check if telegramUsername exists\n if (telegramUsername) {\n // Telegram url\n let tgUrl: string = \"https://t.me/\" + encodeURIComponent(telegramUsername);\n\n // open the url\n window.open(tgUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n }\n};\n\nconst openSkype = (event?: Event): void => {\n event.preventDefault();\n\n let skype: string = skypeUsername || tel;\n\n // Telegram url\n let skypeUrl: string = \"skype:\" + encodeURIComponent(skype);\n\n // open the url\n window.open(skypeUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openWhatsApp = (event?: Event): void => {\n event.preventDefault();\n\n // WhatsApp API doesn't work with non number digits and leading 0s: https://faq.whatsapp.com/general/chats/how-to-use-click-to-chat/\n let whatappTel = tel.replace(notNumber, \"\").replace(leadingZeros, \"\");\n\n // WhatsApp url\n let waUrl: string = \"https://wa.me/\" + encodeURIComponent(whatappTel);\n\n // the details if provided\n if (msg) {\n waUrl = waUrl.concat(\"?text=\" + encodeURIComponent(msg));\n }\n\n // open the url\n window.open(waUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openDefault = (event?: Event): void => {\n event.preventDefault();\n\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if the installation is classic the browser can follow the default behaviour\n if (installation === CLASSIC) {\n window.location.href = href;\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam use the built less-spam href\n window.location.href = lessSpamHref;\n }\n\n hideMailgo();\n};\n\nconst copy = (event?: Event): void => {\n event.preventDefault();\n\n // the correct copyButton (mail or tel)\n if (mailgoIsShowing()) {\n let activeCopy: HTMLElement;\n\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n // in case it is showing mail modal copy email address\n copyToClipboard(mail);\n activeCopy = copyMail;\n } else {\n // in case it is showing tel modal copy phone number\n copyToClipboard(tel);\n activeCopy = copyTel;\n }\n\n activeCopy.textContent = strings.copied || defaultStrings.copied;\n setTimeout(() => {\n activeCopy.textContent = strings.copy || defaultStrings.copy;\n // hide after the timeout\n hideMailgo();\n }, 999);\n }\n};\n\n// function to find if a link is a mailto, tel, callto or sms\nconst validateUrl = (url: string, type: string = MAILTO) => {\n let regexValidate = new RegExp(\"^\" + type + \"((.)+)\", \"gi\");\n return regexValidate.test(url);\n};\n\n// function that returns if an element is a mailgo\nfunction getMailgoTypeByElement(element: HTMLElement): MailgoType | null {\n let elementHref: string = (element as HTMLLinkElement).getAttribute(\"href\");\n\n // return null if there is no-mailgo in class\n if (element.classList?.contains(NO_MAILGO)) {\n return null;\n }\n\n // the case of classic type of mailgo, like a href=mailto:... or a href=tel:... and the class=mailgo with a useful href\n if (elementHref || element.classList?.contains(\"mailgo\")) {\n if (validateUrl(elementHref, MAILTO) || validateUrl(elementHref, MAILGO)) {\n // a mailto: or mailgo:\n return {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n } else if (\n validateUrl(elementHref, TEL) ||\n validateUrl(elementHref, CALLTO)\n ) {\n // a tel: or callto:\n return {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n } else if (validateUrl(elementHref, SMS)) {\n // a sms:\n return {\n type: MAILGO_SMS,\n installation: CLASSIC,\n };\n }\n }\n\n if (elementHref === \"#mailgo\" || element.classList?.contains(\"mailgo\")) {\n // less-spam installation of mailgo, check to the attributes\n if (\n element.hasAttribute(\"data-address\") &&\n element.hasAttribute(\"data-domain\")\n ) {\n // less-spam mailto with data-address and data-domain\n return {\n type: MAILGO_MAIL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-tel\")) {\n // less-spam tel with data-tel\n return {\n type: MAILGO_TEL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-msg\")) {\n // less-spam sms with data-msd\n return {\n type: MAILGO_SMS,\n installation: LESS_SPAM,\n };\n }\n }\n\n return null;\n}\n\n/**\n * mailgoKeydown\n * function to manage the keydown event when the modal is showing, return a boolean that represents if a useful key has been pressed\n */\nconst mailgoKeydown = (keyboardEvent: KeyboardEvent): boolean => {\n // if mailgo is showing\n if (mailgoIsShowing()) {\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 71:\n // g -> open GMail\n openGmail();\n return true;\n case 79:\n // o -> open Outlook\n openOutlook();\n return true;\n case 89:\n // y -> open Yahoo Mail\n openYahooMail();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n } else if (type === MAILGO_TEL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 84:\n // t -> open Telegram\n openTelegram();\n return true;\n case 87:\n // w -> open WhatsApp\n openWhatsApp();\n return true;\n case 83:\n // s -> open Skype\n openSkype();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n }\n }\n return false;\n};\n\n// show the modal\nconst showMailgo = (type: MailgoModalType): void => {\n // show the correct modal\n setModalDisplay(type, \"flex\");\n};\n\n// hide the modal\nconst hideMailgo = (): void => {\n // hide all the modals\n setModalDisplay(MAILGO_MAIL, \"none\");\n setModalDisplay(MAILGO_TEL, \"none\");\n\n // remove listener keyDown\n document.removeEventListener(\"keydown\", mailgoKeydown);\n};\n\n// is the mailgo modal hidden?\nconst mailgoIsShowing = (): boolean => {\n return (\n (mailtoEnabled && getModalDisplay(MAILGO_MAIL) === \"flex\") ||\n ((telEnabled || smsEnabled) && getModalDisplay(MAILGO_TEL) === \"flex\")\n );\n};\n\nconst byElement = (): HTMLLinkElement => {\n // by element in the footer\n let by: HTMLLinkElement = createElement(aHTMLTag) as HTMLLinkElement;\n by.href = \"https://mailgo.dev?ref=mailgo-modal\";\n by.className = \"m-by\";\n by.target = \"_blank\";\n by.rel = \"noopener noreferrer\";\n by.appendChild(createTextNode(\"mailgo.dev\"));\n\n return by;\n};\n\n// create element\nconst createElement = (element: string = \"div\"): HTMLElement =>\n document.createElement(element);\n\n// create text node\nconst createTextNode = (element: string): Text =>\n document.createTextNode(element);\n\n// get the correct HTMLElement from a type\nconst getModalHTMLElement = (type: MailgoModalType = MAILGO_MAIL) => {\n if (type === MAILGO_TEL) {\n return modalTel;\n } else {\n return modalMailto;\n }\n};\n\n// get display value\nconst getModalDisplay = (ref: MailgoModalType = MAILGO_MAIL): string =>\n getModalHTMLElement(ref).style.display;\n\n// set display value\nconst setModalDisplay = (\n ref: MailgoModalType = MAILGO_MAIL,\n value: string\n): void => {\n let modal = getModalHTMLElement(ref);\n\n if (modal) {\n modal.style.display = value;\n\n if (value === \"flex\") {\n // \"save\" the activated link.\n activatedLink = document.activeElement as HTMLElement;\n modal.setAttribute(\"aria-hidden\", \"false\");\n\n // Focus on the modal container.\n modal.setAttribute(\"tabindex\", \"0\");\n modal.focus();\n setFocusLoop(modal);\n } else {\n modal.setAttribute(\"aria-hidden\", \"true\");\n\n // focus back the activated link for getting back to the context.\n modal.setAttribute(\"tabindex\", \"-1\");\n activatedLink.focus();\n }\n }\n};\n\n// enable dark mode\nconst enableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.add(\"m-dark\");\n }\n};\n\n// disable dark mode\nconst disableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.remove(\"m-dark\");\n }\n};\n\n// custom composedPath if path or event.composedPath() are not defined\nconst composedPath = (\n el: HTMLElement\n): (HTMLElement | Document | (Window & typeof globalThis))[] => {\n let path = [];\n\n while (el) {\n path.push(el);\n\n if (el.tagName === \"HTML\") {\n path.push(document);\n path.push(window);\n return path;\n }\n\n el = el.parentElement;\n }\n};\n\n// function to recreate a mailto: or tel: href from less-spam\nconst buildLessSpamHref = (type: string, parameters: string[]): string => {\n lessSpamHref = type;\n if (parameters && parameters.length > 0) {\n let joinedParams = parameters.join(\"&\");\n lessSpamHref = lessSpamHref.concat(\"?\" + joinedParams);\n }\n return lessSpamHref;\n};\n\n// function to check an attribute is enabled or not, by default considering it enabled\nconst mailgoConfigAttributeEnabled = (\n type: \"action\" | \"detail\",\n attribute: MailgoAction | MailgoDetail\n): boolean => {\n // by default all the actions and attribute are enabled\n if (!config) {\n return true;\n }\n\n if (config && !config?.actions) {\n return true;\n }\n\n // if the attribute type is action consider the actions config attribute\n if (type === \"action\") {\n if (\n config &&\n config.actions &&\n config?.actions[attribute as MailgoAction] === false\n ) {\n return false;\n }\n } else if (type === \"detail\") {\n // else consider the details attribute\n if (\n config &&\n config.details &&\n config?.details[attribute as MailgoDetail] === false\n ) {\n return false;\n }\n }\n\n return true;\n};\n\n// manage the language of mailgo\nconst mailgoSetLanguage = (): string => {\n let languageType = \"default lang\";\n\n // if a language is defined in configuration use it\n if (\n config?.lang &&\n (languages as MailgoLanguages).indexOf(config.lang) !== -1\n ) {\n lang = config.lang;\n languageType = \"config lang\";\n } else {\n // else if is defined use it!\n // keep the lang from html\n let htmlLang: string = document.documentElement.lang;\n\n // find the correct language using the lang attribute, not just a === because there a are cases like fr-FR or fr_FR in html lang attribute\n (languages as MailgoLanguages).forEach((language: any) => {\n if (new RegExp(\"^\" + language, \"gi\").test(htmlLang)) {\n lang = language;\n languageType = \"html lang\";\n }\n });\n }\n\n // strings\n strings = (translations as MailgoTranslations)[lang];\n\n return languageType;\n};\n\nconst mailgoStyle = (): void => {\n if (!document.getElementById(\"mailgo-style\")) {\n // mailgo style\n let mailgoCSSElement: HTMLStyleElement = createElement(\n \"style\"\n ) as HTMLStyleElement;\n mailgoCSSElement.id = \"mailgo-style\";\n mailgoCSSElement.type = \"text/css\";\n mailgoCSSElement.appendChild(createTextNode(mailgoCSS));\n document.head.appendChild(mailgoCSSElement);\n }\n};\n\n// mailgo\nfunction mailgo(mailgoConfig?: MailgoConfig): boolean {\n try {\n // polyfill mailgo\n // mailgoPolyfill();\n\n // set the global config merging window mailgConfig and mailgoConfig passed as a parameter\n config = { ...mailgoConfig, ...((window as any)?.mailgoConfig || null) };\n\n // if the window is defined...\n if (typeof window !== \"undefined\") {\n // if is set in config use it (load the mailgo CSS)\n if (typeof config?.loadCSS !== \"undefined\") {\n loadCSSConfig = config.loadCSS;\n }\n\n // if is set in config use it (enable mailto)\n if (typeof config?.mailto !== \"undefined\") {\n mailtoEnabled = config.mailto;\n }\n\n // if is set in config use it (enable tel)\n if (typeof config?.tel !== \"undefined\") {\n telEnabled = config.tel;\n }\n\n // if is set in config use it (enable sms)\n if (typeof config?.sms !== \"undefined\") {\n smsEnabled = config.sms;\n }\n\n // if load css enabled load it!\n if (loadCSSConfig) {\n // add the style for mailgo\n mailgoStyle();\n }\n\n // if is set an initEvent add the listener\n if (config?.initEvent) {\n if (config?.listenerOptions) {\n // listener options specified\n document.addEventListener(\n config.initEvent,\n mailgoInit,\n config.listenerOptions\n );\n } else {\n // no listener options\n document.addEventListener(config.initEvent, mailgoInit);\n }\n } else {\n mailgoInit();\n }\n\n return true;\n }\n } catch (error) {\n console.log(error);\n }\n return false;\n}\n\n// define the methods also for window element\nif (typeof window !== \"undefined\") {\n (window as any).getMailgoTypeByElement = getMailgoTypeByElement;\n (window as any).mailgoClickListener = mailgoClickListener;\n (window as any).mailgoCheckRender = mailgoClickListener; // for compatibility with old version of mailgo\n (window as any).mailgoPreRender = mailgoPreRender;\n (window as any).mailgoDirectRender = mailgoDirectRender;\n (window as any).mailgoRender = mailgoRender;\n (window as any).mailgo = mailgo;\n}\n\nexport {\n getMailgoTypeByElement,\n mailgoClickListener,\n mailgoPreRender,\n mailgoDirectRender,\n mailgoRender,\n};\n\nexport default mailgo;\n","// webpack > lib/mailgo.js\n\nimport mailgo, {\n getMailgoTypeByElement,\n mailgoClickListener,\n mailgoPreRender,\n mailgoDirectRender,\n mailgoRender,\n} from \"../src/mailgo\";\n\n// start function\nconst start = mailgo;\n\n// compatibility with old version of mailgo\nconst mailgoCheckRender = mailgoClickListener;\n\nexport {\n getMailgoTypeByElement,\n mailgoClickListener,\n mailgoCheckRender,\n mailgoPreRender,\n mailgoDirectRender,\n mailgoRender,\n mailgo,\n start,\n};\n\nexport default mailgo;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(507);\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://mailgo/webpack/universalModuleDefinition","webpack://mailgo/../src/mailgo.scss","webpack://mailgo/../node_modules/css-loader/dist/runtime/api.js","webpack://mailgo/../src/mailgo.scss?81f2","webpack://mailgo/../src/constants.ts","webpack://mailgo/../src/utils.ts","webpack://mailgo/../src/mobile-detect.ts","webpack://mailgo/../src/mailgo.ts","webpack://mailgo/./mailgo.lib.ts","webpack://mailgo/webpack/bootstrap","webpack://mailgo/webpack/runtime/define property getters","webpack://mailgo/webpack/runtime/hasOwnProperty shorthand","webpack://mailgo/webpack/runtime/make namespace object","webpack://mailgo/webpack/startup"],"names":["MAILTO","MAILGO","TEL","CALLTO","SMS","outlookDeepLink","NO_MAILGO","DESKTOP","MOBILE","MAILGO_MAIL","MAILGO_TEL","MAILGO_SMS","CLASSIC","LESS_SPAM","spanHTMLTag","aHTMLTag","pHTMLTag","defaultLang","notNumber","RegExp","leadingZeros","validateEmail","email","test","validateEmails","arr","every","validateTel","tel","copyToClipboard","str","el","document","createElement","value","setAttribute","style","position","left","body","appendChild","selected","getSelection","rangeCount","getRangeAt","select","execCommand","removeChild","removeAllRanges","addRange","setFocusLoop","ref","modal","querySelector","addEventListener","leaveLastLink","leaveFirstLink","e","code","shiftKey","preventDefault","target","closest","focus","userAgent","navigator","mailgoCSS","require","lang","defaultStrings","translations","strings","config","isMobile","mailtoEnabled","telEnabled","smsEnabled","desktopEnabled","mobileEnabled","validateEmailConfig","validateTelConfig","showFooterConfig","loadCSSConfig","activeMailgoType","modalMailto","modalTel","url","href","lessSpamHref","mail","cc","bcc","subject","bodyMail","msg","telegramUsername","skypeUsername","title","titleTel","detailCc","detailBcc","detailSubject","detailBody","detailMsg","ccValue","bccValue","subjectValue","bodyValue","msgValue","activatedLink","gmail","outlook","yahoo","open","telegram","wa","skype","call","copyMail","copyTel","mailgoInit","desktop","mobile","mailgoSetLanguage","mailgoExists","getElementById","display","id","classList","add","dark","enableDarkMode","disableDarkMode","modalBackground","className","modalContent","details","ccSpan","createTextNode","cc_","bccSpan","bcc_","subjectSpan","subject_","bodySpan","body_","open_in_","gmailSpan","mailgoConfigAttributeEnabled","outlookSpan","yahooSpan","openSpan","_default","copy","showFooter","byElement","hideMailgo","mailgoTelExists","detailsTel","msgSpan","telegramSpan","waSpan","whatsapp","skypeSpan","callSpan","_as_default","mailgoClickListener","event","contains","mailgoIsShowing","path","composedPath","forEach","element","HTMLDocument","Window","localMailgoType","getMailgoTypeByElement","activeMailgoModalType","type","mailgoPreRender","mailgoElementOrUrl","mailgoElement","installation","getAttribute","validateUrl","decodeURIComponent","split","trim","URL","urlParams","searchParams","get","error","console","log","encodeURIComponent","parameters","push","buildLessSpamHref","hasAttribute","mailgoRender","mailgoDirectRender","directUrl","mailgo","innerHTML","join","textContent","openGmail","openOutlook","openYahooMail","openDefault","openWhatsApp","openTelegram","openSkype","showMailgo","mailgoKeydown","urlString","toString","gmailUrl","window","startingOutlookUrl","office365","outlookUrl","concat","yahooUrl","tgUrl","skypeUrl","whatappTel","replace","waUrl","location","activeCopy","copied","setTimeout","regexValidate","elementHref","keyboardEvent","keyCode","setModalDisplay","removeEventListener","getModalDisplay","by","rel","getModalHTMLElement","activeElement","remove","tagName","parentElement","length","joinedParams","attribute","actions","languageType","languages","htmlLang","documentElement","language","mailgoStyle","mailgoCSSElement","head","mailgoConfig","loadCSS","mailto","sms","initEvent","listenerOptions","mailgoCheckRender"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;ACVA;AACA,kCAAkC,mBAAO,CAAC,GAAgD;AAC1F,sEAAsE,YAAY;AAClF;AACA,mDAAmD,eAAe,MAAM,QAAQ,SAAS,OAAO,uBAAuB,mBAAmB,sBAAsB,gBAAgB,iBAAiB,cAAc,oDAAoD,SAAS,UAAU,eAAe,cA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ACsB,gBAAT,CAA0BkB,MAAM,CAACiM,SAAjC,EAA4CjJ,UAA5C;AACD;AACF,OAZD,MAYO;AACLA,kBAAU;AACX;;AAED,aAAO,IAAP;AACD;AACF,GAtDD,CAsDE,OAAOyE,KAAP,EAAc;AACdC,WAAO,CAACC,GAAR,CAAYF,KAAZ;AACD;;AACD,SAAO,KAAP;AACD,C,CAED;;;AACA,IAAI,OAAO2B,MAAP,KAAkB,WAAtB,EAAmC;AAChCA,QAAD,CAAgB3C,sBAAhB,GAAyCA,sBAAzC;AACC2C,QAAD,CAAgBtD,mBAAhB,GAAsCA,mBAAtC;AACCsD,QAAD,CAAgB+C,iBAAhB,GAAoCrG,mBAApC,CAHiC,CAGwB;;AACxDsD,QAAD,CAAgBxC,eAAhB,GAAkCA,eAAlC;AACCwC,QAAD,CAAgBlB,kBAAhB,GAAqCA,kBAArC;AACCkB,QAAD,CAAgBnB,YAAhB,GAA+BA,YAA/B;AACCmB,QAAD,CAAgBhB,MAAhB,GAAyBA,MAAzB;AACD;;AAED;AAQA,+CAAeA,MAAf,E;;AC5gDA;;AAQuB;;AAEvB;AACA,cAAc,UAAM;;AAEpB;AACA,0BAA0B,mBAAmB;;AAW3C;;AAEF,+CAAe,UAAM,EAAC;;;;;;;UC3BtB;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCrBA;WACA;WACA;WACA;WACA,wCAAwC,yCAAyC;WACjF;WACA;WACA,E;;;;;WCPA,6CAA6C,wDAAwD,E;;;;;WCArG;WACA;WACA;WACA,sDAAsD,kBAAkB;WACxE;WACA,+CAA+C,cAAc;WAC7D,E;;;;UCNA;UACA;UACA;UACA","file":"mailgo.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"mailgo\"] = factory();\n\telse\n\t\troot[\"mailgo\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn ","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../node_modules/css-loader/dist/runtime/api.js\");\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(function(i){return i[1]});\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".m-modal{position:fixed;top:0;right:0;bottom:0;left:0;justify-content:center;align-items:center;flex-direction:column;overflow:hidden;font-size:16.5px;z-index:10000}.m-modal p,.m-modal span,.m-modal strong,.m-modal a{margin:0;padding:0;font-size:100%;line-height:1;font-family:-apple-system,BlinkMacSystemFont,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\",\\\"Segoe UI Symbol\\\";text-rendering:optimizeLegibility}.m-modal strong{font-weight:700}.m-modal .m-modal-back{position:absolute;z-index:10001;top:0;right:0;bottom:0;left:0;background-color:#20232a;opacity:.8}.m-modal .m-modal-content{position:relative;z-index:10002;box-sizing:content-box;text-align:center;min-width:200px;max-width:240px;background-color:#fff;opacity:.95;border-radius:20px;box-shadow:0 3px 20px rgba(32,35,42,.5);color:#4a4a4a;display:flex;flex-direction:column;overflow:auto;padding:24px;transition:.5s box-shadow}.m-modal .m-modal-content:hover,.m-modal .m-modal-content:focus,.m-modal .m-modal-content:active{opacity:1}.m-modal .m-modal-content .m-title{margin-bottom:8px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.2em}.m-modal .m-modal-content .m-details{margin-bottom:10px}.m-modal .m-modal-content .m-details p{font-size:12px;margin-top:3px;margin-bottom:3px}.m-modal .m-modal-content a{cursor:pointer;padding:10px;color:#4a4a4a;border-radius:20px;text-decoration:none}.m-modal .m-modal-content a.m-gmail{color:#c0372a}.m-modal .m-modal-content a.m-gmail:hover,.m-modal .m-modal-content a.m-gmail:focus,.m-modal .m-modal-content a.m-gmail:active{background-color:rgba(192,55,42,.08);color:#c0372a}.m-modal .m-modal-content a.m-outlook{color:#0967aa}.m-modal .m-modal-content a.m-outlook:hover,.m-modal .m-modal-content a.m-outlook:focus,.m-modal .m-modal-content a.m-outlook:active{background-color:rgba(9,103,170,.08);color:#0967aa}.m-modal .m-modal-content a.m-yahoo{color:#4a00a0}.m-modal .m-modal-content a.m-yahoo:hover,.m-modal .m-modal-content a.m-yahoo:focus,.m-modal .m-modal-content a.m-yahoo:active{background-color:rgba(74,0,160,.08);color:#4a00a0}.m-modal .m-modal-content a.m-tg{color:#086da0}.m-modal .m-modal-content a.m-tg:hover,.m-modal .m-modal-content a.m-tg:focus,.m-modal .m-modal-content a.m-tg:active{background-color:rgba(8,109,160,.08);color:#086da0}.m-modal .m-modal-content a.m-wa{color:#067466}.m-modal .m-modal-content a.m-wa:hover,.m-modal .m-modal-content a.m-wa:focus,.m-modal .m-modal-content a.m-wa:active{background-color:rgba(6,116,102,.08);color:#067466}.m-modal .m-modal-content a.m-skype{color:#076d92}.m-modal .m-modal-content a.m-skype:hover,.m-modal .m-modal-content a.m-skype:focus,.m-modal .m-modal-content a.m-skype:active{background-color:rgba(7,109,146,.08);color:#076d92}.m-modal .m-modal-content a.m-copy{padding:16px 10px;font-size:16px}.m-modal .m-modal-content a.m-default:hover,.m-modal .m-modal-content a.m-default:focus,.m-modal .m-modal-content a.m-default:active,.m-modal .m-modal-content a.m-copy:hover,.m-modal .m-modal-content a.m-copy:focus,.m-modal .m-modal-content a.m-copy:active{background-color:rgba(0,0,0,.08);color:#4a4a4a}.m-modal .m-modal-content a.m-by{font-size:12px;margin-top:.8rem;padding:5px;color:#4a4a4a}.m-modal .m-modal-content a.m-by:hover,.m-modal .m-modal-content a.m-by:focus,.m-modal .m-modal-content a.m-by:active{color:#3d3d3d}.m-modal .m-modal-content .w-500{font-weight:500}.m-modal.m-dark .m-modal-content{background-color:#20232a}.m-modal.m-dark .m-modal-content,.m-modal.m-dark .m-modal-content p,.m-modal.m-dark .m-modal-content p span,.m-modal.m-dark .m-modal-content strong{color:#fff}.m-modal.m-dark .m-modal-content a{color:#eaeaea}.m-modal.m-dark .m-modal-content a:not(.m-by):hover,.m-modal.m-dark .m-modal-content a:not(.m-by):focus,.m-modal.m-dark .m-modal-content a:not(.m-by):active{background-color:rgba(134,134,134,.08);color:#eaeaea}.m-modal.m-dark .m-modal-content a.m-gmail{color:#e07d73}.m-modal.m-dark .m-modal-content a.m-gmail:hover,.m-modal.m-dark .m-modal-content a.m-gmail:focus,.m-modal.m-dark .m-modal-content a.m-gmail:active{background-color:rgba(224,125,115,.08);color:#e07d73}.m-modal.m-dark .m-modal-content a.m-outlook{color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-outlook:hover,.m-modal.m-dark .m-modal-content a.m-outlook:focus,.m-modal.m-dark .m-modal-content a.m-outlook:active{background-color:rgba(76,156,215,.08);color:#4c9cd7}.m-modal.m-dark .m-modal-content a.m-yahoo{color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-yahoo:hover,.m-modal.m-dark .m-modal-content a.m-yahoo:focus,.m-modal.m-dark .m-modal-content a.m-yahoo:active{background-color:rgba(172,136,211,.08);color:#ac88d3}.m-modal.m-dark .m-modal-content a.m-tg{color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-tg:hover,.m-modal.m-dark .m-modal-content a.m-tg:focus,.m-modal.m-dark .m-modal-content a.m-tg:active{background-color:rgba(76,171,219,.08);color:#4cabdb}.m-modal.m-dark .m-modal-content a.m-wa{color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-wa:hover,.m-modal.m-dark .m-modal-content a.m-wa:focus,.m-modal.m-dark .m-modal-content a.m-wa:active{background-color:rgba(76,210,192,.08);color:#4cd2c0}.m-modal.m-dark .m-modal-content a.m-skype{color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-skype:hover,.m-modal.m-dark .m-modal-content a.m-skype:focus,.m-modal.m-dark .m-modal-content a.m-skype:active{background-color:rgba(76,199,244,.08);color:#4cc7f4}.m-modal.m-dark .m-modal-content a.m-by:hover,.m-modal.m-dark .m-modal-content a.m-by:focus,.m-modal.m-dark .m-modal-content a.m-by:active{color:#fff}\", \"\"]);\n// Exports\nmodule.exports = ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \" {\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery, dedupe) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = [].concat(modules[_i]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (mediaQuery) {\n if (!item[2]) {\n item[2] = mediaQuery;\n } else {\n item[2] = \"\".concat(mediaQuery, \" and \").concat(item[2]);\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\n var result = require(\"!!../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!../node_modules/sass-loader/dist/cjs.js!./mailgo.scss\");\n\n if (typeof result === \"string\") {\n module.exports = result;\n } else {\n module.exports = result.toString();\n }\n ","import { MailgoModalType, MailgoInstallationType } from \"mailgo\";\n\n// links\nexport const MAILTO: string = \"mailto:\";\nexport const MAILGO: string = \"mailgo:\";\nexport const TEL: string = \"tel:\";\nexport const CALLTO: string = \"callto:\";\nexport const SMS: string = \"sms:\";\n\n// deep linking\nexport const outlookDeepLink: string = \"ms-outlook://\";\n\n// no mailgo class\nexport const NO_MAILGO: string = \"no-mailgo\";\n\n// responsive settings\nexport const DESKTOP: string = \"desktop\";\nexport const MOBILE: string = \"mobile\";\n\n// mailgo modal types\nexport const MAILGO_MAIL: MailgoModalType = \"mailgo\";\nexport const MAILGO_TEL: MailgoModalType = \"mailgo-tel\";\nexport const MAILGO_SMS: MailgoModalType = \"mailgo-sms\";\n\n// mailgo installation types\nexport const CLASSIC: MailgoInstallationType = \"classic\";\nexport const LESS_SPAM: MailgoInstallationType = \"less-spam\";\n\n// useful html tags\nexport const spanHTMLTag: string = \"span\";\nexport const aHTMLTag: string = \"a\";\nexport const pHTMLTag: string = \"p\";\n\n// default lang\nexport const defaultLang: string = \"en\";\n\n// useful regexp\nexport const notNumber: RegExp = new RegExp(\"[^0-9/]\", \"gi\");\nexport const leadingZeros: RegExp = new RegExp(\"^0+\", \"gi\");\n","// validate a single email with regex\nexport const validateEmail = (email: string): boolean =>\n /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/.test(\n email\n );\n\n// validate an array of emails\nexport const validateEmails = (arr: string[]): boolean =>\n arr.every(validateEmail);\n\n// validate a single tel with regex\nexport const validateTel = (tel: string): boolean =>\n /^[+]{0,1}[\\s0-9]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\\s\\./0-9]*[p]{0,1}[\\s0-9]*$/.test(\n tel\n );\n\n// copy of a string\nexport const copyToClipboard = (str: string): boolean => {\n let el: HTMLTextAreaElement = document.createElement(\n \"textarea\"\n ) as HTMLTextAreaElement;\n el.value = str;\n el.setAttribute(\"readonly\", \"\");\n el.style.position = \"absolute\";\n el.style.left = \"-9999px\";\n document.body.appendChild(el);\n let selected: Range | boolean =\n document.getSelection().rangeCount > 0\n ? document.getSelection().getRangeAt(0)\n : false;\n el.select();\n document.execCommand(\"copy\");\n document.body.removeChild(el);\n if (selected) {\n document.getSelection().removeAllRanges();\n document.getSelection().addRange(selected);\n return true;\n }\n return false;\n};\n\n// set focus loop within modal\nexport const setFocusLoop = (ref: HTMLElement): void => {\n let modal = ref;\n modal\n .querySelector(\".m-modal-content a:last-of-type\")\n .addEventListener(\"keydown\", leaveLastLink);\n modal\n .querySelector(\".m-modal-content a:first-of-type\")\n .addEventListener(\"keydown\", leaveFirstLink);\n};\n\nexport const leaveLastLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === false) {\n e.preventDefault();\n\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:first-of-type\") as HTMLElement).focus();\n }\n};\n\nexport const leaveFirstLink = (e: KeyboardEvent): void => {\n // going back to the first link to force looping\n if (e.code === \"Tab\" && e.shiftKey === true) {\n e.preventDefault();\n ((e.target as HTMLElement)\n .closest(\"div\")\n .querySelector(\"a:last-of-type\") as HTMLElement).focus();\n }\n};\n","export const userAgent = () => {\n if (\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(\n navigator.userAgent\n )\n ) {\n return \"mobile\";\n }\n return \"desktop\";\n};\n","import {\n MailgoConfig,\n MailgoTranslations,\n MailgoTranslation,\n MailgoAction,\n MailgoLanguages,\n MailgoType,\n MailgoDetail,\n MailgoInstallationType,\n MailgoModalType,\n} from \"mailgo\";\n\n// polyfill\n// import { mailgoPolyfill } from \"./polyfill\";\n\n// constants\nimport {\n MAILTO,\n MAILGO,\n TEL,\n CALLTO,\n SMS,\n MAILGO_MAIL,\n MAILGO_TEL,\n MAILGO_SMS,\n CLASSIC,\n LESS_SPAM,\n NO_MAILGO,\n MOBILE,\n spanHTMLTag,\n aHTMLTag,\n pHTMLTag,\n defaultLang,\n notNumber,\n leadingZeros,\n} from \"./constants\";\n\n// utils\nimport {\n validateEmails,\n validateTel,\n copyToClipboard,\n setFocusLoop,\n} from \"./utils\";\n\n// i18n for mailgo\nimport languages from \"../i18n/languages.json\";\nimport translations from \"../i18n/translations.json\";\n\n// mobile detect\nimport { userAgent } from \"./mobile-detect\";\n\n// mailgo scss, with toString (https://github.com/webpack-contrib/css-loader#tostring)\nconst mailgoCSS: string = require(\"./mailgo.scss\").toString();\n\n// default language\nlet lang: string = defaultLang;\n\n// default strings\nconst defaultStrings: MailgoTranslation = (translations as MailgoTranslations)[\n defaultLang\n];\n\n// translation strings\nlet strings: MailgoTranslation;\n\n// global mailgo config object\nlet config: MailgoConfig;\n\n// config to check if the client is mobile or desktop\nlet isMobile: boolean = false;\n\n// default config attributes\nlet mailtoEnabled: boolean = true;\nlet telEnabled: boolean = true;\nlet smsEnabled: boolean = false;\nlet desktopEnabled: boolean = true;\nlet mobileEnabled: boolean = true;\nlet validateEmailConfig: boolean = true;\nlet validateTelConfig: boolean = true;\nlet showFooterConfig: boolean = true;\nlet loadCSSConfig: boolean = true;\n\n// activeMailgoType\nlet activeMailgoType: MailgoType;\n\n// modals global object\nlet modalMailto: HTMLElement, modalTel: HTMLElement;\n\n// mailgo general variables\nlet url: URL, href: string, lessSpamHref: string;\n\n// mailgo mail variables\nlet mail: string, cc: string, bcc: string, subject: string, bodyMail: string;\n\n// mailgo tel variables\nlet tel: string, msg: string, telegramUsername: string, skypeUsername: string;\n\n// the DOM elements\nlet title: HTMLElement,\n titleTel: HTMLElement,\n detailCc: HTMLElement,\n detailBcc: HTMLElement,\n detailSubject: HTMLElement,\n detailBody: HTMLElement,\n detailMsg: HTMLElement,\n ccValue: HTMLElement,\n bccValue: HTMLElement,\n subjectValue: HTMLElement,\n bodyValue: HTMLElement,\n msgValue: HTMLElement,\n activatedLink: HTMLElement;\n\n// mailgo buttons (actions)\nlet gmail: HTMLLinkElement,\n outlook: HTMLLinkElement,\n yahoo: HTMLLinkElement,\n open: HTMLLinkElement,\n telegram: HTMLLinkElement,\n wa: HTMLLinkElement,\n skype: HTMLLinkElement,\n call: HTMLLinkElement,\n copyMail: HTMLLinkElement,\n copyTel: HTMLLinkElement;\n\n/**\n * mailgoInit\n * the function that creates the mailgo elements in DOM\n */\nconst mailgoInit = (): void => {\n // set the boolean for mobile/desktop\n isMobile = userAgent() === MOBILE;\n\n // responsive settings\n {\n if (typeof config?.desktop !== \"undefined\") {\n desktopEnabled = config.desktop;\n // if it is a desktop and desktop is not enabled no init mailgo\n if (!isMobile && !desktopEnabled) {\n return;\n }\n }\n if (typeof config?.mobile !== \"undefined\") {\n mobileEnabled = config.mobile;\n // if it is a mobile and mobile is not enabled no init mailgo\n if (isMobile && !mobileEnabled) {\n return;\n }\n }\n }\n\n // set the mailgo language\n mailgoSetLanguage();\n\n // mailgo, if mailgo not already exists\n let mailgoExists = !!document.getElementById(MAILGO_MAIL);\n\n // if mailgo is enabled for mailto and it not exists in DOM\n if (mailtoEnabled && !mailgoExists) {\n // modal\n modalMailto = createElement() as HTMLElement;\n modalMailto.style.display = \"none\";\n modalMailto.id = MAILGO_MAIL;\n modalMailto.classList.add(\"m-modal\");\n modalMailto.setAttribute(\"role\", \"dialog\");\n modalMailto.setAttribute(\"tabindex\", \"-1\");\n modalMailto.setAttribute(\"aria-labelledby\", \"m-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalMailto.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalMailto.appendChild(modalContent);\n\n // title (email address)\n title = createElement(\"strong\");\n title.id = \"m-title\";\n title.className = \"m-title\";\n modalContent.appendChild(title);\n\n // details\n let details: HTMLElement = createElement();\n details.id = \"m-details\";\n details.className = \"m-details\";\n\n detailCc = createElement(pHTMLTag);\n detailCc.id = \"m-cc\";\n let ccSpan: HTMLElement = createElement(spanHTMLTag);\n ccSpan.className = \"w-500\";\n ccSpan.appendChild(createTextNode(strings.cc_ || defaultStrings.cc_));\n ccValue = createElement(spanHTMLTag);\n ccValue.id = \"m-cc-value\";\n detailCc.appendChild(ccSpan);\n detailCc.appendChild(ccValue);\n details.appendChild(detailCc);\n\n detailBcc = createElement(pHTMLTag);\n detailBcc.id = \"m-bcc\";\n let bccSpan: HTMLElement = createElement(spanHTMLTag);\n bccSpan.className = \"w-500\";\n bccSpan.appendChild(createTextNode(strings.bcc_ || defaultStrings.bcc_));\n bccValue = createElement(spanHTMLTag);\n bccValue.id = \"m-bcc-value\";\n detailBcc.appendChild(bccSpan);\n detailBcc.appendChild(bccValue);\n details.appendChild(detailBcc);\n\n detailSubject = createElement(pHTMLTag);\n detailSubject.id = \"m-subject\";\n let subjectSpan: HTMLElement = createElement(spanHTMLTag);\n subjectSpan.className = \"w-500\";\n subjectSpan.appendChild(\n createTextNode(strings.subject_ || defaultStrings.subject_)\n );\n subjectValue = createElement(spanHTMLTag);\n subjectValue.id = \"m-subject-value\";\n detailSubject.appendChild(subjectSpan);\n detailSubject.appendChild(subjectValue);\n details.appendChild(detailSubject);\n\n detailBody = createElement(pHTMLTag);\n detailBody.id = \"m-body\";\n let bodySpan: HTMLElement = createElement(spanHTMLTag);\n bodySpan.className = \"w-500\";\n bodySpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n bodyValue = createElement(spanHTMLTag);\n bodyValue.id = \"m-body-value\";\n detailBody.appendChild(bodySpan);\n detailBody.appendChild(bodyValue);\n details.appendChild(detailBody);\n\n modalContent.appendChild(details);\n\n // Gmail\n gmail = createElement(aHTMLTag) as HTMLLinkElement;\n gmail.id = \"m-gmail\";\n gmail.href = \"#mailgo-gmail\";\n gmail.classList.add(\"m-open\");\n gmail.classList.add(\"m-gmail\");\n gmail.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let gmailSpan: HTMLElement = createElement(spanHTMLTag);\n gmailSpan.className = \"w-500\";\n gmailSpan.appendChild(\n createTextNode(strings.gmail || defaultStrings.gmail)\n );\n gmail.appendChild(gmailSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"gmail\")) {\n modalContent.appendChild(gmail);\n }\n\n // Outlook\n outlook = createElement(aHTMLTag) as HTMLLinkElement;\n outlook.id = \"m-outlook\";\n outlook.href = \"#mailgo-outlook\";\n outlook.classList.add(\"m-open\");\n outlook.classList.add(\"m-outlook\");\n outlook.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let outlookSpan: HTMLElement = createElement(spanHTMLTag);\n outlookSpan.className = \"w-500\";\n outlookSpan.appendChild(\n createTextNode(strings.outlook || defaultStrings.outlook)\n );\n outlook.appendChild(outlookSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"outlook\")) {\n modalContent.appendChild(outlook);\n }\n\n // Outlook\n yahoo = createElement(aHTMLTag) as HTMLLinkElement;\n yahoo.id = \"m-yahoo\";\n yahoo.href = \"#mailgo-yahoo\";\n yahoo.classList.add(\"m-open\");\n yahoo.classList.add(\"m-yahoo\");\n yahoo.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let yahooSpan: HTMLElement = createElement(spanHTMLTag);\n yahooSpan.className = \"w-500\";\n yahooSpan.appendChild(\n createTextNode(strings.yahoo || defaultStrings.yahoo)\n );\n yahoo.appendChild(yahooSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"yahoo\")) {\n modalContent.appendChild(yahoo);\n }\n\n // open default\n open = createElement(aHTMLTag) as HTMLLinkElement;\n open.id = \"m-open\";\n open.href = \"#mailgo-open\";\n open.classList.add(\"m-open\");\n open.classList.add(\"m-default\");\n let openSpan: HTMLElement = createElement(spanHTMLTag);\n openSpan.className = \"w-500\";\n openSpan.appendChild(createTextNode(strings.open || defaultStrings.open));\n open.appendChild(openSpan);\n open.appendChild(\n createTextNode(strings._default || defaultStrings._default)\n );\n\n modalContent.appendChild(open);\n\n // copy\n copyMail = createElement(aHTMLTag) as HTMLLinkElement;\n copyMail.id = \"m-copy\";\n copyMail.href = \"#mailgo-copy\";\n copyMail.classList.add(\"m-copy\");\n copyMail.classList.add(\"w-500\");\n copyMail.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyMail);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalMailto);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // mailgo tel, if mailgo-tel not already exists\n let mailgoTelExists = !!document.getElementById(MAILGO_TEL);\n\n // if mailgo is enabled for tel/callto and it not exists in DOM\n if (telEnabled && !mailgoTelExists) {\n // modal\n modalTel = createElement() as HTMLElement;\n modalTel.style.display = \"none\";\n modalTel.id = MAILGO_TEL;\n modalTel.classList.add(\"m-modal\");\n modalTel.setAttribute(\"role\", \"dialog\");\n modalTel.setAttribute(\"tabindex\", \"-1\");\n modalTel.setAttribute(\"aria-labelledby\", \"m-tel-title\");\n\n // if dark is in config\n if (config?.dark) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // background\n let modalBackground: HTMLElement = createElement();\n modalBackground.className = \"m-modal-back\";\n modalTel.appendChild(modalBackground);\n\n // modal content\n let modalContent: HTMLElement = createElement();\n modalContent.className = \"m-modal-content\";\n modalTel.appendChild(modalContent);\n\n // title (telephone number)\n titleTel = createElement(\"strong\");\n titleTel.id = \"m-tel-title\";\n titleTel.className = \"m-title\";\n modalContent.appendChild(titleTel);\n\n // details\n let detailsTel: HTMLElement = createElement();\n detailsTel.id = \"m-tel-details\";\n detailsTel.className = \"m-details\";\n\n detailMsg = createElement(pHTMLTag);\n detailMsg.id = \"m-msg\";\n let msgSpan: HTMLElement = createElement(spanHTMLTag);\n msgSpan.className = \"w-500\";\n msgSpan.appendChild(createTextNode(strings.body_ || defaultStrings.body_));\n msgValue = createElement(spanHTMLTag);\n msgValue.id = \"m-msg-value\";\n detailMsg.appendChild(msgSpan);\n detailMsg.appendChild(msgValue);\n detailsTel.appendChild(detailMsg);\n\n modalContent.appendChild(detailsTel);\n\n // Telegram\n telegram = createElement(aHTMLTag) as HTMLLinkElement;\n telegram.id = \"m-tg\";\n telegram.href = \"#mailgo-telegram\";\n telegram.classList.add(\"m-open\");\n telegram.classList.add(\"m-tg\");\n\n // by default not display\n telegram.style.display = \"none\";\n\n telegram.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let telegramSpan: HTMLElement = createElement(spanHTMLTag);\n telegramSpan.className = \"w-500\";\n telegramSpan.appendChild(\n createTextNode(strings.telegram || defaultStrings.telegram)\n );\n telegram.appendChild(telegramSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"telegram\")) {\n modalContent.appendChild(telegram);\n }\n\n // WhatsApp\n wa = createElement(aHTMLTag) as HTMLLinkElement;\n wa.id = \"m-wa\";\n wa.href = \"#mailgo-whatsapp\";\n wa.classList.add(\"m-open\");\n wa.classList.add(\"m-wa\");\n wa.appendChild(createTextNode(strings.open_in_ || defaultStrings.open_in_));\n let waSpan: HTMLElement = createElement(spanHTMLTag);\n waSpan.className = \"w-500\";\n waSpan.appendChild(\n createTextNode(strings.whatsapp || defaultStrings.whatsapp)\n );\n wa.appendChild(waSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"whatsapp\")) {\n modalContent.appendChild(wa);\n }\n\n // Skype\n skype = createElement(aHTMLTag) as HTMLLinkElement;\n skype.id = \"m-skype\";\n skype.href = \"#mailgo-skype\";\n skype.classList.add(\"m-open\");\n skype.classList.add(\"m-skype\");\n skype.appendChild(\n createTextNode(strings.open_in_ || defaultStrings.open_in_)\n );\n let skypeSpan: HTMLElement = createElement(spanHTMLTag);\n skypeSpan.className = \"w-500\";\n skypeSpan.appendChild(\n createTextNode(strings.skype || defaultStrings.skype)\n );\n skype.appendChild(skypeSpan);\n\n if (mailgoConfigAttributeEnabled(\"action\", \"skype\")) {\n modalContent.appendChild(skype);\n }\n\n // call default\n call = createElement(aHTMLTag) as HTMLLinkElement;\n call.id = \"m-call\";\n call.href = \"#mailgo-open\";\n call.classList.add(\"m-open\");\n call.classList.add(\"m-default\");\n let callSpan: HTMLElement = createElement(spanHTMLTag);\n callSpan.className = \"w-500\";\n callSpan.appendChild(createTextNode(strings.call || defaultStrings.call));\n call.appendChild(callSpan);\n call.appendChild(\n createTextNode(strings._as_default || defaultStrings._as_default)\n );\n\n modalContent.appendChild(call);\n\n // copy\n copyTel = createElement(aHTMLTag) as HTMLLinkElement;\n copyTel.id = \"m-tel-copy\";\n copyTel.href = \"#mailgo-copy\";\n copyTel.classList.add(\"m-copy\");\n copyTel.classList.add(\"w-500\");\n copyTel.appendChild(createTextNode(strings.copy || defaultStrings.copy));\n\n modalContent.appendChild(copyTel);\n\n // hide mailgo.dev in footer only if showFooter is defined and equal to false\n if (typeof config?.showFooter !== \"undefined\") {\n showFooterConfig = config.showFooter;\n }\n\n if (showFooterConfig) {\n modalContent.appendChild(byElement());\n }\n\n // add the modal at the end of the body\n document.body.appendChild(modalTel);\n\n // every click outside the modal will hide the modal\n modalBackground.addEventListener(\"click\", hideMailgo);\n }\n\n // event listener on body, if the element is mailgo-compatible the mailgo modal will be rendered\n document.addEventListener(\"click\", mailgoClickListener);\n};\n\n/**\n * mailgoClickListener\n * function to check if an element is mailgo-enabled or not referencing to\n * mail:\n * document.querySelectorAll(\n * 'a[href^=\"mailto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * tel:\n * document.querySelectorAll(\n * 'a[href^=\"tel:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"callto:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n * or\n * document.querySelectorAll(\n * 'a[href^=\"sms:\" i]:not(.no-mailgo), a[href=\"#mailgo\"], a.mailgo'\n * );\n */\nfunction mailgoClickListener(event: Event): boolean {\n // check if the mailgo HTML exists in the body\n if (\n !document.body.contains(modalMailto) &&\n !document.body.contains(modalTel)\n ) {\n return false;\n }\n\n // if a mailgo is already showing do nothing\n if (mailgoIsShowing()) {\n return false;\n }\n\n // the path of the event\n let path =\n (event.composedPath && event.composedPath()) ||\n composedPath(event.target as HTMLElement);\n\n if (path) {\n path.forEach((element: HTMLElement) => {\n if (element instanceof HTMLDocument || element instanceof Window) {\n return false;\n }\n\n // go here only if one of the mailgo modals are enabled\n if (mailtoEnabled || telEnabled || smsEnabled) {\n let localMailgoType = getMailgoTypeByElement(element);\n\n // go on if the localMailgoType is not null\n if (localMailgoType) {\n // set the active mailgo type\n activeMailgoType = localMailgoType;\n\n let activeMailgoModalType = activeMailgoType?.type;\n\n if (activeMailgoModalType) {\n // check if the setting is enabled and if so go with pre-render\n if (\n (mailtoEnabled && activeMailgoModalType === MAILGO_MAIL) ||\n (telEnabled && activeMailgoModalType === MAILGO_TEL) ||\n (smsEnabled && activeMailgoModalType === MAILGO_SMS)\n ) {\n // stop the normal execution of the element click\n event.preventDefault();\n\n // render mailgo\n mailgoPreRender(element as HTMLLinkElement);\n\n return true;\n }\n }\n }\n }\n });\n }\n\n return false;\n}\n\n/**\n * mailgoPreRender\n * function to pre-render a mailgo, it helps populating elements needed by modal\n */\nfunction mailgoPreRender(\n mailgoElementOrUrl: HTMLLinkElement | string\n): boolean {\n let mailgoElement: HTMLLinkElement;\n\n // get the type and installation from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if type is not defined return\n if (!type) return false;\n\n if (typeof mailgoElementOrUrl === \"string\") {\n // if the parameter is a string it is the url\n href = mailgoElementOrUrl as string;\n } else {\n // if the paramenter is an HTMLLinkElement get the href attribute and the element\n href = mailgoElementOrUrl.getAttribute(\"href\") as string;\n mailgoElement = mailgoElementOrUrl as HTMLLinkElement;\n }\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // if the installation is classic\n if (installation === CLASSIC) {\n if (validateUrl(href, MAILTO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILTO)[1].trim());\n } else if (validateUrl(href, MAILGO)) {\n mail = decodeURIComponent(href.split(\"?\")[0].split(MAILGO)[1].trim());\n }\n\n try {\n url = new URL(href);\n\n let urlParams: URLSearchParams = url.searchParams;\n // optional parameters for the email\n cc = urlParams.get(\"cc\");\n bcc = urlParams.get(\"bcc\");\n subject = urlParams.get(\"subject\");\n bodyMail = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam\n // mail = data-address + @ + data-domain\n mail =\n mailgoElement.getAttribute(\"data-address\") &&\n mailgoElement.getAttribute(\"data-domain\")\n ? mailgoElement.getAttribute(\"data-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-domain\")\n : null;\n\n try {\n url = new URL(MAILTO + encodeURIComponent(mail));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // cc = data-cc-address + @ + data-cc-domain\n cc = mailgoElement.getAttribute(\"data-cc-address\")\n ? mailgoElement.getAttribute(\"data-cc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-cc-domain\")\n : null;\n\n // if cc is defined add it to parameters\n if (cc) parameters.push(\"cc=\" + cc);\n\n // bcc = data-bcc-address + @ + data-bcc-domain\n bcc = mailgoElement.getAttribute(\"data-bcc-address\")\n ? mailgoElement.getAttribute(\"data-bcc-address\") +\n \"@\" +\n mailgoElement.getAttribute(\"data-bcc-domain\")\n : null;\n\n // if bcc is defined add it to parameters\n if (bcc) parameters.push(\"bcc=\" + bcc);\n\n // subject = data-subject\n subject = mailgoElement.getAttribute(\"data-subject\");\n\n // if subject is defined add it to parameters\n if (subject) parameters.push(\"subject=\" + subject);\n\n // body = data-body\n bodyMail = mailgoElement.getAttribute(\"data-body\");\n\n // if body is defined add it to parameters\n if (bodyMail) parameters.push(\"body=\" + bodyMail);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n MAILTO + encodeURIComponent(mail),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateEmail !== \"undefined\") {\n validateEmailConfig = config.validateEmail;\n }\n\n if (validateEmailConfig) {\n // validate the email address\n if (!validateEmails(mail.split(\",\"))) {\n return false;\n }\n\n // if cc, bcc are not valid cc, bcc = \"\"\n if (cc && !validateEmails(cc.split(\",\"))) cc = \"\";\n if (bcc && !validateEmails(bcc.split(\",\"))) bcc = \"\";\n }\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n if (installation === CLASSIC) {\n if (validateUrl(href, TEL)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(TEL)[1].trim());\n } else if (validateUrl(href, CALLTO)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(CALLTO)[1].trim());\n } else if (validateUrl(href, SMS)) {\n tel = decodeURIComponent(href.split(\"?\")[0].split(SMS)[1].trim());\n }\n\n try {\n url = new URL(href);\n let urlParams: URLSearchParams = url.searchParams;\n\n // optional parameters for the phone number\n msg = urlParams.get(\"body\");\n } catch (error) {\n console.log(error);\n }\n } else if (installation == LESS_SPAM) {\n tel = mailgoElement.getAttribute(\"data-tel\");\n msg = mailgoElement.getAttribute(\"data-msg\");\n\n try {\n url = new URL(TEL + encodeURIComponent(tel));\n } catch (error) {\n console.log(error);\n }\n\n let parameters: string[] = [];\n\n // if msg is defined add it to parameters\n if (msg) parameters.push(\"body=\" + msg);\n\n // set the lessSpamHref\n lessSpamHref = buildLessSpamHref(\n TEL + encodeURIComponent(tel),\n parameters\n );\n }\n\n // if is in config use it\n if (typeof config?.validateTel !== \"undefined\") {\n validateTelConfig = config.validateTel;\n }\n\n // validate the phone number\n if (validateTelConfig) {\n if (!validateTel(tel)) return;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-telegram\")) {\n telegramUsername = mailgoElement.getAttribute(\"data-telegram\");\n } else {\n telegramUsername = null;\n }\n\n // Telegram username\n if (mailgoElement && mailgoElement.hasAttribute(\"data-skype\")) {\n skypeUsername = mailgoElement.getAttribute(\"data-skype\");\n } else {\n skypeUsername = null;\n }\n }\n\n // if dark is in config or contained in the element\n if (\n mailgoElement &&\n (config?.dark || mailgoElement.classList.contains(\"dark\"))\n ) {\n enableDarkMode();\n } else {\n disableDarkMode();\n }\n\n // render mailgo\n mailgoRender();\n\n return true;\n}\n\n/**\n * mailgoDirectRender\n * function to render a mailgo directly from a URL\n */\nfunction mailgoDirectRender(directUrl: string): boolean {\n // start mailgo\n mailgo();\n\n if (validateUrl(directUrl, MAILTO) || validateUrl(directUrl, MAILGO)) {\n activeMailgoType = {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n } else if (\n validateUrl(directUrl, TEL) ||\n validateUrl(directUrl, CALLTO) ||\n validateUrl(directUrl, SMS)\n ) {\n activeMailgoType = {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n mailgoPreRender(directUrl);\n return true;\n }\n return false;\n}\n\n/**\n * mailgoRender\n * function to render a mailgo (mail or tel)\n */\nfunction mailgoRender(): boolean {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n\n // if type is not defined return\n if (!type) return false;\n\n // mailgo mail\n if (type === MAILGO_MAIL) {\n // the title of the modal (email address)\n title.innerHTML = mail.split(\",\").join(\"
\");\n\n // add the details if provided\n if (mailgoConfigAttributeEnabled(\"detail\", \"cc\") && cc) {\n detailCc.style.display = \"block\";\n ccValue.innerHTML = cc.split(\",\").join(\"
\");\n } else {\n detailCc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"bcc\") && bcc) {\n detailBcc.style.display = \"block\";\n bccValue.innerHTML = bcc.split(\",\").join(\"
\");\n } else {\n detailBcc.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"subject\") && subject) {\n detailSubject.style.display = \"block\";\n subjectValue.textContent = subject;\n } else {\n detailSubject.style.display = \"none\";\n }\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"body\") && bodyMail) {\n detailBody.style.display = \"block\";\n bodyValue.textContent = bodyMail;\n } else {\n detailBody.style.display = \"none\";\n }\n\n // add the actions\n gmail.addEventListener(\"click\", openGmail);\n\n outlook.addEventListener(\"click\", openOutlook);\n\n yahoo.addEventListener(\"click\", openYahooMail);\n\n open.addEventListener(\"click\", openDefault);\n\n copyMail.addEventListener(\"click\", copy);\n }\n // mailgo tel\n else if (type === MAILGO_TEL) {\n // the title of the modal (tel)\n titleTel.innerHTML = tel;\n\n if (mailgoConfigAttributeEnabled(\"detail\", \"msg\") && msg) {\n detailMsg.style.display = \"block\";\n msgValue.textContent = msg;\n } else {\n detailMsg.style.display = \"none\";\n }\n\n // add the actions to buttons\n wa.addEventListener(\"click\", openWhatsApp);\n\n // telegram must be shown only if data-telegram is provided\n if (telegramUsername) {\n document.getElementById(\"m-tg\").style.display = \"block\";\n telegram.addEventListener(\"click\", openTelegram);\n } else {\n document.getElementById(\"m-tg\").style.display = \"none\";\n }\n\n skype.addEventListener(\"click\", openSkype);\n\n call.addEventListener(\"click\", openDefault);\n\n copyTel.addEventListener(\"click\", copy);\n }\n\n // show the mailgo\n showMailgo(type);\n\n // add listener keyDown\n document.addEventListener(\"keydown\", mailgoKeydown);\n\n return true;\n}\n\n// actions\nconst openGmail = (event?: Event): void => {\n event.preventDefault();\n\n let urlString: string;\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n if (installation === CLASSIC) {\n try {\n urlString = url.toString();\n } catch (e) {\n urlString = href;\n }\n } else if (installation === LESS_SPAM) {\n urlString = lessSpamHref;\n }\n\n // Gmail url\n let gmailUrl: string =\n \"https://mail.google.com/mail/?extsrc=mailto&url=\" +\n encodeURIComponent(urlString);\n\n // open the link\n window.open(gmailUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openOutlook = (event?: Event): void => {\n event.preventDefault();\n\n // Outlook starting url\n let startingOutlookUrl: string =\n \"https://outlook.live.com/owa/?path=/mail/action/compose&to=\";\n\n // let the user to decide to open Office365 Outlook instead of the classic outlook.live.com\n if (config?.office365) {\n startingOutlookUrl =\n \"https://outlook.office365.com/owa/?path=/mail/action/compose&to=\";\n }\n\n // Outlook url\n let outlookUrl: string = startingOutlookUrl + encodeURIComponent(mail);\n\n // the details if provided\n if (subject) {\n outlookUrl = outlookUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n\n if (bodyMail) {\n outlookUrl = outlookUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(outlookUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openYahooMail = (event?: Event): void => {\n event.preventDefault();\n\n // Yahoo url\n let yahooUrl: string = \"https://compose.mail.yahoo.com/?to=\" + mail;\n\n // the details if provided\n if (subject) {\n yahooUrl = yahooUrl.concat(\"&subject=\" + encodeURIComponent(subject));\n }\n if (bodyMail) {\n yahooUrl = yahooUrl.concat(\"&body=\" + encodeURIComponent(bodyMail));\n }\n\n // open the link\n window.open(yahooUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openTelegram = (event?: Event): void => {\n event.preventDefault();\n\n // check if telegramUsername exists\n if (telegramUsername) {\n // Telegram url\n let tgUrl: string = \"https://t.me/\" + encodeURIComponent(telegramUsername);\n\n // open the url\n window.open(tgUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n }\n};\n\nconst openSkype = (event?: Event): void => {\n event.preventDefault();\n\n let skype: string = skypeUsername || tel;\n\n // Telegram url\n let skypeUrl: string = \"skype:\" + encodeURIComponent(skype);\n\n // open the url\n window.open(skypeUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openWhatsApp = (event?: Event): void => {\n event.preventDefault();\n\n // WhatsApp API doesn't work with non number digits and leading 0s: https://faq.whatsapp.com/general/chats/how-to-use-click-to-chat/\n let whatappTel = tel.replace(notNumber, \"\").replace(leadingZeros, \"\");\n\n // WhatsApp url\n let waUrl: string = \"https://wa.me/\" + encodeURIComponent(whatappTel);\n\n // the details if provided\n if (msg) {\n waUrl = waUrl.concat(\"?text=\" + encodeURIComponent(msg));\n }\n\n // open the url\n window.open(waUrl, \"_blank\", \"noopener, noreferrer\");\n\n // hide the modal\n hideMailgo();\n};\n\nconst openDefault = (event?: Event): void => {\n event.preventDefault();\n\n let installation: MailgoInstallationType = activeMailgoType?.installation;\n\n // if the installation is classic the browser can follow the default behaviour\n if (installation === CLASSIC) {\n window.location.href = href;\n } else if (installation === LESS_SPAM) {\n // if the installation is less-spam use the built less-spam href\n window.location.href = lessSpamHref;\n }\n\n hideMailgo();\n};\n\nconst copy = (event?: Event): void => {\n event.preventDefault();\n\n // the correct copyButton (mail or tel)\n if (mailgoIsShowing()) {\n let activeCopy: HTMLElement;\n\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n // in case it is showing mail modal copy email address\n copyToClipboard(mail);\n activeCopy = copyMail;\n } else {\n // in case it is showing tel modal copy phone number\n copyToClipboard(tel);\n activeCopy = copyTel;\n }\n\n activeCopy.textContent = strings.copied || defaultStrings.copied;\n setTimeout(() => {\n activeCopy.textContent = strings.copy || defaultStrings.copy;\n // hide after the timeout\n hideMailgo();\n }, 999);\n }\n};\n\n// function to find if a link is a mailto, tel, callto or sms\nconst validateUrl = (url: string, type: string = MAILTO) => {\n let regexValidate = new RegExp(\"^\" + type + \"((.)+)\", \"gi\");\n return regexValidate.test(url);\n};\n\n// function that returns if an element is a mailgo\nfunction getMailgoTypeByElement(element: HTMLElement): MailgoType | null {\n let elementHref: string = (element as HTMLLinkElement).getAttribute(\"href\");\n\n // return null if there is no-mailgo in class\n if (element.classList?.contains(NO_MAILGO)) {\n return null;\n }\n\n // the case of classic type of mailgo, like a href=mailto:... or a href=tel:... and the class=mailgo with a useful href\n if (elementHref || element.classList?.contains(\"mailgo\")) {\n if (validateUrl(elementHref, MAILTO) || validateUrl(elementHref, MAILGO)) {\n // a mailto: or mailgo:\n return {\n type: MAILGO_MAIL,\n installation: CLASSIC,\n };\n } else if (\n validateUrl(elementHref, TEL) ||\n validateUrl(elementHref, CALLTO)\n ) {\n // a tel: or callto:\n return {\n type: MAILGO_TEL,\n installation: CLASSIC,\n };\n } else if (validateUrl(elementHref, SMS)) {\n // a sms:\n return {\n type: MAILGO_SMS,\n installation: CLASSIC,\n };\n }\n }\n\n if (elementHref === \"#mailgo\" || element.classList?.contains(\"mailgo\")) {\n // less-spam installation of mailgo, check to the attributes\n if (\n element.hasAttribute(\"data-address\") &&\n element.hasAttribute(\"data-domain\")\n ) {\n // less-spam mailto with data-address and data-domain\n return {\n type: MAILGO_MAIL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-tel\")) {\n // less-spam tel with data-tel\n return {\n type: MAILGO_TEL,\n installation: LESS_SPAM,\n };\n } else if (element.hasAttribute(\"data-msg\")) {\n // less-spam sms with data-msd\n return {\n type: MAILGO_SMS,\n installation: LESS_SPAM,\n };\n }\n }\n\n return null;\n}\n\n/**\n * mailgoKeydown\n * function to manage the keydown event when the modal is showing, return a boolean that represents if a useful key has been pressed\n */\nconst mailgoKeydown = (keyboardEvent: KeyboardEvent): boolean => {\n // if mailgo is showing\n if (mailgoIsShowing()) {\n let type: MailgoModalType = activeMailgoType?.type;\n\n if (type === MAILGO_MAIL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 71:\n // g -> open GMail\n openGmail();\n return true;\n case 79:\n // o -> open Outlook\n openOutlook();\n return true;\n case 89:\n // y -> open Yahoo Mail\n openYahooMail();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n } else if (type === MAILGO_TEL) {\n switch (keyboardEvent.keyCode) {\n case 27:\n // Escape\n hideMailgo();\n return true;\n case 84:\n // t -> open Telegram\n openTelegram();\n return true;\n case 87:\n // w -> open WhatsApp\n openWhatsApp();\n return true;\n case 83:\n // s -> open Skype\n openSkype();\n return true;\n case 32:\n case 13:\n // spacebar or enter -> open default\n openDefault();\n return true;\n case 67:\n // c -> copy\n copy();\n return true;\n default:\n return false;\n }\n }\n }\n return false;\n};\n\n// show the modal\nconst showMailgo = (type: MailgoModalType): void => {\n // show the correct modal\n setModalDisplay(type, \"flex\");\n};\n\n// hide the modal\nconst hideMailgo = (): void => {\n // hide all the modals\n setModalDisplay(MAILGO_MAIL, \"none\");\n setModalDisplay(MAILGO_TEL, \"none\");\n\n // remove listener keyDown\n document.removeEventListener(\"keydown\", mailgoKeydown);\n};\n\n// is the mailgo modal hidden?\nconst mailgoIsShowing = (): boolean => {\n return (\n (mailtoEnabled && getModalDisplay(MAILGO_MAIL) === \"flex\") ||\n ((telEnabled || smsEnabled) && getModalDisplay(MAILGO_TEL) === \"flex\")\n );\n};\n\nconst byElement = (): HTMLLinkElement => {\n // by element in the footer\n let by: HTMLLinkElement = createElement(aHTMLTag) as HTMLLinkElement;\n by.href = \"https://mailgo.dev?ref=mailgo-modal\";\n by.className = \"m-by\";\n by.target = \"_blank\";\n by.rel = \"noopener noreferrer\";\n by.appendChild(createTextNode(\"mailgo.dev\"));\n\n return by;\n};\n\n// create element\nconst createElement = (element: string = \"div\"): HTMLElement =>\n document.createElement(element);\n\n// create text node\nconst createTextNode = (element: string): Text =>\n document.createTextNode(element);\n\n// get the correct HTMLElement from a type\nconst getModalHTMLElement = (type: MailgoModalType = MAILGO_MAIL) => {\n if (type === MAILGO_TEL) {\n return modalTel;\n } else {\n return modalMailto;\n }\n};\n\n// get display value\nconst getModalDisplay = (ref: MailgoModalType = MAILGO_MAIL): string =>\n getModalHTMLElement(ref).style.display;\n\n// set display value\nconst setModalDisplay = (\n ref: MailgoModalType = MAILGO_MAIL,\n value: string\n): void => {\n let modal = getModalHTMLElement(ref);\n\n if (modal) {\n modal.style.display = value;\n\n if (value === \"flex\") {\n // \"save\" the activated link.\n activatedLink = document.activeElement as HTMLElement;\n modal.setAttribute(\"aria-hidden\", \"false\");\n\n // Focus on the modal container.\n modal.setAttribute(\"tabindex\", \"0\");\n modal.focus();\n setFocusLoop(modal);\n } else {\n modal.setAttribute(\"aria-hidden\", \"true\");\n\n // focus back the activated link for getting back to the context.\n modal.setAttribute(\"tabindex\", \"-1\");\n activatedLink.focus();\n }\n }\n};\n\n// enable dark mode\nconst enableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.add(\"m-dark\");\n }\n};\n\n// disable dark mode\nconst disableDarkMode = () => {\n // get the type from current mailgo type\n let type: MailgoModalType = activeMailgoType?.type;\n if (type) {\n getModalHTMLElement(type).classList.remove(\"m-dark\");\n }\n};\n\n// custom composedPath if path or event.composedPath() are not defined\nconst composedPath = (\n el: HTMLElement\n): (HTMLElement | Document | (Window & typeof globalThis))[] => {\n let path = [];\n\n while (el) {\n path.push(el);\n\n if (el.tagName === \"HTML\") {\n path.push(document);\n path.push(window);\n return path;\n }\n\n el = el.parentElement;\n }\n};\n\n// function to recreate a mailto: or tel: href from less-spam\nconst buildLessSpamHref = (type: string, parameters: string[]): string => {\n lessSpamHref = type;\n if (parameters && parameters.length > 0) {\n let joinedParams = parameters.join(\"&\");\n lessSpamHref = lessSpamHref.concat(\"?\" + joinedParams);\n }\n return lessSpamHref;\n};\n\n// function to check an attribute is enabled or not, by default considering it enabled\nconst mailgoConfigAttributeEnabled = (\n type: \"action\" | \"detail\",\n attribute: MailgoAction | MailgoDetail\n): boolean => {\n console.log(type);\n console.log(attribute);\n\n // by default all the actions and attribute are enabled\n if (!config) {\n console.log(\"caso 1\");\n return true;\n }\n\n // if the attribute type is action consider the actions config attribute\n if (type === \"action\") {\n if (config && !config?.actions) {\n console.log(\"caso 2\");\n return true;\n }\n\n if (\n config &&\n config.actions &&\n config?.actions[attribute as MailgoAction] === false\n ) {\n console.log(\"caso 3\");\n return false;\n }\n } else if (type === \"detail\") {\n // else consider the details attribute\n\n if (config && !config?.details) {\n console.log(\"caso 2\");\n return true;\n }\n\n if (\n config &&\n config.details &&\n config?.details[attribute as MailgoDetail] === false\n ) {\n console.log(\"caso 4\");\n return false;\n }\n }\n\n return true;\n};\n\n// manage the language of mailgo\nconst mailgoSetLanguage = (): string => {\n let languageType = \"default lang\";\n\n // if a language is defined in configuration use it\n if (\n config?.lang &&\n (languages as MailgoLanguages).indexOf(config.lang) !== -1\n ) {\n lang = config.lang;\n languageType = \"config lang\";\n } else {\n // else if is defined use it!\n // keep the lang from html\n let htmlLang: string = document.documentElement.lang;\n\n // find the correct language using the lang attribute, not just a === because there a are cases like fr-FR or fr_FR in html lang attribute\n (languages as MailgoLanguages).forEach((language: any) => {\n if (new RegExp(\"^\" + language, \"gi\").test(htmlLang)) {\n lang = language;\n languageType = \"html lang\";\n }\n });\n }\n\n // strings\n strings = (translations as MailgoTranslations)[lang];\n\n return languageType;\n};\n\nconst mailgoStyle = (): void => {\n if (!document.getElementById(\"mailgo-style\")) {\n // mailgo style\n let mailgoCSSElement: HTMLStyleElement = createElement(\n \"style\"\n ) as HTMLStyleElement;\n mailgoCSSElement.id = \"mailgo-style\";\n mailgoCSSElement.type = \"text/css\";\n mailgoCSSElement.appendChild(createTextNode(mailgoCSS));\n document.head.appendChild(mailgoCSSElement);\n }\n};\n\n// mailgo\nfunction mailgo(mailgoConfig?: MailgoConfig): boolean {\n try {\n // polyfill mailgo\n // mailgoPolyfill();\n\n // set the global config merging window mailgConfig and mailgoConfig passed as a parameter\n config = { ...mailgoConfig, ...((window as any)?.mailgoConfig || null) };\n\n // if the window is defined...\n if (typeof window !== \"undefined\") {\n // if is set in config use it (load the mailgo CSS)\n if (typeof config?.loadCSS !== \"undefined\") {\n loadCSSConfig = config.loadCSS;\n }\n\n // if is set in config use it (enable mailto)\n if (typeof config?.mailto !== \"undefined\") {\n mailtoEnabled = config.mailto;\n }\n\n // if is set in config use it (enable tel)\n if (typeof config?.tel !== \"undefined\") {\n telEnabled = config.tel;\n }\n\n // if is set in config use it (enable sms)\n if (typeof config?.sms !== \"undefined\") {\n smsEnabled = config.sms;\n }\n\n // if load css enabled load it!\n if (loadCSSConfig) {\n // add the style for mailgo\n mailgoStyle();\n }\n\n // if is set an initEvent add the listener\n if (config?.initEvent) {\n if (config?.listenerOptions) {\n // listener options specified\n document.addEventListener(\n config.initEvent,\n mailgoInit,\n config.listenerOptions\n );\n } else {\n // no listener options\n document.addEventListener(config.initEvent, mailgoInit);\n }\n } else {\n mailgoInit();\n }\n\n return true;\n }\n } catch (error) {\n console.log(error);\n }\n return false;\n}\n\n// define the methods also for window element\nif (typeof window !== \"undefined\") {\n (window as any).getMailgoTypeByElement = getMailgoTypeByElement;\n (window as any).mailgoClickListener = mailgoClickListener;\n (window as any).mailgoCheckRender = mailgoClickListener; // for compatibility with old version of mailgo\n (window as any).mailgoPreRender = mailgoPreRender;\n (window as any).mailgoDirectRender = mailgoDirectRender;\n (window as any).mailgoRender = mailgoRender;\n (window as any).mailgo = mailgo;\n}\n\nexport {\n getMailgoTypeByElement,\n mailgoClickListener,\n mailgoPreRender,\n mailgoDirectRender,\n mailgoRender,\n};\n\nexport default mailgo;\n","// webpack > lib/mailgo.js\n\nimport mailgo, {\n getMailgoTypeByElement,\n mailgoClickListener,\n mailgoPreRender,\n mailgoDirectRender,\n mailgoRender,\n} from \"../src/mailgo\";\n\n// start function\nconst start = mailgo;\n\n// compatibility with old version of mailgo\nconst mailgoCheckRender = mailgoClickListener;\n\nexport {\n getMailgoTypeByElement,\n mailgoClickListener,\n mailgoCheckRender,\n mailgoPreRender,\n mailgoDirectRender,\n mailgoRender,\n mailgo,\n start,\n};\n\nexport default mailgo;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(507);\n"],"sourceRoot":""} \ No newline at end of file diff --git a/src/mailgo.ts b/src/mailgo.ts index b47bb19..72f8dd6 100644 --- a/src/mailgo.ts +++ b/src/mailgo.ts @@ -1381,12 +1381,12 @@ const mailgoConfigAttributeEnabled = ( return true; } - if (config && !config?.actions) { - return true; - } - // if the attribute type is action consider the actions config attribute if (type === "action") { + if (config && !config?.actions) { + return true; + } + if ( config && config.actions && @@ -1396,6 +1396,11 @@ const mailgoConfigAttributeEnabled = ( } } else if (type === "detail") { // else consider the details attribute + + if (config && !config?.details) { + return true; + } + if ( config && config.details &&