vendor: 4,769 bytes, line 1
1(()=>{"use strict";function t(){var a=i(),l=a.m(t),s=(Object.getPrototypeOf?Object.getPrototypeOf(l):l.__proto__).constructor;function _(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===s||"GeneratorFunction"===(e.displayName||e.name))}var f={throw:1,return:2,break:3,continue:3};function d(t){var n,r;return function(o){n||(n={stop:function(){return r(o.a,2)},catch:function(){return o.v},abrupt:function(t,e){return r(o.a,f[t],e)},delegateYield:function(t,c,i){return n.resultName=c,r(o.d,e(t),i)},finish:function(t){return r(o.f,t)}},r=function(t,e,r){o.p=n.prev,o.n=n.next;try{return t(e,r)}finally{n.next=o.n}}),n.resultName&&(n[n.resultName]=o.v,n.resultName=void 0),n.sent=o.v,n.next=o.n;try{return t.call(this,n)}finally{o.p=n.prev,o.n=n.next}}}return(t=function(){return{wrap:function(t,e,n,r){return a.w(d(t),e,n,r&&r.reverse())},isGeneratorFunction:_,mark:a.m,awrap:function(t,e){return new u(t,e)},AsyncIterator:c,async:function(t,e,n,c,i){return(_(e)?o:r)(d(t),e,n,c,i)},keys:n,values:e}})()}function e(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}throw new TypeError(h(t)+" is not iterable")}function n(t){var e=Object(t),n=[];for(var r in e)n.unshift(r);return function t(){for(;n.length;)if((r=n.pop())in e)return t.value=r,t.done=!1,t;return t.done=!0,t}}function r(t,e,n,r,c){var i=o(t,e,n,r,c);return i.next().then((function(t){return t.done?t.value:i.next()}))}function o(t,e,n,r,o){return new c(i().w(t,e,n,r),o||Promise)}function c(t,e){function n(r,o,c,i){try{var a=t[r](o),l=a.value;return l instanceof u?e.resolve(l.v).then((function(t){n("next",t,c,i)}),(function(t){n("throw",t,c,i)})):e.resolve(l).then((function(t){a.value=t,c(a)}),(function(t){return n("throw",t,c,i)}))}catch(t){i(t)}}var r;this.next||(a(c.prototype),a(c.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),a(this,"_invoke",(function(t,o,c){function i(){return new e((function(e,r){n(t,c,e,r)}))}return r=r?r.then(i,i):i()}),!0)}function i(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function c(n,r,o,c){var i=r&&r.prototype instanceof l?r:l,s=Object.create(i.prototype);return a(s,"_invoke",function(n,r,o){var c,i,a,l=0,s=o||[],_=!1,f={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return c=e,i=0,a=t,f.n=n,u}};function d(n,r){for(i=n,a=r,e=0;!_&&l&&!o&&e<s.length;e++){var o,c=s[e],d=f.p,h=c[2];n>3?(o=h===r)&&(a=c[(i=c[4])?5:(i=3,3)],c[4]=c[5]=t):c[0]<=d&&((o=n<2&&d<c[1])?(i=0,f.v=r,f.n=c[1]):d<h&&(o=n<3||c[0]>r||r>h)&&(c[4]=n,c[5]=r,f.n=h,i=0))}if(o||n>1)return u;throw _=!0,r}return function(o,s,h){if(l>1)throw TypeError("Generator is already running");for(_&&1===s&&d(s,h),i=s,a=h;(e=i<2?t:a)||!_;){c||(i?i<3?(i>1&&(f.n=-1),d(i,a)):f.n=a:f.v=a);try{if(l=2,c){if(i||(o="next"),e=c[o]){if(!(e=e.call(c,a)))throw TypeError("iterator result is not an object");if(!e.done)return e;a=e.value,i<2&&(i=0)}else 1===i&&(e=c.return)&&e.call(c),i<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),i=1);c=t}else if((e=(_=f.n<0)?a:n.call(r,f))!==u)break}catch(e){c=t,i=1,a=e}finally{l=1}}return{value:e,done:_}}}(n,o,c),!0),s}var u={};function l(){}function s(){}function _(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(a(e={},r,(function(){return this})),e),d=_.prototype=l.prototype=Object.create(f);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,a(t,o,"GeneratorFunction")),t.prototype=Object.create(d),t}return s.prototype=_,a(d,"constructor",_),a(_,"constructor",s),s.displayName="GeneratorFunction",a(_,o,"GeneratorFunction"),a(d),a(d,o,"Generator"),a(d,r,(function(){return this})),a(d,"toString",(function(){return"[object Generator]"})),(i=function(){return{w:c,m:h}})()}function a(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}a=function(t,e,n,r){function c(e,n){a(t,e,(function(t){return this._invoke(e,n,t)}))}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(c("next",0),c("throw",1),c("return",2))},a(t,e,n,r)}function u(t,e){this.v=t,this.k=e}function l(t,e,n,r,o,c,i){try{var a=t[c](i),u=a.value}catch(t){return void n(t)}a.done?e(u):Promise.resolve(u).then(r,o)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,c,i,a=[],u=!0,l=!1;try{if(c=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=c.call(n)).done)&&(a.push(r.value),a.length!==e);u=!0);}catch(t){l=!0,o=t}
1finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw o}}return a}}(t,e)||f(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=f(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,i=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){a=!0,c=t},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw c}}}}function f(t,e){if(t){if("string"==typeof t)return d(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}!function(e,n,r){var o={},c={},i=e.ht_ctc_chat_var||{},a=e.ht_ctc_variables||{},u="",f=0,d={},y=function(){},v=function(){return null},p="",g="",m="",b=function(){},S=function(){},x=function(){return!1},w=function(){return!1},k=function(){return!1},q=C(),E=!1,A=n.querySelector(".ht-ctc-chat"),L="";function O(){var r,u,d;n.dispatchEvent(new CustomEvent("ht_ctc_pro_init",{detail:{config:o,api:c}})),r=n.querySelectorAll(".ht_ctc_multi_agent"),u=j("ht_ctc_multi_agent_main"),d="yes",r.forEach((function(t,e){var n=t.getAttribute("data-key");if(n){var r=j(n),o=C().getDay();0===o&&(o=7);for(var c=[],i=o;i<=7;i++)c.push(i);if(7!==c.length)for(var a=7-c.length,l=1;l<=a;l++)c.push(l);var s="yes";if(r.timings&&"always"===r.timings)s="yes";else if(r.timings&&"set"===r.timings)if(r.time_sets){s="no";var _=r.time_sets,f=N(),h=1;_.forEach((function(t){t.stm<=f&&f<=t.etm&&1===h&&(s="yes",h++)}))}else s="no",d="no";"no"===s&&u.agent_offline&&("chat"===u.agent_offline?y("chat"):"nochat"===u.agent_offline?y("nochat"):t.remove())}function y(e){t.style.order="1";var n=t.querySelector(".g_multi_box");n&&(n.style.opacity="0.5");var r=t.querySelector(".ctc_g_agent_tags");r&&(r.style.color="unset"),"nochat"===e&&(t.style.pointerEvents="none");var o=v();if("no"!==d){var c=t.querySelector(".ctc_g_agent_tags .ctc_agent_next_time");c&&(c.textContent=o,c.style.display="flex")}}function v(){var t="";if(r.time_sets){var e=N(),n=r.time_sets,o="",c=1;n.forEach((function(t){e<=t.stm&&1===c&&(o=t.stm,c++)})),(t=""===o?10080-e+n[0].stm:o-e)<60?t=t+" "+(t<2?u.ctc_minute:u.ctc_minutes):24>(t/=60)?t=(t=Math.round(t))+" "+(t<2?u.ctc_hour:u.ctc_hours):(t/=24,t=(t=Math.round(t))+" "+(t<2?u.ctc_day:u.ctc_days))}return t}})),function(){var t=n.querySelector("#ctc_opt_g_form");if(t){var e=n.querySelector(".ctc_opt_g_form");v&&v("g_optin")?(t.checked=!0,e&&(e.style.display="none")):t.required=!0,t.addEventListener("change",(function(t){t.target.checked&&(e&&S(e),y&&y("g_optin","y"))}))}}(),n.addEventListener("ht_ctc_event_number",(function(){!function(){try{if(i.r_nums&&i.r_nums[0])if(void 0===i.r_sqx||""===i.r_sqx||isNaN(i.r_sqx)){var t=i.r_nums,e=Math.floor(Math.random()*t.length);i.number=w(t,String(e),"")}else{var n=i.r_nums.length,r=Number(i.r_sqx);r>=n&&(r=0),Number.isInteger(r)||(r=0);var o=w(i.r_nums,String(r),void 0);i.number=o,r>=n&&(r=0),i.r_sqx=r,function(t){try{void 0===i.r_sqx||isNaN(i.r_sqx)||fetch(i.ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"ctc_pro_update_r_sqx",r_sqx:t,nonce:i.nonce})}).then((function(t){return t.json()})).then((function(e){try{e.success&&(i.r_sqx=Number(t))}catch(t){}}
1)).catch((function(t){}))}catch(t){}}(++r)}}catch(t){}}()})),n.addEventListener("ht_ctc_event_analytics",(function(){(i.gads_conversation||i.gads_conversion)&&function(){if(i.gads_conversation||i.gads_conversion){var t="undefined"!=typeof gtag,n="object"===h(e.dataLayer);if(!t&&!n)return;t||(e.gtag=function(){e.dataLayer.push(arguments)});var r=i.gads_conversion||i.gads_conversation;gtag("event","conversion",{send_to:r})}}(),i.fb_conversion&&function(){var t=i.chat_number||i.number,e=i.nonce||"";if(i.fb_conversion){var n=i.pixel_event_name&&""!==i.pixel_event_name?i.pixel_event_name:"Click to Chat by HoliThemes",r=a.pixel_event_type&&""!==a.pixel_event_type?a.pixel_event_type:"trackCustom",o={},c=a.pixel_params_v4||a.pixel_params;Array.isArray(c)&&c.forEach((function(t){if(t){var e=null;if("object"!==h(t)||Array.isArray(t)?"string"==typeof t&&x(t)&&(e=w(a,t,null)):e=t,e&&"object"===h(e)){var n=e.key,r=e.value;n=P(n),r=P(r),k(o,n,r)}}}));var u=i.ctc_pixel_event_id&&""!==i.ctc_pixel_event_id?i.ctc_pixel_event_id:"",l=new URLSearchParams({action:"ctc_pro_capi",nonce:e,pixel_event_name:n,event_source_url:g,event_id:u,title:m,number:t,pixel_track:r});l.set("pixel_params",JSON.stringify(o)),fetch(i.ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:l}).then((function(t){return t.json()})).then((function(t){})).catch((function(t){}))}}()})),function(){var e="no";A&&A.addEventListener("submit",(function(t){var l=t.target.closest(".ctc_pro_greetings_form");if(l&&(t.preventDefault(),"yes"!==e)){r(),o();var s=[];l.querySelectorAll(".ht_ctc_g_form_field").forEach((function(t){t.name&&(t.classList.contains("ctc_g_hidden_for_checkbox")&&t.disabled||("checkbox"!==t.type&&"radio"!==t.type||t.checked)&&s.push({name:t.name,value:t.value}))}));var _=i.pre_filled,f=u();i.prefix_pre_filled=f;var d=n.querySelector(".greetings-pro-1"),h=n.querySelector(".greetings-pro-2"),y=n.querySelector(".greetings-pro-3");h&&y?(h.style.display="block",d.style.display="none"):(n.querySelectorAll(".ht_ctc_chat_greetings_forum_link").forEach((function(t){t.classList.add("ht_ctc_chat_greetings_box_link")})),setTimeout((function(){n.querySelectorAll(".ht_ctc_chat_greetings_box_link").forEach((function(t){t.click()}))}),20),setTimeout((function(){n.querySelectorAll(".ht_ctc_chat_greetings_forum_link").forEach((function(t){t.classList.remove("ht_ctc_chat_greetings_box_link")})),i.pre_filled=_}),500)),a(s),c()}}));function r(){e="yes",setTimeout((function(){e="no"}),2500)}function o(){try{n.querySelectorAll(".ctc_g_its_checkbox").forEach((function(t){if(t.checked){var e,n=null===(e=t.parentElement)||void 0===e?void 0:e.children;n&&Array.from(n).forEach((function(e){e!==t&&"INPUT"===e.tagName&&"hidden"===e.type&&(e.disabled=!0)}))}}))}catch(t){}}function c(){try{n.querySelectorAll(".ctc_g_hidden_for_checkbox").forEach((function(t){t.disabled=!1}))}catch(t){}}function a(t){i.ajaxurl&&i.g1_form_email&&f(t),i.g1_form_webhook&&d(t)}function u(){if(!n.querySelector(".ctc_g_field_add_to_prefilled"))return"";var t=i.pre_filled,e=n.querySelector(".ctc_pro_greetings_form"),r=e?e.querySelectorAll(".ctc_g_field_add_to_prefilled"):[],o=new FormData;r.forEach((function(t){("checkbox"!==t.type&&"radio"!==t.type||t.checked)&&t.name&&o.append(t.name,t.value)}));var c,a="\n",u=_(o.entries());try{for(u.s();!(c=u.n()).done;){var l=s(c.value,2),f=l[0],d=l[1],h=".ctc_pro_greetings_form [name='".concat(f,"']"),y=n.querySelector(h),v=f;if(y&&y.hasAttribute("data-name")&&(v=y.getAttribute("data-name")),""!==d){var p=v.trim()?"".concat(v,": "):"";a+="".concat(p).concat(d,"\n")}}}catch(t){u.e(t)}finally{u.f()}return t+=a,i.pre_filled=t,t}function f(e){var r,o=(null===(r=n.querySelector(".ctc_g_form_keys #ht_ctc_pro_greetings_nonce"))||void 0===r?void 0:r.value)||"",c=new URLSearchParams;c.append("action","ctc_pro_greetings_form"),c.append("nonce",o),e.forEach((function(t,e){var n,r;c.append("form_data[".concat(e,"][name]"),null!==(n=null==t?void 0:t.name)&&void 0!==n?n:""),c.append("form_data[".concat(e,"][value]"),null!==(r=null==t?void 0:t.value)&&void 0!==r?r:"")})),fetch(i.ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:c.toString()}).then(function(){var e,n=(e=t().mark((function e(n){var r;return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n.text();case 2:return r=t.sent,t.prev=3,t.abrupt("return",JSON.parse(r));case 7:return t.prev=7,t.t0=t.catch(3),t.abrupt("return",r);case 10:case"end":return t.stop()}}),e,null,[[3,7]])})),function(){var t=this,n=arguments;return new Promise((function(r,o){var c=e.apply(t,n);function i(t){l(c,r,o,i,a,"next",t)}function a(t){l(c,r,o,i,a,"throw",t)}i(void 0)}))});function r(t){return n.apply(this,arguments)}return r}()).then((function(t){})).catch((function(t){}))}function d(t){var e,n=i.g1_form_webhook,r={},o=_(t.values());try{for(o.s();!(e=o.n()).done;){var c=e.value,a=c.name,u=c.value;k(r,a,u)}}catch(t){o.e(t)}finally{o.f()}var l=H(g);r.ctc_page_url=l;var f,d=C();r.ctc_wp_date=d.toDateString(),r.ctc_wp_time=d.getHours()+":"+d.getMinutes()+":"+d.getSeconds(),r.ctc_page_title=m;var h={};if("json"===i.webhook_format){var y=new URLSearchParams;Object.entries(r).forEach((function(t){var e=s(t,2),n=e[0],r=e[1];y.append(n,r)})),f=y,h["Content-Type"]="application/x-www-form-urlencoded"}else f=JSON.stringify(r),h["Content-Type"]="text/plain";fetch(n,{method:"POST",headers:h,body:f}).then((function(t){return t.text()})).then((function(t){})).catch((function(t){}))}}(),function(){var t=n.querySelectorAll(".add_ctc_chat"),e=n.querySelector("#ctc_opt_multi");if(!t.length)return;(e&&e.checked||v&&v("g_optin"))&&t.forEach((function(t){t.classList.add("ctc_chat"),t.classList.remove("add_ctc_chat")}
1));A&&A.addEventListener("click",(function(t){t.target.closest(".add_ctc_chat")&&b(".ctc_opt_in","","ht-ctc-bounce","ht-ctc-display-unset","")}));e&&!e.dataset.listenerAttached&&(e.addEventListener("change",(function(){this.checked&&(S(".ctc_opt_in",100,"todo-Animation"),y&&y("g_optin","y"),n.querySelectorAll(".add_ctc_chat").forEach((function(t){t.classList.add("ctc_chat"),t.classList.remove("add_ctc_chat")})))})),e.dataset.listenerAttached="true")}(),function(){try{if(!i.r_sqx)return;if(0!==f)return;f++,fetch(i.ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"ctc_pro_get_r_sqx",nonce:i.nonce})}).then((function(t){return t.json()})).then((function(t){try{t.success?i.r_sqx=t.data:i.r_sqx=""}catch(t){i.r_sqx=""}})).catch((function(t){i.r_sqx=""}))}catch(t){i.r_sqx=""}}(),A&&A.addEventListener("click",(function(t){if(t.target.closest(".ht_ctc_chat_greetings_for_forum_link")){var e=n.querySelector(".ht_ctc_chat_greetings_forum_link");e&&e.click();var r=n.getElementById("ctc_pro_greetings_form");r&&!r.checkValidity()&&r.querySelectorAll('[type="checkbox"][required]:not(:checked)').forEach((function(t){var e=t.closest("div");e&&(e.style.transition="opacity 0.2s",e.style.opacity="0",setTimeout((function(){e.style.opacity="1"}),100))}))}})),function(){if(n.querySelector(".ht_ctc_g_form_field_hidden")){n.querySelectorAll(".ht_ctc_g_form_field_hidden").forEach((function(t,e){var n=t.value;n=P(n),t.value=n}))}}(),function(){if(!A)return;A.addEventListener("click",(function(t){if(t.target.closest(".ht_ctc_chat_greetings_box_link_multi")){t.preventDefault();var e=n.querySelector("#ctc_opt_multi");e?(e.checked||v&&v("g_optin")?T():b(".ctc_opt_in","","ht-ctc-bounce","ht-ctc-display-unset",""),e.dataset.listenerAttached||(e.addEventListener("change",(function(){this.checked&&(S(".ctc_opt_in",100,"todo-Animation"),y&&y("g_optin","y"),setTimeout((function(){T()}),500))})),e.dataset.listenerAttached="true")):T()}}))}(),I()}function j(t){var r="",o=t+"_data",c=n.querySelector("."+o),i=w(e,t,void 0);if(void 0!==i)r=i;else try{if(c){var a=c.getAttribute("data-settings");r=JSON.parse(a)}}catch(t){r={}}return c&&c.remove(),r}function T(){var t=n.querySelector(".ctc_g_content"),e=null==t?void 0:t.getAttribute("data-agentstyle");t&&("card-1"===e?(t.style.padding="4px 0px",t.style.backgroundColor="#f8f8f8"):"7_1"===e&&(t.style.padding="4px 0px 8px 0px"));var r=n.querySelector(".ctc_g_sentbutton");r&&(r.style.display="none");var o=n.querySelector(".ctc_g_message_box"),c=n.querySelector(".ctc_g_heading_for_main_content");o&&("card-1"===e?(o.classList.remove("ctc_g_message_box"),o.style.backgroundColor="",o.style.textAlign="inherit",o.style.padding="4px 0px",c&&c.appendChild(o)):"7_1"===e&&(o.style.backgroundColor="",o.style.textAlign="center",o.style.padding="4px 0px")),b(".ctc_g_agents")}function P(t){var r=i.chat_number&&""!==i.chat_number?i.chat_number:i.number;try{var o=(t=(t=(t=t.replace("{number}",r)).replace("{title}",m)).replace("{url}",g)).match(/\[\[(.*?)\]\]/g);o&&o.forEach((function(e){var r=e.replace("[[","").replace("]]","");t=t.replace(e,function(t){var e="; "+n.cookie,r=e.split("; "+t+"=");return 2===r.length?r.pop().split(";").shift():""}(r))})),(o=t.match(/\[(.*?)\]/g))&&o.forEach((function(n){var r,o=n.replace("[","").replace("]","");t=t.replace(n,(r=o,new URLSearchParams(e.location.search).get(r)||""))}))}catch(t){}return t}function I(){var t=n.querySelector(".ht_ctc_chat_greetings_box_layout");t&&(t.style.backgroundColor="unset")}function C(){var t=i.tz||"0",e=new Date,n=e.getTime()+6e4*e.getTimezoneOffset(),r=parseFloat(t);return new Date(n+36e5*r)}function N(){var t=C(),e=t.getDay();return 0===e&&(e=7),60*(24*(e-1)+t.getHours())+t.getMinutes()}function H(t){var e=t;try{e=decodeURI(t)}catch(t){}return e}n.addEventListener("ht_ctc_event_init",(function(t){E=!0;var e=(null==t?void 0:t.detail)||{};o=e.config||{},i=o.ctc||{},a=o.ctc_values||{},g=o.url||"",m=o.post_title||"",g=o.url||"",m=o.post_title||"";var n=(c=e.api||{}).storage||{};d=n.raw||{},y=n.set||function(){},v=n.get||function(){return null};var r=c.ui||{};b=r.show||function(){},S=r.hide||function(){};var u=c.utils||{};x=u.isSafeObjectKey||function(){return!1},w=u.getSafeProperty||function(){return!1}
1,k=u.setSafeProperty||function(){return!1},q=C(),L=i.hook_v?i.hook_v:"",O()})),n.addEventListener("ht_ctc_event_settings",(function(t){E||(x=function(t){return!("string"!=typeof t||0===t.length||!/^[a-zA-Z0-9_-]+$/.test(t))&&-1===["__proto__","constructor","prototype"].indexOf(t)},w=function(t,e,n){return void 0===n&&(n=!1),x(e)&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:n},k=function(t,e,n){return!(!x(e)||!t)&&(t[e]=n,!0)},y=function(t,e){k(d,t,e);try{localStorage.setItem("ht_ctc_storage",JSON.stringify(d))}catch(t){}},v=function(t){return localStorage.getItem("ht_ctc_storage")&&(d=localStorage.getItem("ht_ctc_storage"),d=JSON.parse(d)),w(d,t,!1)},b=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";r?r(t).show(e):("string"==typeof t&&(t=n.querySelector(t)),t&&(t.style.display="block"))},S=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";r?r(t).hide(e):("string"==typeof t&&(t=n.querySelector(t)),t&&(t.style.display="none"))},O())})),n.addEventListener("ht_ctc_event_hook",(function(t){(i=t.detail.ctc).chat_number&&""!==i.chat_number?i.chat_number:t.detail.number;var e=C(),n=e.toDateString()+", "+e.getHours()+":"+e.getMinutes()+":"+e.getSeconds();if(i.hook_url){var r=i.hook_url?i.hook_url:"",o=H(g);if(r=P(r=(r=r.replace(/\{url}/gi,o)).replace(/\{time}/gi,n)),i.hook_v){var c={},a=1;L.forEach((function(t){t=P(t=(t=t.replace(/\{url}/gi,o)).replace(/\{time}/gi,n)),c["value"+a]=t,a++})),i.hook_url=r,i.hook_v=c}}})),n.addEventListener("ht_ctc_event_display",(function(t){if(i=t.detail.ctc,p=t.detail.online_content,i.display_user_base&&(u=function(t){u="no";var e=(i=t.detail.ctc).display_user_base?i.display_user_base:"",r="logged_out";return n.querySelector("body").classList.contains("logged-in")&&(r="logged_in"),"logged_in"===e?"logged_in"===r?u="yes":i.ajaxurl&&fetch(i.ajaxurl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"ctc_pro_is_user_logged_in",nonce:i.nonce||""})}).then((function(t){return t.json()})).then((function(t){t.success&&"yes"===t.data&&(u="yes")})).catch((function(t){})):"logged_out"===e&&"logged_out"===r&&(u="yes"),u}(t)),"no"!==u)if(a.display_countries_list&&a.display_countries_list.length>0){n.dispatchEvent(new CustomEvent("ht_ctc_event_display_country_base",{detail:{ctc:i,ctc_setItem:y,ctc_getItem:v}}));var r=0,o=setInterval((function(){r++;var t=a.country_code||e.ht_ctc_variables&&e.ht_ctc_variables.country_code||"";t&&(t.length>0&&(u=a.display_countries_list.includes(t.toUpperCase())||a.display_countries_list.includes(t.toLowerCase())?"yes":"no"),clearInterval(o),c()),r>
140&&(clearInterval(o),c())}),200)}else c();function c(){"no"!==u&&function(t){i=t.detail.ctc;var r,o=t.detail.display_chat,c=t.detail.ht_ctc_chat,a="",u=i.bh,l=(q.getDay(),q.getHours()),s=q.getMinutes();if("always"===u)a="yes";else if("timebase"===u){var _=q.getDay();if(a="yes",i.bh_time_sets){a="no";var f=i.bh_time_sets,d=N(),h=1;f.forEach((function(t){t.stm<=d&&d<=t.etm&&1===h&&(a="yes",h++)}))}else{0===_&&(_=7);var y="d"+_;if(w(i,y,!1)){var v=y+"_et",g=w(i,y+"_st",void 0),m=w(i,v,void 0);if(void 0!==g&&void 0!==m){var S=g.split(":"),x=m.split(":"),k=S[0],E=S[1],A=x[0],L=x[1];k=k.padStart(2,"0"),E=E.padStart(2,"0"),A=A.padStart(2,"0"),L=L.padStart(2,"0"),l=String(l).padStart(2,"0"),s=String(s).padStart(2,"0"),k<=l&&l<=A?(a="yes",k===l?E>s&&(a="no"):l===A&&s>L&&(a="no")):a="no"}else a="yes"}else a="no"}}function O(){if(""!==i.timedelay||""!==i.scroll){if(""!==i.timedelay&&setTimeout((function(){o(c)}),1e3*i.timedelay),""!==i.scroll){var t=function(){var r=n.documentElement,a=n.body;(r.scrollTop||a.scrollTop)/((r.scrollHeight||a.scrollHeight)-r.clientHeight)*100>=i.scroll&&(o(c),e.removeEventListener("scroll",t))};e.addEventListener("scroll",t,!1)}}else o(c)}function j(){var t=n.querySelector(".ctc_woo_schedule");if(t){var e=t.getAttribute("data-dt");t.style.display=e}}"yes"===a?(O(),j(),void 0!==p&&p()):"no"===a&&(i.off_cta&&n.querySelectorAll(".ht-ctc-chat .ctc_cta, .ctc_chat.ctc_woo_schedule .ctc_cta").forEach((function(t){t.textContent=i.off_cta})),i.off_num&&(i.number=i.off_num,i.r_nums=""),i.off_hide||(O(),j()),(r=n.querySelector(".for_greetings_header_image_badge"))&&(i.offline_badge_color&&(r.classList.add("g_header_badge_online"),n.querySelectorAll(".g_header_badge_online").forEach((function(t){t.style.backgroundColor=i.offline_badge_color}))),b(".for_greetings_header_image_badge","","","ht-ctc-display-unset","")))}(t)}})),n.addEventListener("ht_ctc_event_after_chat_displayed",(function(t){i=t.detail.ctc;var r=t.detail.greetings_open;if(i.g_no_reopen&&"user_closed"===v("g_user_action"));else if(i.g_time_action&&setTimeout((function(){r("time_action")}),1e3*i.g_time_action),i.g_scroll_action){var o=function(){var t=n.documentElement,c=n.body;(t.scrollTop||c.scrollTop)/((t.scrollHeight||c.scrollHeight)-t.clientHeight)*100>=i.g_scroll_action&&(r("scroll_action"),e.removeEventListener("scroll",o))};e.addEventListener("scroll",o,!1)}if(n.querySelector(".ctc_greetings_now")&&"IntersectionObserver"in e){var c=e.innerHeight/4*-1,a=(c=parseInt(c))+"px";a=String(a);var u=new IntersectionObserver((function(t){t.forEach((function(t){t.isIntersecting&&(r("now"),u.unobserve(t.target))}))}),{rootMargin:a});n.querySelectorAll(".ctc_greetings_now").forEach((function(t){u.observe(t,{subtree:!0,childList:!0})}))}})),n.addEventListener("ht_ctc_event_apply_variables",(function(t){var n,r,o=(null===(n=t.detail)||void 0===n?void 0:n.templateString)||(null===(r=t.detail)||void 0===r?void 0:r.v);o=P(o),e.apply_variables_value=o})),I()}(window,document,"undefined"!=typeof window&&"function"==typeof window.jQuery?window.jQuery:null)})();
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.