/*! For license information please see twk-chunk-common.js.LICENSE */ (window.tawkJsonp=window.tawkJsonp||[]).push([["chunk-common"],{"028e":function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return g}));var i=n("5868"),o=n("7f46"),r=n("e8f9"),a=n("f0b0"),s=n("27a6");function c(t){return(c="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})(t)}function u(){u=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,n){return t[e]=n}}function f(t,e,n,i){var r=e&&e.prototype instanceof v?e:v,a=Object.create(r.prototype),s=new x(i||[]);return o(a,"_invoke",{value:W(t,n,s)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",m="executing",g="completed",w={};function v(){}function y(){}function b(){}var k={};d(k,a,(function(){return this}));var T=Object.getPrototypeOf,S=T&&T(T(A([])));S&&S!==n&&i.call(S,a)&&(k=S);var _=b.prototype=v.prototype=Object.create(k);function I(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,r,a,s){var u=h(t[o],t,r);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==c(d)&&i.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(d).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(u.arg)}var r;o(this,"_invoke",{value:function(t,i){function o(){return new e((function(e,o){n(t,i,e,o)}))}return r=r?r.then(o,o):o()}})}function W(e,n,i){var o=p;return function(r,a){if(o===m)throw Error("Generator is already running");if(o===g){if("throw"===r)throw a;return{value:t,done:!0}}for(i.method=r,i.arg=a;;){var s=i.delegate;if(s){var c=C(s,i);if(c){if(c===w)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===p)throw o=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=m;var u=h(e,n,i);if("normal"===u.type){if(o=i.done?g:"suspendedYield",u.arg===w)continue;return{value:u.arg,done:i.done}}"throw"===u.type&&(o=g,i.method="throw",i.arg=u.arg)}}}function C(e,n){var i=n.method,o=e.iterator[i];if(o===t)return n.delegate=null,"throw"===i&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),w;var r=h(o,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,w;var a=r.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,w):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,w)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,r=function n(){for(;++o=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),w}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:A(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),w}},e}function l(t,e,n,i,o,r,a){try{var s=t[r](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(i,o)}function d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function f(t){for(var e=1;e|$)/gm,this.regSurveyQuestion=/^([\s\S]*?)\[option\]/,this.regOption=/\[option\]/g}),[{key:"processHistoryMessages",value:function(t){for(var e=this,n=[],i={},o=null,r=!1,s=!1,c=!1,u=function(){var u,d,h,p,m=!1,g=null,w=t[l],v=a.Helper.generateUUID(),y=new Date(w.co).getTime(),b={};if("WEBRTC_CALL"===w.m&&w.md&&w.md.webrtc&&(m=!0,g=w.md.clid),"n"===w.t&&"WEBRTC_CALL"!==w.m)return"AGENT_JOIN_CONVERSATION"===w.m&&w.md&&(i[w.md.rsc]=w.md),0;if(w.md&&w.md.ao)return 0;if(p=w.n,u=w.uid,"a"===w.ut){var k=i[w.md.rsc];k&&(u=k.pid,d=k.pi?"".concat("https://s3.amazonaws.com/tawk-to-pi","/").concat(k.pi):"".concat("https://embed.tawk.to/_s/v4/assets","/images/default-profile.svg"))}else"s"===w.ut&&(u=a.Helper.generateUUID(),d=w.md&&w.md.pi?"".concat("https://tawk.link","/").concat(w.md.pi):"".concat("https://embed.tawk.to/_s/v4/assets","/images/default-profile.svg"));if(w.attchs&&Array.isArray(w.attchs)&&w.attchs.forEach((function(t){var n=t.type;"suggested-messages"===n?(c=!0,o={options:t.content.options}):"file"===n?b=e.processFile(w):"ticket-form"===n?r=!0:"lead-capture-form"===n&&(s=!0)})),c||"v"===w.ut)h=e.parseText(w.m);else{var T=e.parseSurvey(w.m),S=T.parsedMessage,_=T.surveyOptions;h=S,_&&(o={options:_})}n.push(f(f({},b),{},{timeStamp:y,message:h||"",name:p,type:w.t,time:w.co,data:w.md,isPending:!1,senderType:w.ut,ownerId:u,profileImage:d,cver:w.cver,messageId:v,isCallView:m,callId:g,callData:null,surveyObj:o,rawMessage:w,hasInlineTicketForm:r,hasInlineLeadCaptureForm:s}))},l=0;l0?(e.m="thumbs-up",e.t="c"):e.m=t.Tawk_Window.app.$i18n("chat","remove_rate"))}if("v"===e.ut)i=this.store.getters["visitor/displayName"],r=e.uid;else if(i=e.n,"a"===e.ut){var _=this.store.getters["chat/agents"];_[e.md.rsc]&&(r=_[e.md.rsc].profileId);var I=this.store.getters["chat/agentProfile"](e.md.rsc);s=I?I.profileImage:null}else"s"===e.ut&&(s=e.md&&e.md.pi?"".concat("https://tawk.link","/").concat(e.md.pi):"".concat("https://embed.tawk.to/_s/v4/assets","/images/default-profile.svg"));if(e.attchs&&Array.isArray(e.attchs)&&e.attchs.forEach((function(t){var n=t.type;"suggested-messages"===n?(b=!0,m={options:t.content.options}):"file"===n?p=l.processFile(e):"ticket-form"===n?(v=!0,g=t.content.ref):"lead-capture-form"===n&&(y=!0,w=t.content.ref)})),"WEBRTC_CALL"===e.m&&e.md&&e.md.webrtc)d=!0,h=e.md.clid;else{if("c"===e.t)if("v"===e.ut)this.store.commit("chat/setVisitorHasMessaged",!0);else if("a"===e.ut){if(this.store.commit("chat/setAgentHasMessaged",!0),n){var P={message:e.m,attachments:e.attchs?e.attchs:[]};0===e.m.length&&delete P.message,t.Tawk_Window.jsApi.triggerApiHandlers("onChatMessageAgent",P)}}else if("s"===e.ut&&n){var W={message:e.m,attachments:e.attchs?e.attchs:[]};0===e.m.length&&delete W.message,t.Tawk_Window.jsApi.triggerApiHandlers("onChatMessageSystem",W)}if(b||"v"===e.ut)u=this.parseText(e.m);else{var C=this.parseSurvey(e.m),E=C.parsedMessage,O=C.surveyOptions;u=E,O&&(m={options:O})}}return T>this.store.getters["session/lastMessageTimestamp"]&&("v"===e.ut?this.store.commit("session/setLastMessageTimestamp",T):(this.store.dispatch("chat/updateUnseenMessages",k),n&&t.Tawk_Window.jsApi.triggerApiHandlers("onUnreadCountChanged",this.store.getters["chat/unreadMessageCount"]))),p=f(f({},p),{},{timeStamp:T,message:u,name:i,type:e.t,time:e.co,data:e.md,isPending:!T,senderType:e.ut,ownerId:r,profileImage:s,cver:e.cver,messageId:k,isCallView:d,callId:h,callData:null,surveyObj:m,rawMessage:e,ticketFormRef:g,hasInlineTicketForm:v,leadFormRef:w,hasInlineLeadCaptureForm:y})}},{key:"processFile",value:function(t){if(t.attchs&&Array.isArray(t.attchs)){var e={images:[],videos:[],audios:[],files:[]};return t.attchs.forEach((function(t){if("file"===t.type){var n=t.content.file;-1!==["image/jpeg","image/png","image/gif"].indexOf(n.mimeType)?e.images.push({source:n.url,name:o.a.rawEncode(n.name)}):-1!==["video/mp4","video/ogg","video/webm"].indexOf(n.mimeType)?e.videos.push({source:"selfhosted",url:n.url,name:o.a.rawEncode(n.name),size:i.a.formatFileSize(n.size),options:{controls:"",mute:!0,loop:!1,startTime:0}}):-1!==["audio/mp3","audio/ogg","audio/mpeg","audio/wav"].indexOf(n.mimeType)?e.audios.push({source:n.url,type:n.mimeType,name:o.a.rawEncode(n.name),size:i.a.formatFileSize(n.size)}):e.files.push({source:n.url,name:o.a.rawEncode(n.name),size:i.a.formatFileSize(n.size)})}})),{attchs:e}}}},{key:"parseText",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return t;for(var n=t.split("\n"),i=0;i2&&"string"==typeof e[2]&&e[2].length>0)return e[2]}},{key:"parseEmail",value:function(t){var e="";return void 0!==window.emojione&&window.emojione.unifyUnicode(t)!==t?t:(-1===t.indexOf("mailto")&&(e="mailto:"),"[".concat(t,"](").concat(e+t,")"))}},{key:"parseSurvey",value:function(t){var e=t.match(this.regSurveyQuestion);if(null===e)return{parsedMessage:this.parseText(t),surveyOptions:null};var n=this.parseText(o.a.trim(e[1])),r=[],a=t.match(this.regSurvey);if(!a)return{parsedMessage:n,surveyOptions:null};for(var s=0,c=a.length;si.seq.time||r.seq.time===i.seq.time&&r.seq.inc>i.seq.inc)){if(n){var a=this.store.getters["chat/agentProfile"](o);a&&t.Tawk_Window.jsApi.triggerApiHandlers("onAgentLeaveChat",{name:a.displayName,position:a.profileTitle,image:a.profileImage,id:e.uid})}this.store.dispatch("chat/agentLeft",{resourceId:o,agentData:i})}}},{key:"sendMessagePreview",value:function(e){var n,r=this,a=i.a.getTargetElement(e);if(13===e.keyCode&&!e.shiftKey&&!this.store.getters["browserData/mobileBrowserName"])return n=o.a.trim(a.value),a.value="",this.sendMessage(n);!this.keyDownTimeout&&this.store.getters["widget/showVisitorTyping"]&&(this.keyDownTimeout=setTimeout((function(){n=o.a.trim(a.value),void 0!==window.emojione&&(n=window.emojione.toShort(n)),t.Tawk_Window.app.$socket.publish("notifyMessagePreview",n),clearTimeout(r.keyDownTimeout),r.keyDownTimeout=null}),1e3))}},{key:"sendMessage",value:function(){var t=function(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var r=t.apply(e,n);function a(t){l(r,i,o,a,s,"next",t)}function s(t){l(r,i,o,a,s,"throw",t)}a(void 0)}))}}(u().mark((function t(e){var n,i,r,a,s,c,l;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.message,i=void 0===n?"":n,r=e.attachments,a=void 0===r?[]:r,s=e.callback,i=o.a.rawDecode(o.a.trim(i)),s=s||function(){},c=!1,l=[],1!==a.length||"lead-capture-response"!==a[0].type){t.next=10;break}l=a,c=!0,t.next=14;break;case 10:if(!(a.length>0)){t.next=14;break}return t.next=13,this.uploadFiles(a);case 13:l=t.sent;case 14:clearTimeout(this.keyDownTimeout),this.keyDownTimeout=0,i.length>0&&void 0!==window.emojione&&(i=i.replace(/©/gm,"©").replace(/®/gm,"®").replace(/™/gm,"™"),i=(i=window.emojione.toShort(i)).replace(/©/gm,"©").replace(/'®/gm,"®").replace(/™/gm,"™")),this.sendMessageToServer({message:i,attachments:l,callback:s,isLeadCaptureForm:c});case 18:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"sendMessageToServer",value:function(e){var n=this,i=e.message,r=e.attachments,a=void 0===r?[]:r,s=e.callback,c=void 0===s?function(){}:s,u=e.isLeadCaptureForm,l=void 0!==u&&u;c=c||function(){};var d=this.parseChatMessage({attchs:a,ut:"v",t:"c",m:o.a.rawEncode(i),co:null,uid:this.store.getters["visitor/visitorId"]});l||this.store.commit("chat/setOutgoingMessage",d);var f={message:i,attachments:a};0===i.length&&delete f.message,t.Tawk_Window.app.$socket.publish("sendChatMessage",f,(function(e,i){e?(d.sendFailed=!0,d.isPending=!1):(l&&n.store.commit("chat/setOutgoingMessage",d),d.cver=i.data.cver,d.timeStamp=new Date(i.data.co).getTime(),d.time=i.data.co,d.isPending=!1,d.rawMessage.co=i.data.co,d.sendFailed=!1,t.Tawk_Window.jsApi.triggerApiHandlers("onChatMessageVisitor",f),n.store.dispatch("session/addWaitTime"),n.store.dispatch("chat/outgoingChatMessage",d)),c(e)}))}},{key:"changeRating",value:function(e,n){var i,o="c";this.store.getters["chat/rating"]===e&&(e=0),this.store.commit("chat/setRating",e),n||(t.Tawk_Window.app.$socket.publish("setRating",e),t.Tawk_Window.jsApi.triggerApiHandlers("onChatSatisfaction",e)),e<0?i="thumbs-down":e>0?i="thumbs-up":(i=t.Tawk_Window.app.$i18n("chat","remove_rate"),o="n");var r=this.parseChatMessage({ut:"v",t:o,m:i,co:new Date,uid:this.store.getters["visitor/visitorId"],md:{rt:e}});n||(this.store.commit("chat/setOutgoingMessage",r),this.store.dispatch("chat/updateRatingMessage",r))}},{key:"uploadFiles",value:function(e){for(var n=this,i=[],c=[],u=[],l=function(){var t=e[d],s={uuid:a.Helper.generateUUID(),handle:null,fileName:o.a.rawEncode(t.file.name),percentage:0,hasError:!1,fileData:t};return t.file.size>n.maxSizeFileUpload?(c.push(o.a.rawEncode(t.file.name)),0):d>=n.maxNumberFileUpload?(u.push(t),0):(n.store.commit("chat/addFileUpload",s),void i.push(new Promise((function(e,i){r.a.getUploadHandler((function(i){s.handle=i,r.a.uploadFile(i,n.store.getters["session/sessionKey"],t.file,(function(t){e(t),n.store.commit("chat/removeFileUpload",s.uuid)}))}),i)}))))},d=0;do.data.call.ver)return i.hasError=!0,void n.store.dispatch("chat/updateCallData",i);var r,a=o.data.call;("a"!==a.cllr.t||(r=n.store.getters["chat/agentProfile"](a.cllr.urid)))&&((i={callId:a.clid,status:a.stts,version:a.ver,isMissed:a.mssd,isRejected:a.rjctd,isRinging:"ringing"===a.stts,isDone:"completed"===a.stts,isVideo:a.f.vid,isScreenshare:a.f.scrn,hasError:!1,caller:r||a.cllr,startedAt:a.so,endedAt:a.eo}).isRinging&&i.caller&&"a"===a.cllr.t?n.store.commit("chat/setIncomingCall",i):i.isDone&&n.store.getters["chat/incomingCall"]&&n.store.getters["chat/incomingCall"].callId==i.callId&&n.store.commit("chat/setIncomingCall",null),i.isDone?n.store.dispatch("chat/updateOngoingCall",!1):n.store.dispatch("chat/updateOngoingCall",!0),n.store.dispatch("chat/updateCallData",i),t.Tawk_Window.eventBus.$emit("callDataUpdated",i))}))}},{key:"chatTransferUpdate",value:function(t,e){this.store.dispatch("chat/updateChatTransferData",{transfer:t,transferVersion:e})}},{key:"acceptCall",value:function(){var e=this;this.store.getters["browserData/isWebRTCAvailable"]&&(this.webrtcWin=window.open("",""),t.Tawk_Window.app.$socket.publish("getWebRTCToken",{},(function(t,n){e.store.commit("chat/setIncomingCall",null),t&&e.webrtcWin.close(),e.webrtcWin.location.href="".concat("https://video.tawk.to","/v2/call?token=").concat(n.data.token)})))}},{key:"declineCall",value:function(e){var n=this,i={callId:e};t.Tawk_Window.app.$socket.publish("declineCall",i,(function(){n.store.commit("chat/setIncomingCall",null)}))}},{key:"initiateCall",value:function(e,n){var i=this;this.webrtcWin=window.open("",""),t.Tawk_Window.app.$socket.publish("getWebRTCToken",{video:e,screen:n},(function(t,e){t&&i.webrtcWin.close(),i.webrtcWin.location.href="".concat("https://video.tawk.to","/v2/call?token=").concat(e.data.token)}))}},{key:"clearUnseenNotification",value:function(){this.store.dispatch("chat/clearUnseenMessages"),t.Tawk_Window.jsApi.triggerApiHandlers("onUnreadCountChanged",this.store.getters["chat/unreadMessageCount"])}},{key:"updateFileProgress",value:function(t,e,n){for(var i,o=this.store.getters["chat/uploadFiles"],r=0;r50)return o=!0,void n("[JSAPI/setAttributes]: 50 custom attributes are only allowed.");Object.keys(e).forEach((function(t){if("hash"!==t){if(!function(t){return/^[a-zA-Z0-9-]{1,50}$/.test(t)}(t))return o=!0,void n("[JSAPI/setAttributes]: Invalid key: ".concat(t));var i=e[t];return function(t){return"string"==typeof t&&t.length<=255||"number"==typeof t||"boolean"==typeof t||null===t}(i)?void 0:(o=!0,void n("[JSAPI/setAttributes]: Invalid value for key ".concat(t,": ").concat(i,"}")))}})),o||(e=t.Tawk_Window.jsApi.secureWrapper(e),t.Tawk_Window.app.$socket.publish("setAttributes",e,(function(t){t||(e.name||e.email)&&i.store.dispatch("visitor/updateVisitorInformation",{n:e.name||void 0,e:e.email||void 0}),n(t)})))}},{key:"addTags",value:function(e,n){var i;n=n||function(){},(i=t.Tawk_Window.jsApi.secureWrapper({})).tags=e,t.Tawk_Window.app.$socket.publish("addTags",i,n)}},{key:"removeTags",value:function(e,n){var i;n=n||function(){},(i=t.Tawk_Window.jsApi.secureWrapper({})).tags=e,t.Tawk_Window.app.$socket.publish("removeTags",i,n)}},{key:"parsePhoneNumber",value:function(t){var e="";return-1===t.indexOf("tel")&&(e="tel:"),''+t+" "}}])}).call(this,n("c8ba"))},"0ad2":function(t,e,n){"use strict";(function(t){function i(t){return(i="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})(t)}function o(t,e){for(var n=0;n=.2&&t.sound.pause()}),!1),t.sound.load(),t.play=function(){try{this.sound.currentTime=0,this.sound.autoplay=!0,this.sound.load(),this.sound.play()}catch(t){}},t;t.play=function(){}}}])}).call(this,n("c8ba"))},"0dc3":function(t,e,n){"use strict";n.r(e);e.default={namespaced:!0,state:{isIe:!1,html5audio:null,mobileBrowserName:null,searchEngine:null,vendor:null,version:null,isWebRTCAvailable:!0,os:null},getters:{isIE:function(t){return t.isIE},html5audio:function(t){return t.html5audio},mobileBrowserName:function(t){return t.mobileBrowserName},searchEngine:function(t){return t.searchEngine},vendor:function(t){return t.vendor},version:function(t){return t.version},isWebRTCAvailable:function(t){return t.isWebRTCAvailable},os:function(t){return t.os}},actions:{updateInitialData:function(t,e){(0,t.commit)("setInitialData",e)},resetState:function(t){(0,t.commit)("unsetData")}},mutations:{setInitialData:function(t,e){t.vendor=e.vendor,t.version=e.version,t.isIE=e.isIE,t.mobileBrowserName=e.mobileBrowserName,t.html5audio=e.html5audio,t.searchEngine=e.searchEngine,t.isWebRTCAvailable=e.isWebRTCAvailable,t.os=e.os},setMobileBrowserName:function(t,e){t.mobileBrowserName=e},unsetData:function(t){for(var e={isIe:!1,html5audio:null,mobileBrowserName:null,searchEngine:null,vendor:null,version:null,isWebRTCAvailable:!0,os:null},n=Object.keys(e),i=0;i=h.start&&l=c.start&&a1&&void 0!==arguments[1]?arguments[1]:function(){};o("chat/resetState",null,{root:!0}),t.Tawk_Window.activityMonitor.cleanUp(),i.a.disconnectSocket(),delete window.$_Tawk.downloaded,n("setVisibility",!1),r()},start:function(e,n){var i=e.commit,a=e.rootGetters,s=e.dispatch,c=n.params,u=void 0===c?{}:c,l=n.callback,d=void 0===l?function(){}:l;s("socket/updateIsConnecting",!0,{root:!0});var f=a["property/id"],h=a["widget/id"],p=new o.a({propertyId:f,widgetId:h,callback:function(){u.showWidget&&i("setVisibility",!0),d()}});new Promise((function(e,n){t.Tawk_Window.register.init(e,n)})).then((function(e){t.Tawk_Window.widgetSettings.version=e.data.settingsVersion;var n=window.sessionStorage.getItem("tawk_sv");n&&n===e.data.settingsVersion?(p.extractRegistrationData(e),t.Tawk_Window.eventBus.$emit("updateWidgetSettings"),t.Tawk_Window.app.$socket.connect(),t.Tawk_Window.activityMonitor.initActivityReset(),r.a.dispatch("router/clearHistory")):(window.sessionStorage.setItem("tawk_sv",e.data.settingsVersion),t.Tawk_Window.widgetSettings.getSettings((function(){p.extractRegistrationData(e),t.Tawk_Window.eventBus.$emit("updateWidgetSettings"),t.Tawk_Window.app.$socket.connect(),t.Tawk_Window.activityMonitor.initActivityReset(),r.a.dispatch("router/clearHistory")}),(function(t){console.error(t)})))}))},switchWidget:function(e,n){var i=e.dispatch,a=e.commit,s=n.propertyId,c=n.widgetId,u=n.callback;return null===s?u("INVALID_PROPERTY_ID"):null===c?u("INVALID_WIDGET_ID"):(i("shutdown"),r.a.dispatch("reset"),void new o.a({propertyId:s,widgetId:c,callback:function(){a("setVisibility",!0),t.Tawk_Window.eventBus.$emit("switchWidget"),t.Tawk_Window.updateBootConfig({propertyId:s,widgetId:c}),u()}}).init())}},mutations:{setBranding:function(t,e){t.branding=e},setId:function(t,e){t.id=e},setData:function(t,e){if(t.version=e.version,t.onClick=e.behavior.click,t.components=e.components,t.theme=e.theme,t.states=e.states,t.bubble=e.bubble,t.agentDrivenStatus=e.agentDrivenStatus,t.maxDesktop={width:parseInt(e.maximized.desktop.width,10)||350,height:parseInt(e.maximized.desktop.height,10)||520},t.minDesktop=e.minimized.desktop,"rectangle"===e.minimized.desktop.type?(t.minDesktop.width=parseInt(e.minimized.desktop.width,10)||320,t.minDesktop.height=parseInt(e.minimized.desktop.height,10)||40,t.yOffset=0,t.xOffset=10):(t.minDesktop.width=60,t.minDesktop.height=60,t.yOffset=20,t.xOffset=20),t.minMobile=e.minimized.mobile,"rectangle"===e.minimized.mobile.type?(t.minMobile.width=110,t.minMobile.height=48,t.yOffsetMobile=15,t.xOffsetMobile=15):(t.minMobile.width=60,t.minMobile.height=60,t.yOffsetMobile=20,t.xOffsetMobile=20),t.generalVisibility=e.visibility.all,t.desktopVisibility=e.visibility.desktop,t.mobileVisibility=e.visibility.mobile,t.consentData=e.consent,t.language=e.language,t.isRTL=-1!==["ar","he","fa"].indexOf(e.language),t.notification=e.notification,t.features=e.features,t.bubble&&"image"===t.bubble.type&&t.bubble.config&&"gallery"===t.bubble.config.image.type){var n=e.visibility.desktop.position,i=e.minimized.desktop.type;("cr"!==n&&"rectangle"!==i||"cl"!==n&&"rectangle"!==i)&&(t.bubble.config.offsetX-=t.xOffset),"cr"!==t.desktopVisibility.position&&"cl"!==t.desktopVisibility.position&&(t.bubble.config.offsetY-=t.yOffset)}e.scheduler&&e.scheduler.config?this.dispatch("schedule/addSlots",e.scheduler):this.dispatch("schedule/addSlots")},setVisibility:function(e,n){e.show=n,e.show||t.Tawk_Window.jsApi.triggerApiHandlers("onChatHidden")},setWebrtcOptions:function(t,e){t.webrtcOptions=e},setIsWindowed:function(t,e){t.isWindowed=e},setIsEmbedded:function(t,e){t.isEmbedded=e},setZoomRatio:function(t,e){t.zoomRatio=e},unsetData:function(t){t.localSoundEnabled=!0},setAgentAvatarToolbar:function(t,e){t.toolbarOptions.showAgentAvatars=e},setMobileLandscape:function(t,e){t.isMobileLandscape=e},setFocus:function(t,e){t.isFocus=e},setIsPopout:function(t,e){t.isPopout=e},setIsIframe:function(t,e){t.isIframe=e}}}}.call(this,n("c8ba"))},"3b35":function(t,e,n){"use strict";n.r(e),function(t){var i=n("7f46");function o(){o=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,n){return t[e]=n}}function f(t,e,n,i){var o=e&&e.prototype instanceof v?e:v,a=Object.create(o.prototype),s=new x(i||[]);return r(a,"_invoke",{value:W(t,n,s)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",m="executing",g="completed",w={};function v(){}function y(){}function b(){}var k={};d(k,c,(function(){return this}));var T=Object.getPrototypeOf,S=T&&T(T(A([])));S&&S!==n&&i.call(S,c)&&(k=S);var _=b.prototype=v.prototype=Object.create(k);function I(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,r,a,c){var u=h(t[o],t,r);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==s(d)&&i.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(d).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var o;r(this,"_invoke",{value:function(t,i){function r(){return new e((function(e,o){n(t,i,e,o)}))}return o=o?o.then(r,r):r()}})}function W(e,n,i){var o=p;return function(r,a){if(o===m)throw Error("Generator is already running");if(o===g){if("throw"===r)throw a;return{value:t,done:!0}}for(i.method=r,i.arg=a;;){var s=i.delegate;if(s){var c=C(s,i);if(c){if(c===w)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===p)throw o=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=m;var u=h(e,n,i);if("normal"===u.type){if(o=i.done?g:"suspendedYield",u.arg===w)continue;return{value:u.arg,done:i.done}}"throw"===u.type&&(o=g,i.method="throw",i.arg=u.arg)}}}function C(e,n){var i=n.method,o=e.iterator[i];if(o===t)return n.delegate=null,"throw"===i&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),w;var r=h(o,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,w;var a=r.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,w):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,w)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,r=function n(){for(;++o=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),w}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:A(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),w}},e}function r(t,e,n,i,o,r,a){try{var s=t[r](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(i,o)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var a=t.apply(e,n);function s(t){r(a,i,o,s,c,"next",t)}function c(t){r(a,i,o,s,c,"throw",t)}s(void 0)}))}}function s(t){return(s="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})(t)}e.default={namespaced:!0,state:{chatBubbleClosed:!1,chatWindowState:"min",departments:[],isWindowFocused:!1,needConsent:!1,pageStatus:"",pageStatusVersion:0,prechatFormSubmitted:!1,previousSessionKey:null,restarted:!1,sessionKey:"",visitorSocketServer:"",waitTime:6e4,lastMessageTimestamp:0,token:null,tokenExpiry:0,isInactive:null,originalPageTitle:null,pageReferrer:null,waitTimeTimeout:null,waitTimeFirstTime:!1,waitTimeInitialized:!1,isReconnecting:!1,isNotValidEmail:null},getters:{chatBubbleClosed:function(t){return t.chatBubbleClosed},chatWindowState:function(t){return t.chatWindowState},isWindowFocused:function(t){return t.isWindowFocused},previousSessionKey:function(t){return t.previousSessionKey},pageStatus:function(t){return t.pageStatus},pageStatusVersion:function(t){return t.pageStatusVersion},sessionKey:function(t){return t.sessionKey},visitorSocketServer:function(t){return t.visitorSocketServer},prechatFormSubmitted:function(t){return t.prechatFormSubmitted},lastMessageTimestamp:function(t){return t.lastMessageTimestamp},token:function(t){return t.token},departments:function(t){return t.departments},waitTime:function(t){return t.waitTime},needConsent:function(t){return t.needConsent},isInactive:function(t){return t.isInactive},originalPageTitle:function(t){return t.originalPageTitle},isReconnecting:function(t){return t.isReconnecting},isNotValidEmail:function(t){return t.isNotValidEmail}},actions:{closeChatBubble:function(e,n){(0,e.commit)("setChatBubbleClosed",!0),n||t.Tawk_Window.app.$socket.publish("notifyChatBubbleClosed")},sendNavigationEvent:function(e){var n=e.state,i=e.rootGetters;t.Tawk_Window.webStorage.sessionStore.getItem("previousNav")!==window.location.href&&setTimeout((function(){var e={u:window.location.href,t:document.title};null!==i["session/originalPageTitle"]&&(e.t=i["session/originalPageTitle"]),document.referrer&&n.pageReferrer!==document.referrer&&(n.pageReferrer=document.referrer,e.r=document.referrer),t.Tawk_Window.app.$socket.publish("nav",e),t.Tawk_Window.webStorage.sessionStore.setItem("previousNav",e.u)}),500)},setPageStatus:function(e,n){var o=e.state,r=e.commit,a=e.dispatch,s=e.rootGetters,c=n.data,u=n.status;if(!s["schedule/isEnabled"]&&void 0!==s["widget/agentDrivenStatus"]&&!1===s["widget/agentDrivenStatus"])return a("triggerPageStatusAPI","online"),r("updatePageStatus","online"),void(c&&Object.keys(c).length&&c.dptst&&Array.isArray(c.dptst)&&r("setDepartment",c.dptst));if(c&&Object.keys(c).length){var l;if(!(l=c.ast)||!i.a.isString(l)||c.dptst&&!Array.isArray(c.dptst))return;(c.asver>o.pageStatusVersion||0===c.asver)&&(t.Tawk_Window.scheduler.originalPageStatus=c.ast,r("updatePageStatusVersion",c.asver),r("setDepartment",c.dptst),s["schedule/isEnabled"]||(a("triggerPageStatusAPI",c.ast),r("updatePageStatus",c.ast)),t.Tawk_Window.scheduler.calculate())}else u&&(a("triggerPageStatusAPI",u),r("updatePageStatus",u))},toggleWidget:function(t){var e=t.dispatch,n=t.state;t.rootGetters["widget/isWindowed"]?window.close():"min"===n.chatWindowState?(e("updateChatWindowState","max"),e("chat/setSeenAllUnseenMessages",null,{root:!0})):e("updateChatWindowState","min")},updateChatWindowState:function(e,n){var i=e.commit,o=e.state,r=e.rootGetters;o.chatWindowState!==n&&(i("setChatWindowState",n),"max"===n&&"pop"===r["widget/onClick"]||("max"===n?t.Tawk_Window.jsApi.triggerApiHandlers("onChatMaximized"):"min"===n&&t.Tawk_Window.jsApi.triggerApiHandlers("onChatMinimized"),t.Tawk_Window.app.$socket.publish("notifyWindowState",n)))},updateConnectionData:function(e,n){var i=e.state,o=e.commit,r=e.dispatch;void 0!==s(n.vss)&&o("setVisitorSocketServer",n.vss),void 0!==s(n.sk)&&(i.sessionKey&&i.sessionKey!==n.sk&&(t.Tawk_Window.webStorage.sessionStore.setItem("previousNav",null),r("router/routerPush","/",{root:!0})),o("setSessionKey",n.sk))},updateConsentFlag:function(t,e){(0,t.commit)("setConsentFlag",e)},updatePrechatSubmitted:function(t,e){(0,t.commit)("setPrechatSubmitted",e)},updatePreviousSessionKey:function(t,e){(0,t.commit)("setPreviousSessionKey",e)},updateIsWindowFocused:function(t,e){(0,t.commit)("setIsWindowFocused",e)},updateToken:function(e,n){var i=e.state,o=new Date;o.setSeconds(n.expiry),n.token?(i.token=n.token,t.Tawk_Window.sessionManager.storeToken(n.token)):i.token=t.Tawk_Window.sessionManager.getStoredToken(),i.tokenExpiry=o.getTime()},retrieveNewToken:function(e){return a(o().mark((function n(){var i;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.dispatch,n.abrupt("return",new Promise((function(e,n){t.Tawk_Window.register.init((function(t){i("updateToken",{token:t.data.tkn,expiry:t.data.tknExp}),e()}),n)})));case 2:case"end":return n.stop()}}),n)})))()},updateVisitorChatSeen:function(e,n){(0,e.commit)("setLastMessageTimestamp",n),t.Tawk_Window.app.$socket.publish("visitorChatSeen",{timestamp:n},(function(){}))},resetState:function(t){var e=t.commit,n=t.state;e("unsetData"),clearTimeout(n.waitTimeTimeout),e("setWaitTimeFirstTime",!1),e("setWaitTimeInitialized",!1)},updateWaitTime:function(t,e){(0,t.commit)("setWaitTime",e)},addWaitTime:function(t){var e=t.commit,n=t.state,i=t.dispatch;n.waitTimeInitialized||(e("setWaitTimeInitialized",!0),i("waitTimeUpdater"))},waitTimeUpdater:function(t){var e=t.commit,n=t.state,i=t.dispatch;clearTimeout(n.waitTimeTimeout),n.waitTime<=6e4||(n.waitTimeFirstTime?(e("setWaitTime",n.waitTime-6e4),n.waitTimeTimeout=setTimeout((function(){i("waitTimeUpdater")}),6e4)):(e("setWaitTimeFirstTime",!0),n.waitTimeTimeout=setTimeout((function(){i("waitTimeUpdater")}),6e4)))},checkTokenValidity:function(t){return a(o().mark((function e(){var n,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.dispatch,i=t.state,!((new Date).getTime()>=i.tokenExpiry)){e.next=5;break}return e.next=5,n("retrieveNewToken");case 5:return e.abrupt("return");case 6:case"end":return e.stop()}}),e)})))()},reconnectSession:function(t,e){t.state.isReconnecting=!!e},triggerPageStatusAPI:function(e,n){n!==e.state.pageStatus&&t.Tawk_Window.jsApi.triggerApiHandlers("onStatusChange",n)}},mutations:{setChatBubbleClosed:function(t,e){t.chatBubbleClosed=e},setVisitorSocketServer:function(t,e){t.visitorSocketServer=e},setSessionKey:function(t,e){t.sessionKey=e},setConsentFlag:function(t,e){t.needConsent=e},setPreviousSessionKey:function(t,e){t.previousSessionKey=e},setChatWindowState:function(t,e){t.chatWindowState=e},setIsWindowFocused:function(t,e){t.isWindowFocused=e},setPrechatSubmitted:function(t,e){t.prechatFormSubmitted=e},setLastMessageTimestamp:function(t,e){t.lastMessageTimestamp=e},setWaitTime:function(t,e){t.waitTime=e},setIsInactive:function(e,n){e.isInactive=n,t.Tawk_Window.webStorage.sessionStore.setItem("previousNav",null)},setOriginalPageTitle:function(t,e){t.originalPageTitle=e},setWaitTimeFirstTime:function(t,e){t.waitTimeFirstTime=e},setWaitTimeInitialized:function(t,e){t.waitTimeInitialized=e},setDepartment:function(t,e){t.departments=e},unsetData:function(t){for(var e={chatBubbleClosed:!1,chatWindowState:"min",departments:[],isWindowFocused:!1,needConsent:!1,pageStatus:"",pageStatusVersion:0,prechatFormSubmitted:!1,previousSessionKey:null,restarted:!1,sessionKey:"",visitorSocketServer:"",waitTime:6e4,lastMessageTimestamp:0,token:null,tokenExpiry:0,isInactive:null,originalPageTitle:null,pageReferrer:null,waitTimeTimeout:null,waitTimeFirstTime:!1,waitTimeInitialized:!1,isReconnecting:!1,isNotValidEmail:null},n=Object.keys(e),i=0;i>>0,o=0;if(arguments.length>=2)e=arguments[1];else{for(;o=i)throw new TypeError("Reduce of empty array with no initial value");e=n[o++]}for(;o/,regMatchUrl:new RegExp("(?:^"+i+"$)","i"),regMatchIp:/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?\/([a-zA-Z0-9!$&'()*+.=-_~:@\\/\\?#]+)+)\b/gi,regEmailMatch:/^((mailto:){0,1}[a-zA-Z0-9_.\-+])+@(([a-zA-Z0-9\\-])+\.)+([a-zA-Z0-9]+)$/,regTelMatch:/^(tel:\+|\+|tel:){1}(?:[0-9\-\(\)\/\.]\s?){6,15}[0-9]{1}\b/gi,br:"
",getTargetElement:function(t){var e=t.target||t.srcElement;return 3===e.nodeType&&(e=e.parentNode),e},formatFileSize:function(t){var e=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"];if(!(t=parseInt(t,10)))return"0Bytes";for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:{},n=e.propertyId,i=e.widgetId,o=e.callback;I(this,t),this.propertyId=n||window.$_Tawk_AccountKey,this.widgetId=i||window.$_Tawk_WidgetId,this.callback=o||function(){}}),[{key:"updateConfig",value:function(t){this.propertyId=t.propertyId,this.widgetId=t.widgetId}},{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.visitor,f=void 0===n?void 0:n;if(void 0===window.$_Tawk.downloaded){if(window.$_Tawk.downloaded=!0,void 0!==window.Prototype&&"string"==typeof window.Prototype.Version&&parseFloat(window.Prototype.Version.substr(0,3),10)<1.7&&void 0!==Array.prototype.toJSON){var w=JSON.stringify;JSON.stringify=function(t){var e=Array.prototype.toJSON;delete Array.prototype.toJSON;var n=w(t);return Array.prototype.toJSON=e,n}}t.Tawk_Window.logger=new p.a,t.Tawk_Window.register=new a.a(b.a),t.Tawk_Window.webStorage=o.a,t.Tawk_Window.widgetSettings=new r.a(b.a),t.Tawk_Window.jsApi=new s.a(b.a),t.Tawk_Window.audioPlayer=new c.a(b.a),t.Tawk_Window.scheduler=new u.a(b.a),t.Tawk_Window.chatManager=new l.a(b.a),t.Tawk_Window.activityMonitor=new d.a(b.a),t.Tawk_Window.sessionManager=new h.a(b.a),t.Tawk_Window.eventBus=g.a,t.$_Tawk.startTime=(new Date).getTime().toString(),t.$_Tawk.loaded=!1,t.$_Tawk.connected=!1,t.$_Tawk.ready=!1,i.a.use(m.a,{store:b.a}),i.a.use(k.a),this.checkMetaContent(),this.connect({visitor:f})}}},{key:"checkMetaContent",value:function(){for(var e,n={},i=document.getElementsByTagName("meta"),o="",r=[],a=0,s=i.length;a0&&void 0!==arguments[0]?arguments[0]:{},o=i.visitor,r=void 0===o?void 0:o;if(b.a.dispatch("reset"),b.a.dispatch("property/updateId",this.propertyId),b.a.dispatch("widget/updateId",this.widgetId),window.Tawk_API&&!1===(null===(e=window.Tawk_API)||void 0===e?void 0:e.autoStart)&&b.a.commit("widget/setVisibility",!1),b.a.dispatch("property/updateIsTawkHostedPage","tawk.to"===window.location.host),b.a.dispatch("router/addRoutes",T.a),new f.a(b.a),t.Tawk_Window.jsApi.local_API.isWindowed){var a=y.a.parseQueryString();b.a.dispatch("session/updateConnectionData",{sk:a.$_tawk_sk}),a.pop&&b.a.commit("widget/setIsPopout",!0),b.a.commit("widget/setIsWindowed",!0)}if(t.Tawk_Window.jsApi.local_API.embedded&&(b.a.commit("widget/setIsEmbedded",!0),b.a.commit("browserData/setMobileBrowserName",null)),window.top!==window){var s=!1;try{s=window.origin===window.top.origin}catch(t){}s||b.a.commit("widget/setIsIframe",!0)}t.Tawk_Window.jsApi.triggerApiHandlers("onBeforeLoad"),t.Tawk_Window.maximize=!1;var c=[new Promise((function(e,n){t.Tawk_Window.widgetSettings.getSettings(e,n)}))];window.Tawk_API&&!window.Tawk_API.autoStart&&void 0!==window.Tawk_API.autoStart||c.push(new Promise((function(e,n){t.Tawk_Window.register.init(e,n,{visitor:r})})));try{Object(v.a)(c).then((function(e){if(2===e.length){if("fulfilled"===e[0].status&&"fulfilled"===e[1].status){var i=(e[1].value||{}).data;i&&i.settingsVersion===e[0].value?(n.extractRegistrationData(e[1].value),n.createUI(!0)):(sessionStorage.setItem("tawk_sv",i.settingsVersion),t.Tawk_Window.widgetSettings.version=i.settingsVersion,t.Tawk_Window.widgetSettings.getSettings((function(){n.extractRegistrationData(e[1].value),n.createUI(!0),t.Tawk_Window.eventBus.$emit("updateWidgetSettings")}),(function(t){console.error(t)})))}}else"fulfilled"===e[0].status&&n.createUI()}))}catch(t){console.error(t)}}},{key:"extractRegistrationData",value:function(e){var n=e.data,i=n.rcf&&b.a.getters["widget/consentData"];if(b.a.dispatch("chat/updateVersion",n.cver||0),b.a.dispatch("session/updateConsentFlag",i),"max"===n.cw&&(t.Tawk_Window.maximize=!0),b.a.dispatch("session/updateConnectionData",n),i||(t.Tawk_Window.sessionManager.storeSessionInformation(),b.a.dispatch("visitor/updateUUID",n.uid),b.a.dispatch("visitor/updateVisitorInformation",n),n.dpt&&b.a.dispatch("chat/updateDepartment",n.dpt)),n.pcfs&&b.a.dispatch("session/updatePrechatSubmitted",n.pcfs),n.refs&&n.refs.length)for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:{};o(this,t),a(this,"browserIdentifier",[{string:navigator.userAgent,subString:"Edge",identity:"explorer",versionSearch:"Edge"},{string:navigator.userAgent,subString:"Trident/7.0",identity:"explorer",versionSearch:"rv"},{string:navigator.userAgent,subString:"(Opera|OPR)",identity:"opera",versionSearch:"Version"},{string:navigator.userAgent,subString:"Chrome",identity:"chrome",versionSearch:"Chrome"},{string:navigator.userAgent,subString:"Mobile Safari",identity:"android",versionSearch:"Version"},{string:navigator.userAgent,subString:"Firefox",identity:"firefox",versionSearch:"Firefox"},{string:navigator.userAgent,subString:"MSIE",identity:"explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"IEMobile",identity:"explorer",versionSearch:"IEMobile"},{string:navigator.userAgent,subString:"Safari",identity:"safari",versionSearch:"Version"},{string:navigator.userAgent,subString:"Gecko",identity:"mozilla",versionSearch:"rv"}]),a(this,"osIdentifier",[{string:navigator.userAgent,subString:"Windows Phone",identity:"windows_phone"},{string:navigator.platform,subString:"Win",identity:"windows"},{string:navigator.platform,subString:"Mac",identity:"mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iphone"},{string:navigator.userAgent,subString:"Android",identity:"android"},{string:navigator.platform,subString:"Linux",identity:"linux"},{string:navigator.userAgent,subString:"iPad",identity:"ipad"}]),a(this,"searchEngines",{google:"q",yahoo:"p",baidu:"wd",yandex:"text",bing:"q",soso:"w",ask:"q",aol:"q",sogou:"query",mywebsearch:"searchfor",youdao:"q",lycos:"q",infospace:"q",blekko:"q",info:"q",dogpile:"q",duckduckgo:"q",webcrawler:"q"}),a(this,"mobileBrowserIdentifier",{nokia:[/(NokiaBrowser)\/(\d+)\.(\d+).(\d+)\.(\d+)/,/^(Nokia)/,/(NokiaBrowser)\/(\d+)\.(\d+).(\d+)/,/(NokiaBrowser)\/(\d+)\.(\d+)/,/(BrowserNG)\/(\d+)\.(\d+).(\d+)/,/(Series60)\/5\.0/,/(Series60)\/(\d+)\.(\d+)/,/(S40OviBrowser)\/(\d+)\.(\d+)\.(\d+)\.(\d+)/,/(Nokia)[EN]?(\d+)/],blackberry:[/(BB10);/,/(PlayBook).+RIM Tablet OS (\d+)\.(\d+)\.(\d+)/,/(Black[bB]erry).+Version\/(\d+)\.(\d+)\.(\d+)/,/(Black[bB]erry)\s?(\d+)/],chrome:[/(CrMo)\/(\d+)\.(\d+)\.(\d+)\.(\d+)/,/(CriOS)\/(\d+)\.(\d+)\.(\d+)\.(\d+)/,/(Android).*(Chrome)\/(\d+)\.(\d+)\.(\d+)\.(\d+) (Mobile)?/],ie:[/(IEMobile)[ /](\d+)\.(\d+)/],firefox:[/Mobile.*(Firefox)\/(\d+)\.(\d+)/,/Tablet.*(Firefox)\/(\d+)\.(\d+)/],operamini:[/(Opera Mini)(?:\/att)?\/(\d+)\.(\d+)/],opera:[/(Opera Tablet).*Version\/(\d+)\.(\d+)(?:\.(\d+))?/,/(?:Mobile Safari).*(OPR)\/(\d+)\.(\d+)\.(\d+)'/,/(Opera)\/.+Opera Mobi.+Version\/(\d+)\.(\d+)/,/(Opera)\/(\d+)\.(\d+).+Opera Mobi/,/Opera Mobi.+(Opera)\/(\d+)\.(\d+)/,/Opera Mobi/,/(Opera)\/9.80.*Version\/(\d+)\.(\d+)(?:\.(\d+))?/],safari:[/(iPod|iPhone|iPad);.*CPU.*OS (\d+)(?:_\d+)?_(\d+).*Mobile/],uc:[/(UCBrowser)[ /](\d+)\.(\d+)\.(\d+)/,/(UC Browser)[ /](\d+)\.(\d+)\.(\d+)/,/(UC Browser|UCBrowser|UCWEB)(\d+)\.(\d+)\.(\d+)/],"android2.3":[/(Android) 2\.3(?:[.-]([a-z0-9]+))?/],android2:[/(Android) 2\.(\d+)(?:[.-]([a-z0-9]+))?/],android:[/Android[- ][\d]+\.[\d]+; [A-Za-z]{2}-[A-Za-z]{0,2}; WOWMobile (.+) Build/,/Android[- ][\d]+\.[\d]+-update1; [A-Za-z]{2}-[A-Za-z]{0,2}; (.+) Build/,/Android[- ][\d]+\.[\d]+\.[\d]+; [A-Za-z]{2}-[A-Za-z]{0,2}; (.+) Build/,/Android[- ][\d]+\.[\d]+\.[\d]+;[A-Za-z]{2}-[A-Za-z]{0,2};(.+) Build/,/Android[- ][\d]+\.[\d]+; [A-Za-z]{2}-[A-Za-z]{0,2}; (.+) Build/,/Android[- ][\d]+\.[\d]+\.[\d]+; (.+) Build/,/Android[- ][\d]+\.[\d]+; (.+) Build/]}),a(this,"searchVersion",(function(t,e){var n=t.indexOf(e);if(-1!==n)return parseFloat(t.substring(n+e.length+1))})),a(this,"getMobileBrowser",(function(){for(var t=!1,e=navigator.userAgent,n=Object.keys(this.mobileBrowserIdentifier),i=0;!t&&i=0){var i=this.getQuerystring(document.referrer,this.searchEngines[t]);"blekko"===t&&""===i&&(i=this.getQuerystring(document.referrer.replace("/ws/","/?q="),"q")),n=t;break}return n}},{key:"getQuerystring",value:function(t,e){e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(t);return null===n||!Array.isArray(n)||n.length<2?null:n[1]?unescape(n[1].replace(/\+/g," ")):null}},{key:"hasHtmlAudio",value:function(t){var e=document.createElement("audio");try{if(!e.canPlayType||"no"===e.canPlayType("audio/"+t)||""===e.canPlayType("audio/"+t))return!1}catch(t){return!1}return!0}}])},"7c03":function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var i=2147483647,o=/[^\x20-\x7E]/,r=/[\x2E\u3002\uFF0E\uFF61]/g,a={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},s=Math.floor,c=String.fromCharCode,u={error:function(t){throw new RangeError(a[t])},map:function(t,e){for(var n=t.length,i=[];n--;)i[n]=e(t[n]);return i},mapDomain:function(t,e){var n=t.split("@"),i="";n.length>1&&(i=n[0]+"@",t=n[1]);var o=(t=t.replace(r,".")).split(".");return i+this.map(o,e).join(".")},ucs2decode:function(t){for(var e,n,i=[],o=0,r=t.length;o=55296&&e<=56319&&o>1,t+=s(t/e);t>455;i+=36)t=s(t/35);return s(i+36*t/(t+38))},encode:function(t){var e,n,o,r,a,u,l,d,f,h,p,m,g,w,v,y=[];for(m=(t=this.ucs2decode(t)).length,e=128,n=0,a=72,u=0;u=e&&ps((i-n)/(g=o+1))&&this.error("overflow"),n+=(l-e)*g,e=l,u=0;ui&&this.error("overflow"),p==e){for(d=n,f=36;!(d<(h=f<=a?1:f>=a+26?26:f-a));f+=36)v=d-h,w=36-h,y.push(c(this.digitToBasic(h+v%w,0))),d=s(v/w);y.push(c(this.digitToBasic(d,0))),a=this.adapt(n,g,o==r),n=0,++o}++n,++e}return y.join("")},toASCII:function(t){return this.mapDomain(t,(function(t){return o.test(t)?"xn--"+this.encode(t):t}))}}},"7f46":function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var i=""",o="'",r="<",a=">",s="&",c=new RegExp("&","g"),u=new RegExp('"',"g"),l=new RegExp("'","g"),d=new RegExp("<","g"),f=new RegExp(">","g"),h=new RegExp(i,"g"),p=new RegExp(o,"g"),m=new RegExp(r,"g"),g=new RegExp(a,"g"),w=new RegExp(s,"g"),v={regTrim:/^\s+|\s+$/g,rawEncode:function(t){return t?t.replace(c,s).replace(u,i).replace(l,o).replace(d,r).replace(f,a):t},rawDecode:function(t){return t?t.replace(h,'"').replace(p,"'").replace(m,"<").replace(g,">").replace(w,"&"):t},h:function(t){var e=0;if(0===t.length)return e;for(var n=0;n'+n[1]+""))===t)return c;return c},markdownToHtml:function(t){return t=this.rawEncode(t),t=(t=(t=this.toLinkable(t)).replace(/(?!]*>[^<])_(.*?)_(?![^<]*<\/a>)/gim,"$1")).replace(/\*\*(.*?)\*\*/gim,"$1").replace(/\*(.*?)\*/gim,"$1")},removeHTMLTags:function(t){return t.replace(/|
/g," ")},removeAnchorTags:function(t){return t.replace(/]*>([^<]+)<\/a>/gi,"$1")},cleanupCssValue:function(t){return this.isString(t)?t.replace(/(!important)|(;)/g,""):t},parseQueryString:function(t){var e,n,i,o,r={};for(e=0,n=(o=(t?t.replace(/(.*)\?/,""):window.location.search.substring(1)).split("&")).length;et.length)&&(e=t.length);for(var n=0,i=Array(e);n0?this.updatePageTitle():this.updatePageTitle(!0))},pageStatus:function(t){"offline"===t?this.updatePageTitle(!0):this.unreadMessageCount>0&&this.updatePageTitle(),this.checkIfVisible()},widgetShow:function(){this.checkIfVisible()},isReady:function(e){e&&t.Tawk_Window.jsApi.triggerApiHandlers("onLoad")}},methods:f(f({},Object(o.b)({updateMobileLandscape:"widget/updateMobileLandscape"})),{},{updatePageTitle:function(t){var e=this;clearInterval(this.titleFlashTimeout),t||"offline"===this.pageStatus?null!==this.originalPageTitle&&(document.title=this.originalPageTitle,this.$store.commit("session/setOriginalPageTitle",null)):(null===this.originalPageTitle&&this.$store.commit("session/setOriginalPageTitle",document.title),this.titleFlashTimeout=setInterval((function(){document.title=e.originalPageTitle===document.title?e.$i18n("chat","new_message",{count:e.unreadMessageCount}):e.originalPageTitle}),1e3))},resizeHandler:function(){var e,n=this;clearTimeout(e),e=setTimeout((function(){n.mobileBrowserName&&(t.Tawk_Window.isMobileOptimizedWebsite&&"opera"!==n.mobileBrowserName&&"android2.3"!==n.mobileBrowserName||n.calculateZoom())}),100)},isLandscape:function(){return"safari"===this.mobileBrowserName||"android"===this.mobileBrowserName?0!==window.orientation:screen.height3?r-3:0),s=3;s3?a-3:0),c=3;c0?e.updatePageTitle():e.updatePageTitle(!0)}))},created:function(){var t=this;this.$nextTick((function(){t.checkIfVisible()}))}}}).call(this,n("c8ba"))},"87dd":function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var i={data:function(){return{genericStyles:{"outline:":"none !important;","visibility:":"visible !important;","resize:":"none !important;","box-shadow:":"none !important;","overflow:":"visible !important;","background:":"none !important;","opacity:":"1 !important;","filter:":"alpha(opacity=100) !important;","-ms-filter:":"progid:DXImageTransform.Microsoft.Alpha(Opacity 1}) !important;","-mz-opacity:":"1 !important;","-khtml-opacity:":"1 !important;","top:":"auto !important;","right:":"auto !important;","bottom:":"auto !important;","left:":"auto !important;","position:":"absolute !important;","border:":"0 !important;","min-height:":"auto !important;","min-width:":"auto !important;","max-height:":"none !important;","max-width:":"none !important;","padding:":"0 !important;","margin:":"0 !important;","-moz-transition-property:":"none !important;","-webkit-transition-property:":"none !important;","-o-transition-property:":"none !important;","transition-property:":"none !important;","transform:":"none !important;","-webkit-transform:":"none !important;","-ms-transform:":"none !important;","width:":"auto !important;","height:":"auto !important;","display:":"block !important;","z-index:":"auto !important;","background-color:":"transparent !important;","cursor:":"none !important;","float:":"none !important;","border-radius:":"unset !important;","pointer-events:":"auto !important;","clip:":"auto !important;","color-scheme:":"light !important;"}}}}},"91ce":function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return h}));var i=n("7c03"),o=(n("6fc0"),n("e1bd")),r=n("bdd0");function a(){a=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},r="function"==typeof Symbol?Symbol:{},s=r.iterator||"@@iterator",c=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,n){return t[e]=n}}function f(t,e,n,i){var r=e&&e.prototype instanceof v?e:v,a=Object.create(r.prototype),s=new x(i||[]);return o(a,"_invoke",{value:W(t,n,s)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",m="executing",g="completed",w={};function v(){}function y(){}function b(){}var k={};d(k,s,(function(){return this}));var T=Object.getPrototypeOf,S=T&&T(T(A([])));S&&S!==n&&i.call(S,s)&&(k=S);var _=b.prototype=v.prototype=Object.create(k);function I(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,r,a,s){var c=h(t[o],t,r);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==u(d)&&i.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(d).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,s)}))}s(c.arg)}var r;o(this,"_invoke",{value:function(t,i){function o(){return new e((function(e,o){n(t,i,e,o)}))}return r=r?r.then(o,o):o()}})}function W(e,n,i){var o=p;return function(r,a){if(o===m)throw Error("Generator is already running");if(o===g){if("throw"===r)throw a;return{value:t,done:!0}}for(i.method=r,i.arg=a;;){var s=i.delegate;if(s){var c=C(s,i);if(c){if(c===w)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===p)throw o=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=m;var u=h(e,n,i);if("normal"===u.type){if(o=i.done?g:"suspendedYield",u.arg===w)continue;return{value:u.arg,done:i.done}}"throw"===u.type&&(o=g,i.method="throw",i.arg=u.arg)}}}function C(e,n){var i=n.method,o=e.iterator[i];if(o===t)return n.delegate=null,"throw"===i&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),w;var r=h(o,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,w;var a=r.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,w):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,w)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[s];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,r=function n(){for(;++o=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),w}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:A(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),w}},e}function s(t,e,n,i,o,r,a){try{var s=t[r](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(i,o)}function c(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var r=t.apply(e,n);function a(t){s(r,i,o,a,c,"next",t)}function c(t){s(r,i,o,a,c,"throw",t)}a(void 0)}))}}function u(t){return(u="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})(t)}function l(t,e){for(var n=0;n0)for(var c=0;c0},isVisitorEngaged:function(t){return!t.hasChatEnded&&t.visitorHasMessaged},messageBlocks:function(t){return t.messageBlocks},endedChats:function(t){return t.chat.endedChats},lastMessage:function(t){return t.chat.lastMessage},firstIncoming:function(t){return t.firstIncoming},ongoingCall:function(t){return t.ongoingCall},formRefs:function(t){return t.form.refs},formTicket:function(t){return t.form.ticket},formLead:function(t){return t.form.lead}},actions:{updateConversation:function(e,n){var i=e.dispatch,o=e.state,r=e.getters,a=e.commit,s=(n=n||{}).cver||0,c=n.c||[];if(o.chat.synced=!0,!(o.chat.version>=s)){for(var u=0,l=o.chat.buffer.length;us&&c.push(o.chat.buffer[u]);for(var d=function(){var e=c[f];if(!e.md||!e.md.ao){var o=t.Tawk_Window.chatManager.parseChatMessage(e,!0);o&&setTimeout((function(){t.Tawk_Window.audioPlayer.playSound(),a("setIncomingMessage",o),a("setVersion",n.cver),i("updateChatMessage",o)}),50)}},f=0,h=c.length;fo.chat.version){if(n.md&&n.md.ao)return void i("setVersion",n.cver);var a=t.Tawk_Window.chatManager.parseChatMessage(n,!0);a&&(t.Tawk_Window.audioPlayer.playSound(),i("setIncomingMessage",a),i("setVersion",n.cver),r("updateChatMessage",a))}},outgoingChatMessage:function(t,e){var n=t.commit,i=t.state,o=t.dispatch;e&&e.cver>i.chat.version&&(n("setVersion",e.cver),o("updateChatMessage",e))},agentJoined:function(t,e){for(var n,i=t.state,o=t.commit,r=t.dispatch,a=i.allProfiles[e.profileData.profileId],s=0;s0?s.chat.messages[s.chat.order]:null;var p=function(){if(!(o=f[n]).md||o.md&&!o.md.ao){if(r&&r.timeStamp>=new Date(o.co).getTime())return 1;"v"!==o.ut||s.visitorHasMessaged||"c"!==o.t||(a=(new Date).getTime()-new Date(o.co).getTime());var e=t.Tawk_Window.chatManager.parseChatMessage(o);e&&(setTimeout((function(){c("setIncomingMessage",e)})),l("updateChatMessage",e))}};for(n=d,i=f.length;ni.chatTransfer.version&&(n("setChatTransferData",o),n("setChatTransferVersion",r))},updateRatingMessage:function(t,e){var n=t.commit,i=t.state;e&&(n("incrementChatOrder"),i.chat.messages[i.chat.order]=e)},addMessageBlock:function(t,e){(0,t.commit)("pushMessageBlock",e)},clearMessageBlock:function(t){(0,t.commit)("unsetMessageBlock")},updateChatMessage:function(e,n){var i=e.commit,o=e.state,r=e.rootGetters;i("incrementChatOrder"),o.chat.messages[o.chat.order]=n,("c"===n.type||n.callData)&&i("setLastMessage",n),"c"===n.type&&"s"!==n.senderType&&!o.hasChatStarted&&r["schedule/isEnabled"]&&t.Tawk_Window.scheduler.hasScheduleToday()&&t.Tawk_Window.scheduler.hasCurrentTimePassedSchedule()&&"603e2c2c1c1c2a130d63fd5a"===r["property/id"]&&t.Tawk_Window.logger.reportError({incident:"Sending chat message while offline",data:{currentTime:new Date,timezone:(new Date).getTimezoneOffset(),userAgent:t.navigator.userAgent},state:{schedule:{isEnabled:r["schedule/isEnabled"],slots:r["schedule/slots"],timeZone:r["schedule/timezone"]},session:{pageStatus:r["session/pageStatus"]},widget:{id:r["widget/id"]},visitor:{id:r["visitor/id"]}}}),"c"!==n.type||"s"===n.senderType||o.hasChatStarted||"offline"===r["session/pageStatus"]||(i("setChatHasStarted",!0),t.Tawk_Window.jsApi.triggerApiHandlers("onChatStarted",{chatId:o.chat.id}))},processEndedChat:function(t,e){for(var n,o,r=t.state,a=[],s=[],c=r.chat.id,u=0;u0){var o=Object.keys(n.chat.messages).length,r=n.chat.messages[o];r&&r.timeStamp&&(i("session/updateVisitorChatSeen",r.timeStamp,{root:!0}),i("clearUnseenMessages"),t.Tawk_Window.jsApi.triggerApiHandlers("onUnreadCountChanged",n.chat.unreadMessageCount))}}},mutations:{setVersion:function(t,e){t.chat.version=e},setDepartment:function(t,e){t.chat.department=e},setIncomingMessage:function(t,e){t.incomingMessage=e,t.firstIncoming=!1,0!==Object.keys(t.chat.lastMessage).length||t.firstIncoming||(t.firstIncoming=!0)},incrementChatOrder:function(t){t.chat.order+=1},setRating:function(t,e){t.rating=e},setAgent:function(t,e){t.agents[e.resourceId]={profileId:e.agentData.pid,seq:e.agentData.seq}},setChatId:function(t,e){t.chat.id=e},setIncomingCall:function(t,e){t.incomingCall=e},setChatTransferData:function(t,e){t.chatTransfer.data=e},setChatTransferVersion:function(t,e){t.chatTransfer.version=e},setChatHasStarted:function(t,e){t.hasChatStarted=e,t.hasChatEnded=!e},setVisitorHasMessaged:function(t,e){t.visitorHasMessaged=e},setAgentHasMessaged:function(t,e){t.agentHasMessaged=e},setHistoryMessages:function(t,e){t.chat.history=e},addFileUpload:function(t,e){t.uploadFiles.push(e)},removeFileUpload:function(t,e){var n=t.uploadFiles.findIndex((function(t){return t.uuid===e}));-1!==n&&t.uploadFiles.splice(n,1)},setLastScrollPosition:function(t,e){t.lastScrollPositon=e},setOutgoingMessage:function(t,e){t.outgoingMessage=e},setHistoryProcessed:function(t,e){t.chat.historyProcessed=e},unsetData:function(t){for(var e={agents:{},agentsCount:0,activeProfiles:[],chat:{buffer:[],department:"any",endVersion:1,history:[],id:null,order:0,version:0,unreadMessage:0,synced:!1,messages:{},unseenMessages:[],historyProcessed:!1,endedChats:[],lastMessage:{}},allProfiles:{},rating:null,incomingMessage:null,calls:{},chatTransfer:{data:null,version:null},ongoingCall:!1,incomingCall:null,hasChatStarted:!1,messageBlocks:[],visitorHasMessaged:!1,agentHasMessaged:!1,hasChatEnded:!1,uploadFiles:[],lastScrollPositon:null,outgoingMessage:null,firstIncoming:!1,form:{refs:{},ticket:{id:null,hasSubmitted:!1},lead:{id:null,hasSubmitted:!1}}},n=Object.keys(e),i=0;i=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),w}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:A(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),w}},e}function s(t,e,n,i,o,r,a){try{var s=t[r](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(i,o)}function c(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var r=t.apply(e,n);function a(t){s(r,i,o,a,c,"next",t)}function c(t){s(r,i,o,a,c,"throw",t)}a(void 0)}))}}function u(t,e){for(var n=0;n2&&void 0!==s[2]?s[2]:{},o=i.visitor,r=void 0===o?void 0:o,this.registerStarted=!0,this.clearTimers(),t.next=5,this.prepareData({visitor:r});case 5:if(this.registerData.u||this.registerData.uik){t.next=8;break}return this.clearTimers(),t.abrupt("return");case 8:this.startRegister(e,n);case 9:case"end":return t.stop()}}),t,this)})));return function(e,n){return t.apply(this,arguments)}}()},{key:"prepareData",value:function(){var e=c(a().mark((function e(){var n,i,s,c,u,l,d,f,h,p,m,g,w,v,y,b=arguments;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=b.length>0&&void 0!==b[0]?b[0]:{},s=i.visitor,c=void 0===s?void 0:s,u=void 0,t.Tawk_Window){e.next=4;break}return e.abrupt("return");case 4:if(l="",d=this.store.getters,(f=t.Tawk_Window.sessionManager.getSessionInformation()).length&&(l=f[0]),((h=(new Date).getTimezoneOffset())<-900||h>900)&&(h=0),!window.sessionStorage.getItem("tawk_has_register_visitor")&&null!==(n=window.Tawk_API)&&void 0!==n&&n.visitor&&"object"===r(window.Tawk_API.visitor)&&(u=o.a.formatVisitorLoginData(c)),this.registerData?this.registerData.vss=l:this.registerData={p:d["property/id"]||"",w:d["widget/id"],platform:d["browserData/mobileBrowserName"]?"mobile":"desktop",tzo:h,url:document.location.href,referrer:document.referrer||void 0,vss:l,user:u},p=null,window.location&&window.location.href)try{"http:"!==(p=new URL(window.location.href)).protocol&&"https:"!==p.protocol&&"file:"!==p.protocol||(this.registerData.url=window.location.href)}catch(t){}if(!p&&window.top!==window)try{window.top.document&&window.top.location&&window.top.location.href&&(this.registerData.url=window.top.document.location.href)}catch(t){console.error("[Tawk/Register]: Failed to access url")}this.registerData.consent=!1,m=0;case 18:if(!(m1e3?(t.Tawk_Window.webStorage.cookieStore.setItem("TawkConnectionTime",(new Date).getTime(),!0),this.connectionCookieInterval=setInterval((function(){t&&t.Tawk_Window&&t.Tawk_Window.webStorage&&t.Tawk_Window.webStorage.cookieStore.setItem("TawkConnectionTime",(new Date).getTime(),!0)}),100),this.doRegister(e,n)):this.delayRegister(e,n)}},{key:"delayRegister",value:function(t,e){var n=this;clearTimeout(this.registerDelayTimeout),this.registerDelayTimeout=setTimeout((function(){n.init(t,e)}),1e3)}},{key:"doRegister",value:function(e,n){var o=this;this.setupRegisterTimeout();var a,s="".concat("https://va.tawk.to","/v1/session/start"),c=t.Tawk_Window.sessionManager.getStoredToken();c&&(a={"X-Tawk-Token":c}),this.previousRegisterCall=i.a.post(s,this.registerData,a,(function(i,a){var s;return o.clearTimers(),i||!i&&!a?o.retryRegister(e,n):a.error?a.error.code&&"InternalServerError"===a.error.code?o.retryRegister(e,n):n():(null!==(s=window.Tawk_API)&&void 0!==s&&s.visitor&&"object"===r(window.Tawk_API.visitor)&&window.sessionStorage.setItem("tawk_has_register_visitor",!0),e(a),void(o.registerData.user&&"object"===r(o.registerData)&&t.Tawk_Window.jsApi.unsetVisitorAttributes()))}),!0,!0)}},{key:"setupRegisterTimeout",value:function(){var t=this;clearTimeout(this.requestCancelTimeout),this.requestCancelTimeout=setTimeout((function(){t.abort(),t.retryRegister()}),9e4)}},{key:"abort",value:function(){null!==this.previousRegisterCall&&(this.previousRegisterCall=null)}},{key:"retryRegister",value:function(t,e){var n,i=this;if(null===this.retryRegisterTimeout){if(this.retryCount>=this.maxRetrycount)return this.clearTimers(),void this.store.commit("widget/setVisibility",!1);this.retryCount++,n=this.getRetryWaitDelay(),this.retryRegisterTimeout=setTimeout((function(){i.init(t,e)}),n)}}},{key:"getRetryWaitDelay",value:function(){var t,e=Math.random()*(this.maxRandom-this.minRandom)+this.minRandom;return null===this.retryDelay?this.retryDelay=this.retryInitialDelay:(t=this.retryDelay*this.retryMultiplier,this.retryDelay>this.maxDelay||t>this.maxDelay?this.retryDelay=this.maxDelay:this.retryDelay=t),1e3*Math.round(this.retryDelay*e)}},{key:"resetRetryCount",value:function(){this.retryCount=0,this.retryDelay=10}}])}).call(this,n("c8ba"))},a18c:function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var i=n("4360"),o={name:"TawkRouterView",render:function(t){var e;return i.a.getters["router/getCurrentView"]&&(e=t(i.a.getters["router/getCurrentView"].component)),t("transition",{props:{name:"slide-fade",mode:"out-in"},ref:"router-view"},[e])}},r=n("d046");function a(t){return(a="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})(t)}function s(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};u(this,t),this.matcher=e.routes}));l.install=function(t){i.a.dispatch("router/addRoutes",r.a),t.component("TawkRouterView",o)}},a3cc:function(t,e,n){"use strict";n.r(e);var i=n("bdd0"),o=n("7f46");function r(t){return(r="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})(t)}function a(){a=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function d(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,n){return t[e]=n}}function f(t,e,n,i){var r=e&&e.prototype instanceof v?e:v,a=Object.create(r.prototype),s=new x(i||[]);return o(a,"_invoke",{value:W(t,n,s)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",m="executing",g="completed",w={};function v(){}function y(){}function b(){}var k={};d(k,c,(function(){return this}));var T=Object.getPrototypeOf,S=T&&T(T(A([])));S&&S!==n&&i.call(S,c)&&(k=S);var _=b.prototype=v.prototype=Object.create(k);function I(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,a,s,c){var u=h(t[o],t,a);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==r(d)&&i.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,s,c)}),(function(t){n("throw",t,s,c)})):e.resolve(d).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,i){function o(){return new e((function(e,o){n(t,i,e,o)}))}return a=a?a.then(o,o):o()}})}function W(e,n,i){var o=p;return function(r,a){if(o===m)throw Error("Generator is already running");if(o===g){if("throw"===r)throw a;return{value:t,done:!0}}for(i.method=r,i.arg=a;;){var s=i.delegate;if(s){var c=C(s,i);if(c){if(c===w)continue;return c}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===p)throw o=g,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=m;var u=h(e,n,i);if("normal"===u.type){if(o=i.done?g:"suspendedYield",u.arg===w)continue;return{value:u.arg,done:i.done}}"throw"===u.type&&(o=g,i.method="throw",i.arg=u.arg)}}}function C(e,n){var i=n.method,o=e.iterator[i];if(o===t)return n.delegate=null,"throw"===i&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),w;var r=h(o,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,w;var a=r.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,w):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,w)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),w}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:A(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),w}},e}function s(t,e,n,i,o,r,a){try{var s=t[r](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(i,o)}function c(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var r=t.apply(e,n);function a(t){s(r,i,o,a,c,"next",t)}function c(t){s(r,i,o,a,c,"throw",t)}a(void 0)}))}}e.default={namespaced:!0,state:{baseUrl:"/v1/kb",id:null,items:[],options:[],loading:{index:!1,show:!1,search:!1},selected:{},isLoadingCodeMirror:!1,isCodeMirrorLoaded:!1,searchData:{query:null,results:[],hasNext:!1,token:null,total:0,error:!1,linkTarget:"self"},siteId:null,scrollPosition:0},getters:{items:function(t){return t.items},isLoading:function(t){return function(e){return t.loading[e]}},selected:function(t){return t.selected},options:function(t){return t.options},isLoadingCodeMirror:function(t){return t.isLoadingCodeMirror},isCodeMirrorLoaded:function(t){return t.isCodeMirrorLoaded},searchData:function(t){return t.searchData},siteId:function(t){return t.siteId},scrollPosition:function(t){return t.scrollPosition}},actions:{show:function(){var t=c(a().mark((function t(e,n){var o,r,s;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.state,r=e.commit,s=e.rootGetters,n.siteId&&n.articleId){t.next=3;break}throw"Please set article ID before calling the action.show";case 3:return r("setLoading",{action:"show",value:!0}),t.next=6,i.a.get("".concat("https://va.tawk.to").concat(o.baseUrl).concat(n.url),{propertyId:s["property/id"],siteId:n.siteId,articleId:n.articleId},null,(function(t,e){if(t)throw r("setLoading",{action:"show",value:!1}),t;e.data.siteId=n.siteId,r("setSelected",e.data),r("setLoading",{action:"show",value:!1})}));case 6:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),updateOptions:function(t,e){(0,t.commit)("setOptions",e)},updateId:function(t,e){(0,t.commit)("setId",e)},unsetSelected:function(t){(0,t.commit)("setSelected",{})},setCodeMirrorIsLoading:function(t){var e=t.state;e.isCodeMirrorLoaded=!1,e.isLoadingCodeMirror=!0},setCodeMirrorIsLoaded:function(t){var e=t.state;e.isCodeMirrorLoaded=!0,e.isLoadingCodeMirror=!1},searchArticles:function(){var t=c(a().mark((function t(e,n){var o,r,s,c,u;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.commit,r=e.rootGetters,s=e.state,c=e.dispatch,o("setLoading",{action:"search",value:!0}),n&&void 0!==n.siteId&&o("setSiteId",n.siteId),n&&void 0!==n.search&&o("setSearchQuery",n.search),s.searchData.query){t.next=7;break}return o("setLoading",{action:"search",value:!1}),t.abrupt("return");case 7:return u={propertyId:r["property/id"],siteId:s.siteId,query:s.searchData.query,limit:n&&n.limit?n.limit:10,from:s.searchData.results.length},t.next=10,i.a.get("".concat("https://va.tawk.to","/v1/kb/article/search"),u,null,(function(t,e){o("setLoading",{action:"search",value:!1}),t?s.searchData.error=!0:(o("setSearchResults",e.data),c("searchPerformedAnalytics"))}));case 10:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),articleClickedAnalytics:function(t,e){var n=t.state;i.a.post("".concat("https://va.tawk.to","/v1/kb/analytics/search-result-clicked"),{token:n.searchData.token,articleId:e},null,(function(t,e){if(t)return e}),!1,!0)},searchPerformedAnalytics:function(t){var e=t.state;i.a.post("".concat("https://va.tawk.to","/v1/kb/analytics/search-performed"),{token:e.searchData.token},null,(function(t,e){if(t)return e}),!1,!0)},resetState:function(t){(0,t.commit)("unsetData")},setSearchLoading:function(t,e){(0,t.commit)("setLoading",{action:"search",value:e})},updateSearchDataLinkTarget:function(t,e){(0,t.commit)("setSearchDataLinkTarget",e)},unsetSearchData:function(t){(0,t.commit)("resetSearchQuery")},setScrollPosition:function(t,e){(0,t.commit)("modifyScrollPosition",e)},unsetScrollPosition:function(t){(0,t.commit)("modifyScrollPosition",0)},unsetSearchDataResults:function(t){(0,t.commit)("softResetSearchData")}},mutations:{setId:function(t,e){t.id=e},setItems:function(t,e){t.items=e},setLoading:function(t,e){var n=e.action,i=e.value;t.loading[n]=i},setSelected:function(t,e){t.selected=e},setOptions:function(t,e){t.options=e},setSearchResults:function(t,e){e.articles.forEach((function(t){if(t.highlight){if(t.highlight.title&&t.highlight.title.length)for(var e=0;e').replace(/\[\/em\]/gi,"");if(t.highlight.subtitle&&t.highlight.subtitle.length)for(var n=0;n').replace(/\[\/em\]/gi,"")}})),t.searchData.results=t.searchData.results.concat(e.articles),t.searchData.hasNext=e.total>t.searchData.results.length,t.searchData.token=e.token,t.searchData.total=e.total,t.searchData.error=!1},setSearchQuery:function(t,e){t.searchData.query=e,t.searchData.results=[],t.searchData.hasNext=!1,t.searchData.token=null,t.searchData.total=0,t.searchData.error=!1},setSiteId:function(t,e){t.siteId=e},unsetData:function(t){for(var e={baseUrl:"/v1/kb",id:null,items:[],options:[],loading:{index:!1,show:!1,search:!1},selected:{},isLoadingCodeMirror:!1,isCodeMirrorLoaded:!1,searchData:{query:null,results:[],hasNext:!1,token:null,total:0,error:!1,linkTarget:"self"},siteId:null,scrollPosition:0},n=Object.keys(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(!t.Tawk_Window.jsApi._apiCheck()){n=n||function(){};var o=i.a.formatVisitorLoginData(e);t.Tawk_Window.sessionManager.login(o,n)}},window.$_Tawk.logout=window.Tawk_API.logout=function(e){t.Tawk_Window.jsApi._apiCheck()||(e=e||function(){},t.Tawk_Window.sessionManager.logout(e))},window.$_Tawk.switchWidget=window.Tawk_API.switchWidget=function(e){var n=e.propertyId,i=void 0===n?null:n,o=e.widgetId,r=void 0===o?null:o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};t.Tawk_Window.jsApi._apiCheck()||t.Tawk_Window.jsApi.store.dispatch("widget/switchWidget",{propertyId:i,widgetId:r,callback:a})},window.$_Tawk.shutdown=window.Tawk_API.shutdown=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};t.Tawk_Window.jsApi._apiCheck()||t.Tawk_Window.jsApi.store.dispatch("widget/shutdown",e)},window.$_Tawk.start=window.Tawk_API.start=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};t.Tawk_Window.jsApi._apiCheck()||t.Tawk_Window.jsApi.store.dispatch("widget/start",{params:e,callback:n})}}},{key:"triggerApiHandlers",value:function(e,n){var i=this.local_API[e];if(void 0!==i){if("onBeforeLoad"===e){if(window.Tawk_API.onBeforeLoaded)return;window.Tawk_API.onBeforeLoaded=!0}else if("onLoad"===e){if(window.Tawk_API.onLoaded)return;window.Tawk_API.onLoaded=!0}if(this.dispatch(i.eventName,n),"function"==typeof i.func)try{i.func(n)}catch(t){}t.Tawk_Window.eventBus.$on("resetState",(function(){window.Tawk_API.onBeforeLoaded=!1,window.Tawk_API.onLoaded=!1}))}}},{key:"dispatch",value:function(t,e){var n;t&&(n="function"==typeof window.CustomEvent?new CustomEvent(t,{detail:e}):new this.CustomEventIE(t,{detail:e}),window.dispatchEvent(n))}},{key:"secureWrapper",value:function(t){return void 0===t&&(t={}),this.local_API&&this.local_API.visitor&&(this.local_API.visitor.email&&(t.email=this.local_API.visitor.email),this.local_API.visitor.hash&&(t.hash=this.local_API.visitor.hash)),t}},{key:"unsetVisitorAttributes",value:function(){this.local_API&&this.local_API.visitor&&(this.local_API.visitor=void 0)}}])}).call(this,n("c8ba"))},bdd0:function(t,e,n){"use strict";function i(t){return(i="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})(t)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function r(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=[],c=c,u=r({},n);if(e instanceof FormData)s=e,c=!1;else{if(a)s=JSON.stringify(e),u["Content-Type"]="application/json; charset=utf-8";else{for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&s.push("".concat(encodeURIComponent(l),"=").concat(encodeURIComponent(e[l])));s.length&&(s=s.join("&")),u["Content-Type"]="application/www-x-form-urlencoded"}c=!0}if(void 0!==window.fetch&&void 0!==window.AbortController){var d;d=o?{method:"POST",headers:u,signal:h,credentials:c?"include":"same-origin",body:s}:{method:"POST",headers:u,signal:h,body:s};var f=new window.AbortController,h=f.signal;return fetch(t,d).then((function(t){return 500===t.status?i(!0):t.json()})).then((function(t){i(null,t)})).catch((function(){i(!0)})),h}var p=new XMLHttpRequest;if(p.onerror=i,p.open("POST",t,!0),!(e instanceof FormData)){for(var m in u)p.setRequestHeader(m,u[m]);p.withCredentials=!0}return p.onload=function(){p.status>=200&p.status<300?i(null,JSON.parse(p.responseText)):i(!0)},p.send(s),p},get:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0,o=[],a=r({},n);for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&o.push("".concat(encodeURIComponent(s),"=").concat(encodeURIComponent(e[s])));if(o.length&&(t+="?".concat(o.join("&"))),void 0!==window.fetch&&void 0!==window.AbortController){var c=new window.AbortController,u=c.signal;return fetch(t,{headers:a,signal:u}).then((function(t){return t.json()})).then((function(t){i(null,t)})).catch((function(){i(!0)})),u}var l=new XMLHttpRequest;for(var d in l.onerror=i,l.open("GET",t,!0),a)l.setRequestHeader(d,a[d]);return l.onload=function(){l.status>=200&l.status<300?i(null,JSON.parse(l.responseText)):i(!0)},l.send(),l}}},c3e1:function(t,e,n){var i={"./browser-data.js":"0dc3","./chat.js":"9b4f","./history.js":"c99a","./knowledge-base.js":"a3cc","./overlay.js":"284b","./property.js":"9a05","./router.js":"d3e9","./schedule.js":"e4b3","./session.js":"3b35","./socket.js":"f406","./visitor.js":"b250","./widget.js":"32d9"};function o(t){var e=r(t);return n(e)}function r(t){if(!n.o(i,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return i[t]}o.keys=function(){return Object.keys(i)},o.resolve=r,t.exports=o,o.id="c3e1"},c7b8:function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n("bdd0");function o(t){return(o="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})(t)}function r(t,e){for(var n=0;n=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),w}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;O(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:A(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),w}},e}function a(t,e,n,i,o,r,a){try{var s=t[r](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(i,o)}function s(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var r=t.apply(e,n);function s(t){a(r,i,o,s,c,"next",t)}function c(t){a(r,i,o,s,c,"throw",t)}s(void 0)}))}}e.default={namespaced:!0,state:{baseUrl:"/v1/chat/",items:[],loading:{index:!1,chat:!1},nextListHash:null,lastMessageTimestamp:null,loadError:!1,messageBlocks:[],selectedChat:null,chatError:!1,selectedChatMessages:null,scrollPosition:0,calls:{}},getters:{items:function(t){return t.items},isLoading:function(t){return function(e){return t.loading[e]}},lastMessageTimestamp:function(t){return t.lastMessageTimestamp},nextListHash:function(t){return t.nextListHash},loadError:function(t){return t.loadError},chatError:function(t){return t.chatError},messageBlocks:function(t){return t.messageBlocks},selectedChat:function(t){return t.selectedChat},selectedChatMessages:function(t){return t.selectedChatMessages},scrollPosition:function(t){return t.scrollPosition},callData:function(t){return function(e){return t.calls[e]}}},actions:{load:function(){var t=s(r().mark((function t(e){var n,o,a,s,c,u,l,d=arguments;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.state,o=e.commit,a=e.rootGetters,s=e.dispatch,c=d.length>1&&void 0!==d[1]?d[1]:{},o("setLoading",{action:"index",value:!0}),o("setLoadError",!1),t.prev=4,t.next=7,s("session/checkTokenValidity",{},{root:!0});case 7:t.next=13;break;case 9:return t.prev=9,t.t0=t.catch(4),o("setLoadError",!0),t.abrupt("return");case 13:u=a["session/token"],l={limit:c.limit||10},c.loadNext&&(l.next=n.nextListHash),i.a.get("".concat("https://va.tawk.to").concat(n.baseUrl,"list"),l,{"X-Tawk-Token":u},(function(t,e){o("setLoading",{action:"index",value:!1}),t?o("setLoadError",!0):(e.data&&e.data.chats.length&&(c.loadNext?o("appendItems",e.data.chats):o("setItems",e.data.chats)),e.data.hasNext?o("setNextListHash",e.data.next):o("setNextListHash",null))}));case 17:case"end":return t.stop()}}),t,null,[[4,9]])})));return function(e){return t.apply(this,arguments)}}(),getLastMessageTimestamp:function(){var t=s(r().mark((function t(e){var n,o,a,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.state,o=e.commit,a=e.rootGetters,s=e.dispatch,t.prev=1,t.next=4,s("session/checkTokenValidity",{},{root:!0});case 4:t.next=9;break;case 6:return t.prev=6,t.t0=t.catch(1),t.abrupt("return");case 9:c=a["session/token"],i.a.get("".concat("https://va.tawk.to").concat(n.baseUrl,"list"),{limit:1},{"X-Tawk-Token":c},(function(t,e){t||e.data&&e.data.chats.length&&o("setLastMessageTimestamp",e.data.chats[0].endedOn)}));case 11:case"end":return t.stop()}}),t,null,[[1,6]])})));return function(e){return t.apply(this,arguments)}}(),getHistory:function(){var e=s(r().mark((function e(n){var o,a,s,c,u,l;return r().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=n.state,a=n.commit,s=n.rootGetters,c=n.dispatch,a("setChatError",!1),a("setLoading",{action:"chat",value:!0}),o.selectedChat){e.next=6;break}throw a("setChatError",!0),new Error("Invalid Id");case 6:return e.prev=6,e.next=9,c("session/checkTokenValidity",{},{root:!0});case 9:e.next=15;break;case 11:return e.prev=11,e.t0=e.catch(6),a("setChatError",!0),e.abrupt("return");case 15:u=s["session/token"],l={chatId:o.selectedChat.id},i.a.get("".concat("https://va.tawk.to").concat(o.baseUrl,"get"),l,{"X-Tawk-Token":u},(function(e,n){if(e)a("setChatError",!0);else if(n.data&&n.data.error)a("setChatError",!0);else{var i=t.Tawk_Window.chatManager.processHistoryMessages(n.data.chat.messages);c("setSelectedChatMessages",i),c("setCalls",n.data.chat.calls)}}));case 18:case"end":return e.stop()}}),e,null,[[6,11]])})));return function(t){return e.apply(this,arguments)}}(),resetState:function(t){(0,t.commit)("unsetData")},unsetItems:function(t){(0,t.commit)("setItems",[])},addMessageBlock:function(t,e){(0,t.commit)("pushMessageBlock",e)},clearMessageBlock:function(t){(0,t.commit)("unsetMessageBlock")},setSelectedChatMessages:function(t,e){var n=t.commit;n("setSelectedChatMessages",e),n("setLoading",{action:"chat",value:!1})},setCalls:function(t,e){(0,t.commit)("updateCalls",e)},unsetSelectedChat:function(t){(0,t.commit)("setSelectedChat",null)},setScrollPosition:function(t,e){(0,t.commit)("modifyScrollPosition",e)},unsetScrollPosition:function(t){(0,t.commit)("modifyScrollPosition",0)}},mutations:{setItems:function(t,e){t.items=e},setLoading:function(t,e){var n=e.action,i=e.value;t.loading[n]=i},setLastMessageTimestamp:function(t,e){t.lastMessageTimestamp=e},setNextListHash:function(t,e){t.nextListHash=e},appendItems:function(t,e){t.items=t.items.concat(e)},setLoadError:function(t,e){t.loadError=e},setSelectedChat:function(t,e){t.selectedChat=e},setChatError:function(t,e){t.chatError=e},setSelectedChatMessages:function(t,e){t.selectedChatMessages=e},updateCalls:function(t,e){t.calls=e},pushMessageBlock:function(t,e){if("call"===e.messageType){var n;if(t.calls.length)for(var i=0;i14&&t.history.splice(0,1),t.history.push(e)},previousRoute:function(t){t.history.pop();var e=t.history.length-1,n=t.history[e];t.current=n||"/"},registerRoutes:function(t,e){t.routes=e},unsetHistory:function(t){t.history=[]},ejectRoute:function(t,e){for(var n=0;n