!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";var r=Object.assign||function(t){for(var e=1;e127&&r<2048?(e+=String.fromCharCode(r>>6|192),e+=String.fromCharCode(63&r|128)):(e+=String.fromCharCode(r>>12|224),e+=String.fromCharCode(r>>6&63|128),e+=String.fromCharCode(63&r|128))}return e},decode:function(t){for(var e="",n=0,r=0,i=0,o=0;n191&&r<224?(i=t.charCodeAt(n+1),e+=String.fromCharCode((31&r)<<6|63&i),n+=2):(i=t.charCodeAt(n+1),o=t.charCodeAt(n+2),e+=String.fromCharCode((15&r)<<12|(63&i)<<6|63&o),n+=3);return e}},S={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(t){try{if(window.btoa&&window.atob)return window.btoa(unescape(encodeURIComponent(t)))}catch(t){}return S._encode(t)},_encode:function(t){var e,n,r,i,o,s,a,u="",c=0;for(t=I.encode(t);c>2,o=(3&e)<<4|n>>4,s=(15&n)<<2|r>>6,a=63&r,isNaN(n)?s=a=64:isNaN(r)&&(a=64),u=u+S._keyStr.charAt(i)+S._keyStr.charAt(o)+S._keyStr.charAt(s)+S._keyStr.charAt(a);return u},decode:function(t){try{if(window.btoa&&window.atob)return decodeURIComponent(escape(window.atob(t)))}catch(t){}return S._decode(t)},_decode:function(t){var e,n,r,i,o,s,a,u="",c=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");c>4,n=(15&o)<<4|s>>2,r=(3&s)<<6|a,u+=String.fromCharCode(e),64!==s&&(u+=String.fromCharCode(n)),64!==a&&(u+=String.fromCharCode(r));return u=I.decode(u)}},A=Object.prototype.toString,T={DISABLE:0,ERROR:1,WARN:2,INFO:3},P=T.WARN,O=function(t){T.hasOwnProperty(t)&&(P=T[t])},N=function(){return P},R={error:function(t){P>=T.ERROR&&k(t)},warn:function(t){P>=T.WARN&&k(t)},info:function(t){P>=T.INFO&&k(t)}},k=function(t){try{console.log("[Amplitude] "+t)}catch(t){}},x=function(t){return!t||0===t.length},U=function(){try{if(window.sessionStorage)return!0}catch(t){}return!1},C=function t(e){if("array"===u(e))for(var n=0;nE.MAX_STRING_LENGTH?t.substring(0,E.MAX_STRING_LENGTH):t},M=function(t,e,n){return u(t)===n||(R.error("Invalid "+e+" input type. Expected "+n+" but received "+u(t)),!1)},j=function(t){var e=u(t);if("object"!==e)return R.error("Error: invalid properties format. Expecting Javascript object, received "+e+", ignoring"),{};if(Object.keys(t).length>E.MAX_PROPERTY_KEYS)return R.error("Error: too many properties (more than 1000), ignoring"),{};var n={};for(var r in t)if(t.hasOwnProperty(r)){var i=r,o=u(i);"string"!==o&&(i=String(i),R.warn("WARNING: Non-string property key, received type "+o+', coercing to string "'+i+'"'));var s=q(i,t[r]);null!==s&&(n[i]=s)}return n},B=["nan","function","arguments","regexp","element"],q=function t(e,n){var r=u(n);if(B.indexOf(r)!==-1)R.warn('WARNING: Property key "'+e+'" with invalid value type '+r+", ignoring"),n=null;else if("undefined"===r)n=null;else if("error"===r)n=String(n),R.warn('WARNING: Property key "'+e+'" with value type error, coercing to '+n);else if("array"===r){for(var i=[],o=0;o=0;--o)r.push(n.slice(o).join("."));for(var s=0;s0?(this.userPropertiesOperations.hasOwnProperty(mt)||V.log.error("Need to send $clearAll on its own Identify object without any other operations, skipping $clearAll"),this):(this.userPropertiesOperations[mt]="-",this)},It.prototype.prepend=function(t,e){return this._addOperation(_t,t,e),this},It.prototype.set=function(t,e){return this._addOperation(wt,t,e),this},It.prototype.setOnce=function(t,e){return this._addOperation(bt,t,e),this},It.prototype.unset=function(t){return this._addOperation(Et,t,"-"),this},It.prototype._addOperation=function(t,e,n){return this.userPropertiesOperations.hasOwnProperty(mt)?void V.log.error("This identify already contains a $clearAll operation, skipping operation "+t):this.properties.indexOf(e)!==-1?void V.log.error('User property "'+e+'" already used in this identify, skipping operation '+t):(this.userPropertiesOperations.hasOwnProperty(t)||(this.userPropertiesOperations[t]={}),this.userPropertiesOperations[t][e]=n,void this.properties.push(e))};var St="undefined"!=typeof window?window:"undefined"!=typeof n?n:"undefined"!=typeof self?self:{},At=c(function(t){!function(e){function n(t,e){var n=(65535&t)+(65535&e),r=(t>>16)+(e>>16)+(n>>16);return r<<16|65535&n}function r(t,e){return t<>>32-e}function i(t,e,i,o,s,a){return n(r(n(n(e,t),n(o,a)),s),i)}function o(t,e,n,r,o,s,a){return i(e&n|~e&r,t,e,o,s,a)}function s(t,e,n,r,o,s,a){return i(e&r|n&~r,t,e,o,s,a)}function a(t,e,n,r,o,s,a){return i(e^n^r,t,e,o,s,a)}function u(t,e,n,r,o,s,a){return i(n^(e|~r),t,e,o,s,a)}function c(t,e){t[e>>5]|=128<>>9<<4)+14]=e;var r,i,c,l,f,p=1732584193,d=-271733879,h=-1732584194,g=271733878;for(r=0;r>5]>>>e%32&255);return n}function f(t){var e,n=[];for(n[(t.length>>2)-1]=void 0,e=0;e>5]|=(255&t.charCodeAt(e/8))<16&&(i=c(i,8*t.length)),n=0;n<16;n+=1)o[n]=909522486^i[n],s[n]=1549556828^i[n];return r=c(o.concat(f(e)),512+8*e.length),l(c(s.concat(r),640))}function h(t){var e,n,r="0123456789abcdef",i="";for(n=0;n>>4&15)+r.charAt(15&e);return i}function g(t){return unescape(encodeURIComponent(t))}function v(t){return p(g(t))}function y(t){return h(v(t))}function m(t,e){return d(g(t),g(e))}function _(t,e){return h(m(t,e))}function w(t,e,n){return e?n?m(e,t):_(e,t):n?v(t):y(t)}t.exports?t.exports=w:e.md5=w}(St)}),Tt=function(t){return encodeURIComponent(t).replace(/[!'()*]/g,function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})},Pt=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,Rt=f()?Object.assign:function(t,e){for(var n,r,i=l(t),o=1;o * Licensed under MIT License */ !function(n,r){var i="0.7.21",o="",s="?",a="function",u="object",c="string",l="major",f="model",p="name",d="type",h="vendor",g="version",v="architecture",y="console",m="mobile",_="tablet",w="smarttv",b="wearable",E="embedded",I={extend:function(t,e){var n={};for(var r in t)e[r]&&e[r].length%2===0?n[r]=e[r].concat(t[r]):n[r]=t[r];return n},has:function(t,e){return"string"==typeof t&&e.toLowerCase().indexOf(t.toLowerCase())!==-1},lowerize:function(t){return t.toLowerCase()},major:function(t){return typeof t===c?t.replace(/[^\d\.]/g,"").split(".")[0]:r},trim:function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},S={rgx:function(t,e){for(var n,i,o,s,c,l,f=0;f0?2==s.length?typeof s[1]==a?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3==s.length?typeof s[1]!==a||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):r:this[s[0]]=l?s[1].call(this,l,s[2]):r:4==s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):r):this[s]=l?l:r;f+=2}},str:function(t,e){for(var n in e)if(typeof e[n]===u&&e[n].length>0){for(var i=0;i>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,t)}),Gt="7.1.0",zt=function(){return navigator&&(navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage)||""},Jt={getLanguage:zt},Wt="Web",Qt={apiEndpoint:"api.amplitude.com",batchEvents:!1,cookieExpiration:3650,cookieName:"amplitude_id",sameSiteCookie:"Lax",cookieForceUpgrade:!1,deferInitialization:!1,disableCookies:!1,deviceIdFromUrlParam:!1,domain:"",eventUploadPeriodMillis:3e4,eventUploadThreshold:30,forceHttps:!0,includeGclid:!1,includeReferrer:!1,includeUtm:!1,language:Jt.getLanguage(),logLevel:"WARN",optOut:!1,onError:function(){},platform:Wt,savedMaxCount:1e3,saveEvents:!0,saveParamsReferrerOncePerSession:!0,secureCookie:!1,sessionTimeout:18e5,trackingOptions:{city:!0,country:!0,carrier:!0,device_manufacturer:!0,device_model:!0,dma:!0,ip_address:!0,language:!0,os_name:!0,os_version:!0,platform:!0,region:!0,version_name:!0},unsetParamsReferrerOnNewSession:!1,unsentKey:"amplitude_unsent",unsentIdentifyKey:"amplitude_unsent_identify",uploadBatchSize:100},Xt=function(t){this._instanceName=V.isEmptyString(t)?E.DEFAULT_INSTANCE:t.toLowerCase(),this._unsentEvents=[],this._unsentIdentifys=[],this._ua=new Yt(navigator.userAgent).getResult(),this.options=a({},Qt,{trackingOptions:a({},Qt.trackingOptions)}),this.cookieStorage=(new dt).getStorage(),this._q=[],this._sending=!1,this._updateScheduled=!1,this._onInit=[],this._eventId=0,this._identifyId=0,this._lastEventTime=null,this._newSession=!1,this._sequenceNumber=0,this._sessionId=null,this._isInitialized=!1,this._userAgent=navigator&&navigator.userAgent||null};Xt.prototype.Identify=It,Xt.prototype.Revenue=Ft,Xt.prototype.init=function(t,e,n,r){var i=this;if("string"!==u(t)||V.isEmptyString(t))return void V.log.error("Invalid apiKey. Please re-initialize with a valid apiKey");try{Zt(this.options,n),this.options.cookieName!==Qt.cookieName&&V.log.warn("The cookieName option is deprecated. We will be ignoring it for newer cookies"),this.options.apiKey=t,this._storageSuffix="_"+t+(this._instanceName===E.DEFAULT_INSTANCE?"":"_"+this._instanceName),this._storageSuffixV5=t.slice(0,6),this._oldCookiename=this.options.cookieName+this._storageSuffix,this._unsentKey=this.options.unsentKey+this._storageSuffix,this._unsentIdentifyKey=this.options.unsentIdentifyKey+this._storageSuffix,this._cookieName=E.COOKIE_PREFIX+"_"+this._storageSuffixV5,this.cookieStorage.options({expirationDays:this.options.cookieExpiration,domain:this.options.domain,secure:this.options.secureCookie,sameSite:this.options.sameSiteCookie}),this._metadataStorage=new ht({storageKey:this._cookieName,disableCookies:this.options.disableCookies,expirationDays:this.options.cookieExpiration,domain:this.options.domain,secure:this.options.secureCookie,sameSite:this.options.sameSiteCookie});var o=!!this.cookieStorage.get(this._oldCookiename),s=!!this._metadataStorage.load();this._useOldCookie=!s&&o&&!this.options.cookieForceUpgrade;var a=s||o;if(this.options.domain=this.cookieStorage.options().domain,this.options.deferInitialization&&!a)return void this._deferInitialization(t,e,n,r);"string"===u(this.options.logLevel)&&V.setLogLevel(this.options.logLevel);var c=ae(this);this._apiPropertiesTrackingOptions=Object.keys(c).length>0?{tracking_options:c}:{},this.options.cookieForceUpgrade&&o&&(s||ee(this),this.cookieStorage.remove(this._oldCookiename)),te(this),this._pendingReadStorage=!0;var l=function(t){i.options.deviceId=i._getInitialDeviceId(n&&n.deviceId,t),i.options.userId="string"===u(e)&&!V.isEmptyString(e)&&e||"number"===u(e)&&e.toString()||i.options.userId||null;var r=(new Date).getTime();(!i._sessionId||!i._lastEventTime||r-i._lastEventTime>i.options.sessionTimeout)&&(i.options.unsetParamsReferrerOnNewSession&&i._unsetUTMParams(),i._newSession=!0,i._sessionId=r,i.options.saveParamsReferrerOncePerSession&&i._trackParamsAndReferrer()),i.options.saveParamsReferrerOncePerSession||i._trackParamsAndReferrer(),i.options.saveEvents&&(Ht(i._unsentEvents),Ht(i._unsentIdentifys)),i._lastEventTime=r,re(i),i._pendingReadStorage=!1,i._sendEventsIfReady();for(var o=0;or.length;--i){var o=n.slice(n.length-i).join(".");Q.set(this._cookieName,null,{domain:"."+o})}Q.set(this._cookieName,null,{})}},Xt.prototype._getInitialDeviceId=function(t,e){return t?t:this.options.deviceIdFromUrlParam?this._getDeviceIdFromUrlParam(this._getUrlParams()):this.options.deviceId?this.options.deviceId:e?e:G()};var Ht=function(t){for(var e=0;e0&&Promise.all(i).then(function(){}).catch(function(t){e.options.onError(t)})}}).then(t).catch(function(t){e.options.onError(t)})},Xt.prototype._trackParamsAndReferrer=function(){this.options.includeUtm&&this._initUtmData(),this.options.includeReferrer&&this._saveReferrer(this._getReferrer()),this.options.includeGclid&&this._saveGclid(this._getUrlParams())};var Zt=function t(e,n){if("object"===u(n)){var r=function(r){if(e.hasOwnProperty(r)){var i=n[r],o=u(e[r]);V.validateInput(i,r+" option",o)&&("boolean"===o?e[r]=!!i:"string"===o&&!V.isEmptyString(i)||"number"===o&&i>0?e[r]=i:"object"===o&&t(e[r],i))}};for(var i in n)n.hasOwnProperty(i)&&r(i)}};Xt.prototype.runQueuedFunctions=function(){var t=this._q;this._q=[];for(var e=0;e=this.options.eventUploadThreshold?(this.sendEvents(),!0):(this._updateScheduled||(this._updateScheduled=!0,setTimeout(function(){this._updateScheduled=!1,this.sendEvents()}.bind(this),this.options.eventUploadPeriodMillis)),!1):(this.sendEvents(),!0))},Xt.prototype._getFromStorage=function(t,e){return t.getItem(e+this._storageSuffix)},Xt.prototype._setInStorage=function(t,e,n){t.setItem(e+this._storageSuffix,n)};var te=function(t){if(!t._useOldCookie){var e=t._metadataStorage.load();return void("object"===u(e)&&ne(t,e))}var n=t.cookieStorage.get(t._oldCookiename);if("object"===u(n))return void ne(t,n)},ee=function(t){var e=t.cookieStorage.get(t._oldCookiename);"object"===u(e)&&(ne(t,e),re(t))},ne=function(t,e){e.deviceId&&(t.options.deviceId=e.deviceId),e.userId&&(t.options.userId=e.userId),null!==e.optOut&&void 0!==e.optOut&&e.optOut!==!1&&(t.options.optOut=e.optOut),e.sessionId&&(t._sessionId=parseInt(e.sessionId,10)),e.lastEventTime&&(t._lastEventTime=parseInt(e.lastEventTime,10)),e.eventId&&(t._eventId=parseInt(e.eventId,10)),e.identifyId&&(t._identifyId=parseInt(e.identifyId,10)),e.sequenceNumber&&(t._sequenceNumber=parseInt(e.sequenceNumber,10))},re=function(t){var e={deviceId:t.options.deviceId,userId:t.options.userId,optOut:t.options.optOut,sessionId:t._sessionId,lastEventTime:t._lastEventTime,eventId:t._eventId,identifyId:t._identifyId,sequenceNumber:t._sequenceNumber};$t&&$t.setItem(t._storageSuffix,JSON.stringify(e)),t._useOldCookie?t.cookieStorage.set(t.options.cookieName+t._storageSuffix,e):t._metadataStorage.save(e)};Xt.prototype._initUtmData=function(t,e){t=t||this._getUrlParams(),e=e||this.cookieStorage.get("__utmz");var n=gt(e,t);ie(this,n)},Xt.prototype._unsetUTMParams=function(){var t=new It;t.unset(E.REFERRER),t.unset(E.UTM_SOURCE),t.unset(E.UTM_MEDIUM),t.unset(E.UTM_CAMPAIGN),t.unset(E.UTM_TERM),t.unset(E.UTM_CONTENT),this.identify(t)};var ie=function(t,e){if("object"===u(e)&&0!==Object.keys(e).length){var n=new It;for(var r in e)e.hasOwnProperty(r)&&(n.setOnce("initial_"+r,e[r]),n.set(r,e[r]));t.identify(n)}};Xt.prototype._getReferrer=function(){return document.referrer},Xt.prototype._getUrlParams=function(){return location.search},Xt.prototype._saveGclid=function(t){var e=V.getQueryParam("gclid",t);if(!V.isEmptyString(e)){var n={gclid:e};ie(this,n)}},Xt.prototype._getDeviceIdFromUrlParam=function(t){return V.getQueryParam(E.AMP_DEVICE_ID_PARAM,t)},Xt.prototype._getReferringDomain=function(t){if(V.isEmptyString(t))return null;var e=t.split("/");return e.length>=3?e[2]:null},Xt.prototype._saveReferrer=function(t){if(!V.isEmptyString(t)){var e={referrer:t,referring_domain:this._getReferringDomain(t)};ie(this,e)}},Xt.prototype.saveEvents=function(){try{var t=JSON.stringify(this._unsentEvents.map(function(t){var e=t.event;return e}));$t?$t.setItem(this.options.unsentKey+this._storageSuffix,t):this._setInStorage(pt,this.options.unsentKey,t)}catch(t){}try{var e=JSON.stringify(this._unsentIdentifys.map(function(t){return t.event}));$t?$t.setItem(this.options.unsentIdentifyKey+this._storageSuffix,e):this._setInStorage(pt,this.options.unsentIdentifyKey,e)}catch(t){}},Xt.prototype.setDomain=function(t){if(this._shouldDeferCall())return this._q.push(["setDomain"].concat(Array.prototype.slice.call(arguments,0)));if(V.validateInput(t,"domain","string"))try{this.cookieStorage.options({expirationDays:this.options.cookieExpiration,secure:this.options.secureCookie,domain:t,sameSite:this.options.sameSiteCookie}),this.options.domain=this.cookieStorage.options().domain,te(this),re(this)}catch(t){V.log.error(t)}},Xt.prototype.setUserId=function(t){if(this._shouldDeferCall())return this._q.push(["setUserId"].concat(Array.prototype.slice.call(arguments,0)));try{this.options.userId=void 0!==t&&null!==t&&""+t||null,re(this)}catch(t){V.log.error(t)}},Xt.prototype.setGroup=function(t,e){if(this._shouldDeferCall())return this._q.push(["setGroup"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("setGroup()")&&V.validateInput(t,"groupType","string")&&!V.isEmptyString(t)){var n={};n[t]=e;var r=(new It).set(t,e);this._logEvent(E.IDENTIFY_EVENT,null,null,r.userPropertiesOperations,n,null,null,null)}},Xt.prototype.setOptOut=function(t){if(this._shouldDeferCall())return this._q.push(["setOptOut"].concat(Array.prototype.slice.call(arguments,0)));if(V.validateInput(t,"enable","boolean"))try{this.options.optOut=t,re(this)}catch(t){V.log.error(t)}},Xt.prototype.setSessionId=function(t){if(V.validateInput(t,"sessionId","number"))try{this._sessionId=t,re(this)}catch(t){V.log.error(t)}},Xt.prototype.resetSessionId=function(){this.setSessionId((new Date).getTime())},Xt.prototype.regenerateDeviceId=function(){return this._shouldDeferCall()?this._q.push(["regenerateDeviceId"].concat(Array.prototype.slice.call(arguments,0))):void this.setDeviceId(G())},Xt.prototype.setDeviceId=function(t){if(this._shouldDeferCall())return this._q.push(["setDeviceId"].concat(Array.prototype.slice.call(arguments,0)));if(V.validateInput(t,"deviceId","string"))try{V.isEmptyString(t)||(this.options.deviceId=""+t,re(this))}catch(t){V.log.error(t)}},Xt.prototype.setUserProperties=function(t){if(this._shouldDeferCall())return this._q.push(["setUserProperties"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("setUserProperties()")&&V.validateInput(t,"userProperties","object")){var e=V.truncate(V.validateProperties(t));if(0!==Object.keys(e).length){var n=new It;for(var r in e)e.hasOwnProperty(r)&&n.set(r,e[r]);this.identify(n)}}},Xt.prototype.clearUserProperties=function(){if(this._shouldDeferCall())return this._q.push(["clearUserProperties"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("clearUserProperties()")){var t=new It;t.clearAll(),this.identify(t)}};var oe=function(t,e){for(var n=0;n0)return this._logEvent(E.IDENTIFY_EVENT,null,null,t.userPropertiesOperations,null,null,null,e);"function"===u(e)&&e(0,"No request sent",{reason:"No user property operations"})}else V.log.error("Invalid identify input type. Expected Identify object but saw "+u(t)),"function"===u(e)&&e(0,"No request sent",{reason:"Invalid identify input type"})},Xt.prototype.groupIdentify=function(t,e,n,r){if(this._shouldDeferCall())return this._q.push(["groupIdentify"].concat(Array.prototype.slice.call(arguments,0)));if(!this._apiKeySet("groupIdentify()"))return void("function"===u(r)&&r(0,"No request sent",{reason:"API key is not set"}));if(!V.validateInput(t,"group_type","string")||V.isEmptyString(t))return void("function"===u(r)&&r(0,"No request sent",{reason:"Invalid group type"}));if(null===e||void 0===e)return void("function"===u(r)&&r(0,"No request sent",{reason:"Invalid group name"}));if("object"===u(n)&&n.hasOwnProperty("_q")&&(n=oe(new It,n)),n instanceof It){if(Object.keys(n.userPropertiesOperations).length>0)return this._logEvent(E.GROUP_IDENTIFY_EVENT,null,null,null,s({},t,e),n.userPropertiesOperations,null,r);"function"===u(r)&&r(0,"No request sent",{reason:"No group property operations"})}else V.log.error("Invalid identify input type. Expected Identify object but saw "+u(n)),"function"===u(r)&&r(0,"No request sent",{reason:"Invalid identify input type"})},Xt.prototype.setVersionName=function(t){return this._shouldDeferCall()?this._q.push(["setVersionName"].concat(Array.prototype.slice.call(arguments,0))):void(V.validateInput(t,"versionName","string")&&(this.options.versionName=t))},Xt.prototype._logEvent=function(t,e,n,r,i,o,s,c){if(te(this),!t)return void("function"===u(c)&&c(0,"No request sent",{ reason:"Missing eventType"}));if(this.options.optOut)return void("function"===u(c)&&c(0,"No request sent",{reason:"optOut is set to true"}));try{var l;l=t===E.IDENTIFY_EVENT||t===E.GROUP_IDENTIFY_EVENT?this.nextIdentifyId():this.nextEventId();var f=this.nextSequenceNumber(),p="number"===u(s)?s:(new Date).getTime();(!this._sessionId||!this._lastEventTime||p-this._lastEventTime>this.options.sessionTimeout)&&(this._sessionId=p),this._lastEventTime=p,re(this);var d,h,g,v=this._ua.browser.name,y=this._ua.browser.major,m=this._ua.os.name;r=r||{};var _=a({},this._apiPropertiesTrackingOptions);n=a({},n||{},_),e=e||{},i=i||{},o=o||{};var w={device_id:this.options.deviceId,user_id:this.options.userId,timestamp:p,event_id:l,session_id:this._sessionId||-1,event_type:t,version_name:se(this,"version_name")?this.options.versionName||h||null:null,platform:se(this,"platform")?this.options.platform:null,os_name:se(this,"os_name")?v||null:null,os_version:se(this,"os_version")?y||null:null,device_model:se(this,"device_model")?m||null:null,device_manufacturer:se(this,"device_manufacturer")?d||null:null,language:se(this,"language")?this.options.language:null,carrier:se(this,"carrier")?g||null:null,api_properties:n,event_properties:V.truncate(V.validateProperties(e)),user_properties:V.truncate(V.validateProperties(r)),uuid:Kt(),library:{name:"amplitude-js",version:Gt},sequence_number:f,groups:V.truncate(V.validateGroups(i)),group_properties:V.truncate(V.validateProperties(o)),user_agent:this._userAgent};return t===E.IDENTIFY_EVENT||t===E.GROUP_IDENTIFY_EVENT?(this._unsentIdentifys.push({event:w,callback:c}),this._limitEventsQueued(this._unsentIdentifys)):(this._unsentEvents.push({event:w,callback:c}),this._limitEventsQueued(this._unsentEvents)),this.options.saveEvents&&this.saveEvents(),this._sendEventsIfReady(c),l}catch(t){V.log.error(t)}};var se=function(t,e){return!!t.options.trackingOptions[e]},ae=function(t){for(var e=["city","country","dma","ip_address","region"],n={},r=0;rthis.options.savedMaxCount&&t.splice(0,t.length-this.options.savedMaxCount)},Xt.prototype.logEvent=function(t,e,n){return this._shouldDeferCall()?this._q.push(["logEvent"].concat(Array.prototype.slice.call(arguments,0))):this.logEventWithTimestamp(t,e,null,n)},Xt.prototype.logEventWithTimestamp=function(t,e,n,r){return this._shouldDeferCall()?this._q.push(["logEventWithTimestamp"].concat(Array.prototype.slice.call(arguments,0))):this._apiKeySet("logEvent()")?V.validateInput(t,"eventType","string")?V.isEmptyString(t)?("function"===u(r)&&r(0,"No request sent",{reason:"Missing eventType"}),-1):this._logEvent(t,e,null,null,null,null,n,r):("function"===u(r)&&r(0,"No request sent",{reason:"Invalid type for eventType"}),-1):("function"===u(r)&&r(0,"No request sent",{reason:"API key not set"}),-1)},Xt.prototype.logEventWithGroups=function(t,e,n,r){return this._shouldDeferCall()?this._q.push(["logEventWithGroups"].concat(Array.prototype.slice.call(arguments,0))):this._apiKeySet("logEventWithGroups()")?V.validateInput(t,"eventType","string")?this._logEvent(t,e,null,null,n,null,null,r):("function"===u(r)&&r(0,"No request sent",{reason:"Invalid type for eventType"}),-1):("function"===u(r)&&r(0,"No request sent",{reason:"API key not set"}),-1)};var ue=function(t){return!isNaN(parseFloat(t))&&isFinite(t)};Xt.prototype.logRevenueV2=function(t){if(this._shouldDeferCall())return this._q.push(["logRevenueV2"].concat(Array.prototype.slice.call(arguments,0)));if(this._apiKeySet("logRevenueV2()"))if("object"===u(t)&&t.hasOwnProperty("_q")&&(t=oe(new Ft,t)),t instanceof Ft){if(t&&t._isValidRevenue())return this.logEvent(E.REVENUE_EVENT,t._toJSONObject())}else V.log.error("Invalid revenue input type. Expected Revenue object but saw "+u(t))},Xt.prototype.logRevenue=function(t,e,n){return this._shouldDeferCall()?this._q.push(["logRevenue"].concat(Array.prototype.slice.call(arguments,0))):this._apiKeySet("logRevenue()")&&ue(t)&&(void 0===e||ue(e))?this._logEvent(E.REVENUE_EVENT,{},{productId:n,special:"revenue_amount",quantity:e||1,price:t},null,null,null,null,null):-1},Xt.prototype.removeEvents=function(t,e,n,r){ce(this,"_unsentEvents",t,n,r),ce(this,"_unsentIdentifys",e,n,r)};var ce=function(t,e,n,r,i){if(!(n<0)){for(var o=[],s=0;sn?o.push(a):a.callback&&a.callback(r,i)}t[e]=o}};Xt.prototype.sendEvents=function(){if(!this._apiKeySet("sendEvents()"))return void this.removeEvents(1/0,1/0,0,"No request sent",{reason:"API key not set"});if(this.options.optOut)return void this.removeEvents(1/0,1/0,0,"No request sent",{reason:"Opt out is set to true"});if(0!==this._unsentCount()&&!this._sending){this._sending=!0;var t=this.options.forceHttps?"https":"https:"===window.location.protocol?"https":"http",e=t+"://"+this.options.apiEndpoint,n=Math.min(this._unsentCount(),this.options.uploadBatchSize),r=this._mergeEventsAndIdentifys(n),i=r.maxEventId,o=r.maxIdentifyId,s=JSON.stringify(r.eventsToSend.map(function(t){var e=t.event;return e})),a=(new Date).getTime(),u={client:this.options.apiKey,e:s,v:E.API_VERSION,upload_time:a,checksum:At(E.API_VERSION+this.options.apiKey+s+a)},c=this;new Lt(e,u).send(function(t,e){c._sending=!1;try{200===t&&"success"===e?(c.removeEvents(i,o,t,e),c.options.saveEvents&&c.saveEvents(),c._sendEventsIfReady()):413===t&&(1===c.options.uploadBatchSize&&c.removeEvents(i,o,t,e),c.options.uploadBatchSize=Math.ceil(n/2),c.sendEvents())}catch(t){}})}},Xt.prototype._mergeEventsAndIdentifys=function(t){for(var e=[],n=0,r=-1,i=0,o=-1;e.length=this._unsentIdentifys.length,u=n>=this._unsentEvents.length;if(u&&a){V.log.error("Merging Events and Identifys, less events and identifys than expected");break}a?(s=this._unsentEvents[n++],r=s.event.event_id):u?(s=this._unsentIdentifys[i++],o=s.event.event_id):!("sequence_number"in this._unsentEvents[n].event)||this._unsentEvents[n].event.sequence_number2&&void 0!==arguments[2]?arguments[2]:{},s=n.target.dataset,a=r({linkText:n.target.innerText,linkTarget:n.target.getAttribute("href")},t,s,o);i.getInstance().logEvent(e,a)};$(".global-nav__links a").on("click",function(t){var e={linkLocation:"Top Nav"};u("click navigation",t,e)}),$(".global-footer__links-content a").on("click",function(t){var e={linkLocation:"Footer"};u("click footer",t,e)}),$(".global-footer__legal a").on("click",function(t){var e={linkLocation:"Footer"};u("click footer",t,e)}),$(".global-footer__social-links a").on("click",function(t){var e={linkLocation:"Footer"};u("click footer",t,e)}),$("a.button, .location-social__links a, .package-list-static a, .carousel-instructor__list a").on("click",function(t){u("click cta",t)}),$(".offer-bar a").on("click",function(t){u("click offer",t)}),$(".offer-bar-static a").on("click",function(t){u("click offer",t)}),$(".announcement-banner__copy a").on("click",function(t){u("click hello banner",t)}),$("video").each(function(e,n){var o=n,s=$(o).find("source").attr("src"),a=r({videoUrl:s},t);$(o).on("play",function(){i.getInstance().logEvent("video play",a)}),$(o).on("ended",function(){i.getInstance().logEvent("video complete",a)})}),$(document).on("click","form .hs-button",function(t){var e={};if($("nav.super-nav").length>0&&$("nav.super-nav")[0].dataset.navLocation){var n=JSON.parse($("nav.super-nav")[0].dataset.navLocation);e={locationName:n.name,locationId:n.id}}if($(".offer-form__location-picker-container").length>0){var r=JSON.parse($(".offer-form__location-picker-container")[0].dataset.offerLocation);e={locationName:r.name,locationId:r.id,offer:document.title}}u("click form submit",t,e)})})},function(t,e){"use strict";var n=void 0,r=function(){return n||(n=$({})),n},i=function(t,e){r().trigger(t,[e])},o=function(t,e){r().on(t,e)};t.exports={dispatch:i,on:o}},function(t,e,n){"use strict";var r=n(1),i=function(){return"xpo_"+UI_APP.brand_key+"_favorite_locations"},o=function(t){try{var e=localStorage.getItem(i());if(!e)return null;var n=JSON.parse(e);return n[t]||null}catch(t){}return null},s=function(t){try{if(o(t.id))return;var e=localStorage.getItem(i()),n=e?JSON.parse(e):{};n[t.id]={name:t.name,id:t.id,favorite:!0,site_slug:t.site_slug},localStorage.setItem(i(),JSON.stringify(n)),UI_APP.dispatch(r.favoritesSaved,n)}catch(t){}},a=function(t){try{var e=localStorage.getItem(i());if(!e)return;var n=e?JSON.parse(e):{};n[t]&&delete n[t],localStorage.setItem(i(),JSON.stringify(n)),UI_APP.dispatch(r.favoritesSaved,n)}catch(t){}},u=function(){try{var t=localStorage.getItem(i());return t?JSON.parse(t):null}catch(t){}return null},c=function(t){try{o(t.id)?a(t.id):s(t)}catch(t){}return null};t.exports={getFavoriteLocations:u,saveFavoriteByLocation:s,getFavoriteByID:o,deleteFavoriteByID:a,toggleFavorite:c}},function(t,e){"use strict";var n=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!e)try{var r=UI_APP.getFavoriteLocations();if(r){var i=Object.keys(r)[0];if(r[i])return t(r[i])}}catch(t){}var o=UI_APP.remote_id,s=UI_APP.getVarByKey("apiBaseURL")+"/brands/"+UI_APP.apiNameKey+"/locations?geoip="+o+"&open_status=external&limit=1&offer_slug="+n;$.getJSON(s,function(e){return t(e.locations&&e.locations.length>0?e.locations.pop():null)})};t.exports={getNearestLocation:n}},function(t,e){"use strict";function n(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e&&t.css("transition-duration","0s"),t.attr("data-reveal","revealed")}function r(){var t=$("body,html"),e=t.scrollTop();$('[data-reveal]:not([data-reveal="revealed"])').each(function(t,r){var i=$(r);i.offset().top0){var e=t[0].getAttribute("data-reveal-speed")||100;n($(t[0])),f=t.slice(1),p=setTimeout(i,parseFloat(e))}else p=null}function o(){var t=document.documentElement;t.setAttribute("data-useragent",navigator.userAgent),t.setAttribute("data-platform",navigator.platform),t.className+=Boolean("ontouchstart"in window)||Boolean("onmsgesturechange"in window)?" touch":""}function s(){var t="ontouchstart"in window||navigator.msMaxTouchPoints,e="undefined"!=typeof window.orientation||navigator.userAgent.indexOf("IEMobile")!==-1;document.documentElement.classList.add(e||t?"mobile-device":"desktop-device"),t&&document.documentElement.classList.add(t?"touch-device":"")}function a(){n($(".global-nav")),p=setTimeout(i,100),r(),$("[data-reveal-group]").each(function(t,e){window.revealObserver.observe(e)})}function u(){$("[type=hidden]").closest(".form-columns-1").css({margin:0})}function c(){if(!document.body.classList.contains("no-hero")&&!document.querySelector("html").classList.contains("hs-inline-edit")){var t=document.querySelector('[data-hs-cos-general-type="widget_container"]');t&&[].forEach.call(document.querySelectorAll(".module"),function(e){e.closest(".module-wrapper")||(t.appendChild(e),[].forEach.call(t.querySelectorAll(".hs_cos_wrapper_type_module"),function(t){t.remove&&t.remove()}))})}}function l(){if(window.objectFitPolyfill){var t=document.querySelector(".module__media--video video");t&&objectFitPolyfill(t)}}var f=[],p=void 0;$("window");window.revealObserver=new IntersectionObserver(function(t,e){$.each(t,function(t,n){if(n.isIntersecting){e.unobserve(n.target);var r=$('[data-reveal]:not([data-reveal="revealed"])',n.target).toArray().sort(function(t,e){var n=parseInt($(t).data("reveal"))||Number.MAX_SAFE_INTEGER,r=parseInt($(e).data("reveal"))||Number.MAX_SAFE_INTEGER;return n>r?1:n0&&!e.paused&&!e.ended&&e.readyState>2;r&&(n.push(e),e.pause())});var e=$("#".concat(t));e.attr("data-modal-ui","active").focus();var r=e.find("[data-modal-video]").get();1===r.length&&r[0].play()}function e(){$("body").removeClass("has-fixed-modal"),$("[data-modal-video]").each(function(t,e){return e.pause()}),n.forEach(function(t){return t.play()}),$('[data-modal-ui="active"]').attr("data-modal-ui","")}var n=[];$("body").on("click","[data-modal-ui-trigger]",function(e){e.preventDefault(),t($(e.currentTarget).attr("data-modal-ui-trigger"))}),$("[data-modal-ui-overlay]").on("click",function(){e()}),$("[data-modal-ui-close]").on("click",e),$(document).on("keydown",function(t){"Escape"===t.key&&e()})})},function(t,e){"use strict";$(function(){$('a[href*="#"]').not('[href="javascript:;"]').not('[href="#"]').not('[href="#0"]').click(function(t){if(window.location.pathname.replace(/^\//,"")===this.pathname.replace(/^\//,"")&&window.location.hostname===this.hostname){var e=$(this.hash);if(e=e.length?e:$("[name="+this.hash.slice(1)+"]"),e.length){t.preventDefault();var n=$(".global-nav"),r=30,i=e.offset().top;i<=n.offset().top+n.height()&&(i-=n.height()+r),$("html,body").animate({scrollTop:i},"slow")}}})})},function(t,e){"use strict";var n=function(t,e,n){var r=void 0;return function(){for(var i=arguments.length,o=Array(i),s=0;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function r(t){var e=n(t),r=e[0],i=e[1];return 3*(r+i)/4-i}function i(t,e,n){return 3*(e+n)/4-n}function o(t){for(var e,r=n(t),o=r[0],s=r[1],a=new f(i(t,o,s)),u=0,c=s>0?o-4:o,p=0;p>16&255,a[u++]=e>>8&255,a[u++]=255&e;return 2===s&&(e=l[t.charCodeAt(p)]<<2|l[t.charCodeAt(p+1)]>>4,a[u++]=255&e),1===s&&(e=l[t.charCodeAt(p)]<<10|l[t.charCodeAt(p+1)]<<4|l[t.charCodeAt(p+2)]>>2,a[u++]=e>>8&255,a[u++]=255&e),a}function s(t){return c[t>>18&63]+c[t>>12&63]+c[t>>6&63]+c[63&t]}function a(t,e,n){for(var r,i=[],o=e;ou?u:s+o));return 1===r?(e=t[n-1],i.push(c[e>>2]+c[e<<4&63]+"==")):2===r&&(e=(t[n-2]<<8)+t[n-1],i.push(c[e>>10]+c[e>>4&63]+c[e<<2&63]+"=")),i.join("")}e.byteLength=r,e.toByteArray=o,e.fromByteArray=u;for(var c=[],l=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,h=p.length;d * @license MIT */ "use strict";function r(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function i(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(i()=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function v(t){return+t!=t&&(t=0),s.alloc(+t)}function y(t,e){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(t).length;default:if(r)return K(t).length;e=(""+e).toLowerCase(),r=!0}}function m(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return U(this,e,n);case"utf8":case"utf-8":return N(this,e,n);case"ascii":return k(this,e,n);case"latin1":case"binary":return x(this,e,n);case"base64":return O(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function _(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function w(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:b(t,e,n,r,i);if("number"==typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):b(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,r,i){function o(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}var s=1,a=t.length,u=e.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;ca&&(n=a-u),c=n;c>=0;c--){for(var f=!0,p=0;pi&&(r=i)):r=i;var o=e.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s239?4:o>223?3:o>191?2:1;if(i+a<=n){var u,c,l,f;switch(a){case 1:o<128&&(s=o);break;case 2:u=t[i+1],128===(192&u)&&(f=(31&o)<<6|63&u,f>127&&(s=f));break;case 3:u=t[i+1],c=t[i+2],128===(192&u)&&128===(192&c)&&(f=(15&o)<<12|(63&u)<<6|63&c,f>2047&&(f<55296||f>57343)&&(s=f));break;case 4:u=t[i+1],c=t[i+2],l=t[i+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(f=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l,f>65535&&f<1114112&&(s=f))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=a}return R(r)}function R(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var n="",r=0;rr)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,n,r,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function j(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function B(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function q(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(t,e,n,r,i){return i||q(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),H.write(t,e,n,r,23,4),n+4}function F(t,e,n,r,i){return i||q(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),H.write(t,e,n,r,52,8),n+8}function $(t){if(t=V(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function Y(t){return t<16?"0"+t.toString(16):t.toString(16)}function K(t,e){e=e||1/0;for(var n,r=t.length,i=null,o=[],s=0;s55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function G(t){for(var e=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function J(t){return X.toByteArray($(t))}function W(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function Q(t){return t!==t}var X=n(12),H=n(14),Z=n(15);e.Buffer=s,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:r(),e.kMaxLength=i(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,e,n){return a(null,t,e,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,e,n){return c(null,t,e,n)},s.allocUnsafe=function(t){return l(null,t)},s.allocUnsafeSlow=function(t){return l(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},s.prototype.compare=function(t,e,n,r,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var o=i-r,a=n-e,u=Math.min(o,a),c=this.slice(r,i),l=t.slice(e,n),f=0;fi)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return E(this,t,e,n);case"utf8":case"utf-8":return I(this,t,e,n);case"ascii":return S(this,t,e,n);case"latin1":case"binary":return A(this,t,e,n);case"base64":return T(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;s.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e0&&(i*=256);)r+=this[t+--e]*i;return r},s.prototype.readUInt8=function(t,e){return e||D(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||D(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||D(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=this[t],i=1,o=0;++o=i&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||D(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return e||D(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},s.prototype.readInt16LE=function(t,e){e||D(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){e||D(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||D(t,4,this.length),H.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||D(t,4,this.length),H.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||D(t,8,this.length),H.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||D(t,8,this.length),H.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;M(this,t,e,n,i,0)}var o=1,s=0;for(this[e]=255&t;++s=0&&(s*=256);)this[e+o]=t/s&255;return e+n},s.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):B(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);M(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);M(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):j(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):j(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):B(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):B(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,n){return L(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return L(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return F(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return F(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0);var o;if("number"==typeof t)for(o=e;o>1,l=-7,f=n?i-1:0,p=n?-1:1,d=t[e+f];for(f+=p,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=p,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+t[e+f],f+=p,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:(d?-1:1)*(1/0);s+=Math.pow(2,r),o-=c}return(d?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,l=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,h=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+f>=1?p/u:p*Math.pow(2,1-f),e*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+d]=255&a,d+=h,a/=256,i-=8);for(s=s<0;t[n+d]=255&s,d+=h,s/=256,c-=8);t[n+d-h]|=128*g}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}}]); window.UI_APP = Object.assign((window.UI_APP || {}), {"scheduler":{"key":"class","book":"reserve","booked":"reserved","waitlist":"join waitlist","closed":"class is closed","pick":"pick a spot","full":"class is full"},"location":{"key":"studio"},"brand_name":"BFT","brand_key":"bft","apiNameKey":"bft","freeSpotsThreshold":5,"environment":{"development":{"apiBaseURL":"https://bft.xpodev.com/api","membersURL":"https://members.bodyfittraining.com"},"staging":{"apiBaseURL":"https://members.bodyfittraining.com/api","membersURL":"https://members.bodyfittraining.com"},"production":{"apiBaseURL":"https://members.bodyfittraining.com/api","membersURL":"https://members.bodyfittraining.com"}},"apiBaseURL":"https://members.bodyfittraining.com/api","membersURL":"https://members.bodyfittraining.com","marketingBaseURL":"https://bodyfittraining.com","cdn":"https://cdn2.hubspot.net/hubfs/21614986","mapbox_api":"pk.eyJ1IjoiaHlmbiIsImEiOiJjanBjZTMwZjMwYTExM3BwbG96MW13dnYyIn0.rc7JKj94HXi9n6fWyHOCxg","mapbox_config":{"style":"mapbox://styles/mapbox/light-v10","cluster_bg_color":"#03b1c7","cluster_text_color":"#ffffff","pin":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFYAAAB3CAYAAACZprdkAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAjUSURBVHgB7Z1dUhtHEIC7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