0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 12:21:02 +01:00
posthog/frontend/dist/tr.js
2020-01-25 23:52:37 -08:00

148 lines
72 KiB
JavaScript

(function() {
function k(da){throw da;}var l=void 0,o=!0,v=null,D=!1;function L(){return function(){}}
(function(){function da(){function a(){if(!a.Ad)ma=a.Ad=o,na=D,c.a(F,function(a){a.Rc()})}function b(){try{s.documentElement.doScroll("left")}catch(d){setTimeout(b,1);return}a()}if(s.addEventListener)"complete"===s.readyState?a():s.addEventListener("DOMContentLoaded",a,D);else if(s.attachEvent){s.attachEvent("onreadystatechange",a);var d=D;try{d=A.frameElement===v}catch(f){}s.documentElement.doScroll&&d&&b()}c.J(A,"load",a,o)}function ua(){x.init=function(a,b,d){if(d)return x[d]||(x[d]=F[d]=V(a,b,
d),x[d].Ca()),x[d];d=x;if(F.posthog)d=F.posthog;else if(a)d=V(a,b,"posthog"),d.Ca(),F.posthog=d;x=d;1===ea&&(A.posthog=x);va()}}function va(){c.a(F,function(a,b){"posthog"!==b&&(x[b]=a)});x._=c}function V(a,b,d){var f,g="posthog"===d?x:x[d];if(g&&0===ea)f=g;else{if(g&&!c.isArray(g)){q.error("You have already initialized "+d);return}f=new e}f.Ab={};f.Pb=D;f.Gb=[];f.ia(a,b,d);f.people=new n;f.people.ia(f);G=G||f.c("debug");f.__autotrack_enabled=f.c("autotrack");if(f.c("autotrack"))P.Bd(f.c("token"),
100,100)?P.Hd()?P.aa(f):(f.__autotrack_enabled=D,q.log("Disabling Automatic Event Collection because this browser is not supported")):(f.__autotrack_enabled=D,q.log("Not in active bucket: disabling Automatic Event Collection."));!c.e(g)&&c.isArray(g)&&(f.Xa.call(f.people,g.people),f.Xa(g));return f}function e(){}function n(){}function h(a,b){c.Sb(this);this.ba=b;this.wb=this.ba.persistence;this.Ka=this.ba.c("inapp_protocol");this.Ea=this.ba.c("cdn");this.I=c.R(a.id);this.kc=c.R(a.message_id);this.body=
(c.R(a.body)||"").replace(/\n/g,"<br/>");this.vd=c.R(a.cta)||"Close";this.pa=c.R(a.type)||"takeover";this.style=c.R(a.style)||"light";this.title=c.R(a.title)||"";this.va=h.Nc;this.da=h.Mc;this.bc=a.display_triggers||[];this.$=a.cta_url||v;this.rb=a.image_url||v;this.z=a.thumb_image_url||v;this.Qa=a.video_url||v;if(this.z&&0===this.z.indexOf("//"))this.z=this.z.replace("//",this.Ka);this.Fa=o;if(!this.$)this.$="#dismiss",this.Fa=D;this.u="mini"===this.pa;if(!this.u)this.pa="takeover";this.Kd=!this.u?
h.fa:h.Ra;this.Ob();this.Ia=this.ad();this.dd()}function p(a){this.props={};this.Tb=D;this.name=a.persistence_name?"ph_"+a.persistence_name:"ph_"+a.token+"_posthog";var b=a.persistence;if("cookie"!==b&&"localStorage"!==b)q.Z("Unknown persistence type "+b+"; falling back to cookie"),b=a.persistence="cookie";this.w="localStorage"===b&&c.localStorage.sb()?c.localStorage:c.cookie;this.load();this.Fc(a);this.je(a);this.save()}function u(){}function W(){this.oc="submit"}function M(){this.oc="click"}function E(){}
function X(a){switch(typeof a.className){case "string":return a.className;case "object":return a.className.qe||a.getAttribute("class")||"";default:return""}}function fa(a){var b="";Y(a)&&a.childNodes&&a.childNodes.length&&c.a(a.childNodes,function(a){a&&3===a.nodeType&&a.textContent&&(b+=c.trim(a.textContent).split(/(\s+)/).filter(Z).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))});return c.trim(b)}function J(a,b){return a&&a.tagName&&a.tagName.toLowerCase()===b.toLowerCase()}
function wa(a,b){if(!a||J(a,"html")||!(a&&1===a.nodeType))return D;for(var d=D,c=[a],g=a;g.parentNode&&!J(g,"body");)-1<ga.indexOf(g.parentNode.tagName.toLowerCase())&&(d=o),c.push(g.parentNode),g=g.parentNode;c=a.tagName.toLowerCase();switch(c){case "html":return D;case "form":return"submit"===b.type;case "input":return"change"===b.type||"click"===b.type;case "select":case "textarea":return"change"===b.type||"click"===b.type;default:return d?"click"==b.type:"click"===b.type&&(-1<ga.indexOf(c)||"true"===
a.getAttribute("contenteditable"))}}function Y(a){for(var b=a;b.parentNode&&!J(b,"body");b=b.parentNode){var d=X(b).split(" ");if(c.g(d,"mp-sensitive")||c.g(d,"mp-no-track"))return D}if(c.g(X(a).split(" "),"mp-include"))return o;if(J(a,"input")||J(a,"select")||J(a,"textarea")||"true"===a.getAttribute("contenteditable"))return D;b=a.type||"";if("string"===typeof b)switch(b.toLowerCase()){case "hidden":return D;case "password":return D}a=a.name||a.id||"";return"string"===typeof a&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(a.replace(/[^a-zA-Z0-9]/g,
""))?D:o}function Z(a){if(a===v||c.e(a)||"string"===typeof a&&(a=c.trim(a),/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((a||"").replace(/[- ]/g,""))||/(^\d{3}-?\d{2}-?\d{4}$)/.test(a)))return D;return o}function xa(a,b){oa(o,a,b)}function ya(a,b){oa(D,a,b)}function za(a,b){return"1"===$(b).get(aa(a,b))}function pa(a,b){return Aa(b)?o:"0"===$(b).get(aa(a,b))}function K(a){return ha(a,
function(a){return this.c(a)})}function H(a){return ha(a,function(a){return this.M(a)})}function N(a){return ha(a,function(a){return this.M(a)})}function Ba(a,b){b=b||{};$(b).remove(aa(a,b),!!b.Yb)}function $(a){a=a||{};return"localStorage"===a.qc?c.localStorage:c.cookie}function aa(a,b){b=b||{};return(b.pc||Ca)+a}function Aa(a){var a=a&&a.window||A,b=a.navigator||{},d=D;c.a([b.doNotTrack,b.msDoNotTrack,a.doNotTrack],function(a){c.g([o,1,"1","yes"],a)&&(d=o)});return d}function oa(a,b,d){!c.oa(b)||
!b.length?console.error("gdpr."+(a?"optIn":"optOut")+" called with an invalid token"):(d=d||{},$(d).set(aa(b,d),a?1:0,c.ic(d.Xb)?d.Xb:v,!!d.Yb,!!d.Td),d.p&&a&&d.p(d.be||"$opt_in",d.ce))}function ha(a,b){return function(){var d=D;try{var c=b.call(this,"token"),g=b.call(this,"opt_out_tracking_persistence_type"),j=b.call(this,"opt_out_tracking_cookie_prefix"),m=b.call(this,"window");c&&(d=pa(c,{qc:g,pc:j,window:m}))}catch(i){console.error("Unexpected error when checking tracking opt-out status: "+i)}if(!d)return a.apply(this,
arguments);d=arguments[arguments.length-1];"function"===typeof d&&d(0)}}function ia(a){if(a===v)return v;switch(typeof a){case "object":if(c.O(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 v}function Q(a){if(a===v)return D;switch(typeof a){case "boolean":return a;case "number":return 0!==a;case "string":return 0<a.length;case "object":if(c.isArray(a)&&0<a.length||c.O(a)&&0<a.getTime()||c.h(a)&&
!c.T(a))return o}return D}function Da(a,b){(!a.operator||"datetime"!==a.operator||!a.children||1!==a.children.length)&&k("Invalid cast operator: datetime "+a);var d=w(a.children[0],b);if(d===v)return v;switch(typeof d){case "number":case "string":d=new Date(d);if(isNaN(d.getTime()))break;return d;case "object":if(c.O(d))return d}return v}function Ea(a,b){(!a.operator||-1===["-","*","/","%"].indexOf(a.operator)||!a.children||2>a.children.length)&&k("Invalid arithmetic operator "+a);var d=w(a.children[0],
b),c=w(a.children[1],b);if("number"===typeof d&&"number"===typeof c)switch(a.operator){case "-":return d-c;case "*":return d*c;case "/":if(0!==c)return d/c;break;case "%":if(0===c)break;return 0===d?0:0>d&&0<c||0<d&&0>c?-(Math.floor(d/c)*c-d):d%c;default:k("Unknown operator: "+a.operator)}return v}function Fa(a,b){if(a===b)return o;if(a===v||b===v||a.length!==b.length)return D;for(var d=0;d<a.length;d++)if(a[d]!==b[d])return D;return o}function Ga(a,b){if(a===v&&a===b)return o;if(typeof a===typeof b)switch(typeof a){case "number":case "string":case "boolean":return a===
b;case "object":if(c.isArray(a)&&c.isArray(b))return Fa(a,b);if(c.O(a)&&c.O(b))return a.getTime()===b.getTime();if(c.h(a)&&c.h(b))return JSON.stringify(a)===JSON.stringify(b)}return D}function Ha(a,b){(!a.operator||-1===[">",">=","<","<="].indexOf(a.operator)||!a.children||2!==a.children.length)&&k("Invalid comparison operator "+a);var d=w(a.children[0],b),f=w(a.children[1],b);if(typeof d===typeof f)if("number"===typeof f||c.O(f))switch(d=ia(d),f=ia(f),a.operator){case ">":return d>f;case ">=":return d>=
f;case "<":return d<f;case "<=":return d<=f}else if("string"===typeof f)switch(d=d.localeCompare(f),a.operator){case ">":return 0<d;case ">=":return 0<=d;case "<":return 0>d;case "<=":return 0>=d}return v}function Ia(a,b){a.operator||k("Invalid operator: operator key missing "+a);switch(a.operator){case "and":return(!a.operator||"and"!==a.operator||!a.children||2!==a.children.length)&&k("Invalid operator: AND "+a),Q(w(a.children[0],b))&&Q(w(a.children[1],b));case "or":return(!a.operator||"or"!==a.operator||
!a.children||2!==a.children.length)&&k("Invalid operator: OR "+a),Q(w(a.children[0],b))||Q(w(a.children[1],b));case "in":case "not in":(!a.operator||-1===["in","not in"].indexOf(a.operator)||!a.children||2!==a.children.length)&&k("Invalid operator: IN/NOT IN "+a);var d=w(a.children[0],b),f=w(a.children[1],b);!c.isArray(f)&&!c.oa(f)&&k("Invalid operand for operator IN: invalid type"+f);d=-1<f.indexOf(d);return"not in"===a.operator?!d:d;case "+":return(!a.operator||"+"!==a.operator||!a.children||2>
a.children.length)&&k("Invalid operator: PLUS "+a),d=w(a.children[0],b),f=w(a.children[1],b),"number"===typeof d&&"number"===typeof f||"string"===typeof d&&"string"===typeof f?d+f:v;case "-":case "*":case "/":case "%":return Ea(a,b);case "==":case "!=":a:switch((!a.operator||-1===["==","!="].indexOf(a.operator)||!a.children||2!==a.children.length)&&k("Invalid equality operator "+a),f=Ga(w(a.children[0],b),w(a.children[1],b)),a.operator){case "==":d=f;break a;case "!=":d=!f}return d;case ">":case "<":case ">=":case "<=":return Ha(a,
b);case "boolean":return(!a.operator||"boolean"!==a.operator||!a.children||1!==a.children.length)&&k("Invalid cast operator: boolean "+a),Q(w(a.children[0],b));case "datetime":return Da(a,b);case "list":return(!a.operator||"list"!==a.operator||!a.children||1!==a.children.length)&&k("Invalid cast operator: list "+a),d=w(a.children[0],b),d===v?v:c.isArray(d)?d:v;case "number":return(!a.operator||"number"!==a.operator||!a.children||1!==a.children.length)&&k("Invalid cast operator: number "+a),ia(w(a.children[0],
b));case "string":a:{(!a.operator||"string"!==a.operator||!a.children||1!==a.children.length)&&k("Invalid cast operator: string "+a);d=w(a.children[0],b);switch(typeof d){case "object":d=c.O(d)?d.toJSON():JSON.stringify(d);break a}d=""+d}return d;case "defined":case "not defined":return(!a.operator||-1===["defined","not defined"].indexOf(a.operator)||!a.children||1!==a.children.length)&&k("Invalid defined/not defined operator: "+a),d=w(a.children[0],b)!==v,"not defined"===a.operator?!d:d;case "not":return(!a.operator||
"not"!==a.operator||!a.children||1!==a.children.length)&&k("Invalid not operator: "+a),d=w(a.children[0],b),d===v?o:"boolean"===typeof d?!d:v}}function w(a,b){if(a.property){var d;a:switch((!a.property||!a.value)&&k("Invalid operand: missing required keys "+a),a.property){case "event":d=b[a.value]!==l?b[a.value]:v;break a;case "literal":if("now"===a.value)d=new Date;else if("object"===typeof a.value){var c=a.value;d=c.window;(!d||!d.unit||!d.value)&&k("Invalid window: missing required keys "+JSON.stringify(c));
c=new Date;switch(d.unit){case "hour":c.setTime(c.getTime()+-36E5*d.value);break;case "day":c.setTime(c.getTime()+-864E5*d.value);break;case "week":c.setTime(c.getTime()+-6048E5*d.value);break;case "month":c.setTime(c.getTime()+-2592E6*d.value);break;default:k("Invalid unit: "+d.unit)}d=c}else d=a.value;break a;default:k("Invalid operand: Invalid property type "+a.property)}return d}if(a.operator)return Ia(a,b)}var G=D,A;if("undefined"===typeof window){var B={hostname:""};A={navigator:{userAgent:""},
document:{location:B,referrer:""},screen:{width:0,height:0},location:B}}else A=window;var B=Array.prototype,qa=Object.prototype,O=B.slice,R=qa.toString,ba=qa.hasOwnProperty,z=A.console,I=A.navigator,s=A.document,S=A.opera,ca=A.screen,y=I.userAgent,ja=Function.prototype.bind,ra=B.forEach,sa=B.indexOf,B=Array.isArray,ka={},ta=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,c={trim:function(a){return a.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},q={log:function(){if(G&&!c.e(z)&&z)try{z.log.apply(z,arguments)}catch(a){c.a(arguments,
function(a){z.log(a)})}},error:function(){if(G&&!c.e(z)&&z){var a=["Posthog error:"].concat(c.sa(arguments));try{z.error.apply(z,a)}catch(b){c.a(a,function(a){z.error(a)})}}},Z:function(){if(!c.e(z)&&z){var a=["Posthog error:"].concat(c.sa(arguments));try{z.error.apply(z,a)}catch(b){c.a(a,function(a){z.error(a)})}}}};c.bind=function(a,b){var d,f;if(ja&&a.bind===ja)return ja.apply(a,O.call(arguments,1));c.Ja(a)||k(new TypeError);d=O.call(arguments,2);return f=function(){if(!(this instanceof f))return a.apply(b,
d.concat(O.call(arguments)));var c={};c.prototype=a.prototype;var j=new c;c.prototype=v;c=a.apply(j,d.concat(O.call(arguments)));return Object(c)===c?c:j}};c.Sb=function(a){for(var b in a)"function"===typeof a[b]&&(a[b]=c.bind(a[b],a))};c.a=function(a,b,d){if(!(a===v||a===l))if(ra&&a.forEach===ra)a.forEach(b,d);else if(a.length===+a.length)for(var c=0,g=a.length;c<g&&!(c in a&&b.call(d,a[c],c,a)===ka);c++);else for(c in a)if(ba.call(a,c)&&b.call(d,a[c],c,a)===ka)break};c.R=function(a){a&&c.oa(a)&&
(a=a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"));return a};c.extend=function(a){c.a(O.call(arguments,1),function(b){for(var d in b)b[d]!==l&&(a[d]=b[d])});return a};c.isArray=B||function(a){return"[object Array]"===R.call(a)};c.Ja=function(a){try{return/^\s*\bfunction\b/.test(a)}catch(b){return D}};c.Gd=function(a){return!(!a||!ba.call(a,"callee"))};c.sa=function(a){return!a?[]:a.sa?a.sa():c.isArray(a)||c.Gd(a)?O.call(a):c.le(a)};
c.keys=function(a){var b=[];if(a===v)return b;c.a(a,function(a,c){b[b.length]=c});return b};c.le=function(a){var b=[];if(a===v)return b;c.a(a,function(a){b[b.length]=a});return b};c.te=function(a){return a};c.ec=function(a,b){var d=D;if(a===v)return d;if(sa&&a.indexOf===sa)return-1!=a.indexOf(b);c.a(a,function(a){if(d||(d=a===b))return ka});return d};c.g=function(a,b){return-1!==a.indexOf(b)};c.gc=function(a,b){a.prototype=new b;a.$d=b.prototype};c.h=function(a){return a===Object(a)&&!c.isArray(a)};
c.T=function(a){if(c.h(a)){for(var b in a)if(ba.call(a,b))return D;return o}return D};c.e=function(a){return a===l};c.oa=function(a){return"[object String]"==R.call(a)};c.O=function(a){return"[object Date]"==R.call(a)};c.ic=function(a){return"[object Number]"==R.call(a)};c.Id=function(a){return!!(a&&1===a.nodeType)};c.lb=function(a){c.a(a,function(b,d){c.O(b)?a[d]=c.Cd(b):c.h(b)&&(a[d]=c.lb(b))});return a};c.timestamp=function(){Date.now=Date.now||function(){return+new Date};return Date.now()};c.Cd=
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.m=function(a){return function(){try{return a.apply(this,arguments)}catch(b){q.Z("Implementation error. Please turn on debug and contact support@posthog.com."),G&&q.Z(b)}}};c.Pd=function(a){for(var b=["identify","_check_and_handle_notifications","_show_notification"],d=0;d<b.length;d++)a.prototype[b[d]]=c.m(a.prototype[b[d]])};
c.Qd=function(a){for(var b in a)"function"===typeof a[b]&&(a[b]=c.m(a[b]))};c.Ma=function(a){var b={};c.a(a,function(a,f){c.oa(a)&&0<a.length&&(b[f]=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.h(a)?(d={},c.a(a,function(a,g){d[g]=c.truncate(a,b)})):d=a;return d};c.ea=function(){return function(a){function b(a,c){var j="",m=0,i=m="",i=0,e=j,h=[],r=c[a];r&&"object"===typeof r&&"function"===typeof r.toJSON&&
(r=r.toJSON(a));switch(typeof r){case "string":return d(r);case "number":return isFinite(r)?""+r:"null";case "boolean":case "null":return""+r;case "object":if(!r)return"null";j+=" ";h=[];if("[object Array]"===R.apply(r)){i=r.length;for(m=0;m<i;m+=1)h[m]=b(m,r)||"null";return i=0===h.length?"[]":j?"[\n"+j+h.join(",\n"+j)+"\n"+e+"]":"["+h.join(",")+"]"}for(m in r)ba.call(r,m)&&(i=b(m,r))&&h.push(d(m)+(j?": ":":")+i);return i=0===h.length?"{}":j?"{"+h.join(",")+""+e+"}":"{"+h.join(",")+"}"}}function d(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.xa=function(){function a(){switch(i){case "t":return g("t"),g("r"),g("u"),g("e"),o;case "f":return g("f"),
g("a"),g("l"),g("s"),g("e"),D;case "n":return g("n"),g("u"),g("l"),g("l"),v}j('Unexpected "'+i+'"')}function b(){for(;i&&" ">=i;)g()}function d(){var a,b,d="",c;if('"'===i)for(;g();){if('"'===i)return g(),d;if("\\"===i)if(g(),"u"===i){for(b=c=0;4>b;b+=1){a=parseInt(g(),16);if(!isFinite(a))break;c=16*c+a}d+=String.fromCharCode(c)}else if("string"===typeof e[i])d+=e[i];else break;else d+=i}j("Bad string")}function c(){var a;a="";"-"===i&&(a="-",g("-"));for(;"0"<=i&&"9">=i;)a+=i,g();if("."===i)for(a+=
".";g()&&"0"<=i&&"9">=i;)a+=i;if("e"===i||"E"===i){a+=i;g();if("-"===i||"+"===i)a+=i,g();for(;"0"<=i&&"9">=i;)a+=i,g()}a=+a;if(isFinite(a))return a;j("Bad number")}function g(a){a&&a!==i&&j("Expected '"+a+"' instead of '"+i+"'");i=h.charAt(m);m+=1;return i}function j(a){a=new SyntaxError(a);a.pe=m;a.text=h;k(a)}var m,i,e={'"':'"',"\\":"\\","/":"/",b:"\u0008",f:"\u000c",n:"\n",r:"\r",t:"\t"},h,r;r=function(){b();switch(i){case "{":var m;a:{var e,h={};if("{"===i){g("{");b();if("}"===i){g("}");m=h;break a}for(;i;){e=
d();b();g(":");Object.hasOwnProperty.call(h,e)&&j('Duplicate key "'+e+'"');h[e]=r();b();if("}"===i){g("}");m=h;break a}g(",");b()}}j("Bad object")}return m;case "[":a:{m=[];if("["===i){g("[");b();if("]"===i){g("]");e=m;break a}for(;i;){m.push(r());b();if("]"===i){g("]");e=m;break a}g(",");b()}}j("Bad array")}return e;case '"':return d();case "-":return c();default:return"0"<=i&&"9">=i?c():a()}};return function(a){h=a;m=0;i=" ";a=r();b();i&&j("Syntax error");return a}}();c.gb=function(a){var b,d,f,
g,j=0,m=0,i="",i=[];if(!a)return a;a=c.ke(a);do b=a.charCodeAt(j++),d=a.charCodeAt(j++),f=a.charCodeAt(j++),g=b<<16|d<<8|f,b=g>>18&63,d=g>>12&63,f=g>>6&63,g&=63,i[m++]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(b)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(d)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g);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.ke=function(a){var a=(a+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n"),b="",d,c,g=0,j;d=c=0;g=a.length;for(j=0;j<g;j++){var m=a.charCodeAt(j),i=v;128>m?c++:i=127<m&&2048>m?String.fromCharCode(m>>6|192,m&63|128):String.fromCharCode(m>>12|224,m>>6&63|128,m&63|128);i!==v&&(c>d&&(b+=a.substring(d,c)),b+=i,d=c=j+1)}c>d&&(b+=a.substring(d,a.length));return b};c.zb=function(){function a(){function a(b,d){var c,f=0;
for(c=0;c<d.length;c++)f|=j[c]<<8*c;return b^f}var b,c,j=[],m=0;for(b=0;b<y.length;b++)c=y.charCodeAt(b),j.unshift(c&255),4<=j.length&&(m=a(m,j),j=[]);0<j.length&&(m=a(m,j));return m.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 d=(ca.height*ca.width).toString(16);return b()+"-"+Math.random().toString(16).replace(".","")+"-"+a()+"-"+d+"-"+b()}}();c.hc=function(a){return/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp)/i.test(a)?
o:D};c.Lc=function(a){var b,d,f,g=[];c.e(b)&&(b="&");c.a(a,function(a,b){d=encodeURIComponent(a.toString());f=encodeURIComponent(b);g[g.length]=f+"="+d});return g.join(b)};c.cc=function(a,b){var b=b.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"),d=RegExp("[\\?&]"+b+"=([^&#]*)").exec(a);if(d===v||d&&"string"!==typeof d[1]&&d[1].length)return"";d=d[1];try{d=decodeURIComponent(d)}catch(c){q.error("Skipping decoding for malformed query param: "+d)}return d.replace(/\+/g," ")};c.ma=function(a,b){var d=a.match(RegExp(b+
"=([^&]*)"));return d?d[1]:v};c.cookie={get:function(a){for(var a=a+"=",b=s.cookie.split(";"),d=0;d<b.length;d++){for(var c=b[d];" "==c.charAt(0);)c=c.substring(1,c.length);if(0===c.indexOf(a))return decodeURIComponent(c.substring(a.length,c.length))}return v},parse:function(a){var b;try{b=c.xa(c.cookie.get(a))||{}}catch(d){}return b},ue:function(a,b,d,c,g){var f;var j="",m="",i="";c&&(f=(j=(j=s.location.hostname.match(ta))?j[0]:"")?"; domain=."+j:"",j=f);d&&(m=new Date,m.setTime(m.getTime()+1E3*
d),m="; expires="+m.toGMTString());g&&(i="; secure");s.cookie=a+"="+encodeURIComponent(b)+m+"; path=/"+j+i},set:function(a,b,d,c,g){var f;var j="",m="",i="";c&&(f=(j=(j=s.location.hostname.match(ta))?j[0]:"")?"; domain=."+j:"",j=f);d&&(m=new Date,m.setTime(m.getTime()+864E5*d),m="; expires="+m.toGMTString());g&&(i="; secure");a=a+"="+encodeURIComponent(b)+m+"; path=/"+j+i;return s.cookie=a},remove:function(a,b){c.cookie.set(a,"",-1,b)}};var la=v;c.localStorage={sb:function(){if(la!==v)return la;var a=
o;try{c.localStorage.set("__mplssupport__","xyz"),"xyz"!==c.localStorage.get("__mplssupport__")&&(a=D),c.localStorage.remove("__mplssupport__")}catch(b){a=D}a||q.error("localStorage unsupported; falling back to cookie store");return la=a},error:function(a){q.error("localStorage error: "+a)},get:function(a){try{return window.localStorage.getItem(a)}catch(b){c.localStorage.error(b)}return v},parse:function(a){try{return c.xa(c.localStorage.get(a))||{}}catch(b){}return v},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.J=function(){function a(a,f,g){return function(j){if(j=j||b(window.event)){var m=o,i;c.Ja(g)&&(i=g(j));j=f.call(a,j);if(D===i||D===j)m=D;return m}}}function b(a){if(a)a.preventDefault=b.preventDefault,a.stopPropagation=b.stopPropagation;return a}b.preventDefault=function(){this.returnValue=D};b.stopPropagation=function(){this.cancelBubble=o};return function(b,c,g,j,
m){b?b.addEventListener&&!j?b.addEventListener(c,g,!!m):(c="on"+c,b[c]=a(b,g,b[c])):q.error("No valid element provided to register_event")}}();var Ja=/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/;c.zd=function(){function a(a,b){return 0<=(" "+a.className+" ").replace(d," ").indexOf(" "+b+" ")}function b(b){if(!s.getElementsByTagName)return[];var b=b.split(" "),d,j,m,i,e,h,r,t=[s];for(i=0;i<b.length;i++)if(d=b[i].replace(/^\s+/,"").replace(/\s+$/,""),-1<d.indexOf("#")){j=d.split("#");d=j[0];t=s.getElementById(j[1]);
if(!t||d&&t.nodeName.toLowerCase()!=d)return[];t=[t]}else if(-1<d.indexOf(".")){j=d.split(".");d=j[0];var C=j[1];d||(d="*");j=[];for(e=m=0;e<t.length;e++){r="*"==d?t[e].all?t[e].all:t[e].getElementsByTagName("*"):t[e].getElementsByTagName(d);for(h=0;h<r.length;h++)j[m++]=r[h]}t=[];for(e=d=0;e<j.length;e++)j[e].className&&c.oa(j[e].className)&&a(j[e],C)&&(t[d++]=j[e])}else if(j=d.match(Ja)){d=j[1];var n=j[2],C=j[3],q=j[4];d||(d="*");j=[];for(e=m=0;e<t.length;e++){r="*"==d?t[e].all?t[e].all:t[e].getElementsByTagName("*"):
t[e].getElementsByTagName(d);for(h=0;h<r.length;h++)j[m++]=r[h]}t=[];d=0;switch(C){case "=":C=function(a){return a.getAttribute(n)==q};break;case "~":C=function(a){return a.getAttribute(n).match(RegExp("\\b"+q+"\\b"))};break;case "|":C=function(a){return a.getAttribute(n).match(RegExp("^"+q+"-?"))};break;case "^":C=function(a){return 0===a.getAttribute(n).indexOf(q)};break;case "$":C=function(a){return a.getAttribute(n).lastIndexOf(q)==a.getAttribute(n).length-q.length};break;case "*":C=function(a){return-1<
a.getAttribute(n).indexOf(q)};break;default:C=function(a){return a.getAttribute(n)}}t=[];for(e=d=0;e<j.length;e++)C(j[e])&&(t[d++]=j[e])}else{j=[];for(e=m=0;e<t.length;e++){r=t[e].getElementsByTagName(d);for(h=0;h<r.length;h++)j[m++]=r[h]}t=j}return t}var d=/[\t\r\n]/g;return function(a){return c.Id(a)?[a]:c.h(a)&&!c.e(a.length)?a:b.call(this,a)}}();c.info={ud:function(){var a="",b={};c.a("utm_source utm_medium utm_campaign utm_content utm_term".split(" "),function(d){a=c.cc(s.URL,d);a.length&&(b[d]=
a)});return b},Rd: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":v},Sd:function(a){var b=c.info.Rd(a),d={};if(b!==v)d.$search_engine=b,a=c.cc(a,"yahoo"!=b?"q":"p"),a.length&&(d.ph_keyword=a);return d},la:function(a,b,d){return d||c.g(a," OPR/")?c.g(a,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(a)?"BlackBerry":
c.g(a,"IEMobile")||c.g(a,"WPDesktop")?"Internet Explorer Mobile":c.g(a,"SamsungBrowser/")?"Samsung Internet":c.g(a,"Edge")||c.g(a,"Edg/")?"Microsoft Edge":c.g(a,"FBIOS")?"Facebook Mobile":c.g(a,"Chrome")?"Chrome":c.g(a,"CriOS")?"Chrome iOS":c.g(a,"UCWEB")||c.g(a,"UCBrowser")?"UC Browser":c.g(a,"FxiOS")?"Firefox iOS":c.g(b||"","Apple")?c.g(a,"Mobile")?"Mobile Safari":"Safari":c.g(a,"Android")?"Android Mobile":c.g(a,"Konqueror")?"Konqueror":c.g(a,"Firefox")?"Firefox":c.g(a,"MSIE")||c.g(a,"Trident/")?
"Internet Explorer":c.g(a,"Gecko")?"Mozilla":""},ib: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+)?)/,"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+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[c.info.la(a,b,d)];if(b===l)return v;a=a.match(b);return!a?v:parseFloat(a[a.length-2])},vb:function(){return/Windows/i.test(y)?/Phone/.test(y)||/WPDesktop/.test(y)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(y)?"iOS":/Android/.test(y)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(y)?"BlackBerry":/Mac/i.test(y)?"Mac OS X":/Linux/.test(y)?
"Linux":/CrOS/.test(y)?"Chrome OS":""},ac: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":""},rc:function(a){a=a.split("/");return 3<=a.length?a[2]:""},ra:function(){return c.extend(c.Ma({$os:c.info.vb(),$browser:c.info.la(y,I.vendor,S),$referrer:s.referrer,$referring_domain:c.info.rc(s.referrer),$device:c.info.ac(y)}),
{$current_url:A.location.href,$browser_version:c.info.ib(y,I.vendor,S),$screen_height:ca.height,$screen_width:ca.width,ph_lib:"web",$lib_version:"2.33.1",$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),time:c.timestamp()/1E3})},Md:function(){return c.extend(c.Ma({$os:c.info.vb(),$browser:c.info.la(y,I.vendor,S)}),{$browser_version:c.info.ib(y,I.vendor,S)})},Ld:function(a){return c.Ma({ph_page:a,ph_referrer:s.referrer,ph_browser:c.info.la(y,I.vendor,
S),ph_platform:c.info.vb()})}};c.toArray=c.sa;c.isObject=c.h;c.JSONEncode=c.ea;c.JSONDecode=c.xa;c.isBlockedUA=c.hc;c.isEmptyObject=c.T;c.info=c.info;c.info.device=c.info.ac;c.info.browser=c.info.la;c.info.browserVersion=c.info.ib;c.info.properties=c.info.ra;var ga="a,button,form,input,select,textarea,label".split(","),P={Jb:[],kd:function(a){if(a.previousElementSibling)return a.previousElementSibling;do a=a.previousSibling;while(a&&!(a&&1===a.nodeType));return a},fd:function(a,b){var d=document.createElement("script");
d.type="text/javascript";d.src=a;d.onload=b;var c=document.getElementsByTagName("script");0<c.length?c[0].parentNode.insertBefore(d,c[0]):document.body.appendChild(d)},$c:function(a){var b=a.tagName.toLowerCase(),d={tag_name:b};-1<ga.indexOf(b)&&(d.$el_text=fa(a));b=X(a);0<b.length&&(d.classes=b.split(" "));Y(a)&&c.a(a.attributes,function(a){if(Z(a.value))d["attr__"+a.name]=a.value});for(var f=b=1,g=a;g=this.kd(g);)b++,g.tagName===a.tagName&&f++;d.nth_child=b;d.nth_of_type=f;return d},Yc:function(a){return{$event_type:a,
$ce_version:1,$host:window.location.host,$pathname:window.location.pathname}},Uc:function(a){var b=[];c.a(document.querySelectorAll(a.css_selector),function(a){var c;-1<["input","select"].indexOf(a.tagName.toLowerCase())?c=a.value:a.textContent&&(c=a.textContent);Z(c)&&b.push(c)});return b.join(", ")},Xc:function(a){var b={};c.a(this.Db,function(d){c.a(d.event_selectors,function(f){f=document.querySelectorAll(f);c.a(f,function(f){c.g(a,f)&&Y(f)&&(b[d.name]=this.Uc(d))},this)},this)},this);return b},
Zc:function(a){return"undefined"===typeof a.target?a.srcElement:a.target},nd:function(a,b){var d=this.Zc(a);if(d&&3===d.nodeType)d=d.parentNode;if(wa(d,a)){for(var f=[d],g=d;g.parentNode&&!J(g,"body");)f.push(g.parentNode),g=g.parentNode;var j=[],e,i=D;c.a(f,function(a){var b=Y(a);"a"===a.tagName.toLowerCase()&&(e=a.getAttribute("href"),e=b&&Z(e)&&e);b=X(a).split(" ");c.g(b,"mp-no-track")&&(i=o);j.push(this.$c(a))},this);j[0].$el_text=fa(d);if(i)return D;fa(d);d=c.extend(this.Yc(a.type),{$elements:j},
this.Xc(f));b.p("$web_event",d);return o}},oe:function(a){window.location.href=a},Oc:function(a){var b=c.bind(function(b){b=b||window.event;this.nd(b,a)},this);c.J(document,"submit",b,D,o);c.J(document,"change",b,D,o);c.J(document,"click",b,D,o)},Db:{},aa:function(a){if(!document||!document.body){console.log("document not ready yet, trying again in 500 milliseconds...");var b=this;setTimeout(function(){b.aa(a)},500)}else{var d=a.c("token");if(-1<this.Jb.indexOf(d))console.log('autotrack already initialized for token "'+
d+'"');else if(this.Jb.push(d),!this.hd(a)){var f=c.bind(function(b){if(b&&b.config&&b.config.enable_collect_everything===o){if(b.custom_properties)this.Db=b.custom_properties;this.Oc(a)}else a.__autotrack_enabled=D},this);a.i(a.c("api_host")+"/decide/",{verbose:o,version:"1",lib:"web",token:d},{method:"GET"},a.ja(f))}}},Eb:function(a,b){var d;try{var f=c.ma(b,"state"),f=JSON.parse(decodeURIComponent(f)),g=c.ma(b,"expires_in");d={accessToken:c.ma(b,"access_token"),accessTokenExpiresAt:(new Date).getTime()+
1E3*Number(g),bookmarkletMode:!!f.bookmarkletMode,projectId:f.projectId,projectOwnerId:f.projectOwnerId,projectToken:f.token,readOnly:f.readOnly,userFlags:f.userFlags,userId:f.userId};window.sessionStorage.setItem("editorParams",JSON.stringify(d));f.desiredHash?window.location.hash=f.desiredHash:window.history?history.replaceState("",document.title,window.location.pathname+window.location.search):window.location.hash=""}catch(j){console.error("Unable to parse data from hash",j)}return d},hd:function(a){try{var b=
D;if(c.ma(window.location.search,"state"))var d=c.ma(window.location.search,"state"),d=JSON.parse(decodeURIComponent(d)),b="mpeditor"===d.action;var f=!!window.sessionStorage.getItem("_mpcehash"),g;b?g=this.Eb(a,window.location.hash):f?(g=this.Eb(a,window.sessionStorage.getItem("_mpcehash")),window.sessionStorage.removeItem("_mpcehash")):g=JSON.parse(window.sessionStorage.getItem("editorParams")||"{}");return g.projectToken&&a.c("token")===g.projectToken?(this.ed(a,g),o):D}catch(j){return D}},ed:function(a,
b){return!window._mpEditorLoaded?(window._mpEditorLoaded=o,this.fd(a.c("app_host")+"/static/editor.js?_ts="+(new Date).getTime(),function(){window.ph_load_editor(b)}),o):D},Bd:function(a,b,d){for(var b=!c.e(b)?b:10,d=!c.e(d)?d:10,f=0,g=0;g<a.length;g++)f+=a.charCodeAt(g);return f%b<d},Hd:function(){return c.Ja(document.querySelectorAll)}};c.Sb(P);c.Qd(P);E.prototype.Ga=L();E.prototype.mb=L();E.prototype.fb=L();E.prototype.aa=function(a){this.lc=a;return this};E.prototype.p=function(a,b,d,f){var g=
this,j=c.zd(a);if(0===j.length)q.error("The DOM query ("+a+") returned 0 elements");else return c.a(j,function(a){c.J(a,this.oc,function(a){var c={},j=g.Ga(d,this),e=g.lc.c("track_links_timeout");g.mb(a,this,c);window.setTimeout(g.Ac(f,j,c,o),e);g.lc.p(b,j,g.Ac(f,j,c))})},this),o};E.prototype.Ac=function(a,b,d,c){var c=c||D,g=this;return function(){if(!d.td)d.td=o,a&&a(c,b)===D||g.fb(b,d,c)}};E.prototype.Ga=function(a,b){return"function"===typeof a?a(b):c.extend({},a)};c.gc(M,E);M.prototype.Ga=function(a,
b){var d=M.$d.Ga.apply(this,arguments);if(b.href)d.url=b.href;return d};M.prototype.mb=function(a,b,d){d.mc=2===a.which||a.metaKey||a.ctrlKey||"_blank"===b.target;d.href=b.href;d.mc||a.preventDefault()};M.prototype.fb=function(a,b){b.mc||setTimeout(function(){window.location=b.href},0)};c.gc(W,E);W.prototype.mb=function(a,b,d){d.element=b;a.preventDefault()};W.prototype.fb=function(a,b){setTimeout(function(){b.element.submit()},0)};var Ca="__ph_opt_in_out_",B={uc:function(a,b){var d={},f={};c.h(a)?
c.a(a,function(a,b){this.N(b)||(f[b]=a)},this):f[a]=b;d.$set=f;return d},Ec:function(a){var b={},d=[];c.isArray(a)||(a=[a]);c.a(a,function(a){this.N(a)||d.push(a)},this);b.$unset=d;return b},xc:function(a,b){var d={},f={};c.h(a)?c.a(a,function(a,b){this.N(b)||(f[b]=a)},this):f[a]=b;d.$set_once=f;return d},Dc:function(a,b){var d={},f={};c.h(a)?c.a(a,function(a,b){this.N(b)||(f[b]=c.isArray(a)?a:[a])},this):f[a]=c.isArray(b)?b:[b];d.$union=f;return d},rd:function(a,b){var d={},f={};c.h(a)?c.a(a,function(a,
b){this.N(b)||(f[b]=a)},this):f[a]=b;d.$append=f;return d},sc:function(a,b){var d={},f={};c.h(a)?c.a(a,function(a,b){this.N(b)||(f[b]=a)},this):f[a]=b;d.$remove=f;return d},re:function(){return{$delete:""}}};c.extend(u.prototype,B);u.prototype.ia=function(a,b,d){this.d=a;this.$a=b;this.Za=d};u.prototype.set=N(function(a,b,d){var f=this.uc(a,b);c.h(a)&&(d=b);return this.i(f,d)});u.prototype.La=N(function(a,b,d){var f=this.xc(a,b);c.h(a)&&(d=b);return this.i(f,d)});u.prototype.Pa=N(function(a,b){return this.i(this.Ec(a),
b)});u.prototype.ta=N(function(a,b,d){c.h(a)&&(d=b);return this.i(this.Dc(a,b),d)});u.prototype["delete"]=N(function(a){return this.i({$delete:""},a)});u.prototype.remove=N(function(a,b,d){return this.i(this.sc(a,b),d)});u.prototype.i=function(a,b){a.$group_key=this.$a;a.$group_id=this.Za;a.$token=this.M("token");var d=c.lb(a),f=c.truncate(d,255),d=c.ea(d),d=c.gb(d);q.log(a);this.d.i(this.d.c("api_host")+"/groups/",{data:d},this.d.ja(b,f));return f};u.prototype.N=function(a){return"$group_key"===
a||"$group_id"===a};u.prototype.M=function(a){return this.d.c(a)};u.prototype.toString=function(){return this.d.toString()+".group."+this.$a+"."+this.Za};u.prototype.remove=u.prototype.remove;u.prototype.set=u.prototype.set;u.prototype.set_once=u.prototype.La;u.prototype.union=u.prototype.ta;u.prototype.unset=u.prototype.Pa;u.prototype.toString=u.prototype.toString;var Ka="__mps,__mpso,__mpus,__mpa,__mpap,__mpr,__mpu,$people_distinct_id,__alias,__cmpns,__timers".split(",");p.prototype.ra=function(){var a=
{};c.a(this.props,function(b,d){c.ec(Ka,d)||(a[d]=b)});return a};p.prototype.load=function(){if(!this.disabled){var a=this.w.parse(this.name);a&&(this.props=c.extend({},a))}};p.prototype.je=function(a){var b=a.upgrade,d;if(b)d="ph_super_properties","string"===typeof b&&(d=b),b=this.w.parse(d),this.w.remove(d),this.w.remove(d,o),b&&(this.props=c.extend(this.props,b.all,b.events));if(!a.cookie_name&&"posthog"!==a.name&&(d="ph_"+a.token+"_"+a.name,b=this.w.parse(d)))this.w.remove(d),this.w.remove(d,
o),this.G(b);this.w===c.localStorage&&(b=c.cookie.parse(this.name),c.cookie.remove(this.name),c.cookie.remove(this.name,o),b&&this.G(b))};p.prototype.save=function(){this.disabled||(this.Tc(),this.w.set(this.name,c.ea(this.props),this.nb,this.jb,this.tc))};p.prototype.remove=function(){this.w.remove(this.name,D);this.w.remove(this.name,o)};p.prototype.clear=function(){this.remove();this.props={}};p.prototype.G=function(a,b,d){return c.h(a)?("undefined"===typeof b&&(b="None"),this.nb="undefined"===
typeof d?this.Zb:d,c.a(a,function(a,d){if(!this.props.hasOwnProperty(d)||this.props[d]===b)this.props[d]=a},this),this.save(),o):D};p.prototype.v=function(a,b){return c.h(a)?(this.nb="undefined"===typeof b?this.Zb:b,c.extend(this.props,a),this.save(),o):D};p.prototype.ua=function(a){a in this.props&&(delete this.props[a],this.save())};p.prototype.Tc=c.m(function(){var a=this.props.__cmpns,b=G?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}});p.prototype.he=
function(){if(!this.Tb)this.G(c.info.ud()),this.Tb=o};p.prototype.Gc=function(a){this.v(c.info.Sd(a))};p.prototype.yb=function(a){this.G({$initial_referrer:a||"$direct",$initial_referring_domain:c.info.rc(a)||"$direct"},"")};p.prototype.Fd=function(){return c.Ma({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};p.prototype.Fc=function(a){this.Zb=this.nb=a.cookie_expiration;this.wc(a.disable_persistence);this.Ud(a.cross_subdomain_cookie);
this.Xd(a.secure_cookie)};p.prototype.wc=function(a){(this.disabled=a)?this.remove():this.save()};p.prototype.Ud=function(a){if(a!==this.jb)this.jb=a,this.remove(),this.save()};p.prototype.Dd=function(){return this.jb};p.prototype.Xd=function(a){if(a!==this.tc)this.tc=a?o:D,this.remove(),this.save()};p.prototype.C=function(a,b){var d=this.Ya(a),f=b[a],g=this.Q("$set"),j=this.Q("$set_once"),e=this.Q("$unset"),i=this.Q("$add"),h=this.Q("$union"),n=this.Q("$remove",[]),r=this.Q("$append",[]);"__mps"===
d?(c.extend(g,f),this.H("$add",f),this.H("$union",f),this.H("$unset",f)):"__mpso"===d?(c.a(f,function(a,b){b in j||(j[b]=a)}),this.H("$unset",f)):"__mpus"===d?c.a(f,function(a){c.a([g,j,i,h],function(b){a in b&&delete b[a]});c.a(r,function(b){a in b&&delete b[a]});e[a]=o}):"__mpa"===d?(c.a(f,function(a,b){b in g?g[b]+=a:(b in i||(i[b]=0),i[b]+=a)},this),this.H("$unset",f)):"__mpu"===d?(c.a(f,function(a,b){c.isArray(a)&&(b in h||(h[b]=[]),h[b]=h[b].concat(a))}),this.H("$unset",f)):"__mpr"===d?(n.push(f),
this.H("$append",f)):"__mpap"===d&&(r.push(f),this.H("$unset",f));q.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):");q.log(b);this.save()};p.prototype.H=function(a,b){var d=this.Ba(a);c.e(d)||(c.a(b,function(b,g){"$append"===a||"$remove"===a?c.a(d,function(a){a[g]===b&&delete a[g]}):delete d[g]},this),this.save())};p.prototype.Ya=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";q.error("Invalid queue:",a)};p.prototype.Ba=function(a){return this.props[this.Ya(a)]};p.prototype.Q=function(a,b){var d=this.Ya(a),b=c.e(b)?{}:b;return this.props[d]||(this.props[d]=b)};p.prototype.Vd=function(a){var b=this.props.__timers||{};b[a]=(new Date).getTime();this.props.__timers=b;this.save()};p.prototype.Nd=function(a){var b=(this.props.__timers||{})[a];c.e(b)||(delete this.props.__timers[a],this.save());return b};h.U=200;h.A=
"posthog-notification";h.wa=0.6;h.L=25;h.ya=200;h.fa=388;h.Ra=420;h.B=85;h.Sa=5;h.P=60;h.Ta=Math.round(h.P/2);h.Nc=595;h.Mc=334;h.prototype.show=function(){var a=this;this.Ob();this.q?(this.cd(),this.bd(),this.jd(this.Pc)):setTimeout(function(){a.show()},300)};h.prototype.kb=c.m(function(){this.jc||this.Lb({invisible:o});var a=this.Yd?this.k("video"):this.Y();if(this.Hc)this.ld("bg","visible"),this.V(a,"exiting"),setTimeout(this.Nb,h.U);else{var b,d,c;this.u?(b="right",d=20,c=-100):(b="top",d=h.L,
c=h.ya+h.L);this.za([{s:this.k("bg"),o:"opacity",start:h.wa,l:0},{s:a,o:"opacity",start:1,l:0},{s:a,o:b,start:d,l:c}],h.U,this.Nb)}});h.prototype.V=c.m(function(a,b){b=h.A+"-"+b;"string"===typeof a&&(a=this.k(a));a.className?~(" "+a.className+" ").indexOf(" "+b+" ")||(a.className+=" "+b):a.className=b});h.prototype.ld=c.m(function(a,b){b=h.A+"-"+b;"string"===typeof a&&(a=this.k(a));if(a.className)a.className=(" "+a.className+" ").replace(" "+b+" ","").replace(/^[\s\xA0]+/,"").replace(/[\s\xA0]+$/,
"")});h.prototype.za=c.m(function(a,b,d,c){var g=this,j=D,e,i;e=1*new Date;var h,c=c||e;h=e-c;for(e=0;e<a.length;e++){i=a[e];if("undefined"===typeof i.K)i.K=i.start;if(i.K!==i.l){var j=o,n=i.l>=i.start?1:-1;i.K=i.start+(i.l-i.start)*h/b;if("opacity"!==i.o)i.K=Math.round(i.K);if(0<n&&i.K>=i.l||0>n&&i.K<=i.l)i.K=i.l}}if(j){for(e=0;e<a.length;e++)i=a[e],i.s&&(i.s.style[i.o]=""+i.K+("opacity"===i.o?"":"px"));setTimeout(function(){g.za(a,b,d,c)},10)}else d&&d()});h.prototype.Pc=c.m(function(){var a=this;
if(!this.Zd&&!this.Hb()[this.I])this.Zd=o,this.q.appendChild(this.qa),setTimeout(function(){var b=a.Y();if(a.Hc)a.u||a.V("bg","visible"),a.V(b,"visible"),a.Kb();else{var d,c,g;a.u?(d="right",c=-100,g=20):(d="top",c=h.ya+h.L,g=h.L);a.za([{s:a.k("bg"),o:"opacity",start:0,l:h.wa},{s:b,o:"opacity",start:0,l:1},{s:b,o:d,start:c,l:g}],h.U,a.Kb)}},100),c.J(a.k("cancel"),"click",function(b){b.preventDefault();a.kb()}),c.J(a.k("button")||a.k("mini-content"),"click",function(b){b.preventDefault();a.ca?(a.eb("$campaign_open",
{$resource_type:"video"}),a.md()):(a.kb(),a.Fa&&(b=v,a.ba.c("inapp_link_new_window")?window.open(a.$):b=function(){window.location.href=a.$},a.eb("$campaign_open",{$resource_type:"link"},b)))})});h.prototype.k=function(a){return document.getElementById(h.A+"-"+a)};h.prototype.Y=function(){return this.k(this.pa)};h.prototype.Hb=function(){return this.wb.props.__cmpns||(this.wb.props.__cmpns={})};h.prototype.gd=c.m(function(a){for(var b=a.event||"",d=0;d<this.bc.length;d++){var f=this.bc[d];if("$any_event"===
(f.event||"")||b===f.event)if(f.selector&&!c.T(f.selector)){if(w(f.selector,a.properties))return o}else return o}return D});h.prototype.W=function(a,b){return this.D[a]&&this.D[a]<=b};h.prototype.ad=function(){var a=[];this.u?(this.z=this.z||this.Ea+"/site_media/images/icons/notifications/mini-news-dark.png",a.push(this.z)):(this.rb?(a.push(this.rb),this.dc='<img id="img" src="'+this.rb+'"/>'):this.dc="",this.z?(a.push(this.z),this.zc='<div id="thumbborder-wrapper"><div id="thumbborder"></div></div><img id="thumbnail" src="'+
this.z+'" width="'+h.P+'" height="'+h.P+'"/><div id="thumbspacer"></div>'):this.zc="");return a};h.prototype.bd=function(){var a="",b="",d="";this.qa=document.createElement("div");this.qa.id=h.A+"-wrapper";if(this.u)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.Fa||this.ca?"":'<div id="button-close"></div>',c=this.ca?'<div id="button-play"></div>':"";this.W("ie",7)&&(c=a="");a='<div id="takeover">'+this.zc+'<div id="mainbox"><div id="cancel"><div id="cancel-icon"></div></div><div id="content">'+this.dc+'<div id="title">'+this.title+'</div><div id="body">'+this.body+'</div><div id="tagline"><a href="http://posthog.com?from=inapp" target="_blank">POWERED BY MIXPANEL</a></div></div><div id="button">'+a+'<a id="button-link" href="'+this.$+'">'+
this.vd+"</a>"+c+"</div></div></div>"}this.Jc?(b=this.Ka+"www.youtube.com/embed/"+this.Jc+"?wmode=transparent&showinfo=0&modestbranding=0&rel=0&autoplay=1&loop=0&vq=hd1080",this.Kc&&(b+="&enablejsapi=1&html5=1&controls=0",d='<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.Ic&&(b=
this.Ka+"player.vimeo.com/video/"+this.Ic+"?autoplay=1&title=0&byline=0&portrait=0");if(this.ca)this.me='<iframe id="'+h.A+'-video-frame" width="'+this.va+'" height="'+this.da+'" src="'+b+'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen="1" scrolling="no"></iframe>',d='<div id="video-'+(this.ob?"":"no")+'flip"><div id="video"><div id="video-holder"></div>'+d+"</div></div>";b=d+a;this.ob&&(b=(this.u?a:"")+'<div id="flipcontainer"><div id="flipper">'+(this.u?d:b)+"</div></div>");
this.qa.innerHTML=('<div id="overlay" class="'+this.pa+'"><div id="campaignid-'+this.I+'"><div id="bgwrapper"><div id="bg"></div>'+b+"</div></div></div>").replace(/class="/g,'class="'+h.A+"-").replace(/id="/g,'id="'+h.A+"-")};h.prototype.cd=function(){this.j="dark"===this.style?{hb:"#1d1f25",ka:"#282b32",Da:"#3a4147",Rb:"#4a5157",sd:"#32353c",Ub:"0.4",tb:"#2a3137",Oa:"#fff",xb:"#9498a3",yc:"#464851",Na:"#ddd"}:{hb:"#fff",ka:"#e7eaee",Da:"#eceff3",Rb:"#f5f5f5",sd:"#e4ecf2",Ub:"1.0",tb:"#fafafa",Oa:"#5c6578",
xb:"#8b949b",yc:"#ced9e6",Na:"#7c8598"};var a="0px 0px 35px 0px rgba(45, 49, 56, 0.7)",b=a,d=a,f=h.P+2*h.Sa,g=h.U/1E3+"s";this.u&&(a="none");var e={};e["@media only screen and (max-width: "+(h.Ra+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.yd+"px","min-height":4*this.xd+"px","background-color":"black",opacity:"0.0","-ms-filter":"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)",filter:"alpha(opacity=60)",transition:"opacity "+g},
"#bg.visible":{opacity:h.wa},".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:h.fa+"px","margin-left":Math.round(-h.fa/2)+"px","backface-visibility":"hidden",transform:"rotateY(0deg)",opacity:"0.0",top:h.ya+"px",transition:"opacity "+g+", top "+g},"#takeover.visible":{opacity:"1.0",top:h.L+"px"},
"#takeover.exiting":{opacity:"0.0",top:h.ya+"px"},"#thumbspacer":{height:h.Ta+"px"},"#thumbborder-wrapper":{position:"absolute",top:-h.Sa+"px",left:h.fa/2-h.Ta-h.Sa+"px",width:f+"px",height:f/2+"px",overflow:"hidden"},"#thumbborder":{position:"absolute",width:f+"px",height:f+"px","border-radius":f+"px","background-color":this.j.ka,opacity:"0.5"},"#thumbnail":{position:"absolute",top:"0px",left:h.fa/2-h.Ta+"px",width:h.P+"px",height:h.P+"px",overflow:"hidden","z-index":"100","border-radius":h.P+"px"},
"#mini":{position:"absolute",right:"20px",top:h.L+"px",width:this.Kd+"px",height:2*h.B+"px","margin-top":20-h.B+"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.j.hb,"font-size":"14px",color:this.j.xb},"#mini #mainbox":{height:h.B+
"px","margin-top":h.B+"px","border-radius":"3px",transition:"background-color "+g},"#mini-border":{height:h.B+6+"px",width:h.Ra+6+"px",position:"absolute",top:"-3px",left:"-3px","margin-top":h.B+"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:h.B+"px","border-radius":"3px 0 0 3px","background-color":this.j.ka,background:"linear-gradient(135deg, "+this.j.Rb+" 0%, "+this.j.ka+
" 100%)",transition:"background-color "+g},"#mini:hover #mini-icon":{"background-color":this.j.tb},"#mini:hover #mainbox":{"background-color":this.j.tb},"#mini-icon-img":{position:"absolute","background-image":"url("+this.z+")",width:"48px",height:"48px",top:"20px",left:"12px"},"#content":{padding:"30px 20px 0px 20px"},"#mini-content":{"text-align":"left",height:h.B+"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.Oa},"#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:h.B+"px","font-size":"16px","letter-spacing":"0.8px",color:this.j.Oa},"#mini #body-text":{display:"table",height:h.B+"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.yc,transition:"color "+g},"#tagline a:hover":{color:this.j.Na},"#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 "+g},"#mini #cancel":{margin:"7px 7px 0 0"},"#cancel-icon":{width:"8px",
height:"8px",overflow:"hidden","background-image":"url("+this.Ea+"/site_media/images/icons/notifications/cancel-x.png)",opacity:this.j.Ub},"#cancel:hover":{"background-color":this.j.Da},"#button":{display:"block",height:"60px","line-height":"60px","text-align":"center","background-color":this.j.ka,"border-radius":"0 0 4px 4px",overflow:"hidden",cursor:"pointer",transition:"background-color "+g},"#button-close":{display:"inline-block",width:"9px",height:"60px","margin-right":"8px","vertical-align":"top",
"background-image":"url("+this.Ea+"/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("+this.Ea+"/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.Oa,transition:"color "+g},"#button:hover":{"background-color":this.j.Da,color:this.j.Na},"#button:hover a":{color:this.j.Na},"#video-noflip":{position:"relative",top:2*-this.da+"px"},"#video-flip":{"backface-visibility":"hidden",transform:"rotateY(180deg)"},"#video":{position:"absolute",width:this.va-1+"px",height:this.da+"px",top:h.L+"px","margin-top":"100px",left:"50%","margin-left":Math.round(-this.va/
2)+"px",overflow:"hidden","border-radius":"5px","box-shadow":b,transform:"translateZ(1px)",transition:"opacity "+g+", top "+g},"#video.exiting":{opacity:"0.0",top:this.da+"px"},"#video-holder":{position:"absolute",width:this.va-1+"px",height:this.da+"px",overflow:"hidden","border-radius":"5px"},"#video-frame":{"margin-left":"-1px",width:this.va+"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.hb,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.j.xb,"background-color":"#666","border-radius":"0 0 5px 0"}};this.W("ie",8)&&c.extend(a,{"* html #overlay":{position:"absolute"},"* html #bg":{position:"absolute"},"html, body":{height:"100%"}});
this.W("ie",7)&&c.extend(a,{"#mini #body":{display:"inline",zoom:"1",border:"1px solid "+this.j.Da},"#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"],m;for(m in a)for(f=0;f<b.length;f++)if(g=b[f],g in a[m])for(var i=a[m][g],n=0;n<d.length;n++)a[m]["-"+d[n]+"-"+g]=i;(function(a,b){function d(a){var b="",c;for(c in a){var f=
c.replace(/#/g,"#"+h.A+"-").replace(/\./g,"."+h.A+"-"),b=b+("\n"+f+" {"),f=a[c],g;for(g in f)b+=g+":"+f[g]+";";b+="}"}return b}var c=d(a)+function(a){var b="",c;for(c in a)b+="\n"+c+" {"+d(a[c])+"\n}";return b}(b),f=document.head||document.getElementsByTagName("head")[0]||document.documentElement,g=document.createElement("style");f.appendChild(g);g.setAttribute("type","text/css");g.styleSheet?g.styleSheet.cssText=c:g.textContent=c})(a,e)};h.prototype.dd=c.m(function(){if(this.Qa){var a=this;a.Kc=
"postMessage"in window;a.$=a.Qa;var b=a.Qa.match(/(?:youtube(?:-nocookie)?\.com\/(?:[^/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?/ ]{11})/i),d=a.Qa.match(/vimeo\.com\/.*?(\d+)/i);if(b){if(a.ca=o,a.Jc=b[1],a.Kc)window.onYouTubeIframeAPIReady=function(){a.k("video-frame")&&a.Qb()},b=document.createElement("script"),b.src=a.Ka+"www.youtube.com/iframe_api",d=document.getElementsByTagName("script")[0],d.parentNode.insertBefore(b,d)}else if(d)a.ca=o,a.Ic=d[1];if(a.W("ie",7)||a.W("firefox",
3))a.ca=D,a.Fa=o}});h.prototype.Kb=c.m(function(){function a(a,b){var d={};if(document.defaultView&&document.defaultView.getComputedStyle)d=document.defaultView.getComputedStyle(a,v);else if(a.currentStyle)d=a.currentStyle;return d[b]}var b=this;c.J(b.k("bg"),"click",function(){b.kb()});if(this.I){var d=this.k("overlay");d&&"hidden"!==a(d,"visibility")&&"none"!==a(d,"display")&&this.Lb()}});h.prototype.Lb=c.m(function(a){if(!this.jc)this.jc=o,this.I&&(this.Hb()[this.I]=1*new Date,this.wb.save()),
this.eb("$campaign_delivery",a),this.ba.people.append({$campaigns:this.I,$notifications:{campaign_id:this.I,message_id:this.kc,type:"web",time:new Date}})});h.prototype.jd=function(a){var b=this;if(0===this.Ia.length)a();else{for(var d=0,c=[],g=function(){d++;d===b.Ia.length&&a&&(a(),a=v)},e=0;e<this.Ia.length;e++){var h=new Image;h.onload=g;h.src=this.Ia[e];h.complete&&g();c.push(h)}this.W("ie",7)&&setTimeout(function(){var b=o;for(e=0;e<c.length;e++)c[e].complete||(b=D);b&&a&&(a(),a=v)},500)}};
h.prototype.Nb=c.m(function(){window.clearInterval(this.od);this.qa.style.visibility="hidden";this.q.removeChild(this.qa)});h.prototype.Ob=function(){function a(a){if(a in c)return o;if(!d)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 c)return o;return D}function b(a){return(a=navigator.userAgent.match(a))&&a[1]}this.D={};this.D.chrome=b(/Chrome\/(\d+)/);this.D.firefox=b(/Firefox\/(\d+)/);this.D.ie=b(/MSIE (\d+).+/);!this.D.ie&&!window.ActiveXObject&&
"ActiveXObject"in window&&(this.D.ie=11);if(this.q=document.body||document.getElementsByTagName("body")[0])this.yd=Math.max(this.q.scrollWidth,document.documentElement.scrollWidth,this.q.offsetWidth,document.documentElement.offsetWidth,this.q.clientWidth,document.documentElement.clientWidth),this.xd=Math.max(this.q.scrollHeight,document.documentElement.scrollHeight,this.q.offsetHeight,document.documentElement.offsetHeight,this.q.clientHeight,document.documentElement.clientHeight);var d=this.D.ie,
c=document.createElement("div").style;this.Hc=this.q&&a("transition")&&a("transform");this.ob=(33<=this.D.chrome||15<=this.D.firefox)&&this.q&&a("backfaceVisibility")&&a("perspective")&&a("transform")};h.prototype.md=c.m(function(){function a(){window.YT&&window.YT.loaded&&b.Qb();b.Yd=o;b.Y().style.visibility="hidden"}var b=this,d=[{s:b.Y(),o:"opacity",start:1,l:0},{s:b.Y(),o:"top",start:h.L,l:-500},{s:b.k("video-noflip"),o:"opacity",start:0,l:1},{s:b.k("video-noflip"),o:"top",start:2*-b.da,l:0}];
if(b.u){var c=b.k("bg"),g=b.k("overlay");c.style.width="100%";c.style.height="100%";g.style.width="100%";b.V(b.Y(),"exiting");b.V(c,"visible");d.push({s:b.k("bg"),o:"opacity",start:0,l:h.wa})}b.k("video-holder").innerHTML=b.me;b.ob?(b.V("flipper","flipped"),setTimeout(a,h.U)):b.za(d,h.U,a)});h.prototype.eb=function(a,b,d){this.I?(b=b||{},b=c.extend(b,{campaign_id:this.I,message_id:this.kc,message_type:"web_inapp",message_subtype:this.pa}),this.ba.track(a,b,d)):d&&d.call()};h.prototype.Qb=c.m(function(){var a=
this;if(!a.ne){a.ne=o;var b=a.k("video-elapsed"),d=a.k("video-time"),f=a.k("video-progress");new window.YT.Player(h.A+"-video-frame",{events:{onReady:function(g){function e(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=g.target,i=h.getDuration();e(0);a.od=window.setInterval(function(){var a=h.getCurrentTime();b.style.width=100*(a/i)+"%";e(a)},250);c.J(f,"click",function(a){a=Math.max(0,a.pageX-
f.getBoundingClientRect().left);h.seekTo(i*a/f.clientWidth,o)})}}})}});c.extend(n.prototype,B);n.prototype.ia=function(a){this.d=a};n.prototype.set=H(function(a,b,d){var f=this.uc(a,b);c.h(a)&&(d=b);this.M("save_referrer")&&this.d.persistence.yb(document.referrer);f.$set=c.extend({},c.info.Md(),this.d.persistence.Fd(),f.$set);return this.i(f,d)});n.prototype.La=H(function(a,b,d){var f=this.xc(a,b);c.h(a)&&(d=b);return this.i(f,d)});n.prototype.Pa=H(function(a,b){return this.i(this.Ec(a),b)});n.prototype.fc=
H(function(a,b,d){var f={},g={};c.h(a)?(c.a(a,function(a,b){this.N(b)||(isNaN(parseFloat(a))?q.error("Invalid increment value passed to posthog.people.increment - must be a number"):g[b]=a)},this),d=b):(c.e(b)&&(b=1),g[a]=b);f.$add=g;return this.i(f,d)});n.prototype.append=H(function(a,b,d){c.h(a)&&(d=b);return this.i(this.rd(a,b),d)});n.prototype.remove=H(function(a,b,d){c.h(a)&&(d=b);return this.i(this.sc(a,b),d)});n.prototype.ta=H(function(a,b,d){c.h(a)&&(d=b);return this.i(this.Dc(a,b),d)});
n.prototype.de=H(function(a,b,d){if(!c.ic(a)&&(a=parseFloat(a),isNaN(a))){q.error("Invalid value passed to posthog.people.track_charge - must be a number");return}return this.append("$transactions",c.extend({$amount:a},b),d)});n.prototype.Vb=function(a){return this.set("$transactions",[],a)};n.prototype.$b=function(){if(this.ab())return this.i({$delete:this.d.S()});q.error("posthog.people.delete_user() requires you to call identify() first")};n.prototype.toString=function(){return this.d.toString()+
".people"};n.prototype.i=function(a,b){a.$token=this.M("token");a.$distinct_id=this.d.S();var d=this.d.F("$device_id"),f=this.d.F("$user_id"),g=this.d.F("$had_persisted_distinct_id");d&&(a.$device_id=d);f&&(a.$user_id=f);g&&(a.$had_persisted_distinct_id=g);f=c.lb(a);d=c.truncate(f,255);f=c.ea(f);f=c.gb(f);if(!this.ab())return this.Sc(a),c.e(b)||(this.M("verbose")?b({status:-1,error:v}):b(-1)),d;q.log("MIXPANEL PEOPLE REQUEST:");q.log(d);this.d.i(this.M("api_host")+"/engage/",{data:f},this.d.ja(b,
d));return d};n.prototype.M=function(a){return this.d.c(a)};n.prototype.ab=function(){return this.d.X.qb===o};n.prototype.Sc=function(a){"$set"in a?this.d.persistence.C("$set",a):"$set_once"in a?this.d.persistence.C("$set_once",a):"$unset"in a?this.d.persistence.C("$unset",a):"$add"in a?this.d.persistence.C("$add",a):"$append"in a?this.d.persistence.C("$append",a):"$remove"in a?this.d.persistence.C("$remove",a):"$union"in a?this.d.persistence.C("$union",a):q.error("Invalid call to _enqueue():",a)};
n.prototype.ga=function(a,b,d,f){var g=this,e=c.extend({},this.d.persistence.Ba(a)),h=e;!c.e(e)&&c.h(e)&&!c.T(e)&&(g.d.persistence.H(a,e),f&&(h=f(e)),b.call(g,h,function(b,f){0===b&&g.d.persistence.C(a,e);c.e(d)||d(b,f)}))};n.prototype.Vc=function(a,b,d,f,g,e,h){var i=this,n=this.d.persistence.Ba("$append"),q=this.d.persistence.Ba("$remove");this.ga("$set",this.set,a);this.ga("$set_once",this.La,f);this.ga("$unset",this.Pa,e,function(a){return c.keys(a)});this.ga("$add",this.fc,b);this.ga("$union",
this.ta,g);if(!c.e(n)&&c.isArray(n)&&n.length){for(var r,a=function(a,b){0===a&&i.d.persistence.C("$append",r);c.e(d)||d(a,b)},b=n.length-1;0<=b;b--)r=n.pop(),c.T(r)||i.append(r,a);i.d.persistence.save()}if(!c.e(q)&&c.isArray(q)&&q.length){for(var p,n=function(a,b){0===a&&i.d.persistence.C("$remove",p);c.e(h)||h(a,b)},a=q.length-1;0<=a;a--)p=q.pop(),c.T(p)||i.remove(p,n);i.d.persistence.save()}};n.prototype.N=function(a){return"$distinct_id"===a||"$token"===a||"$device_id"===a||"$user_id"===a||"$had_persisted_distinct_id"===
a};n.prototype.set=n.prototype.set;n.prototype.set_once=n.prototype.La;n.prototype.unset=n.prototype.Pa;n.prototype.increment=n.prototype.fc;n.prototype.append=n.prototype.append;n.prototype.remove=n.prototype.remove;n.prototype.union=n.prototype.ta;n.prototype.track_charge=n.prototype.de;n.prototype.clear_charges=n.prototype.Vb;n.prototype.delete_user=n.prototype.$b;n.prototype.toString=n.prototype.toString;var ea,x,T=A.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,na=!T&&-1===y.indexOf("MSIE")&&
-1===y.indexOf("Mozilla"),U=I.sendBeacon;U&&(U=c.bind(U,I));var La={api_host:"https://t.posthog.com",api_method:"POST",api_transport:"XHR",app_host:"https://app.posthog.com",autotrack:o,cdn:"https://cdn.posthog.com",cross_subdomain_cookie:o,persistence:"cookie",persistence_name:"",cookie_name:"",loaded:L(),store_google:o,save_referrer:o,test:D,verbose:D,img:D,track_pageview:o,debug:D,track_links_timeout:300,cookie_expiration:365,upgrade:D,disable_persistence:D,disable_cookie:D,secure_cookie:D,ip:o,
opt_out_tracking_by_default:D,opt_out_persistence_by_default:D,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:v,property_blacklist:[],xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:D},ma=D;e.prototype.aa=function(a,b,d){if(c.e(d))q.error("You must name your new library: init(token, config, name)");else if("posthog"===d)q.error("You must initialize the main posthog object right after you include the Posthog js snippet");else return a=V(a,b,d),x[d]=a,a.Ca(),
a};e.prototype.ia=function(a,b,d){this.__loaded=o;this.config={};this._triggered_notifs=[];this.vc(c.extend({},La,b,{name:d,token:a,callback_fn:("posthog"===d?d:"posthog."+d)+"._jsc"}));this._jsc=L();this.Va=[];this.Wa=[];this.Ua=[];this.X={disable_all_events:D,identify_called:D};this.persistence=this.cookie=new p(this.config);this.Wc();a=c.zb();this.S()||this.G({distinct_id:a,$device_id:a},"")};e.prototype.Ca=function(){this.c("loaded")(this);this.c("track_pageview")&&this.Bc()};e.prototype.Rc=function(){c.a(this.Va,
function(a){this.cb.apply(this,a)},this);this.na()||c.a(this.Wa,function(a){this.i.apply(this,a)},this);delete this.Va;delete this.Wa};e.prototype.cb=function(a,b){if(this.c("img"))return q.error("You can't use DOM tracking functions with img = true."),D;if(!ma)return this.Va.push([a,b]),D;var d=(new a).aa(this);return d.p.apply(d,b)};e.prototype.ja=function(a,b){if(c.e(a))return v;if(T)return function(d){a(d,b)};var d=this._jsc,f=""+Math.floor(1E8*Math.random()),g=this.c("callback_fn")+"["+f+"]";
d[f]=function(c){delete d[f];a(c,b)};return g};e.prototype.i=function(a,b,d,f){if(na)this.Wa.push(arguments);else{var g={method:this.c("api_method"),Cc:this.c("api_transport")},e=v;if(!f&&(c.Ja(d)||"string"===typeof d))f=d,d=v;d=c.extend(g,d||{});if(!T)d.method="GET";var h=(g=U&&"sendbeacon"===d.Cc.toLowerCase())||"POST"===d.method,i=this.c("verbose");b.verbose&&(i=o);this.c("test")&&(b.test=1);i&&(b.verbose=1);this.c("img")&&(b.img=1);if(!T)if(f)b.callback=f;else if(i||this.c("test"))b.callback=
"(function(){})";b.ip=this.c("ip")?1:0;b._=(new Date).getTime().toString();h&&(e="data="+b.data,delete b.data);a+="?"+c.Lc(b);if("img"in b)e=s.createElement("img"),e.src=a,s.body.appendChild(e);else if(g)try{U(a,e)}catch(n){q.error(n)}else if(T)try{var p=new XMLHttpRequest;p.open(d.method,a,o);var r=this.c("xhr_headers");h&&(r["Content-Type"]="application/x-www-form-urlencoded");c.a(r,function(a,b){p.setRequestHeader(b,a)});p.withCredentials=o;p.onreadystatechange=function(){if(4===p.readyState)if(200===
p.status){if(f)if(i){var a;try{a=c.xa(p.responseText)}catch(b){q.error(b);return}f(a)}else f(Number(p.responseText))}else a="Bad HTTP status: "+p.status+" "+p.statusText,q.error(a),f&&(i?f({status:0,error:a}):f(0))};p.send(e)}catch(t){q.error(t)}else e=s.createElement("script"),e.type="text/javascript",e.async=o,e.defer=o,e.src=a,r=s.getElementsByTagName("script")[0],r.parentNode.insertBefore(e,r)}};e.prototype.Xa=function(a){function b(a,b){c.a(a,function(a){if(c.isArray(a[0])){var d=b;c.a(a,function(a){d=
d[a[0]].apply(d,a.slice(1))})}else this[a[0]].apply(this,a.slice(1))},b)}var d,f=[],e=[],h=[];c.a(a,function(a){a&&(d=a[0],c.isArray(d)?h.push(a):"function"===typeof a?a.call(this):c.isArray(a)&&"alias"===d?f.push(a):c.isArray(a)&&-1!==d.indexOf("track")&&"function"===typeof this[d]?h.push(a):e.push(a))},this);b(f,this);b(e,this);b(h,this)};e.prototype.push=function(a){this.Xa([a])};e.prototype.disable=function(a){"undefined"===typeof a?this.X.wd=o:this.Ua=this.Ua.concat(a)};e.prototype.p=K(function(a,
b,d,f){!f&&"function"===typeof d&&(f=d,d=v);var d=d||{},e=d.transport;if(e)d.Cc=e;"function"!==typeof f&&(f=L());if(c.e(a))q.error("No event name provided to posthog.track");else if(this.Fb(a))f(0);else{b=b||{};b.token=this.c("token");e=this.persistence.Nd(a);c.e(e)||(b.$duration=parseFloat((((new Date).getTime()-e)/1E3).toFixed(3)));this.persistence.Gc(s.referrer);this.c("store_google")&&this.persistence.he();this.c("save_referrer")&&this.persistence.yb(s.referrer);b=c.extend({},c.info.ra(),this.persistence.ra(),
b);e=this.c("property_blacklist");c.isArray(e)?c.a(e,function(a){delete b[a]}):q.error("Invalid value for property_blacklist config: "+e);var a={event:a,properties:b},e=c.truncate(a,255),h=c.ea(e),h=c.gb(h);q.log("MIXPANEL REQUEST:");q.log(e);this.i(this.c("api_host")+"/e/",{data:h},d,this.ja(f,e));this.Cb(a);return e}});e.prototype.Wd=K(function(a,b,d){c.isArray(b)||(b=[b]);var f={};f[a]=b;this.v(f);return this.people.set(a,b,d)});e.prototype.pd=K(function(a,b,d){var c=this.F(a);if(c===l){var e=
{};e[a]=[b];this.v(e)}else-1===c.indexOf(b)&&(c.push(b),this.v(e));return this.people.ta(a,b,d)});e.prototype.Od=K(function(a,b,d){var c=this.F(a);if(c!==l){var e=c.indexOf(b);-1<e&&(c.splice(e,1),this.v({se:c}));0===c.length&&this.ua(a)}return this.people.remove(a,b,d)});e.prototype.ge=K(function(a,b,d,f){var e=c.extend({},b||{});c.a(d,function(a,b){a!==v&&a!==l&&(e[b]=a)});return this.p(a,e,f)});e.prototype.Qc=function(a,b){return a+"_"+JSON.stringify(b)};e.prototype.Ed=function(a,b){var d=this.Qc(a,
b),c=this.Ab[d];if(c===l||c.$a!==a||c.Za!==b)c=new u,c.ia(this,a,b),this.Ab[d]=c;return c};e.prototype.Bc=function(a){if(c.e(a))a=s.location.href;this.p("ph_page_view",c.info.Ld(a))};e.prototype.fe=function(){return this.cb.call(this,M,arguments)};e.prototype.ee=function(){return this.cb.call(this,W,arguments)};e.prototype.ae=function(a){c.e(a)?q.error("No event name provided to posthog.time_event"):this.Fb(a)||this.persistence.Vd(a)};e.prototype.v=function(a,b){this.persistence.v(a,b)};e.prototype.G=
function(a,b,c){this.persistence.G(a,b,c)};e.prototype.ua=function(a){this.persistence.ua(a)};e.prototype.Mb=function(a,b){var c={};c[a]=b;this.v(c)};e.prototype.pb=function(a,b,c,e,g,h,m,i){var n=this.S();this.v({$user_id:a});this.F("$device_id")||this.G({$had_persisted_distinct_id:o,$device_id:n},"");a!==n&&a!==this.F("__alias")&&(this.ua("__alias"),this.v({distinct_id:a}));this.Bb(this.S());this.X.qb=o;this.people.Vc(b,c,e,g,h,m,i);a!==n&&this.p("$identify",{distinct_id:a,$anon_distinct_id:n})};
e.prototype.reset=function(){this.persistence.clear();this.X.qb=D;var a=c.zb();this.G({distinct_id:a,$device_id:a},"")};e.prototype.S=function(){return this.F("distinct_id")};e.prototype.qd=function(a,b){if(a===this.F("$people_distinct_id"))return q.Z("Attempting to create alias for existing People user - aborting."),-2;var d=this;c.e(b)&&(b=this.S());if(a!==b)return this.Mb("__alias",a),this.p("$create_alias",{alias:a,distinct_id:b},function(){d.pb(a)});q.error("alias matches current distinct_id - skipping api call.");
this.pb(a);return-1};e.prototype.Jd=function(a){this.Mb("ph_name_tag",a)};e.prototype.vc=function(a){if(c.h(a))c.extend(this.config,a),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.Fc(this.config),G=G||this.c("debug")};e.prototype.c=function(a){return this.config[a]};e.prototype.F=function(a){return this.persistence.props[a]};e.prototype.toString=
function(){var a=this.c("name");"posthog"!==a&&(a="posthog."+a);return a};e.prototype.Fb=function(a){return c.hc(y)||this.X.wd||c.ec(this.Ua,a)};e.prototype.Cb=K(function(a){if(this.Pb)for(var b=this._triggered_notifs,c=0;c<b.length;c++){if((new h(b[c],this)).gd(a)){this.bb(b[c]);break}}else this.Gb.push(a)});e.prototype.Bb=K(function(a){a&&!this.X.qb&&!this.c("disable_notifications")&&(q.log("MIXPANEL NOTIFICATION CHECK"),this.i(this.c("api_host")+"/decide/",{verbose:o,version:"3",lib:"web",token:this.c("token"),
distinct_id:a},{method:"GET"},this.ja(c.bind(function(a){if(a.notifications&&0<a.notifications.length){this._triggered_notifs=[];var d=[];c.a(a.notifications,function(a){(a.display_triggers&&0<a.display_triggers.length?this._triggered_notifs:d).push(a)},this);0<d.length&&this.bb.call(this,d[0])}this.Ib()},this))))});e.prototype.Ib=function(){this.Pb=o;for(var a=this.Gb;0<a.length;)this.Cb(a.shift())};e.prototype.bb=function(a){(new h(a,this)).show()};e.prototype.Wc=function(){"localStorage"===this.c("opt_out_tracking_persistence_type")&&
c.localStorage.sb()&&(!this.Ha()&&this.Ha({persistence_type:"cookie"})&&this.nc({enable_persistence:D}),!this.na()&&this.na({persistence_type:"cookie"})&&this.ub({clear_persistence:D}),this.Wb({persistence_type:"cookie",enable_persistence:D}));if(this.na())this.Aa({clear_persistence:o});else if(!this.Ha()&&(this.c("opt_out_tracking_by_default")||c.cookie.get("ph_optout")))c.cookie.remove("ph_optout"),this.ub({clear_persistence:this.c("opt_out_persistence_by_default")})};e.prototype.Aa=function(a){if(a&&
a.clear_persistence)a=o;else if(a&&a.enable_persistence)a=D;else return;!this.c("disable_persistence")&&this.persistence.disabled!==a&&this.persistence.wc(a)};e.prototype.ha=function(a,b){b=c.extend({track:c.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_subdomain_cookie:this.c("cross_subdomain_cookie"),secure_cookie:this.c("secure_cookie")},b);c.localStorage.sb()||
(b.persistence_type="cookie");return a(this.c("token"),{p:b.track,be:b.track_event_name,ce:b.track_properties,qc:b.persistence_type,pc:b.cookie_prefix,Xb:b.cookie_expiration,Yb:b.cross_subdomain_cookie,Td:b.secure_cookie})};e.prototype.nc=function(a){a=c.extend({enable_persistence:o},a);this.ha(xa,a);this.Aa(a)};e.prototype.ub=function(a){a=c.extend({clear_persistence:o,delete_user:o},a);a.delete_user&&this.people&&this.people.ab()&&(this.people.$b(),this.people.Vb());this.ha(ya,a);this.Aa(a)};e.prototype.Ha=
function(a){return this.ha(za,a)};e.prototype.na=function(a){return this.ha(pa,a)};e.prototype.Wb=function(a){a=c.extend({enable_persistence:o},a);this.ha(Ba,a);this.Aa(a)};e.prototype.init=e.prototype.aa;e.prototype.reset=e.prototype.reset;e.prototype.disable=e.prototype.disable;e.prototype.time_event=e.prototype.ae;e.prototype.track=e.prototype.p;e.prototype.track_links=e.prototype.fe;e.prototype.track_forms=e.prototype.ee;e.prototype.track_pageview=e.prototype.Bc;e.prototype.register=e.prototype.v;
e.prototype.register_once=e.prototype.G;e.prototype.unregister=e.prototype.ua;e.prototype.identify=e.prototype.pb;e.prototype.alias=e.prototype.qd;e.prototype.name_tag=e.prototype.Jd;e.prototype.set_config=e.prototype.vc;e.prototype.get_config=e.prototype.c;e.prototype.get_property=e.prototype.F;e.prototype.get_distinct_id=e.prototype.S;e.prototype.toString=e.prototype.toString;e.prototype._check_and_handle_notifications=e.prototype.Bb;e.prototype._handle_user_decide_check_complete=e.prototype.Ib;
e.prototype._show_notification=e.prototype.bb;e.prototype.opt_out_tracking=e.prototype.ub;e.prototype.opt_in_tracking=e.prototype.nc;e.prototype.has_opted_out_tracking=e.prototype.na;e.prototype.has_opted_in_tracking=e.prototype.Ha;e.prototype.clear_opt_in_out_tracking=e.prototype.Wb;e.prototype.get_group=e.prototype.Ed;e.prototype.set_group=e.prototype.Wd;e.prototype.add_group=e.prototype.pd;e.prototype.remove_group=e.prototype.Od;e.prototype.track_with_groups=e.prototype.ge;p.prototype.properties=
p.prototype.ra;p.prototype.update_search_keyword=p.prototype.Gc;p.prototype.update_referrer_info=p.prototype.yb;p.prototype.get_cross_subdomain=p.prototype.Dd;p.prototype.clear=p.prototype.clear;c.Pd(e);var F={};(function(){ea=1;x=A.posthog;c.e(x)?q.Z('"posthog" object not initialized. Ensure you are using the latest version of the Posthog JS Library along with the snippet we provide.'):x.__loaded||x.config&&x.persistence?q.error("Posthog library has already been downloaded at least once."):1.1>
(x.__SV||0)?q.Z("Version mismatch; please ensure you're using the latest version of the Posthog code snippet."):(c.a(x._i,function(a){a&&c.isArray(a)&&(F[a[a.length-1]]=V.apply(this,a))}),ua(),x.init(),c.a(F,function(a){a.Ca()}),da())})()})();
})();