!function(){var e={5892:function(e){e.exports={homeUrl:"https://www.purechat.com",apiUrl:"https://api.purechat.com",cdnUrl:"https://prod.purechatcdn.com",apiCdnServerUrl:"https://api-cdn.purechat.com",trackingOperatorApiUrl:"https://visitors.purechat.com",adminApiUrl:"https://admin-api.purechat.com",googleEmbedApiKey:"AIzaSyBEorMC35CFuuH2caNZhAeFGRtqwbWE4Mc",cdnServerUrl:"https://prod.purechatcdn.com",customerIoSiteId:"d4a6e4df3666072e5b55",dashboardRootUrl:"https://app.purechat.com",apiRootUrl:"https://api.purechat.com",widgetApiRootUrl:"https://widgetapi.purechat.com",filesRootUrl:"https://files.purechat.com",pingQueueUrl:"https://checkin.purechat.com/api/checkin",authCookieName:"purechatAuthv5",pidCookieName:"prodvtftwPID",pingInterval:5e3,sessionTimeout:12e5,recaptchaClientKey:"6LeJv-MUAAAAADCcAJn1EW3l5bMoqAxPfCO898oc",adminTokenName:"prodAdminToken"}}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,n),r.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){"use strict";var e=n(5892),t=n.n(e);function i(e,t,n){var i=document.createElement("script");if(i.async=!0,i.type="text/javascript","string"==typeof e)i.src=e;else{var o=e.url,r=e.sha;i.crossOrigin="anonymous",i.integrity=r,i.src=o}var a=!1;function c(){a||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(a=!0,t(i))}n&&"function"==typeof n&&(i.onerror=n),i.onload=c,i.onreadystatechange=c,document.body.appendChild(i)}var o={},r=0;function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=n||"_WidgetJPCB".concat(r);window[i]=function(){t.apply(void 0,arguments),window[i]=function(){}};var a=document.createElement("script");a.setAttribute("data-cfasync",!1),a.setAttribute("async",!0),a.setAttribute("type","text/javascript"),r+=1;var c=e;c.indexOf("?")<0&&(c+="?_=_"),c+="&callback=".concat(i);var d=!1;function u(){d||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(d=!0,clearTimeout(o["JSONPTimeout".concat(i)]),delete o["JSONPTimeout".concat(i)])}a.onload=u,a.onreadystatechange=u,window.location.search.indexOf("pcforcemobile")>=0&&(c+="&forceMobile=true"),a.setAttribute("src",c),document.getElementsByTagName("HEAD")[0].appendChild(a),o["JSONPTimeout".concat(i)]=setTimeout((function(){throw new Error("Pure Chat widget failed to load")}),2e4)}var c=window.rubyApi||!1,d=(new Date).getTime();function u(e,t,n){var i=new XMLHttpRequest;i.open("GET",e),i.withCredentials=!0,i.onerror=function(){n&&n("".concat(i.status,"::").concat(i.responseText))},i.onload=function(){if(200===i.status){var e=JSON.parse(i.responseText);t&&t(e)}else n&&n("".concat(i.status,"::").concat(i.responseText))},i.send()}function p(e,n){var i,o,r;c&&(i="".concat(t().widgetApiRootUrl,"/ajaxlogger/log"),o={level:3,message:"".concat(n," -- session: ").concat(d," -- agent: ").concat(window.navigator.userAgent," -- page: ").concat(window.location.host).concat(window.location.pathname," -- checkpoint: ").concat(window.rubyRenderCheckpoint||"","::").concat(window.rubyRenderInternalCheckpoint||""),stackTrace:"",chatServerUrl:"",extraData:{clientType:"loader-script",clientVersion:"13.8.51",clientId:e}},(r=new XMLHttpRequest).open("POST",i),r.withCredentials=!0,r.setRequestHeader("Accept","application/json"),r.setRequestHeader("Content-Type","application/json"),r.onload=function(){r.status},r.send(JSON.stringify(o)))}function s(e,t,n){var i=0,o=t;for(arguments.length<2&&(i=1,o=e[0]);i<e.length;i+=1)o=n(o,e[i],i,e);return o}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function g(e,t,n){return t&&y(e.prototype,t),n&&y(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var b=window.rubyApi||!1,v=["browser not supported","local storage disabled"],m=function(e){return"modern"===(e.StyleName||"").toLowerCase()||3===e.StyleId};!window.rubyRenderTimeoutIds&&b&&(window.rubyRenderTimeoutIds=[]),window.rubyRenderCheckpoint||(window.rubyRenderCheckpoint=""),window.rubyRenderInternalCheckpoint||(window.rubyRenderInternalCheckpoint="");var R=function(){return v.indexOf(window.rubyRenderCheckpoint)<0};window.updateRubyRenderCheckpoint=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(R()||t)&&(window.rubyRenderCheckpoint=e)},window.updateRubyRenderInternalCheckpoint=function(e){window.rubyRenderInternalCheckpoint=e};var k=null;function C(e,n,o){return e?i({url:"//ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js",sha:"sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="},n,(function(){return i("".concat(t().cdnUrl,"/assets/jquery.fallback.360.js"),n,o)})):n()}window.MooTools&&(k=Function.prototype.bind,Function.prototype.bind=function(e){if("function"!=typeof this)throw new TypeError("Function.prototype.bind");var t=Array.prototype.slice.call(arguments,1),n=this,i=function(){},o=function(){return n.apply(this instanceof i?this:e,t.concat(Array.prototype.slice.call(arguments)))};return this.prototype&&(i.prototype=this.prototype),o.prototype=new i,o});var A=function(){function e(t){f(this,e),this.api=t.getPublicApi()}return g(e,[{key:"on",value:function(){var e;return(e=this.api).on.apply(e,arguments)}},{key:"off",value:function(){var e;return(e=this.api).off.apply(e,arguments)}},{key:"action",value:function(){var e;return(e=this.api).action.apply(e,arguments)}},{key:"set",value:function(){var e;return(e=this.api).set.apply(e,arguments)}},{key:"get",value:function(){var e;return(e=this.api).get.apply(e,arguments)}}]),e}(),j=function(){function e(){var n=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(this,e);var r=s(Object.keys(o).map((function(e){return e.toLowerCase().trim()})),{},(function(e,t){return{c:w(w({},e),{},{widgetId:o[t]}),o:w(w({},e),{},{overrideWidgetId:o[t]}),pureserverurl:w(w({},e),{},{pureServerUrl:o[t]}),chatserverurl:w(w({},e),{},{chatServerUrl:o[t]}),f:w(w({},e),{},{isWidget:o[t]})}[t]}),{});if(!window.rubyChatLoading&&b)window.rubyChatLoading=!0;else if(window.rubyChatLoading){console.warn("Ruby chat attempted to load twice, most likely to snippet being on the site twice.");var c=r.overrideWidgetId||r.widgetId;return void p(c,"[Ruby] Widget (".concat(c,") attempted to load with another snippet on the page."))}var d=function(){var e=r.overrideWidgetId||r.widgetId;if(window.updateRubyRenderCheckpoint("start of init"),b){var o=window.setTimeout((function(){p(e,"[Ruby] Widget (".concat(e,") failed to render"))}),45e3);window.rubyRenderTimeoutIds.push(o)}var c=function(){return window.rubyRenderTimeoutIds&&window.rubyRenderTimeoutIds.length>0&&(window.rubyRenderTimeoutIds.forEach((function(e){return window.clearTimeout(e)})),delete window.rubyRenderTimeoutIds),!1};window.updateRubyRenderCheckpoint("widget versions fetching"),u("".concat(t().widgetApiRootUrl,"/api/visitorwidget/widgetversions/").concat(e),(function(o){window.updateRubyRenderCheckpoint("widget versions fetched");var d=w(w({},r),n.mapWidgetVersionSettings(o));return d.QuotaExceeded||d.Stop?c():(window.updateRubyRenderCheckpoint("widget settings fetching"),u("".concat(t().apiCdnServerUrl,"/api/visitorwidget/widget/").concat(e,"/").concat(d.WidgetVersion),(function(o){if(window.updateRubyRenderCheckpoint("widget settings fetched"),d=w(w({},o),d),!n.isAllowedDomain(d.AllowedDomains))return c();var r=!m(d);return window.updateRubyRenderCheckpoint("jquery fetching"),C(r,(function(){window.updateRubyRenderCheckpoint("jquery fetched"),r&&(window.pc$=window.jQuery.noConflict(!0)),window.updateRubyRenderCheckpoint("dashboard version fetching"),a("".concat(t().dashboardRootUrl,"/version"),(function(o){window.updateRubyRenderCheckpoint("dashboard version fetched");var a=r?o.assets["widget-script.js"]||o.assets["widgetScript.js"]||o.assets["legacy.js"]:o.assets["modern.js"],u="".concat(t().cdnUrl).concat(a);window.updateRubyRenderCheckpoint("widget script fetching"),i(u,(function(){window.updateRubyRenderCheckpoint("widget script fetched"),window._pcwi&&delete window._pcwi;var t=window._pcWidgetInitializer;return t?(window.updateRubyRenderCheckpoint("initializer starting"),t.start(d,(function(e){if(window.updateRubyRenderCheckpoint("initializer started"),c(),n.widget=e,window.purechatApi&&r){var t=window.purechatApi,i=t.l,o=t.t;window.purechatApi=new A(e),i&&i.forEach((function(e){return window.purechatApi.on.apply(window.purechatApi,e)})),o&&o.forEach((function(e){return window.purechatApi.action.apply(window.purechatApi,e)}))}window.MooTools&&null!==k&&(Function.prototype.bind=k),window.updateRubyRenderCheckpoint(null),delete window.rubyRenderCheckpoint}))):(p(e,"[Ruby] Widget (".concat(e,") failed to load widget initializer")),console.log("Pure Chat Widget failed to load"),null)}),(function(){c(),p(e,"[Ruby] Widget (".concat(e,") failed to load widget script")),console.log("Failed to load widget script")}))}),"_WidgetJPCB_Version")}),(function(){c(),p(e,"[Ruby] Widget (".concat(e,") failed to load third party libraries")),console.log("Libraries failed to load")}))}),(function(t){p(e,"[Ruby] Widget (".concat(e,") failed to load widget settings - err: ").concat(t))})))}),(function(t){p(e,"[Ruby] Widget (".concat(e,") failed to load widget versions - err: ").concat(t))}))};"complete"===document.readyState?setTimeout(d,0):window.addEventListener?window.addEventListener("load",d,!1):window.attachEvent?window.attachEvent("onload",d):window.onload=d}return g(e,[{key:"mapWidgetVersionSettings",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return s(Object.keys(e).map((function(e){return e.toLowerCase().trim()})),{},(function(t,n){return{v:w(w({},t),{},{Valid:!0===e[n]||1===e[n]}),wv:w(w({},t),{},{WidgetVersion:e[n]}),csu:w(w({},t),{},{ChatServerUrl:e[n]}),sru:w(w({},t),{},{SiteRootUrl:e[n]}),dap:w(w({},t),{},{DisableAvailabilityPings:!0===e[n]||1===e[n]}),ip:w(w({},t),{},{VisitorIPAddress:e[n]}),rfm:w(w({},t),{},{RequestFromMobileDevice:!0===e[n]||1===e[n]}),b:w(w({},t),{},{IPIsBanned:!0===e[n]||1===e[n]}),cru:w(w({},t),{},{CdnRootUrl:e[n]}),acru:w(w({},t),{},{ApiCdnRootUrl:e[n]}),id:w(w({},t),{},{Id:e[n]}),s:w(w({},t),{},{Stop:!0===e[n]||1===e[n]}),qe:w(w({},t),{},{QuotaExceeded:!0===e[n]||1===e[n]})}[n]||t}))}},{key:"isAllowedDomain",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return 0===e.length||(e.push("purechat.com"),e.some((function(e){return/^\*$/.test(e)||-1!==document.domain.search(e)})))}},{key:"publicApi",get:function(){return this.widget?this.widget.getPublicApi():null}},{key:"set",value:function(){var e;this.publicApi&&(e=this.publicApi).set.apply(e,arguments)}},{key:"get",value:function(){var e;this.publicApi&&(e=this.publicApi).get.apply(e,arguments)}},{key:"on",value:function(){var e;this.publicApi&&(e=this.publicApi).on.apply(e,arguments)}},{key:"trigger",value:function(){var e;this.publicApi&&(e=this.publicApi).trigger.apply(e,arguments)}}]),e}();window.PCWidget=j}()}();