!function(d,p,u){"use strict";function t(){d(u).trigger("joinchat:starting");var t,e,o=1e3*joinchat_obj.settings.button_delay,n=1e3*joinchat_obj.settings.message_delay,a=!!joinchat_obj.settings.message_hash,i=!!joinchat_obj.$(".joinchat__box").length,s=parseInt(joinchat_obj.store.getItem("joinchat_views")||1)>=joinchat_obj.settings.message_views,h=-1!==(joinchat_obj.store.getItem("joinchat_hashes")||"").split(",").filter(Boolean).indexOf(joinchat_obj.settings.message_hash||"none");function c(){clearTimeout(e),joinchat_obj.chatbox_show()}function _(){joinchat_obj.save_hash(),joinchat_obj.chatbox_hide()}var j,r,l,b="joinchat--show";function g(){var t=(u.activeElement.type||"").toLowerCase();0<=["date","datetime","email","month","number","password","search","tel","text","textarea","time","url","week"].indexOf(t)?joinchat_obj.chatbox?(joinchat_obj.chatbox_hide(),setTimeout(function(){joinchat_obj.$div.removeClass("joinchat--show")},400)):joinchat_obj.$div.removeClass("joinchat--show"):joinchat_obj.$div.addClass("joinchat--show")}h||a&&n&&!joinchat_obj.settings.message_badge&&s||(b+=" joinchat--tooltip"),setTimeout(function(){joinchat_obj.$div.addClass(b)},o),a&&!h&&n&&(joinchat_obj.settings.message_badge?e=setTimeout(function(){joinchat_obj.$(".joinchat__badge").addClass("joinchat__badge--in")},o+n):s&&(e=setTimeout(c,o+n))),i&&!joinchat_obj.is_mobile&&joinchat_obj.$(".joinchat__button").on("mouseenter",function(){t=setTimeout(c,1500)}).on("mouseleave",function(){clearTimeout(t)}),joinchat_obj.$(".joinchat__button").on("click",function(){i&&!joinchat_obj.chatbox?c():Date.now()>joinchat_obj.showed_at+600&&(_(),joinchat_obj.open_whatsapp())}),joinchat_obj.$(".joinchat__close").on("click",_),joinchat_obj.$("#joinchat_optin").on("change",function(){joinchat_obj.$div.toggleClass("joinchat--optout",!this.checked)}),joinchat_obj.$(".joinchat__box__scroll").on("mousewheel DOMMouseScroll",function(t){t.preventDefault();t=t.originalEvent.wheelDelta||-t.originalEvent.detail;this.scrollTop+=30*(t<0?1:-1)}),joinchat_obj.is_mobile&&(d(u).on("focus blur","input, textarea",function(t){d(t.target).closest(joinchat_obj.$div).length||(clearTimeout(j),j=setTimeout(g,200))}),d(p).on("resize",function(){clearTimeout(r),r=setTimeout(function(){joinchat_obj.$div[0].style.setProperty("--vh",p.innerHeight+"px")},200)}).trigger("resize")),d(u).on("click",'.joinchat_open, .joinchat_app, a[href="#joinchat"], a[href="#whatsapp"]',function(t){t.preventDefault(),i&&d(this).is('.joinchat_open, a[href="#joinchat"]')?c():joinchat_obj.open_whatsapp(d(this).data("phone"),d(this).data("message"))}),d(u).on("click",".joinchat_close",function(t){t.preventDefault(),joinchat_obj.chatbox_hide()}),i&&"IntersectionObserver"in p&&(0<(a=d(".joinchat_show, .joinchat_force_show")).length&&(l=new IntersectionObserver(function(t){d.each(t,function(){if(0