// This file uses references and method signatures that can be found in jquery.js and cash.js. // Copyright JS Foundation and other contributors, https://js.foundation/ // Copyright (c) 2014-present Ken Wheeler // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated // * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the // * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to // * permit persons to whom the Software is furnished to do so, subject to the following conditions: // * // * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the // * Software. // * // * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE // * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR // * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. (function(){"use strict";var e,t,n,o,i,r,s;window.VWO=window.VWO||[],window.VWO.v="7.0",window.VWO.v_e="b152f82bc",window.VWO.modules={vwoUtils:{cookies:{}},utils:{},tags:{},phoenixPlugins:{events:{predefinedEvents:{}}},otherLibDeps:{}},window.VWO._=window.VWO._||{},Object.defineProperty(window.VWO._,"phoenixMT",{value:{bus:{},idMapping:{},counter:0,eventHistory:{},on:function(e,t){this.bus[e]=this.bus[e]||[];const n=this.bus[e].push(t);return this.idMapping[this.counter]=[e,n-1],this.counter++},trigger:function(e,t){var n,o,i;if(!this.bus[e])return this.eventHistory[e]=this.eventHistory[e]||[],this.eventHistory[e].push(t);for(let r=((null===(n=this.bus[e])||void 0===n?void 0:n.length)||0)-1;r>=0;r--)null===(i=(o=this.bus[e])[r])||void 0===i||i.call(o,t)},getEventHistory:function(e){return this.eventHistory[e]},clearEventHistory:function(e){delete this.eventHistory[e]},triggerForBothSides:function(e,t={}){this.trigger(e,t),window.VWO.phoenix('trigger("${{1}}", "${{2}}")',null,{captureGroups:[e,t]})},off:function(e){if(this.idMapping[e]){const[t,n]=this.idMapping[e];t&&(this.bus[t][n]=null,delete this.idMapping[e])}}},enumerable:!1,writable:!1}),window.VWO._.enableInternalJSONStringify=-1!=[747440].indexOf(window._vwo_acc_id),window.JSONStringify=window.VWO._.enableInternalJSONStringify?function(...e){const t=Array.prototype.toJSON;delete Array.prototype.toJSON;const n=window.JSON.stringify.call(this,...e);return Array.prototype.toJSON=t,n}:window.JSON.stringify,function(e){e.DOM="vwo_dom"}(e||(e={})),function(e){e.WILD_CARD="*",e.TRIGGER="trigger",e.POST_INIT="post-init",e.TIMER="vwo_timer"}(t||(t={})),function(e){e.URL_CHANGE="vwo_urlChange",e.LEAVE_INTENT="vwo_leaveIntent",e.CLICK_EVENT="vwo_dom_click",e.SUBMIT_EVENT="vwo_dom_submit",e.PAGE_LOAD_EVENT="vwo_page_load"}(n||(n={})),function(e){e.PAGE_VIEW="vwo_pageView",e.PAGE_UNLOAD_EVENT="vwo_pageUnload"}(o||(o={})),function(e){e.EXIT_CONDITIONS="__exitConditions"}(i||(i={})),function(e){e.DOM_CONTENT_LOADED="DOMContentLoaded",e.SCROLL="scroll",e.CLICK="click",e.SUBMIT="submit"}(r||(r={})),function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR"}(s||(s={}));class a{constructor(e){this.setLevel(e)}setLevel(e="warn"){this.logLevel=s[e.toUpperCase()]}info(e,t={}){this.customLog(s.INFO,e,t)}debug(e,t={}){this.customLog(s.DEBUG,e,t)}warn(e,t={}){var n,o;this.customLog(s.WARN,e,t,null===(o=null===(n=window.VWO)||void 0===n?void 0:n._)||void 0===o?void 0:o.customError)}error(e,t={}){var n,o;this.customLog(s.ERROR,e,t,null===(o=null===(n=window.VWO)||void 0===n?void 0:n._)||void 0===o?void 0:o.customError)}customLog(e,t,n,o=null){var i,r,s;if(e>=this.logLevel){const a=this.formatMessage(e,t,n);null===(s=null===(r=null===(i=window.VWOEvents)||void 0===i?void 0:i.store)||void 0===r?void 0:r.actions)||void 0===s||s.addLogsForDebugging(a),o?o(a):this.consoleLog(e,[a])}}consoleLog(e,t){switch(e){case s.INFO:console.info(...t);break;case s.WARN:console.warn(...t);break;case s.ERROR:console.error(...t);break;default:console.log(...t)}}formatMessage(t,n,o){var i,a;const c=Object.keys(o).reduce(((e,t)=>e.replace(new RegExp(`{{${t}}}`,"g"),o[t])),n),d=`${e.DOM}_`;let l=o;const u=(null===(i=o.data)||void 0===i?void 0:i.vwoEventName)||o.vwoEventName;return u!==d+r.CLICK&&u!==d+r.SUBMIT||(l=o.data?null===(a=o.data)||void 0===a?void 0:a.props:l.props,l=l||{name:u}),`VWO: [${s[t].toUpperCase()}] [${(new Date).toUTCString()}] ${c} ${JSON.stringify(l)}`}}var c=new a("warn"); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */function d(e,t,n,o){return new(n||(n=Promise))((function(i,r){function s(e){try{c(o.next(e))}catch(e){r(e)}}function a(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((o=o.apply(e,t||[])).next())}))}const l=function(...e){window.fetcher.getValue("VWO._.triggerEvent",e)};var u={PARSE_TLD:"pTLD"},w=["co","org","com","net","edu","au","ac"];function _(e){var t,n=e.split("."),o=n.length,i=n[o-2];return i&&w.includes(i)?(t=n[o-3]+"."+i+"."+n[o-1],l(u.PARSE_TLD,e,t),t):(t=i+"."+n[o-1],l(u.PARSE_TLD,e,t),t)}const g={SET_COOKIE:"sC",GET_COOKIE:"gC",ERASE_COOKIE:"eC",SET_THIRD_PARTY_COOKIE:"sTPC",SET_THIRD_PARTY_COOKIE_ERROR:"sTPCE"};window._vwo_evq=window._vwo_evq||[];var p="jI",h=window._vwo_evq;const v=window._vwo_ev=window._vwo_ev||function(...e){if(!e[0])throw new Error("Invalid Event:"+e[0]);e[0]!==p?h.push([].slice.call(arguments)):h.unshift([p])};let f;window.VWO._.triggerEvent=window._vwo_ev;const E={get:e=>{try{return window.localStorage.getItem(e)}catch(e){return""}},set:(e,t)=>{try{return f._setItem(e,t)}catch(e){return""}},remove:e=>{try{return f._removeItem(e)}catch(e){return!1}},getItem:function(e){return this.get(e)},setItem:function(e,t){this.set(e,t)},deleteAll:function(){},deleteItem:function(e){this.remove(e)}};function m(e){f=e}let O;function S(e){O=e}function T(e){window.VWO=null!=e?e:O}window.VWO._.localStorageService=E;const C=window.VWO._&&window.VWO._.customError||function(){},y=window.encodeURIComponent,I=window.decodeURIComponent,A=function(e){return btoa&&O._.ac&&O._.ac.bsECJ?btoa(e):y(e)},N=function(e){if(atob)try{return atob(e)}catch(e){}return I(e)},b=E.set,V=E.get,R=window.clearTimeout,L=window.setTimeout,P=Math.floor,D=Math.pow,x="(",U=")",W="_vis_opt_",k="_vwo_",M="_vis_",G=864e5,$={[W+"out"]:0,[W+"exp_*_combi"]:10,[W+"exp_*_combi_choose"]:11,[W+"exp_*_goal_*"]:12,[W+"exp_*_exclude"]:13,[W+"exp_*_split"]:14,[W+"test_cookie"]:20,[W+"s"]:21,[k+"ds"]:22,[k+"sn"]:23,[k+"referrer"]:24,[k+"uuid"]:30,[k+"uuid_*"]:31,[k+"uuid_v2"]:32,[k+"app_version_*_*"]:40,[M+"preview_*"]:41,[M+"editor"]:42,[M+"heatmap_*"]:43};let F;for(const e in $)$[e]=X($[e]),$["debug"+e]="d"+$[e];function j(){for(var e=document.cookie.split(/; ?/),t={},n=0;n-1||e.indexOf("_vwo_")>-1||e.indexOf("_vis_")>-1)}function H(e){let t,n;return()=>(n=n||L((()=>{n=t=void 0}),1),t=t||e())}let K=H(j);function J(e){return K()[I(e)]}function Y(e,t,n,o=4e12){t="_vwo"===e?A(t):y(t);let i=y(e)+"="+t+"; ";n&&(i+="domain="+n+"; "),o&&(i+="expires="+new Date(o).toUTCString()+"; "),i+="path=/",window.VWO._=window.VWO._||{},window.VWO._.ss&&(i+="; secure; samesite=none"),document.cookie=i,K=H(j)}function q(){K=H(j)}function X(e){"string"==typeof e&&(e=+e),e<0&&(e=0);let t="";for(;e;){const n=e%64;let o=n.toString(36);n>=36&&(o=String.fromCharCode(n+29)),62===n&&(o="_"),63===n&&(o="-"),t=o+t,e=P(e/64)}return t||e+""}function z(e){let t=0,n=0;for(;e;){const o=e.slice(-1);let i=26*+/[A-Z]/.test(o)+parseInt(o,36);"_"===o&&(i=62),"-"===o&&(i=63),t+=i*D(64,n++),e=e.slice(0,-1)}return t}function Z(e,t){return!e||"number"!=typeof e[2]||Date.now()>t+e[2]*G}class Q{constructor(e,t,n="cookie",o=!0,i,r,s){var a,c,d,l;this.threadInstanceSync=!1,this.defaultDelim1=(null===(c=null===(a=window._vwoCc)||void 0===a?void 0:a.cJ)||void 0===c?void 0:c.pd)||"~",this.delim1=(null===(l=null===(d=window._vwoCc)||void 0===d?void 0:d.cJ)||void 0===l?void 0:l.cd)||this.defaultDelim1,this.backwardCompatible=o,this.cookieSyncUrl=i,this.jarName=e,this.cookieStorageStrategy=n,this.domain=t,this.syncingOff=r,this.strategyConfig=s,this.syncingOff?this.cookies=this.syncFromTPCValue():this.cookies=this.syncFromCookies(),this.strategyConfig&&(this.strategyConfig.callback=this.strategyConfig.callback||function(){},this.strategyConfig.cookieJarValue=this.strategyConfig.cookieJarValue||""),F=z(this.getInJar("ts")||"0")||Date.now(),this.setInJar("ts",X(F),2e3),this.backwardCompatible&&this.getAll(!1,!0),this.backwardCompatible||this.syncingOff||"custom"===n||this.syncCookiesToJar(),this.threadInstanceSync=!0}syncCookiesToJar(){const e=document.cookie.split(/; ?/),t=this.getAll();for(var n=0;n-1?this.delim1:this.defaultDelim1;if(e.indexOf(n)>-1)t=e.split(n);else{const n=/ts(.)/.exec(e),o=n&&n[1];o&&(t=e.split(o),this.delim1=o)}const o=t[1].split(x);return[t[0],o[0],z(o[1])/100]}catch(n){const o=`Error occurred while decoding the cookie in cookieJar for strategy: ${t}. Cookie Value to be decoded: ${e}. ${n}`;return void C({msg:o,url:"cookie-jar.js",lineno:257,colno:26,source:y(o)})}}mapKey(e){if($[e])return $[e];const t=/([0-9]+)/g,n=e.replace(t,"*");if($[n]){const o=e.match(t)||[];return $[n]+"*"+o.map(X).join("*")}return e}unmapKey(e){const t=e.split("*"),n=t[0];let o="";for(const e in $)if($[e]===n){o=e;break}for(let e=1;e{this.syncViaXML(this.xmlSuccess)}),1e3))}updateJarMemory(e,t){this.cookies[e]=t}otherSide(...e){e[0]="VWO.modules.vwoUtils.cookies.CookieJar."+e[0],window.fetcher.getValue(...e)}}const ee={primary:(e,t,n=!1,o,i)=>new Proxy(t,{construct(t,r){this.store=this.store||["1"];const s=new t(...r),a=this.store.length;this.store.push(s);let c=r;n&&(c=o(s)),Object.defineProperty(s,"otherSideCreated",{value:!1,enumerable:!1,writable:!0}),s.otherSide=(...e)=>s.otherSideCreated.then((()=>s.otherSide(...e).then((e=>e))));const d={type:"vwoClassInstanceBridge",id:a,args:c,path:e};return s.otherSideCreated=new Promise((t=>{window.fetcher.request(d).send().then((n=>{s.otherSide=(...t)=>{const o=e.dest+"."+n+"."+t[0];return t[0]=o,window.fetcher.getValue(...t)},t(null),i&&i(n)}))})),s},get(e,t){return"symbol"==typeof t||isNaN(+t)?e:this.store[t]}}),secondary:(e,t,n)=>new Proxy(t,{construct(e,t){this.store=this.store||["1"];const o=new e(...t),i=this.store.length;return this.store.push(o),n&&n(o),[i,o]},get(e,t){return"symbol"==typeof t||isNaN(+t)?e:this.store[t]}})};class te extends Q{syncViaXML(e){if(!window.XMLHttpRequest)return;const t=new XMLHttpRequest;t.addEventListener("load",e),t.open("GET",this.cookieSyncUrl,!0),t.withCredentials=!0,t.send(null)}}const ne=ee.primary({src:"VWO.modules.vwoUtils.cookies.CookieJar",dest:"VWO.modules.vwoUtils.cookies.CookieJar"},te);function oe(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}window.VWO.modules.vwoUtils.cookies.CookieJar=ne;var ie={},re;function se(e,t){const n=document.createEvent("Event");e="vwo."+e,n.initEvent&&(n.initEvent(e,!1,!1),n.data=t,document.dispatchEvent&&document.dispatchEvent(n))}function ae(e,t){ie.queue=ie.queue||[];const n=window.VWO._.ac&&window.VWO._.ac.rdbg;if("meta"==e&&!n)return;if(!document.createEvent)return;const o=window.VWO;if(!o.nls||!o.nls.Recording)return void ie.queue.push({eventName:e,data:t});ie.queue.push({eventName:e,data:t});const i=ie.queue.splice(0);for(var r of i)se(r.eventName,r.data)}window.VWO.modules.vwoUtils.utils={customEvent:ae},function(e){e[e.Object=0]="Object",e[e.Property=1]="Property",e[e.Document=2]="Document",e[e.Variable=3]="Variable",e[e.OverWrite=4]="OverWrite",e[e.Delete=5]="Delete"}(re||(re={}));const{toString:ce}=Object.prototype;function de(e){return"[object Object]"===ce.call(e)}function le(e){return"[object Array]"===ce.call(e)}function ue(e){return"[object Null]"===ce.call(e)}function we(e){return"[object Undefined]"===ce.call(e)}function _e(e){return!we(e)&&!ue(e)}function ge(e){return!Number.isNaN(e)&&"[object Number]"===ce.call(e)}function pe(e){return"[object String]"===ce.call(e)}let he=!1;class ve{constructor(){this.operations=[]}getCookieObject(e){const t={};return e.split(";").forEach((e=>{const[n,o=""]=e.split("=").map((e=>e.trim()));t[n]=o})),t}push(e,t){this.operations.push({name:e,value:t})}pop_front(){this.operations.splice(0,1)}fullfil(e,t=!0){const n=this.getCookieObject(e);t&&this.pop_front(),this.operations.forEach((e=>{n[e.name]=e.value}));return Object.entries(n).map((e=>e.join("="))).join("; ")}}class fe{static internalUtils(){var e,t;return{isCookiePayloadObject:e=>!(!de(e)||!["value","fromThread","origin"].reduce(((t,n)=>t&&n in e),!0)),isCurrentContextMT:!!(null===(t=null===(e=window)||void 0===e?void 0:e.mainThread)||void 0===t?void 0:t.webWorker),getCookieAttributes:e=>{const t={};return e.split(";").forEach((e=>{const[n,o=""]=e.split("=").map((e=>e.trim()));t[n]=o})),t}}}getSetter(e){return t=>{if("string"==typeof t)t={value:t};else if(!fe.internalUtils().isCookiePayloadObject(t))return void console.error("Invalid value type!");const{value:n,fromThread:o}=t;let{origin:i}=t,r=!0;return(fe.internalUtils().isCurrentContextMT||"MAIN"===o)&&(document.__cookie=n,r="MAIN"!==o),r&&e({type:"sync",data:{propertyName:"cookie",value:{value:fe.internalUtils().isCurrentContextMT?document.__cookie:n,fromThread:fe.internalUtils().isCurrentContextMT?"MAIN":"WORKER",origin:he?"WORKER":i}},syncType:re.Document}),!0}}}function Ee(e){if(!fe.internalUtils().isCookiePayloadObject(e))return void console.error("Invalid value type!");const{value:t}=e;he=!0,document.cookie=t,he=!1}let me={};{class e{constructor(){this.enabled=!1,this.lastSentCookieString=""}isEnabled(){return this.enabled}enable(){this.enabled||(this.enabled=!0,window.fetcher.setValue("window.VWO._.isCookieFallbackEnabled",!0))}syncCookieToWorkerThread(e=(fe.internalUtils().isCurrentContextMT?"MAIN":"WORKER")){!this.enabled||this.lastSentCookieString===document.cookie&&"WORKER"!==e||(this.lastSentCookieString=document.cookie,window.fetcher.postMessage({type:"sync",data:{propertyName:"cookie",value:{value:document.cookie,fromThread:fe.internalUtils().isCurrentContextMT?"MAIN":"WORKER",origin:e}},syncType:re.Document}))}applySyncRequest(e){const{value:t}=e;if(!t)return window.VWO&&window.VWO._&&window.VWO._.customError&&window.VWO._.customError({msg:"Syncing error occurred in cookie fallback mode - value not present!",url:"fallback/cookies.ts",lineno:65,colno:10,source:JSONStringify(t)});document.cookie=t,this.syncCookieToWorkerThread("WORKER")}}me=new e}var Oe=window._vis_opt_cookieDays,Se=window._vwo_exp||{},Te,Ce=window._vwo_acc_id,ye=[],Ie=0,Ae,Ne=function(){for(var e=0;evoid 0===e))||(e.backwardCompatible=t.data.cj.bc||!1,e.strategy=e.strategy||t.data.cj.s),e}const Re={domain:void 0,_create:function(e,t,n,o,i,r,s){var a,c;be()&&0!==e.indexOf("debug")&&(e="debug"+e),window.VWO._.cLFE,"_vwo_sn"!==e&&"_vwo_ds"!==e&&"_vis_opt_test_cookie"!==e&&!isNaN(Oe=parseFloat(Oe))&&isFinite(Oe)&&(n=Oe);var d="";if(i?d+="; expires="+new Date(i).toGMTString():n?d+="; expires="+new Date((new Date).getTime()+864e5*n).toGMTString():!1===n&&(d="; expires=Thu, 01 Jan 1970 00:00:01 GMT"),o||(o=Re.domain),void 0!==o){o=(null===(c=null===(a=window.VWO._.allSettings.dataStore.plugins.DACDNCONFIG)||void 0===a?void 0:a.jsConfig)||void 0===c?void 0:c.dNISD)&&!window._vis_opt_domain?"":"; domain=."+o}const l=e+"="+encodeURIComponent(t)+d+(o||"")+"; path=/";window.VWO._.ss&&!s?document.cookie=l+"; secure; samesite=none; Partitioned;":document.cookie=l},create:function(e,t,n,o,i,r,s){this._create(e,t,n,o,i,r,s),me.syncCookieToWorkerThread(),v(g.SET_COOKIE,e,t,n,i),ae("meta",{ckName:e,ckValue:t,ckDays:n,ckExpiryTs:i})},get:function(e,t,n){var o;e=e.trim(),!n&&be()&&(e="debug"+e),window.VWO._.cLFE;var i=document.cookie.match(new RegExp("(?:^|;)\\s*"+e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")+"=(.*?)(?:;|$)","i"));return o=i&&decodeURIComponent(i[1]),v(g.GET_COOKIE,e,o),o},erase:function(e,t,n){this.create(e,"",!1,t,1,n),v(g.ERASE_COOKIE,e)},mergeInFPJar:function(){if(window.VWO._.cLFE)return;const e=this.createThirdPartyJar().getAll(!0);for(const t in e){if("ts"===t)continue;const n=e[t][1],o=e[t][0];window.VWO._.jar.set(t,o,(n-Date.now())/864e5)}},createThirdPartyJar:function(){return Te||(Te=new ne("_vwo_third_party",Re.domain,void 0,!1,void 0,!0),window.VWO._.tpj=Te,Te)},setThirdPartyCookiesInJar:function(e,t,n,o){const i=this.createThirdPartyJar(),r=o?(o-Date.now())/864e5:n;i.set(e,t,r)},getThirdPartyJarValue:function(){const e=Te.getStoredJarValue();return e.length?e:null},createThirdParty:function(e,t,n,o,i,r,s){if(!window.mainThread)return window.fetcher.getValue("VWO._.cookies.createThirdParty",[e,t,n,o,i,r,s]);var a,c,d,l;let u=!1;if(i&&(u=s?s.multiple_domains:Se[i].multiple_domains),"_vwo"!==e&&this._create(e,t,n,o),be()&&0!==e.indexOf("debug")&&(e="debug"+e),!((l=window.vwo_$)&&i&&u||r||"_vwo"===e))return void v(g.SET_THIRD_PARTY_COOKIE_ERROR,e,t,n,o);a=l("