forked from mixpanel/mixpanel-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mixpanel.min.js
105 lines (105 loc) · 51.4 KB
/
mixpanel.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
(function() {
var m=!0,r=null,s=!1;function D(){return function(){}}
(function(){function O(a){function b(b){try{var f=d(b.target),i=d(b.target,m),g=JSON.stringify(f).length,P=JSON.stringify(i).length;a.g=a.g||{};var p=f.length;a.g.$__c=(a.g.$__c||0)+1;a.g.$__c3=(a.g.$__c3||0)+g;a.g.$__c4=(a.g.$__c4||0)+P;a.g.$__c5=(a.g.$__c5||0)+p;c.cookie.set("mp_"+e+"__c",a.g.$__c,1,m);c.cookie.set("mp_"+e+"__c3",a.g.$__c3,1,m);c.cookie.set("mp_"+e+"__c4",a.g.$__c4,1,m);c.cookie.set("mp_"+e+"__c5",a.g.$__c5,1,m)}catch(h){n.error(h)}}function d(a,b){for(var c=[],d=a;d&&d!==l.body;){for(var f=
{attributes:[],classes:"string"===typeof d.className?d.className.split(" "):[],id:d.id,tagName:d.tagName,textContent:d===a?d.textContent.trim().substring(0,255):""},e=0;e<(d.attributes||[]).length;e++){var g=d.attributes[e],h=["id","class"];b&&(h=h.concat("href,title,style,for,value,checked,selected".split(",")));-1===h.indexOf(g.name)&&f.attributes.push({name:g.name,value:g.value})}g=e=1;for(h=d;h.previousElementSibling;)h=h.previousElementSibling,g++,h.tagName===d.tagName&&e++;f.nthChild=g;f.nthOfType=
e;c.push(f);d=d.parentNode}return c}var e=a.e("name");a.g=a.g||{};a.g.$__c=parseInt(c.cookie.get("mp_"+e+"__c"))||0;a.g.$__c3=parseInt(c.cookie.get("mp_"+e+"__c3"))||0;a.g.$__c4=parseInt(c.cookie.get("mp_"+e+"__c4"))||0;a.g.$__c5=parseInt(c.cookie.get("mp_"+e+"__c5"))||0;c.D(l,"submit",b);c.D(l,"change",b);var f=r;c.D(l,"mousedown",function(a){f=a.target});c.D(l,"mouseup",function(a){a.target===f&&b(a)})}function Q(){function a(){if(!a.Bc)L=a.Bc=m,M=s,c.a(x,function(a){a.dc()})}function b(){try{l.documentElement.doScroll("left")}catch(c){setTimeout(b,
1);return}a()}if(l.addEventListener)"complete"==l.readyState?a():l.addEventListener("DOMContentLoaded",a,s);else if(l.attachEvent){l.attachEvent("onreadystatechange",a);var d=s;try{d=window.frameElement==r}catch(e){}l.documentElement.doScroll&&d&&b()}c.D(window,"load",a,m)}function R(){t.init=function(a,b,c){if(c)return t[c]||(t[c]=x[c]=F(a,b,c),t[c].pa()),t[c];c=t;if(x.mixpanel)c=x.mixpanel;else if(a)c=F(a,b,"mixpanel"),c.pa(),x.mixpanel=c;t=c;1===J&&(window.mixpanel=t);S()}}function S(){c.a(x,function(a,
b){"mixpanel"!==b&&(t[b]=a)});t._=c}function q(){}function h(){}function F(a,b,d){var e,f="mixpanel"===d?t:t[d];if(f&&0===J)e=f;else{if(f&&!c.isArray(f)){n.error("You have already initialized "+d);return}e=new h}e.Ia(a,b,d);e.people=new q;e.people.Ia(e);y=y||e.e("debug");!c.d(f)&&c.isArray(f)&&(e.Ga.call(e.people,f.people),e.Ga(f));try{O(e)}catch(j){n.error(j)}return e}function o(a){this.props={};this.tb=s;this.name=a.persistence_name?"mp_"+a.persistence_name:"mp_"+a.token+"_mixpanel";var b=a.persistence;
if("cookie"!==b&&"localStorage"!==b)n.ba('Unknown persistence type "'+b+'"; falling back to "cookie"'),b=a.persistence="cookie";if(b="localStorage"===b){b=m;try{c.localStorage.set("__mplssupport__","xyz"),"xyz"!==c.localStorage.get("__mplssupport__")&&(b=s),c.localStorage.remove("__mplssupport__")}catch(d){b=s}b||n.error("localStorage unsupported; falling back to cookie store")}this.w=b?c.localStorage:c.cookie;this.load();this.Tb(a);this.cd(a);this.save()}function G(){this.Jb="submit"}function B(){this.Jb=
"click"}function w(){}var J,t,K=Array.prototype,T=Function.prototype,N=Object.prototype,C=K.slice,E=N.toString,H=N.hasOwnProperty,v=window.console,z=window.navigator,l=window.document,u=z.userAgent,U="__mps,__mpso,__mpa,__mpap,__mpu,$people_distinct_id,__alias,__cmpns,__timers".split(","),I=window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,M=!I&&-1==u.indexOf("MSIE")&&-1==u.indexOf("Mozilla"),c={},y=s,V={api_host:("https:"==l.location.protocol?"https://":"http://")+"api.mixpanel.com",
cross_subdomain_cookie:m,persistence:"cookie",persistence_name:"",cookie_name:"",loaded:D(),store_google:m,save_referrer:m,test:s,verbose:s,img:s,track_pageview:m,debug:s,track_links_timeout:300,cookie_expiration:365,upgrade:s,disable_persistence:s,disable_cookie:s,secure_cookie:s,ip:m,property_blacklist:[]},L=s;(function(){var a=T.bind,b=K.forEach,d=K.indexOf,e=Array.isArray,f={};c.bind=function(b,d){var f,e;if(a&&b.bind===a)return a.apply(b,C.call(arguments,1));if(!c.Eb(b))throw new TypeError;f=
C.call(arguments,2);return e=function(){if(!(this instanceof e))return b.apply(d,f.concat(C.call(arguments)));ctor.prototype=b.prototype;var a=new ctor;ctor.prototype=r;var c=b.apply(a,f.concat(C.call(arguments)));return Object(c)===c?c:a}};c.qc=function(a){for(var b in a)"function"===typeof a[b]&&(a[b]=c.bind(a[b],a))};var j=c.a=function(a,c,d){if(a!=r)if(b&&a.forEach===b)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,j=a.length;e<j&&!(e in a&&c.call(d,a[e],e,a)===f);e++);else for(e in a)if(H.call(a,
e)&&c.call(d,a[e],e,a)===f)break};c.u=function(a){a&&c.Ya(a)&&(a=a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"));return a};c.extend=function(a){j(C.call(arguments,1),function(b){for(var c in b)void 0!==b[c]&&(a[c]=b[c])});return a};c.isArray=e||function(a){return"[object Array]"===E.call(a)};c.Eb=function(a){try{return/^\s*\bfunction\b/.test(a)}catch(b){return s}};c.Fc=function(a){return!(!a||!H.call(a,"callee"))};c.ha=function(a){return!a?
[]:a.ha?a.ha():c.isArray(a)||c.Fc(a)?C.call(a):c.ed(a)};c.ed=function(a){var b=[];if(a==r)return b;j(a,function(a){b[b.length]=a});return b};c.jd=function(a){return a};c.Ab=function(a,b){var c=s;if(a==r)return c;if(d&&a.indexOf===d)return-1!=a.indexOf(b);j(a,function(a){if(c||(c=a===b))return f});return c};c.j=function(a,b){return-1!==a.indexOf(b)}})();c.Cb=function(a,b){a.prototype=new b;a.Xc=b.prototype};c.k=function(a){return a===Object(a)&&!c.isArray(a)};c.T=function(a){if(c.k(a)){for(var b in a)if(H.call(a,
b))return s;return m}return s};c.d=function(a){return void 0===a};c.Ya=function(a){return"[object String]"==E.call(a)};c.Gc=function(a){return"[object Date]"==E.call(a)};c.Ic=function(a){return"[object Number]"==E.call(a)};c.Hc=function(a){return!!(a&&1===a.nodeType)};c.xb=function(a){c.a(a,function(b,d){c.Gc(b)?a[d]=c.Cc(b):c.k(b)&&(a[d]=c.xb(b))});return a};c.Cc=function(a){function b(a){return 10>a?"0"+a:a}return a.getUTCFullYear()+"-"+b(a.getUTCMonth()+1)+"-"+b(a.getUTCDate())+"T"+b(a.getUTCHours())+
":"+b(a.getUTCMinutes())+":"+b(a.getUTCSeconds())};c.o=function(a){return function(){try{a.apply(this,arguments)}catch(b){n.ba("Implementation error. Please contact [email protected].")}}};c.Oc=function(a){for(var b=["identify","_check_and_handle_notifications","_show_notification"],d=0;d<b.length;d++)a.prototype[b[d]]=c.o(a.prototype[b[d]])};c.va=function(a){var b={};c.a(a,function(a,e){c.Ya(a)&&0<a.length&&(b[e]=a)});return b};c.truncate=function(a,b){var d;"string"===typeof a?d=a.slice(0,b):
c.isArray(a)?(d=[],c.a(a,function(a){d.push(c.truncate(a,b))})):c.k(a)?(d={},c.a(a,function(a,f){d[f]=c.truncate(a,b)})):d=a;return d};c.la=function(){return function(a){function b(a,f){var j="",k=0,i=k="",i=0,g=j,h=[],p=f[a];p&&"object"===typeof p&&"function"===typeof p.toJSON&&(p=p.toJSON(a));switch(typeof p){case "string":return c(p);case "number":return isFinite(p)?""+p:"null";case "boolean":case "null":return""+p;case "object":if(!p)return"null";j+=" ";h=[];if("[object Array]"===E.apply(p)){i=
p.length;for(k=0;k<i;k+=1)h[k]=b(k,p)||"null";return i=0===h.length?"[]":j?"[\n"+j+h.join(",\n"+j)+"\n"+g+"]":"["+h.join(",")+"]"}for(k in p)H.call(p,k)&&(i=b(k,p))&&h.push(c(k)+(j?": ":":")+i);return i=0===h.length?"{}":j?"{"+h.join(",")+""+g+"}":"{"+h.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,d={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};
b.lastIndex=0;return b.test(a)?'"'+a.replace(b,function(a){var b=d[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}return b("",{"":a})}}();c.ka=function(){function a(){switch(i){case "t":return f("t"),f("r"),f("u"),f("e"),m;case "f":return f("f"),f("a"),f("l"),f("s"),f("e"),s;case "n":return f("n"),f("u"),f("l"),f("l"),r}j("Unexpected '"+i+"'")}function b(){for(;i&&" ">=i;)f()}function c(){var a,b,d="",e;if('"'===i)for(;f();){if('"'===i)return f(),
d;if("\\"===i)if(f(),"u"===i){for(b=e=0;4>b;b+=1){a=parseInt(f(),16);if(!isFinite(a))break;e=16*e+a}d+=String.fromCharCode(e)}else if("string"===typeof g[i])d+=g[i];else break;else d+=i}j("Bad string")}function e(){var a;a="";"-"===i&&(a="-",f("-"));for(;"0"<=i&&"9">=i;)a+=i,f();if("."===i)for(a+=".";f()&&"0"<=i&&"9">=i;)a+=i;if("e"===i||"E"===i){a+=i;f();if("-"===i||"+"===i)a+=i,f();for(;"0"<=i&&"9">=i;)a+=i,f()}a=+a;if(isFinite(a))return a;j("Bad number")}function f(a){a&&a!==i&&j("Expected '"+
a+"' instead of '"+i+"'");i=h.charAt(k);k+=1;return i}function j(a){throw{name:"SyntaxError",message:a,hd:k,text:h};}var k,i,g={'"':'"',"\\":"\\","/":"/",b:"\u0008",f:"\u000c",n:"\n",r:"\r",t:"\t"},h,p;p=function(){b();switch(i){case "{":var k;a:{var g,h={};if("{"===i){f("{");b();if("}"===i){f("}");k=h;break a}for(;i;){g=c();b();f(":");Object.hasOwnProperty.call(h,g)&&j('Duplicate key "'+g+'"');h[g]=p();b();if("}"===i){f("}");k=h;break a}f(",");b()}}j("Bad object")}return k;case "[":a:{k=[];if("["===
i){f("[");b();if("]"===i){f("]");g=k;break a}for(;i;){k.push(p());b();if("]"===i){f("]");g=k;break a}f(",");b()}}j("Bad array")}return g;case '"':return c();case "-":return e();default:return"0"<=i&&"9">=i?e():a()}};return function(a){h=a;k=0;i=" ";a=p();b();i&&j("Syntax error");return a}}();c.qb=function(a){var b,d,e,f,j=0,k=0,i="",i=[];if(!a)return a;a=c.dd(a);do b=a.charCodeAt(j++),d=a.charCodeAt(j++),e=a.charCodeAt(j++),f=b<<16|d<<8|e,b=f>>18&63,d=f>>12&63,e=f>>6&63,f&=63,i[k++]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(b)+
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(d)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f);while(j<a.length);i=i.join("");switch(a.length%3){case 1:i=i.slice(0,-2)+"==";break;case 2:i=i.slice(0,-1)+"="}return i};c.dd=function(a){var a=(a+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n"),b="",c,e,f=0,j;c=e=0;f=a.length;for(j=0;j<f;j++){var k=a.charCodeAt(j),i=r;
128>k?e++:i=127<k&&2048>k?String.fromCharCode(k>>6|192,k&63|128):String.fromCharCode(k>>12|224,k>>6&63|128,k&63|128);i!==r&&(e>c&&(b+=a.substring(c,e)),b+=i,c=e=j+1)}e>c&&(b+=a.substring(c,a.length));return b};c.fb=function(){function a(){function a(b,c){var d,f=0;for(d=0;d<c.length;d++)f|=j[d]<<8*d;return b^f}var b,c,j=[],k=0;for(b=0;b<u.length;b++)c=u.charCodeAt(b),j.unshift(c&255),4<=j.length&&(k=a(k,j),j=[]);0<j.length&&(k=a(k,j));return k.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=(screen.height*screen.width).toString(16);return b()+"-"+Math.random().toString(16).replace(".","")+"-"+a()+"-"+c+"-"+b()}}();c.Db=function(a){return/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp)/i.test(a)?m:s};c.Zb=function(a){var b,d,e,f=[];c.d(b)&&(b="&");c.a(a,function(a,b){d=encodeURIComponent(a.toString());e=encodeURIComponent(b);f[f.length]=e+"="+d});return f.join(b)};c.yb=function(a,b){var b=
b.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),c=RegExp("[\\?&]"+b+"=([^&#]*)").exec(a);return c===r||c&&"string"!==typeof c[1]&&c[1].length?"":decodeURIComponent(c[1]).replace(/\+/g," ")};c.cookie={get:function(a){for(var a=a+"=",b=l.cookie.split(";"),c=0;c<b.length;c++){for(var e=b[c];" "==e.charAt(0);)e=e.substring(1,e.length);if(0==e.indexOf(a))return decodeURIComponent(e.substring(a.length,e.length))}return r},parse:function(a){var b;try{b=c.ka(c.cookie.get(a))||{}}catch(d){}return b},set:function(a,
b,c,e,f){var d;var j="",k="",i="";e&&(d=(j=(j=l.location.hostname.match(/[a-z0-9][a-z0-9\-]+\.[a-z\.]{2,6}$/i))?j[0]:"")?"; domain=."+j:"",j=d);c&&(k=new Date,k.setTime(k.getTime()+864E5*c),k="; expires="+k.toGMTString());f&&(i="; secure");l.cookie=a+"="+encodeURIComponent(b)+k+"; path=/"+j+i},remove:function(a,b){c.cookie.set(a,"",-1,b)}};c.localStorage={error:function(a){n.error("localStorage error: "+a)},get:function(a){try{return window.localStorage.getItem(a)}catch(b){c.localStorage.error(b)}return r},
parse:function(a){try{return c.ka(c.localStorage.get(a))||{}}catch(b){}return r},set:function(a,b){try{window.localStorage.setItem(a,b)}catch(d){c.localStorage.error(d)}},remove:function(a){try{window.localStorage.removeItem(a)}catch(b){c.localStorage.error(b)}}};c.D=function(){function a(a,e,f){return function(j){if(j=j||b(window.event)){var k=m,i;c.Eb(f)&&(i=f(j));j=e.call(a,j);if(s===i||s===j)k=s;return k}}}function b(a){if(a)a.preventDefault=b.preventDefault,a.stopPropagation=b.stopPropagation;
return a}b.preventDefault=function(){this.returnValue=s};b.stopPropagation=function(){this.cancelBubble=m};return function(b,c,f,j){b?b.addEventListener&&!j?b.addEventListener(c,f,s):(c="on"+c,b[c]=a(b,f,b[c])):n.error("No valid element provided to register_event")}}();c.Ac=function(){function a(a,b){return 0<=(" "+a.className+" ").replace(d," ").indexOf(" "+b+" ")}function b(b){if(!l.getElementsByTagName)return[];for(var b=b.split(" "),d,j=Array(l),k=0;k<b.length;k++)if(d=b[k].replace(/^\s+/,"").replace(/\s+$/,
""),-1<d.indexOf("#")){var i=d.split("#");d=i[0];j=l.getElementById(i[1]);if(!j||d&&j.nodeName.toLowerCase()!=d)return[];j=Array(j)}else if(-1<d.indexOf(".")){i=d.split(".");d=i[0];var g=i[1];d||(d="*");for(var i=[],h=0,p=0;p<j.length;p++){var o;o="*"==d?j[p].all?j[p].all:j[p].getElementsByTagName("*"):j[p].getElementsByTagName(d);for(var n=0;n<o.length;n++)i[h++]=o[n]}j=[];for(h=d=0;h<i.length;h++)i[h].className&&c.Ya(i[h].className)&&a(i[h],g)&&(j[d++]=i[h])}else if(i=d.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/)){d=
i[1];var q=i[2],g=i[3],A=i[4];d||(d="*");i=[];for(p=h=0;p<j.length;p++){o="*"==d?j[p].all?j[p].all:j[p].getElementsByTagName("*"):j[p].getElementsByTagName(d);for(n=0;n<o.length;n++)i[h++]=o[n]}j=[];d=0;switch(g){case "=":g=function(a){return a.getAttribute(q)==A};break;case "~":g=function(a){return a.getAttribute(q).match(RegExp("\\b"+A+"\\b"))};break;case "|":g=function(a){return a.getAttribute(q).match(RegExp("^"+A+"-?"))};break;case "^":g=function(a){return 0==a.getAttribute(q).indexOf(A)};break;
case "$":g=function(a){return a.getAttribute(q).lastIndexOf(A)==a.getAttribute(q).length-A.length};break;case "*":g=function(a){return-1<a.getAttribute(q).indexOf(A)};break;default:g=function(a){return a.getAttribute(q)}}j=[];for(h=d=0;h<i.length;h++)g(i[h])&&(j[d++]=i[h])}else{i=[];for(p=h=0;p<j.length;p++){o=j[p].getElementsByTagName(d);for(n=0;n<o.length;n++)i[h++]=o[n]}j=i}return j}var d=/[\t\r\n]/g;return function(a){return c.Hc(a)?[a]:c.k(a)&&!c.d(a.length)?a:b.call(this,a)}}();c.info={tc:function(){var a=
"",b={};c.a("utm_source utm_medium utm_campaign utm_content utm_term".split(" "),function(d){a=c.yb(l.URL,d);a.length&&(b[d]=a)});return b},Pc:function(a){return 0===a.search("https?://(.*)google.([^/?]*)")?"google":0===a.search("https?://(.*)bing.com")?"bing":0===a.search("https?://(.*)yahoo.com")?"yahoo":0===a.search("https?://(.*)duckduckgo.com")?"duckduckgo":r},Qc:function(a){var b=c.info.Pc(a),d={};if(b!==r)d.$search_engine=b,a=c.yb(a,"yahoo"!=b?"q":"p"),a.length&&(d.mp_keyword=a);return d},
aa:function(a,b,d){return d||c.j(a," OPR/")?c.j(a,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(a)?"BlackBerry":c.j(a,"IEMobile")||c.j(a,"WPDesktop")?"Internet Explorer Mobile":c.j(a,"Edge")?"Microsoft Edge":c.j(a,"FBIOS")?"Facebook Mobile":c.j(a,"Chrome")?"Chrome":c.j(a,"CriOS")?"Chrome iOS":c.j(a,"FxiOS")?"Firefox iOS":c.j(b||"","Apple")?c.j(a,"Mobile")?"Mobile Safari":"Safari":c.j(a,"Android")?"Android Mobile":c.j(a,"Konqueror")?"Konqueror":c.j(a,"Firefox")?"Firefox":c.j(a,"MSIE")||
c.j(a,"Trident/")?"Internet Explorer":c.j(a,"Gecko")?"Mozilla":""},sb:function(a,b,d){b={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\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+)?)/,
"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[c.info.aa(a,b,d)];if(void 0==b)return r;a=a.match(b);return!a?r:parseFloat(a[a.length-2])},ab:function(){return/Windows/i.test(u)?/Phone/.test(u)||/WPDesktop/.test(u)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(u)?"iOS":/Android/.test(u)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(u)?"BlackBerry":/Mac/i.test(u)?"Mac OS X":/Linux/.test(u)?"Linux":""},wb:function(a){return/Windows Phone/i.test(a)||/WPDesktop/.test(a)?
"Windows Phone":/iPad/.test(a)?"iPad":/iPod/.test(a)?"iPod Touch":/iPhone/.test(a)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(a)?"BlackBerry":/Android/.test(a)?"Android":""},Kb:function(a){a=a.split("/");return 3<=a.length?a[2]:""},fa:function(){return c.extend(c.va({$os:c.info.ab(),$browser:c.info.aa(u,z.vendor,window.opera),$referrer:l.referrer,$referring_domain:c.info.Kb(l.referrer),$device:c.info.wb(u)}),{$current_url:window.location.href,$browser_version:c.info.sb(u,z.vendor,window.opera),$screen_height:screen.height,
$screen_width:screen.width,mp_lib:"web",$lib_version:"2.8.1"})},Mc:function(){return c.extend(c.va({$os:c.info.ab(),$browser:c.info.aa(u,z.vendor,window.opera)}),{$browser_version:c.info.sb(u,z.vendor,window.opera)})},Lc:function(a){return c.va({mp_page:a,mp_referrer:l.referrer,mp_browser:c.info.aa(u,z.vendor,window.opera),mp_platform:c.info.ab()})}};var n={log:function(){if(y&&!c.d(v)&&v)try{v.log.apply(v,arguments)}catch(a){c.a(arguments,function(a){v.log(a)})}},error:function(){if(y&&!c.d(v)&&
v){var a=["Mixpanel error:"].concat(c.ha(arguments));try{v.error.apply(v,a)}catch(b){c.a(a,function(a){v.error(a)})}}},ba:function(){if(!c.d(v)&&v){var a=["Mixpanel error:"].concat(c.ha(arguments));try{v.error.apply(v,a)}catch(b){c.a(a,function(a){v.error(a)})}}}};w.prototype.sa=D();w.prototype.Ra=D();w.prototype.Na=D();w.prototype.Xa=function(a){this.Hb=a;return this};w.prototype.V=function(a,b,d,e){var f=this,j=c.Ac(a);if(0==j.length)n.error("The DOM query ("+a+") returned 0 elements");else return c.a(j,
function(a){c.D(a,this.Jb,function(a){var c={},j=f.sa(d,this),g=f.Hb.e("track_links_timeout");f.Ra(a,this,c);window.setTimeout(f.Qb(e,j,c,m),g);f.Hb.V(b,j,f.Qb(e,j,c))})},this),m};w.prototype.Qb=function(a,b,c,e){var e=e||s,f=this;return function(){if(!c.sc)c.sc=m,a&&a(e,b)===s||f.Na(b,c,e)}};w.prototype.sa=function(a,b){return"function"===typeof a?a(b):c.extend({},a)};c.Cb(B,w);B.prototype.sa=function(a,b){var c=B.Xc.sa.apply(this,arguments);if(b.href)c.url=b.href;return c};B.prototype.Ra=function(a,
b,c){c.Ib=2===a.which||a.metaKey||a.ctrlKey||"_blank"===b.target;c.href=b.href;c.Ib||a.preventDefault()};B.prototype.Na=function(a,b){b.Ib||setTimeout(function(){window.location=b.href},0)};c.Cb(G,w);G.prototype.Ra=function(a,b,c){c.element=b;a.preventDefault()};G.prototype.Na=function(a,b){setTimeout(function(){b.element.submit()},0)};o.prototype.fa=function(){var a={};c.a(this.props,function(b,d){c.Ab(U,d)||(a[d]=b)});return a};o.prototype.load=function(){if(!this.disabled){var a=this.w.parse(this.name);
a&&(this.props=c.extend({},a))}};o.prototype.cd=function(a){var b=a.upgrade,d;if(b)d="mp_super_properties","string"===typeof b&&(d=b),b=this.w.parse(d),this.w.remove(d),this.w.remove(d,m),b&&(this.props=c.extend(this.props,b.all,b.events));if(!a.cookie_name&&"mixpanel"!==a.name&&(d="mp_"+a.token+"_"+a.name,b=this.w.parse(d)))this.w.remove(d),this.w.remove(d,m),this.G(b);this.w===c.localStorage&&(b=c.cookie.parse(this.name),c.cookie.remove(this.name),c.cookie.remove(this.name,m),b&&this.G(b))};o.prototype.save=
function(){this.disabled||(this.fc(),this.w.set(this.name,c.la(this.props),this.Sa,this.Pa,this.Lb))};o.prototype.remove=function(){this.w.remove(this.name,s);this.w.remove(this.name,m)};o.prototype.clear=function(){this.remove();this.props={}};o.prototype.G=function(a,b,d){return c.k(a)?("undefined"===typeof b&&(b="None"),this.Sa="undefined"===typeof d?this.vb:d,c.a(a,function(a,c){if(!this.props[c]||this.props[c]===b)this.props[c]=a},this),this.save(),m):s};o.prototype.ga=function(a,b){return c.k(a)?
(this.Sa="undefined"===typeof b?this.vb:b,c.extend(this.props,a),this.save(),m):s};o.prototype.ya=function(a){a in this.props&&(delete this.props[a],this.save())};o.prototype.fc=c.o(function(){var a=this.props.__cmpns,b=y?6E4:36E5;if(a){for(var d in a)1*new Date-a[d]>b&&delete a[d];c.T(a)&&delete this.props.__cmpns}});o.prototype.bd=function(){if(!this.tb)this.G(c.info.tc()),this.tb=m};o.prototype.Ub=function(a){this.ga(c.info.Qc(a))};o.prototype.eb=function(a){this.G({$initial_referrer:a||"$direct",
$initial_referring_domain:c.info.Kb(a)||"$direct"},"")};o.prototype.Ec=function(){return c.va({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};o.prototype.Tb=function(a){this.vb=this.Sa=a.cookie_expiration;this.Sc(a.disable_persistence);this.Rc(a.cross_subdomain_cookie);this.Uc(a.secure_cookie)};o.prototype.Sc=function(a){(this.disabled=a)&&this.remove()};o.prototype.Rc=function(a){if(a!==this.Pa)this.Pa=a,this.remove(),this.save()};
o.prototype.Dc=function(){return this.Pa};o.prototype.Uc=function(a){if(a!==this.Lb)this.Lb=a?m:s,this.remove(),this.save()};o.prototype.B=function(a,b){var d=this.Ha(a),e=b[a],f=this.Y("$set"),j=this.Y("$set_once"),g=this.Y("$add"),i=this.Y("$union"),h=this.Y("$append",[]);"__mps"===d?(c.extend(f,e),this.R("$add",e),this.R("$union",e)):"__mpso"===d?c.a(e,function(a,b){b in j||(j[b]=a)}):"__mpa"===d?c.a(e,function(a,b){b in f?f[b]+=a:(b in g||(g[b]=0),g[b]+=a)},this):"__mpu"===d?c.a(e,function(a,
b){c.isArray(a)&&(b in i||(i[b]=[]),i[b]=i[b].concat(a))}):"__mpap"===d&&h.push(e);n.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):");n.log(b);this.save()};o.prototype.R=function(a,b){var d=this.Q(a);c.d(d)||(c.a(b,function(a,b){delete d[b]},this),this.save())};o.prototype.Ha=function(a){if("$set"===a)return"__mps";if("$set_once"===a)return"__mpso";if("$add"===a)return"__mpa";if("$append"===a)return"__mpap";if("$union"===a)return"__mpu";n.error("Invalid queue:",a)};o.prototype.Q=function(a){return this.props[this.Ha(a)]};
o.prototype.Y=function(a,b){var d=this.Ha(a),b=c.d(b)?{}:b;return this.props[d]||(this.props[d]=b)};o.prototype.Tc=function(a){var b=this.props.__timers||{};b[a]=(new Date).getTime();this.props.__timers=b;this.save()};o.prototype.Nc=function(a){var b=(this.props.__timers||{})[a];c.d(b)||(delete this.props.__timers[a],this.save());return b};h.prototype.Xa=function(a,b,d){if(c.d(d))n.error("You must name your new library: init(token, config, name)");else if("mixpanel"===d)n.error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");
else return a=F(a,b,d),t[d]=a,a.pa(),a};h.prototype.Ia=function(a,b,d){this.__loaded=m;this.config={};this.Mb(c.extend({},V,b,{name:d,token:a,callback_fn:("mixpanel"===d?d:"mixpanel."+d)+"._jsc"}));this._jsc=D();this.Ea=[];this.Fa=[];this.Da=[];this.O={disable_all_events:s,identify_called:s};this.persistence=this.cookie=new o(this.config);this.G({distinct_id:c.fb()},"")};h.prototype.pa=function(){this.e("loaded")(this);this.e("track_pageview")&&this.Rb()};h.prototype.dc=function(){c.a(this.Ea,function(a){this.La.apply(this,
a)},this);c.a(this.Fa,function(a){this.s.apply(this,a)},this);delete this.Ea;delete this.Fa};h.prototype.La=function(a,b){if(this.e("img"))return n.error("You can't use DOM tracking functions with img = true."),s;if(!L)return this.Ea.push([a,b]),s;var c=(new a).Xa(this);return c.V.apply(c,b)};h.prototype.Ja=function(a,b){if(c.d(a))return r;if(I)return function(c){a(c,b)};var d=this._jsc,e=""+Math.floor(1E8*Math.random()),f=this.e("callback_fn")+'["'+e+'"]';d[e]=function(c){delete d[e];a(c,b)};return f};
h.prototype.s=function(a,b,d){if(M)this.Fa.push(arguments);else{var e=this.e("verbose");b.verbose&&(e=m);this.e("test")&&(b.test=1);e&&(b.verbose=1);this.e("img")&&(b.img=1);if(!I)if(d)b.callback=d;else if(e||this.e("test"))b.callback="(function(){})";b.ip=this.e("ip")?1:0;b._=(new Date).getTime().toString();a+="?"+c.Zb(b);if("img"in b){var f=l.createElement("img");f.src=a;l.body.appendChild(f)}else if(I)try{var j=new XMLHttpRequest;j.open("GET",a,m);j.withCredentials=m;j.onreadystatechange=function(){if(4===
j.readyState)if(200===j.status)d&&(e?d(c.ka(j.responseText)):d(Number(j.responseText)));else{var a="Bad HTTP status: "+j.status+" "+j.statusText;n.error(a);d&&(e?d({status:0,error:a}):d(0))}};j.send(r)}catch(g){n.error(g)}else{f=l.createElement("script");f.type="text/javascript";f.async=m;f.defer=m;f.src=a;var i=l.getElementsByTagName("script")[0];i.parentNode.insertBefore(f,i)}}};h.prototype.Ga=function(a){function b(a,b){c.a(a,function(a){this[a[0]].apply(this,a.slice(1))},b)}var d,e=[],f=[],j=
[];c.a(a,function(a){a&&(d=a[0],"function"===typeof a?a.call(this):c.isArray(a)&&"alias"===d?e.push(a):c.isArray(a)&&-1!=d.indexOf("track")&&"function"===typeof this[d]?j.push(a):f.push(a))},this);b(e,this);b(f,this);b(j,this)};h.prototype.push=function(a){this.Ga([a])};h.prototype.disable=function(a){"undefined"===typeof a?this.O.xc=m:this.Da=this.Da.concat(a)};h.prototype.V=function(a,b,d){if(c.d(a))n.error("No event name provided to mixpanel.track");else if(this.hb(a))"undefined"!==typeof d&&d(0);
else{b=b||{};b.token=this.e("token");var e=this.persistence.Nc(a);c.d(e)||(b.$duration=parseFloat((((new Date).getTime()-e)/1E3).toFixed(3)));this.persistence.Ub(l.referrer);this.e("store_google")&&this.persistence.bd();this.e("save_referrer")&&this.persistence.eb(l.referrer);b=c.extend({},c.info.fa(),this.persistence.fa(),b);try{if(this.g&&"mp_page_view"!==a&&"$create_alias"!==a){b=c.extend({},b,this.g);this.g={};this.g.$__c=0;this.g.$__c3=0;this.g.$__c4=0;this.g.$__c5=0;var f=this.e("name");c.cookie.set("mp_"+
f+"__c",0,1,m);c.cookie.set("mp_"+f+"__c3",0,1,m);c.cookie.set("mp_"+f+"__c4",0,1,m);c.cookie.set("mp_"+f+"__c5",0,1,m)}}catch(j){n.error(j)}e=this.e("property_blacklist");c.isArray(e)?c.a(e,function(a){delete b[a]}):n.error("Invalid value for property_blacklist config: "+e);a=c.truncate({event:a,properties:b},255);e=c.la(a);e=c.qb(e);n.log("MIXPANEL REQUEST:");n.log(a);this.s(this.e("api_host")+"/track/",{data:e},this.Ja(d,a));return a}};h.prototype.Rb=function(a){if(c.d(a))a=l.location.href;this.V("mp_page_view",
c.info.Lc(a))};h.prototype.ad=function(){return this.La.call(this,B,arguments)};h.prototype.$c=function(){return this.La.call(this,G,arguments)};h.prototype.Yc=function(a){c.d(a)?n.error("No event name provided to mixpanel.time_event"):this.hb(a)||this.persistence.Tc(a)};h.prototype.ga=function(a,b){this.persistence.ga(a,b)};h.prototype.G=function(a,b,c){this.persistence.G(a,b,c)};h.prototype.ya=function(a){this.persistence.ya(a)};h.prototype.Ka=function(a,b){var c={};c[a]=b;this.ga(c)};h.prototype.Ua=
function(a,b,c,e,f,j){a!=this.S()&&a!=this.ta("__alias")&&(this.ya("__alias"),this.Ka("distinct_id",a));this.gb(this.S());this.O.Va=m;this.people.gc(b,c,e,f,j)};h.prototype.reset=function(){this.persistence.clear();this.O.Va=s;this.G({distinct_id:c.fb()},"")};h.prototype.S=function(){return this.ta("distinct_id")};h.prototype.pc=function(a,b){if(a===this.ta("$people_distinct_id"))return n.ba("Attempting to create alias for existing People user - aborting."),-2;var d=this;c.d(b)&&(b=this.S());if(a!==
b)return this.Ka("__alias",a),this.V("$create_alias",{alias:a,distinct_id:b},function(){d.Ua(a)});n.error("alias matches current distinct_id - skipping api call.");this.Ua(a);return-1};h.prototype.Jc=function(a){this.Ka("mp_name_tag",a)};h.prototype.Mb=function(a){if(c.k(a))c.extend(this.config,a),this.e("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.e("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.Tb(this.config),
y=y||this.e("debug")};h.prototype.e=function(a){return this.config[a]};h.prototype.ta=function(a){return this.persistence.props[a]};h.prototype.toString=function(){var a=this.e("name");"mixpanel"!==a&&(a="mixpanel."+a);return a};h.prototype.hb=function(a){return c.Db(u)||this.O.xc||c.Ab(this.Da,a)};h.prototype.gb=function(a){if(a&&!this.O.Va&&!this.e("disable_notifications")){n.log("MIXPANEL NOTIFICATION CHECK");var b=this;this.s(this.e("api_host")+"/decide/",{verbose:m,version:"1",lib:"web",token:this.e("token"),
distinct_id:a},this.Ja(function(a){a.notifications&&0<a.notifications.length&&b.ob.call(b,a.notifications[0])}))}};h.prototype.ob=function(a){(new g(a,this)).show()};q.prototype.Ia=function(a){this.c=a};q.prototype.set=function(a,b,d){var e={},f={};c.k(a)?(c.a(a,function(a,b){this.Z(b)||(f[b]=a)},this),d=b):f[a]=b;this.oa("save_referrer")&&this.c.persistence.eb(l.referrer);f=c.extend({},c.info.Mc(),this.c.persistence.Ec(),f);e.$set=f;return this.s(e,d)};q.prototype.Nb=function(a,b,d){var e={},f={};
c.k(a)?(c.a(a,function(a,b){this.Z(b)||(f[b]=a)},this),d=b):f[a]=b;e.$set_once=f;return this.s(e,d)};q.prototype.Bb=function(a,b,d){var e={},f={};c.k(a)?(c.a(a,function(a,b){this.Z(b)||(isNaN(parseFloat(a))?n.error("Invalid increment value passed to mixpanel.people.increment - must be a number"):f[b]=a)},this),d=b):(c.d(b)&&(b=1),f[a]=b);e.$add=f;return this.s(e,d)};q.prototype.append=function(a,b,d){var e={},f={};c.k(a)?(c.a(a,function(a,b){this.Z(b)||(f[b]=a)},this),d=b):f[a]=b;e.$append=f;return this.s(e,
d)};q.prototype.Sb=function(a,b,d){var e={},f={};c.k(a)?(c.a(a,function(a,b){this.Z(b)||(f[b]=c.isArray(a)?a:[a])},this),d=b):f[a]=c.isArray(b)?b:[b];e.$union=f;return this.s(e,d)};q.prototype.Zc=function(a,b,d){if(!c.Ic(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",c.extend({$amount:a},b),d)};q.prototype.uc=function(a){return this.set("$transactions",[],a)};q.prototype.wc=function(){if(this.jb())return this.s({$delete:this.c.S()});
n.error("mixpanel.people.delete_user() requires you to call identify() first")};q.prototype.toString=function(){return this.c.toString()+".people"};q.prototype.s=function(a,b){a.$token=this.oa("token");a.$distinct_id=this.c.S();var d=c.xb(a),e=c.truncate(d,255),d=c.la(d),d=c.qb(d);if(!this.jb())return this.ec(a),c.d(b)||(this.oa("verbose")?b({status:-1,error:r}):b(-1)),e;n.log("MIXPANEL PEOPLE REQUEST:");n.log(e);this.c.s(this.oa("api_host")+"/engage/",{data:d},this.c.Ja(b,e));return e};q.prototype.oa=
function(a){return this.c.e(a)};q.prototype.jb=function(){return this.c.O.Va===m};q.prototype.ec=function(a){"$set"in a?this.c.persistence.B("$set",a):"$set_once"in a?this.c.persistence.B("$set_once",a):"$add"in a?this.c.persistence.B("$add",a):"$append"in a?this.c.persistence.B("$append",a):"$union"in a?this.c.persistence.B("$union",a):n.error("Invalid call to _enqueue():",a)};q.prototype.gc=function(a,b,d,e,f){var j=this,g=c.extend({},this.c.persistence.Q("$set")),i=c.extend({},this.c.persistence.Q("$set_once")),
h=c.extend({},this.c.persistence.Q("$add")),l=this.c.persistence.Q("$append"),p=c.extend({},this.c.persistence.Q("$union"));!c.d(g)&&c.k(g)&&!c.T(g)&&(j.c.persistence.R("$set",g),this.set(g,function(b,d){0==b&&j.c.persistence.B("$set",g);c.d(a)||a(b,d)}));!c.d(i)&&c.k(i)&&!c.T(i)&&(j.c.persistence.R("$set_once",i),this.Nb(i,function(a,b){0==a&&j.c.persistence.B("$set_once",i);c.d(e)||e(a,b)}));!c.d(h)&&c.k(h)&&!c.T(h)&&(j.c.persistence.R("$add",h),this.Bb(h,function(a,d){0==a&&j.c.persistence.B("$add",
h);c.d(b)||b(a,d)}));!c.d(p)&&c.k(p)&&!c.T(p)&&(j.c.persistence.R("$union",p),this.Sb(p,function(a,b){0==a&&j.c.persistence.B("$union",p);c.d(f)||f(a,b)}));if(!c.d(l)&&c.isArray(l)&&l.length){for(var n=l.length-1;0<=n;n--){var o=l.pop();j.append(o,function(a,b){0==a&&j.c.persistence.B("$append",o);c.d(d)||d(a,b)})}j.c.persistence.save()}};q.prototype.Z=function(a){return"$distinct_id"===a||"$token"===a};h.bc=function(a,b){c.qc(this);this.$a=b;this.bb=this.$a.persistence;this.F=c.u(a.id);this.Gb=c.u(a.message_id);
this.body=(c.u(a.body)||"").replace(/\n/g,"<br/>");this.vc=c.u(a.cta)||"Close";this.ca=c.u(a.cta_url)||r;this.Wa=c.u(a.image_url)||r;this.da=c.u(a.type)||"takeover";this.style=c.u(a.style)||"light";this.K=c.u(a.thumb_image_url)||r;this.title=c.u(a.title)||"";this.za=c.u(a.video_url)||r;this.ia=g.ac;this.W=g.$b;this.ra=m;if(!this.ca)this.ca="#dismiss",this.ra=s;this.v="mini"===this.da;if(!this.v)this.da="takeover";this.Kc=!this.v?g.X:g.Aa;this.nb();this.ua=this.hc();this.kc()};var g=h.bc;g.L=200;g.z=
"mixpanel-notification";g.ja=0.6;g.I=25;g.ma=200;g.X=388;g.Aa=420;g.A=85;g.Ba=5;g.J=60;g.Ca=Math.round(g.J/2);g.ac=595;g.$b=334;g.prototype.show=function(){var a=this;this.nb();this.p?(this.jc(),this.ic(),this.lc(this.cc)):setTimeout(function(){a.show()},300)};g.prototype.Qa=c.o(function(){this.Fb||this.lb({invisible:m});var a=this.Vc?this.i("video"):this.P();if(this.Vb)this.mc("bg","visible"),this.M(a,"exiting"),setTimeout(this.mb,g.L);else{var b,c,e;this.v?(b="right",c=20,e=-100):(b="top",c=g.I,
e=g.ma+g.I);this.na([{q:this.i("bg"),m:"opacity",start:g.ja,l:0},{q:a,m:"opacity",start:1,l:0},{q:a,m:b,start:c,l:e}],g.L,this.mb)}});g.prototype.M=c.o(function(a,b){b=g.z+"-"+b;"string"===typeof a&&(a=this.i(a));a.className?~(" "+a.className+" ").indexOf(" "+b+" ")||(a.className+=" "+b):a.className=b});g.prototype.mc=c.o(function(a,b){b=g.z+"-"+b;"string"===typeof a&&(a=this.i(a));if(a.className)a.className=(" "+a.className+" ").replace(" "+b+" ","").replace(/^[\s\xA0]+/,"").replace(/[\s\xA0]+$/,
"")});g.prototype.na=c.o(function(a,b,c,e){var f=this,g=s,h,i;h=1*new Date;var l,e=e||h;l=h-e;for(h=0;h<a.length;h++){i=a[h];if("undefined"===typeof i.H)i.H=i.start;if(i.H!==i.l){var g=m,n=i.l>=i.start?1:-1;i.H=i.start+(i.l-i.start)*l/b;if("opacity"!==i.m)i.H=Math.round(i.H);if(0<n&&i.H>=i.l||0>n&&i.H<=i.l)i.H=i.l}}if(g){for(h=0;h<a.length;h++)i=a[h],i.q&&(i.q.style[i.m]=""+i.H+("opacity"===i.m?"":"px"));setTimeout(function(){f.na(a,b,c,e)},10)}else c&&c()});g.prototype.cc=c.o(function(){var a=this;
if(!this.Wc&&!this.ib()[this.F])this.Wc=m,this.p.appendChild(this.ea),setTimeout(function(){var b=a.P();if(a.Vb)a.v||a.M("bg","visible"),a.M(b,"visible"),a.kb();else{var c,e,f;a.v?(c="right",e=-100,f=20):(c="top",e=g.ma+g.I,f=g.I);a.na([{q:a.i("bg"),m:"opacity",start:0,l:g.ja},{q:b,m:"opacity",start:0,l:1},{q:b,m:c,start:e,l:f}],g.L,a.kb)}},100),c.D(a.i("cancel"),"click",function(b){b.preventDefault();a.Qa()}),c.D(a.i("button")||a.i("mini-content"),"click",function(b){b.preventDefault();a.U?(a.Ma("$campaign_open",
{$resource_type:"video"}),a.nc()):(a.Qa(),a.ra&&a.Ma("$campaign_open",{$resource_type:"link"},function(){window.location.href=a.ca}))})});g.prototype.i=function(a){return l.getElementById(g.z+"-"+a)};g.prototype.P=function(){return this.i(this.da)};g.prototype.ib=function(){return this.bb.props.__cmpns||(this.bb.props.__cmpns={})};g.prototype.N=function(a,b){return this.C[a]&&this.C[a]<=b};g.prototype.hc=function(){var a=[];this.v?(this.K=this.K||"//cdn.mxpnl.com/site_media/images/icons/notifications/mini-news-dark.png",
a.push(this.K)):(this.Wa?(a.push(this.Wa),this.zb='<img id="img" src="'+this.Wa+'"/>'):this.zb="",this.K?(a.push(this.K),this.Pb='<div id="thumbborder-wrapper"><div id="thumbborder"></div></div><img id="thumbnail" src="'+this.K+'" width="'+g.J+'" height="'+g.J+'"/><div id="thumbspacer"></div>'):this.Pb="");return a};g.prototype.ic=function(){var a="",b="",c="";this.ea=l.createElement("div");this.ea.id=g.z+"-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.ra||this.U?"":'<div id="button-close"></div>',e=this.U?'<div id="button-play"></div>':"";this.N("ie",7)&&(e=a="");a='<div id="takeover">'+this.Pb+'<div id="mainbox"><div id="cancel"><div id="cancel-icon"></div></div><div id="content">'+this.zb+'<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.vc+"</a>"+e+"</div></div></div>"}this.Xb?(b="//www.youtube.com/embed/"+this.Xb+"?wmode=transparent&showinfo=0&modestbranding=0&rel=0&autoplay=1&loop=0&vq=hd1080",this.Yb&&(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.Wb&&(b="//player.vimeo.com/video/"+this.Wb+"?autoplay=1&title=0&byline=0&portrait=0");if(this.U)this.fd='<iframe id="'+g.z+'-video-frame" width="'+this.ia+'" height="'+this.W+'" src="'+b+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen="1" scrolling="no"></iframe>',c='<div id="video-'+(this.Ta?"":"no")+'flip"><div id="video"><div id="video-holder"></div>'+c+"</div></div>";b=c+a;this.Ta&&(b=(this.v?a:"")+'<div id="flipcontainer"><div id="flipper">'+(this.v?c:b)+"</div></div>");
this.ea.innerHTML=('<div id="overlay" class="'+this.da+'"><div id="campaignid-'+this.F+'"><div id="bgwrapper"><div id="bg"></div>'+b+"</div></div></div>").replace(/class=\"/g,'class="'+g.z+"-").replace(/id=\"/g,'id="'+g.z+"-")};g.prototype.jc=function(){this.h="dark"===this.style?{Oa:"#1d1f25",$:"#282b32",qa:"#3a4147",rb:"#4a5157",rc:"#32353c",ub:"0.4",Za:"#2a3137",xa:"#fff",cb:"#9498a3",Ob:"#464851",wa:"#ddd"}:{Oa:"#fff",$:"#e7eaee",qa:"#eceff3",rb:"#f5f5f5",rc:"#e4ecf2",ub:"1.0",Za:"#fafafa",xa:"#5c6578",
cb:"#8b949b",Ob:"#ced9e6",wa:"#7c8598"};var a="0px 0px 35px 0px rgba(45, 49, 56, 0.7)",b=a,d=a,e=g.J+2*g.Ba,f=g.L/1E3+"s";this.v&&(a="none");var h={};h["@media only screen and (max-width: "+(g.Aa+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"},"#bgwrapper":{position:"relative",width:"100%",height:"100%"},"#bg":{position:"fixed",top:"0",left:"0",width:"100%",height:"100%","min-width":4*this.zc+"px","min-height":4*this.yc+"px","background-color":"black",opacity:"0.0","-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)",filter:"alpha(opacity=60)",transition:"opacity "+f},
"#bg.visible":{opacity:g.ja},".mini #bg":{width:"0",height:"0","min-width":"0"},"#flipcontainer":{perspective:"1000px",position:"absolute",width:"100%"},"#flipper":{position:"relative","transform-style":"preserve-3d",transition:"0.3s"},"#takeover":{position:"absolute",left:"50%",width:g.X+"px","margin-left":Math.round(-g.X/2)+"px","backface-visibility":"hidden",transform:"rotateY(0deg)",opacity:"0.0",top:g.ma+"px",transition:"opacity "+f+", top "+f},"#takeover.visible":{opacity:"1.0",top:g.I+"px"},
"#takeover.exiting":{opacity:"0.0",top:g.ma+"px"},"#thumbspacer":{height:g.Ca+"px"},"#thumbborder-wrapper":{position:"absolute",top:-g.Ba+"px",left:g.X/2-g.Ca-g.Ba+"px",width:e+"px",height:e/2+"px",overflow:"hidden"},"#thumbborder":{position:"absolute",width:e+"px",height:e+"px","border-radius":e+"px","background-color":this.h.$,opacity:"0.5"},"#thumbnail":{position:"absolute",top:"0px",left:g.X/2-g.Ca+"px",width:g.J+"px",height:g.J+"px",overflow:"hidden","z-index":"100","border-radius":g.J+"px"},
"#mini":{position:"absolute",right:"20px",top:g.I+"px",width:this.Kc+"px",height:2*g.A+"px","margin-top":20-g.A+"px","backface-visibility":"hidden",opacity:"0.0",transform:"rotateX(90deg)",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.h.Oa,"font-size":"14px",color:this.h.cb},"#mini #mainbox":{height:g.A+
"px","margin-top":g.A+"px","border-radius":"3px",transition:"background-color "+f},"#mini-border":{height:g.A+6+"px",width:g.Aa+6+"px",position:"absolute",top:"-3px",left:"-3px","margin-top":g.A+"px","border-radius":"6px",opacity:"0.25","background-color":"#fff","z-index":"-1","box-shadow":d},"#mini-icon":{position:"relative",display:"inline-block",width:"75px",height:g.A+"px","border-radius":"3px 0 0 3px","background-color":this.h.$,background:"linear-gradient(135deg, "+this.h.rb+" 0%, "+this.h.$+
" 100%)",transition:"background-color "+f},"#mini:hover #mini-icon":{"background-color":this.h.Za},"#mini:hover #mainbox":{"background-color":this.h.Za},"#mini-icon-img":{position:"absolute","background-image":"url("+this.K+")",width:"48px",height:"48px",top:"20px",left:"12px"},"#content":{padding:"30px 20px 0px 20px"},"#mini-content":{"text-align":"left",height:g.A+"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.h.xa},"#body":{"max-height":"600px","margin-bottom":"25px",overflow:"hidden","word-wrap":"break-word","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:g.A+"px","font-size":"16px","letter-spacing":"0.8px",color:this.h.xa},"#mini #body-text":{display:"table",height:g.A+"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.h.Ob,transition:"color "+f},"#tagline a:hover":{color:this.h.wa},"#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 "+f},"#mini #cancel":{margin:"7px 7px 0 0"},"#cancel-icon":{width:"8px",
height:"8px",overflow:"hidden","background-image":"url(//cdn.mxpnl.com/site_media/images/icons/notifications/cancel-x.png)",opacity:this.h.ub},"#cancel:hover":{"background-color":this.h.qa},"#button":{display:"block",height:"60px","line-height":"60px","text-align":"center","background-color":this.h.$,"border-radius":"0 0 4px 4px",overflow:"hidden",cursor:"pointer",transition:"background-color "+f},"#button-close":{display:"inline-block",width:"9px",height:"60px","margin-right":"8px","vertical-align":"top",
"background-image":"url(//cdn.mxpnl.com/site_media/images/icons/notifications/close-x-"+this.style+".png)","background-repeat":"no-repeat","background-position":"0px 25px"},"#button-play":{display:"inline-block",width:"30px",height:"60px","margin-left":"15px","background-image":"url(//cdn.mxpnl.com/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.h.xa,transition:"color "+f},"#button:hover":{"background-color":this.h.qa,color:this.h.wa},"#button:hover a":{color:this.h.wa},"#video-noflip":{position:"relative",top:2*-this.W+"px"},"#video-flip":{"backface-visibility":"hidden",transform:"rotateY(180deg)"},"#video":{position:"absolute",width:this.ia-1+"px",height:this.W+"px",top:g.I+"px","margin-top":"100px",left:"50%","margin-left":Math.round(-this.ia/
2)+"px",overflow:"hidden","border-radius":"5px","box-shadow":b,transform:"translateZ(1px)",transition:"opacity "+f+", top "+f},"#video.exiting":{opacity:"0.0",top:this.W+"px"},"#video-holder":{position:"absolute",width:this.ia-1+"px",height:this.W+"px",overflow:"hidden","border-radius":"5px"},"#video-frame":{"margin-left":"-1px",width:this.ia+"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.h.Oa,opacity:"0.7"},"#video-elapsed":{width:"0","background-color":"#6cb6f5",opacity:"0.9"},"#video #video-time":{width:"10%",right:"0","font-size":"11px","line-height":"25px",color:this.h.cb,"background-color":"#666","border-radius":"0 0 5px 0"}};this.N("ie",8)&&c.extend(a,{"* html #overlay":{position:"absolute"},"* html #bg":{position:"absolute"},"html, body":{height:"100%"}});
this.N("ie",7)&&c.extend(a,{"#mini #body":{display:"inline",zoom:"1",border:"1px solid "+this.h.qa},"#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(","),d=["khtml","moz","ms","o","webkit"],k;for(k in a)for(e=0;e<b.length;e++)if(f=b[e],f in a[k])for(var i=a[k][f],n=0;n<d.length;n++)a[k]["-"+d[n]+"-"+f]=i;(function(a,b){function c(a){var b="",d;for(d in a){var f=
d.replace(/#/g,"#"+g.z+"-").replace(/\./g,"."+g.z+"-"),b=b+("\n"+f+" {"),f=a[d],e;for(e in f)b+=e+":"+f[e]+";";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),f=l.head||l.getElementsByTagName("head")[0]||l.documentElement,e=l.createElement("style");f.appendChild(e);e.setAttribute("type","text/css");e.styleSheet?e.styleSheet.cssText=d:e.textContent=d})(a,h)};g.prototype.kc=c.o(function(){if(this.za){var a=this;a.Yb="postMessage"in window;l.createElement("div");
a.ca=a.za;var b=a.za.match(/(?:youtube(?:-nocookie)?\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/ ]{11})/i),c=a.za.match(/vimeo\.com\/.*?(\d+)/i);if(b){if(a.U=m,a.Xb=b[1],a.Yb)window.onYouTubeIframeAPIReady=function(){a.i("video-frame")&&a.pb()},b=l.createElement("script"),b.src="//www.youtube.com/iframe_api",c=l.getElementsByTagName("script")[0],c.parentNode.insertBefore(b,c)}else if(c)a.U=m,a.Wb=c[1];if(a.N("ie",7)||a.N("firefox",3))a.U=s,a.ra=m}});g.prototype.kb=c.o(function(){function a(a,
b){var c={};if(l.defaultView&&l.defaultView.getComputedStyle)c=l.defaultView.getComputedStyle(a,r);else if(a.currentStyle)c=a.currentStyle;return c[b]}var b=this;c.D(b.i("bg"),"click",function(){b.Qa()});if(this.F){var d=this.i("overlay");d&&"hidden"!==a(d,"visibility")&&"none"!==a(d,"display")&&this.lb()}});g.prototype.lb=c.o(function(a){if(!this.Fb)this.Fb=m,this.F&&(this.ib()[this.F]=1*new Date,this.bb.save()),this.Ma("$campaign_delivery",a),this.$a.people.append({$campaigns:this.F,$notifications:{campaign_id:this.F,
message_id:this.Gb,type:"web",time:new Date}})});g.prototype.lc=function(a){var b=this;if(0===this.ua.length)a();else{for(var c=0,e=[],f=0;f<this.ua.length;f++){var g=new Image,h=function(){c++;c===b.ua.length&&a&&(a(),a=r)};g.onload=h;g.src=this.ua[f];g.complete&&h();e.push(g)}this.N("ie",7)&&setTimeout(function(){var b=m;for(f=0;f<e.length;f++)e[f].complete||(b=s);b&&a&&(a(),a=r)},500)}};g.prototype.mb=c.o(function(){window.clearInterval(this.oc);this.ea.style.visibility="hidden";this.p.removeChild(this.ea)});
g.prototype.nb=function(){function a(a){if(a in e)return m;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 e)return m;return s}function b(a){return(a=z.userAgent.match(a))&&a[1]}this.C={};this.C.chrome=b(/Chrome\/(\d+)/);this.C.firefox=b(/Firefox\/(\d+)/);this.C.ie=b(/MSIE (\d+).+/);!this.C.ie&&!window.ActiveXObject&&"ActiveXObject"in window&&(this.C.ie=11);if(this.p=l.body||l.getElementsByTagName("body")[0])this.zc=Math.max(this.p.scrollWidth,
l.documentElement.scrollWidth,this.p.offsetWidth,l.documentElement.offsetWidth,this.p.clientWidth,l.documentElement.clientWidth),this.yc=Math.max(this.p.scrollHeight,l.documentElement.scrollHeight,this.p.offsetHeight,l.documentElement.offsetHeight,this.p.clientHeight,l.documentElement.clientHeight);var c=this.C.ie,e=l.createElement("div").style;this.Vb=this.p&&a("transition")&&a("transform");this.Ta=(33<=this.C.chrome||15<=this.C.firefox)&&this.p&&a("backfaceVisibility")&&a("perspective")&&a("transform")};
g.prototype.nc=c.o(function(){function a(){window.YT&&window.YT.loaded&&b.pb();b.Vc=m;b.P().style.visibility="hidden"}var b=this,c=[{q:b.P(),m:"opacity",start:1,l:0},{q:b.P(),m:"top",start:g.I,l:-500},{q:b.i("video-noflip"),m:"opacity",start:0,l:1},{q:b.i("video-noflip"),m:"top",start:2*-b.W,l:0}];if(b.v){var e=b.i("bg"),f=b.i("overlay");e.style.width="100%";e.style.height="100%";f.style.width="100%";b.M(b.P(),"exiting");b.M(e,"visible");c.push({q:b.i("bg"),m:"opacity",start:0,l:g.ja})}b.i("video-holder").innerHTML=
b.fd;b.Ta?(b.M("flipper","flipped"),setTimeout(a,g.L)):b.na(c,g.L,a)});g.prototype.Ma=function(a,b,d){this.F?(b=b||{},b=c.extend(b,{campaign_id:this.F,message_id:this.Gb,message_type:"web_inapp",message_subtype:this.da}),this.$a.track(a,b,d)):d&&d.call()};g.prototype.pb=c.o(function(){var a=this;if(!a.gd){a.gd=m;var b=a.i("video-elapsed"),d=a.i("video-time"),e=a.i("video-progress");new window.YT.Player(g.z+"-video-frame",{events:{onReady:function(f){function g(a){var a=Math.round(i-a),b=Math.floor(a/
60),c=Math.floor(b/60),a=a-60*b;d.innerHTML="-"+(c?c+":":"")+("00"+(b-60*c)).slice(-2)+":"+("00"+a).slice(-2)}var h=f.target,i=h.getDuration();g(0);a.oc=window.setInterval(function(){var a=h.getCurrentTime();b.style.width=100*(a/i)+"%";g(a)},250);c.D(e,"click",function(a){a=Math.max(0,a.pageX-e.getBoundingClientRect().left);h.seekTo(i*a/e.clientWidth,m)})}}})}});c.toArray=c.ha;c.isObject=c.k;c.JSONEncode=c.la;c.JSONDecode=c.ka;c.isBlockedUA=c.Db;c.isEmptyObject=c.T;c.info=c.info;c.info.device=c.info.wb;
c.info.browser=c.info.aa;c.info.properties=c.info.fa;h.prototype.init=h.prototype.Xa;h.prototype.reset=h.prototype.reset;h.prototype.disable=h.prototype.disable;h.prototype.time_event=h.prototype.Yc;h.prototype.track=h.prototype.V;h.prototype.track_links=h.prototype.ad;h.prototype.track_forms=h.prototype.$c;h.prototype.track_pageview=h.prototype.Rb;h.prototype.register=h.prototype.ga;h.prototype.register_once=h.prototype.G;h.prototype.unregister=h.prototype.ya;h.prototype.identify=h.prototype.Ua;
h.prototype.alias=h.prototype.pc;h.prototype.name_tag=h.prototype.Jc;h.prototype.set_config=h.prototype.Mb;h.prototype.get_config=h.prototype.e;h.prototype.get_property=h.prototype.ta;h.prototype.get_distinct_id=h.prototype.S;h.prototype.toString=h.prototype.toString;h.prototype._check_and_handle_notifications=h.prototype.gb;h.prototype._show_notification=h.prototype.ob;o.prototype.properties=o.prototype.fa;o.prototype.update_search_keyword=o.prototype.Ub;o.prototype.update_referrer_info=o.prototype.eb;
o.prototype.get_cross_subdomain=o.prototype.Dc;o.prototype.clear=o.prototype.clear;q.prototype.set=q.prototype.set;q.prototype.set_once=q.prototype.Nb;q.prototype.increment=q.prototype.Bb;q.prototype.append=q.prototype.append;q.prototype.union=q.prototype.Sb;q.prototype.track_charge=q.prototype.Zc;q.prototype.clear_charges=q.prototype.uc;q.prototype.delete_user=q.prototype.wc;q.prototype.toString=q.prototype.toString;c.Oc(h);var x={};(function(){J=1;t=window.mixpanel;c.d(t)?n.ba("'mixpanel' object not initialized. Ensure you are using the latest version of the Mixpanel JS Library along with the snippet we provide."):
t.__loaded||t.config&&t.persistence?n.error("Mixpanel library has already been downloaded at least once."):1.1>(t.__SV||0)?n.ba("Version mismatch; please ensure you're using the latest version of the Mixpanel code snippet."):(c.a(t._i,function(a){a&&c.isArray(a)&&(x[a[a.length-1]]=F.apply(this,a))}),R(),t.init(),c.a(x,function(a){a.pa()}),Q())})()})();
})();