mixpanel-browser 2.40.1 → 2.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/tests.yml +25 -0
- package/CHANGELOG.md +15 -0
- package/README.md +4 -2
- package/dist/mixpanel-jslib-snippet.min.js +3 -4
- package/dist/mixpanel-jslib-snippet.min.test.js +3 -4
- package/dist/mixpanel.amd.js +96 -647
- package/dist/mixpanel.cjs.js +96 -647
- package/dist/mixpanel.globals.js +99 -650
- package/dist/mixpanel.min.js +151 -163
- package/dist/mixpanel.umd.js +96 -647
- package/doc/build-docs.js +16 -0
- package/doc/readme.io/javascript-full-api-reference.md +18 -0
- package/mixpanel-jslib-snippet.js +0 -19
- package/package.json +3 -3
- package/src/config.js +1 -1
- package/src/mixpanel-core.js +45 -40
- package/src/mixpanel-group.js +4 -0
- package/src/request-batcher.js +2 -2
- package/src/utils.js +2 -31
- package/tunnel.log +0 -0
- package/.travis.yml +0 -6
- package/src/autotrack-utils.js +0 -192
- package/src/autotrack.js +0 -355
package/dist/mixpanel.min.js
CHANGED
|
@@ -1,165 +1,153 @@
|
|
|
1
1
|
(function() {
|
|
2
|
-
function
|
|
3
|
-
(function(){function
|
|
4
|
-
c),
|
|
5
|
-
|
|
6
|
-
this.
|
|
7
|
-
|
|
8
|
-
d.
|
|
9
|
-
|
|
10
|
-
b.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
""
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
a)
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
b[a.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
b
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
d.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
""}
|
|
59
|
-
|
|
60
|
-
b
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
a
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
this.
|
|
80
|
-
(
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
this.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
""
|
|
96
|
-
|
|
97
|
-
(this.
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
"
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
d.
|
|
119
|
-
"
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
"
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
c)
|
|
138
|
-
this.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
1
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
n.error("alias matches current distinct_id - skipping api call.");this.Lb(a);return-1};e.prototype.De=function(a){this.mc("mp_name_tag",a)};e.prototype.fd=function(a){if(d.e(a))d.extend(this.config,a),a.batch_size&&d.a(this.z,function(a){a.bd()}),this.c("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.c("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.td(this.config),G=G||this.c("debug")};e.prototype.c=
|
|
154
|
-
function(a){return this.config[a]};e.prototype.oc=function(a){var b=(this.config.hooks[a]||Oa).apply(this,Q.call(arguments,1));"undefined"===typeof b&&(n.error(a+" hook did not return a value"),b=w);return b};e.prototype.G=function(a){return this.persistence.props[a]};e.prototype.toString=function(){var a=this.c("name");"mixpanel"!==a&&(a="mixpanel."+a);return a};e.prototype.ec=function(a){return d.Oc(z)||this.ba.me||d.Lc(this.ob,a)};e.prototype.bc=P(function(a){if(this.rc)for(var b=this._triggered_notifs,
|
|
155
|
-
c=0;c<b.length;c++){if((new g(b[c],this)).Vd(a)){this.wb(b[c]);break}}else this.fc.push(a)});e.prototype.ac=P(function(a){a&&!this.ba.Mb&&!this.c("disable_notifications")&&(n.log("MIXPANEL NOTIFICATION CHECK"),this.l(this.c("api_host")+"/decide/",{verbose:o,version:"3",lib:"web",token:this.c("token"),distinct_id:a},{method:"GET",Ca:"XHR"},this.Na(d.bind(function(a){if(a.notifications&&0<a.notifications.length){this._triggered_notifs=[];var c=[];d.a(a.notifications,function(a){(a.display_triggers&&
|
|
156
|
-
0<a.display_triggers.length?this._triggered_notifs:c).push(a)},this);0<c.length&&this.wb.call(this,c[0])}this.ic()},this))))});e.prototype.ic=function(){this.rc=o;for(var a=this.fc;0<a.length;)this.bc(a.shift())};e.prototype.wb=function(a){(new g(a,this)).show()};e.prototype.Ld=function(){"localStorage"===this.c("opt_out_tracking_persistence_type")&&d.localStorage.Za()&&(!this.Wa()&&this.Wa({persistence_type:"cookie"})&&this.Uc({enable_persistence:F}),!this.va()&&this.va({persistence_type:"cookie"})&&
|
|
157
|
-
this.Qb({clear_persistence:F}),this.zc({persistence_type:"cookie",enable_persistence:F}));if(this.va())this.Ka({clear_persistence:o});else if(!this.Wa()&&(this.c("opt_out_tracking_by_default")||d.cookie.get("mp_optout")))d.cookie.remove("mp_optout"),this.Qb({clear_persistence:this.c("opt_out_persistence_by_default")})};e.prototype.Ka=function(a){if(a&&a.clear_persistence)a=o;else if(a&&a.enable_persistence)a=F;else return;!this.c("disable_persistence")&&this.persistence.disabled!==a&&this.persistence.gd(a);
|
|
158
|
-
a&&d.a(this.z,function(a){a.clear()})};e.prototype.pa=function(a,b){b=d.extend({track:d.bind(this.p,this),persistence_type:this.c("opt_out_tracking_persistence_type"),cookie_prefix:this.c("opt_out_tracking_cookie_prefix"),cookie_expiration:this.c("cookie_expiration"),cross_site_cookie:this.c("cross_site_cookie"),cross_subdomain_cookie:this.c("cross_subdomain_cookie"),cookie_domain:this.c("cookie_domain"),secure_cookie:this.c("secure_cookie"),ignore_dnt:this.c("ignore_dnt")},b);d.localStorage.Za()||
|
|
159
|
-
(b.persistence_type="cookie");return a(this.c("token"),{p:b.track,ff:b.track_event_name,gf:b.track_properties,Xc:b.persistence_type,Wc:b.cookie_prefix,Ac:b.cookie_domain,Bc:b.cookie_expiration,ke:b.cross_site_cookie,Cc:b.cross_subdomain_cookie,Qe:b.secure_cookie,Jc:b.ignore_dnt})};e.prototype.Uc=function(a){a=d.extend({enable_persistence:o},a);this.pa(Ta,a);this.Ka(a)};e.prototype.Qb=function(a){a=d.extend({clear_persistence:o,delete_user:o},a);a.delete_user&&this.people&&this.people.vb()&&(this.people.Fc(),
|
|
160
|
-
this.people.yc());this.pa(Ua,a);this.Ka(a)};e.prototype.Wa=function(a){return this.pa(Va,a)};e.prototype.va=function(a){return this.pa(Fa,a)};e.prototype.zc=function(a){a=d.extend({enable_persistence:o},a);this.pa(Xa,a);this.Ka(a)};e.prototype.init=e.prototype.ea;e.prototype.reset=e.prototype.reset;e.prototype.disable=e.prototype.disable;e.prototype.time_event=e.prototype.ef;e.prototype.track=e.prototype.p;e.prototype.track_links=e.prototype.kf;e.prototype.track_forms=e.prototype.jf;e.prototype.track_pageview=
|
|
161
|
-
e.prototype.lf;e.prototype.register=e.prototype.w;e.prototype.register_once=e.prototype.H;e.prototype.unregister=e.prototype.Ea;e.prototype.identify=e.prototype.Lb;e.prototype.alias=e.prototype.de;e.prototype.name_tag=e.prototype.De;e.prototype.set_config=e.prototype.fd;e.prototype.get_config=e.prototype.c;e.prototype.get_property=e.prototype.G;e.prototype.get_distinct_id=e.prototype.W;e.prototype.toString=e.prototype.toString;e.prototype._check_and_handle_notifications=e.prototype.ac;e.prototype._handle_user_decide_check_complete=
|
|
162
|
-
e.prototype.ic;e.prototype._show_notification=e.prototype.wb;e.prototype.opt_out_tracking=e.prototype.Qb;e.prototype.opt_in_tracking=e.prototype.Uc;e.prototype.has_opted_out_tracking=e.prototype.va;e.prototype.has_opted_in_tracking=e.prototype.Wa;e.prototype.clear_opt_in_out_tracking=e.prototype.zc;e.prototype.get_group=e.prototype.ve;e.prototype.set_group=e.prototype.Ye;e.prototype.add_group=e.prototype.ce;e.prototype.remove_group=e.prototype.Le;e.prototype.track_with_groups=e.prototype.mf;e.prototype.start_batch_senders=
|
|
163
|
-
e.prototype.kd;e.prototype.stop_batch_senders=e.prototype.cf;q.prototype.properties=q.prototype.za;q.prototype.update_search_keyword=q.prototype.ud;q.prototype.update_referrer_info=q.prototype.Xb;q.prototype.get_cross_subdomain=q.prototype.ue;q.prototype.clear=q.prototype.clear;d.Me(e);var L={};(function(){ma=1;x=C.mixpanel;d.g(x)?n.L('"mixpanel" object not initialized. Ensure you are using the latest version of the Mixpanel JS Library along with the snippet we provide.'):x.__loaded||x.config&&x.persistence?
|
|
164
|
-
n.L("The Mixpanel library has already been downloaded at least once. Ensure that the Mixpanel code snippet only appears once on the page (and is not double-loaded by a tag manager) in order to avoid errors."):1.1>(x.__SV||0)?n.L("Version mismatch; please ensure you're using the latest version of the Mixpanel code snippet."):(d.a(x._i,function(a){a&&d.isArray(a)&&(L[a[a.length-1]]=Z.apply(this,a))}),La(),x.init(),d.a(L,function(a){a.Ma()}),la())})()})();
|
|
2
|
+
function l(ga){throw ga;}var m=void 0,p=!0,w=null,F=!1;
|
|
3
|
+
(function(){function ga(){function a(){if(!a.be)sa=a.be=p,ta=F,d.a(L,function(a){a.Ad()})}function b(){try{s.documentElement.doScroll("left")}catch(c){setTimeout(b,1);return}a()}if(s.addEventListener)"complete"===s.readyState?a():s.addEventListener("DOMContentLoaded",a,F);else if(s.attachEvent){s.attachEvent("onreadystatechange",a);var c=F;try{c=C.frameElement===w}catch(g){}s.documentElement.doScroll&&c&&b()}d.ea(C,"load",a,p)}function Ga(){y.init=function(a,b,c){if(c)return y[c]||(y[c]=L[c]=X(a,
|
|
4
|
+
b,c),y[c].Ja()),y[c];c=y;if(L.mixpanel)c=L.mixpanel;else if(a)c=X(a,b,"mixpanel"),c.Ja(),L.mixpanel=c;y=c;1===ha&&(C.mixpanel=y);Ha()}}function Ha(){d.a(L,function(a,b){"mixpanel"!==b&&(y[b]=a)});y._=d}function ia(a){a=d.e(a)?a:d.g(a)?{}:{days:a};return d.extend({},Ia,a)}function X(a,b,c){var g,i="mixpanel"===c?y:y[c];if(i&&0===ha)g=i;else{if(i&&!d.isArray(i)){n.error("You have already initialized "+c);return}g=new e}g.Zb={};g.nc=F;g.dc=[];g.pa(a,b,c);g.people=new k;g.people.pa(g);G=G||g.c("debug");
|
|
5
|
+
!d.g(i)&&d.isArray(i)&&(g.nb.call(g.people,i.people),g.nb(i));return g}function e(){}function Y(){}function Ja(a){return a}function k(){}function f(a,b){d.Sd(this);this.da=b;this.Rb=this.da.persistence;this.Ya=this.da.c("inapp_protocol");this.Ma=this.da.c("cdn");this.K=d.U(a.id);this.Mc=d.U(a.message_id);this.body=(d.U(a.body)||"").replace(/\n/g,"<br/>");this.Xd=d.U(a.cta)||"Close";this.va=d.U(a.type)||"takeover";this.style=d.U(a.style)||"light";this.title=d.U(a.title)||"";this.Ca=f.xd;this.ia=f.wd;
|
|
6
|
+
this.Cc=a.display_triggers||[];this.ca=a.cta_url||w;this.Kb=a.image_url||w;this.A=a.thumb_image_url||w;this.gb=a.video_url||w;if(this.A&&0===this.A.indexOf("//"))this.A=this.A.replace("//",this.Ya);this.Na=p;if(!this.ca)this.ca="#dismiss",this.Na=F;this.v="mini"===this.va;if(!this.v)this.va="takeover";this.oe=!this.v?f.la:f.hb;this.lc();this.Ta=this.Fd();this.Id()}function q(a){this.props={};this.rc=F;this.name=a.persistence_name?"mp_"+a.persistence_name:"mp_"+a.token+"_mixpanel";var b=a.persistence;
|
|
7
|
+
if("cookie"!==b&&"localStorage"!==b)n.L("Unknown persistence type "+b+"; falling back to cookie"),b=a.persistence="cookie";this.h="localStorage"===b&&d.localStorage.Ua()?d.localStorage:d.cookie;this.load();this.od(a);this.Ye(a);this.save()}function t(){}function H(a,b){this.ya=new M(a,{h:b.h});this.Q=b.Q;this.Ae=b.Be;this.Ka=b.Ka;this.qa=this.Q.batch_size;this.Ra=this.Q.batch_flush_interval_ms;this.$a=!this.Q.batch_autostart}function ua(a,b){var c=[];d.a(a,function(a){var d=a.id;if(d in b){if(d=b[d],
|
|
8
|
+
d!==w)a.payload=d,c.push(a)}else c.push(a)});return c}function va(a,b){var c=[];d.a(a,function(a){a.id&&!b[a.id]&&c.push(a)});return c}function M(a,b){b=b||{};this.za=a;this.h=b.h||window.localStorage;this.Nb=new wa(a,{h:this.h});this.Va=b.Va||w;this.X=[]}function wa(a,b){b=b||{};this.za=a;this.h=b.h||window.localStorage;this.Tc=b.Tc||100;this.hd=b.hd||2E3}function Z(){this.Qc="submit"}function R(){this.Qc="click"}function I(){}function xa(a){var b=Ka,c=a.split("."),c=c[c.length-1];if(4<c.length||
|
|
9
|
+
"com"===c||"org"===c)b=La;return(a=a.match(b))?a[0]:""}function ja(a){var b=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return a?b.substring(0,a):b}function ka(a,b){if(la!==w&&!b)return la;var c=p;try{var a=a||window.localStorage,d="__mplss_"+ja(8);a.setItem(d,"xyz");"xyz"!==a.getItem(d)&&(c=F);a.removeItem(d)}catch(i){c=F}return la=c}function ma(a){return{log:na(n.log,a),error:na(n.error,a),L:na(n.L,a)}}function na(a,b){return function(){arguments[0]="["+
|
|
10
|
+
b+"] "+arguments[0];return a.apply(n,arguments)}}function Ma(a,b){ya(p,a,b)}function Na(a,b){ya(F,a,b)}function Oa(a,b){return"1"===$(b).get(aa(a,b))}function za(a,b){if(Pa(b))return n.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"'),p;var c="0"===$(b).get(aa(a,b));c&&n.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data.");
|
|
11
|
+
return c}function P(a){return oa(a,function(a){return this.c(a)})}function N(a){return oa(a,function(a){return this.I(a)})}function S(a){return oa(a,function(a){return this.I(a)})}function Qa(a,b){b=b||{};$(b).remove(aa(a,b),!!b.xc,b.vc)}function $(a){a=a||{};return"localStorage"===a.Sc?d.localStorage:d.cookie}function aa(a,b){b=b||{};return(b.Rc||Ra)+a}function Pa(a){if(a&&a.Ec)return F;var a=a&&a.window||C,b=a.navigator||{},c=F;d.a([b.doNotTrack,b.msDoNotTrack,a.doNotTrack],function(a){d.i([p,1,
|
|
12
|
+
"1","yes"],a)&&(c=p)});return c}function ya(a,b,c){!d.ua(b)||!b.length?n.error("gdpr."+(a?"optIn":"optOut")+" called with an invalid token"):(c=c||{},$(c).set(aa(b,c),a?1:0,d.Kc(c.wc)?c.wc:w,!!c.xc,!!c.ze,!!c.Wd,c.vc),c.u&&a&&c.u(c.Pe||"$opt_in",c.Qe,{send_immediately:p}))}function oa(a,b){return function(){var c=F;try{var d=b.call(this,"token"),i=b.call(this,"ignore_dnt"),h=b.call(this,"opt_out_tracking_persistence_type"),o=b.call(this,"opt_out_tracking_cookie_prefix"),j=b.call(this,"window");d&&
|
|
13
|
+
(c=za(d,{Ec:i,Sc:h,Rc:o,window:j}))}catch(v){n.error("Unexpected error when checking tracking opt-out status: "+v)}if(!c)return a.apply(this,arguments);c=arguments[arguments.length-1];"function"===typeof c&&c(0)}}function pa(a){if(a===w)return w;switch(typeof a){case "object":if(d.P(a)&&0<=a.getTime())return a.getTime();break;case "boolean":return Number(a);case "number":return a;case "string":return a=Number(a),!isNaN(a)?a:0}return w}function U(a){if(a===w)return F;switch(typeof a){case "boolean":return a;
|
|
14
|
+
case "number":return 0!==a;case "string":return 0<a.length;case "object":if(d.isArray(a)&&0<a.length||d.P(a)&&0<a.getTime()||d.e(a)&&!d.W(a))return p}return F}function Sa(a,b){(!a.operator||"datetime"!==a.operator||!a.children||1!==a.children.length)&&l("Invalid cast operator: datetime "+a);var c=u(a.children[0],b);if(c===w)return w;switch(typeof c){case "number":case "string":c=new Date(c);if(isNaN(c.getTime()))break;return c;case "object":if(d.P(c))return c}return w}function Ta(a,b){(!a.operator||
|
|
15
|
+
-1===["-","*","/","%"].indexOf(a.operator)||!a.children||2>a.children.length)&&l("Invalid arithmetic operator "+a);var c=u(a.children[0],b),d=u(a.children[1],b);if("number"===typeof c&&"number"===typeof d)switch(a.operator){case "-":return c-d;case "*":return c*d;case "/":if(0!==d)return c/d;break;case "%":if(0===d)break;return 0===c?0:0>c&&0<d||0<c&&0>d?-(Math.floor(c/d)*d-c):c%d;default:l("Unknown operator: "+a.operator)}return w}function Ua(a,b){if(a===b)return p;if(a===w||b===w||a.length!==b.length)return F;
|
|
16
|
+
for(var c=0;c<a.length;c++)if(a[c]!==b[c])return F;return p}function Va(a,b){if(a===w&&a===b)return p;if(typeof a===typeof b)switch(typeof a){case "number":case "string":case "boolean":return a===b;case "object":if(d.isArray(a)&&d.isArray(b))return Ua(a,b);if(d.P(a)&&d.P(b))return a.getTime()===b.getTime();if(d.e(a)&&d.e(b))return JSON.stringify(a)===JSON.stringify(b)}return F}function Wa(a,b){(!a.operator||-1===[">",">=","<","<="].indexOf(a.operator)||!a.children||2!==a.children.length)&&l("Invalid comparison operator "+
|
|
17
|
+
a);var c=u(a.children[0],b),g=u(a.children[1],b);if(typeof c===typeof g)if("number"===typeof g||d.P(g))switch(c=pa(c),g=pa(g),a.operator){case ">":return c>g;case ">=":return c>=g;case "<":return c<g;case "<=":return c<=g}else if("string"===typeof g)switch(c=c.localeCompare(g),a.operator){case ">":return 0<c;case ">=":return 0<=c;case "<":return 0>c;case "<=":return 0>=c}return w}function Xa(a,b){a.operator||l("Invalid operator: operator key missing "+a);switch(a.operator){case "and":return(!a.operator||
|
|
18
|
+
"and"!==a.operator||!a.children||2!==a.children.length)&&l("Invalid operator: AND "+a),U(u(a.children[0],b))&&U(u(a.children[1],b));case "or":return(!a.operator||"or"!==a.operator||!a.children||2!==a.children.length)&&l("Invalid operator: OR "+a),U(u(a.children[0],b))||U(u(a.children[1],b));case "in":case "not in":(!a.operator||-1===["in","not in"].indexOf(a.operator)||!a.children||2!==a.children.length)&&l("Invalid operator: IN/NOT IN "+a);var c=u(a.children[0],b),g=u(a.children[1],b);!d.isArray(g)&&
|
|
19
|
+
!d.ua(g)&&l("Invalid operand for operator IN: invalid type"+g);c=-1<g.indexOf(c);return"not in"===a.operator?!c:c;case "+":return(!a.operator||"+"!==a.operator||!a.children||2>a.children.length)&&l("Invalid operator: PLUS "+a),c=u(a.children[0],b),g=u(a.children[1],b),"number"===typeof c&&"number"===typeof g||"string"===typeof c&&"string"===typeof g?c+g:w;case "-":case "*":case "/":case "%":return Ta(a,b);case "==":case "!=":a:switch((!a.operator||-1===["==","!="].indexOf(a.operator)||!a.children||
|
|
20
|
+
2!==a.children.length)&&l("Invalid equality operator "+a),g=Va(u(a.children[0],b),u(a.children[1],b)),a.operator){case "==":c=g;break a;case "!=":c=!g}return c;case ">":case "<":case ">=":case "<=":return Wa(a,b);case "boolean":return(!a.operator||"boolean"!==a.operator||!a.children||1!==a.children.length)&&l("Invalid cast operator: boolean "+a),U(u(a.children[0],b));case "datetime":return Sa(a,b);case "list":return(!a.operator||"list"!==a.operator||!a.children||1!==a.children.length)&&l("Invalid cast operator: list "+
|
|
21
|
+
a),c=u(a.children[0],b),c===w?w:d.isArray(c)?c:w;case "number":return(!a.operator||"number"!==a.operator||!a.children||1!==a.children.length)&&l("Invalid cast operator: number "+a),pa(u(a.children[0],b));case "string":a:{(!a.operator||"string"!==a.operator||!a.children||1!==a.children.length)&&l("Invalid cast operator: string "+a);c=u(a.children[0],b);switch(typeof c){case "object":c=d.P(c)?c.toJSON():JSON.stringify(c);break a}c=""+c}return c;case "defined":case "not defined":return(!a.operator||
|
|
22
|
+
-1===["defined","not defined"].indexOf(a.operator)||!a.children||1!==a.children.length)&&l("Invalid defined/not defined operator: "+a),c=u(a.children[0],b)!==w,"not defined"===a.operator?!c:c;case "not":return(!a.operator||"not"!==a.operator||!a.children||1!==a.children.length)&&l("Invalid not operator: "+a),c=u(a.children[0],b),c===w?p:"boolean"===typeof c?!c:w}}function u(a,b){if(a.property){var c;a:switch((!a.property||!a.value)&&l("Invalid operand: missing required keys "+a),a.property){case "event":c=
|
|
23
|
+
b[a.value]!==m?b[a.value]:w;break a;case "literal":if("now"===a.value)c=new Date;else if("object"===typeof a.value){var d=a.value;c=d.window;(!c||!c.unit||!c.value)&&l("Invalid window: missing required keys "+JSON.stringify(d));d=new Date;switch(c.unit){case "hour":d.setTime(d.getTime()+-36E5*c.value);break;case "day":d.setTime(d.getTime()+-864E5*c.value);break;case "week":d.setTime(d.getTime()+-6048E5*c.value);break;case "month":d.setTime(d.getTime()+-2592E6*c.value);break;default:l("Invalid unit: "+
|
|
24
|
+
c.unit)}c=d}else c=a.value;break a;default:l("Invalid operand: Invalid property type "+a.property)}return c}if(a.operator)return Xa(a,b)}var G=F,C;if("undefined"===typeof window){var E={hostname:""};C={navigator:{userAgent:""},document:{location:E,referrer:""},screen:{width:0,height:0},location:E}}else C=window;var E=Array.prototype,Aa=Object.prototype,Q=E.slice,V=Aa.toString,ba=Aa.hasOwnProperty,z=C.console,J=C.navigator,s=C.document,W=C.opera,ca=C.screen,A=J.userAgent,qa=Function.prototype.bind,
|
|
25
|
+
Ba=E.forEach,Ca=E.indexOf,Da=E.map,E=Array.isArray,ra={},d={trim:function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},n={log:function(){if(G&&!d.g(z)&&z)try{z.log.apply(z,arguments)}catch(a){d.a(arguments,function(a){z.log(a)})}},warn:function(){if(G&&!d.g(z)&&z){var a=["Mixpanel warning:"].concat(d.ga(arguments));try{z.warn.apply(z,a)}catch(b){d.a(a,function(a){z.warn(a)})}}},error:function(){if(G&&!d.g(z)&&z){var a=["Mixpanel error:"].concat(d.ga(arguments));try{z.error.apply(z,
|
|
26
|
+
a)}catch(b){d.a(a,function(a){z.error(a)})}}},L:function(){if(!d.g(z)&&z){var a=["Mixpanel error:"].concat(d.ga(arguments));try{z.error.apply(z,a)}catch(b){d.a(a,function(a){z.error(a)})}}}};d.bind=function(a,b){var c,g;if(qa&&a.bind===qa)return qa.apply(a,Q.call(arguments,1));d.Mb(a)||l(new TypeError);c=Q.call(arguments,2);return g=function(){if(!(this instanceof g))return a.apply(b,c.concat(Q.call(arguments)));var d={};d.prototype=a.prototype;var h=new d;d.prototype=w;d=a.apply(h,c.concat(Q.call(arguments)));
|
|
27
|
+
return Object(d)===d?d:h}};d.Sd=function(a){for(var b in a)"function"===typeof a[b]&&(a[b]=d.bind(a[b],a))};d.a=function(a,b,c){if(!(a===w||a===m))if(Ba&&a.forEach===Ba)a.forEach(b,c);else if(a.length===+a.length)for(var d=0,i=a.length;d<i&&!(d in a&&b.call(c,a[d],d,a)===ra);d++);else for(d in a)if(ba.call(a,d)&&b.call(c,a[d],d,a)===ra)break};d.U=function(a){a&&d.ua(a)&&(a=a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"));return a};d.extend=
|
|
28
|
+
function(a){d.a(Q.call(arguments,1),function(b){for(var c in b)b[c]!==m&&(a[c]=b[c])});return a};d.isArray=E||function(a){return"[object Array]"===V.call(a)};d.Mb=function(a){try{return/^\s*\bfunction\b/.test(a)}catch(b){return F}};d.le=function(a){return!(!a||!ba.call(a,"callee"))};d.ga=function(a){return!a?[]:a.ga?a.ga():d.isArray(a)||d.le(a)?Q.call(a):d.$e(a)};d.map=function(a,b,c){if(Da&&a.map===Da)return a.map(b,c);var g=[];d.a(a,function(a){g.push(b.call(c,a))});return g};d.keys=function(a){var b=
|
|
29
|
+
[];if(a===w)return b;d.a(a,function(a,d){b[b.length]=d});return b};d.$e=function(a){var b=[];if(a===w)return b;d.a(a,function(a){b[b.length]=a});return b};d.Gc=function(a,b){var c=F;if(a===w)return c;if(Ca&&a.indexOf===Ca)return-1!=a.indexOf(b);d.a(a,function(a){if(c||(c=a===b))return ra});return c};d.i=function(a,b){return-1!==a.indexOf(b)};d.Ic=function(a,b){a.prototype=new b;a.Ne=b.prototype};d.e=function(a){return a===Object(a)&&!d.isArray(a)};d.W=function(a){if(d.e(a)){for(var b in a)if(ba.call(a,
|
|
30
|
+
b))return F;return p}return F};d.g=function(a){return a===m};d.ua=function(a){return"[object String]"==V.call(a)};d.P=function(a){return"[object Date]"==V.call(a)};d.Kc=function(a){return"[object Number]"==V.call(a)};d.me=function(a){return!!(a&&1===a.nodeType)};d.Db=function(a){d.a(a,function(b,c){d.P(b)?a[c]=d.de(b):d.e(b)&&(a[c]=d.Db(b))});return a};d.timestamp=function(){Date.now=Date.now||function(){return+new Date};return Date.now()};d.de=function(a){function b(a){return 10>a?"0"+a:a}return a.getUTCFullYear()+
|
|
31
|
+
"-"+b(a.getUTCMonth()+1)+"-"+b(a.getUTCDate())+"T"+b(a.getUTCHours())+":"+b(a.getUTCMinutes())+":"+b(a.getUTCSeconds())};d.o=function(a){return function(){try{return a.apply(this,arguments)}catch(b){n.L("Implementation error. Please turn on debug and contact support@mixpanel.com."),G&&n.L(b)}}};d.we=function(a){for(var b=["identify","_check_and_handle_notifications","_show_notification"],c=0;c<b.length;c++)a.prototype[b[c]]=d.o(a.prototype[b[c]])};d.ff=function(a){for(var b in a)"function"===typeof a[b]&&
|
|
32
|
+
(a[b]=d.o(a[b]))};d.ab=function(a){var b={};d.a(a,function(a,g){d.ua(a)&&0<a.length&&(b[g]=a)});return b};d.truncate=function(a,b){var c;"string"===typeof a?c=a.slice(0,b):d.isArray(a)?(c=[],d.a(a,function(a){c.push(d.truncate(a,b))})):d.e(a)?(c={},d.a(a,function(a,i){c[i]=d.truncate(a,b)})):c=a;return c};d.Ea=function(){return function(a){function b(a,d){var h="",o=0,j=o="",j=0,v=h,e=[],f=d[a];f&&"object"===typeof f&&"function"===typeof f.toJSON&&(f=f.toJSON(a));switch(typeof f){case "string":return c(f);
|
|
33
|
+
case "number":return isFinite(f)?""+f:"null";case "boolean":case "null":return""+f;case "object":if(!f)return"null";h+=" ";e=[];if("[object Array]"===V.apply(f)){j=f.length;for(o=0;o<j;o+=1)e[o]=b(o,f)||"null";return j=0===e.length?"[]":h?"[\n"+h+e.join(",\n"+h)+"\n"+v+"]":"["+e.join(",")+"]"}for(o in f)ba.call(f,o)&&(j=b(o,f))&&e.push(c(o)+(h?": ":":")+j);return j=0===e.length?"{}":h?"{"+e.join(",")+""+v+"}":"{"+e.join(",")+"}"}}function c(a){var b=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
|
34
|
+
c={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};b.lastIndex=0;return b.test(a)?'"'+a.replace(b,function(a){var b=c[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}return b("",{"":a})}}();d.ka=function(){function a(){switch(j){case "t":return i("t"),i("r"),i("u"),i("e"),p;case "f":return i("f"),i("a"),i("l"),i("s"),i("e"),F;case "n":return i("n"),i("u"),i("l"),i("l"),w}h('Unexpected "'+j+'"')}function b(){for(;j&&
|
|
35
|
+
" ">=j;)i()}function c(){var a,b,c="",d;if('"'===j)for(;i();){if('"'===j)return i(),c;if("\\"===j)if(i(),"u"===j){for(b=d=0;4>b;b+=1){a=parseInt(i(),16);if(!isFinite(a))break;d=16*d+a}c+=String.fromCharCode(d)}else if("string"===typeof e[j])c+=e[j];else break;else c+=j}h("Bad string")}function d(){var a;a="";"-"===j&&(a="-",i("-"));for(;"0"<=j&&"9">=j;)a+=j,i();if("."===j)for(a+=".";i()&&"0"<=j&&"9">=j;)a+=j;if("e"===j||"E"===j){a+=j;i();if("-"===j||"+"===j)a+=j,i();for(;"0"<=j&&"9">=j;)a+=j,i()}a=
|
|
36
|
+
+a;if(isFinite(a))return a;h("Bad number")}function i(a){a&&a!==j&&h("Expected '"+a+"' instead of '"+j+"'");j=f.charAt(o);o+=1;return j}function h(a){a=new SyntaxError(a);a.cf=o;a.text=f;l(a)}var o,j,e={'"':'"',"\\":"\\","/":"/",b:"\u0008",f:"\u000c",n:"\n",r:"\r",t:"\t"},f,B;B=function(){b();switch(j){case "{":var o;a:{var e,f={};if("{"===j){i("{");b();if("}"===j){i("}");o=f;break a}for(;j;){e=c();b();i(":");Object.hasOwnProperty.call(f,e)&&h('Duplicate key "'+e+'"');f[e]=B();b();if("}"===j){i("}");
|
|
37
|
+
o=f;break a}i(",");b()}}h("Bad object")}return o;case "[":a:{o=[];if("["===j){i("[");b();if("]"===j){i("]");e=o;break a}for(;j;){o.push(B());b();if("]"===j){i("]");e=o;break a}i(",");b()}}h("Bad array")}return e;case '"':return c();case "-":return d();default:return"0"<=j&&"9">=j?d():a()}};return function(a){f=a;o=0;j=" ";a=B();b();j&&h("Syntax error");return a}}();d.Rd=function(a){var b,c,g,i,h=0,o=0,j="",j=[];if(!a)return a;a=d.Ze(a);do b=a.charCodeAt(h++),c=a.charCodeAt(h++),g=a.charCodeAt(h++),
|
|
38
|
+
i=b<<16|c<<8|g,b=i>>18&63,c=i>>12&63,g=i>>6&63,i&=63,j[o++]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(b)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(c)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(i);while(h<a.length);j=j.join("");switch(a.length%3){case 1:j=j.slice(0,-2)+"==";break;case 2:j=j.slice(0,-1)+"="}return j};d.Ze=function(a){var a=
|
|
39
|
+
(a+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n"),b="",c,d,i=0,h;c=d=0;i=a.length;for(h=0;h<i;h++){var o=a.charCodeAt(h),j=w;128>o?d++:j=127<o&&2048>o?String.fromCharCode(o>>6|192,o&63|128):String.fromCharCode(o>>12|224,o>>6&63|128,o&63|128);j!==w&&(d>c&&(b+=a.substring(c,d)),b+=j,c=d=h+1)}d>c&&(b+=a.substring(c,a.length));return b};d.Yb=function(){function a(){function a(b,c){var d,g=0;for(d=0;d<c.length;d++)g|=h[d]<<8*d;return b^g}var b,d,h=[],o=0;for(b=0;b<A.length;b++)d=A.charCodeAt(b),h.unshift(d&
|
|
40
|
+
255),4<=h.length&&(o=a(o,h),h=[]);0<h.length&&(o=a(o,h));return o.toString(16)}function b(){for(var a=1*new Date,b=0;a==1*new Date;)b++;return a.toString(16)+b.toString(16)}return function(){var c=(ca.height*ca.width).toString(16);return b()+"-"+Math.random().toString(16).replace(".","")+"-"+a()+"-"+c+"-"+b()}}();var Ea="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".split(",");
|
|
41
|
+
d.Jc=function(a){var b,a=a.toLowerCase();for(b=0;b<Ea.length;b++)if(-1!==a.indexOf(Ea[b]))return p;return F};d.vd=function(a){var b,c,g,i=[];d.g(b)&&(b="&");d.a(a,function(a,b){c=encodeURIComponent(a.toString());g=encodeURIComponent(b);i[i.length]=g+"="+c});return i.join(b)};d.Dc=function(a,b){var b=b.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"),c=RegExp("[\\?&]"+b+"=([^&#]*)").exec(a);if(c===w||c&&"string"!==typeof c[1]&&c[1].length)return"";c=c[1];try{c=decodeURIComponent(c)}catch(d){n.error("Skipping decoding for malformed query param: "+
|
|
42
|
+
c)}return c.replace(/\+/g," ")};d.cookie={get:function(a){for(var a=a+"=",b=s.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];" "==d.charAt(0);)d=d.substring(1,d.length);if(0===d.indexOf(a))return decodeURIComponent(d.substring(a.length,d.length))}return w},parse:function(a){var b;try{b=d.ka(d.cookie.get(a))||{}}catch(c){}return b},gf:function(a,b,c,d,i,h,e){var j="",f="",x="";e?j="; domain="+e:d&&(j=(j=xa(s.location.hostname))?"; domain=."+j:"");c&&(f=new Date,f.setTime(f.getTime()+1E3*c),f=
|
|
43
|
+
"; expires="+f.toGMTString());h&&(i=p,x="; SameSite=None");i&&(x+="; secure");s.cookie=a+"="+encodeURIComponent(b)+f+"; path=/"+j+x},set:function(a,b,c,d,i,h,e){var j="",f="",x="";e?j="; domain="+e:d&&(j=(j=xa(s.location.hostname))?"; domain=."+j:"");c&&(f=new Date,f.setTime(f.getTime()+864E5*c),f="; expires="+f.toGMTString());h&&(i=p,x="; SameSite=None");i&&(x+="; secure");a=a+"="+encodeURIComponent(b)+f+"; path=/"+j+x;return s.cookie=a},remove:function(a,b,c){d.cookie.set(a,"",-1,b,F,F,c)}};var la=
|
|
44
|
+
w;d.localStorage={Ua:function(a){(a=ka(w,a))||n.error("localStorage unsupported; falling back to cookie store");return a},error:function(a){n.error("localStorage error: "+a)},get:function(a){try{return window.localStorage.getItem(a)}catch(b){d.localStorage.error(b)}return w},parse:function(a){try{return d.ka(d.localStorage.get(a))||{}}catch(b){}return w},set:function(a,b){try{window.localStorage.setItem(a,b)}catch(c){d.localStorage.error(c)}},remove:function(a){try{window.localStorage.removeItem(a)}catch(b){d.localStorage.error(b)}}};
|
|
45
|
+
d.ea=function(){function a(a,g,i){return function(h){if(h=h||b(window.event)){var e=p,j;d.Mb(i)&&(j=i(h));h=g.call(a,h);if(F===j||F===h)e=F;return e}}}function b(a){if(a)a.preventDefault=b.preventDefault,a.stopPropagation=b.stopPropagation;return a}b.preventDefault=function(){this.returnValue=F};b.stopPropagation=function(){this.cancelBubble=p};return function(b,d,i,h,e){b?b.addEventListener&&!h?b.addEventListener(d,i,!!e):(d="on"+d,b[d]=a(b,i,b[d])):n.error("No valid element provided to register_event")}}();
|
|
46
|
+
var Ya=/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/;d.ae=function(){function a(a,b){return 0<=(" "+a.className+" ").replace(c," ").indexOf(" "+b+" ")}function b(b){if(!s.getElementsByTagName)return[];var b=b.split(" "),c,h,e,j,f,x,B,r=[s];for(j=0;j<b.length;j++)if(c=b[j].replace(/^\s+/,"").replace(/\s+$/,""),-1<c.indexOf("#")){h=c.split("#");c=h[0];r=s.getElementById(h[1]);if(!r||c&&r.nodeName.toLowerCase()!=c)return[];r=[r]}else if(-1<c.indexOf(".")){h=c.split(".");c=h[0];var D=h[1];c||(c="*");
|
|
47
|
+
h=[];for(f=e=0;f<r.length;f++){B="*"==c?r[f].all?r[f].all:r[f].getElementsByTagName("*"):r[f].getElementsByTagName(c);for(x=0;x<B.length;x++)h[e++]=B[x]}r=[];for(f=c=0;f<h.length;f++)h[f].className&&d.ua(h[f].className)&&a(h[f],D)&&(r[c++]=h[f])}else if(h=c.match(Ya)){c=h[1];var n=h[2],D=h[3],k=h[4];c||(c="*");h=[];for(f=e=0;f<r.length;f++){B="*"==c?r[f].all?r[f].all:r[f].getElementsByTagName("*"):r[f].getElementsByTagName(c);for(x=0;x<B.length;x++)h[e++]=B[x]}r=[];c=0;switch(D){case "=":D=function(a){return a.getAttribute(n)==
|
|
48
|
+
k};break;case "~":D=function(a){return a.getAttribute(n).match(RegExp("\\b"+k+"\\b"))};break;case "|":D=function(a){return a.getAttribute(n).match(RegExp("^"+k+"-?"))};break;case "^":D=function(a){return 0===a.getAttribute(n).indexOf(k)};break;case "$":D=function(a){return a.getAttribute(n).lastIndexOf(k)==a.getAttribute(n).length-k.length};break;case "*":D=function(a){return-1<a.getAttribute(n).indexOf(k)};break;default:D=function(a){return a.getAttribute(n)}}r=[];for(f=c=0;f<h.length;f++)D(h[f])&&
|
|
49
|
+
(r[c++]=h[f])}else{h=[];for(f=e=0;f<r.length;f++){B=r[f].getElementsByTagName(c);for(x=0;x<B.length;x++)h[e++]=B[x]}r=h}return r}var c=/[\t\r\n]/g;return function(a){return d.me(a)?[a]:d.e(a)&&!d.g(a.length)?a:b.call(this,a)}}();d.info={Vd:function(){var a="",b={};d.a("utm_source utm_medium utm_campaign utm_content utm_term".split(" "),function(c){a=d.Dc(s.URL,c);a.length&&(b[c]=a)});return b},xe:function(a){return 0===a.search("https?://(.*)google.([^/?]*)")?"google":0===a.search("https?://(.*)bing.com")?
|
|
50
|
+
"bing":0===a.search("https?://(.*)yahoo.com")?"yahoo":0===a.search("https?://(.*)duckduckgo.com")?"duckduckgo":w},ye:function(a){var b=d.info.xe(a),c={};if(b!==w)c.$search_engine=b,a=d.Dc(a,"yahoo"!=b?"q":"p"),a.length&&(c.mp_keyword=a);return c},sa:function(a,b,c){return c||d.i(a," OPR/")?d.i(a,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(a)?"BlackBerry":d.i(a,"IEMobile")||d.i(a,"WPDesktop")?"Internet Explorer Mobile":d.i(a,"SamsungBrowser/")?"Samsung Internet":d.i(a,"Edge")||
|
|
51
|
+
d.i(a,"Edg/")?"Microsoft Edge":d.i(a,"FBIOS")?"Facebook Mobile":d.i(a,"Chrome")?"Chrome":d.i(a,"CriOS")?"Chrome iOS":d.i(a,"UCWEB")||d.i(a,"UCBrowser")?"UC Browser":d.i(a,"FxiOS")?"Firefox iOS":d.i(b||"","Apple")?d.i(a,"Mobile")?"Mobile Safari":"Safari":d.i(a,"Android")?"Android Mobile":d.i(a,"Konqueror")?"Konqueror":d.i(a,"Firefox")?"Firefox":d.i(a,"MSIE")||d.i(a,"Trident/")?"Internet Explorer":d.i(a,"Gecko")?"Mozilla":""},Ab:function(a,b,c){b={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,
|
|
52
|
+
Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,
|
|
53
|
+
Mozilla:/rv:(\d+(\.\d+)?)/}[d.info.sa(a,b,c)];if(b===m)return w;a=a.match(b);return!a?w:parseFloat(a[a.length-2])},Qb:function(){return/Windows/i.test(A)?/Phone/.test(A)||/WPDesktop/.test(A)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(A)?"iOS":/Android/.test(A)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(A)?"BlackBerry":/Mac/i.test(A)?"Mac OS X":/Linux/.test(A)?"Linux":/CrOS/.test(A)?"Chrome OS":""},Bc:function(a){return/Windows Phone/i.test(a)||/WPDesktop/.test(a)?"Windows Phone":/iPad/.test(a)?
|
|
54
|
+
"iPad":/iPod/.test(a)?"iPod Touch":/iPhone/.test(a)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(a)?"BlackBerry":/Android/.test(a)?"Android":""},Uc:function(a){a=a.split("/");return 3<=a.length?a[2]:""},xa:function(){return d.extend(d.ab({$os:d.info.Qb(),$browser:d.info.sa(A,J.vendor,W),$referrer:s.referrer,$referring_domain:d.info.Uc(s.referrer),$device:d.info.Bc(A)}),{$current_url:C.location.href,$browser_version:d.info.Ab(A,J.vendor,W),$screen_height:ca.height,$screen_width:ca.width,mp_lib:"web",
|
|
55
|
+
$lib_version:"2.43.0",$insert_id:ja(),time:d.timestamp()/1E3})},se:function(){return d.extend(d.ab({$os:d.info.Qb(),$browser:d.info.sa(A,J.vendor,W)}),{$browser_version:d.info.Ab(A,J.vendor,W)})},qe:function(a){return d.ab({mp_page:a,mp_referrer:s.referrer,mp_browser:d.info.sa(A,J.vendor,W),mp_platform:d.info.Qb()})}};var La=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,Ka=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,da=w,ea=w;if("undefined"!==typeof JSON)da=JSON.stringify,ea=JSON.parse;da=da||d.Ea;ea=ea||d.ka;d.toArray=
|
|
56
|
+
d.ga;d.isObject=d.e;d.JSONEncode=d.Ea;d.JSONDecode=d.ka;d.isBlockedUA=d.Jc;d.isEmptyObject=d.W;d.info=d.info;d.info.device=d.info.Bc;d.info.browser=d.info.sa;d.info.browserVersion=d.info.Ab;d.info.properties=d.info.xa;I.prototype.Pa=function(){};I.prototype.Fb=function(){};I.prototype.xb=function(){};I.prototype.Lb=function(a){this.Nc=a;return this};I.prototype.u=function(a,b,c,g){var i=this,h=d.ae(a);if(0===h.length)n.error("The DOM query ("+a+") returned 0 elements");else return d.a(h,function(a){d.ea(a,
|
|
57
|
+
this.Qc,function(a){var d={},h=i.Pa(c,this),f=i.Nc.c("track_links_timeout");i.Fb(a,this,d);window.setTimeout(i.kd(g,h,d,p),f);i.Nc.u(b,h,i.kd(g,h,d))})},this),p};I.prototype.kd=function(a,b,c,d){var d=d||F,i=this;return function(){if(!c.Ud)c.Ud=p,a&&a(d,b)===F||i.xb(b,c,d)}};I.prototype.Pa=function(a,b){return"function"===typeof a?a(b):d.extend({},a)};d.Ic(R,I);R.prototype.Pa=function(a,b){var c=R.Ne.Pa.apply(this,arguments);if(b.href)c.url=b.href;return c};R.prototype.Fb=function(a,b,c){c.Oc=2===
|
|
58
|
+
a.which||a.metaKey||a.ctrlKey||"_blank"===b.target;c.href=b.href;c.Oc||a.preventDefault()};R.prototype.xb=function(a,b){b.Oc||setTimeout(function(){window.location=b.href},0)};d.Ic(Z,I);Z.prototype.Fb=function(a,b,c){c.element=b;a.preventDefault()};Z.prototype.xb=function(a,b){setTimeout(function(){b.element.submit()},0)};var Za=ma("lock");wa.prototype.Xb=function(a,b,c){function d(){k.setItem(t,"1");try{a()}finally{k.removeItem(t),k.getItem(s)===v&&k.removeItem(s),k.getItem(q)===v&&k.removeItem(q)}}
|
|
59
|
+
function i(){k.setItem(q,v);f(h,function(){k.getItem(q)===v?d():e(function(){k.getItem(s)!==v?i():f(function(){return!k.getItem(t)},d)})})}function h(){var a=k.getItem(s);if(a&&a!==v)return F;k.setItem(s,v);if(k.getItem(s)===v)return p;ka(k,p)||l(Error("localStorage support dropped while acquiring lock"));return F}function f(a,b){a()?b():e(function(){f(a,b)})}function e(a){(new Date).getTime()-n>D?(Za.error("Timeout waiting for mutex on "+B+"; clearing lock. ["+v+"]"),k.removeItem(t),k.removeItem(s),
|
|
60
|
+
i()):setTimeout(function(){try{a()}catch(c){b&&b(c)}},r*(Math.random()+0.1))}!c&&"function"!==typeof b&&(c=b,b=w);var v=c||(new Date).getTime()+"|"+Math.random(),n=(new Date).getTime(),B=this.za,r=this.Tc,D=this.hd,k=this.h,q=B+":X",s=B+":Y",t=B+":Z";try{ka(k,p)?i():l(Error("localStorage support check failed"))}catch(u){b&&b(u)}};var K=ma("batch");M.prototype.Eb=function(a,b,c){var g={id:ja(),flushAfter:(new Date).getTime()+2*b,payload:a};this.Nb.Xb(d.bind(function(){var b;try{var d=this.Wa();d.push(g);
|
|
61
|
+
(b=this.Tb(d))&&this.X.push(g)}catch(f){K.error("Error enqueueing item",a),b=F}c&&c(b)},this),function(a){K.error("Error acquiring storage lock",a);c&&c(F)},this.Va)};M.prototype.ce=function(a){var b=this.X.slice(0,a);if(b.length<a){var c=this.Wa();if(c.length){var g={};d.a(b,function(a){g[a.id]=p});for(var i=0;i<c.length;i++){var h=c[i];if((new Date).getTime()>h.flushAfter&&!g[h.id]&&(h.pe=p,b.push(h),b.length>=a))break}}}return b};M.prototype.te=function(a,b){var c={};d.a(a,function(a){c[a]=p});
|
|
62
|
+
this.X=va(this.X,c);this.Nb.Xb(d.bind(function(){var d;try{var i=this.Wa(),i=va(i,c);d=this.Tb(i)}catch(h){K.error("Error removing items",a),d=F}b&&b(d)},this),function(a){K.error("Error acquiring storage lock",a);b&&b(F)},this.Va)};M.prototype.We=function(a){this.X=ua(this.X,a);this.Nb.Xb(d.bind(function(){try{var b=this.Wa(),b=ua(b,a);this.Tb(b)}catch(c){K.error("Error updating items",a)}},this),function(a){K.error("Error acquiring storage lock",a)},this.Va)};M.prototype.Wa=function(){var a;try{if(a=
|
|
63
|
+
this.h.getItem(this.za))a=ea(a),d.isArray(a)||(K.error("Invalid storage entry:",a),a=w)}catch(b){K.error("Error retrieving queue",b),a=w}return a||[]};M.prototype.Tb=function(a){try{return this.h.setItem(this.za,da(a)),p}catch(b){return K.error("Error saving queue",b),F}};M.prototype.clear=function(){this.X=[];this.h.removeItem(this.za)};var O=ma("batch");H.prototype.Eb=function(a,b){this.ya.Eb(a,this.Ra,b)};H.prototype.start=function(){this.$a=F;this.flush()};H.prototype.stop=function(){this.$a=
|
|
64
|
+
p;if(this.Vb)clearTimeout(this.Vb),this.Vb=w};H.prototype.clear=function(){this.ya.clear()};H.prototype.Xc=function(){this.qa=this.Q.batch_size};H.prototype.Xa=function(){this.Yc(this.Q.batch_flush_interval_ms)};H.prototype.Yc=function(a){this.Ra=a;if(!this.$a)this.Vb=setTimeout(d.bind(this.flush,this),this.Ra)};H.prototype.flush=function(a){try{if(this.Wc)O.log("Flush: Request already in progress");else{var a=a||{},b=this.Q.batch_request_timeout_ms,c=(new Date).getTime(),g=this.qa,i=this.ya.ce(g),
|
|
65
|
+
h=[],f={};d.a(i,function(a){var b=a.payload;this.Ka&&!a.pe&&(b=this.Ka(b));b&&h.push(b);f[a.id]=b},this);if(1>h.length)this.Xa();else{this.Wc=p;var e=d.bind(function(h){this.Wc=F;try{var e=F;if(a.md)this.ya.We(f);else if(d.e(h)&&"timeout"===h.error&&(new Date).getTime()-c>=b)O.error("Network timeout; retrying"),this.flush();else if(d.e(h)&&h.ja&&(500<=h.ja.status||429===h.ja.status||"timeout"===h.error)){var j=2*this.Ra,v=h.ja.responseHeaders;if(v){var k=v["Retry-After"];k&&(j=1E3*parseInt(k,10)||
|
|
66
|
+
j)}j=Math.min(6E5,j);O.error("Error; retry in "+j+" ms");this.Yc(j)}else if(d.e(h)&&h.ja&&413===h.ja.status)if(1<i.length){var n=Math.max(1,Math.floor(g/2));this.qa=Math.min(this.qa,n,i.length-1);O.error("413 response; reducing batch size to "+this.qa);this.Xa()}else O.error("Single-event request too large; dropping",i),this.Xc(),e=p;else e=p;e&&this.ya.te(d.map(i,function(a){return a.id}),d.bind(this.flush,this))}catch(x){O.error("Error handling API response",x),this.Xa()}},this),v={method:"POST",
|
|
67
|
+
rd:p,je:p,jd:b};if(a.md)v.eb="sendBeacon";O.log("MIXPANEL REQUEST:",h);this.Ae(h,v,e)}}}catch(k){O.error("Error flushing request queue",k),this.Xa()}};var Ra="__mp_opt_in_out_",E={$c:function(a,b){var c={},g={};d.e(a)?d.a(a,function(a,b){this.O(b)||(g[b]=a)},this):g[a]=b;c.$set=g;return c},nd:function(a){var b={},c=[];d.isArray(a)||(a=[a]);d.a(a,function(a){this.O(a)||c.push(a)},this);b.$unset=c;return b},cd:function(a,b){var c={},g={};d.e(a)?d.a(a,function(a,b){this.O(b)||(g[b]=a)},this):g[a]=b;
|
|
68
|
+
c.$set_once=g;return c},ld:function(a,b){var c={},g={};d.e(a)?d.a(a,function(a,b){this.O(b)||(g[b]=d.isArray(a)?a:[a])},this):g[a]=d.isArray(b)?b:[b];c.$union=g;return c},Qd:function(a,b){var c={},g={};d.e(a)?d.a(a,function(a,b){this.O(b)||(g[b]=a)},this):g[a]=b;c.$append=g;return c},Vc:function(a,b){var c={},g={};d.e(a)?d.a(a,function(a,b){this.O(b)||(g[b]=a)},this):g[a]=b;c.$remove=g;return c},df:function(){return{$delete:""}}};d.extend(t.prototype,E);t.prototype.pa=function(a,b,c){this.d=a;this.qb=
|
|
69
|
+
b;this.pb=c};t.prototype.set=S(function(a,b,c){var g=this.$c(a,b);d.e(a)&&(c=b);return this.l(g,c)});t.prototype.Za=S(function(a,b,c){var g=this.cd(a,b);d.e(a)&&(c=b);return this.l(g,c)});t.prototype.fb=S(function(a,b){return this.l(this.nd(a),b)});t.prototype.Aa=S(function(a,b,c){d.e(a)&&(c=b);return this.l(this.ld(a,b),c)});t.prototype["delete"]=S(function(a){return this.l({$delete:""},a)});t.prototype.remove=S(function(a,b,c){return this.l(this.Vc(a,b),c)});t.prototype.l=function(a,b){a.$group_key=
|
|
70
|
+
this.qb;a.$group_id=this.pb;a.$token=this.I("token");return this.d.wb({type:"groups",data:d.Db(a),T:this.I("api_host")+"/groups/",yb:this.d.z.he},b)};t.prototype.O=function(a){return"$group_key"===a||"$group_id"===a};t.prototype.I=function(a){return this.d.c(a)};t.prototype.toString=function(){return this.d.toString()+".group."+this.qb+"."+this.pb};t.prototype.remove=t.prototype.remove;t.prototype.set=t.prototype.set;t.prototype.set_once=t.prototype.Za;t.prototype.union=t.prototype.Aa;t.prototype.unset=
|
|
71
|
+
t.prototype.fb;t.prototype.toString=t.prototype.toString;var $a="__mps,__mpso,__mpus,__mpa,__mpap,__mpr,__mpu,$people_distinct_id,__alias,__cmpns,__timers".split(",");q.prototype.xa=function(){var a={};d.a(this.props,function(b,c){d.Gc($a,c)||(a[c]=b)});return a};q.prototype.load=function(){if(!this.disabled){var a=this.h.parse(this.name);a&&(this.props=d.extend({},a))}};q.prototype.Ye=function(a){var b=a.upgrade,c;if(b)c="mp_super_properties","string"===typeof b&&(c=b),b=this.h.parse(c),this.h.remove(c),
|
|
72
|
+
this.h.remove(c,p),b&&(this.props=d.extend(this.props,b.all,b.events));if(!a.cookie_name&&"mixpanel"!==a.name&&(c="mp_"+a.token+"_"+a.name,b=this.h.parse(c)))this.h.remove(c),this.h.remove(c,p),this.H(b);this.h===d.localStorage&&(b=d.cookie.parse(this.name),d.cookie.remove(this.name),d.cookie.remove(this.name,p),b&&this.H(b))};q.prototype.save=function(){this.disabled||(this.Cd(),this.h.set(this.name,d.Ea(this.props),this.Gb,this.Bb,this.Zc,this.yc,this.Oa))};q.prototype.remove=function(){this.h.remove(this.name,
|
|
73
|
+
F,this.Oa);this.h.remove(this.name,p,this.Oa)};q.prototype.clear=function(){this.remove();this.props={}};q.prototype.H=function(a,b,c){return d.e(a)?("undefined"===typeof b&&(b="None"),this.Gb="undefined"===typeof c?this.zc:c,d.a(a,function(a,c){if(!this.props.hasOwnProperty(c)||this.props[c]===b)this.props[c]=a},this),this.save(),p):F};q.prototype.w=function(a,b){return d.e(a)?(this.Gb="undefined"===typeof b?this.zc:b,d.extend(this.props,a),this.save(),p):F};q.prototype.Ba=function(a){a in this.props&&
|
|
74
|
+
(delete this.props[a],this.save())};q.prototype.Cd=d.o(function(){var a=this.props.__cmpns,b=G?6E4:36E5;if(a){for(var c in a)1*new Date-a[c]>b&&delete a[c];d.W(a)&&delete this.props.__cmpns}});q.prototype.Xe=function(){if(!this.rc)this.H(d.info.Vd()),this.rc=p};q.prototype.pd=function(a){this.w(d.info.ye(a))};q.prototype.Wb=function(a){this.H({$initial_referrer:a||"$direct",$initial_referring_domain:d.info.Uc(a)||"$direct"},"")};q.prototype.ge=function(){return d.ab({$initial_referrer:this.props.$initial_referrer,
|
|
75
|
+
$initial_referring_domain:this.props.$initial_referring_domain})};q.prototype.od=function(a){this.zc=this.Gb=a.cookie_expiration;this.bd(a.disable_persistence);this.De(a.cookie_domain);this.Ee(a.cross_site_cookie);this.Fe(a.cross_subdomain_cookie);this.Ie(a.secure_cookie)};q.prototype.bd=function(a){(this.disabled=a)?this.remove():this.save()};q.prototype.De=function(a){if(a!==this.Oa)this.remove(),this.Oa=a,this.save()};q.prototype.Ee=function(a){if(a!==this.yc)this.yc=a,this.remove(),this.save()};
|
|
76
|
+
q.prototype.Fe=function(a){if(a!==this.Bb)this.Bb=a,this.remove(),this.save()};q.prototype.ee=function(){return this.Bb};q.prototype.Ie=function(a){if(a!==this.Zc)this.Zc=a?p:F,this.remove(),this.save()};q.prototype.D=function(a,b){var c=this.ob(a),g=b[a],i=this.S("$set"),h=this.S("$set_once"),f=this.S("$unset"),e=this.S("$add"),v=this.S("$union"),k=this.S("$remove",[]),q=this.S("$append",[]);"__mps"===c?(d.extend(i,g),this.J("$add",g),this.J("$union",g),this.J("$unset",g)):"__mpso"===c?(d.a(g,function(a,
|
|
77
|
+
b){b in h||(h[b]=a)}),this.J("$unset",g)):"__mpus"===c?d.a(g,function(a){d.a([i,h,e,v],function(b){a in b&&delete b[a]});d.a(q,function(b){a in b&&delete b[a]});f[a]=p}):"__mpa"===c?(d.a(g,function(a,b){b in i?i[b]+=a:(b in e||(e[b]=0),e[b]+=a)},this),this.J("$unset",g)):"__mpu"===c?(d.a(g,function(a,b){d.isArray(a)&&(b in v||(v[b]=[]),v[b]=v[b].concat(a))}),this.J("$unset",g)):"__mpr"===c?(k.push(g),this.J("$append",g)):"__mpap"===c&&(q.push(g),this.J("$unset",g));n.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):");
|
|
78
|
+
n.log(b);this.save()};q.prototype.J=function(a,b){var c=this.Ia(a);d.g(c)||(d.a(b,function(b,i){"$append"===a||"$remove"===a?d.a(c,function(a){a[i]===b&&delete a[i]}):delete c[i]},this),this.save())};q.prototype.ob=function(a){if("$set"===a)return"__mps";if("$set_once"===a)return"__mpso";if("$unset"===a)return"__mpus";if("$add"===a)return"__mpa";if("$append"===a)return"__mpap";if("$remove"===a)return"__mpr";if("$union"===a)return"__mpu";n.error("Invalid queue:",a)};q.prototype.Ia=function(a){return this.props[this.ob(a)]};
|
|
79
|
+
q.prototype.S=function(a,b){var c=this.ob(a),b=d.g(b)?{}:b;return this.props[c]||(this.props[c]=b)};q.prototype.Ge=function(a){var b=this.props.__timers||{};b[a]=(new Date).getTime();this.props.__timers=b;this.save()};q.prototype.ue=function(a){var b=(this.props.__timers||{})[a];d.g(b)||(delete this.props.__timers[a],this.save());return b};f.Y=200;f.B="mixpanel-notification";f.Da=0.6;f.N=25;f.Fa=200;f.la=388;f.hb=420;f.C=85;f.ib=5;f.R=60;f.jb=Math.round(f.R/2);f.xd=595;f.wd=334;f.prototype.show=function(){var a=
|
|
80
|
+
this;this.lc();this.q?(this.Hd(),this.Gd(),this.Kd(this.yd)):setTimeout(function(){a.show()},300)};f.prototype.Cb=d.o(function(){this.Lc||this.hc({invisible:p});var a=this.Ke?this.k("video"):this.ba();if(this.qd)this.Ld("bg","visible"),this.Z(a,"exiting"),setTimeout(this.jc,f.Y);else{var b,c,d;this.v?(b="right",c=20,d=-100):(b="top",c=f.N,d=f.Fa+f.N);this.Ga([{s:this.k("bg"),p:"opacity",start:f.Da,m:0},{s:a,p:"opacity",start:1,m:0},{s:a,p:b,start:c,m:d}],f.Y,this.jc)}});f.prototype.Z=d.o(function(a,
|
|
81
|
+
b){b=f.B+"-"+b;"string"===typeof a&&(a=this.k(a));a.className?~(" "+a.className+" ").indexOf(" "+b+" ")||(a.className+=" "+b):a.className=b});f.prototype.Ld=d.o(function(a,b){b=f.B+"-"+b;"string"===typeof a&&(a=this.k(a));if(a.className)a.className=(" "+a.className+" ").replace(" "+b+" ","").replace(/^[\s\xA0]+/,"").replace(/[\s\xA0]+$/,"")});f.prototype.Ga=d.o(function(a,b,c,d){var i=this,h=F,f,e;f=1*new Date;var k,d=d||f;k=f-d;for(f=0;f<a.length;f++){e=a[f];if("undefined"===typeof e.M)e.M=e.start;
|
|
82
|
+
if(e.M!==e.m){var h=p,n=e.m>=e.start?1:-1;e.M=e.start+(e.m-e.start)*k/b;if("opacity"!==e.p)e.M=Math.round(e.M);if(0<n&&e.M>=e.m||0>n&&e.M<=e.m)e.M=e.m}}if(h){for(f=0;f<a.length;f++)e=a[f],e.s&&(e.s.style[e.p]=""+e.M+("opacity"===e.p?"":"px"));setTimeout(function(){i.Ga(a,b,c,d)},10)}else c&&c()});f.prototype.yd=d.o(function(){var a=this;if(!this.Le&&!this.ec()[this.K])this.Le=p,this.q.appendChild(this.wa),setTimeout(function(){var b=a.ba();if(a.qd)a.v||a.Z("bg","visible"),a.Z(b,"visible"),a.gc();
|
|
83
|
+
else{var c,d,i;a.v?(c="right",d=-100,i=20):(c="top",d=f.Fa+f.N,i=f.N);a.Ga([{s:a.k("bg"),p:"opacity",start:0,m:f.Da},{s:b,p:"opacity",start:0,m:1},{s:b,p:c,start:d,m:i}],f.Y,a.gc)}},100),d.ea(a.k("cancel"),"click",function(b){b.preventDefault();a.Cb()}),d.ea(a.k("button")||a.k("mini-content"),"click",function(b){b.preventDefault();a.fa?(a.vb("$campaign_open",{$resource_type:"video"}),a.Md()):(a.Cb(),a.Na&&(b=w,a.da.c("inapp_link_new_window")?window.open(a.ca):b=function(){window.location.href=a.ca},
|
|
84
|
+
a.vb("$campaign_open",{$resource_type:"link"},b)))})});f.prototype.k=function(a){return document.getElementById(f.B+"-"+a)};f.prototype.ba=function(){return this.k(this.va)};f.prototype.ec=function(){return this.Rb.props.__cmpns||(this.Rb.props.__cmpns={})};f.prototype.Jd=d.o(function(a){for(var b=a.event||"",c=0;c<this.Cc.length;c++){var g=this.Cc[c];if("$any_event"===(g.event||"")||b===g.event)if(g.selector&&!d.W(g.selector)){if(u(g.selector,a.properties))return p}else return p}return F});f.prototype.$=
|
|
85
|
+
function(a,b){return this.F[a]&&this.F[a]<=b};f.prototype.Fd=function(){var a=[];this.v?(this.A=this.A||this.Ma+"/site_media/images/icons/notifications/mini-news-dark.png",a.push(this.A)):(this.Kb?(a.push(this.Kb),this.Fc='<img id="img" src="'+this.Kb+'"/>'):this.Fc="",this.A?(a.push(this.A),this.gd='<div id="thumbborder-wrapper"><div id="thumbborder"></div></div><img id="thumbnail" src="'+this.A+'" width="'+f.R+'" height="'+f.R+'"/><div id="thumbspacer"></div>'):this.gd="");return a};f.prototype.Gd=
|
|
86
|
+
function(){var a="",b="",c="";this.wa=document.createElement("div");this.wa.id=f.B+"-wrapper";if(this.v)a='<div id="mini"><div id="mainbox"><div id="cancel"><div id="cancel-icon"></div></div><div id="mini-content"><div id="mini-icon"><div id="mini-icon-img"></div></div><div id="body"><div id="body-text"><div>'+this.body+'</div></div></div></div></div><div id="mini-border"></div></div>';else{var a=this.Na||this.fa?"":'<div id="button-close"></div>',d=this.fa?'<div id="button-play"></div>':"";this.$("ie",
|
|
87
|
+
7)&&(d=a="");a='<div id="takeover">'+this.gd+'<div id="mainbox"><div id="cancel"><div id="cancel-icon"></div></div><div id="content">'+this.Fc+'<div id="title">'+this.title+'</div><div id="body">'+this.body+'</div><div id="tagline"><a href="http://mixpanel.com?from=inapp" target="_blank">POWERED BY MIXPANEL</a></div></div><div id="button">'+a+'<a id="button-link" href="'+this.ca+'">'+this.Xd+"</a>"+d+"</div></div></div>"}this.td?(b=this.Ya+"www.youtube.com/embed/"+this.td+"?wmode=transparent&showinfo=0&modestbranding=0&rel=0&autoplay=1&loop=0&vq=hd1080",
|
|
88
|
+
this.ud&&(b+="&enablejsapi=1&html5=1&controls=0",c='<div id="video-controls"><div id="video-progress" class="video-progress-el"><div id="video-progress-total" class="video-progress-el"></div><div id="video-elapsed" class="video-progress-el"></div></div><div id="video-time" class="video-progress-el"></div></div>')):this.sd&&(b=this.Ya+"player.vimeo.com/video/"+this.sd+"?autoplay=1&title=0&byline=0&portrait=0");if(this.fa)this.af='<iframe id="'+f.B+'-video-frame" width="'+this.Ca+'" height="'+this.ia+
|
|
89
|
+
'" src="'+b+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen="1" scrolling="no"></iframe>',c='<div id="video-'+(this.Hb?"":"no")+'flip"><div id="video"><div id="video-holder"></div>'+c+"</div></div>";b=c+a;this.Hb&&(b=(this.v?a:"")+'<div id="flipcontainer"><div id="flipper">'+(this.v?c:b)+"</div></div>");this.wa.innerHTML=('<div id="overlay" class="'+this.va+'"><div id="campaignid-'+this.K+'"><div id="bgwrapper"><div id="bg"></div>'+b+"</div></div></div>").replace(/class="/g,
|
|
90
|
+
'class="'+f.B+"-").replace(/id="/g,'id="'+f.B+"-")};f.prototype.Hd=function(){this.j="dark"===this.style?{zb:"#1d1f25",ra:"#282b32",La:"#3a4147",qc:"#4a5157",Td:"#32353c",sc:"0.4",Ob:"#2a3137",cb:"#fff",Ub:"#9498a3",fd:"#464851",bb:"#ddd"}:{zb:"#fff",ra:"#e7eaee",La:"#eceff3",qc:"#f5f5f5",Td:"#e4ecf2",sc:"1.0",Ob:"#fafafa",cb:"#5c6578",Ub:"#8b949b",fd:"#ced9e6",bb:"#7c8598"};var a="0px 0px 35px 0px rgba(45, 49, 56, 0.7)",b=a,c=a,g=f.R+2*f.ib,i=f.Y/1E3+"s";this.v&&(a="none");var e={};e["@media only screen and (max-width: "+
|
|
91
|
+
(f.hb+20-1)+"px)"]={"#overlay":{display:"none"}};a={".flipped":{transform:"rotateY(180deg)"},"#overlay":{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",overflow:"auto","text-align":"center","z-index":"10000","font-family":'"Helvetica", "Arial", sans-serif',"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"},"#overlay.mini":{height:"0",overflow:"visible"},"#overlay a":{width:"initial",padding:"0","text-decoration":"none","text-transform":"none",color:"inherit"},
|
|
92
|
+
"#bgwrapper":{position:"relative",width:"100%",height:"100%"},"#bg":{position:"fixed",top:"0",left:"0",width:"100%",height:"100%","min-width":4*this.$d+"px","min-height":4*this.Zd+"px","background-color":"black",opacity:"0.0","-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)",filter:"alpha(opacity=60)",transition:"opacity "+i},"#bg.visible":{opacity:f.Da},".mini #bg":{width:"0",height:"0","min-width":"0"},"#flipcontainer":{perspective:"1000px",position:"absolute",width:"100%"},"#flipper":{position:"relative",
|
|
93
|
+
"transform-style":"preserve-3d",transition:"0.3s"},"#takeover":{position:"absolute",left:"50%",width:f.la+"px","margin-left":Math.round(-f.la/2)+"px","backface-visibility":"hidden",transform:"rotateY(0deg)",opacity:"0.0",top:f.Fa+"px",transition:"opacity "+i+", top "+i},"#takeover.visible":{opacity:"1.0",top:f.N+"px"},"#takeover.exiting":{opacity:"0.0",top:f.Fa+"px"},"#thumbspacer":{height:f.jb+"px"},"#thumbborder-wrapper":{position:"absolute",top:-f.ib+"px",left:f.la/2-f.jb-f.ib+"px",width:g+"px",
|
|
94
|
+
height:g/2+"px",overflow:"hidden"},"#thumbborder":{position:"absolute",width:g+"px",height:g+"px","border-radius":g+"px","background-color":this.j.ra,opacity:"0.5"},"#thumbnail":{position:"absolute",top:"0px",left:f.la/2-f.jb+"px",width:f.R+"px",height:f.R+"px",overflow:"hidden","z-index":"100","border-radius":f.R+"px"},"#mini":{position:"absolute",right:"20px",top:f.N+"px",width:this.oe+"px",height:2*f.C+"px","margin-top":20-f.C+"px","backface-visibility":"hidden",opacity:"0.0",transform:"rotateX(90deg)",
|
|
95
|
+
transition:"opacity 0.3s, transform 0.3s, right 0.3s"},"#mini.visible":{opacity:"1.0",transform:"rotateX(0deg)"},"#mini.exiting":{opacity:"0.0",right:"-150px"},"#mainbox":{"border-radius":"4px","box-shadow":a,"text-align":"center","background-color":this.j.zb,"font-size":"14px",color:this.j.Ub},"#mini #mainbox":{height:f.C+"px","margin-top":f.C+"px","border-radius":"3px",transition:"background-color "+i},"#mini-border":{height:f.C+6+"px",width:f.hb+6+"px",position:"absolute",top:"-3px",left:"-3px",
|
|
96
|
+
"margin-top":f.C+"px","border-radius":"6px",opacity:"0.25","background-color":"#fff","z-index":"-1","box-shadow":c},"#mini-icon":{position:"relative",display:"inline-block",width:"75px",height:f.C+"px","border-radius":"3px 0 0 3px","background-color":this.j.ra,background:"linear-gradient(135deg, "+this.j.qc+" 0%, "+this.j.ra+" 100%)",transition:"background-color "+i},"#mini:hover #mini-icon":{"background-color":this.j.Ob},"#mini:hover #mainbox":{"background-color":this.j.Ob},"#mini-icon-img":{position:"absolute",
|
|
97
|
+
"background-image":"url("+this.A+")",width:"48px",height:"48px",top:"20px",left:"12px"},"#content":{padding:"30px 20px 0px 20px"},"#mini-content":{"text-align":"left",height:f.C+"px",cursor:"pointer"},"#img":{width:"328px","margin-top":"30px","border-radius":"5px"},"#title":{"max-height":"600px",overflow:"hidden","word-wrap":"break-word",padding:"25px 0px 20px 0px","font-size":"19px","font-weight":"bold",color:this.j.cb},"#body":{"max-height":"600px","margin-bottom":"25px",overflow:"hidden","word-wrap":"break-word",
|
|
98
|
+
"line-height":"21px","font-size":"15px","font-weight":"normal","text-align":"left"},"#mini #body":{display:"inline-block","max-width":"250px",margin:"0 0 0 30px",height:f.C+"px","font-size":"16px","letter-spacing":"0.8px",color:this.j.cb},"#mini #body-text":{display:"table",height:f.C+"px"},"#mini #body-text div":{display:"table-cell","vertical-align":"middle"},"#tagline":{"margin-bottom":"15px","font-size":"10px","font-weight":"600","letter-spacing":"0.8px",color:"#ccd7e0","text-align":"left"},"#tagline a":{color:this.j.fd,
|
|
99
|
+
transition:"color "+i},"#tagline a:hover":{color:this.j.bb},"#cancel":{position:"absolute",right:"0",width:"8px",height:"8px",padding:"10px","border-radius":"20px",margin:"12px 12px 0 0","box-sizing":"content-box",cursor:"pointer",transition:"background-color "+i},"#mini #cancel":{margin:"7px 7px 0 0"},"#cancel-icon":{width:"8px",height:"8px",overflow:"hidden","background-image":"url("+this.Ma+"/site_media/images/icons/notifications/cancel-x.png)",opacity:this.j.sc},"#cancel:hover":{"background-color":this.j.La},
|
|
100
|
+
"#button":{display:"block",height:"60px","line-height":"60px","text-align":"center","background-color":this.j.ra,"border-radius":"0 0 4px 4px",overflow:"hidden",cursor:"pointer",transition:"background-color "+i},"#button-close":{display:"inline-block",width:"9px",height:"60px","margin-right":"8px","vertical-align":"top","background-image":"url("+this.Ma+"/site_media/images/icons/notifications/close-x-"+this.style+".png)","background-repeat":"no-repeat","background-position":"0px 25px"},"#button-play":{display:"inline-block",
|
|
101
|
+
width:"30px",height:"60px","margin-left":"15px","background-image":"url("+this.Ma+"/site_media/images/icons/notifications/play-"+this.style+"-small.png)","background-repeat":"no-repeat","background-position":"0px 15px"},"a#button-link":{display:"inline-block","vertical-align":"top","text-align":"center","font-size":"17px","font-weight":"bold",overflow:"hidden","word-wrap":"break-word",color:this.j.cb,transition:"color "+i},"#button:hover":{"background-color":this.j.La,color:this.j.bb},"#button:hover a":{color:this.j.bb},
|
|
102
|
+
"#video-noflip":{position:"relative",top:2*-this.ia+"px"},"#video-flip":{"backface-visibility":"hidden",transform:"rotateY(180deg)"},"#video":{position:"absolute",width:this.Ca-1+"px",height:this.ia+"px",top:f.N+"px","margin-top":"100px",left:"50%","margin-left":Math.round(-this.Ca/2)+"px",overflow:"hidden","border-radius":"5px","box-shadow":b,transform:"translateZ(1px)",transition:"opacity "+i+", top "+i},"#video.exiting":{opacity:"0.0",top:this.ia+"px"},"#video-holder":{position:"absolute",width:this.Ca-
|
|
103
|
+
1+"px",height:this.ia+"px",overflow:"hidden","border-radius":"5px"},"#video-frame":{"margin-left":"-1px",width:this.Ca+"px"},"#video-controls":{opacity:"0",transition:"opacity 0.5s"},"#video:hover #video-controls":{opacity:"1.0"},"#video .video-progress-el":{position:"absolute",bottom:"0",height:"25px","border-radius":"0 0 0 5px"},"#video-progress":{width:"90%"},"#video-progress-total":{width:"100%","background-color":this.j.zb,opacity:"0.7"},"#video-elapsed":{width:"0","background-color":"#6cb6f5",
|
|
104
|
+
opacity:"0.9"},"#video #video-time":{width:"10%",right:"0","font-size":"11px","line-height":"25px",color:this.j.Ub,"background-color":"#666","border-radius":"0 0 5px 0"}};this.$("ie",8)&&d.extend(a,{"* html #overlay":{position:"absolute"},"* html #bg":{position:"absolute"},"html, body":{height:"100%"}});this.$("ie",7)&&d.extend(a,{"#mini #body":{display:"inline",zoom:"1",border:"1px solid "+this.j.La},"#mini #body-text":{padding:"20px"},"#mini #mini-icon":{display:"none"}});var b="backface-visibility,border-radius,box-shadow,opacity,perspective,transform,transform-style,transition".split(","),
|
|
105
|
+
c=["khtml","moz","ms","o","webkit"],o;for(o in a)for(g=0;g<b.length;g++)if(i=b[g],i in a[o])for(var j=a[o][i],k=0;k<c.length;k++)a[o]["-"+c[k]+"-"+i]=j;(function(a,b){function c(a){var b="",d;for(d in a){var g=d.replace(/#/g,"#"+f.B+"-").replace(/\./g,"."+f.B+"-"),b=b+("\n"+g+" {"),g=a[d],i;for(i in g)b+=i+":"+g[i]+";";b+="}"}return b}var d=c(a)+function(a){var b="",d;for(d in a)b+="\n"+d+" {"+c(a[d])+"\n}";return b}(b),g=document.head||document.getElementsByTagName("head")[0]||document.documentElement,
|
|
106
|
+
i=document.createElement("style");g.appendChild(i);i.setAttribute("type","text/css");i.styleSheet?i.styleSheet.cssText=d:i.textContent=d})(a,e)};f.prototype.Id=d.o(function(){if(this.gb){var a=this;a.ud="postMessage"in window;a.ca=a.gb;var b=a.gb.match(/(?:youtube(?:-nocookie)?\.com\/(?:[^/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?/ ]{11})/i),c=a.gb.match(/vimeo\.com\/.*?(\d+)/i);if(b){if(a.fa=p,a.td=b[1],a.ud)window.onYouTubeIframeAPIReady=function(){a.k("video-frame")&&a.oc()},b=document.createElement("script"),
|
|
107
|
+
b.src=a.Ya+"www.youtube.com/iframe_api",c=document.getElementsByTagName("script")[0],c.parentNode.insertBefore(b,c)}else if(c)a.fa=p,a.sd=c[1];if(a.$("ie",7)||a.$("firefox",3))a.fa=F,a.Na=p}});f.prototype.gc=d.o(function(){function a(a,b){var c={};if(document.defaultView&&document.defaultView.getComputedStyle)c=document.defaultView.getComputedStyle(a,w);else if(a.currentStyle)c=a.currentStyle;return c[b]}var b=this;d.ea(b.k("bg"),"click",function(){b.Cb()});if(this.K){var c=this.k("overlay");c&&"hidden"!==
|
|
108
|
+
a(c,"visibility")&&"none"!==a(c,"display")&&this.hc()}});f.prototype.hc=d.o(function(a){if(!this.Lc)this.Lc=p,this.K&&(this.ec()[this.K]=1*new Date,this.Rb.save()),this.vb("$campaign_delivery",a),this.da.people.append({$campaigns:this.K,$notifications:{campaign_id:this.K,message_id:this.Mc,type:"web",time:new Date}})});f.prototype.Kd=function(a){var b=this;if(0===this.Ta.length)a();else{for(var c=0,d=[],i=function(){c++;c===b.Ta.length&&a&&(a(),a=w)},e=0;e<this.Ta.length;e++){var f=new Image;f.onload=
|
|
109
|
+
i;f.src=this.Ta[e];f.complete&&i();d.push(f)}this.$("ie",7)&&setTimeout(function(){var b=p;for(e=0;e<d.length;e++)d[e].complete||(b=F);b&&a&&(a(),a=w)},500)}};f.prototype.jc=d.o(function(){window.clearInterval(this.Nd);this.wa.style.visibility="hidden";this.q.removeChild(this.wa)});f.prototype.lc=function(){function a(a){if(a in d)return p;if(!c)for(var a=a[0].toUpperCase()+a.slice(1),a=["O"+a,"Webkit"+a,"Moz"+a],b=0;b<a.length;b++)if(a[b]in d)return p;return F}function b(a){return(a=navigator.userAgent.match(a))&&
|
|
110
|
+
a[1]}this.F={};this.F.chrome=b(/Chrome\/(\d+)/);this.F.firefox=b(/Firefox\/(\d+)/);this.F.ie=b(/MSIE (\d+).+/);!this.F.ie&&!window.ActiveXObject&&"ActiveXObject"in window&&(this.F.ie=11);if(this.q=document.body||document.getElementsByTagName("body")[0])this.$d=Math.max(this.q.scrollWidth,document.documentElement.scrollWidth,this.q.offsetWidth,document.documentElement.offsetWidth,this.q.clientWidth,document.documentElement.clientWidth),this.Zd=Math.max(this.q.scrollHeight,document.documentElement.scrollHeight,
|
|
111
|
+
this.q.offsetHeight,document.documentElement.offsetHeight,this.q.clientHeight,document.documentElement.clientHeight);var c=this.F.ie,d=document.createElement("div").style;this.qd=this.q&&a("transition")&&a("transform");this.Hb=(33<=this.F.chrome||15<=this.F.firefox)&&this.q&&a("backfaceVisibility")&&a("perspective")&&a("transform")};f.prototype.Md=d.o(function(){function a(){window.YT&&window.YT.loaded&&b.oc();b.Ke=p;b.ba().style.visibility="hidden"}var b=this,c=[{s:b.ba(),p:"opacity",start:1,m:0},
|
|
112
|
+
{s:b.ba(),p:"top",start:f.N,m:-500},{s:b.k("video-noflip"),p:"opacity",start:0,m:1},{s:b.k("video-noflip"),p:"top",start:2*-b.ia,m:0}];if(b.v){var d=b.k("bg"),e=b.k("overlay");d.style.width="100%";d.style.height="100%";e.style.width="100%";b.Z(b.ba(),"exiting");b.Z(d,"visible");c.push({s:b.k("bg"),p:"opacity",start:0,m:f.Da})}b.k("video-holder").innerHTML=b.af;b.Hb?(b.Z("flipper","flipped"),setTimeout(a,f.Y)):b.Ga(c,f.Y,a)});f.prototype.vb=function(a,b,c){this.K?(b=b||{},b=d.extend(b,{campaign_id:this.K,
|
|
113
|
+
message_id:this.Mc,message_type:"web_inapp",message_subtype:this.va}),this.da.track(a,b,c)):c&&c.call()};f.prototype.oc=d.o(function(){var a=this;if(!a.bf){a.bf=p;var b=a.k("video-elapsed"),c=a.k("video-time"),g=a.k("video-progress");new window.YT.Player(f.B+"-video-frame",{events:{onReady:function(e){function f(a){var a=Math.round(j-a),b=Math.floor(a/60),d=Math.floor(b/60),a=a-60*b;c.innerHTML="-"+(d?d+":":"")+("00"+(b-60*d)).slice(-2)+":"+("00"+a).slice(-2)}var o=e.target,j=o.getDuration();f(0);
|
|
114
|
+
a.Nd=window.setInterval(function(){var a=o.getCurrentTime();b.style.width=100*(a/j)+"%";f(a)},250);d.ea(g,"click",function(a){a=Math.max(0,a.pageX-g.getBoundingClientRect().left);o.seekTo(j*a/g.clientWidth,p)})}}})}});d.extend(k.prototype,E);k.prototype.pa=function(a){this.d=a};k.prototype.set=N(function(a,b,c){var g=this.$c(a,b);d.e(a)&&(c=b);this.I("save_referrer")&&this.d.persistence.Wb(document.referrer);g.$set=d.extend({},d.info.se(),this.d.persistence.ge(),g.$set);return this.l(g,c)});k.prototype.Za=
|
|
115
|
+
N(function(a,b,c){var g=this.cd(a,b);d.e(a)&&(c=b);return this.l(g,c)});k.prototype.fb=N(function(a,b){return this.l(this.nd(a),b)});k.prototype.Hc=N(function(a,b,c){var g={},e={};d.e(a)?(d.a(a,function(a,b){this.O(b)||(isNaN(parseFloat(a))?n.error("Invalid increment value passed to mixpanel.people.increment - must be a number"):e[b]=a)},this),c=b):(d.g(b)&&(b=1),e[a]=b);g.$add=e;return this.l(g,c)});k.prototype.append=N(function(a,b,c){d.e(a)&&(c=b);return this.l(this.Qd(a,b),c)});k.prototype.remove=
|
|
116
|
+
N(function(a,b,c){d.e(a)&&(c=b);return this.l(this.Vc(a,b),c)});k.prototype.Aa=N(function(a,b,c){d.e(a)&&(c=b);return this.l(this.ld(a,b),c)});k.prototype.Re=N(function(a,b,c){if(!d.Kc(a)&&(a=parseFloat(a),isNaN(a))){n.error("Invalid value passed to mixpanel.people.track_charge - must be a number");return}return this.append("$transactions",d.extend({$amount:a},b),c)});k.prototype.tc=function(a){return this.set("$transactions",[],a)};k.prototype.Ac=function(){if(this.rb())return this.l({$delete:this.d.V()});
|
|
117
|
+
n.error("mixpanel.people.delete_user() requires you to call identify() first")};k.prototype.toString=function(){return this.d.toString()+".people"};k.prototype.l=function(a,b){a.$token=this.I("token");a.$distinct_id=this.d.V();var c=this.d.G("$device_id"),e=this.d.G("$user_id"),f=this.d.G("$had_persisted_distinct_id");c&&(a.$device_id=c);e&&(a.$user_id=e);f&&(a.$had_persisted_distinct_id=f);c=d.Db(a);return!this.rb()?(this.Bd(a),d.g(b)||(this.I("verbose")?b({status:-1,error:w}):b(-1)),d.truncate(c,
|
|
118
|
+
255)):this.d.wb({type:"people",data:c,T:this.I("api_host")+"/engage/",yb:this.d.z.re},b)};k.prototype.I=function(a){return this.d.c(a)};k.prototype.rb=function(){return this.d.aa.Jb===p};k.prototype.Bd=function(a){"$set"in a?this.d.persistence.D("$set",a):"$set_once"in a?this.d.persistence.D("$set_once",a):"$unset"in a?this.d.persistence.D("$unset",a):"$add"in a?this.d.persistence.D("$add",a):"$append"in a?this.d.persistence.D("$append",a):"$remove"in a?this.d.persistence.D("$remove",a):"$union"in
|
|
119
|
+
a?this.d.persistence.D("$union",a):n.error("Invalid call to _enqueue():",a)};k.prototype.na=function(a,b,c,e){var f=this,h=d.extend({},this.d.persistence.Ia(a)),o=h;!d.g(h)&&d.e(h)&&!d.W(h)&&(f.d.persistence.J(a,h),e&&(o=e(h)),b.call(f,o,function(b,e){0===b&&f.d.persistence.D(a,h);d.g(c)||c(b,e)}))};k.prototype.Dd=function(a,b,c,e,f,h,o){var j=this,k=this.d.persistence.Ia("$append"),n=this.d.persistence.Ia("$remove");this.na("$set",this.set,a);this.na("$set_once",this.Za,e);this.na("$unset",this.fb,
|
|
120
|
+
h,function(a){return d.keys(a)});this.na("$add",this.Hc,b);this.na("$union",this.Aa,f);if(!d.g(k)&&d.isArray(k)&&k.length){for(var q,a=function(a,b){0===a&&j.d.persistence.D("$append",q);d.g(c)||c(a,b)},b=k.length-1;0<=b;b--)q=k.pop(),d.W(q)||j.append(q,a);j.d.persistence.save()}if(!d.g(n)&&d.isArray(n)&&n.length){for(var r,k=function(a,b){0===a&&j.d.persistence.D("$remove",r);d.g(o)||o(a,b)},a=n.length-1;0<=a;a--)r=n.pop(),d.W(r)||j.remove(r,k);j.d.persistence.save()}};k.prototype.O=function(a){return"$distinct_id"===
|
|
121
|
+
a||"$token"===a||"$device_id"===a||"$user_id"===a||"$had_persisted_distinct_id"===a};k.prototype.set=k.prototype.set;k.prototype.set_once=k.prototype.Za;k.prototype.unset=k.prototype.fb;k.prototype.increment=k.prototype.Hc;k.prototype.append=k.prototype.append;k.prototype.remove=k.prototype.remove;k.prototype.union=k.prototype.Aa;k.prototype.track_charge=k.prototype.Re;k.prototype.clear_charges=k.prototype.tc;k.prototype.delete_user=k.prototype.Ac;k.prototype.toString=k.prototype.toString;var ha,
|
|
122
|
+
y,T=C.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,ta=!T&&-1===A.indexOf("MSIE")&&-1===A.indexOf("Mozilla"),fa=w;J.sendBeacon&&(fa=function(){return J.sendBeacon.apply(J,arguments)});var Fa={api_host:"https://api-js.mixpanel.com",api_method:"POST",api_transport:"XHR",api_payload_format:"base64",app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:F,cross_subdomain_cookie:p,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:Y,store_google:p,
|
|
123
|
+
save_referrer:p,test:F,verbose:F,img:F,debug:F,track_links_timeout:300,cookie_expiration:365,upgrade:F,disable_persistence:F,disable_cookie:F,secure_cookie:F,ip:p,opt_out_tracking_by_default:F,opt_out_persistence_by_default:F,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:w,property_blacklist:[],xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:F,ignore_dnt:F,batch_requests:p,batch_size:50,batch_flush_interval_ms:5E3,batch_request_timeout_ms:9E4,batch_autostart:p,
|
|
124
|
+
hooks:{}},sa=F;e.prototype.Lb=function(a,b,c){if(d.g(c))n.error("You must name your new library: init(token, config, name)");else if("mixpanel"===c)n.error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");else return a=X(a,b,c),y[c]=a,a.Ja(),a};e.prototype.pa=function(a,b,c){b=b||{};this.__loaded=p;this.config={};this._triggered_notifs=[];var e={};"api_payload_format"in b||(b.api_host||Fa.api_host).match(/\.mixpanel\.com$/)&&(e.api_payload_format="json");
|
|
125
|
+
this.ad(d.extend({},Fa,e,b,{name:c,token:a,callback_fn:("mixpanel"===c?c:"mixpanel."+c)+"._jsc"}));this._jsc=Y;this.lb=[];this.mb=[];this.kb=[];this.aa={disable_all_events:F,identify_called:F};this.z={};if(this.ma=this.c("batch_requests"))if(!d.localStorage.Ua(p)||!T)this.ma=F,n.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support");else if(this.ke(),fa&&C.addEventListener){var f=d.bind(function(){this.z.Qa.$a||this.z.Qa.flush({md:p})},this);C.addEventListener("pagehide",
|
|
126
|
+
function(a){a.persisted&&f()});C.addEventListener("visibilitychange",function(){"hidden"===s.visibilityState&&f()})}this.persistence=this.cookie=new q(this.config);this.ha={};this.Ed();a=d.Yb();this.V()||this.H({distinct_id:a,$device_id:a},"")};e.prototype.Ja=function(){this.c("loaded")(this);this.mc()};e.prototype.mc=function(){this.persistence.pd(s.referrer);this.c("store_google")&&this.persistence.Xe();this.c("save_referrer")&&this.persistence.Wb(s.referrer)};e.prototype.Ad=function(){d.a(this.lb,
|
|
127
|
+
function(a){this.ub.apply(this,a)},this);this.ta()||d.a(this.mb,function(a){this.l.apply(this,a)},this);delete this.lb;delete this.mb};e.prototype.ub=function(a,b){if(this.c("img"))return n.error("You can't use DOM tracking functions with img = true."),F;if(!sa)return this.lb.push([a,b]),F;var c=(new a).Lb(this);return c.u.apply(c,b)};e.prototype.sb=function(a,b){if(d.g(a))return w;if(T)return function(c){a(c,b)};var c=this._jsc,e=""+Math.floor(1E8*Math.random()),f=this.c("callback_fn")+"["+e+"]";
|
|
128
|
+
c[e]=function(d){delete c[e];a(d,b)};return f};e.prototype.l=function(a,b,c,e){var f=p;if(ta)return this.mb.push(arguments),f;var h={method:this.c("api_method"),eb:this.c("api_transport"),rd:this.c("verbose")},o=w;if(!e&&(d.Mb(c)||"string"===typeof c))e=c,c=w;c=d.extend(h,c||{});if(!T)c.method="GET";var h="POST"===c.method,j=fa&&h&&"sendbeacon"===c.eb.toLowerCase(),k=c.rd;b.verbose&&(k=p);this.c("test")&&(b.test=1);k&&(b.verbose=1);this.c("img")&&(b.img=1);if(!T)if(e)b.callback=e;else if(k||this.c("test"))b.callback=
|
|
129
|
+
"(function(){})";b.ip=this.c("ip")?1:0;b._=(new Date).getTime().toString();h&&(o="data="+encodeURIComponent(b.data),delete b.data);a+="?"+d.vd(b);if("img"in b)o=s.createElement("img"),o.src=a,s.body.appendChild(o);else if(j){try{f=fa(a,o)}catch(q){n.error(q),f=F}try{e&&e(f?1:0)}catch(t){n.error(t)}}else if(T)try{var r=new XMLHttpRequest;r.open(c.method,a,p);var u=this.c("xhr_headers");h&&(u["Content-Type"]="application/x-www-form-urlencoded");d.a(u,function(a,b){r.setRequestHeader(b,a)});if(c.jd&&
|
|
130
|
+
"undefined"!==typeof r.timeout){r.timeout=c.jd;var y=(new Date).getTime()}r.withCredentials=p;r.onreadystatechange=function(){if(4===r.readyState)if(200===r.status){if(e)if(k){var a;try{a=d.ka(r.responseText)}catch(b){if(n.error(b),c.je)a=r.responseText;else return}e(a)}else e(Number(r.responseText))}else a=r.timeout&&!r.status&&(new Date).getTime()-y>=r.timeout?"timeout":"Bad HTTP status: "+r.status+" "+r.statusText,n.error(a),e&&(k?e({status:0,error:a,ja:r}):e(0))};r.send(o)}catch(z){n.error(z),
|
|
131
|
+
f=F}else o=s.createElement("script"),o.type="text/javascript",o.async=p,o.defer=p,o.src=a,u=s.getElementsByTagName("script")[0],u.parentNode.insertBefore(o,u);return f};e.prototype.nb=function(a){function b(a,b){d.a(a,function(a){if(d.isArray(a[0])){var c=b;d.a(a,function(a){c=c[a[0]].apply(c,a.slice(1))})}else this[a[0]].apply(this,a.slice(1))},b)}var c,e=[],f=[],h=[];d.a(a,function(a){a&&(c=a[0],d.isArray(c)?h.push(a):"function"===typeof a?a.call(this):d.isArray(a)&&"alias"===c?e.push(a):d.isArray(a)&&
|
|
132
|
+
-1!==c.indexOf("track")&&"function"===typeof this[c]?h.push(a):f.push(a))},this);b(e,this);b(f,this);b(h,this)};e.prototype.pc=function(){return!!this.z.Qa};e.prototype.ke=function(){var a=this.c("token");if(!this.pc()){var b=d.bind(function(b){return new H("__mpq_"+a+b.Sb,{Q:this.config,Be:d.bind(function(a,d,e){this.l(this.c("api_host")+b.T,this.bc(a),d,this.sb(e,a))},this),Ka:d.bind(function(a){return this.kc("before_send_"+b.type,a)},this)})},this);this.z={Qa:b({type:"events",T:"/track/",Sb:"_ev"}),
|
|
133
|
+
re:b({type:"people",T:"/engage/",Sb:"_pp"}),he:b({type:"groups",T:"/groups/",Sb:"_gr"})}}this.c("batch_autostart")&&this.ed()};e.prototype.ed=function(){if(this.pc())this.ma=p,d.a(this.z,function(a){a.start()})};e.prototype.Me=function(){this.ma=F;d.a(this.z,function(a){a.stop();a.clear()})};e.prototype.push=function(a){this.nb([a])};e.prototype.disable=function(a){"undefined"===typeof a?this.aa.Yd=p:this.kb=this.kb.concat(a)};e.prototype.bc=function(a){a=d.Ea(a);"base64"===this.c("api_payload_format")&&
|
|
134
|
+
(a=d.Rd(a));return{data:a}};e.prototype.wb=function(a,b){var c=d.truncate(a.data,255),e=a.T,f=a.yb,h=a.Je,k=a.Ce||{},b=b||Y,j=p,q=d.bind(function(){k.dd||(c=this.kc("before_send_"+a.type,c));return c?(n.log("MIXPANEL REQUEST:"),n.log(c),this.l(e,this.bc(c),k,this.sb(b,c))):w},this);this.ma&&!h?f.Eb(c,function(a){a?b(1,c):q()}):j=q();return j&&c};e.prototype.u=P(function(a,b,c,e){!e&&"function"===typeof c&&(e=c,c=w);var c=c||{},f=c.transport;if(f)c.eb=f;f=c.send_immediately;"function"!==typeof e&&
|
|
135
|
+
(e=Y);if(d.g(a))n.error("No event name provided to mixpanel.track");else if(this.cc(a))e(0);else{b=b||{};b.token=this.c("token");var h=this.persistence.ue(a);d.g(h)||(b.$duration=parseFloat((((new Date).getTime()-h)/1E3).toFixed(3)));this.mc();b=d.extend({},d.info.xa(),this.persistence.xa(),this.ha,b);h=this.c("property_blacklist");d.isArray(h)?d.a(h,function(a){delete b[a]}):n.error("Invalid value for property_blacklist config: "+h);a={event:a,properties:b};c=this.wb({type:"events",data:a,T:this.c("api_host")+
|
|
136
|
+
"/track/",yb:this.z.Qa,Je:f,Ce:c},e);this.ac(a);return c}});e.prototype.He=P(function(a,b,c){d.isArray(b)||(b=[b]);var e={};e[a]=b;this.w(e);return this.people.set(a,b,c)});e.prototype.Od=P(function(a,b,c){var d=this.G(a);if(d===m){var e={};e[a]=[b];this.w(e)}else-1===d.indexOf(b)&&(d.push(b),this.w(e));return this.people.Aa(a,b,c)});e.prototype.ve=P(function(a,b,c){var d=this.G(a);if(d!==m){var e=d.indexOf(b);-1<e&&(d.splice(e,1),this.w({ef:d}));0===d.length&&this.Ba(a)}return this.people.remove(a,
|
|
137
|
+
b,c)});e.prototype.Ve=P(function(a,b,c,e){var f=d.extend({},b||{});d.a(c,function(a,b){a!==w&&a!==m&&(f[b]=a)});return this.u(a,f,e)});e.prototype.zd=function(a,b){return a+"_"+JSON.stringify(b)};e.prototype.fe=function(a,b){var c=this.zd(a,b),d=this.Zb[c];if(d===m||d.qb!==a||d.pb!==b)d=new t,d.pa(this,a,b),this.Zb[c]=d;return d};e.prototype.Ue=function(a){if(d.g(a))a=s.location.href;this.u("mp_page_view",d.info.qe(a))};e.prototype.Te=function(){return this.ub.call(this,R,arguments)};e.prototype.Se=
|
|
138
|
+
function(){return this.ub.call(this,Z,arguments)};e.prototype.Oe=function(a){d.g(a)?n.error("No event name provided to mixpanel.time_event"):this.cc(a)||this.persistence.Ge(a)};var Ia={persistent:p};e.prototype.w=function(a,b){var c=ia(b);c.persistent?this.persistence.w(a,c.days):d.extend(this.ha,a)};e.prototype.H=function(a,b,c){c=ia(c);c.persistent?this.persistence.H(a,b,c.days):("undefined"===typeof b&&(b="None"),d.a(a,function(a,c){if(!this.ha.hasOwnProperty(c)||this.ha[c]===b)this.ha[c]=a},this))};
|
|
139
|
+
e.prototype.Ba=function(a,b){b=ia(b);b.persistent?this.persistence.Ba(a):delete this.ha[a]};e.prototype.ic=function(a,b){var c={};c[a]=b;this.w(c)};e.prototype.Ib=function(a,b,c,d,e,f,k,j){var n=this.V();this.w({$user_id:a});this.G("$device_id")||this.H({$had_persisted_distinct_id:p,$device_id:n},"");a!==n&&a!==this.G("__alias")&&(this.Ba("__alias"),this.w({distinct_id:a}));this.$b(this.V());this.aa.Jb=p;this.people.Dd(b,c,d,e,f,k,j);a!==n&&this.u("$identify",{distinct_id:a,$anon_distinct_id:n},{dd:p})};
|
|
140
|
+
e.prototype.reset=function(){this.persistence.clear();this.aa.Jb=F;var a=d.Yb();this.H({distinct_id:a,$device_id:a},"")};e.prototype.V=function(){return this.G("distinct_id")};e.prototype.Pd=function(a,b){if(a===this.G("$people_distinct_id"))return n.L("Attempting to create alias for existing People user - aborting."),-2;var c=this;d.g(b)&&(b=this.V());if(a!==b)return this.ic("__alias",a),this.u("$create_alias",{alias:a,distinct_id:b},{dd:p},function(){c.Ib(a)});n.error("alias matches current distinct_id - skipping api call.");
|
|
141
|
+
this.Ib(a);return-1};e.prototype.ne=function(a){this.ic("mp_name_tag",a)};e.prototype.ad=function(a){if(d.e(a))d.extend(this.config,a),a.batch_size&&d.a(this.z,function(a){a.Xc()}),this.c("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.c("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.od(this.config),G=G||this.c("debug")};e.prototype.c=function(a){return this.config[a]};e.prototype.kc=function(a){var b=
|
|
142
|
+
(this.config.hooks[a]||Ja).apply(this,Q.call(arguments,1));"undefined"===typeof b&&(n.error(a+" hook did not return a value"),b=w);return b};e.prototype.G=function(a){return this.persistence.props[a]};e.prototype.toString=function(){var a=this.c("name");"mixpanel"!==a&&(a="mixpanel."+a);return a};e.prototype.cc=function(a){return d.Jc(A)||this.aa.Yd||d.Gc(this.kb,a)};e.prototype.ac=P(function(a){if(this.nc)for(var b=this._triggered_notifs,c=0;c<b.length;c++){if((new f(b[c],this)).Jd(a)){this.tb(b[c]);
|
|
143
|
+
break}}else this.dc.push(a)});e.prototype.$b=P(function(a){a&&!this.aa.Jb&&!this.c("disable_notifications")&&(n.log("MIXPANEL NOTIFICATION CHECK"),this.l(this.c("api_host")+"/decide/",{verbose:p,version:"3",lib:"web",token:this.c("token"),distinct_id:a},{method:"GET",eb:"XHR"},this.sb(d.bind(function(a){if(a.notifications&&0<a.notifications.length){this._triggered_notifs=[];var c=[];d.a(a.notifications,function(a){(a.display_triggers&&0<a.display_triggers.length?this._triggered_notifs:c).push(a)},
|
|
144
|
+
this);0<c.length&&this.tb.call(this,c[0])}this.fc()},this))))});e.prototype.fc=function(){this.nc=p;for(var a=this.dc;0<a.length;)this.ac(a.shift())};e.prototype.tb=function(a){(new f(a,this)).show()};e.prototype.Ed=function(){"localStorage"===this.c("opt_out_tracking_persistence_type")&&d.localStorage.Ua()&&(!this.Sa()&&this.Sa({persistence_type:"cookie"})&&this.Pc({enable_persistence:F}),!this.ta()&&this.ta({persistence_type:"cookie"})&&this.Pb({clear_persistence:F}),this.uc({persistence_type:"cookie",
|
|
145
|
+
enable_persistence:F}));if(this.ta())this.Ha({clear_persistence:p});else if(!this.Sa()&&(this.c("opt_out_tracking_by_default")||d.cookie.get("mp_optout")))d.cookie.remove("mp_optout"),this.Pb({clear_persistence:this.c("opt_out_persistence_by_default")})};e.prototype.Ha=function(a){if(a&&a.clear_persistence)a=p;else if(a&&a.enable_persistence)a=F;else return;!this.c("disable_persistence")&&this.persistence.disabled!==a&&this.persistence.bd(a);a&&d.a(this.z,function(a){a.clear()})};e.prototype.oa=function(a,
|
|
146
|
+
b){b=d.extend({track:d.bind(this.u,this),persistence_type:this.c("opt_out_tracking_persistence_type"),cookie_prefix:this.c("opt_out_tracking_cookie_prefix"),cookie_expiration:this.c("cookie_expiration"),cross_site_cookie:this.c("cross_site_cookie"),cross_subdomain_cookie:this.c("cross_subdomain_cookie"),cookie_domain:this.c("cookie_domain"),secure_cookie:this.c("secure_cookie"),ignore_dnt:this.c("ignore_dnt")},b);d.localStorage.Ua()||(b.persistence_type="cookie");return a(this.c("token"),{u:b.track,
|
|
147
|
+
Pe:b.track_event_name,Qe:b.track_properties,Sc:b.persistence_type,Rc:b.cookie_prefix,vc:b.cookie_domain,wc:b.cookie_expiration,Wd:b.cross_site_cookie,xc:b.cross_subdomain_cookie,ze:b.secure_cookie,Ec:b.ignore_dnt})};e.prototype.Pc=function(a){a=d.extend({enable_persistence:p},a);this.oa(Ma,a);this.Ha(a)};e.prototype.Pb=function(a){a=d.extend({clear_persistence:p,delete_user:p},a);a.delete_user&&this.people&&this.people.rb()&&(this.people.Ac(),this.people.tc());this.oa(Na,a);this.Ha(a)};e.prototype.Sa=
|
|
148
|
+
function(a){return this.oa(Oa,a)};e.prototype.ta=function(a){return this.oa(za,a)};e.prototype.uc=function(a){a=d.extend({enable_persistence:p},a);this.oa(Qa,a);this.Ha(a)};e.prototype.init=e.prototype.Lb;e.prototype.reset=e.prototype.reset;e.prototype.disable=e.prototype.disable;e.prototype.time_event=e.prototype.Oe;e.prototype.track=e.prototype.u;e.prototype.track_links=e.prototype.Te;e.prototype.track_forms=e.prototype.Se;e.prototype.track_pageview=e.prototype.Ue;e.prototype.register=e.prototype.w;
|
|
149
|
+
e.prototype.register_once=e.prototype.H;e.prototype.unregister=e.prototype.Ba;e.prototype.identify=e.prototype.Ib;e.prototype.alias=e.prototype.Pd;e.prototype.name_tag=e.prototype.ne;e.prototype.set_config=e.prototype.ad;e.prototype.get_config=e.prototype.c;e.prototype.get_property=e.prototype.G;e.prototype.get_distinct_id=e.prototype.V;e.prototype.toString=e.prototype.toString;e.prototype._check_and_handle_notifications=e.prototype.$b;e.prototype._handle_user_decide_check_complete=e.prototype.fc;
|
|
150
|
+
e.prototype._show_notification=e.prototype.tb;e.prototype.opt_out_tracking=e.prototype.Pb;e.prototype.opt_in_tracking=e.prototype.Pc;e.prototype.has_opted_out_tracking=e.prototype.ta;e.prototype.has_opted_in_tracking=e.prototype.Sa;e.prototype.clear_opt_in_out_tracking=e.prototype.uc;e.prototype.get_group=e.prototype.fe;e.prototype.set_group=e.prototype.He;e.prototype.add_group=e.prototype.Od;e.prototype.remove_group=e.prototype.ve;e.prototype.track_with_groups=e.prototype.Ve;e.prototype.start_batch_senders=
|
|
151
|
+
e.prototype.ed;e.prototype.stop_batch_senders=e.prototype.Me;q.prototype.properties=q.prototype.xa;q.prototype.update_search_keyword=q.prototype.pd;q.prototype.update_referrer_info=q.prototype.Wb;q.prototype.get_cross_subdomain=q.prototype.ee;q.prototype.clear=q.prototype.clear;d.we(e);var L={};(function(){ha=1;y=C.mixpanel;d.g(y)?n.L('"mixpanel" object not initialized. Ensure you are using the latest version of the Mixpanel JS Library along with the snippet we provide.'):y.__loaded||y.config&&y.persistence?
|
|
152
|
+
n.L("The Mixpanel library has already been downloaded at least once. Ensure that the Mixpanel code snippet only appears once on the page (and is not double-loaded by a tag manager) in order to avoid errors."):1.1>(y.__SV||0)?n.L("Version mismatch; please ensure you're using the latest version of the Mixpanel code snippet."):(d.a(y._i,function(a){a&&d.isArray(a)&&(L[a[a.length-1]]=X.apply(this,a))}),Ga(),y.init(),d.a(L,function(a){a.Ja()}),ga())})()})();
|
|
165
153
|
})();
|