!function(){var e={8679:function(e,t,n){"use strict";var r=n(1296),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?a:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=d(n);o&&o!==h&&e(t,o,r)}var a=c(n);f&&(a=a.concat(f(n)));for(var l=s(t),m=s(n),g=0;g0&&(t[n]=e)})),t},R.truncate=function(e,t){var n;return"string"==typeof e?n=e.slice(0,t):R.isArray(e)?(n=[],R.each(e,(function(e){n.push(R.truncate(e,t))}))):R.isObject(e)?(n={},R.each(e,(function(e,r){n[r]=R.truncate(e,t)}))):n=e,n},R.JSONEncode=function(e){var t=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,(function(e){var t=n[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'},n=function(e,r){var o="",i=0,a="",l="",s=0,u=o,c=[],f=r[e];switch(f&&"object"==typeof f&&"function"==typeof f.toJSON&&(f=f.toJSON(e)),typeof f){case"string":return t(f);case"number":return isFinite(f)?String(f):"null";case"boolean":case"null":return String(f);case"object":if(!f)return"null";if(o+=" ",c=[],"[object Array]"===_.apply(f)){for(s=f.length,i=0;i="0"&&i<="9";)t+=i,c();if("."===i)for(t+=".";c()&&i>="0"&&i<="9";)t+=i;if("e"===i||"E"===i)for(t+=i,c(),"-"!==i&&"+"!==i||(t+=i,c());i>="0"&&i<="9";)t+=i,c();if(e=+t,isFinite(e))return e;u("Bad number")},p=function(){var e,t,n,r="";if('"'===i)for(;c();){if('"'===i)return c(),r;if("\\"===i)if(c(),"u"===i){for(n=0,t=0;t<4&&(e=parseInt(c(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof s[i])break;r+=s[i]}else r+=i}u("Bad string")},d=function(){for(;i&&i<=" ";)c()},l=function(){switch(d(),i){case"{":return function(){var e,t={};if("{"===i){if(c("{"),d(),"}"===i)return c("}"),t;for(;i;){if(e=p(),d(),c(":"),Object.hasOwnProperty.call(t,e)&&u('Duplicate key "'+e+'"'),t[e]=l(),d(),"}"===i)return c("}"),t;c(","),d()}}u("Bad object")}();case"[":return function(){var e=[];if("["===i){if(c("["),d(),"]"===i)return c("]"),e;for(;i;){if(e.push(l()),d(),"]"===i)return c("]"),e;c(","),d()}}u("Bad array")}();case'"':return p();case"-":return f();default:return i>="0"&&i<="9"?f():function(){switch(i){case"t":return c("t"),c("r"),c("u"),c("e"),!0;case"f":return c("f"),c("a"),c("l"),c("s"),c("e"),!1;case"n":return c("n"),c("u"),c("l"),c("l"),null}u('Unexpected "'+i+'"')}()}},function(e){var t;return a=e,o=0,i=" ",t=l(),d(),i&&u("Syntax error"),t}),R.base64Encode=function(e){var t,n,r,o,i,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=0,s=0,u="",c=[];if(!e)return e;e=R.utf8Encode(e);do{t=(i=e.charCodeAt(l++)<<16|e.charCodeAt(l++)<<8|e.charCodeAt(l++))>>18&63,n=i>>12&63,r=i>>6&63,o=63&i,c[s++]=a.charAt(t)+a.charAt(n)+a.charAt(r)+a.charAt(o)}while(l127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),null!==l&&(n>t&&(i+=e.substring(t,n)),i+=l,t=n=o+1)}return n>t&&(i+=e.substring(t,e.length)),i},R.UUID=(h=function(){var e,n=1*new Date;if(t.performance&&t.performance.now)e=t.performance.now();else for(e=0;n==1*new Date;)e++;return n.toString(16)+Math.floor(e).toString(16)},function(){var e=(E.height*E.width).toString(16);return h()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var e,t,n=C,r=[],o=0;function i(e,t){var n,o=0;for(n=0;n=4&&(o=i(o,r),r=[]);return r.length>0&&(o=i(o,r)),o.toString(16)}()+"-"+e+"-"+h()});var M=["ahrefsbot","baiduspider","bingbot","bingpreview","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];R.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t=0}function r(t){if(!S.getElementsByTagName)return[];var r,o,i,a,l,s,u,c,f,p,d=t.split(" "),h=[S];for(s=0;s-1){i=(o=r.split("#"))[0];var m=o[1],g=S.getElementById(m);if(!g||i&&g.nodeName.toLowerCase()!=i)return[];h=[g]}else if(r.indexOf(".")>-1){i=(o=r.split("."))[0];var y=o[1];for(i||(i="*"),a=[],l=0,u=0;u-1};break;default:_=function(e){return e.getAttribute(b)}}for(h=[],p=0,u=0;u=3?t[2]:""},properties:function(){return R.extend(R.strip_empty_properties({$os:R.info.os(),$browser:R.info.browser(C,w.vendor,x),$referrer:S.referrer,$referring_domain:R.info.referringDomain(S.referrer),$device:R.info.device(C)}),{$current_url:t.location.href,$browser_version:R.info.browserVersion(C,w.vendor,x),$screen_height:E.height,$screen_width:E.width,mp_lib:"web",$lib_version:n.LIB_VERSION,$insert_id:B(),time:R.timestamp()/1e3})},people_properties:function(){return R.extend(R.strip_empty_properties({$os:R.info.os(),$browser:R.info.browser(C,w.vendor,x)}),{$browser_version:R.info.browserVersion(C,w.vendor,x)})},mpPageViewProperties:function(){return R.strip_empty_properties({current_page_title:S.title,current_domain:t.location.hostname,current_url_path:t.location.pathname,current_url_protocol:t.location.protocol,current_url_search:t.location.search})}};var B=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},H=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,W=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,V=function(e){var t=W,n=e.split("."),r=n[n.length-1];(r.length>4||"com"===r||"org"===r)&&(t=H);var o=e.match(t);return o?o[0]:""},Q=null,K=null;"undefined"!=typeof JSON&&(Q=JSON.stringify,K=JSON.parse),Q=Q||R.JSONEncode,K=K||R.JSONDecode,R.toArray=R.toArray,R.isObject=R.isObject,R.JSONEncode=R.JSONEncode,R.JSONDecode=R.JSONDecode,R.isBlockedUA=R.isBlockedUA,R.isEmptyObject=R.isEmptyObject,R.info=R.info,R.info.device=R.info.device,R.info.browser=R.info.browser,R.info.browserVersion=R.info.browserVersion,R.info.properties=R.info.properties;var G=function(){};G.prototype.create_properties=function(){},G.prototype.event_handler=function(){},G.prototype.after_track_handler=function(){},G.prototype.init=function(e){return this.mp=e,this},G.prototype.track=function(e,t,n,r){var o=this,i=R.dom_query(e);if(0!==i.length)return R.each(i,(function(e){R.register_event(e,this.override_event,(function(e){var i={},a=o.create_properties(n,this),l=o.mp.get_config("track_links_timeout");o.event_handler(e,this,i),window.setTimeout(o.track_callback(r,a,i,!0),l),o.mp.track(t,a,o.track_callback(r,a,i))}))}),this),!0;z.error("The DOM query ("+e+") returned 0 elements")},G.prototype.track_callback=function(e,t,n,r){r=r||!1;var o=this;return function(){n.callback_fired||(n.callback_fired=!0,e&&!1===e(r,t)||o.after_track_handler(t,n,r))}},G.prototype.create_properties=function(e,t){return"function"==typeof e?e(t):R.extend({},e)};var Y=function(){this.override_event="click"};R.inherit(Y,G),Y.prototype.create_properties=function(e,t){var n=Y.superclass.create_properties.apply(this,arguments);return t.href&&(n.url=t.href),n},Y.prototype.event_handler=function(e,t,n){n.new_tab=2===e.which||e.metaKey||e.ctrlKey||"_blank"===t.target,n.href=t.href,n.new_tab||e.preventDefault()},Y.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout((function(){window.location=t.href}),0)};var X=function(){this.override_event="submit"};R.inherit(X,G),X.prototype.event_handler=function(e,t,n){n.element=t,e.preventDefault()},X.prototype.after_track_handler=function(e,t){setTimeout((function(){t.element.submit()}),0)};var J=D("lock"),Z=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3};Z.prototype.withLock=function(e,t,n){n||"function"==typeof t||(n=t,t=null);var r=n||(new Date).getTime()+"|"+Math.random(),o=(new Date).getTime(),i=this.storageKey,a=this.pollIntervalMS,l=this.timeoutMS,s=this.storage,u=i+":X",c=i+":Y",f=i+":Z",p=function(e){t&&t(e)},d=function(e){if((new Date).getTime()-o>l)return J.error("Timeout waiting for mutex on "+i+"; clearing lock. ["+r+"]"),s.removeItem(f),s.removeItem(c),void g();setTimeout((function(){try{e()}catch(e){p(e)}}),a*(Math.random()+.1))},h=function(e,t){e()?t():d((function(){h(e,t)}))},m=function(){var e=s.getItem(c);if(e&&e!==r)return!1;if(s.setItem(c,r),s.getItem(c)===r)return!0;if(!F(s,!0))throw new Error("localStorage support dropped while acquiring lock");return!1},g=function(){s.setItem(u,r),h(m,(function(){s.getItem(u)!==r?d((function(){s.getItem(c)===r?h((function(){return!s.getItem(f)}),y):g()})):y()}))},y=function(){s.setItem(f,"1");try{e()}finally{s.removeItem(f),s.getItem(c)===r&&s.removeItem(c),s.getItem(u)===r&&s.removeItem(u)}};try{if(!F(s,!0))throw new Error("localStorage support check failed");g()}catch(e){p(e)}};var ee=D("batch"),te=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.reportError=t.errorReporter||R.bind(ee.error,ee),this.lock=new Z(e,{storage:this.storage}),this.pid=t.pid||null,this.memQueue=[]};te.prototype.enqueue=function(e,t,n){var r={id:B(),flushAfter:(new Date).getTime()+2*t,payload:e};this.lock.withLock(R.bind((function(){var t;try{var o=this.readFromStorage();o.push(r),(t=this.saveToStorage(o))&&this.memQueue.push(r)}catch(n){this.reportError("Error enqueueing item",e),t=!1}n&&n(t)}),this),R.bind((function(e){this.reportError("Error acquiring storage lock",e),n&&n(!1)}),this),this.pid)},te.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);if(t.lengthi.flushAfter&&!r[i.id]&&(i.orphaned=!0,t.push(i),t.length>=e))break}}}return t};var ne=function(e,t){var n=[];return R.each(e,(function(e){e.id&&!t[e.id]&&n.push(e)})),n};te.prototype.removeItemsByID=function(e,t){var n={};R.each(e,(function(e){n[e]=!0})),this.memQueue=ne(this.memQueue,n);var r=R.bind((function(){var t;try{var r=this.readFromStorage();if(r=ne(r,n),t=this.saveToStorage(r)){r=this.readFromStorage();for(var o=0;o5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:e,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[o]}),r=!1):this.reportError("[dupe] found item with no ID",{item:e}),r&&a.push(t)}l[e.id]=t}),this),a.length<1)return void this.resetFlush();this.requestInProgress=!0;var s=R.bind((function(n){this.requestInProgress=!1;try{var a=!1;if(e.unloading)this.queue.updatePayloads(l);else if(R.isObject(n)&&"timeout"===n.error&&(new Date).getTime()-r>=t)this.reportError("Network timeout; retrying"),this.flush();else if(R.isObject(n)&&n.xhr_req&&(n.xhr_req.status>=500||429===n.xhr_req.status||"timeout"===n.error)){var s=2*this.flushInterval,u=n.xhr_req.responseHeaders;if(u){var c=u["Retry-After"];c&&(s=1e3*parseInt(c,10)||s)}s=Math.min(6e5,s),this.reportError("Error; retry in "+s+" ms"),this.scheduleFlush(s)}else if(R.isObject(n)&&n.xhr_req&&413===n.xhr_req.status)if(i.length>1){var f=Math.max(1,Math.floor(o/2));this.batchSize=Math.min(this.batchSize,f,i.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush()}else this.reportError("Single-event request too large; dropping",i),this.resetBatchSize(),a=!0;else a=!0;a&&(this.queue.removeItemsByID(R.map(i,(function(e){return e.id})),R.bind((function(e){e?(this.consecutiveRemovalFailures=0,this.flush()):(this.reportError("Failed to remove items from queue"),++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush())}),this)),R.each(i,R.bind((function(e){var t=e.id;t?(this.itemIdsSentSuccessfully[t]=this.itemIdsSentSuccessfully[t]||0,this.itemIdsSentSuccessfully[t]++,this.itemIdsSentSuccessfully[t]>5&&this.reportError("[dupe] item ID sent too many times",{item:e,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[t]})):this.reportError("[dupe] found item with no ID while removing",{item:e})}),this)))}catch(e){this.reportError("Error handling API response",e),this.resetFlush()}}),this),u={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};e.unloading&&(u.transport="sendBeacon"),oe.log("MIXPANEL REQUEST:",a),this.sendRequest(a,u,s)}catch(e){this.reportError("Error flushing request queue",e),this.resetFlush()}},ie.prototype.reportError=function(e,t){if(oe.error.apply(oe.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(t){oe.error(t)}};var ae="__mp_opt_in_out_";function le(e,t){ve(!0,e,t)}function se(e,t){ve(!1,e,t)}function ue(e,t){return"1"===ye(e,t)}function ce(e,n){if(function(e){if(e&&e.ignoreDnt)return!1;var n=e&&e.window||t,r=n.navigator||{},o=!1;return R.each([r.doNotTrack,r.msDoNotTrack,n.doNotTrack],(function(e){R.includes([!0,1,"1","yes"],e)&&(o=!0)})),o}(n))return z.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var r="0"===ye(e,n);return r&&z.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),r}function fe(e){return _e(e,(function(e){return this.get_config(e)}))}function pe(e){return _e(e,(function(e){return this._get_config(e)}))}function de(e){return _e(e,(function(e){return this._get_config(e)}))}function he(e,t){me(t=t||{}).remove(ge(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function me(e){return"localStorage"===(e=e||{}).persistenceType?R.localStorage:R.cookie}function ge(e,t){return((t=t||{}).persistencePrefix||ae)+e}function ye(e,t){return me(t).get(ge(e,t))}function ve(e,t,n){R.isString(t)&&t.length?(me(n=n||{}).set(ge(t,n),e?1:0,R.isNumber(n.cookieExpiration)?n.cookieExpiration:null,!!n.crossSubdomainCookie,!!n.secureCookie,!!n.crossSiteCookie,n.cookieDomain),n.track&&e&&n.track(n.trackEventName||"$opt_in",n.trackProperties,{send_immediately:!0})):z.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function _e(e,t){return function(){var n=!1;try{var r=t.call(this,"token"),o=t.call(this,"ignore_dnt"),i=t.call(this,"opt_out_tracking_persistence_type"),a=t.call(this,"opt_out_tracking_cookie_prefix"),l=t.call(this,"window");r&&(n=ce(r,{ignoreDnt:o,persistenceType:i,persistencePrefix:a,window:l}))}catch(e){z.error("Unexpected error when checking tracking opt-out status: "+e)}if(!n)return e.apply(this,arguments);var s=arguments[arguments.length-1];"function"==typeof s&&s(0)}}var be="$set",ke="$set_once",we="$unset",Se="$add",xe="$append",Ee="$union",Ce="$remove",Pe={set_action:function(e,t){var n={},r={};return R.isObject(e)?R.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,n[be]=r,n},unset_action:function(e){var t={},n=[];return R.isArray(e)||(e=[e]),R.each(e,(function(e){this._is_reserved_property(e)||n.push(e)}),this),t[we]=n,t},set_once_action:function(e,t){var n={},r={};return R.isObject(e)?R.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,n[ke]=r,n},union_action:function(e,t){var n={},r={};return R.isObject(e)?R.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=R.isArray(e)?e:[e])}),this):r[e]=R.isArray(t)?t:[t],n[Ee]=r,n},append_action:function(e,t){var n={},r={};return R.isObject(e)?R.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,n[xe]=r,n},remove_action:function(e,t){var n={},r={};return R.isObject(e)?R.each(e,(function(e,t){this._is_reserved_property(t)||(r[t]=e)}),this):r[e]=t,n[Ce]=r,n},delete_action:function(){var e={$delete:""};return e}},Oe=function(){};R.extend(Oe.prototype,Pe),Oe.prototype._init=function(e,t,n){this._mixpanel=e,this._group_key=t,this._group_id=n},Oe.prototype.set=de((function(e,t,n){var r=this.set_action(e,t);return R.isObject(e)&&(n=t),this._send_request(r,n)})),Oe.prototype.set_once=de((function(e,t,n){var r=this.set_once_action(e,t);return R.isObject(e)&&(n=t),this._send_request(r,n)})),Oe.prototype.unset=de((function(e,t){var n=this.unset_action(e);return this._send_request(n,t)})),Oe.prototype.union=de((function(e,t,n){R.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)})),Oe.prototype.delete=de((function(e){var t=this.delete_action();return this._send_request(t,e)})),Oe.prototype.remove=de((function(e,t,n){var r=this.remove_action(e,t);return this._send_request(r,n)})),Oe.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var n=R.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:n,endpoint:this._get_config("api_host")+"/groups/",batcher:this._mixpanel.request_batchers.groups},t)},Oe.prototype._is_reserved_property=function(e){return"$group_key"===e||"$group_id"===e},Oe.prototype._get_config=function(e){return this._mixpanel.get_config(e)},Oe.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},Oe.prototype.remove=Oe.prototype.remove,Oe.prototype.set=Oe.prototype.set,Oe.prototype.set_once=Oe.prototype.set_once,Oe.prototype.union=Oe.prototype.union,Oe.prototype.unset=Oe.prototype.unset,Oe.prototype.toString=Oe.prototype.toString;var Te=function(){};R.extend(Te.prototype,Pe),Te.prototype._init=function(e){this._mixpanel=e},Te.prototype.set=pe((function(e,t,n){var r=this.set_action(e,t);return R.isObject(e)&&(n=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),r[be]=R.extend({},R.info.people_properties(),this._mixpanel.persistence.get_referrer_info(),r[be]),this._send_request(r,n)})),Te.prototype.set_once=pe((function(e,t,n){var r=this.set_once_action(e,t);return R.isObject(e)&&(n=t),this._send_request(r,n)})),Te.prototype.unset=pe((function(e,t){var n=this.unset_action(e);return this._send_request(n,t)})),Te.prototype.increment=pe((function(e,t,n){var r={},o={};return R.isObject(e)?(R.each(e,(function(e,t){if(!this._is_reserved_property(t)){if(isNaN(parseFloat(e)))return void z.error("Invalid increment value passed to mixpanel.people.increment - must be a number");o[t]=e}}),this),n=t):(R.isUndefined(t)&&(t=1),o[e]=t),r[Se]=o,this._send_request(r,n)})),Te.prototype.append=pe((function(e,t,n){R.isObject(e)&&(n=t);var r=this.append_action(e,t);return this._send_request(r,n)})),Te.prototype.remove=pe((function(e,t,n){R.isObject(e)&&(n=t);var r=this.remove_action(e,t);return this._send_request(r,n)})),Te.prototype.union=pe((function(e,t,n){R.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)})),Te.prototype.track_charge=pe((function(e,t,n){if(R.isNumber(e)||(e=parseFloat(e),!isNaN(e)))return this.append("$transactions",R.extend({$amount:e},t),n);z.error("Invalid value passed to mixpanel.people.track_charge - must be a number")})),Te.prototype.clear_charges=function(e){return this.set("$transactions",[],e)},Te.prototype.delete_user=function(){if(this._identify_called()){var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)}z.error("mixpanel.people.delete_user() requires you to call identify() first")},Te.prototype.toString=function(){return this._mixpanel.toString()+".people"},Te.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var n=this._mixpanel.get_property("$device_id"),r=this._mixpanel.get_property("$user_id"),o=this._mixpanel.get_property("$had_persisted_distinct_id");n&&(e.$device_id=n),r&&(e.$user_id=r),o&&(e.$had_persisted_distinct_id=o);var i=R.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:i,endpoint:this._get_config("api_host")+"/engage/",batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),R.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),R.truncate(i,255))},Te.prototype._get_config=function(e){return this._mixpanel.get_config(e)},Te.prototype._identify_called=function(){return!0===this._mixpanel._flags.identify_called},Te.prototype._enqueue=function(e){be in e?this._mixpanel.persistence._add_to_people_queue(be,e):ke in e?this._mixpanel.persistence._add_to_people_queue(ke,e):we in e?this._mixpanel.persistence._add_to_people_queue(we,e):Se in e?this._mixpanel.persistence._add_to_people_queue(Se,e):xe in e?this._mixpanel.persistence._add_to_people_queue(xe,e):Ce in e?this._mixpanel.persistence._add_to_people_queue(Ce,e):Ee in e?this._mixpanel.persistence._add_to_people_queue(Ee,e):z.error("Invalid call to _enqueue():",e)},Te.prototype._flush_one_queue=function(e,t,n,r){var o=this,i=R.extend({},this._mixpanel.persistence._get_queue(e)),a=i;R.isUndefined(i)||!R.isObject(i)||R.isEmptyObject(i)||(o._mixpanel.persistence._pop_from_people_queue(e,i),r&&(a=r(i)),t.call(o,a,(function(t,r){0===t&&o._mixpanel.persistence._add_to_people_queue(e,i),R.isUndefined(n)||n(t,r)})))},Te.prototype._flush=function(e,t,n,r,o,i,a){var l=this,s=this._mixpanel.persistence._get_queue(xe),u=this._mixpanel.persistence._get_queue(Ce);if(this._flush_one_queue(be,this.set,e),this._flush_one_queue(ke,this.set_once,r),this._flush_one_queue(we,this.unset,i,(function(e){return R.keys(e)})),this._flush_one_queue(Se,this.increment,t),this._flush_one_queue(Ee,this.union,o),!R.isUndefined(s)&&R.isArray(s)&&s.length){for(var c,f=function(e,t){0===e&&l._mixpanel.persistence._add_to_people_queue(xe,c),R.isUndefined(n)||n(e,t)},p=s.length-1;p>=0;p--)c=s.pop(),R.isEmptyObject(c)||l.append(c,f);l._mixpanel.persistence.save()}if(!R.isUndefined(u)&&R.isArray(u)&&u.length){for(var d,h=function(e,t){0===e&&l._mixpanel.persistence._add_to_people_queue(Ce,d),R.isUndefined(a)||a(e,t)},m=u.length-1;m>=0;m--)d=u.pop(),R.isEmptyObject(d)||l.remove(d,h);l._mixpanel.persistence.save()}},Te.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},Te.prototype.set=Te.prototype.set,Te.prototype.set_once=Te.prototype.set_once,Te.prototype.unset=Te.prototype.unset,Te.prototype.increment=Te.prototype.increment,Te.prototype.append=Te.prototype.append,Te.prototype.remove=Te.prototype.remove,Te.prototype.union=Te.prototype.union,Te.prototype.track_charge=Te.prototype.track_charge,Te.prototype.clear_charges=Te.prototype.clear_charges,Te.prototype.delete_user=Te.prototype.delete_user,Te.prototype.toString=Te.prototype.toString;var Ne,Ie,Ae="__mps",Re="__mpso",ze="__mpus",Le="__mpa",De="__mpap",Me="__mpr",je="__mpu",Fe="$people_distinct_id",$e="__alias",Ue="__timers",qe=[Ae,Re,ze,Le,De,Me,je,Fe,$e,Ue],Be=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;"cookie"!==t&&"localStorage"!==t&&(z.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),"localStorage"===t&&R.localStorage.is_supported()?this.storage=R.localStorage:this.storage=R.cookie,this.load(),this.update_config(e),this.upgrade(e),this.save()};Be.prototype.properties=function(){var e={};return R.each(this.props,(function(t,n){R.include(qe,n)||(e[n]=t)})),e},Be.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=R.extend({},e))}},Be.prototype.upgrade=function(e){var t,n,r=e.upgrade;r&&(t="mp_super_properties","string"==typeof r&&(t=r),n=this.storage.parse(t),this.storage.remove(t),this.storage.remove(t,!0),n&&(this.props=R.extend(this.props,n.all,n.events))),e.cookie_name||"mixpanel"===e.name||(t="mp_"+e.token+"_"+e.name,(n=this.storage.parse(t))&&(this.storage.remove(t),this.storage.remove(t,!0),this.register_once(n))),this.storage===R.localStorage&&(n=R.cookie.parse(this.name),R.cookie.remove(this.name),R.cookie.remove(this.name,!0),n&&this.register_once(n))},Be.prototype.save=function(){this.disabled||this.storage.set(this.name,R.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},Be.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},Be.prototype.clear=function(){this.remove(),this.props={}},Be.prototype.register_once=function(e,t,n){return!!R.isObject(e)&&(void 0===t&&(t="None"),this.expire_days=void 0===n?this.default_expiry:n,R.each(e,(function(e,n){this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.props[n]=e)}),this),this.save(),!0)},Be.prototype.register=function(e,t){return!!R.isObject(e)&&(this.expire_days=void 0===t?this.default_expiry:t,R.extend(this.props,e),this.save(),!0)},Be.prototype.unregister=function(e){e in this.props&&(delete this.props[e],this.save())},Be.prototype.update_search_keyword=function(e){this.register(R.info.searchInfo(e))},Be.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:R.info.referringDomain(e)||"$direct"},"")},Be.prototype.get_referrer_info=function(){return R.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},Be.prototype.safe_merge=function(e){return R.each(this.props,(function(t,n){n in e||(e[n]=t)})),e},Be.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},Be.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},Be.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},Be.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},Be.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},Be.prototype.get_cross_subdomain=function(){return this.cross_subdomain},Be.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},Be.prototype._add_to_people_queue=function(e,t){var n=this._get_queue_key(e),r=t[e],o=this._get_or_create_queue(be),i=this._get_or_create_queue(ke),a=this._get_or_create_queue(we),l=this._get_or_create_queue(Se),s=this._get_or_create_queue(Ee),u=this._get_or_create_queue(Ce,[]),c=this._get_or_create_queue(xe,[]);n===Ae?(R.extend(o,r),this._pop_from_people_queue(Se,r),this._pop_from_people_queue(Ee,r),this._pop_from_people_queue(we,r)):n===Re?(R.each(r,(function(e,t){t in i||(i[t]=e)})),this._pop_from_people_queue(we,r)):n===ze?R.each(r,(function(e){R.each([o,i,l,s],(function(t){e in t&&delete t[e]})),R.each(c,(function(t){e in t&&delete t[e]})),a[e]=!0})):n===Le?(R.each(r,(function(e,t){t in o?o[t]+=e:(t in l||(l[t]=0),l[t]+=e)}),this),this._pop_from_people_queue(we,r)):n===je?(R.each(r,(function(e,t){R.isArray(e)&&(t in s||(s[t]=[]),s[t]=s[t].concat(e))})),this._pop_from_people_queue(we,r)):n===Me?(u.push(r),this._pop_from_people_queue(xe,r)):n===De&&(c.push(r),this._pop_from_people_queue(we,r)),z.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),z.log(t),this.save()},Be.prototype._pop_from_people_queue=function(e,t){var n=this._get_queue(e);R.isUndefined(n)||(R.each(t,(function(t,r){e===xe||e===Ce?R.each(n,(function(e){e[r]===t&&delete e[r]})):delete n[r]}),this),this.save())},Be.prototype._get_queue_key=function(e){return e===be?Ae:e===ke?Re:e===we?ze:e===Se?Le:e===xe?De:e===Ce?Me:e===Ee?je:void z.error("Invalid queue:",e)},Be.prototype._get_queue=function(e){return this.props[this._get_queue_key(e)]},Be.prototype._get_or_create_queue=function(e,t){var n=this._get_queue_key(e);return t=R.isUndefined(t)?{}:t,this.props[n]||(this.props[n]=t)},Be.prototype.set_event_timer=function(e,t){var n=this.props[Ue]||{};n[e]=t,this.props[Ue]=n,this.save()},Be.prototype.remove_event_timer=function(e){var t=(this.props[Ue]||{})[e];return R.isUndefined(t)||(delete this.props[Ue][e],this.save()),t};var He=function(e){return e},We=function(){},Ve="mixpanel",Qe="base64",Ke="$device:",Ge=t.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,Ye=!Ge&&-1===C.indexOf("MSIE")&&-1===C.indexOf("Mozilla"),Xe=null;w.sendBeacon&&(Xe=function(){return w.sendBeacon.apply(w,arguments)});var Je={api_host:"https://api-js.mixpanel.com",api_method:"POST",api_transport:"XHR",api_payload_format:Qe,app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:We,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:We,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{}},Ze=!1,et=function(){},tt=function(e,t,r){var o,i=r===Ve?Ie:Ie[r];if(i&&0===Ne)o=i;else{if(i&&!R.isArray(i))return void z.error("You have already initialized "+r);o=new et}if(o._cached_groups={},o._init(e,t,r),o.people=new Te,o.people._init(o),!o.get_config("skip_first_touch_marketing")){var a=R.info.campaignParams(null),l={},s=!1;R.each(a,(function(e,t){l["initial_"+t]=e,e&&(s=!0)})),s&&o.people.set_once(l)}return n.DEBUG=n.DEBUG||o.get_config("debug"),!R.isUndefined(i)&&R.isArray(i)&&(o._execute_array.call(o.people,i.people),o._execute_array(i)),o};et.prototype.init=function(e,t,n){if(R.isUndefined(n))this.report_error("You must name your new library: init(token, config, name)");else{if(n!==Ve){var r=tt(e,t,n);return Ie[n]=r,r._loaded(),r}this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet")}},et.prototype._init=function(e,n,r){n=n||{},this.__loaded=!0,this.config={};var o={};"api_payload_format"in n||(n.api_host||Je.api_host).match(/\.mixpanel\.com/)&&(o.api_payload_format="json");if(this.set_config(R.extend({},Je,o,n,{name:r,token:e,callback_fn:(r===Ve?r:Ve+"."+r)+"._jsc"})),this._jsc=We,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests)if(R.localStorage.is_supported(!0)&&Ge){if(this.init_batchers(),Xe&&t.addEventListener){var i=R.bind((function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})}),this);t.addEventListener("pagehide",(function(e){e.persisted&&i()})),t.addEventListener("visibilitychange",(function(){"hidden"===S.visibilityState&&i()}))}}else this._batch_requests=!1,z.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support");this.persistence=this.cookie=new Be(this.config),this.unpersisted_superprops={},this._gdpr_init();var a=R.UUID();this.get_distinct_id()||this.register_once({distinct_id:Ke+a,$device_id:a},""),this.get_config("track_pageview")&&this.track_pageview()},et.prototype._loaded=function(){this.get_config("loaded")(this),this._set_default_superprops()},et.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(S.referrer),this.get_config("store_google")&&this.register(R.info.campaignParams(),{persistent:!1}),this.get_config("save_referrer")&&this.persistence.update_referrer_info(S.referrer)},et.prototype._dom_loaded=function(){R.each(this.__dom_loaded_queue,(function(e){this._track_dom.apply(this,e)}),this),this.has_opted_out_tracking()||R.each(this.__request_queue,(function(e){this._send_request.apply(this,e)}),this),delete this.__dom_loaded_queue,delete this.__request_queue},et.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!Ze)return this.__dom_loaded_queue.push([e,t]),!1;var n=(new e).init(this);return n.track.apply(n,t)},et.prototype._prepare_callback=function(e,t){if(R.isUndefined(e))return null;if(Ge){return function(n){e(n,t)}}var n=this._jsc,r=""+Math.floor(1e8*Math.random()),o=this.get_config("callback_fn")+"["+r+"]";return n[r]=function(o){delete n[r],e(o,t)},o},et.prototype._send_request=function(e,t,n,r){var o=!0;if(Ye)return this.__request_queue.push(arguments),o;var i={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},a=null;r||!R.isFunction(n)&&"string"!=typeof n||(r=n,n=null),n=R.extend(i,n||{}),Ge||(n.method="GET");var l="POST"===n.method,s=Xe&&l&&"sendbeacon"===n.transport.toLowerCase(),u=n.verbose;t.verbose&&(u=!0),this.get_config("test")&&(t.test=1),u&&(t.verbose=1),this.get_config("img")&&(t.img=1),Ge||(r?t.callback=r:(u||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=(new Date).getTime().toString(),l&&(a="data="+encodeURIComponent(t.data),delete t.data),e+="?"+R.HTTPBuildQuery(t);var c=this;if("img"in t){var f=S.createElement("img");f.src=e,S.body.appendChild(f)}else if(s){try{o=Xe(e,a)}catch(e){c.report_error(e),o=!1}try{r&&r(o?1:0)}catch(e){c.report_error(e)}}else if(Ge)try{var p=new XMLHttpRequest;p.open(n.method,e,!0);var d=this.get_config("xhr_headers");if(l&&(d["Content-Type"]="application/x-www-form-urlencoded"),R.each(d,(function(e,t){p.setRequestHeader(t,e)})),n.timeout_ms&&void 0!==p.timeout){p.timeout=n.timeout_ms;var h=(new Date).getTime()}p.withCredentials=!0,p.onreadystatechange=function(){var e;if(4===p.readyState)if(200===p.status){if(r)if(u){var t;try{t=R.JSONDecode(p.responseText)}catch(e){if(c.report_error(e),!n.ignore_json_errors)return;t=p.responseText}r(t)}else r(Number(p.responseText))}else e=p.timeout&&!p.status&&(new Date).getTime()-h>=p.timeout?"timeout":"Bad HTTP status: "+p.status+" "+p.statusText,c.report_error(e),r&&r(u?{status:0,error:e,xhr_req:p}:0)},p.send(a)}catch(e){c.report_error(e),o=!1}else{var m=S.createElement("script");m.type="text/javascript",m.async=!0,m.defer=!0,m.src=e;var g=S.getElementsByTagName("script")[0];g.parentNode.insertBefore(m,g)}return o},et.prototype._execute_array=function(e){var t,n=[],r=[],o=[];R.each(e,(function(e){e&&(t=e[0],R.isArray(t)?o.push(e):"function"==typeof e?e.call(this):R.isArray(e)&&"alias"===t?n.push(e):R.isArray(e)&&-1!==t.indexOf("track")&&"function"==typeof this[t]?o.push(e):r.push(e))}),this);var i=function(e,t){R.each(e,(function(e){if(R.isArray(e[0])){var n=t;R.each(e,(function(e){n=n[e[0]].apply(n,e.slice(1))}))}else this[e[0]].apply(this,e.slice(1))}),t)};i(n,this),i(r,this),i(o,this)},et.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},et.prototype.init_batchers=function(){var e=this.get_config("token");if(!this.are_batchers_initialized()){var t=R.bind((function(t){return new ie("__mpq_"+e+t.queue_suffix,{libConfig:this.config,sendRequestFunc:R.bind((function(e,n,r){this._send_request(this.get_config("api_host")+t.endpoint,this._encode_data_for_request(e),n,this._prepare_callback(r,e))}),this),beforeSendHook:R.bind((function(e){return this._run_hook("before_send_"+t.type,e)}),this),errorReporter:this.get_config("error_reporter"),stopAllBatchingFunc:R.bind(this.stop_batch_senders,this)})}),this);this.request_batchers={events:t({type:"events",endpoint:"/track/",queue_suffix:"_ev"}),people:t({type:"people",endpoint:"/engage/",queue_suffix:"_pp"}),groups:t({type:"groups",endpoint:"/groups/",queue_suffix:"_gr"})}}this.get_config("batch_autostart")&&this.start_batch_senders()},et.prototype.start_batch_senders=function(){this.are_batchers_initialized()&&(this._batch_requests=!0,R.each(this.request_batchers,(function(e){e.start()})))},et.prototype.stop_batch_senders=function(){this._batch_requests=!1,R.each(this.request_batchers,(function(e){e.stop(),e.clear()}))},et.prototype.push=function(e){this._execute_array([e])},et.prototype.disable=function(e){void 0===e?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},et.prototype._encode_data_for_request=function(e){var t=R.JSONEncode(e);return this.get_config("api_payload_format")===Qe&&(t=R.base64Encode(t)),{data:t}},et.prototype._track_or_batch=function(e,t){var n=R.truncate(e.data,255),r=e.endpoint,o=e.batcher,i=e.should_send_immediately,a=e.send_request_options||{};t=t||We;var l=!0,s=R.bind((function(){return a.skip_hooks||(n=this._run_hook("before_send_"+e.type,n)),n?(z.log("MIXPANEL REQUEST:"),z.log(n),this._send_request(r,this._encode_data_for_request(n),a,this._prepare_callback(t,n))):null}),this);return this._batch_requests&&!i?o.enqueue(n,(function(e){e?t(1,n):s()})):l=s(),l&&n},et.prototype.track=fe((function(e,t,n,r){r||"function"!=typeof n||(r=n,n=null);var o=(n=n||{}).transport;o&&(n.transport=o);var i=n.send_immediately;if("function"!=typeof r&&(r=We),R.isUndefined(e))this.report_error("No event name provided to mixpanel.track");else{if(!this._event_is_disabled(e)){(t=t||{}).token=this.get_config("token");var a=this.persistence.remove_event_timer(e);if(!R.isUndefined(a)){var l=(new Date).getTime()-a;t.$duration=parseFloat((l/1e3).toFixed(3))}this._set_default_superprops();var s=this.get_config("track_marketing")?R.info.marketingParams():{};t=R.extend({},R.info.properties(),s,this.persistence.properties(),this.unpersisted_superprops,t);var u=this.get_config("property_blacklist");R.isArray(u)?R.each(u,(function(e){delete t[e]})):this.report_error("Invalid value for property_blacklist config: "+u);var c={event:e,properties:t};return this._track_or_batch({type:"events",data:c,endpoint:this.get_config("api_host")+"/track/",batcher:this.request_batchers.events,should_send_immediately:i,send_request_options:n},r)}r(0)}})),et.prototype.set_group=fe((function(e,t,n){R.isArray(t)||(t=[t]);var r={};return r[e]=t,this.register(r),this.people.set(e,t,n)})),et.prototype.add_group=fe((function(e,t,n){var r=this.get_property(e);if(void 0===r){var o={};o[e]=[t],this.register(o)}else-1===r.indexOf(t)&&(r.push(t),this.register(o));return this.people.union(e,t,n)})),et.prototype.remove_group=fe((function(e,t,n){var r=this.get_property(e);if(void 0!==r){var o=r.indexOf(t);o>-1&&(r.splice(o,1),this.register({group_key:r})),0===r.length&&this.unregister(e)}return this.people.remove(e,t,n)})),et.prototype.track_with_groups=fe((function(e,t,n,r){var o=R.extend({},t||{});return R.each(n,(function(e,t){null!=e&&(o[t]=e)})),this.track(e,o,r)})),et.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},et.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},et.prototype.get_group=function(e,t){var n=this._create_map_key(e,t),r=this._cached_groups[n];return void 0!==r&&r._group_key===e&&r._group_id===t||((r=new Oe)._init(this,e,t),this._cached_groups[n]=r),r},et.prototype.track_pageview=fe((function(e,t){"object"!=typeof e&&(e={});var n=(t=t||{}).event_name||"$mp_web_page_view",r=R.extend(R.info.mpPageViewProperties(),R.info.campaignParams(),R.info.clickParams()),o=R.extend({},r,e);return this.track(n,o)})),et.prototype.track_links=function(){return this._track_dom.call(this,Y,arguments)},et.prototype.track_forms=function(){return this._track_dom.call(this,X,arguments)},et.prototype.time_event=function(e){R.isUndefined(e)?this.report_error("No event name provided to mixpanel.time_event"):this._event_is_disabled(e)||this.persistence.set_event_timer(e,(new Date).getTime())};var nt={persistent:!0},rt=function(e){var t;return t=R.isObject(e)?e:R.isUndefined(e)?{}:{days:e},R.extend({},nt,t)};et.prototype.register=function(e,t){var n=rt(t);n.persistent?this.persistence.register(e,n.days):R.extend(this.unpersisted_superprops,e)},et.prototype.register_once=function(e,t,n){var r=rt(n);r.persistent?this.persistence.register_once(e,t,r.days):(void 0===t&&(t="None"),R.each(e,(function(e,n){this.unpersisted_superprops.hasOwnProperty(n)&&this.unpersisted_superprops[n]!==t||(this.unpersisted_superprops[n]=e)}),this))},et.prototype.unregister=function(e,t){(t=rt(t)).persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]},et.prototype._register_single=function(e,t){var n={};n[e]=t,this.register(n)},et.prototype.identify=function(e,t,n,r,o,i,a,l){var s=this.get_distinct_id();if(e&&s!==e){if("string"==typeof e&&0===e.indexOf(Ke))return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var u=s;this.register_once({$had_persisted_distinct_id:!0,$device_id:u},"")}e!==s&&e!==this.get_property($e)&&(this.unregister($e),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,n,r,o,i,a,l),e!==s&&this.track("$identify",{distinct_id:e,$anon_distinct_id:s},{skip_hooks:!0})},et.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=R.UUID();this.register_once({distinct_id:Ke+e,$device_id:e},"")},et.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},et.prototype.alias=function(e,t){if(e===this.get_property(Fe))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var n=this;return R.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single($e,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},(function(){n.identify(e)}))):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},et.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},et.prototype.set_config=function(e){R.isObject(e)&&(R.extend(this.config,e),e.batch_size&&R.each(this.request_batchers,(function(e){e.resetBatchSize()})),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),n.DEBUG=n.DEBUG||this.get_config("debug"))},et.prototype.get_config=function(e){return this.config[e]},et.prototype._run_hook=function(e){var t=(this.config.hooks[e]||He).apply(this,v.call(arguments,1));return void 0===t&&(this.report_error(e+" hook did not return a value"),t=null),t},et.prototype.get_property=function(e){return this.persistence.props[e]},et.prototype.toString=function(){var e=this.get_config("name");return e!==Ve&&(e=Ve+"."+e),e},et.prototype._event_is_disabled=function(e){return R.isBlockedUA(C)||this._flags.disable_all_events||R.include(this.__disabled_events,e)},et.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&R.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_tracking()||!this.get_config("opt_out_tracking_by_default")&&!R.cookie.get("mp_optout")||(R.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},et.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t),t&&R.each(this.request_batchers,(function(e){e.clear()}))},et.prototype._gdpr_call_func=function(e,t){return t=R.extend({track:R.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),R.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})},et.prototype.opt_in_tracking=function(e){e=R.extend({enable_persistence:!0},e),this._gdpr_call_func(le,e),this._gdpr_update_persistence(e)},et.prototype.opt_out_tracking=function(e){(e=R.extend({clear_persistence:!0,delete_user:!0},e)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(se,e),this._gdpr_update_persistence(e)},et.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(ue,e)},et.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(ce,e)},et.prototype.clear_opt_in_out_tracking=function(e){e=R.extend({enable_persistence:!0},e),this._gdpr_call_func(he,e),this._gdpr_update_persistence(e)},et.prototype.report_error=function(e,t){z.error.apply(z.error,arguments);try{t||e instanceof Error||(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(t){z.error(t)}},et.prototype.init=et.prototype.init,et.prototype.reset=et.prototype.reset,et.prototype.disable=et.prototype.disable,et.prototype.time_event=et.prototype.time_event,et.prototype.track=et.prototype.track,et.prototype.track_links=et.prototype.track_links,et.prototype.track_forms=et.prototype.track_forms,et.prototype.track_pageview=et.prototype.track_pageview,et.prototype.register=et.prototype.register,et.prototype.register_once=et.prototype.register_once,et.prototype.unregister=et.prototype.unregister,et.prototype.identify=et.prototype.identify,et.prototype.alias=et.prototype.alias,et.prototype.name_tag=et.prototype.name_tag,et.prototype.set_config=et.prototype.set_config,et.prototype.get_config=et.prototype.get_config,et.prototype.get_property=et.prototype.get_property,et.prototype.get_distinct_id=et.prototype.get_distinct_id,et.prototype.toString=et.prototype.toString,et.prototype.opt_out_tracking=et.prototype.opt_out_tracking,et.prototype.opt_in_tracking=et.prototype.opt_in_tracking,et.prototype.has_opted_out_tracking=et.prototype.has_opted_out_tracking,et.prototype.has_opted_in_tracking=et.prototype.has_opted_in_tracking,et.prototype.clear_opt_in_out_tracking=et.prototype.clear_opt_in_out_tracking,et.prototype.get_group=et.prototype.get_group,et.prototype.set_group=et.prototype.set_group,et.prototype.add_group=et.prototype.add_group,et.prototype.remove_group=et.prototype.remove_group,et.prototype.track_with_groups=et.prototype.track_with_groups,et.prototype.start_batch_senders=et.prototype.start_batch_senders,et.prototype.stop_batch_senders=et.prototype.stop_batch_senders,Be.prototype.properties=Be.prototype.properties,Be.prototype.update_search_keyword=Be.prototype.update_search_keyword,Be.prototype.update_referrer_info=Be.prototype.update_referrer_info,Be.prototype.get_cross_subdomain=Be.prototype.get_cross_subdomain,Be.prototype.clear=Be.prototype.clear;var ot={},it=function(){Ie.init=function(e,n,r){if(r)return Ie[r]||(Ie[r]=ot[r]=tt(e,n,r),Ie[r]._loaded()),Ie[r];var o=Ie;ot[Ve]?o=ot[Ve]:e&&((o=tt(e,n,Ve))._loaded(),ot[Ve]=o),Ie=o,1===Ne&&(t[Ve]=Ie),R.each(ot,(function(e,t){t!==Ve&&(Ie[t]=e)})),Ie._=R}};var at=(Ne=0,Ie=new et,it(),Ie.init(),function(){function e(){e.done||(e.done=!0,Ze=!0,Ye=!1,R.each(ot,(function(e){e._dom_loaded()})))}if(S.addEventListener)"complete"===S.readyState?e():S.addEventListener("DOMContentLoaded",e,!1);else if(S.attachEvent){S.attachEvent("onreadystatechange",e);var n=!1;try{n=null===t.frameElement}catch(e){}S.documentElement.doScroll&&n&&function t(){try{S.documentElement.doScroll("left")}catch(e){return void setTimeout(t,1)}e()}()}R.register_event(t,"load",e,!0)}(),Ie);e.exports=at},4448:function(e,t,n){"use strict";var r=n(7294),o=n(3840);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n