1function launch_chaty(t=""){if(void 0!==t&&""!==t){if(document.getElementsByClassName("chaty-app-outer-forms.active").length&&document.querySelectorAll(".chaty-app-outer-forms.active").forEach((function(t,e){t.classList.remove("active")})),document.getElementsByClassName("chaty-app").length&&document.querySelectorAll(".chaty-app.form-open").forEach((function(t,e){t.classList.remove("form-open")})),document.getElementById(`chaty-app-${t}`)){let e=document.getElementById(`chaty-app-${t}`);e.classList.contains("has-single")||e.classList.add("chaty-app-open")}}else document.getElementsByClassName("chaty-app-widget").length&&document.querySelectorAll(".chaty-app-widget:not(.has-single)").forEach((function(t,e){t.classList.add("chaty-app-open")}))}function close_chaty(){document.getElementsByClassName("chaty-app-outer-forms").length&&document.querySelectorAll(".chaty-app-outer-forms.active").forEach((function(t,e){t.classList.remove("active")})),document.getElementsByClassName("chaty-app").length&&document.querySelectorAll(".chaty-app.form-open").forEach((function(t,e){t.classList.remove("form-open")})),document.getElementsByClassName("chaty-app-widget").length&&document.querySelectorAll(".chaty-app-widget.chaty-app-open").forEach((function(t,e){t.classList.remove("chaty-app-open")}))}function open_chaty_whatsapp_popup(t=""){if(close_chaty(),void 0!==t&&""!==t)document.getElementById(`chaty-app-widget-${t}`)&&document.getElementById(`channel-WhatsApp-${t}`)&&($chatyButton=document.getElementById(`chaty-app-widget-${t}`),$chatyButton.classList.add("active"),$whatsappButton=document.getElementById(`channel-WhatsApp-${t}`),$whatsappButton&&$whatsappButton.click());else if(document.getElementsByClassName("chaty-app-whatsapp-form-button").length){const t=document.querySelector(".chaty-app-whatsapp-form-button");t&&t.click()}}function close_chaty_whatsapp_popup(){document.getElementsByClassName("chaty-app-outer-forms").length&&document.querySelectorAll(".chaty-app-outer-forms.active").forEach((function(t,e){t.classList.remove("active")})),document.getElementsByClassName("chaty-app").length&&document.querySelectorAll(".chaty-app").forEach((function(t,e){t.classList.remove("form-open")}))}function open_chaty_contact_form(t=""){if(close_chaty(),void 0!==t&&""!==t)document.getElementById(`chaty-app-widget-${t}`)&&document.getElementById(`channel-WhatsApp-${t}`)&&($chatyButton=document.getElementById(`chaty-app-widget-${t}`),$chatyButton.classList.add("active"),$whatsappButton=document.getElementById(`channel-Contact_Us-${t}`),$whatsappButton&&$whatsappButton.click());else if(document.getElementsByClassName("chaty-app-contact-form-button").length){const t=document.querySelector(".chaty-app-contact-form-button");t&&t.click()}}function close_chaty_contact_form(){document.getElementsByClassName("chaty-app-outer-forms").length&&document.querySelectorAll(".chaty-app-outer-forms.active").forEach((function(t,e){t.classList.remove("active")})),document.getElementsByClassName("chaty-app").length&&document.querySelectorAll(".chaty-app").forEach((function(t,e){t.classList.remove("form-open")}))}(()=>{"use strict";let t,e,a,n=new Object,c="pixel-chaty",i=[],s="",o=!1,l=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
1sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))?1:0,p="",r=document.title,h=["System Stack","Arial","Tahoma","Verdana","Helvetica","Times New Roman","Trebuchet MS","Georgia"],d=!1,y="https://cdn.chatway.app/widget.js?id=";t="https://prod-api.chaty.app/api/pixel/",e="https://cdn.chaty.app/";let g=t+"widgets",u=function(){let t=0;return"object"==typeof Ecwid&&(t=Ecwid.getOwnerId()),t},m=function(t){t+="=";let e=document.cookie.split(";");for(let a=0;a<e.length;a++){let n=e[a];for(;" "==n.charAt(0);)n=n.substring(1);if(0==n.indexOf(t))return n.substring(t.length,n.length)}return null},f=function(t,e){var a=function(t,e){var a=m("chatyAppWidget_"+t),n=[];if(null!=a&&""!=a&&(n=JSON.parse(a)),n.length>0)for(var c=0;c<n.length;c++)if(n[c].k==e)return n[c].v;return null}(t,e);if(null!=a&&""!=a){a=new Date(a);var n=Math.abs(new Date-a);return Math.floor(n/864e5)>=1}return!0},w=function(t,e,a){let n=new Date;n.setTime(n.getTime()+24*a*60*60*1e3);let c="expires="+n.toUTCString();document.cookie=t+"="+e+"; "+c+"; path=/; SameSite=Lax"},_=function(t,e){var a=m("chatyAppWidget_"+t),n=[];null!=a&&""!=a&&(n=JSON.parse(a));var c=!1;if(n.length>0)for(var i=0;i<n.length;i++)n[i].k==e&&(c=!0,n[i].v=new Date);c||n.push({k:e,v:new Date}),a=JSON.stringify(n),w("chatyAppWidget_"+t,a,"7")},v=function(t){let e=m(t);return""!=e&&null!==e};function b(t){return"1"==t||1==t||1==t||"true"==t}function x(t){return null==t||""==t||"null"==t}let L=function(t){if("string"==typeof t)return t;let e=[];for(let a in t)t.hasOwnProperty(a)&&e.push(encodeURIComponent(a)+"="+encodeURIComponent(t[a]));return e.join("&")},k=function(){if(!document.getElementById("chaty-app-elements")){const t=document.createElement("div");t.id="chaty-app-elements",t.innerHTML="",document.body.appendChild(t)}};function C(){let t=e+"pixel.css";if("function"==typeof RocketBrowserCompatibilityChecker&&(t+="?nowprocket=1&no_optimize=1"),!document.getElementById("chaty-saas-css")){let e=document.getElementsByTagName("head")[0],a=document.createElement("link");a.id="chaty-saas-css",a.rel="stylesheet",a.type="text/css",a.href=t,a.media="all",e.appendChild(a)}}let E=function(t){k(),document.getElementById("chaty-app-elements").innerHTML+=t};function A(t){return I("chaty-app-widget-"+t)}function S(t){return I("chaty-app-"+t)}function $(t){return!!document.getElementById(t)}function I(t){return!!document.getElementById(t)&&document.getElementById(t)}function B(t=""){const e=document.createElement("div");return e.innerHTML=t,/[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\u07C0-\u07FF\u0800-\u083F\uFB1D-\uFB4F\uFB50-\uFDFF\uFE70-\uFEFF\u202A-\u202E\u2066-\u2069]/.test(e.textContent)?"rtl":"ltr"}function M(t){return null==t||""==t||""==t.trim()||null==t||"null"==t}function T(t){return x(t)?"":t.replace(/\n/g,"<br />")}function q(t){let e=document.createElement("link");e.rel="stylesheet",e.href=`https://fonts.googleapis.com/css2?family=${t}&display=swap`,document.getElementsByTagName("head")[0].appendChild(e)}function H(t){if(!document.getElementById("chaty-app-custom-css")){let t=document.getElementsByTagName("head")[0],e=document.createElement("style");e.id="chaty-app-custom-css",t.appendChild(e)}document.getElementById("chaty-app-custom-css").innerHTML+=t}let F=function(t,e){if(document.getElementById(t)){const a=document.getElementById(t);a.innerHTML=e,document.body.appendChild(a)}else{const a=document.createElement("div");a.id=t,a.innerHTML=e,document.body.appendChild(a)}};function j(t,e){for(t=t.trim();t.charAt(0)==e;)t=t.substring(1);for(;t.charAt(t.length-1)==e;)t=t.substring(0,t.length-1);return t}function N(t){return(t=(t=(t=j(t,"+")).replace(/ /g,"")).replace(/-/g,"")).replace(/_/g,"")}function O(t){return t.replace(/./gm,(function(t){return t.match(/[a-z0-9\s]+/i)?t:"&#"+t.charCodeAt(0)+";"}))}function P(t){document.getElementsByTagName("body")[0]&&document.getElementsByTagName("body")[0].classList.add(t)}function U(t){document.getElementsByTagName("body")[0]&&document.getElementsByTagName("body")[0].classList.remove(t)}function z(){P("has--not--chatway"),U("chaty-app-has-chatway"),U("has--chaty")}
1let R,W=t+"widgets/views",D=t+"widgets/visitors",X=function(t){return"custom"==t.position?t.custom_position:t.position},Z=function(t){return"vertical"!=t.settings.icon_view?"top":"right"==X(t.settings)?"left":"right"};function Y(t){let e=A(t),a=S(t);if(!e||!a)return;e.classList.add("active");let n=function(t){let e=[],a=A(t);return a?(a.querySelectorAll(".chaty-app-link").forEach((function(t,a){let n=t.getAttribute("data-channel");x(n)||e.push(n)})),e):e}(t);e.querySelectorAll(".chaty-app-default-open").forEach((function(n,c){let i=n.getAttribute("data-channel");if("WhatsApp"==i&&f(t,"c-"+i)){let n=`chaty-app-form-${t}-${i}`,c=`channel-${i}-${t}`;if(I(n)&&I(c)){let c=I(n);c.classList.add("is-active"),c&&(a=S(t),a.classList.remove("chaty-app-open"),e.classList.add("active"),e.classList.add("form-open"),c.classList.add("active"))}}}));var c=f(t,"v-widget");const s=J();if(c&&!s){_(t,"v-widget");let s=e.getAttribute("data-user"),o=0,p=0,r=e.getAttribute("data-key"),h="";if(null!=typeof i[r]){let e=m("activeChatyAppWidgets");null!=e||(e=t,w("activeChatyAppWidgets",e,1))}if(a.classList.contains("has-single")?(o=1,n.forEach((function(e,a){f(t,"v-"+e)&&void 0!==e&&(_(t,"v-"+e),h+=`&channels[]=${e}`)}))):a.classList.contains("chaty-app-open")&&(p=1,n.forEach((function(e,a){f(t,"v-"+e)&&void 0!==e&&(_(t,"v-"+e),h+=`&channels[]=${e}`)}))),c){let e={widgetId:t,userId:s,isMobile:l,isOpen:p,isSingle:o};e=L(e)+h;let a=new XMLHttpRequest;a.open("POST",W,!0),a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.onreadystatechange=function(){},a.send(e)}!function(t){let e=A(t),a=J();if(!e)return;let n=e.getAttribute("data-user");if(!v("triggeredFor"+n)&&!a){w("triggeredFor"+n,t,30);let e={widgetId:t,channels:[],userId:n};e=L(e);let a=new XMLHttpRequest;a.open("POST",D,!0),a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.onreadystatechange=function(){},a.send(e)}}(t)}}let V=function(){let t="";return"object"==typeof Shopify&&(t=Shopify.shop),t};function J(){return void 0!==window.Shopify&&void 0!==window.Shopify.designMode&&window.Shopify.designMode}let G,K=!1,Q=0,tt=!1,et=!1,at=[],nt=0,ct=0;function it(){et&&document.getElementsByClassName(".on-chaty-app-exit-intent")&&(document.querySelectorAll(".on-chaty-app-exit-intent").forEach((function(t,e){t.classList.remove("on-chaty-app-exit-intent"),st(t.getAttribute("data-id"))})),document.getElementsByClassName(".chaty-app-exit-intent-overlay")&&(setTimeout((function(){document.querySelectorAll(".chaty-app-exit-intent-overlay").forEach((function(t,e){t.classList.add("animate")}))}),500),setTimeout((function(){document.querySelectorAll(".chaty-app-exit-intent-overlay").forEach((function(t,e){t.classList.remove("animate"),t.remove()}))}),3e3)))}function st(t){let e=A(t);e&&(Y(t),e.classList.remove("on-chaty-app-delay"),e.classList.remove("on-chaty-app-exit-intent"),e.classList.remove("on-chaty-app-scroll"),document.getElementsByClassName(".chaty-app.on-chaty-app-delay")||(clearInterval(G),K=!1),document.getElementsByClassName(".chaty-app.on-chaty-app-exit-intent")||(et=!1),document.getElementsByClassName(".chaty-app.on-chaty-app-scroll")||(tt=!1))}let ot=function(t){for(t=t.toString();t.length<2;)t="0"+t;return t};function lt(t,e){if(isNaN(e)){let a=new Date(t.toLocaleString("en-US",{timeZone:e})),n=t.getTime()-a.getTime();return new Date(t.getTime()-n)}{let a=new Date;if(a=a.toLocaleString("en-US",{timeZone:"UTC"}),a=new Date(a),-1!=e.indexOf("+")){let t=e.replace("+",""),n=parseInt(t),c=60*parseFloat(t%n);c=a.getUTCMinutes()+c,c>59&&(n+=parseInt(c/60),c%=60),a.setUTCHours(a.getUTCHours()+n,c)}else if(-1!=e.indexOf("-")){let t=e.replace("-",""),n=parseInt(t),c=60*parseFloat(t%n);c=a.getUTCMinutes()-c,c<0&&(n-=parseInt(c/60),c%=60),a.setUTCHours(a.getUTCHours()-n,-c)}let n=t.getTime()-a.getTime();return new Date(t.getTime()-n)}}function pt(t){return Object.keys(t).filter((e=>t[e])).join(" ")}let rt=function(t){return!o&&b(t.is_agent)&&(t.is_agent=!1,t.agents.length&&!t.value&&(t.value=t.agents[0].value,t.channel_account_type=t.agents[0].channel_account_type,t.custom_image_url=t.agents[0].custom_image_url,t.icon_color=t.agents[0].icon_color,t.is_desktop=t.is_agent_desktop,t.is_mobile=t.is_agent_mobile,(t=gt(t)).agents=[])),t},ht=t+"widgets/channel/click";function dt(t,a,n,c,i,s){let o="",p="";if(b(t.is_agent))t.url="#",t.target="",o+=" chaty-app-agent-button ";else{if("Chatway"==t.channel_type)t.url="#",t.target="";else if("Contact_Us"==t.channel_type)!function(t,a,n,c){let i="",s=It(),o="";c.is_google_analytics_enabled&&(o+=" chaty-app-ga-enabled "),i+="<div style='display:none;' class='chaty-app-outer-forms chaty-app-form-"+a+"' data-channel='"+t.channel_type+"' id='chaty-app-form-"+a+"-"+t.channel_type+"' data-widget='"+a+"' data-index='"+n+"'>",i+="<div class='chaty-app-form'>",i+="<div class='chaty-app-form-body'>",i+=`<div role='button' id="hide-form-${a}
1" dir="${B(t.contact_form.title)}" class='close-contact-form'><svg width='15' height='9' viewBox='0 0 15 9' fill='none' xmlns='http://www.w3.org/2000/svg'> <path d='M1 1L7.31429 8L14 1' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/> </svg></div>`,i+=`<div id="chaty-app-form-title-${a}" dir="${B(t.contact_form.title)}" class='chaty-app-form-title chaty-app-contact-form-title'></div>`,i+=`<form class='chaty-app-contact-form${o}' action='' method='post' data-id='${a}' data-user='${s}'>`,i+="<div class='chaty-app-form-info'>",i+="<div class='chaty-app-form-data' id='chaty-app-form-data-"+a+"'>",i+="</div>",i+="<div class='chaty-app-form-ajax-message chaty-app-form-ajax-"+a+"'>",i+="</div>",i+="</div>",i+="<div class='chaty-app-form-data-response'>",i+="<div class='chaty-app-form-success'>",i+="<img src='"+e+"images/form-success.png' />",i+="<div class='chaty-app-form-ajax-message chaty-app-form-ajax-"+a+"'>",i+="</div>",i+="</div>",i+="<div class='chaty-app-form-other-button'>",i+="<button type='button' name='button' class='chaty-app-another-form-button'>Submit another form</button>",i+="</div>",i+="</div>",i+="</form>",i+="</div>",i+="</div>",i+="</div>",F(`chaty-app-element-${t.channel_type}-${a}`,i),$("chaty-app-form-title-"+a)&&(I("chaty-app-form-title-"+a).innerHTML=O(t.contact_form.title));let l,p=I("chaty-app-form-data-"+a);Object.keys(t.contact_form.form_fields).forEach((function(e,n){if(l="",(n=t.contact_form.form_fields[e]).is_active){let t="";if("name"==e?(t="Name",x(n.field_title)||(t=O(n.field_title)),l="<label for='chaty-app-input-"+e+"-"+a+"'>"+t+"</label>",l+="<input type='text' name='"+e+"' class='chaty-app-input-field chaty-app-input-"+e+"' id='chaty-app-input-"+e+"-"+a+"' />"):"email"==e?(t="Email",x(n.field_title)||(t=O(n.field_title)),l="<label for='chaty-app-input-"+e+"-"+a+"'>"+t+"</label>",l+="<input type='email' name='"+e+"' class='chaty-app-input-field chaty-app-input-"+e+"' id='chaty-app-input-"+e+"-"+a+"' />"):"phone"==e?(t="Phone",x(n.field_title)||(t=O(n.field_title)),l="<label for='chaty-app-input-"+e+"-"+a+"'>"+t+"</label>",l+="<input type='text' name='"+e+"' class='chaty-app-input-field chaty-app-input-"+e+"' id='chaty-app-input-"+e+"-"+a+"' />"):"message"==e&&(t="Message",x(n.field_title)||(t=O(n.field_title)),l="<label for='chaty-app-input-"+e+"-"+a+"'>"+t+"</label>",l+="<textarea name='"+e+"' class='chaty-app-input-field chaty-app-textarea chaty-app-input-"+e+"' id='chaty-app-input-"+e+"-"+a+"' ></textarea>"),!x(l)){p.innerHTML+="<div class='chaty-app-form-field'>"+l+"</div>";let t=I("chaty-app-input-"+e+"-"+a);t.setAttribute("placeholder",n.value),t.setAttribute("dir",B(n.value)),n.is_required&&(t.classList.add("is-required"),t.setAttribute("required",!0))}}}));let r="";p.innerHTML+="<div class='chaty-app-form-field'><button id='form-button-"+a+"' type='submit' name='submit' dir='"+B(t.contact_form.submit_button_text)+"' class='chaty-app-form-button' ><span class='chaty-app-form-loader'></span><span class='button-text'>"+O(t.contact_form.submit_button_text)+"</span></button></div>",r+="#chaty-app-form-"+a+"-"+t.channel_type+" .chaty-app-form-button {background:"+t.contact_form.submit_btn_bg_color+"}",r+="#chaty-app-form-"+a+"-"+t.channel_type+" .chaty-app-another-form-button {background: "+t.contact_form.submit_btn_bg_color+"}",r+="#chaty-app-form-"+a+"-"+t.channel_type+" .chaty-app-contact-form-title {background-color: "+t.contact_form.submit_btn_bg_color+"}",r+="#chaty-app-form-"+a+"-"+t.channel_type+" input:focus {border-color:"+t.contact_form.submit_btn_bg_color+"}",r+="#chaty-app-form-"+a+"-"+t.channel_type+" textarea:focus {border-color:"+t.contact_form.submit_btn_bg_color+"}",r+="#chaty-app-form-"+a+"-"+t.channel_type+" .chaty-app-form-button {color: "+t.contact_form.submit_btn_txt_color+"}",x(r)||H(r)}(t,c,i,s),t.url="#",t.target="",o+=" has-chaty-app-box chaty-app-contact-form-button";else if("WhatsApp"==t.channel_type)if(b(t.has_welcome_message))t.url="#",t.target="",o+=" has-chaty-app-box chaty-app-whatsapp-form-button",function(t,a,n,c){t.value=t.value.replace(/ /g,"");
1let i="https://web.whatsapp.com/send",s="";l?i="https://api.whatsapp.com/send":(i=b(t.is_use_web_version)?"https://web.whatsapp.com/send":"https://api.whatsapp.com/send",s="_blank");let o="";c.is_google_analytics_enabled&&(o+=" chaty-app-ga-enabled ");const p=t.heading?t.heading:"",r=`\n <div class='chaty-app-whatsapp-header' dir='${B(p)}'>\n <img width="32" height="32" loading="lazy" src="${e}images/wa-logo.png" />\n <div class='chaty-app-whatsapp-title'>${p}</div>\n <div class='chaty-app-whatsapp-close-btn'>\n <svg width="15" height="9" viewBox="0 0 15 9" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M1 1L7.31429 8L14 1" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path> </svg>\n </div>\n </div>\n `,h=x(t.chat_welcome_message)?"":`\n <span class="welcome-message">${t.chat_welcome_message}</span>\n `,d=x(t.profile_name)?"":`\n <span class="profile-name">${O(t.profile_name)}</span>\n `,y=x(t.profile_image_url)?"":`\n <img \n class='chaty-app-whatsapp-profile' \n width="28" \n height="28" \n src="${t.profile_image_url}" \n loading="lazy" \n alt="${t.title}" \n />\n `,g={"chaty-app-whatsapp-body":!0,"has-header":!x(t.heading)},u={"chaty-app-whatsapp-message":!0,"has-profile-image":!x(t.profile_image_url),"hide-whatsapp-message":x(t.profile_image_url)&&x(t.chat_welcome_message)&&x(t.profile_name)},m=x(h)?`<div class="${pt(g)}"></div>`:`\n <div class="${pt(g)}" dir='${B(h)}'> \n ${y}\n <div class="${pt(u)}">\n ${d}\n ${h}\n <span class="time">${function(){const t=new Date;return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}()}</span>\n </div>\n </div>`,f=x(t.wa_placeholder_text)?"":t.wa_placeholder_text,w=(_=[r,m,`\n <div class="chaty-app-whatsapp-footer" dir='${B(h)}'>\n <form \n action="${i}" \n target="${s}" \n class='whatsapp-chaty-app-form${o}'' \n data-widget="${a}"\n data-channel="${t.channel_type}"\n >\n <div class='chaty-app-whatsapp-data'>\n <input placeholder="${O(f)}" name='text' type='text' class='csass-whatsapp-input' id='csass-whatsapp-input-${a}' />\n <button type='submit' class="whatsapp-chaty-app-button" >\n <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">\n <g clip-path="url(#clip0_9452_6982)">\n <path d="M18.5703 9.99996L2.66037 17.6603L5.60665 9.99996L2.66037 2.33963L18.5703 9.99996Z" fill="white" stroke="white" stroke-width="1.6625" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M8.24069 9.99947L3.07723 9.99992" stroke="#C6D7E3" stroke-width="1.6625" stroke-linecap="round" stroke-linejoin="round"/>\n </g>\n <defs>\n <clipPath id="clip0_9452_6982">\n <rect width="20" height="20" fill="white"/>\n </clipPath>\n </defs>\n </svg>\n </button>\n </div>\n <input type='hidden' name='phone' value='${t.value}' />\n </form>\n </div>\n `],`\n <div \n style='display:none;' \n class='chaty-app-outer-forms chaty-app-whatsapp-outer-forms chaty-app-form-${a}' \n data-channel='${t.channel_type}' \n id='chaty-app-form-${a}-${t.channel_type}' \n data-widget='${a}' data-index='${n}'\n >\n <div class='chaty-app-whatsapp-form'>\n ${_.join("")}\n </div>\n </div>\n `);var _;if(F(`chaty-app-element-${t.channel_type}-${a}`,w),!x(t.pre_set_message)){let e=t.pre_set_message,n=document.title;if(x(n)?(e=e.replace(/{title}/g,""),e=e.replace(/(title)/g,"")):(e=e.replace(/{title}/g,n),e=e.replace(/(title)/g,n)),e=e.replace(/{url}/g,window.location),e=e.replace(/(url)/g,window.location),e=e.replace(/{URL}
1/g,window.location),e=e.replace(/(URL)/g,window.location),$(`csass-whatsapp-input-${a}`)){let t=I(`csass-whatsapp-input-${a}`);t.value=e,t.setAttribute("dir",B(e))}}}(t,c,i,s);else{t.value=t.value.replace(/ /g,"");let e="";if(!x(t.pre_set_message)){e=decodeURI(t.pre_set_message);let a=document.title;x(a)?(e=e.replace(/{title}/g,""),e=e.replace(/(title)/g,"")):(e=e.replace(/{title}/g,a),e=e.replace(/(title)/g,a)),e=e.replace(/{url}/g,window.location),e=e.replace(/{URL}/g,window.location),e=e.replace(/(URL)/g,window.location),e=e.replace(/(url)/g,window.location),e=encodeURIComponent(e)}l?t.url=""!=e?"https://api.whatsapp.com/send/?phone="+t.value+"&text="+e:"https://api.whatsapp.com/send/?phone="+t.value:""!=e?b(t.is_use_web_version)&&!l?(t.target="_blank",t.url="https://web.whatsapp.com/send?phone="+t.value+"&text="+e):t.url="https://api.whatsapp.com/send/?phone="+t.value+"&text="+e:b(t.is_use_web_version)&&!l?(t.target="_blank",t.url="https://web.whatsapp.com/send?phone="+t.value):t.url="https://api.whatsapp.com/send/?phone="+t.value}else if("WeChat"==t.channel_type)x(t.qr_code_image_url)||(function(t,e,a){let n="";n+="<div style='display:none;' class='chaty-app-outer-forms chaty-app-form-"+e+"' data-channel='"+t.channel_type+"' id='chaty-app-form-"+e+"-"+t.channel_type+"' data-widget='"+e+"' data-index='"+a+"'>",n+="<div class='chaty-app-form'>",n+="<div class='chaty-app-form-body'>",n+="<div role='button' class='close-chaty-app-form close-wechat-form is-whatsapp-btn'><div class='chaty-app-close-button'><span class='chaty-app-sr-only'>Hide</span></div></div>",n+="<div class='qr-code-image'><img src='"+t.qr_code_image_url+"' alt='"+t.title+"' /></div>",n+="</div>",n+="</div>",n+="</div>",F(`chaty-app-element-${t.channel_type}-${e}`,n)}(t,c,i),t.url="#",t.target="",o+=" has-chaty-app-box chaty-app-qr-code-form");else if("Email"==t.channel_type){if(!x(t.mail_subject)){let e=decodeURI(t.mail_subject),a=document.title;x(a)?(e=e.replace(/{title}/g,""),e=e.replace(/(title)/g,"")):(e=e.replace(/{title}/g,a),e=e.replace(/(title)/g,a)),e=e.replace(/{url}/g,window.location),e=e.replace(/{URL}/g,window.location),e=e.replace(/(url)/g,window.location),e=e.replace(/(URL)/g,window.location),e=encodeURIComponent(e),t.url+="?subject="+e}}else if("Viber"==t.channel_type&&l){let e=t.value;e=e.replace("+",""),navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&(e="+"+e),e="viber://chat?number="+e,t.url=e}x(t.click_event)||(p="",t.target="",t.url=t.click_event)}let r=t.hover_text;return x(t.hover_text)&&(r=t.channel),b(s.is_google_analytics_enabled)&&(o+=" has-gae"),x(t.hover_text)&&(t.hover_text=""),"#"==t.url||"javascript:;"==t.url?'<button type="button" id="channel-'+t.channel_type+"-"+c+'" aria-label="'+r+'" data-channel="'+t.channel_type+'" class="chaty-app-tooltip '+t.channel_type+"-channel chaty-app-link channel-"+c+"-"+t.channel_type+" pos-"+n+o+'" dir="'+B(t.hover_text)+'" data-form="chaty-app-form-'+c+"-"+t.channel_type+'" data-hover="'+t.hover_text+'">'+a+'<span class="chaty-app-sr-only">'+O(r)+"</span></button>":'<a id="channel-'+t.channel_type+"-"+c+'" aria-label="'+r+'" data-channel="'+t.channel_type+'" href="'+t.url+'" '+p+' target="'+t.target+'" class="chaty-app-tooltip '+t.channel_type+"-channel chaty-app-link channel-"+c+"-"+t.channel_type+" pos-"+n+o+'" dir="'+B(t.hover_text)+'" data-form="chaty-app-form-'+c+"-"+t.channel_type+'" data-hover="'+t.hover_text+'">'+a+'<span class="chaty-app-sr-only">'+O(r)+"</span></a>"}function yt(t){if(""!=t.custom_image_url&&"null"!=t.custom_image_url&&!x(t.custom_image_url))return"<span aria-hidden='true' class='chaty-app-svg'><img src='"+t.custom_image_url+"' alt='"+t.hover_text+"' /></span>";let e=t.svg_icon;return"Chatway"==t.channel&&(e=function(t){switch(t){case"icon_2":return'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"> <path class="color-element" d="M32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32C24.8366 32 32 24.8366 32 16Z" /> <path fill-rule="evenodd" clip-rule="evenodd" d="M12.652 7H22.788C24.0225 7 25.0621 8.03959 24.9971 9.27411V20.9695C24.9971 21.2294 24.8671 21.4244 24.6723 21.5543H24.4773C24.2174 21.5543 24.1524 21.5543 24.0225 21.4243L22.788 20.1898V12.6528C22.788 10.7686 21.2935 9.27411 19.4093 9.27411H10.3778C10.3778 8.03959 11.4174 7 12.652 7ZM9.27411 10.3793H19.4101C20.6447 10.3793 21.6842 11.4189 21.6842 12.6534V24.4787C21.6842 24.7386 21.5543 24.9335 21.3593 25.0635H21.1645C20.9045 25.0635 20.8395 25.0635 20.7096 24.9335L17.4609 21.6848H9.27411C8.03959 21.6848 7 20.6452 7 19.4107V12.6534C7 11.4189 8.03959 10.3793 9.27411 10.3793Z" fill="white"/> </svg>';case"icon_3":return'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path class="color-element" d="M32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32C24.8366 32 32 24.8366 32 16Z" /><path d="M14.3145 8H17.6855C19.5936 8 21.5018 8.76327 22.8374 10.1626C24.1731 11.4982 25 13.4064 25 15.3145C25 19.1308 22.0742 22.3109 18.2579 22.6289V25.4276C18.2579 25.6819 18.1308 25.8728 17.9399 26C17.8127 26 17.8127 26 17.6855 26C17.5583 26 17.3675 25.8728 17.2403 25.7456L14.3145 22.5654C12.4064 22.5654 10.4982 21.8021 9.16254 20.4028C7.82685 19.0035 7 17.159 7 15.2509C7 11.2438 10.3074 8 14.3145 8ZM20.4841 16.3957C21.1837 16.3957 21.6289 15.9505 21.6289 15.2509C21.6289 14.5513 21.1837 14.106 20.4841 14.106C19.7845 14.106 19.3392 14.5513 19.3392 15.2509C19.4028 15.9505 19.8481 16.3957 20.4841 16.3957ZM16.0318 16.3957C16.7314 16.3957 17.1766 15.9505 17.1766 15.2509C17.1766 14.5513 16.7314 14.106 16.0318 14.106C15.3322 14.106 14.8869 14.5513 14.8869 15.2509C14.8869 15.9505 15.3322 16.3957 16.0318 16.3957ZM11.5159 16.3957C12.2155 16.3957 12.6608 15.9505 12.6608 15.2509C12.6608 14.5513 12.2155 14.106 11.5159 14.106C10.8163 14.106 10.371 14.5513 10.371 15.2509C10.371 15.9505 10.8163 16.3957 11.5159 16.3957Z" fill="white"/></svg>';case"icon_4":return'<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg"> <path class="color-element" d="M32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32C24.8366 32 32 24.8366 32 16Z" /> <path fill-rule="evenodd" clip-rule="evenodd" d="M22.6678 9H9.21263C7.95682 9 7 10.0166 7 11.2126V19.0465C7 20.3023 8.01662 21.2591 9.212
163 21.2591H20.7542L23.9834 23.7996C24.103 23.9192 24.2226 23.9192 24.4019 23.9192H24.6412C24.8804 23.7996 25 23.5604 25 23.381V11.2126C24.8804 10.0166 23.8638 9 22.6678 9ZM20.6208 15.2695C20.8241 15.4601 20.8344 15.7793 20.6438 15.9827C17.7482 19.0713 13.898 18.4179 12.2984 17.714C12.0433 17.6018 11.9275 17.304 12.0397 17.049C12.152 16.7939 12.4498 16.6781 12.7048 16.7903C14.0952 17.4021 17.4211 17.9447 19.9076 15.2925C20.0982 15.0892 20.4175 15.0789 20.6208 15.2695ZM22.3928 15.536C22.3588 15.1276 22.2225 14.5057 21.8355 14.0218C21.6355 13.7718 21.3642 13.5541 21.0078 13.4345C20.652 13.315 20.2472 13.3052 19.7988 13.4129C19.5278 13.4779 19.3609 13.7502 19.4259 14.0212C19.4909 14.2922 19.7633 14.4591 20.0343 14.3941C20.3334 14.3223 20.5415 14.3425 20.6866 14.3912C20.831 14.4396 20.9485 14.5285 21.0475 14.6522C21.2584 14.9159 21.3614 15.3106 21.3872 15.6198C21.4103 15.8975 21.6542 16.1038 21.9319 16.0808C22.2096 16.0576 22.4159 15.8137 22.3928 15.536Z" fill="white"/> </svg>'}return'<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg"> <path class="color-element" d="M60 30C60 13.4314 46.5686 0 30 0C13.4314 0 0 13.4314 0 30C0 46.5686 13.4314 60 30 60C46.5686 60 60 46.5686 60 30Z" fill="#0446DE"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M19.8716 14C16.0765 14 13 17.0755 13 20.8694V38.7756C13 42.5695 16.0765 45.645 19.8716 45.645H24.0183C25.0106 45.645 25.9544 46.0738 26.6069 46.8213L28.9753 49.5343C29.5172 50.1552 30.4828 50.1552 31.0247 49.5343L33.3931 46.8213C34.0456 46.0738 34.9894 45.645 35.9817 45.645H40.1284C43.9235 45.645 47 42.5695 47 38.7756V20.8694C47 17.0755 43.9235 14 40.1284 14H19.8716ZM24.4271 33.7135C23.4988 33.7117 22.52 33.7099 22.52 34.4633C22.52 37.4282 25.6951 41.1912 29.32 41.1912H30.68C34.305 41.1912 37.48 37.4282 37.48 34.4633C37.48 33.7099 36.5012 33.7117 35.5729 33.7135C35.5286 33.7136 35.4842 33.7137 35.44 33.7137H24.56C24.5159 33.7137 24.4716 33.7136 24.4271 33.7135Z" fill="white"></path> </svg>'}(t.chatway_icon)),"<span aria-hidden='true' class='chaty-app-svg'>"+e+"</span>"}let gt=function(t){let e=t.value,a="_blank";return"WhatsApp"==t.channel_type?e=N(t.value):"WeChat"==t.channel_type?(a="",e="#"):"Email"==t.channel_type?(a="",e="mailto:"+t.value):"Facebook_Messenger"==t.channel_type?a=l?"":"_blank":"SMS"==t.channel_type?(a="",e="sms:+"+N(t.value.trim())):"Telegram"==t.channel_type?(e=j(t.value,"@"),e="https://telegram.me/"+e,a="_blank"):"Twitter"==t.channel_type?e="https://twitter.com/"+t.value.trim:"Instagram"==t.channel_type||"Instagram_DM"==t.channel_type?(e="https://www.instagram.com/"+t.value.trim,e="https://ig.me/m/"+t.value.trim):"Phone"==t.channel_type?(a="",e="tel:+"+N(t.value.trim())):"Skype"==t.channel_type?(a="",e="skype:"+t.value.trim+"?chat"):"Snapchat"==t.channel_type?e="https://www.snapchat.com/add/"+t.value.trim:"Vkontakte"==t.channel_type?e="https://vk.me/"+t.value.trim:"Linkedin"==t.channel_type?e="personal"==t.channel_account_type?"https://www.linkedin.com/in/"+t.value.trim:"https://www.linkedin.com/company/"+t.value.trim:"Viber"==t.channel_type?(e=N(t.value.trim()),isNaN(e)||(e=e.replace("+",""),navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&(e="+"+e),e="viber://chat?number="+e),a=""):"TikTok"==t.channel_type&&(e=j(t.value.trim,"@"),e="https://www.tiktok.com/@"+e,a=""),t.value=e,t.url=e,t.target=a,t},ut=function(t){if(b(t.is_agent)){if(t.agents.length&&(!l&&b(t.is_agent_desktop)||l&&b(t.is_agent_mobile))){let e=!1;return Object.keys(t.agents).forEach((function(a,n){x(t.agents[n].value)||(e=!0)})),e}}else if((!l&&b(t.is_desktop)||l&&b(t.is_mobile))&&(""!=t.value||"Contact_Us"==t.channel||"Chatway"==t.channel))return!0;return!1},mt=function(t,e,a,n,c){if(M(t.channel_type)&&(t.channel_type=t.channel),!ut(t))return;let i="";if(!b(t.is_agent)){let s=yt(t),o=dt(t,s,a,e,n,c);return"Contact_Us"==t.channel_type?i+=" has-chaty-app-box":"WhatsApp"==t.channel_type&&b(t.is_default_open)&&f(e,"c-"+t.channel_type)&&(i+=" chaty-app-default-open"),"<div class='chaty-app-channel "+t.channel+"-channel-link"+i+"' id='"+t.channel+"-"+e+"-channel' data-id='"+t.channel_type+"-"+e+"' data-widget='"+e+"' data-channel='"+t.channel+"'>"+o+"</div>"}if(t.agents.length){let o=0,p=[];
1if(Object.keys(t.agents).forEach((function(e,a){""!=t.agents[a].value&&(o++,p=e)})),o>0){let o,p;return function(t,e){var a="",n=0;null==n&&(n=-1),a+="<div style='display:none;' class='chaty-app-outer-forms chaty-app-agent-data chaty-app-agent-data-"+e+" chaty-app-form-"+e+"' data-channel='"+t.channel_type+"' id='chaty-app-form-"+e+"-"+t.channel_type+"' data-widget='"+e+"' data-index='"+n+"'>",a+="<div class='chaty-app-form'>",a+="<div class='chaty-app-form-body'>",a+="<div role='button' dir='"+B(t.agent_header_text)+"' class='chaty-app-close-agent-list'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 330 330' xmlns:v='https://vecta.io/nano'><path d='M325.607 79.393c-5.857-5.857-15.355-5.858-21.213.001l-139.39 139.393L25.607 79.393c-5.857-5.857-15.355-5.858-21.213.001s-5.858 15.355 0 21.213l150.004 150a15 15 0 0 0 21.212-.001l149.996-150c5.859-5.857 5.859-15.355.001-21.213z'/></svg></div>",a+="<div class='chaty-app-agent-header agent-info-"+t.channel+" agent-info-"+e+"-"+t.channel+"' dir='"+B(t.agent_header_text)+"'>",x(t.agent_header_text)||(a+="<div class='agent-main-header'>"+O(t.agent_header_text)+"</div>"),x(t.agent_sub_header_text)||(a+="<div class='agent-sub-header'>"+O(t.agent_sub_header_text)+"</div>"),a+="</div>",a+="<div class='chaty-app-agent-body agents-body-"+e+" agent-body-"+e+"-"+t.channel+"'>",Object.keys(t.agents).forEach((function(n,c){if(""!=(n=t.agents[c]).value){var i=t.svg_icon;x(n.custom_image_url)||(i="<img class='chaty-app-agent-img' src='"+n.custom_image_url+"' alt='"+n.agent_title+"' />");var o=function(t,e,a,n,c,i){var s=t.value,o="_blank";if("WhatsApp"==e.channel_type){var p=N(t.value);l?(o="",s="https://wa.me/"+p):(o="_blank",s="https://web.whatsapp.com/send/?phone="+p)}else"WeChat"==e.channel_type?(o="",s="#"):"Email"==e.channel_type?(o="",s="mailto:"+t.value):"Facebook_Messenger"==e.channel_type?o=l?"":"_blank":"SMS"==e.channel_type?(o="",s="sms:+"+N(t.value.trim())):"Telegram"==e.channel_type?(s="https://telegram.me/"+(s=j(t.value,"@")),o="_blank"):"Twitter"==e.channel_type?(t.value=t.value.replace("https://twitter.com/",""),s="https://twitter.com/"+t.value.trim()):"Instagram"==e.channel_type?(t.value=t.value.replace("https://www.instagram.com/",""),t.value=t.value.replace("https://ig.me/m/",""),s="https://www.instagram.com/"+t.value.trim()):"Instagram_DM"==e.channel_type?(t.value=t.value.replace("https://www.instagram.com/",""),t.value=t.value.replace("https://ig.me/m/",""),s="https://ig.me/m/"+t.value.trim()):"Phone"==e.channel_type?(o="",s="tel:+"+N(t.value.trim())):"Skype"==e.channel_type?(o="",s="skype:"+t.value.trim()+"?chat"):"Snapchat"==e.channel_type?s="https://www.snapchat.com/add/"+t.value.trim():"Vkontakte"==e.channel_type?s="https://vk.me/"+t.value.trim():"Linkedin"==e.channel_type?s="personal"==t.channel_account_type?"https://www.linkedin.com/in/"+t.value.trim():"https://www.linkedin.com/company/"+t.value.trim():"Viber"==e.channel_type?(s=N(t.value.trim()),isNaN(s)||(s=s.replace("+",""),navigator.userAgent.match(/(iPod|iPhone|iPad)/)&&(s="+"+s),s="viber://chat?number="+s),o=""):"TikTok"==e.channel_type&&(s="https://www.tiktok.com/@"+(s=j(t.value.trim(),"@")),o="");return i=x(i)?"":O(i),"#"==s||"javascript:;"==s?"<button type='button'><span class='chaty-app-agent-icon'>"+c+"</span><span class='chaty-app-agent-title'>"+i+"</span></button>":"<a href='"+s+"' target='"+o+"'><span class='chaty-app-agent-icon'>"+c+"</span><span class='chaty-app-agent-title'>"+i+"</span></a>"}(n,t,0,0,i,n.agent_name);a+="<div dir='"+B(n.agent_name)+"' class='chaty-app-agent agent-info-"+t.channel+" agent-info-"+e+"-"+t.channel+" agent-info-"+c+"'>"+o+"</div>"}s+=".agent-info-"+e+"-"+t.channel+".agent-info-"+c+" .chaty-app-agent-icon img { background-color: "+n.icon_color+"; } ",("Instagram"!=t.channel&&"Instagram_DM"!=t.channel||"#ffffff"!=n.icon_color&&"#fff"!=n.icon_color)&&(s+=".agent-info-"+e+"-"+t.channel+".agent-info-"+c+" .chaty-app-agent-icon .color-element { fill: "+n.icon_color+"; } "),s+=".agent-info-"+e+"-"+t.channel+".agent-info-"+c+" .chaty-app-custom-icon { background-color: "+n.icon_color+"; } "})),a+="</div>",a+="</div>",a+="</div>",a+="</div>",x(t.agent_head_bg_color)||(s+=".chaty-app-agent-header.agent-info-"+e+"-"+t.channel+" { background-color: "+t.agent_head_bg_color+"; } "),x(t.agent_head_text_color)||(s+=".chaty-app-agent-header.agent-info-"+e+"-"+t.channel+" { color: "+t.agent_head_text_color+" } ",s+="#chaty-app-form-"+e+"-"+t.channel+" .chaty-app-close-agent-list svg { fill: "+t.agent_head_text_color+" } "),F(`chaty-app-element-${t.channel_type}-${e}`,a)}(t,e),o=yt(t),p=dt(t,o,a,e,n,c),("Instagram"!=t.channel&&"Instagram_DM"!=t.channel||"#ffffff"!=t.icon_color&&"#fff"!=t.icon_color)&&(s+=".chaty-app-agent-"+e+"-"+t.channel+" .color-element {fill: "+t.icon_color+"; color: "+t.icon_color+";}"),s+=".chaty-app-agent-"+e+"-"+t.channel+" .chaty-app-custom-icon { background-color: "+t.icon_color+";}",s+=".chaty-app-agent-"+e+"-"+t.channel+" .chaty-app-svg-img { background-color: "+t.icon_color+";}","<div data-form='chaty-app-form-"+e+"-"+t.channel_type+"' class='chaty-app-channel chaty-app-agent-button chaty-app-agent-"+e+"-"+t.channel+" "+t.channel+"-channel "+t.channel+"-channel-link"+i+"' id='"+t.channel+"-"+e+"-channel' data-id='"+t.channel_type+"-"+e+"' data-widget='"+e+"' data-channel='"+t.channel+"'>"+p+"</div>"}}};function ft(t,e){if(!x(e)&&$(e)){let t=I(e),a=t.getAttribute("data-widget"),n=A(a),c=S(a);if(t.classList.contains("active"))t.classList.remove("active"),n.classList.remove("form-open"),c.classList.contains("cssas-no-close-button")&&c.classList.add("chaty-app-open");else{t.classList.add("is-active"),n.classList.add("form-open"),c.classList.remove("chaty-app-open");let e=document.getElementById("cta-close-"+t.getAttribute("data-widget")).innerHTML;$("cta-btn-"+a)&&(I("cta-btn-"+a).innerHTML=e),t.classList.add("active")}}}let wt=t+"widgets/click",_t=t+"widgets/leads";function vt(t){let e=f(t,"c-widget"),a=J(),n=A(t),c=S(t);if(e&&n&&c&&!a){let a=A(t).getAttribute("data-user"),n="",i=c.classList.contains("has-single")?1:0;c.querySelectorAll(".chaty-app-link").forEach((function(a,c){let s=a.getAttribute("data-channel");
1if(!x(s)){let a=f(t,"v-"+s);x(s)||(a&&_(t,"v-"+s),i&&(e=f(t,"c-"+s),e&&_(t,"c-"+s)),n="&channels[]="+s)}})),_(t,"c-widget");let s={widgetId:t,userId:a,isMobile:l,isSingle:i};s=L(s)+n;let o=new XMLHttpRequest;o.open("POST",wt,!0),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.onreadystatechange=function(){},o.send(s)}}let bt,xt=function(t){let e=A(t);if(e){let a=e.getAttribute("data-animation"),n=I("chaty-app-i-trigger-"+t);n&&n.querySelectorAll(".chaty-app-channel .chaty-app-svg").forEach((function(t,e){t.classList.remove("chaty-animation-"+a)})),$("chaty-cta-"+t)&&document.getElementById("chaty-cta-"+t).classList.remove("chaty-animation-"+a),n.querySelectorAll(".ch-pending-msg").forEach((function(t,e){t.remove()}))}},Lt=function(t){if(!x(t)){if(window.hasOwnProperty("gtag")&>ag("event","chaty_"+t,{eventCategory:"chaty_"+t,event_action:"chaty_"+t,method:"chaty_"+t}),window.hasOwnProperty("ga")&&window.ga&&"function"==typeof window.ga.getAll&&window.ga.getAll()[0]){let e=window.ga.getAll()[0];e&&e.send("event","click",{eventCategory:"chaty_"+t,eventAction:"chaty_"+t,method:"chaty_"+t})}window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"chaty_"+t,event_category:"chaty_"+t,event_label:"chaty_event",value:t})}},kt=function(t,e){let n=[],c=0,i=null,p=0,r=null;1===t.channels.length&&"Chatway"===t.channels[0].channel&&function(){if(U("has--not--chatway"),U("chaty-app-has-chatway"),U("has--chaty"),!
1document.getElementById("chatway")&&a)try{if(-1!==a.indexOf("chatway_user_identifier")){const t=JSON.parse(a);a=t.chatway_user_identifier}if(a){let t=document.createElement("script");t.src=y+a,t.id="chatway",t.async=!0,document.head.appendChild(t)}}catch(t){a=!1}}(),Object.keys(t.channels).forEach((function(e){let a=t.channels[e];ut(a)&&("Chatway"===a.channel?(r=a.chatway_position,"outside-chaty"===r&&(d=1),"outside-chaty"!==r&&(i=rt(a),"inside-chaty"!==r&&"chat-view"!==t.settings.cta_type||(n.push(rt(a)),c++),p=1)):(n.push(rt(a)),c++))})),1!==c||!p||"above-chaty"===r&&"chat-view"!==t.settings.cta_type||(c=0);let g="";if(p&&(P("chaty-app-has-chatway"),g="has-chatway-channel"),t.channels=n,o||(t.settings.cta_type="simple-view"),c&&!A(t.id)){C();let a=X(t.settings);if(a="right"==a?"right":"left","chat-view"==t.settings.cta_type){let n="<div style='display: none' class='chaty-app chaty-app-has-chat-view chaty-app-id-"+t.id+" chaty-app-widget-"+t.id+" chaty-app-key-"+e+"' id='chaty-app-widget-"+t.id+"' data-key='"+e+"' data-id='"+t.id+"' data-identifier='"+t.identifier+"' data-user='"+t.user_id+"' ><div id='chaty-app-"+t.id+"' class='chaty-app-widget chaty-app-"+t.id+" "+a+"-position'><div class='chaty-app-channels'><div class='chaty-app-channel-list' id='chaty-app-channels-"+t.id+"'></div><div class='chaty-app-i-trigger'><div id='chaty-app-i-trigger-"+t.id+"' data-widget='"+t.id+"' class='chaty-app-widget-trigger "+g+"'></div></div></div></div></div>";E(n),t.settings.icon_view="vertical",function(t){let e=t.id,a=t.id,n=T(t.settings.cta_body_text),c=t.settings.cta_heading_text,i=document.title;x(i)?(n=n.replace(/{title}/g,""),c=c.replace(/{title}/g,""),n=n.replace(/(title)/g,""),c=c.replace(/(title)/g,"")):(n=n.replace(/{title}/g,i),c=c.replace(/{title}/g,i),n=n.replace(/(title)/g,i),c=c.replace(/(title)/g,i)),n=n.replace(/{url}/g,"<a target='_blank' href='"+window.location.href+"'>"+window.location.href+"</a>"),n=n.replace(/(url)/g,"<a target='_blank' href='"+window.location.href+"'>"+window.location.href+"</a>"),c=c.replace(/{url}/g,"<a target='_blank' href='"+window.location.href+"'>"+window.location.href+"</a>"),c=c.replace(/(url)/g,"<a target='_blank' href='"+window.location.href+"'>"+window.location.href+"</a>");let s="";s+="<div style='display:none;' class='chaty-app-chat-view chaty-app-chat-view-"+e+" chaty-app-form-"+e+"' data-channel='chaty-app-chat-view' id='chaty-app-form-"+e+"-chaty-app-chat-view' data-widget='"+e+"' data-index='"+a+"'>",s+="<div class='chaty-app-view-body'>",s+=`<div class='chaty-app-view-header' dir='${B(c)}'>`+c,s+="<div role='button' class='chaty-app-close-view-list'><svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 330 330'><path d='M325.607 79.393c-5.857-5.857-15.355-5.858-21.213.001l-139.39 139.393L25.607 79.393c-5.857-5.857-15.355-5.858-21.213.001s-5.858 15.355 0 21.213l150.004 150a15 15 0 0 0 21.212-.001l149.996-150c5.859-5.857 5.859-15.355.001-21.213z'/></svg></div>",s+="</div>",s+=`<div class='chaty-app-view-content' dir='${B(n)}'>`,s+="<div class='chaty-app-top-content'>",s+=n,s+="</div>",s+="<div class='chaty-app-view-channels' id='chaty-app-view-channels-"+e+"'>",s+="</div>",s+="</div>",s+="</div>",s+="</div>",A(e).innerHTML+=s}(t)}else{let n="<div style='display: none' class='chaty-app chaty-app-id-"+t.id+" chaty-app-widget-"+t.id+" chaty-app-key-"+e+"' id='chaty-app-widget-"+t.id+"' data-key='"+e+"' data-id='"+t.id+"' data-identifier='"+t.identifier+"' data-user='"+t.user_id+"'><div id='chaty-app-"+t.id+"' class='chaty-app-widget chaty-app-"+t.id+" "+a+"-position'><div class='chaty-app-channels'><div class='chaty-app-channel-list' id='chaty-app-channels-"+t.id+"'></div><div class='chaty-app-i-trigger'><div id='chaty-app-i-trigger-"+t.id+"' data-widget='"+t.id+"' class='chaty-app-widget-trigger "+g+"'></div></div></div></div></div>";E(n)}let n=f(t.id,"v-widget"),o=A(t.id),d=S(t.id);if(p&&d.classList.add(r),p&&"above-chaty"===r){d.classList.add("has-chatway");let a=Z(t),n=mt(i,t.id,a,e,t.settings);I("chaty-app-channels-"+t.id)&&(document.getElementById("chaty-app-channels-"+t.id).innerHTML+=n,s+="#chaty-app-widget-"+t.id+" ."+i.channel_type+"-channel .color-element{ fill: "+i.icon_color+"; color: "+i.icon_color+";}",s+="#chaty-app-widget-"+t.id+" ."+i.channel_type+"-channel .chaty-app-svg { background-color: "+i.icon_color+";}",s+=".channel-"+t.id+"-"+i.channel_type+" .chaty-app-svg { background-color: "+i.icon_color+";}")}1==t.channels.length&&"chat-view"!=t.settings.cta_type?function(t,e){let a=X(t.settings),n=t.settings;a="right"==a?"right":"left";let c=Z(t);if("vertical"!=t.settings.icon_view&&(c="right"!=a?"right":"left"),I("chaty-app-i-trigger-"+t.id)){let a=I("chaty-app-i-trigger-"+t.id),i=t.channels[0],o=mt(i,t.id,c,e,n);a.innerHTML+=o,a.classList.add("single-channel"),I("chaty-app-"+t.id)&&I("chaty-app-"+t.id).classList.add("has-single");let l=T(t.settings.cta_text);a.querySelectorAll(".chaty-app-tooltip").forEach((function(t,e){t.classList.remove("chaty-app-tooltip")}));let p=f(t.id,"c-widget");a.querySelectorAll(".chaty-app-channel a, .chaty-app-channel button.chaty-app-link").forEach((function(e,a){if(e.classList.add("chaty-app-tooltip"),e.classList.add("pos-"+c),p||"all_time"==t.settings.show_cta){e.classList.add("active");let a=`<span class='on-hover-text' dir='${B(l)}'>${l}</span>`;e.innerHTML+=a,e.classList.add("has-on-hover"),e.classList.add(t.settings.show_cta),e.setAttribute("data-text",l)}x(i.hover_text)||e.setAttribute("data-hover",i.hover_text)}));let r='<div class="chaty-app-channel chaty-app-cta-close chaty-app-tooltip pos-'+c+'" dir='+B(t.settings.close_text)+' data-hover="'+t.settings.close_text+'"><div class="chaty-app-cta-button"><button id="cta-close-'+t.id+'" type="button"><span aria-hidden="true" class="chaty-app-svg"><svg viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"><ellipse cx="26" cy="26" rx="26" ry="26" fill="'+t.settings.widget_color+'"></ellipse><rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(18.35 15.6599) scale(0.998038 1.00196) rotate(45)" fill="white"></rect><rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(37.5056 18.422) scale(0.998038 1.00196) rotate(135)" fill="white"></rect></svg></span><span class="chaty-app-sr-only">Hide Chaty Channels</span></button></div></div>';x(t.settings.close_text)&&(r='<div class="chaty-app-channel chaty-app-cta-close"><div class="chaty-app-cta-button"><button id="cta-close-'+t.id+'" type="button"><span aria-hidden="true" class="chaty-app-svg"><svg viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"><ellipse cx="26" cy="26" rx="26" ry="26" fill="'+t.settings.widget_color+'"></ellipse><rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(18.35 15.6599) scale(0.998038 1.00196) rotate(45)" fill="white"></rect><rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(37.5056 18.422) scale(0.998038 1.00196) rotate(135)" fill="white"></rect></svg></span><span class="chaty-app-sr-only">Hide Chaty Channels</span></button></div></div>'),a.innerHTML+=r,s+="#chaty-app-widget-"+t.id+" ."+i.channel_type+"-channel .color-element{ fill: "+i.icon_color+"; color: "+i.icon_color+";}",s+="#chaty-app-widget-"+t.id+" ."+i.channel_type+"-channel .chaty-app-svg { background-color: "+i.icon_color+";}",s+=".channel-"+t.id+"-"+i.channel_type+" .chaty-app-svg { background-color: "+i.icon_color+";}"}}(t,e):function(t,e){let a=X(t.settings),n=t.settings;a="right"==a?"right":"left";let c=Z(t),i="";
1Object.keys(t.channels).forEach((function(a){let o=t.channels[a];M(o.channel_type)&&(o.channel_type=o.channel),"chat-view"==t.settings.cta_type?i+=mt(o,t.id,"top",e,n):i+=mt(o,t.id,c,e,n),s+=".channel-"+t.id+"-"+o.channel_type+" .color-element{ fill: "+o.icon_color+"; color: "+o.icon_color+";}",s+="#chaty-app-widget-"+t.id+" ."+o.channel_type+"-channel .color-element{ fill: "+o.icon_color+"; color: "+o.icon_color+";}",s+="#chaty-app-widget-"+t.id+" ."+o.channel_type+"-channel .chaty-app-svg { background-color: "+o.icon_color+";}",s+=".channel-"+t.id+"-"+o.channel_type+" .chaty-app-svg { background-color: "+o.icon_color+";}",s+="#chaty-app-widget-"+t.id+" .channel-icon-"+o.channel_type+"-channel .chaty-app-svg { background-color: "+o.icon_color+";}",s+=".chaty-app-chat-view-"+t.id+" ."+o.channel_type+"-channel .chaty-app-custom-icon { background-color: "+o.icon_color+"; }",s+=".chaty-app-chat-view-"+t.id+" ."+o.channel_type+"-channel .chaty-app-svg { background-color: "+o.icon_color+";}",s+=".chaty-app-chat-view-"+t.id+" .channel-icon-"+o.channel_type+" .chaty-app-svg { background-color: "+o.icon_color+";}"})),x(i)||("chat-view"==t.settings.cta_type?I("chaty-app-view-channels-"+t.id)&&(document.getElementById("chaty-app-view-channels-"+t.id).innerHTML+=i):I("chaty-app-channels-"+t.id)&&(document.getElementById("chaty-app-channels-"+t.id).innerHTML+=i));let o=f(t.id,"c-widget"),l=function(t){return(""==t.widget_icon||"chat-image"==t.widget_icon&&x(t.widget_icon_url))&&(t.widget_icon="chat-base"),"chat-image"==t.widget_icon?"<span aria-hidden='true' class='chaty-app-svg' style='background: "+t.widget_color+"'><img src='"+t.widget_icon_url+"' alt='Chaty Widget' /></span>":'<span aria-hidden="true" class="chaty-app-svg" >'+function(t,e){switch(t){case"chat-smile":return'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496.8 507.1 54 54" style="enable-background:new -496.8 507.1 54 54;" xml:space="preserve"><style type="text/css">
1.chaty-app-sts1{fill:#FFFFFF;} .chaty-app-sts2{fill:none;stroke:#808080;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}</style><g><circle cx="-469.8" cy="534.1" r="27" fill="'+e+'"/></g><path class="chaty-app-sts1" d="M-459.5,523.5H-482c-2.1,0-3.7,1.7-3.7,3.7v13.1c0,2.1,1.7,3.7,3.7,3.7h19.3l5.4,5.4c0.2,0.2,0.4,0.2,0.7,0.2c0.2,0,0.2,0,0.4,0c0.4-0.2,0.6-0.6,0.6-0.9v-21.5C-455.8,525.2-457.5,523.5-459.5,523.5z"/><path class="chaty-app-sts2" d="M-476.5,537.3c2.5,1.1,8.5,2.1,13-2.7"/><path class="chaty-app-sts2" d="M-460.8,534.5c-0.1-1.2-0.8-3.4-3.3-2.8"/></svg>';case"chat-bubble":return'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496.9 507.1 54 54" style="enable-background:new -496.9 507.1 54 54;" xml:space="preserve"><style type="text/css">.chaty-app-sts1{fill:#FFFFFF;}</style><g><circle cx="-469.9" cy="534.1" r="27" fill="'+e+'"/></g><path class="chaty-app-sts1" d="M-472.6,522.1h5.3c3,0,6,1.2,8.1,3.4c2.1,2.1,3.4,5.1,3.4,8.1c0,6-4.6,11-10.6,11.5v4.4c0,0.4-0.2,0.7-0.5,0.9 c-0.2,0-0.2,0-0.4,0c-0.2,0-0.5-0.2-0.7-0.4l-4.6-5c-3,0-6-1.2-8.1-3.4s-3.4-5.1-3.4-8.1C-484.1,527.2-478.9,522.1-472.6,522.1z M-462.9,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-464.6,534.6-463.9,535.3-462.9,535.3z M-469.9,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-471.7,534.6-471,535.3-469.9,535.3z M-477,535.3c1.1,0,1.8-0.7,1.8-1.8c0-1.1-0.7-1.8-1.8-1.8c-1.1,0-1.8,0.7-1.8,1.8C-478.8,534.6-478.1,535.3-477,535.3z"/></svg>';case"chat-db":return'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.1 54 54" style="enable-background:new -496 507.1 54 54;" xml:space="preserve"><style type="text/css">
1.chaty-app-sts1{fill:#FFFFFF;}</style><g><circle cx="-469" cy="534.1" r="27" fill="'+e+'"/></g><path class="chaty-app-sts1" d="M-464.6,527.7h-15.6c-1.9,0-3.5,1.6-3.5,3.5v10.4c0,1.9,1.6,3.5,3.5,3.5h12.6l5,5c0.2,0.2,0.3,0.2,0.7,0.2c0.2,0,0.2,0,0.3,0c0.3-0.2,0.5-0.5,0.5-0.9v-18.2C-461.1,529.3-462.7,527.7-464.6,527.7z"/><path class="chaty-app-sts1" d="M-459.4,522.5H-475c-1.9,0-3.5,1.6-3.5,3.5h13.9c2.9,0,5.2,2.3,5.2,5.2v11.6l1.9,1.9c0.2,0.2,0.3,0.2,0.7,0.2c0.2,0,0.2,0,0.3,0c0.3-0.2,0.5-0.5,0.5-0.9v-18C-455.9,524.1-457.5,522.5-459.4,522.5z"/></svg>';default:return'<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="-496 507.7 54 54" style="enable-background:new -496 507.7 54 54;" xml:space="preserve"><style type="text/css">.chaty-app-sts1{fill: #FFFFFF;}.chaty-app-st0{fill: #808080;}</style><g><circle cx="-469" cy="534.7" r="27" fill="'+e+'"/></g><path class="chaty-app-sts1" d="M-459.9,523.7h-20.3c-1.9,0-3.4,1.5-3.4,3.4v15.3c0,1.9,1.5,3.4,3.4,3.4h11.4l5.9,4.9c0.2,0.2,0.3,0.2,0.5,0.2 h0.3c0.3-0.2,0.5-0.5,0.5-0.8v-4.2h1.7c1.9,0,3.4-1.5,3.4-3.4v-15.3C-456.5,525.2-458,523.7-459.9,523.7z"/><path class="chaty-app-st0" d="M-477.7,530.5h11.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-11.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,530.8-478.2,530.5-477.7,530.5z"/><path class="chaty-app-st0" d="M-477.7,533.5h7.9c0.5,0,0.8,0.4,0.8,0.8l0,0c0,0.5-0.4,0.8-0.8,0.8h-7.9c-0.5,0-0.8-0.4-0.8-0.8l0,0C-478.6,533.9-478.2,533.5-477.7,533.5z"/></svg>'}}(t.widget_icon,t.widget_color)+"</span>"}(t.settings,t.id),p=t.settings.cta_text;"first_click"==t.settings.show_cta&&(o||(p=""));let r=c;"horizontal"==t.settings.icon_view&&(r="left"==a?"right":"left"),p=T(p),"opened"==t.settings.default_state&&(p="");let h=`<div id="cta-main-${t.id}" class="chaty-app-channel chaty-app-cta-main chaty-app-tooltip pos-${r} active" data-widget="${t.id}" data-hover="${p}"><span class="on-hover-text" dir="${B(p)}">${p}</span><div class="chaty-app-cta-button" id="chaty-cta-${t.id}"><button type="button" id="cta-open-${t.id}" class="open-chaty hide-show-chaty" data-widget="${t.id}">${l}<span class="chaty-app-sr-only">Open Chaty Channels</span></button><button type="button" id="cta-btn-${t.id}" class="open-chaty-app-channel"></button></div></div>`,d=`<div class='chaty-app-channel chaty-app-cta-close chaty-app-tooltip pos-${c}' dir='${B(t.settings.close_text)}' data-hover="${t.settings.close_text}">\n <div class="chaty-app-cta-button"><button type="button" id="cta-close-${t.id}" class="hide-show-chaty" data-widget="${t.id}">\n <span aria-hidden="true" class="chaty-app-svg">\n <svg viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"><ellipse cx="26" cy="26" rx="26" ry="26" fill="${t.settings.widget_color}"></ellipse><rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(18.35 15.6599) scale(0.998038 1.00196) rotate(45)" fill="white"></rect><rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(37.5056 18.422) scale(0.998038 1.00196) rotate(135)" fill="white"></rect></svg>\n </span>\n <span class="chaty-app-sr-only">Hide Chaty Channels</span></button>\n </div>\n </div>`;if(x(t.settings.close_text)&&(d=`<div class='chaty-app-channel chaty-app-cta-close'>\n <div class="chaty-app-cta-button"><button type="button" id="cta-close-${t.id}" class="hide-show-chaty" data-widget="${t.id}">\n <span aria-hidden="true" class="chaty-app-svg">\n <svg viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg"><ellipse cx="26" cy="26" rx="26" ry="26" fill="${t.settings.widget_color}"></ellipse><rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(18.35 15.6599) scale(0.998038 1.00196) rotate(45)" fill="white"></rect><rect width="27.1433" height="3.89857" rx="1.94928" transform="translate(37.5056 18.422) scale(0.998038 1.00196) rotate(135)" fill="white"></rect></svg>\n </span>
1\n <span class="chaty-app-sr-only">Hide Chaty Channels</span></button>\n </div>\n </div>`),I("chaty-app-i-trigger-"+t.id)){let e=I("chaty-app-i-trigger-"+t.id);e.innerHTML+=h,e.innerHTML+=d}}(t,e);var u=f(t.id,"c-widget");if(!u||"opened"==t.settings.default_state&&1!=c||(function(t,e){let a=f(e,"c-widget"),n=t.settings;if(a&&b(n.is_pending_mesg_enabled)&&parseInt(n.pending_mesg_count)>0){let a=n.attention_effect;if(1==t.channels.length){let t=I("chaty-app-i-trigger-"+e);t&&("sheen"==a||"spin"==a||"pulse"==a?t.querySelectorAll(".chaty-app-channel").forEach((function(t,e){t.innerHTML+=`<span class='ch-pending-msg'>${n.pending_mesg_count}</span>`})):t.querySelectorAll(".chaty-app-channel .chaty-app-svg").forEach((function(t,e){t.innerHTML+=`<span class='ch-pending-msg'>${n.pending_mesg_count}</span>`})))}else"bounce"==a||"waggle"==a||"pulse"==a?I("chaty-cta-"+e)&&(document.getElementById("chaty-cta-"+e).innerHTML+=`<span class='ch-pending-msg'>${n.pending_mesg_count}</span>`):I("cta-main-"+e)&&(document.getElementById("cta-main-"+e).innerHTML+=`<span class='ch-pending-msg'>${n.pending_mesg_count}</span>`)}}(t,t.id),function(t,e){if(f(e,"c-widget")&&"none"!=t.settings.attention_effect&&""!=t.settings.attention_effect)if(A(e).setAttribute("data-animation",t.settings.attention_effect),1==t.channels.length){let a=I("chaty-app-i-trigger-"+e);a&&a.querySelectorAll(".chaty-app-channel .chaty-app-svg").forEach((function(e,a){e.classList.add("chaty-animation-"+t.settings.attention_effect)}))}else $("chaty-cta-"+e)&&document.getElementById("chaty-cta-"+e).classList.add("chaty-animation-"+t.settings.attention_effect)}(t,t.id)),"hover"==t.settings.default_state?o.classList.add("open-on-hover"):"opened"==t.settings.default_state&&(d.classList.add("default-open"),!u&&b(t.settings.show_close_button)||d.classList.contains("has-single")||d.classList.add("chaty-app-open")),d.classList.add("cta-"+t.settings.show_cta),"chat-view"==t.settings.cta_type?o.classList.add("has-chat-view"):o.classList.add("has-simple-view"),"opened"!=t.settings.default_state||b(t.settings.show_close_button)||d.classList.add("cssas-no-close-button"),n?b(t.triggers.has_time_delay)&&0==parseInt(t.triggers.time_delay)||b(t.triggers.has_display_after_page_scroll)&&0==parseInt(t.triggers.display_after_page_scroll)?Y(t.id):b(t.triggers.exit_intent)||b(t.triggers.has_time_delay)&&parseInt(t.triggers.time_delay)>0||b(t.triggers.has_display_after_page_scroll)&&parseInt(t.triggers.display_after_page_scroll)>0?(b(t.triggers.has_time_delay)&&parseInt(t.triggers.time_delay)>0&&(K=!0,parseInt(t.triggers.time_delay)>Q&&(Q=t.triggers.time_delay),o.classList.add("on-chaty-app-delay"),o.classList.add("delay-time-"+parseInt(t.triggers.time_delay)),o.setAttribute("data-time",parseInt(t.triggers.time_delay))),b(t.triggers.has_display_after_page_scroll)&&parseInt(t.triggers.display_after_page_scroll)>0&&(tt=!0,o.classList.add("on-chaty-app-scroll"),o.classList.add("page-scroll-"+parseInt(t.triggers.display_after_page_scroll)),o.setAttribute("data-scroll",parseInt(t.triggers.display_after_page_scroll))),b(t.triggers.exit_intent)&&(l?b(t.triggers.has_time_delay)&&parseInt(t.triggers.time_delay)>0||b(t.triggers.has_display_after_page_scroll)&&parseInt(t.triggers.display_after_page_scroll)>0||Y(t.id):(et=!0,o.classList.add("on-chaty-app-exit-intent"),d.innerHTML+="<div class='chaty-app-exit-intent-overlay'></div>"))):Y(t.id):Y(t.id),!x(t.settings.font_family)&&"none"!=t.settings.font_family){let e=t.settings.font_family;h.includes(e)?"System Stack"==e&&(e="-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif"):q(e),s+="#chaty-app-widget-"+t.id+", #chaty-app-widget-"+t.id+" .chaty-app-tooltip:after {font-family: "+e+"}"}H(s),s="",function(t,e,a){let n="",c=t.channels.length;"above-chaty"==e&&c++;let i=function(t,e){switch(t=t.toLowerCase()){case"s":return 44;case"m":return 60;case"l":return 70;case"xl":return 84;case"xxl":return 94;case"custom":return""==(e=parseInt(e))||0==e?60:e}return 60}(t.settings.widget_size,t.settings.custom_widget_size),s=0,o=document.getElementById("chaty-app-"+t.id);if("opened"!=t.settings.default_state||b(t.settings.show_close_button)||(o.classList.add("cssas-no-close-button"),s=1),b(t.settings.has_custom_css)&&!x(t.settings.custom_css)&&(n+=t.settings.custom_css),n+="#chaty-app-widget-"+t.id+" .chaty-app-channel-list .chaty-app-channel {width: "+i+"px; height: "+i+"px; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-channel-list .chaty-app-channel > a {width: "+i+"px; height: "+i+"px; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-channel-list .chaty-app-channel > a .chaty-app-svg {width: "+i+"px; height: "+i+"px; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-channel-list .chaty-app-channel > a img {width: "+i+"px; height: "+i+"px; object-fit: cover;}",n+="#chaty-app-widget-"+t.id+" .chaty-app-i-trigger .chaty-app-cta-button > button {width: "+i+"px; height: "+i+"px; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-i-trigger .chaty-app-cta-button > button .chaty-app-svg {width: "+i+"px; height: "+i+"px; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-i-trigger .chaty-app-channel img {width: "+i+"px; height: "+i+"px; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-i-trigger .chaty-app-channel a {width: "+i+"px; height: "+i+"px; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-i-trigger .chaty-app-widget-trigger {width: "+i+"px; height: "+i+"px; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-i-trigger .chaty-app-channel button {width: "+i+"px; height: "+i+"px; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-i-trigger .chaty-app-channel button .chaty-app-svg {width: "+i+"px; height: "+i+"px; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-i-trigger .chaty-app-channel a .chaty-app-svg {width: "+i+"px; height: "+i+"px; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-channel-list .chaty-app-channel button {width: "+i+"px; height: "+i+"px; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-channel-list .chaty-app-channel .chaty-app-svg {width: "+i+"px; height: "+i+"px; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-channel-list .chaty-app-channel .chaty-app-svg img {width: "+i+"px; height: "+i+"px; }","vertical"==t.settings.icon_view)if(n+="#chaty-app-widget-"+t.id+" .chaty-app-channel-list {height: "+c*(i+8)+"px; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-channel-list {width: "+(i+8)+"px; }",a&&"inside-chaty"==e){let e=0,a=1;
1Object.keys(t.channels).forEach((function(o,l){o=t.channels[l],n+="body.chatway--active #chaty-app-widget-"+t.id+" .chaty-app-open .chaty-app-channel-list .chaty-app-channel."+o.channel+"-channel-link {-webkit-transform: translateY(-"+(i+8)*(c-e-s)+"px); transform: translateY(-"+(i+8)*(c-e-s)+"px);}","Chatway"!=o.channel?n+="body:not(.chatway--active) #chaty-app-widget-"+t.id+" .chaty-app-open .chaty-app-channel-list .chaty-app-channel."+o.channel+"-channel-link {-webkit-transform: translateY(-"+(i+8)*(c-e-a-s)+"px); transform: translateY(-"+(i+8)*(c-e-a-s)+"px);}":a=0,e++}))}else{let a=0;for(a=0;a<=c;a++)n+="#chaty-app-widget-"+t.id+" .chaty-app-open .chaty-app-channel-list .chaty-app-channel:nth-child("+(a+1)+") {-webkit-transform: translateY(-"+(i+8)*(c-a-s)+"px); transform: translateY(-"+(i+8)*(c-a-s)+"px);}";"above-chaty"==e&&(n+="#chaty-app-widget-"+t.id+" .chaty-app-channel-list .Chatway-channel-link {-webkit-transform: translateY(-"+(i+8)*s+"px); transform: translateY(-"+(i+8)*(1-s)+"px);}")}else{o.classList.add("hor-mode"),n+="#chaty-app-widget-"+t.id+" .chaty-app-channel-list {width: "+c*(i+8)+"px; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-channel-list {height: "+i+"px; }";let l=0;if(a&&"inside-chaty"==e){let e=0,a=1;Object.keys(t.channels).forEach((function(o,l){o=t.channels[l],n+="body.chatway--active #chaty-app-widget-"+t.id+" .chaty-app-widget.left-position.hor-mode.chaty-app-open .chaty-app-channel-list .chaty-app-channel:nth-child("+(e+1)+") {-webkit-transform: translateX("+(i+8)*(c-e-s)+"px); transform: translateX("+(i+8)*(c-e-s)+"px);}",n+="body.chatway--active #chaty-app-widget-"+t.id+" .chaty-app-widget.right-position.hor-mode.chaty-app-open .chaty-app-channel-list .chaty-app-channel:nth-child("+(e+1)+") {-webkit-transform: translateX(-"+(i+8)*(c-e-s)+"px); transform: translateX(-"+(i+8)*(c-e-s)+"px);}","Chatway"!=o.channel?(n+="body:not(.chatway--active) #chaty-app-widget-"+t.id+" .chaty-app-widget.left-position.hor-mode.chaty-app-open .chaty-app-channel-list .chaty-app-channel:nth-child("+(e+1)+") {-webkit-transform: translateX("+(i+8)*(c-e-a-s)+"px); transform: translateX("+(i+8)*(c-e-a-s)+"px);}",n+="body:not(.chatway--active) #chaty-app-widget-"+t.id+" .chaty-app-widget.right-position.hor-mode.chaty-app-open .chaty-app-channel-list .chaty-app-channel:nth-child("+(e+1)+") {-webkit-transform: translateX(-"+(i+8)*(c-e-a-s)+"px); transform: translateX(-"+(i+8)*(c-e-a-s)+"px);}"):a=0,e++}))}else{for(l=0;l<=c;l++)n+="#chaty-app-widget-"+t.id+" .chaty-app-widget.left-position.hor-mode.chaty-app-open .chaty-app-channel-list .chaty-app-channel:nth-child("+(l+1)+") {-webkit-transform: translateX("+(i+8)*(c-l-s)+"px); transform: translateX("+(i+8)*(c-l-s)+"px);}",n+="#chaty-app-widget-"+t.id+" .chaty-app-widget.right-position.hor-mode.chaty-app-open .chaty-app-channel-list .chaty-app-channel:nth-child("+(l+1)+") {-webkit-transform: translateX(-"+(i+8)*(c-l-s)+"px); transform: translateX(-"+(i+8)*(c-l-s)+"px);}";"above-chaty"==e&&(n+="#chaty-app-widget-"+t.id+" .chaty-app-widget.left-position.hor-mode .chaty-app-channel-list .Chatway-channel-link {-webkit-transform: translateX("+(i+8)*(1-s)+"px); transform: translateX("+(i+8)*(1-s)+"px);}",n+="#chaty-app-widget-"+t.id+" .chaty-app-widget.right-position.hor-mode .chaty-app-channel-list .Chatway-channel-link {-webkit-transform: translateX(-"+(i+8)*(1-s)+"px); transform: translateX(-"+(i+8)*(1-s)+"px);}")}}n+="#chaty-app-widget-"+t.id+" .chaty-app-chatway-button {width: "+i+"px; height: "+i+"px; }";let l=t.settings.bottom_spacing,p=t.settings.side_spacing,r=X(t.settings),h=r;"custom"==t.settings.position?("left"==r?(n+="#chaty-app-widget-"+t.id+" > .chaty-app-widget {left: "+p+"px}",n+=".chaty-app-outer-forms.pos-left.chaty-app-form-"+t.id+" {left: "+p+"px}",n+=".chaty-app-chat-view.chaty-app-chat-view-"+t.id+" {left: "+p+"px}",h="left"):(n+="#chaty-app-widget-"+t.id+" > .chaty-app-widget {left:auto; right: "+p+"px}",n+=".chaty-app-outer-forms.pos-right.chaty-app-form-"+t.id+" {left: auto; right: "+p+"px}",n+=".chaty-app-chat-view.chaty-app-chat-view-"+t.id+" {left: auto; right: "+p+"px}",h="right"),n+="#chaty-app-widget-"+t.id+" > .chaty-app-widget {bottom: "+l+"px}"):(h=t.settings.position,l=25),function(t,e,a,n){document.querySelectorAll(".chaty-app-form-"+t).length&&document.querySelectorAll(".chaty-app-form-"+t).forEach((function(t,c){t.classList.add("pos-"+e),t.classList.add("form-active"),t.style.bottom=n,"left"==e?(t.style.left=a,t.style.right="auto"):(t.style.right=a,t.style.left="auto")}))}(t.id,h,p,l);var d=i+15+parseInt(l);n+=".chaty-app-outer-forms.active.chaty-app-form-"+t.id+" {-webkit-transform: translateY(-"+d+"px); transform: translateY(-"+d+"px)} ",n+=".chaty-app:not(.form-open)#chaty-app-widget-"+t.id+" .chaty-app-widget.chaty-app-open + .chaty-app-chat-view {-webkit-transform: translateY(-"+d+"px); transform: translateY(-"+d+"px)} ",n+="#chaty-app-widget-"+t.id+" .chaty-app-tooltip:after {background-color: "+t.settings.cta_bg_color+"; color: "+t.settings.cta_text_color+"}",n+="#chaty-app-widget-"+t.id+" .chaty-app-tooltip.pos-top:before {border-top-color: "+t.settings.cta_bg_color+"; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-tooltip.pos-left:before {border-left-color: "+t.settings.cta_bg_color+"; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-tooltip.pos-right:before {border-right-color: "+t.settings.cta_bg_color+";}",n+="#chaty-app-widget-"+t.id+" .on-hover-text {background-color: "+t.settings.cta_bg_color+"; color: "+t.settings.cta_text_color+"}",n+="#chaty-app-widget-"+t.id+" .chaty-app-tooltip.pos-top .on-hover-text:before {border-top-color: "+t.settings.cta_bg_color+"; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-tooltip.pos-left .on-hover-text:before {border-left-color: "+t.settings.cta_bg_color+"; }",n+="#chaty-app-widget-"+t.id+" .chaty-app-tooltip.pos-right .on-hover-text:before {border-right-color: "+t.settings.cta_bg_color+";}",n+="#chaty-app-widget-"+t.id+" .ch-pending-msg {background-color: "+t.settings.pending_mesg_count_bgcolor+";
1color: "+t.settings.pending_mesg_count_color+";}",n+=".chaty-app-chat-view-"+t.id+" .chaty-app-view-header {background-color: "+t.settings.cta_header_bg_color+";color: "+t.settings.cta_header_text_color+";}",n+=".chaty-app-chat-view-"+t.id+" .chaty-app-view-header svg {fill: "+t.settings.cta_header_text_color+";}",H(n)}(t,r,p)}},Ct=function(){let t=0;i.length&&(l&&P("chaty-app-mobile"),k(),Object.keys(i).forEach((function(e){let a=i[e],n=function(t){if(b(t.triggers.has_countries)&&!x(t.triggers.countries)&&t.triggers.countries.length){let e=Et();if("-"!=e&&!t.triggers.countries.includes(e))return!1}return!0}(a);n=n&&function(t){if(t.triggers.has_date_scheduling_rules){let e=t.triggers.date_scheduling_rules.start_date_time,a=t.triggers.date_scheduling_rules.end_date_time,n=new Date;n=lt(n,t.triggers.time_diff);let c=n.getFullYear()+"-"+ot(n.getMonth()+1)+"-"+ot(n.getDate())+" "+ot(n.getHours())+":"+ot(n.getMinutes())+":"+ot(n.getSeconds());return""==a&&e<=c||""==e&&a>=c||""!=e&&""!=a&&e<=c&&a>=c}return!0}(a),n=n&&function(t){let e=!0;if(b(t.triggers.has_day_hours_scheduling_rules)&&t.triggers.day_hours_scheduling_rules.length>0){let a=t.triggers.day_hours_scheduling_rules;if(a.length>0){e=!1;let n=new Date;n=lt(n,t.triggers.day_time_diff);let c=n.getHours(),i=n.getMinutes(),s=n.getDay();for(let t=0;t<a.length;t++){let n=0,o=0,l=0;if(-1==a[t].days?l=1:a[t].days>=0&&a[t].days<=6?a[t].days==s&&(l=1):7==a[t].days?s>=0&&s<=4&&(l=1):8==a[t].days?s>=1&&s<=5&&(l=1):9==a[t].days&&(5!=s&&6!=s||(l=1)),1==l&&(c>a[t].start_hours&&c<a[t].end_hours?n=1:c==a[t].start_hours&&c<a[t].end_hours?i>=a[t].start_min&&(n=1):c>a[t].start_hours&&c==a[t].end_hours?i<=a[t].end_min&&(n=1):c==a[t].start_hours&&c==a[t].end_hours&&i>=a[t].start_min&&i<=a[t].end_min&&(n=1),1==n&&a[t].start_hours<a[t].end_hours?(i>=a[t].start_min||i<=a[t].end_min)&&(o=1):1==n&&i>=a[t].start_min&&i<=a[t].end_min&&(o=1)),1==n&&1==o&&1==l){e=1;break}}}}return e}(a),n&&(t++,kt(a,e))})),function(){if(document.querySelectorAll(".chatway-channel").length||document.querySelectorAll(".Chatway-channel").length||d){if(!document.getElementById("chatway")&&a)try{if(-1!==a.indexOf("chatway_user_identifier")){const t=JSON.parse(a);a=t.chatway_user_identifier}if(a){let t=document.createElement("script");t.src=y+a,t.id="chatway",t.async=!0,document.head.appendChild(t)}}catch(t){a=!1}}else z();!d||document.querySelectorAll(".Chatway-channel").length&&document.querySelectorAll(".chatway-channel").length||P("has--not--chatway"),document.querySelectorAll(".hide-show-chaty").forEach((function(t,e){t.onclick=function(e){e.stopPropagation();let a=t.getAttribute("data-widget"),n=S(a);if(n){if(n.classList.contains("has-single")||(xt(a),n.classList.contains("chaty-app-open")?n.classList.remove("chaty-app-open"):(n.classList.add("chaty-app-open"),vt(a))),n.classList.contains("cta-first_click")){let t=I("cta-main-"+a);t&&(t.classList.remove("chaty-app-tooltip"),t.classList.remove("active"),t.removeAttribute("data-hover"))}f(a,"c-widget")&&_(a,"c-widget")}}})),l||(document.querySelectorAll(".open-on-hover .open-chaty").forEach((function(t,e){t.addEventListener("mouseover",(function(e){let a=S(t.getAttribute("data-widget"));a&&(a.classList.contains("on-chaty_app-widget")||a.classList.contains("chaty-app-open")||(a.classList.add("on-chaty_app-widget"),t.click()))}))})),document.querySelectorAll(".open-on-hover .chaty-app-widget-trigger").forEach((function(t,e){t.addEventListener("mouseleave",(function(e){let a=S(t.getAttribute("data-widget"));a&&a.classList.remove("on-chaty_app-widget")}))}))),document.querySelectorAll(".chaty-app-link").forEach((function(t,e){t.onclick=function(e){if(t.closest(".chaty-app")){let a=t.closest(".chaty-app").getAttribute("data-id"),n=A(a),c=S(a);if(n&&("#"!=t.getAttribute("href")&&"javascript:;"!=t.getAttribute("href")||(e.stopPropagation(),e.stopImmediatePropagation()),xt(a),c.classList.contains("has-single")?vt(a):function(t,e){let a=t.getAttribute("data-id"),n=t.getAttribute("data-user"),c=f(a,"c-"+e),i=J();if(c&&!i){_(a,"c-"+e);let t={widgetId:a,userId:n,isMobile:l,channel:e};t=L(t);let c=new XMLHttpRequest;c.open("POST",ht,!0),c.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),c.onreadystatechange=function(){},c.send(t)}}(n,t.getAttribute("data-channel")),t.classList.contains("has-gae")&&Lt(t.getAttribute("data-channel")),t.classList.contains("has-chaty-app-box")&&(e.stopPropagation(),console.log(t.getAttribute("data-form")),ft(0,t.getAttribute("data-form"))),t.classList.contains("chaty-app-agent-button")&&(e.stopPropagation(),ft(0,t.getAttribute("data-form"))),t.classList.contains("has-on-hover")&&t.classList.contains("first_click")&&(t.classList.remove("has-on-hover"),t.classList.remove("active"),t.querySelectorAll(".on-hover-text").forEach((function(t,e){t.remove()})))),"Chatway"==t.getAttribute("data-channel")){const t=document.getElementsByClassName("chatway-launcher");for(let e=0;e<t.length;e++)t[e].click(),c.classList.contains("inside-chaty")&&!c.classList.contains("cssas-no-close-button")&&c.classList.remove("chaty-app-open")}}}})),document.querySelectorAll(".chaty-app-whatsapp-close-btn, .close-wechat-form, .chaty-app-close-agent-list, .close-contact-form").forEach((function(t,e){t.onclick=function(e){e.stopPropagation();let a=t.closest(".chaty-app-outer-forms").getAttribute("data-widget");if(t.closest(".chaty-app-outer-forms")){t.closest(".chaty-app-outer-forms").classList.remove("active");let e=A(a);e&&e.classList.remove("form-open");let n=S(a);n&&n.classList.contains("cssas-no-close-button")&&n.classList.add("chaty-app-open")}t.classList.contains("chaty-app-whatsapp-close-btn")&&f(a,"c-WhatsApp")&&_(
1a,"c-WhatsApp")}})),document.querySelectorAll(".has-on-hover").forEach((function(t,e){t.onmouseenter=function(e){let a=t.getAttribute("data-hover");x(a)||t.querySelectorAll(".on-hover-text").forEach((function(t,e){t.innerHTML=a}))},t.onmouseleave=function(e){let a=t.getAttribute("data-text");t.querySelectorAll(".on-hover-text").forEach((function(t,e){t.innerHTML=a}))}})),document.querySelectorAll(".chaty-app-another-form-button").forEach((function(t,e){t.onclick=function(e){e.stopPropagation(),t.closest(".chaty-app-form").classList.remove("success-form"),document.querySelectorAll(".chaty-app-form-ajax-message").forEach((function(t,e){t.innerHTML="",t.classList.remove("chaty-app-success"),t.classList.remove("chaty-app-error")}))}})),document.querySelectorAll(".chaty-app-contact-form").forEach((function(t,e){t.onsubmit=function(e){e.preventDefault();let a=t,n=t.getAttribute("data-id"),c=A(n);if(c){let t=0,e=I("form-button-"+n);if(a.querySelectorAll(".chaty-app-error-message").forEach((function(t,e){t.remove()})),a.querySelectorAll(".chaty-app-form-ajax-message").forEach((function(t,e){t.classList.remove("chaty-app-success"),t.classList.remove("chaty-app-erroe")})),a.querySelectorAll(".chaty-app-input-error").forEach((function(t,e){t.classList.remove("chaty-app-input-error")})),a.querySelectorAll(".is-required").forEach((function(e,a){if(x(e.value)){t++,e.classList.add("chaty-app-input-error");let a=document.createElement("span");a.className="chaty-app-error-message",a.innerText="This input field is a required field",e.after(a)}})),a.querySelectorAll(".chaty-app-input-email:not(.chaty-app-input-error)").forEach((function(e,a){if(!x(e.value)&&(n=e.value,!/^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(n))){t++,e.classList.add("chaty-app-input-error");let a=document.createElement("span");a.className="chaty-app-error-message",a.innerText="Email address is not valid",e.after(a)}var n})),0==t){e.setAttribute("disabled",!0);let t={userId:c.getAttribute("data-user"),widgetId:n,isMobile:l,channel:"Contact_Us"};t=L(t),t+="&lead[name]="+($("chaty-app-input-name-"+n)?I("chaty-app-input-name-"+n).value:""),t+="&lead[email]="+($("chaty-app-input-email-"+n)?I("chaty-app-input-email-"+n).value:""),t+="&lead[phone]="+($("chaty-app-input-phone-"+n)?I("chaty-app-input-phone-"+n).value:""),t+="&lead[message]="+($("chaty-app-input-message-"+n)?I("chaty-app-input-message-"+n).value:"");let i=new XMLHttpRequest;i.open("POST",_t,!0),i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.onreadystatechange=function(){if(e.removeAttribute("disabled"),4==i.readyState&&200==i.status){let t=JSON.parse(i.responseText);if(t.status){let e;t.widget_id,a.querySelectorAll(".chaty-app-form-ajax-message").forEach((function(e,a){e.innerHTML=O(t.message),e.classList.add("chaty-app-success"),e.classList.remove("chaty-app-error"),e.setAttribute("dir",B(t.message))})),a.querySelectorAll(".chaty-app-input-field").forEach((function(t,e){t.value=""})),b(t.auto_close_form)&&setTimeout((function(){I("hide-form-"+a.getAttribute("data-id"))&&(e=I("hide-form-"+a.getAttribute("data-id")),e.click())}),1e3*parseInt(t.close_form_after_seconds)),b(t.redirect_action)&&(x(t.redirect_url)?setTimeout((function(){I("hide-form-"+a.getAttribute("data-id"))&&(e=I("hide-form-"+a.getAttribute("data-id")),e.click())}),3e3):b(t.open_link_in_new_tab)?(window.open(t.redirect_url,"_blank"),setTimeout((function(){I("hide-form-"+a.getAttribute("data-id"))&&(e=I("hide-form-"+a.getAttribute("data-id")),e.click())}),3e3)):window.location=t.redirect_url),a.closest(".chaty-app-form").classList.add("success-form"),a.classList.contains("chaty-app-ga-enabled")&&Lt("Contact_Us_form_submitted")}else a.querySelectorAll(".chaty-app-form-ajax-message").forEach((function(e,a){e.innerHTML=O(t.message),e.classList.remove("chaty-app-success"),e.classList.add("chaty-app-error"),e.setAttribute("dir",B(t.message))}))}},i.send(t)}}}})),document.querySelectorAll(".open-chaty-app-channel").forEach((function(t,e){t.onclick=function(e){e.stopPropagation();let a=t.closest(".chaty-app").getAttribute("data-id"),n=A(a);if(n){I(`chaty-app-form-${a}-WhatsApp`)&&I(`chaty-app-form-${a}
1-WhatsApp`).classList.contains("active")&&f(a,"c-WhatsApp")&&_(a,"c-WhatsApp"),document.querySelectorAll(".chaty-app-form-"+a).forEach((function(t,e){t.classList.remove("active")}));let t=S(a);if(n&&t&&(n.classList.remove("form-open"),t.classList.contains("has-single")||t.classList.add("chaty-app-open")),n.classList.contains("open-on-hover")){let t=I(`cta-open-${a}`);t&&t.classList.add("on-chaty-app-widget")}}}})),document.querySelectorAll(".chaty-app-close-view-list").forEach((function(t,e){t.onclick=function(e){if(e.stopPropagation(),t.closest(".chaty-app-chat-view")){t.closest(".chaty-app-chat-view").classList.remove("active");let e=t.closest(".chaty-app-chat-view").getAttribute("data-widget"),a=A(e),n=S(e);a&&n&&n.classList.remove("chaty-app-open"),f(e,"c-widget")&&_(e,"c-widget")}}})),document.querySelectorAll(".chaty-app-outer-forms").forEach((function(t,e){t.onclick=function(t){t.stopPropagation()}})),document.querySelectorAll(".whatsapp-chaty-app-form").forEach((function(t,e){t.onsubmit=function(e){let a=t.getAttribute("data-widget"),n=t.getAttribute("data-channel"),c=A(a),i=S(a);c&&i&&(document.querySelectorAll(".chaty-app-form-"+a).forEach((function(t,e){t.classList.remove("active")})),c.classList.remove("form-open"),f(a,"c-"+n)&&_(a,"c-"+n)),t.classList.contains("chaty-app-ga-enabled")&&Lt(t.getAttribute("data-channel")+"_Widget_Button")}})),document.body.addEventListener("click",(function(t){document.querySelectorAll(".chaty-app-outer-forms").forEach((function(t,e){if(t.classList.contains("active")){t.classList.remove("active");let e=t.getAttribute("data-widget"),a=A(e),n=S(e);a&&n&&a.classList.remove("form-open"),t.classList.contains("chaty-app-whatsapp-outer-forms")&&f(e,"c-WhatsApp")&&_(e,"c-WhatsApp")}})),document.querySelectorAll(".chaty-app-has-chat-view").forEach((function(t,e){if(t.classList.contains("active")){let e=t.getAttribute("data-id"),a=A(e),n=S(e);a&&n&&n.classList.remove("chaty-app-open"),f(e,"c-widget")&&_(e,"c-widget")}}))})),function(){if(K&&(G=setInterval((function(){nt++,document.getElementsByClassName(".chaty-app.delay-time-"+nt)&&document.querySelectorAll(".chaty-app.delay-time-"+nt).forEach((function(t,e){st(t.getAttribute("data-id"))}))}),1e3)),tt&&window.addEventListener("scroll",(function(){if(tt){let t=document.body.scrollHeight-window.innerHeight,e=window.pageYOffset||document.documentElement.scrollTop;if(0!=t){let a=parseInt(e/t*100);if(ct<=a){let t=ct;ct=a;for(let e=t;e<=a;e++)at.includes(e)||document.getElementsByClassName(".on-chaty-app-scroll.page-scroll-"+e)&&document.querySelectorAll(".on-chaty-app-scroll.page-scroll-"+e).forEach((function(t,e){t.classList.remove("on-chaty-app-scroll"),st(t.getAttribute("data-id"))})),at.push(e);ct=a}}}})),et)if(l){if(window.history&&window.history.pushState){function c(){""!==location.hash.split("#!/")[1]&&""===window.location.hash&&it()}var t=100;window.history.state&&window.history.state.page&&(t=window.history.state.page),window.history.pushState({page:t+1},""),window.history.pushState({page:t+2},""),window.onpopstate=function(){c()},window.history.onpopstate=function(){c()},window.addEventListener("popstate",(function(){c()})),document.addEventListener("backbutton",(function(){c()})),window.addEventListener("backbutton",(function(){c()})),window.addEventListener("popstate",(function(){c()}))}}else a="mouseout",n=function(t){null==t.toElement&&null==t.relatedTarget&&it()},(e=document).addEventListener?e.addEventListener(a,n,!1):e.attachEvent&&e.attachEvent("on"+a,n);var e,a,n}()}()),0===t&&z()},Et=function(){let t="";return"undefined"!=typeof Storage&&null!=window.sessionStorage.getItem("chaty_app_user_country_code")?t=window.sessionStorage.getItem("chaty_app_user_country_code"):v("chaty_app_user_country_code")&&(t=m("chaty_app_user_country_code")),t},At=function(){!function(){let t=document.querySelectorAll(".chaty-app, .chaty-app-outer-forms");t&&t.forEach((function(t){t.remove()}))}(),function(){let t=m("activeChatyAppWidgets");null==t&&(t="");try{let c="",s="",h=window.location.href,d=window.location.href;void 0!==window.Parameters&&void 0!==window.Parameters.InitialPageAlias&&void 0!==window.Parameters.SiteAlias&&-1!=window.location.href.indexOf(window.Parameters.SiteAlias)&&(c="duda",s=window.Parameters.SiteAlias,void 0!==window.Parameters.InitialPageAlias&&(h=window.Parameters.InitialPageAlias));let y=0;0==It()&&(y=u(),y&&(c="ecwid"));let m={clientId:It(),identifier:It(),isMobile:l,clientCountry:p,pageTitle:r,currentURL:h,domain:d,referrerLink:Bt(),activeWidgets:t,shop:V(),time:new Date,channel:c,site_identifier:y,site_name:s},f=new XMLHttpRequest;f.open("POST",g,!0),f.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),f.onreadystatechange=function(){if(4==f.readyState&&200==f.status){let t=JSON.parse(f.responseText);t.status?(o=t.is_pro,t.widgets.length?(i=t.widgets,t.chatway.is_active&&(a=t.chatway.unique_id),function(){let t=!1;
1i.length&&Object.keys(i).forEach((function(e){let a=i[e];b(a.triggers.has_countries)&&!x(a.triggers.countries)&&a.triggers.countries.length&&(t=!0)})),t?(p=Et(),x(p)?function(){let t=new XMLHttpRequest;t.open("GET","https://www.cloudflare.com/cdn-cgi/trace"),t.onreadystatechange=function(){if(4==t.readyState&&200==t.status){let a=t.responseText.match("loc=(.*)");a.length>1&&(a=a[1],x(a)&&(a="-"),a&&(a=a.toUpperCase(),e=a,void 0!==n.id&&("undefined"!=typeof Storage?null==window.sessionStorage.getItem("chaty_app_user_country_code")&&window.sessionStorage.setItem("chaty_app_user_country_code",e):v("chaty_app_user_country_code")||w("chaty_app_user_country_code",e,365)),Ct()))}var e},t.send("")}():Ct()):Ct()}()):-1==t.status&&b(t.show_upgrade_popup)&&document.getElementById("admin-bar-iframe")?function(t){if(document.getElementById("admin-bar-iframe")){C(),q("Poppins:400,600,700");let a=t.visitor_count,n=parseInt(t.next_reset_in_days);n=1==n?"1 day":n+" days",R=t.redirect_url;let c="";c+="<div id='chaty-app-owner-box-1' class='chaty-app-owner-box' style='display: none'>",c+="<div class='chaty-app-owner-data'>",c+="<div class='chaty-app-owner-close step-1'><a href='javascript:;'><svg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg' focusable='false' tabindex='-1'><path fill-rule='evenodd' clip-rule='evenodd' d='M3.757.929A2 2 0 10.93 3.757L5.172 8 .929 12.243a2 2 0 002.828 2.828L8 10.828l4.243 4.243a2 2 0 002.828-2.828L10.83 8l4.242-4.243A2 2 0 1012.243.93L8 5.172 3.757.929z' fill='currentColor'></path></svg></a></div>",c+="<div class='chaty-app-owner-title'><img src='"+e+"images/lock-emoji.png' alt='lock emoji' /><span>Only you can see this</span></div>",c+="<div class='chaty-app-owner-steps'>",c+="<div class='chaty-app-owner-body'>",c+="<div class='chaty-app-owner-body-head'>You're loosing new leads & sales</div>",c+="<div class='chaty-app-owner-body-message'>You've reached your <span>"+a+"/"+a+"</span> visitors per month limit (next Chaty app reset date is in "+n+")</div>",c+="<div class='chaty-app-owner-footer'>",c+="<div class='chaty-app-owner-footer-left'>",c+="<a class='chaty-app-upgrade-btn' id='chaty-app-upgrade-btn' href='javascript:;'>Upgrade Now</a>",c+="</div>",c+="<div id='chaty-app-owner-footer-right' class='chaty-app-owner-footer-right'>",c+="</div>",c+="</div>",c+="</div>",c+="</div>",c+="</div>",c+="</div>",E(c)}}(t):z()):z()}},f.send(L(m))}catch(t){console.log(t)}}()},St=!1,$t=!1,It=function(){let t;return null==n.id?"undefined"!=typeof Storage&&null!=window.sessionStorage.getItem("chaty_app_client_id")?t=window.sessionStorage.getItem("chaty_app_client_id"):v("chaty_app_client_id")&&(t=m("chaty_app_client_id")):t=n.id,null==t?0:t},Bt=function(){return m("chaty_app_referrer")?-1!==m("chaty_app_referrer").indexOf(window.location.host)?"":m("chaty_app_referrer"):""},Mt=function(){v("chaty_app_user_id")||w("chaty_app_user_id",Math.random().toString(36).slice(-16),365),void 0!==n.id&&("undefined"!=typeof Storage?null==window.sessionStorage.getItem("chaty_app_client_id")&&window.sessionStorage.setItem("chaty_app_client_id",n.id):v("chaty_app_client_id")||w("chaty_app_client_id",n.id,365)),m("chaty_app_referrer")||w("chaty_app_referrer",document.referrer,.00138888888888889),setInterval((function(){w("chaty_app_referrer",Bt().length>1?Bt():document.referrer,.00138888888888889)}),6e4),At()},Tt=function(){if(clearInterval(bt),$t)return!1;$t=!0,function(){let t,e;if(null==document.getElementById(c)||null==document.getElementById(c)){let a=document.getElementsByTagName("script");for(let n=0;n<a.length;n++)if(e=a[n].src,e&&-1!==e.indexOf("cdn.chaty.app/pixel.js")){St=!0,t=e;break}if(""==t)for(let n=0;n<a.length;n++)if(e=a[n].src,e&&-1!==e.indexOf("cdn.chaty.app/pixel.js")){St=!0,t=e;break}}else t=document.getElementById(c).src;!function(t){if(null!=t&&t.length>0){if(null!=(t=t.split("?")[1])&&t.indexOf("&")>-1){t=t.split("&");for(let e=0;e<t.length;e++){let a=t[e].split("=");void 0!==a[0]&&void 0!==a[1]&&(n[a[0]]=decodeURIComponent(a[1]))}}else if(null!=t){let e=t.split("=");void 0!==e[0]&&void 0!==e[1]&&(n[e[0]]=decodeURIComponent(e[1]))}Mt()}else u()?Mt():console.log("Chaty Saas pixel code not exist")}(t)}()},qt=history.pushState,Ht=window.location.href;function Ft(){Ht!==window.location.href&&(Ht=window.location.href,At())}history.pushState=function(){qt.apply(history,arguments),Ft()},window.addEventListener("popstate",(function(t){Ft()})),bt=setInterval((function(){$t||("complete"==document.readyState?Tt():(window.addEventListener||window.hasOwnProperty("onload"))&&(window.addEventListener("load",(function(){Tt()}),!0),window.onload=function(){Tt()}))}),1e3)})()
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.