mixpanel-browser
Advanced tools
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| (function(){"use strict";var v;if(typeof window=="undefined"){var H={hostname:""};v={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:H,referrer:""},screen:{width:0,height:0},location:H,addEventListener:function(){},removeEventListener:function(){},dispatchEvent:function(){},CustomEvent:function(){}}}else v=window;var de={LIB_VERSION:"2.82.0"},ge="__mp_targeting",q=v.setImmediate,S,$,F,V=Object.prototype.toString,ye=typeof q!="undefined"?function(r){return q(r)}:setTimeout;try{Object.defineProperty({},"x",{}),S=function(r,o,n,f){return Object.defineProperty(r,o,{value:n,writable:!0,configurable:f!==!1})}}catch(e){S=function(o,n,f){return o[n]=f,o}}F=(function(){var r,o,n;function f(t,i){this.fn=t,this.self=i,this.next=void 0}return{add:function(i,c){n=new f(i,c),o?o.next=n:r=n,o=n,n=void 0},drain:function(){var i=r;for(r=o=$=void 0;i;)i.fn.call(i.self),i=i.next}}})();function T(e,r){F.add(e,r),$||($=ye(F.drain))}function X(e){var r,o=typeof e;return e!==null&&(o==="object"||o==="function")&&(r=e.then),typeof r=="function"?r:!1}function j(){for(var e=0;e<this.chain.length;e++)ve(this,this.state===1?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function ve(e,r,o){var n,f;try{r===!1?o.reject(e.msg):(r===!0?n=e.msg:n=r.call(void 0,e.msg),n===o.promise?o.reject(TypeError("Promise-chain cycle")):(f=X(n))?f.call(n,o.resolve,o.reject):o.resolve(n))}catch(t){o.reject(t)}}function Y(e){var r,o=this;if(!o.triggered){o.triggered=!0,o.def&&(o=o.def);try{(r=X(e))?T(function(){var n=new ee(o);try{r.call(e,function(){Y.apply(n,arguments)},function(){C.apply(n,arguments)})}catch(f){C.call(n,f)}}):(o.msg=e,o.state=1,o.chain.length>0&&T(j,o))}catch(n){C.call(new ee(o),n)}}}function C(e){var r=this;r.triggered||(r.triggered=!0,r.def&&(r=r.def),r.msg=e,r.state=2,r.chain.length>0&&T(j,r))}function Z(e,r,o,n){for(var f=0;f<r.length;f++)(function(i){e.resolve(r[i]).then(function(a){o(i,a)},n)})(f)}function ee(e){this.def=e,this.triggered=!1}function me(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function b(e){if(typeof e!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var r=new me(this);this.then=function(n,f){var t={success:typeof n=="function"?n:!0,failure:typeof f=="function"?f:!1};return t.promise=new this.constructor(function(c,a){if(typeof c!="function"||typeof a!="function")throw TypeError("Not a function");t.resolve=c,t.reject=a}),r.chain.push(t),r.state!==0&&T(j,r),t.promise},this.catch=function(n){return this.then(void 0,n)};try{e.call(void 0,function(n){Y.call(r,n)},function(n){C.call(r,n)})}catch(o){C.call(r,o)}}var re=S({},"constructor",b,!1);b.prototype=re,S(re,"__NPO__",0,!1),S(b,"resolve",function(r){var o=this;return r&&typeof r=="object"&&r.__NPO__===1?r:new o(function(f,t){if(typeof f!="function"||typeof t!="function")throw TypeError("Not a function");f(r)})}),S(b,"reject",function(r){return new this(function(n,f){if(typeof n!="function"||typeof f!="function")throw TypeError("Not a function");f(r)})}),S(b,"all",function(r){var o=this;return V.call(r)!=="[object Array]"?o.reject(TypeError("Not an array")):r.length===0?o.resolve([]):new o(function(f,t){if(typeof f!="function"||typeof t!="function")throw TypeError("Not a function");var i=r.length,c=Array(i),a=0;Z(o,r,function(d,g){c[d]=g,++a===i&&f(c)},t)})}),S(b,"race",function(r){var o=this;return V.call(r)!=="[object Array]"?o.reject(TypeError("Not an array")):new o(function(f,t){if(typeof f!="function"||typeof t!="function")throw TypeError("Not a function");Z(o,r,function(c,a){f(a)},t)})}),typeof Promise!="undefined"&&Promise.toString().indexOf("[native code]");var k=Array.prototype,we=Function.prototype,te=Object.prototype,E=k.slice,B=te.toString,M=te.hasOwnProperty;v.console;var I=v.navigator,A=v.document,D=v.opera,ne=v.screen,P=I.userAgent,R=we.bind,ie=k.forEach,oe=k.indexOf,ue=k.map,Ae=Array.isArray,L={},u={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}};u.bind=function(e,r){var o,n;if(R&&e.bind===R)return R.apply(e,E.call(arguments,1));if(!u.isFunction(e))throw new TypeError;return o=E.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(r,o.concat(E.call(arguments)));var f={};f.prototype=e.prototype;var t=new f;f.prototype=null;var i=e.apply(t,o.concat(E.call(arguments)));return Object(i)===i?i:t},n},u.each=function(e,r,o){if(e!=null){if(ie&&e.forEach===ie)e.forEach(r,o);else if(e.length===+e.length){for(var n=0,f=e.length;n<f;n++)if(n in e&&r.call(o,e[n],n,e)===L)return}else for(var t in e)if(M.call(e,t)&&r.call(o,e[t],t,e)===L)return}},u.extend=function(e){return u.each(E.call(arguments,1),function(r){for(var o in r)r[o]!==void 0&&(e[o]=r[o])}),e},u.isArray=Ae||function(e){return B.call(e)==="[object Array]"},u.isFunction=function(e){return typeof e=="function"},u.isArguments=function(e){return!!(e&&M.call(e,"callee"))},u.toArray=function(e){return e?e.toArray?e.toArray():u.isArray(e)||u.isArguments(e)?E.call(e):u.values(e):[]},u.map=function(e,r,o){if(ue&&e.map===ue)return e.map(r,o);var n=[];return u.each(e,function(f){n.push(r.call(o,f))}),n},u.keys=function(e){var r=[];return e===null||u.each(e,function(o,n){r[r.length]=n}),r},u.values=function(e){var r=[];return e===null||u.each(e,function(o){r[r.length]=o}),r},u.include=function(e,r){var o=!1;return e===null?o:oe&&e.indexOf===oe?e.indexOf(r)!=-1:(u.each(e,function(n){if(o||(o=n===r))return L}),o)},u.includes=function(e,r){return e.indexOf(r)!==-1},u.inherit=function(e,r){return e.prototype=new r,e.prototype.constructor=e,e.superclass=r.prototype,e},u.isObject=function(e){return e===Object(e)&&!u.isArray(e)},u.isEmptyObject=function(e){if(u.isObject(e)){for(var r in e)if(M.call(e,r))return!1;return!0}return!1},u.isUndefined=function(e){return e===void 0},u.isString=function(e){return B.call(e)=="[object String]"},u.isDate=function(e){return B.call(e)=="[object Date]"},u.isNumber=function(e){return B.call(e)=="[object Number]"},u.isElement=function(e){return!!(e&&e.nodeType===1)},u.encodeDates=function(e){return u.each(e,function(r,o){u.isDate(r)?e[o]=u.formatDate(r):u.isObject(r)&&(e[o]=u.encodeDates(r))}),e},u.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},u.formatDate=function(e){function r(o){return o<10?"0"+o:o}return e.getUTCFullYear()+"-"+r(e.getUTCMonth()+1)+"-"+r(e.getUTCDate())+"T"+r(e.getUTCHours())+":"+r(e.getUTCMinutes())+":"+r(e.getUTCSeconds())},u.strip_empty_properties=function(e){var r={};return u.each(e,function(o,n){u.isString(o)&&o.length>0&&(r[n]=o)}),r},u.truncate=function(e,r){var o;return typeof e=="string"?o=e.slice(0,r):u.isArray(e)?(o=[],u.each(e,function(n){o.push(u.truncate(n,r))})):u.isObject(e)?(o={},u.each(e,function(n,f){o[f]=u.truncate(n,r)})):o=e,o},u.JSONEncode=(function(){return function(e){var r=e,o=function(f){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(f)?'"'+f.replace(t,function(c){var a=i[c];return typeof a=="string"?a:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'},n=function(f,t){var i="",c=" ",a=0,s="",d="",g=0,l=i,h=[],p=t[f];switch(p&&typeof p=="object"&&typeof p.toJSON=="function"&&(p=p.toJSON(f)),typeof p){case"string":return o(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(i+=c,h=[],B.apply(p)==="[object Array]"){for(g=p.length,a=0;a<g;a+=1)h[a]=n(a,p)||"null";return d=h.length===0?"[]":i?"[\n"+i+h.join(",\n"+i)+"\n"+l+"]":"["+h.join(",")+"]",i=l,d}for(s in p)M.call(p,s)&&(d=n(s,p),d&&h.push(o(s)+(i?": ":":")+d));return d=h.length===0?"{}":i?"{"+h.join(",")+l+"}":"{"+h.join(",")+"}",i=l,d}};return n("",{"":r})}})(),u.JSONDecode=(function(){var e,r,o={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},n,f=function(h){var p=new SyntaxError(h);throw p.at=e,p.text=n,p},t=function(h){return h&&h!==r&&f("Expected '"+h+"' instead of '"+r+"'"),r=n.charAt(e),e+=1,r},i=function(){var h,p="";for(r==="-"&&(p="-",t("-"));r>="0"&&r<="9";)p+=r,t();if(r===".")for(p+=".";t()&&r>="0"&&r<="9";)p+=r;if(r==="e"||r==="E")for(p+=r,t(),(r==="-"||r==="+")&&(p+=r,t());r>="0"&&r<="9";)p+=r,t();if(h=+p,!isFinite(h))f("Bad number");else return h},c=function(){var h,p,m="",y;if(r==='"')for(;t();){if(r==='"')return t(),m;if(r==="\\")if(t(),r==="u"){for(y=0,p=0;p<4&&(h=parseInt(t(),16),!!isFinite(h));p+=1)y=y*16+h;m+=String.fromCharCode(y)}else if(typeof o[r]=="string")m+=o[r];else break;else m+=r}f("Bad string")},a=function(){for(;r&&r<=" ";)t()},s=function(){switch(r){case"t":return t("t"),t("r"),t("u"),t("e"),!0;case"f":return t("f"),t("a"),t("l"),t("s"),t("e"),!1;case"n":return t("n"),t("u"),t("l"),t("l"),null}f('Unexpected "'+r+'"')},d,g=function(){var h=[];if(r==="["){if(t("["),a(),r==="]")return t("]"),h;for(;r;){if(h.push(d()),a(),r==="]")return t("]"),h;t(","),a()}}f("Bad array")},l=function(){var h,p={};if(r==="{"){if(t("{"),a(),r==="}")return t("}"),p;for(;r;){if(h=c(),a(),t(":"),Object.hasOwnProperty.call(p,h)&&f('Duplicate key "'+h+'"'),p[h]=d(),a(),r==="}")return t("}"),p;t(","),a()}}f("Bad object")};return d=function(){switch(a(),r){case"{":return l();case"[":return g();case'"':return c();case"-":return i();default:return r>="0"&&r<="9"?i():s()}},function(h){var p;return n=h,e=0,r=" ",p=d(),a(),r&&f("Syntax error"),p}})(),u.base64Encode=function(e){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o,n,f,t,i,c,a,s,d=0,g=0,l="",h=[];if(!e)return e;e=u.utf8Encode(e);do o=e.charCodeAt(d++),n=e.charCodeAt(d++),f=e.charCodeAt(d++),s=o<<16|n<<8|f,t=s>>18&63,i=s>>12&63,c=s>>6&63,a=s&63,h[g++]=r.charAt(t)+r.charAt(i)+r.charAt(c)+r.charAt(a);while(d<e.length);switch(l=h.join(""),e.length%3){case 1:l=l.slice(0,-2)+"==";break;case 2:l=l.slice(0,-1)+"=";break}return l},u.utf8Encode=function(e){e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n");var r="",o,n,f=0,t;for(o=n=0,f=e.length,t=0;t<f;t++){var i=e.charCodeAt(t),c=null;i<128?n++:i>127&&i<2048?c=String.fromCharCode(i>>6|192,i&63|128):c=String.fromCharCode(i>>12|224,i>>6&63|128,i&63|128),c!==null&&(n>o&&(r+=e.substring(o,n)),r+=c,o=n=t+1)}return n>o&&(r+=e.substring(o,e.length)),r},u.UUID=function(){try{return v.crypto.randomUUID()}catch(o){for(var e=new Array(36),r=0;r<36;r++)e[r]=Math.floor(Math.random()*16);return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]="-",u.map(e,function(n){return n.toString(16)}).join("")}};var fe=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];u.isBlockedUA=function(e){var r;for(e=e.toLowerCase(),r=0;r<fe.length;r++)if(e.indexOf(fe[r])!==-1)return!0;return!1},u.HTTPBuildQuery=function(e,r){var o,n,f=[];return u.isUndefined(r)&&(r="&"),u.each(e,function(t,i){o=encodeURIComponent(t.toString()),n=encodeURIComponent(i),f[f.length]=n+"="+o}),f.join(r)},u.getQueryParam=function(e,r){r=r.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var o="[\\?&]"+r+"=([^&#]*)",n=new RegExp(o),f=n.exec(e);if(f===null||f&&typeof f[1]!="string"&&f[1].length)return"";var t=f[1];try{t=decodeURIComponent(t)}catch(i){}return t.replace(/\+/g," ")},u.cookie={get:function(e){for(var r=e+"=",o=A.cookie.split(";"),n=0;n<o.length;n++){for(var f=o[n];f.charAt(0)==" ";)f=f.substring(1,f.length);if(f.indexOf(r)===0)return decodeURIComponent(f.substring(r.length,f.length))}return null},parse:function(e){var r;try{r=u.JSONDecode(u.cookie.get(e))||{}}catch(o){}return r},set_seconds:function(e,r,o,n,f,t,i){var c="",a="",s="";if(i)c="; domain="+i;else if(n){var d=le(A.location.hostname);c=d?"; domain=."+d:""}if(o){var g=new Date;g.setTime(g.getTime()+o*1e3),a="; expires="+g.toGMTString()}t&&(f=!0,s="; SameSite=None"),f&&(s+="; secure"),A.cookie=e+"="+encodeURIComponent(r)+a+"; path=/"+c+s},set:function(e,r,o,n,f,t,i){var c="",a="",s="";if(i)c="; domain="+i;else if(n){var d=le(A.location.hostname);c=d?"; domain=."+d:""}if(o){var g=new Date;g.setTime(g.getTime()+o*24*60*60*1e3),a="; expires="+g.toGMTString()}t&&(f=!0,s="; SameSite=None"),f&&(s+="; secure");var l=e+"="+encodeURIComponent(r)+a+"; path=/"+c+s;return A.cookie=l,l},remove:function(e,r,o){u.cookie.set(e,"",-1,r,!1,!1,o)}};var ae=function(e){var r=!0;try{var o="__mplss_"+se(8),n="xyz";e.setItem(o,n),e.getItem(o)!==n&&(r=!1),e.removeItem(o)}catch(f){r=!1}return r},W=null,Se=function(e,r){return W!==null&&!r?W:W=ae(e)},J=null,_e=function(e,r){return J!==null&&!r?J:J=ae(e)};function ce(e,r,o){var n=function(f){};return{is_supported:function(f){var t=o(e,f);return t},error:n,get:function(f){try{return e.getItem(f)}catch(t){}return null},parse:function(f){try{return u.JSONDecode(e.getItem(f))||{}}catch(t){}return null},set:function(f,t){try{e.setItem(f,t)}catch(i){}},remove:function(f){try{e.removeItem(f)}catch(t){}}}}var Oe=function(){try{return v.localStorage}catch(e){return null}},be=function(){try{return v.sessionStorage}catch(e){return null}};u.localStorage=ce(Oe(),"localStorage",Se),u.sessionStorage=ce(be(),"sessionStorage",_e),u.register_event=(function(){var e=function(n,f,t,i,c){if(n)if(n.addEventListener&&!i)n.addEventListener(f,t,!!c);else{var a="on"+f,s=n[a];n[a]=r(n,t,s)}};function r(n,f,t){var i=function(c){if(c=c||o(v.event),!!c){var a=!0,s,d;return u.isFunction(t)&&(s=t(c)),d=f.call(n,c),(s===!1||d===!1)&&(a=!1),a}};return i}function o(n){return n&&(n.preventDefault=o.preventDefault,n.stopPropagation=o.stopPropagation),n}return o.preventDefault=function(){this.returnValue=!1},o.stopPropagation=function(){this.cancelBubble=!0},e})();var Ee=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');u.dom_query=(function(){function e(f){return f.all?f.all:f.getElementsByTagName("*")}var r=/[\t\r\n]/g;function o(f,t){var i=" "+t+" ";return(" "+f.className+" ").replace(r," ").indexOf(i)>=0}function n(f){if(!A.getElementsByTagName)return[];var t=f.split(" "),i,c,a,s,d,g,l,h,p,m,y=[A];for(g=0;g<t.length;g++){if(i=t[g].replace(/^\s+/,"").replace(/\s+$/,""),i.indexOf("#")>-1){c=i.split("#"),a=c[0];var K=c[1],Q=A.getElementById(K);if(!Q||a&&Q.nodeName.toLowerCase()!=a)return[];y=[Q];continue}if(i.indexOf(".")>-1){c=i.split("."),a=c[0];var Ue=c[1];for(a||(a="*"),s=[],d=0,l=0;l<y.length;l++)for(a=="*"?p=e(y[l]):p=y[l].getElementsByTagName(a),h=0;h<p.length;h++)s[d++]=p[h];for(y=[],m=0,l=0;l<s.length;l++)s[l].className&&u.isString(s[l].className)&&o(s[l],Ue)&&(y[m++]=s[l]);continue}var N=i.match(Ee);if(N){a=N[1];var _=N[2],$e=N[3],x=N[4];for(a||(a="*"),s=[],d=0,l=0;l<y.length;l++)for(a=="*"?p=e(y[l]):p=y[l].getElementsByTagName(a),h=0;h<p.length;h++)s[d++]=p[h];y=[],m=0;var O;switch($e){case"=":O=function(w){return w.getAttribute(_)==x};break;case"~":O=function(w){return w.getAttribute(_).match(new RegExp("\\b"+x+"\\b"))};break;case"|":O=function(w){return w.getAttribute(_).match(new RegExp("^"+x+"-?"))};break;case"^":O=function(w){return w.getAttribute(_).indexOf(x)===0};break;case"$":O=function(w){return w.getAttribute(_).lastIndexOf(x)==w.getAttribute(_).length-x.length};break;case"*":O=function(w){return w.getAttribute(_).indexOf(x)>-1};break;default:O=function(w){return w.getAttribute(_)}}for(y=[],m=0,l=0;l<s.length;l++)O(s[l])&&(y[m++]=s[l]);continue}for(a=i,s=[],d=0,l=0;l<y.length;l++)for(p=y[l].getElementsByTagName(a),h=0;h<p.length;h++)s[d++]=p[h];y=s}return y}return function(f){return u.isElement(f)?[f]:u.isObject(f)&&!u.isUndefined(f.length)?f:n.call(this,f)}})();var xe=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],Pe=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];u.info={campaignParams:function(e){var r="",o={};return u.each(xe,function(n){r=u.getQueryParam(A.URL,n),r.length?o[n]=r:e!==void 0&&(o[n]=e)}),o},clickParams:function(){var e="",r={};return u.each(Pe,function(o){e=u.getQueryParam(A.URL,o),e.length&&(r[o]=e)}),r},marketingParams:function(){return u.extend(u.info.campaignParams(),u.info.clickParams())},searchEngine:function(e){return e.search("https?://(.*)google.([^/?]*)")===0?"google":e.search("https?://(.*)bing.com")===0?"bing":e.search("https?://(.*)yahoo.com")===0?"yahoo":e.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(e){var r=u.info.searchEngine(e),o=r!="yahoo"?"q":"p",n={};if(r!==null){n.$search_engine=r;var f=u.getQueryParam(e,o);f.length&&(n.mp_keyword=f)}return n},browser:function(e,r,o){return r=r||"",o||u.includes(e," OPR/")?u.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":u.includes(e,"IEMobile")||u.includes(e,"WPDesktop")?"Internet Explorer Mobile":u.includes(e,"SamsungBrowser/")?"Samsung Internet":u.includes(e,"Edge")||u.includes(e,"Edg/")?"Microsoft Edge":u.includes(e,"FBIOS")?"Facebook Mobile":u.includes(e,"Whale/")?"Whale Browser":u.includes(e,"Chrome")?"Chrome":u.includes(e,"CriOS")?"Chrome iOS":u.includes(e,"UCWEB")||u.includes(e,"UCBrowser")?"UC Browser":u.includes(e,"FxiOS")?"Firefox iOS":u.includes(r,"Apple")?u.includes(e,"Mobile")?"Mobile Safari":"Safari":u.includes(e,"Android")?"Android Mobile":u.includes(e,"Konqueror")?"Konqueror":u.includes(e,"Firefox")?"Firefox":u.includes(e,"MSIE")||u.includes(e,"Trident/")?"Internet Explorer":u.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,r,o){var n=u.info.browser(e,r,o),f={"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+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/},t=f[n];if(t===void 0)return null;var i=e.match(t);return i?parseFloat(i[i.length-2]):null},os:function(){var e=P;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var r=e.split("/");return r.length>=3?r[2]:""},currentUrl:function(){return v.location.href},properties:function(e){return typeof e!="object"&&(e={}),u.extend(u.strip_empty_properties({$os:u.info.os(),$browser:u.info.browser(P,I.vendor,D),$referrer:A.referrer,$referring_domain:u.info.referringDomain(A.referrer),$device:u.info.device(P)}),{$current_url:u.info.currentUrl(),$browser_version:u.info.browserVersion(P,I.vendor,D),$screen_height:ne.height,$screen_width:ne.width,mp_lib:"web",$lib_version:de.LIB_VERSION,$insert_id:se(),time:u.timestamp()/1e3},u.strip_empty_properties(e))},people_properties:function(){return u.extend(u.strip_empty_properties({$os:u.info.os(),$browser:u.info.browser(P,I.vendor,D)}),{$browser_version:u.info.browserVersion(P,I.vendor,D)})},mpPageViewProperties:function(){return u.strip_empty_properties({current_page_title:A.title,current_domain:v.location.hostname,current_url_path:v.location.pathname,current_url_protocol:v.location.protocol,current_url_search:v.location.search})}};var se=function(e){var r=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?r.substring(0,e):r},Ce=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,Be=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,le=function(e){var r=Be,o=e.split("."),n=o[o.length-1];(n.length>4||n==="com"||n==="org")&&(r=Ce);var f=e.match(r);return f?f[0]:""},z=null,G=null;typeof JSON!="undefined"&&(z=JSON.stringify,G=JSON.parse),z=z||u.JSONEncode,G=G||u.JSONDecode,u.info=u.info,u.info.browser=u.info.browser,u.info.browserVersion=u.info.browserVersion,u.info.device=u.info.device,u.info.properties=u.info.properties,u.isBlockedUA=u.isBlockedUA,u.isEmptyObject=u.isEmptyObject,u.isObject=u.isObject,u.JSONDecode=u.JSONDecode,u.JSONEncode=u.JSONEncode,u.toArray=u.toArray,u.NPO=b;function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var U={exports:{}},Ne=U.exports,pe;function Te(){return pe||(pe=1,(function(e,r){(function(o,n){e.exports=n()})(Ne,function(){Array.isArray||(Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"});function o(t){for(var i=[],c=0,a=t.length;c<a;c++)i.indexOf(t[c])===-1&&i.push(t[c]);return i}var n={},f={"==":function(t,i){return t==i},"===":function(t,i){return t===i},"!=":function(t,i){return t!=i},"!==":function(t,i){return t!==i},">":function(t,i){return t>i},">=":function(t,i){return t>=i},"<":function(t,i,c){return c===void 0?t<i:t<i&&i<c},"<=":function(t,i,c){return c===void 0?t<=i:t<=i&&i<=c},"!!":function(t){return n.truthy(t)},"!":function(t){return!n.truthy(t)},"%":function(t,i){return t%i},log:function(t){return console.log(t),t},in:function(t,i){return!i||typeof i.indexOf=="undefined"?!1:i.indexOf(t)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(t,i,c){if(c<0){var a=String(t).substr(i);return a.substr(0,a.length+c)}return String(t).substr(i,c)},"+":function(){return Array.prototype.reduce.call(arguments,function(t,i){return parseFloat(t,10)+parseFloat(i,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(t,i){return parseFloat(t,10)*parseFloat(i,10)})},"-":function(t,i){return i===void 0?-t:t-i},"/":function(t,i){return t/i},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(t,i){return t.concat(i)},[])},var:function(t,i){var c=i===void 0?null:i,a=this;if(typeof t=="undefined"||t===""||t===null)return a;for(var s=String(t).split("."),d=0;d<s.length;d++)if(a==null||(a=a[s[d]],a===void 0))return c;return a},missing:function(){for(var t=[],i=Array.isArray(arguments[0])?arguments[0]:arguments,c=0;c<i.length;c++){var a=i[c],s=n.apply({var:a},this);(s===null||s==="")&&t.push(a)}return t},missing_some:function(t,i){var c=n.apply({missing:i},this);return i.length-c.length>=t?[]:c}};return n.is_logic=function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length===1},n.truthy=function(t){return Array.isArray(t)&&t.length===0?!1:!!t},n.get_operator=function(t){return Object.keys(t)[0]},n.get_values=function(t){return t[n.get_operator(t)]},n.apply=function(t,i){if(Array.isArray(t))return t.map(function(y){return n.apply(y,i)});if(!n.is_logic(t))return t;var c=n.get_operator(t),a=t[c],s,d,g,l,h;if(Array.isArray(a)||(a=[a]),c==="if"||c=="?:"){for(s=0;s<a.length-1;s+=2)if(n.truthy(n.apply(a[s],i)))return n.apply(a[s+1],i);return a.length===s+1?n.apply(a[s],i):null}else if(c==="and"){for(s=0;s<a.length;s+=1)if(d=n.apply(a[s],i),!n.truthy(d))return d;return d}else if(c==="or"){for(s=0;s<a.length;s+=1)if(d=n.apply(a[s],i),n.truthy(d))return d;return d}else{if(c==="filter")return l=n.apply(a[0],i),g=a[1],Array.isArray(l)?l.filter(function(y){return n.truthy(n.apply(g,y))}):[];if(c==="map")return l=n.apply(a[0],i),g=a[1],Array.isArray(l)?l.map(function(y){return n.apply(g,y)}):[];if(c==="reduce")return l=n.apply(a[0],i),g=a[1],h=typeof a[2]!="undefined"?n.apply(a[2],i):null,Array.isArray(l)?l.reduce(function(y,K){return n.apply(g,{current:K,accumulator:y})},h):h;if(c==="all"){if(l=n.apply(a[0],i),g=a[1],!Array.isArray(l)||!l.length)return!1;for(s=0;s<l.length;s+=1)if(!n.truthy(n.apply(g,l[s])))return!1;return!0}else if(c==="none"){if(l=n.apply(a[0],i),g=a[1],!Array.isArray(l)||!l.length)return!0;for(s=0;s<l.length;s+=1)if(n.truthy(n.apply(g,l[s])))return!1;return!0}else if(c==="some"){if(l=n.apply(a[0],i),g=a[1],!Array.isArray(l)||!l.length)return!1;for(s=0;s<l.length;s+=1)if(n.truthy(n.apply(g,l[s])))return!0;return!1}}if(a=a.map(function(y){return n.apply(y,i)}),f.hasOwnProperty(c)&&typeof f[c]=="function")return f[c].apply(i,a);if(c.indexOf(".")>0){var p=String(c).split("."),m=f;for(s=0;s<p.length;s++){if(!m.hasOwnProperty(p[s]))throw new Error("Unrecognized operation "+c+" (failed at "+p.slice(0,s+1).join(".")+")");m=m[p[s]]}return m.apply(i,a)}throw new Error("Unrecognized operation "+c)},n.uses_data=function(t){var i=[];if(n.is_logic(t)){var c=n.get_operator(t),a=t[c];Array.isArray(a)||(a=[a]),c==="var"?i.push(a[0]):a.forEach(function(s){i.push.apply(i,n.uses_data(s))})}return o(i)},n.add_operation=function(t,i){f[t]=i},n.rm_operation=function(t){delete f[t]},n.rule_like=function(t,i){if(i===t||i==="@")return!0;if(i==="number")return typeof t=="number";if(i==="string")return typeof t=="string";if(i==="array")return Array.isArray(t)&&!n.is_logic(t);if(n.is_logic(i)){if(n.is_logic(t)){var c=n.get_operator(i),a=n.get_operator(t);if(c==="@"||c===a)return n.rule_like(n.get_values(t,!1),n.get_values(i,!1))}return!1}if(Array.isArray(i))if(Array.isArray(t)){if(i.length!==t.length)return!1;for(var s=0;s<i.length;s+=1)if(!n.rule_like(t[s],i[s]))return!1;return!0}else return!1;return!1},n})})(U)),U.exports}var ke=Te(),Me=Ie(ke),De=function(e,r,o){if(e!==o.event_name)return{matches:!1};var n=o.property_filters,f=!0;if(n&&!u.isEmptyObject(n))try{f=Me.apply(n,r||{})}catch(t){return{matches:!1,error:t.toString()}}return{matches:f}},he={};he.eventMatchesCriteria=De,v[ge]=Promise.resolve(he)})(); | ||
| //# sourceMappingURL=mixpanel-targeting-DXewv1As.min.js.map |
Sorry, the diff of this file is too big to display
+5
-0
@@ -0,1 +1,6 @@ | ||
| **2.82.0** (10 Aug 2026) | ||
| - Fixes empty response bodies in session recording network telemetry. Fetch events were emitted before the response body finished being read; they now wait for it. The application's own `fetch()` is not delayed. | ||
| - Adds `fallback_reason` (`FLAG_NOT_FOUND`, `NOT_READY`, or `BACKEND_ERROR`) to feature flag variants when `variant_source` is `'fallback'`. `@mixpanel/openfeature-web-provider` uses it to report the specific cause instead of always reporting `FLAG_NOT_FOUND`. | ||
| **2.81.0** (9 Jul 2026) | ||
@@ -2,0 +7,0 @@ |
@@ -385,2 +385,19 @@ import type { RulesLogic } from 'json-logic-js'; | ||
| /** | ||
| * Where a variant came from. Coarse-grained — see {@link FlagsFallbackReason} | ||
| * for the specific reason behind a fallback. | ||
| */ | ||
| export type FlagsVariantSource = 'network' | 'persistence' | 'fallback'; | ||
| /** | ||
| * Why the SDK returned the developer fallback. Only meaningful when | ||
| * `variant_source === 'fallback'`. Matches the constant set used by | ||
| * mixpanel-php so the OpenFeature wrapper can map each reason to the | ||
| * spec-correct error code. | ||
| */ | ||
| export type FlagsFallbackReason = | ||
| | 'FLAG_NOT_FOUND' | ||
| | 'NOT_READY' | ||
| | 'BACKEND_ERROR'; | ||
| export interface FlagsVariant { | ||
@@ -392,3 +409,5 @@ key: string; | ||
| is_qa_tester?: boolean; | ||
| variant_source?: string; | ||
| variant_source?: FlagsVariantSource; | ||
| /** Undefined on success; set when `variant_source === 'fallback'`. */ | ||
| fallback_reason?: FlagsFallbackReason; | ||
| persisted_at_in_ms?: number; | ||
@@ -395,0 +414,0 @@ } |
@@ -1,2 +0,2 @@ | ||
| (function(){"use strict";var v;if(typeof window=="undefined"){var H={hostname:""};v={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:H,referrer:""},screen:{width:0,height:0},location:H,addEventListener:function(){},removeEventListener:function(){},dispatchEvent:function(){},CustomEvent:function(){}}}else v=window;var de={LIB_VERSION:"2.81.0"},ge="__mp_targeting",q=v.setImmediate,S,$,F,V=Object.prototype.toString,ye=typeof q!="undefined"?function(r){return q(r)}:setTimeout;try{Object.defineProperty({},"x",{}),S=function(r,o,n,f){return Object.defineProperty(r,o,{value:n,writable:!0,configurable:f!==!1})}}catch(e){S=function(o,n,f){return o[n]=f,o}}F=(function(){var r,o,n;function f(t,i){this.fn=t,this.self=i,this.next=void 0}return{add:function(i,c){n=new f(i,c),o?o.next=n:r=n,o=n,n=void 0},drain:function(){var i=r;for(r=o=$=void 0;i;)i.fn.call(i.self),i=i.next}}})();function T(e,r){F.add(e,r),$||($=ye(F.drain))}function X(e){var r,o=typeof e;return e!==null&&(o==="object"||o==="function")&&(r=e.then),typeof r=="function"?r:!1}function j(){for(var e=0;e<this.chain.length;e++)ve(this,this.state===1?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function ve(e,r,o){var n,f;try{r===!1?o.reject(e.msg):(r===!0?n=e.msg:n=r.call(void 0,e.msg),n===o.promise?o.reject(TypeError("Promise-chain cycle")):(f=X(n))?f.call(n,o.resolve,o.reject):o.resolve(n))}catch(t){o.reject(t)}}function Y(e){var r,o=this;if(!o.triggered){o.triggered=!0,o.def&&(o=o.def);try{(r=X(e))?T(function(){var n=new ee(o);try{r.call(e,function(){Y.apply(n,arguments)},function(){C.apply(n,arguments)})}catch(f){C.call(n,f)}}):(o.msg=e,o.state=1,o.chain.length>0&&T(j,o))}catch(n){C.call(new ee(o),n)}}}function C(e){var r=this;r.triggered||(r.triggered=!0,r.def&&(r=r.def),r.msg=e,r.state=2,r.chain.length>0&&T(j,r))}function Z(e,r,o,n){for(var f=0;f<r.length;f++)(function(i){e.resolve(r[i]).then(function(a){o(i,a)},n)})(f)}function ee(e){this.def=e,this.triggered=!1}function me(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function b(e){if(typeof e!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var r=new me(this);this.then=function(n,f){var t={success:typeof n=="function"?n:!0,failure:typeof f=="function"?f:!1};return t.promise=new this.constructor(function(c,a){if(typeof c!="function"||typeof a!="function")throw TypeError("Not a function");t.resolve=c,t.reject=a}),r.chain.push(t),r.state!==0&&T(j,r),t.promise},this.catch=function(n){return this.then(void 0,n)};try{e.call(void 0,function(n){Y.call(r,n)},function(n){C.call(r,n)})}catch(o){C.call(r,o)}}var re=S({},"constructor",b,!1);b.prototype=re,S(re,"__NPO__",0,!1),S(b,"resolve",function(r){var o=this;return r&&typeof r=="object"&&r.__NPO__===1?r:new o(function(f,t){if(typeof f!="function"||typeof t!="function")throw TypeError("Not a function");f(r)})}),S(b,"reject",function(r){return new this(function(n,f){if(typeof n!="function"||typeof f!="function")throw TypeError("Not a function");f(r)})}),S(b,"all",function(r){var o=this;return V.call(r)!=="[object Array]"?o.reject(TypeError("Not an array")):r.length===0?o.resolve([]):new o(function(f,t){if(typeof f!="function"||typeof t!="function")throw TypeError("Not a function");var i=r.length,c=Array(i),a=0;Z(o,r,function(d,g){c[d]=g,++a===i&&f(c)},t)})}),S(b,"race",function(r){var o=this;return V.call(r)!=="[object Array]"?o.reject(TypeError("Not an array")):new o(function(f,t){if(typeof f!="function"||typeof t!="function")throw TypeError("Not a function");Z(o,r,function(c,a){f(a)},t)})}),typeof Promise!="undefined"&&Promise.toString().indexOf("[native code]");var k=Array.prototype,we=Function.prototype,te=Object.prototype,E=k.slice,B=te.toString,M=te.hasOwnProperty;v.console;var I=v.navigator,A=v.document,D=v.opera,ne=v.screen,P=I.userAgent,R=we.bind,ie=k.forEach,oe=k.indexOf,ue=k.map,Ae=Array.isArray,L={},u={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}};u.bind=function(e,r){var o,n;if(R&&e.bind===R)return R.apply(e,E.call(arguments,1));if(!u.isFunction(e))throw new TypeError;return o=E.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(r,o.concat(E.call(arguments)));var f={};f.prototype=e.prototype;var t=new f;f.prototype=null;var i=e.apply(t,o.concat(E.call(arguments)));return Object(i)===i?i:t},n},u.each=function(e,r,o){if(e!=null){if(ie&&e.forEach===ie)e.forEach(r,o);else if(e.length===+e.length){for(var n=0,f=e.length;n<f;n++)if(n in e&&r.call(o,e[n],n,e)===L)return}else for(var t in e)if(M.call(e,t)&&r.call(o,e[t],t,e)===L)return}},u.extend=function(e){return u.each(E.call(arguments,1),function(r){for(var o in r)r[o]!==void 0&&(e[o]=r[o])}),e},u.isArray=Ae||function(e){return B.call(e)==="[object Array]"},u.isFunction=function(e){return typeof e=="function"},u.isArguments=function(e){return!!(e&&M.call(e,"callee"))},u.toArray=function(e){return e?e.toArray?e.toArray():u.isArray(e)||u.isArguments(e)?E.call(e):u.values(e):[]},u.map=function(e,r,o){if(ue&&e.map===ue)return e.map(r,o);var n=[];return u.each(e,function(f){n.push(r.call(o,f))}),n},u.keys=function(e){var r=[];return e===null||u.each(e,function(o,n){r[r.length]=n}),r},u.values=function(e){var r=[];return e===null||u.each(e,function(o){r[r.length]=o}),r},u.include=function(e,r){var o=!1;return e===null?o:oe&&e.indexOf===oe?e.indexOf(r)!=-1:(u.each(e,function(n){if(o||(o=n===r))return L}),o)},u.includes=function(e,r){return e.indexOf(r)!==-1},u.inherit=function(e,r){return e.prototype=new r,e.prototype.constructor=e,e.superclass=r.prototype,e},u.isObject=function(e){return e===Object(e)&&!u.isArray(e)},u.isEmptyObject=function(e){if(u.isObject(e)){for(var r in e)if(M.call(e,r))return!1;return!0}return!1},u.isUndefined=function(e){return e===void 0},u.isString=function(e){return B.call(e)=="[object String]"},u.isDate=function(e){return B.call(e)=="[object Date]"},u.isNumber=function(e){return B.call(e)=="[object Number]"},u.isElement=function(e){return!!(e&&e.nodeType===1)},u.encodeDates=function(e){return u.each(e,function(r,o){u.isDate(r)?e[o]=u.formatDate(r):u.isObject(r)&&(e[o]=u.encodeDates(r))}),e},u.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},u.formatDate=function(e){function r(o){return o<10?"0"+o:o}return e.getUTCFullYear()+"-"+r(e.getUTCMonth()+1)+"-"+r(e.getUTCDate())+"T"+r(e.getUTCHours())+":"+r(e.getUTCMinutes())+":"+r(e.getUTCSeconds())},u.strip_empty_properties=function(e){var r={};return u.each(e,function(o,n){u.isString(o)&&o.length>0&&(r[n]=o)}),r},u.truncate=function(e,r){var o;return typeof e=="string"?o=e.slice(0,r):u.isArray(e)?(o=[],u.each(e,function(n){o.push(u.truncate(n,r))})):u.isObject(e)?(o={},u.each(e,function(n,f){o[f]=u.truncate(n,r)})):o=e,o},u.JSONEncode=(function(){return function(e){var r=e,o=function(f){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(f)?'"'+f.replace(t,function(c){var a=i[c];return typeof a=="string"?a:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'},n=function(f,t){var i="",c=" ",a=0,s="",d="",g=0,l=i,h=[],p=t[f];switch(p&&typeof p=="object"&&typeof p.toJSON=="function"&&(p=p.toJSON(f)),typeof p){case"string":return o(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(i+=c,h=[],B.apply(p)==="[object Array]"){for(g=p.length,a=0;a<g;a+=1)h[a]=n(a,p)||"null";return d=h.length===0?"[]":i?"[\n"+i+h.join(",\n"+i)+"\n"+l+"]":"["+h.join(",")+"]",i=l,d}for(s in p)M.call(p,s)&&(d=n(s,p),d&&h.push(o(s)+(i?": ":":")+d));return d=h.length===0?"{}":i?"{"+h.join(",")+l+"}":"{"+h.join(",")+"}",i=l,d}};return n("",{"":r})}})(),u.JSONDecode=(function(){var e,r,o={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},n,f=function(h){var p=new SyntaxError(h);throw p.at=e,p.text=n,p},t=function(h){return h&&h!==r&&f("Expected '"+h+"' instead of '"+r+"'"),r=n.charAt(e),e+=1,r},i=function(){var h,p="";for(r==="-"&&(p="-",t("-"));r>="0"&&r<="9";)p+=r,t();if(r===".")for(p+=".";t()&&r>="0"&&r<="9";)p+=r;if(r==="e"||r==="E")for(p+=r,t(),(r==="-"||r==="+")&&(p+=r,t());r>="0"&&r<="9";)p+=r,t();if(h=+p,!isFinite(h))f("Bad number");else return h},c=function(){var h,p,m="",y;if(r==='"')for(;t();){if(r==='"')return t(),m;if(r==="\\")if(t(),r==="u"){for(y=0,p=0;p<4&&(h=parseInt(t(),16),!!isFinite(h));p+=1)y=y*16+h;m+=String.fromCharCode(y)}else if(typeof o[r]=="string")m+=o[r];else break;else m+=r}f("Bad string")},a=function(){for(;r&&r<=" ";)t()},s=function(){switch(r){case"t":return t("t"),t("r"),t("u"),t("e"),!0;case"f":return t("f"),t("a"),t("l"),t("s"),t("e"),!1;case"n":return t("n"),t("u"),t("l"),t("l"),null}f('Unexpected "'+r+'"')},d,g=function(){var h=[];if(r==="["){if(t("["),a(),r==="]")return t("]"),h;for(;r;){if(h.push(d()),a(),r==="]")return t("]"),h;t(","),a()}}f("Bad array")},l=function(){var h,p={};if(r==="{"){if(t("{"),a(),r==="}")return t("}"),p;for(;r;){if(h=c(),a(),t(":"),Object.hasOwnProperty.call(p,h)&&f('Duplicate key "'+h+'"'),p[h]=d(),a(),r==="}")return t("}"),p;t(","),a()}}f("Bad object")};return d=function(){switch(a(),r){case"{":return l();case"[":return g();case'"':return c();case"-":return i();default:return r>="0"&&r<="9"?i():s()}},function(h){var p;return n=h,e=0,r=" ",p=d(),a(),r&&f("Syntax error"),p}})(),u.base64Encode=function(e){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o,n,f,t,i,c,a,s,d=0,g=0,l="",h=[];if(!e)return e;e=u.utf8Encode(e);do o=e.charCodeAt(d++),n=e.charCodeAt(d++),f=e.charCodeAt(d++),s=o<<16|n<<8|f,t=s>>18&63,i=s>>12&63,c=s>>6&63,a=s&63,h[g++]=r.charAt(t)+r.charAt(i)+r.charAt(c)+r.charAt(a);while(d<e.length);switch(l=h.join(""),e.length%3){case 1:l=l.slice(0,-2)+"==";break;case 2:l=l.slice(0,-1)+"=";break}return l},u.utf8Encode=function(e){e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n");var r="",o,n,f=0,t;for(o=n=0,f=e.length,t=0;t<f;t++){var i=e.charCodeAt(t),c=null;i<128?n++:i>127&&i<2048?c=String.fromCharCode(i>>6|192,i&63|128):c=String.fromCharCode(i>>12|224,i>>6&63|128,i&63|128),c!==null&&(n>o&&(r+=e.substring(o,n)),r+=c,o=n=t+1)}return n>o&&(r+=e.substring(o,e.length)),r},u.UUID=function(){try{return v.crypto.randomUUID()}catch(o){for(var e=new Array(36),r=0;r<36;r++)e[r]=Math.floor(Math.random()*16);return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]="-",u.map(e,function(n){return n.toString(16)}).join("")}};var fe=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];u.isBlockedUA=function(e){var r;for(e=e.toLowerCase(),r=0;r<fe.length;r++)if(e.indexOf(fe[r])!==-1)return!0;return!1},u.HTTPBuildQuery=function(e,r){var o,n,f=[];return u.isUndefined(r)&&(r="&"),u.each(e,function(t,i){o=encodeURIComponent(t.toString()),n=encodeURIComponent(i),f[f.length]=n+"="+o}),f.join(r)},u.getQueryParam=function(e,r){r=r.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var o="[\\?&]"+r+"=([^&#]*)",n=new RegExp(o),f=n.exec(e);if(f===null||f&&typeof f[1]!="string"&&f[1].length)return"";var t=f[1];try{t=decodeURIComponent(t)}catch(i){}return t.replace(/\+/g," ")},u.cookie={get:function(e){for(var r=e+"=",o=A.cookie.split(";"),n=0;n<o.length;n++){for(var f=o[n];f.charAt(0)==" ";)f=f.substring(1,f.length);if(f.indexOf(r)===0)return decodeURIComponent(f.substring(r.length,f.length))}return null},parse:function(e){var r;try{r=u.JSONDecode(u.cookie.get(e))||{}}catch(o){}return r},set_seconds:function(e,r,o,n,f,t,i){var c="",a="",s="";if(i)c="; domain="+i;else if(n){var d=le(A.location.hostname);c=d?"; domain=."+d:""}if(o){var g=new Date;g.setTime(g.getTime()+o*1e3),a="; expires="+g.toGMTString()}t&&(f=!0,s="; SameSite=None"),f&&(s+="; secure"),A.cookie=e+"="+encodeURIComponent(r)+a+"; path=/"+c+s},set:function(e,r,o,n,f,t,i){var c="",a="",s="";if(i)c="; domain="+i;else if(n){var d=le(A.location.hostname);c=d?"; domain=."+d:""}if(o){var g=new Date;g.setTime(g.getTime()+o*24*60*60*1e3),a="; expires="+g.toGMTString()}t&&(f=!0,s="; SameSite=None"),f&&(s+="; secure");var l=e+"="+encodeURIComponent(r)+a+"; path=/"+c+s;return A.cookie=l,l},remove:function(e,r,o){u.cookie.set(e,"",-1,r,!1,!1,o)}};var ae=function(e){var r=!0;try{var o="__mplss_"+se(8),n="xyz";e.setItem(o,n),e.getItem(o)!==n&&(r=!1),e.removeItem(o)}catch(f){r=!1}return r},W=null,Se=function(e,r){return W!==null&&!r?W:W=ae(e)},J=null,_e=function(e,r){return J!==null&&!r?J:J=ae(e)};function ce(e,r,o){var n=function(f){};return{is_supported:function(f){var t=o(e,f);return t},error:n,get:function(f){try{return e.getItem(f)}catch(t){}return null},parse:function(f){try{return u.JSONDecode(e.getItem(f))||{}}catch(t){}return null},set:function(f,t){try{e.setItem(f,t)}catch(i){}},remove:function(f){try{e.removeItem(f)}catch(t){}}}}var Oe=function(){try{return v.localStorage}catch(e){return null}},be=function(){try{return v.sessionStorage}catch(e){return null}};u.localStorage=ce(Oe(),"localStorage",Se),u.sessionStorage=ce(be(),"sessionStorage",_e),u.register_event=(function(){var e=function(n,f,t,i,c){if(n)if(n.addEventListener&&!i)n.addEventListener(f,t,!!c);else{var a="on"+f,s=n[a];n[a]=r(n,t,s)}};function r(n,f,t){var i=function(c){if(c=c||o(v.event),!!c){var a=!0,s,d;return u.isFunction(t)&&(s=t(c)),d=f.call(n,c),(s===!1||d===!1)&&(a=!1),a}};return i}function o(n){return n&&(n.preventDefault=o.preventDefault,n.stopPropagation=o.stopPropagation),n}return o.preventDefault=function(){this.returnValue=!1},o.stopPropagation=function(){this.cancelBubble=!0},e})();var Ee=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');u.dom_query=(function(){function e(f){return f.all?f.all:f.getElementsByTagName("*")}var r=/[\t\r\n]/g;function o(f,t){var i=" "+t+" ";return(" "+f.className+" ").replace(r," ").indexOf(i)>=0}function n(f){if(!A.getElementsByTagName)return[];var t=f.split(" "),i,c,a,s,d,g,l,h,p,m,y=[A];for(g=0;g<t.length;g++){if(i=t[g].replace(/^\s+/,"").replace(/\s+$/,""),i.indexOf("#")>-1){c=i.split("#"),a=c[0];var K=c[1],Q=A.getElementById(K);if(!Q||a&&Q.nodeName.toLowerCase()!=a)return[];y=[Q];continue}if(i.indexOf(".")>-1){c=i.split("."),a=c[0];var Ue=c[1];for(a||(a="*"),s=[],d=0,l=0;l<y.length;l++)for(a=="*"?p=e(y[l]):p=y[l].getElementsByTagName(a),h=0;h<p.length;h++)s[d++]=p[h];for(y=[],m=0,l=0;l<s.length;l++)s[l].className&&u.isString(s[l].className)&&o(s[l],Ue)&&(y[m++]=s[l]);continue}var N=i.match(Ee);if(N){a=N[1];var _=N[2],$e=N[3],x=N[4];for(a||(a="*"),s=[],d=0,l=0;l<y.length;l++)for(a=="*"?p=e(y[l]):p=y[l].getElementsByTagName(a),h=0;h<p.length;h++)s[d++]=p[h];y=[],m=0;var O;switch($e){case"=":O=function(w){return w.getAttribute(_)==x};break;case"~":O=function(w){return w.getAttribute(_).match(new RegExp("\\b"+x+"\\b"))};break;case"|":O=function(w){return w.getAttribute(_).match(new RegExp("^"+x+"-?"))};break;case"^":O=function(w){return w.getAttribute(_).indexOf(x)===0};break;case"$":O=function(w){return w.getAttribute(_).lastIndexOf(x)==w.getAttribute(_).length-x.length};break;case"*":O=function(w){return w.getAttribute(_).indexOf(x)>-1};break;default:O=function(w){return w.getAttribute(_)}}for(y=[],m=0,l=0;l<s.length;l++)O(s[l])&&(y[m++]=s[l]);continue}for(a=i,s=[],d=0,l=0;l<y.length;l++)for(p=y[l].getElementsByTagName(a),h=0;h<p.length;h++)s[d++]=p[h];y=s}return y}return function(f){return u.isElement(f)?[f]:u.isObject(f)&&!u.isUndefined(f.length)?f:n.call(this,f)}})();var xe=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],Pe=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];u.info={campaignParams:function(e){var r="",o={};return u.each(xe,function(n){r=u.getQueryParam(A.URL,n),r.length?o[n]=r:e!==void 0&&(o[n]=e)}),o},clickParams:function(){var e="",r={};return u.each(Pe,function(o){e=u.getQueryParam(A.URL,o),e.length&&(r[o]=e)}),r},marketingParams:function(){return u.extend(u.info.campaignParams(),u.info.clickParams())},searchEngine:function(e){return e.search("https?://(.*)google.([^/?]*)")===0?"google":e.search("https?://(.*)bing.com")===0?"bing":e.search("https?://(.*)yahoo.com")===0?"yahoo":e.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(e){var r=u.info.searchEngine(e),o=r!="yahoo"?"q":"p",n={};if(r!==null){n.$search_engine=r;var f=u.getQueryParam(e,o);f.length&&(n.mp_keyword=f)}return n},browser:function(e,r,o){return r=r||"",o||u.includes(e," OPR/")?u.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":u.includes(e,"IEMobile")||u.includes(e,"WPDesktop")?"Internet Explorer Mobile":u.includes(e,"SamsungBrowser/")?"Samsung Internet":u.includes(e,"Edge")||u.includes(e,"Edg/")?"Microsoft Edge":u.includes(e,"FBIOS")?"Facebook Mobile":u.includes(e,"Whale/")?"Whale Browser":u.includes(e,"Chrome")?"Chrome":u.includes(e,"CriOS")?"Chrome iOS":u.includes(e,"UCWEB")||u.includes(e,"UCBrowser")?"UC Browser":u.includes(e,"FxiOS")?"Firefox iOS":u.includes(r,"Apple")?u.includes(e,"Mobile")?"Mobile Safari":"Safari":u.includes(e,"Android")?"Android Mobile":u.includes(e,"Konqueror")?"Konqueror":u.includes(e,"Firefox")?"Firefox":u.includes(e,"MSIE")||u.includes(e,"Trident/")?"Internet Explorer":u.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,r,o){var n=u.info.browser(e,r,o),f={"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+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/},t=f[n];if(t===void 0)return null;var i=e.match(t);return i?parseFloat(i[i.length-2]):null},os:function(){var e=P;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var r=e.split("/");return r.length>=3?r[2]:""},currentUrl:function(){return v.location.href},properties:function(e){return typeof e!="object"&&(e={}),u.extend(u.strip_empty_properties({$os:u.info.os(),$browser:u.info.browser(P,I.vendor,D),$referrer:A.referrer,$referring_domain:u.info.referringDomain(A.referrer),$device:u.info.device(P)}),{$current_url:u.info.currentUrl(),$browser_version:u.info.browserVersion(P,I.vendor,D),$screen_height:ne.height,$screen_width:ne.width,mp_lib:"web",$lib_version:de.LIB_VERSION,$insert_id:se(),time:u.timestamp()/1e3},u.strip_empty_properties(e))},people_properties:function(){return u.extend(u.strip_empty_properties({$os:u.info.os(),$browser:u.info.browser(P,I.vendor,D)}),{$browser_version:u.info.browserVersion(P,I.vendor,D)})},mpPageViewProperties:function(){return u.strip_empty_properties({current_page_title:A.title,current_domain:v.location.hostname,current_url_path:v.location.pathname,current_url_protocol:v.location.protocol,current_url_search:v.location.search})}};var se=function(e){var r=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?r.substring(0,e):r},Ce=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,Be=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,le=function(e){var r=Be,o=e.split("."),n=o[o.length-1];(n.length>4||n==="com"||n==="org")&&(r=Ce);var f=e.match(r);return f?f[0]:""},z=null,G=null;typeof JSON!="undefined"&&(z=JSON.stringify,G=JSON.parse),z=z||u.JSONEncode,G=G||u.JSONDecode,u.info=u.info,u.info.browser=u.info.browser,u.info.browserVersion=u.info.browserVersion,u.info.device=u.info.device,u.info.properties=u.info.properties,u.isBlockedUA=u.isBlockedUA,u.isEmptyObject=u.isEmptyObject,u.isObject=u.isObject,u.JSONDecode=u.JSONDecode,u.JSONEncode=u.JSONEncode,u.toArray=u.toArray,u.NPO=b;function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var U={exports:{}},Ne=U.exports,pe;function Te(){return pe||(pe=1,(function(e,r){(function(o,n){e.exports=n()})(Ne,function(){Array.isArray||(Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"});function o(t){for(var i=[],c=0,a=t.length;c<a;c++)i.indexOf(t[c])===-1&&i.push(t[c]);return i}var n={},f={"==":function(t,i){return t==i},"===":function(t,i){return t===i},"!=":function(t,i){return t!=i},"!==":function(t,i){return t!==i},">":function(t,i){return t>i},">=":function(t,i){return t>=i},"<":function(t,i,c){return c===void 0?t<i:t<i&&i<c},"<=":function(t,i,c){return c===void 0?t<=i:t<=i&&i<=c},"!!":function(t){return n.truthy(t)},"!":function(t){return!n.truthy(t)},"%":function(t,i){return t%i},log:function(t){return console.log(t),t},in:function(t,i){return!i||typeof i.indexOf=="undefined"?!1:i.indexOf(t)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(t,i,c){if(c<0){var a=String(t).substr(i);return a.substr(0,a.length+c)}return String(t).substr(i,c)},"+":function(){return Array.prototype.reduce.call(arguments,function(t,i){return parseFloat(t,10)+parseFloat(i,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(t,i){return parseFloat(t,10)*parseFloat(i,10)})},"-":function(t,i){return i===void 0?-t:t-i},"/":function(t,i){return t/i},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(t,i){return t.concat(i)},[])},var:function(t,i){var c=i===void 0?null:i,a=this;if(typeof t=="undefined"||t===""||t===null)return a;for(var s=String(t).split("."),d=0;d<s.length;d++)if(a==null||(a=a[s[d]],a===void 0))return c;return a},missing:function(){for(var t=[],i=Array.isArray(arguments[0])?arguments[0]:arguments,c=0;c<i.length;c++){var a=i[c],s=n.apply({var:a},this);(s===null||s==="")&&t.push(a)}return t},missing_some:function(t,i){var c=n.apply({missing:i},this);return i.length-c.length>=t?[]:c}};return n.is_logic=function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length===1},n.truthy=function(t){return Array.isArray(t)&&t.length===0?!1:!!t},n.get_operator=function(t){return Object.keys(t)[0]},n.get_values=function(t){return t[n.get_operator(t)]},n.apply=function(t,i){if(Array.isArray(t))return t.map(function(y){return n.apply(y,i)});if(!n.is_logic(t))return t;var c=n.get_operator(t),a=t[c],s,d,g,l,h;if(Array.isArray(a)||(a=[a]),c==="if"||c=="?:"){for(s=0;s<a.length-1;s+=2)if(n.truthy(n.apply(a[s],i)))return n.apply(a[s+1],i);return a.length===s+1?n.apply(a[s],i):null}else if(c==="and"){for(s=0;s<a.length;s+=1)if(d=n.apply(a[s],i),!n.truthy(d))return d;return d}else if(c==="or"){for(s=0;s<a.length;s+=1)if(d=n.apply(a[s],i),n.truthy(d))return d;return d}else{if(c==="filter")return l=n.apply(a[0],i),g=a[1],Array.isArray(l)?l.filter(function(y){return n.truthy(n.apply(g,y))}):[];if(c==="map")return l=n.apply(a[0],i),g=a[1],Array.isArray(l)?l.map(function(y){return n.apply(g,y)}):[];if(c==="reduce")return l=n.apply(a[0],i),g=a[1],h=typeof a[2]!="undefined"?n.apply(a[2],i):null,Array.isArray(l)?l.reduce(function(y,K){return n.apply(g,{current:K,accumulator:y})},h):h;if(c==="all"){if(l=n.apply(a[0],i),g=a[1],!Array.isArray(l)||!l.length)return!1;for(s=0;s<l.length;s+=1)if(!n.truthy(n.apply(g,l[s])))return!1;return!0}else if(c==="none"){if(l=n.apply(a[0],i),g=a[1],!Array.isArray(l)||!l.length)return!0;for(s=0;s<l.length;s+=1)if(n.truthy(n.apply(g,l[s])))return!1;return!0}else if(c==="some"){if(l=n.apply(a[0],i),g=a[1],!Array.isArray(l)||!l.length)return!1;for(s=0;s<l.length;s+=1)if(n.truthy(n.apply(g,l[s])))return!0;return!1}}if(a=a.map(function(y){return n.apply(y,i)}),f.hasOwnProperty(c)&&typeof f[c]=="function")return f[c].apply(i,a);if(c.indexOf(".")>0){var p=String(c).split("."),m=f;for(s=0;s<p.length;s++){if(!m.hasOwnProperty(p[s]))throw new Error("Unrecognized operation "+c+" (failed at "+p.slice(0,s+1).join(".")+")");m=m[p[s]]}return m.apply(i,a)}throw new Error("Unrecognized operation "+c)},n.uses_data=function(t){var i=[];if(n.is_logic(t)){var c=n.get_operator(t),a=t[c];Array.isArray(a)||(a=[a]),c==="var"?i.push(a[0]):a.forEach(function(s){i.push.apply(i,n.uses_data(s))})}return o(i)},n.add_operation=function(t,i){f[t]=i},n.rm_operation=function(t){delete f[t]},n.rule_like=function(t,i){if(i===t||i==="@")return!0;if(i==="number")return typeof t=="number";if(i==="string")return typeof t=="string";if(i==="array")return Array.isArray(t)&&!n.is_logic(t);if(n.is_logic(i)){if(n.is_logic(t)){var c=n.get_operator(i),a=n.get_operator(t);if(c==="@"||c===a)return n.rule_like(n.get_values(t,!1),n.get_values(i,!1))}return!1}if(Array.isArray(i))if(Array.isArray(t)){if(i.length!==t.length)return!1;for(var s=0;s<i.length;s+=1)if(!n.rule_like(t[s],i[s]))return!1;return!0}else return!1;return!1},n})})(U)),U.exports}var ke=Te(),Me=Ie(ke),De=function(e,r,o){if(e!==o.event_name)return{matches:!1};var n=o.property_filters,f=!0;if(n&&!u.isEmptyObject(n))try{f=Me.apply(n,r||{})}catch(t){return{matches:!1,error:t.toString()}}return{matches:f}},he={};he.eventMatchesCriteria=De,v[ge]=Promise.resolve(he)})(); | ||
| (function(){"use strict";var v;if(typeof window=="undefined"){var H={hostname:""};v={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:H,referrer:""},screen:{width:0,height:0},location:H,addEventListener:function(){},removeEventListener:function(){},dispatchEvent:function(){},CustomEvent:function(){}}}else v=window;var de={LIB_VERSION:"2.82.0"},ge="__mp_targeting",q=v.setImmediate,S,$,F,V=Object.prototype.toString,ye=typeof q!="undefined"?function(r){return q(r)}:setTimeout;try{Object.defineProperty({},"x",{}),S=function(r,o,n,f){return Object.defineProperty(r,o,{value:n,writable:!0,configurable:f!==!1})}}catch(e){S=function(o,n,f){return o[n]=f,o}}F=(function(){var r,o,n;function f(t,i){this.fn=t,this.self=i,this.next=void 0}return{add:function(i,c){n=new f(i,c),o?o.next=n:r=n,o=n,n=void 0},drain:function(){var i=r;for(r=o=$=void 0;i;)i.fn.call(i.self),i=i.next}}})();function T(e,r){F.add(e,r),$||($=ye(F.drain))}function X(e){var r,o=typeof e;return e!==null&&(o==="object"||o==="function")&&(r=e.then),typeof r=="function"?r:!1}function j(){for(var e=0;e<this.chain.length;e++)ve(this,this.state===1?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function ve(e,r,o){var n,f;try{r===!1?o.reject(e.msg):(r===!0?n=e.msg:n=r.call(void 0,e.msg),n===o.promise?o.reject(TypeError("Promise-chain cycle")):(f=X(n))?f.call(n,o.resolve,o.reject):o.resolve(n))}catch(t){o.reject(t)}}function Y(e){var r,o=this;if(!o.triggered){o.triggered=!0,o.def&&(o=o.def);try{(r=X(e))?T(function(){var n=new ee(o);try{r.call(e,function(){Y.apply(n,arguments)},function(){C.apply(n,arguments)})}catch(f){C.call(n,f)}}):(o.msg=e,o.state=1,o.chain.length>0&&T(j,o))}catch(n){C.call(new ee(o),n)}}}function C(e){var r=this;r.triggered||(r.triggered=!0,r.def&&(r=r.def),r.msg=e,r.state=2,r.chain.length>0&&T(j,r))}function Z(e,r,o,n){for(var f=0;f<r.length;f++)(function(i){e.resolve(r[i]).then(function(a){o(i,a)},n)})(f)}function ee(e){this.def=e,this.triggered=!1}function me(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function b(e){if(typeof e!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var r=new me(this);this.then=function(n,f){var t={success:typeof n=="function"?n:!0,failure:typeof f=="function"?f:!1};return t.promise=new this.constructor(function(c,a){if(typeof c!="function"||typeof a!="function")throw TypeError("Not a function");t.resolve=c,t.reject=a}),r.chain.push(t),r.state!==0&&T(j,r),t.promise},this.catch=function(n){return this.then(void 0,n)};try{e.call(void 0,function(n){Y.call(r,n)},function(n){C.call(r,n)})}catch(o){C.call(r,o)}}var re=S({},"constructor",b,!1);b.prototype=re,S(re,"__NPO__",0,!1),S(b,"resolve",function(r){var o=this;return r&&typeof r=="object"&&r.__NPO__===1?r:new o(function(f,t){if(typeof f!="function"||typeof t!="function")throw TypeError("Not a function");f(r)})}),S(b,"reject",function(r){return new this(function(n,f){if(typeof n!="function"||typeof f!="function")throw TypeError("Not a function");f(r)})}),S(b,"all",function(r){var o=this;return V.call(r)!=="[object Array]"?o.reject(TypeError("Not an array")):r.length===0?o.resolve([]):new o(function(f,t){if(typeof f!="function"||typeof t!="function")throw TypeError("Not a function");var i=r.length,c=Array(i),a=0;Z(o,r,function(d,g){c[d]=g,++a===i&&f(c)},t)})}),S(b,"race",function(r){var o=this;return V.call(r)!=="[object Array]"?o.reject(TypeError("Not an array")):new o(function(f,t){if(typeof f!="function"||typeof t!="function")throw TypeError("Not a function");Z(o,r,function(c,a){f(a)},t)})}),typeof Promise!="undefined"&&Promise.toString().indexOf("[native code]");var k=Array.prototype,we=Function.prototype,te=Object.prototype,E=k.slice,B=te.toString,M=te.hasOwnProperty;v.console;var I=v.navigator,A=v.document,D=v.opera,ne=v.screen,P=I.userAgent,R=we.bind,ie=k.forEach,oe=k.indexOf,ue=k.map,Ae=Array.isArray,L={},u={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}};u.bind=function(e,r){var o,n;if(R&&e.bind===R)return R.apply(e,E.call(arguments,1));if(!u.isFunction(e))throw new TypeError;return o=E.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(r,o.concat(E.call(arguments)));var f={};f.prototype=e.prototype;var t=new f;f.prototype=null;var i=e.apply(t,o.concat(E.call(arguments)));return Object(i)===i?i:t},n},u.each=function(e,r,o){if(e!=null){if(ie&&e.forEach===ie)e.forEach(r,o);else if(e.length===+e.length){for(var n=0,f=e.length;n<f;n++)if(n in e&&r.call(o,e[n],n,e)===L)return}else for(var t in e)if(M.call(e,t)&&r.call(o,e[t],t,e)===L)return}},u.extend=function(e){return u.each(E.call(arguments,1),function(r){for(var o in r)r[o]!==void 0&&(e[o]=r[o])}),e},u.isArray=Ae||function(e){return B.call(e)==="[object Array]"},u.isFunction=function(e){return typeof e=="function"},u.isArguments=function(e){return!!(e&&M.call(e,"callee"))},u.toArray=function(e){return e?e.toArray?e.toArray():u.isArray(e)||u.isArguments(e)?E.call(e):u.values(e):[]},u.map=function(e,r,o){if(ue&&e.map===ue)return e.map(r,o);var n=[];return u.each(e,function(f){n.push(r.call(o,f))}),n},u.keys=function(e){var r=[];return e===null||u.each(e,function(o,n){r[r.length]=n}),r},u.values=function(e){var r=[];return e===null||u.each(e,function(o){r[r.length]=o}),r},u.include=function(e,r){var o=!1;return e===null?o:oe&&e.indexOf===oe?e.indexOf(r)!=-1:(u.each(e,function(n){if(o||(o=n===r))return L}),o)},u.includes=function(e,r){return e.indexOf(r)!==-1},u.inherit=function(e,r){return e.prototype=new r,e.prototype.constructor=e,e.superclass=r.prototype,e},u.isObject=function(e){return e===Object(e)&&!u.isArray(e)},u.isEmptyObject=function(e){if(u.isObject(e)){for(var r in e)if(M.call(e,r))return!1;return!0}return!1},u.isUndefined=function(e){return e===void 0},u.isString=function(e){return B.call(e)=="[object String]"},u.isDate=function(e){return B.call(e)=="[object Date]"},u.isNumber=function(e){return B.call(e)=="[object Number]"},u.isElement=function(e){return!!(e&&e.nodeType===1)},u.encodeDates=function(e){return u.each(e,function(r,o){u.isDate(r)?e[o]=u.formatDate(r):u.isObject(r)&&(e[o]=u.encodeDates(r))}),e},u.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},u.formatDate=function(e){function r(o){return o<10?"0"+o:o}return e.getUTCFullYear()+"-"+r(e.getUTCMonth()+1)+"-"+r(e.getUTCDate())+"T"+r(e.getUTCHours())+":"+r(e.getUTCMinutes())+":"+r(e.getUTCSeconds())},u.strip_empty_properties=function(e){var r={};return u.each(e,function(o,n){u.isString(o)&&o.length>0&&(r[n]=o)}),r},u.truncate=function(e,r){var o;return typeof e=="string"?o=e.slice(0,r):u.isArray(e)?(o=[],u.each(e,function(n){o.push(u.truncate(n,r))})):u.isObject(e)?(o={},u.each(e,function(n,f){o[f]=u.truncate(n,r)})):o=e,o},u.JSONEncode=(function(){return function(e){var r=e,o=function(f){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(f)?'"'+f.replace(t,function(c){var a=i[c];return typeof a=="string"?a:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'},n=function(f,t){var i="",c=" ",a=0,s="",d="",g=0,l=i,h=[],p=t[f];switch(p&&typeof p=="object"&&typeof p.toJSON=="function"&&(p=p.toJSON(f)),typeof p){case"string":return o(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(i+=c,h=[],B.apply(p)==="[object Array]"){for(g=p.length,a=0;a<g;a+=1)h[a]=n(a,p)||"null";return d=h.length===0?"[]":i?"[\n"+i+h.join(",\n"+i)+"\n"+l+"]":"["+h.join(",")+"]",i=l,d}for(s in p)M.call(p,s)&&(d=n(s,p),d&&h.push(o(s)+(i?": ":":")+d));return d=h.length===0?"{}":i?"{"+h.join(",")+l+"}":"{"+h.join(",")+"}",i=l,d}};return n("",{"":r})}})(),u.JSONDecode=(function(){var e,r,o={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},n,f=function(h){var p=new SyntaxError(h);throw p.at=e,p.text=n,p},t=function(h){return h&&h!==r&&f("Expected '"+h+"' instead of '"+r+"'"),r=n.charAt(e),e+=1,r},i=function(){var h,p="";for(r==="-"&&(p="-",t("-"));r>="0"&&r<="9";)p+=r,t();if(r===".")for(p+=".";t()&&r>="0"&&r<="9";)p+=r;if(r==="e"||r==="E")for(p+=r,t(),(r==="-"||r==="+")&&(p+=r,t());r>="0"&&r<="9";)p+=r,t();if(h=+p,!isFinite(h))f("Bad number");else return h},c=function(){var h,p,m="",y;if(r==='"')for(;t();){if(r==='"')return t(),m;if(r==="\\")if(t(),r==="u"){for(y=0,p=0;p<4&&(h=parseInt(t(),16),!!isFinite(h));p+=1)y=y*16+h;m+=String.fromCharCode(y)}else if(typeof o[r]=="string")m+=o[r];else break;else m+=r}f("Bad string")},a=function(){for(;r&&r<=" ";)t()},s=function(){switch(r){case"t":return t("t"),t("r"),t("u"),t("e"),!0;case"f":return t("f"),t("a"),t("l"),t("s"),t("e"),!1;case"n":return t("n"),t("u"),t("l"),t("l"),null}f('Unexpected "'+r+'"')},d,g=function(){var h=[];if(r==="["){if(t("["),a(),r==="]")return t("]"),h;for(;r;){if(h.push(d()),a(),r==="]")return t("]"),h;t(","),a()}}f("Bad array")},l=function(){var h,p={};if(r==="{"){if(t("{"),a(),r==="}")return t("}"),p;for(;r;){if(h=c(),a(),t(":"),Object.hasOwnProperty.call(p,h)&&f('Duplicate key "'+h+'"'),p[h]=d(),a(),r==="}")return t("}"),p;t(","),a()}}f("Bad object")};return d=function(){switch(a(),r){case"{":return l();case"[":return g();case'"':return c();case"-":return i();default:return r>="0"&&r<="9"?i():s()}},function(h){var p;return n=h,e=0,r=" ",p=d(),a(),r&&f("Syntax error"),p}})(),u.base64Encode=function(e){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o,n,f,t,i,c,a,s,d=0,g=0,l="",h=[];if(!e)return e;e=u.utf8Encode(e);do o=e.charCodeAt(d++),n=e.charCodeAt(d++),f=e.charCodeAt(d++),s=o<<16|n<<8|f,t=s>>18&63,i=s>>12&63,c=s>>6&63,a=s&63,h[g++]=r.charAt(t)+r.charAt(i)+r.charAt(c)+r.charAt(a);while(d<e.length);switch(l=h.join(""),e.length%3){case 1:l=l.slice(0,-2)+"==";break;case 2:l=l.slice(0,-1)+"=";break}return l},u.utf8Encode=function(e){e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n");var r="",o,n,f=0,t;for(o=n=0,f=e.length,t=0;t<f;t++){var i=e.charCodeAt(t),c=null;i<128?n++:i>127&&i<2048?c=String.fromCharCode(i>>6|192,i&63|128):c=String.fromCharCode(i>>12|224,i>>6&63|128,i&63|128),c!==null&&(n>o&&(r+=e.substring(o,n)),r+=c,o=n=t+1)}return n>o&&(r+=e.substring(o,e.length)),r},u.UUID=function(){try{return v.crypto.randomUUID()}catch(o){for(var e=new Array(36),r=0;r<36;r++)e[r]=Math.floor(Math.random()*16);return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]="-",u.map(e,function(n){return n.toString(16)}).join("")}};var fe=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];u.isBlockedUA=function(e){var r;for(e=e.toLowerCase(),r=0;r<fe.length;r++)if(e.indexOf(fe[r])!==-1)return!0;return!1},u.HTTPBuildQuery=function(e,r){var o,n,f=[];return u.isUndefined(r)&&(r="&"),u.each(e,function(t,i){o=encodeURIComponent(t.toString()),n=encodeURIComponent(i),f[f.length]=n+"="+o}),f.join(r)},u.getQueryParam=function(e,r){r=r.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var o="[\\?&]"+r+"=([^&#]*)",n=new RegExp(o),f=n.exec(e);if(f===null||f&&typeof f[1]!="string"&&f[1].length)return"";var t=f[1];try{t=decodeURIComponent(t)}catch(i){}return t.replace(/\+/g," ")},u.cookie={get:function(e){for(var r=e+"=",o=A.cookie.split(";"),n=0;n<o.length;n++){for(var f=o[n];f.charAt(0)==" ";)f=f.substring(1,f.length);if(f.indexOf(r)===0)return decodeURIComponent(f.substring(r.length,f.length))}return null},parse:function(e){var r;try{r=u.JSONDecode(u.cookie.get(e))||{}}catch(o){}return r},set_seconds:function(e,r,o,n,f,t,i){var c="",a="",s="";if(i)c="; domain="+i;else if(n){var d=le(A.location.hostname);c=d?"; domain=."+d:""}if(o){var g=new Date;g.setTime(g.getTime()+o*1e3),a="; expires="+g.toGMTString()}t&&(f=!0,s="; SameSite=None"),f&&(s+="; secure"),A.cookie=e+"="+encodeURIComponent(r)+a+"; path=/"+c+s},set:function(e,r,o,n,f,t,i){var c="",a="",s="";if(i)c="; domain="+i;else if(n){var d=le(A.location.hostname);c=d?"; domain=."+d:""}if(o){var g=new Date;g.setTime(g.getTime()+o*24*60*60*1e3),a="; expires="+g.toGMTString()}t&&(f=!0,s="; SameSite=None"),f&&(s+="; secure");var l=e+"="+encodeURIComponent(r)+a+"; path=/"+c+s;return A.cookie=l,l},remove:function(e,r,o){u.cookie.set(e,"",-1,r,!1,!1,o)}};var ae=function(e){var r=!0;try{var o="__mplss_"+se(8),n="xyz";e.setItem(o,n),e.getItem(o)!==n&&(r=!1),e.removeItem(o)}catch(f){r=!1}return r},W=null,Se=function(e,r){return W!==null&&!r?W:W=ae(e)},J=null,_e=function(e,r){return J!==null&&!r?J:J=ae(e)};function ce(e,r,o){var n=function(f){};return{is_supported:function(f){var t=o(e,f);return t},error:n,get:function(f){try{return e.getItem(f)}catch(t){}return null},parse:function(f){try{return u.JSONDecode(e.getItem(f))||{}}catch(t){}return null},set:function(f,t){try{e.setItem(f,t)}catch(i){}},remove:function(f){try{e.removeItem(f)}catch(t){}}}}var Oe=function(){try{return v.localStorage}catch(e){return null}},be=function(){try{return v.sessionStorage}catch(e){return null}};u.localStorage=ce(Oe(),"localStorage",Se),u.sessionStorage=ce(be(),"sessionStorage",_e),u.register_event=(function(){var e=function(n,f,t,i,c){if(n)if(n.addEventListener&&!i)n.addEventListener(f,t,!!c);else{var a="on"+f,s=n[a];n[a]=r(n,t,s)}};function r(n,f,t){var i=function(c){if(c=c||o(v.event),!!c){var a=!0,s,d;return u.isFunction(t)&&(s=t(c)),d=f.call(n,c),(s===!1||d===!1)&&(a=!1),a}};return i}function o(n){return n&&(n.preventDefault=o.preventDefault,n.stopPropagation=o.stopPropagation),n}return o.preventDefault=function(){this.returnValue=!1},o.stopPropagation=function(){this.cancelBubble=!0},e})();var Ee=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');u.dom_query=(function(){function e(f){return f.all?f.all:f.getElementsByTagName("*")}var r=/[\t\r\n]/g;function o(f,t){var i=" "+t+" ";return(" "+f.className+" ").replace(r," ").indexOf(i)>=0}function n(f){if(!A.getElementsByTagName)return[];var t=f.split(" "),i,c,a,s,d,g,l,h,p,m,y=[A];for(g=0;g<t.length;g++){if(i=t[g].replace(/^\s+/,"").replace(/\s+$/,""),i.indexOf("#")>-1){c=i.split("#"),a=c[0];var K=c[1],Q=A.getElementById(K);if(!Q||a&&Q.nodeName.toLowerCase()!=a)return[];y=[Q];continue}if(i.indexOf(".")>-1){c=i.split("."),a=c[0];var Ue=c[1];for(a||(a="*"),s=[],d=0,l=0;l<y.length;l++)for(a=="*"?p=e(y[l]):p=y[l].getElementsByTagName(a),h=0;h<p.length;h++)s[d++]=p[h];for(y=[],m=0,l=0;l<s.length;l++)s[l].className&&u.isString(s[l].className)&&o(s[l],Ue)&&(y[m++]=s[l]);continue}var N=i.match(Ee);if(N){a=N[1];var _=N[2],$e=N[3],x=N[4];for(a||(a="*"),s=[],d=0,l=0;l<y.length;l++)for(a=="*"?p=e(y[l]):p=y[l].getElementsByTagName(a),h=0;h<p.length;h++)s[d++]=p[h];y=[],m=0;var O;switch($e){case"=":O=function(w){return w.getAttribute(_)==x};break;case"~":O=function(w){return w.getAttribute(_).match(new RegExp("\\b"+x+"\\b"))};break;case"|":O=function(w){return w.getAttribute(_).match(new RegExp("^"+x+"-?"))};break;case"^":O=function(w){return w.getAttribute(_).indexOf(x)===0};break;case"$":O=function(w){return w.getAttribute(_).lastIndexOf(x)==w.getAttribute(_).length-x.length};break;case"*":O=function(w){return w.getAttribute(_).indexOf(x)>-1};break;default:O=function(w){return w.getAttribute(_)}}for(y=[],m=0,l=0;l<s.length;l++)O(s[l])&&(y[m++]=s[l]);continue}for(a=i,s=[],d=0,l=0;l<y.length;l++)for(p=y[l].getElementsByTagName(a),h=0;h<p.length;h++)s[d++]=p[h];y=s}return y}return function(f){return u.isElement(f)?[f]:u.isObject(f)&&!u.isUndefined(f.length)?f:n.call(this,f)}})();var xe=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],Pe=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];u.info={campaignParams:function(e){var r="",o={};return u.each(xe,function(n){r=u.getQueryParam(A.URL,n),r.length?o[n]=r:e!==void 0&&(o[n]=e)}),o},clickParams:function(){var e="",r={};return u.each(Pe,function(o){e=u.getQueryParam(A.URL,o),e.length&&(r[o]=e)}),r},marketingParams:function(){return u.extend(u.info.campaignParams(),u.info.clickParams())},searchEngine:function(e){return e.search("https?://(.*)google.([^/?]*)")===0?"google":e.search("https?://(.*)bing.com")===0?"bing":e.search("https?://(.*)yahoo.com")===0?"yahoo":e.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(e){var r=u.info.searchEngine(e),o=r!="yahoo"?"q":"p",n={};if(r!==null){n.$search_engine=r;var f=u.getQueryParam(e,o);f.length&&(n.mp_keyword=f)}return n},browser:function(e,r,o){return r=r||"",o||u.includes(e," OPR/")?u.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":u.includes(e,"IEMobile")||u.includes(e,"WPDesktop")?"Internet Explorer Mobile":u.includes(e,"SamsungBrowser/")?"Samsung Internet":u.includes(e,"Edge")||u.includes(e,"Edg/")?"Microsoft Edge":u.includes(e,"FBIOS")?"Facebook Mobile":u.includes(e,"Whale/")?"Whale Browser":u.includes(e,"Chrome")?"Chrome":u.includes(e,"CriOS")?"Chrome iOS":u.includes(e,"UCWEB")||u.includes(e,"UCBrowser")?"UC Browser":u.includes(e,"FxiOS")?"Firefox iOS":u.includes(r,"Apple")?u.includes(e,"Mobile")?"Mobile Safari":"Safari":u.includes(e,"Android")?"Android Mobile":u.includes(e,"Konqueror")?"Konqueror":u.includes(e,"Firefox")?"Firefox":u.includes(e,"MSIE")||u.includes(e,"Trident/")?"Internet Explorer":u.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,r,o){var n=u.info.browser(e,r,o),f={"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+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/},t=f[n];if(t===void 0)return null;var i=e.match(t);return i?parseFloat(i[i.length-2]):null},os:function(){var e=P;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var r=e.split("/");return r.length>=3?r[2]:""},currentUrl:function(){return v.location.href},properties:function(e){return typeof e!="object"&&(e={}),u.extend(u.strip_empty_properties({$os:u.info.os(),$browser:u.info.browser(P,I.vendor,D),$referrer:A.referrer,$referring_domain:u.info.referringDomain(A.referrer),$device:u.info.device(P)}),{$current_url:u.info.currentUrl(),$browser_version:u.info.browserVersion(P,I.vendor,D),$screen_height:ne.height,$screen_width:ne.width,mp_lib:"web",$lib_version:de.LIB_VERSION,$insert_id:se(),time:u.timestamp()/1e3},u.strip_empty_properties(e))},people_properties:function(){return u.extend(u.strip_empty_properties({$os:u.info.os(),$browser:u.info.browser(P,I.vendor,D)}),{$browser_version:u.info.browserVersion(P,I.vendor,D)})},mpPageViewProperties:function(){return u.strip_empty_properties({current_page_title:A.title,current_domain:v.location.hostname,current_url_path:v.location.pathname,current_url_protocol:v.location.protocol,current_url_search:v.location.search})}};var se=function(e){var r=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?r.substring(0,e):r},Ce=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,Be=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,le=function(e){var r=Be,o=e.split("."),n=o[o.length-1];(n.length>4||n==="com"||n==="org")&&(r=Ce);var f=e.match(r);return f?f[0]:""},z=null,G=null;typeof JSON!="undefined"&&(z=JSON.stringify,G=JSON.parse),z=z||u.JSONEncode,G=G||u.JSONDecode,u.info=u.info,u.info.browser=u.info.browser,u.info.browserVersion=u.info.browserVersion,u.info.device=u.info.device,u.info.properties=u.info.properties,u.isBlockedUA=u.isBlockedUA,u.isEmptyObject=u.isEmptyObject,u.isObject=u.isObject,u.JSONDecode=u.JSONDecode,u.JSONEncode=u.JSONEncode,u.toArray=u.toArray,u.NPO=b;function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var U={exports:{}},Ne=U.exports,pe;function Te(){return pe||(pe=1,(function(e,r){(function(o,n){e.exports=n()})(Ne,function(){Array.isArray||(Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"});function o(t){for(var i=[],c=0,a=t.length;c<a;c++)i.indexOf(t[c])===-1&&i.push(t[c]);return i}var n={},f={"==":function(t,i){return t==i},"===":function(t,i){return t===i},"!=":function(t,i){return t!=i},"!==":function(t,i){return t!==i},">":function(t,i){return t>i},">=":function(t,i){return t>=i},"<":function(t,i,c){return c===void 0?t<i:t<i&&i<c},"<=":function(t,i,c){return c===void 0?t<=i:t<=i&&i<=c},"!!":function(t){return n.truthy(t)},"!":function(t){return!n.truthy(t)},"%":function(t,i){return t%i},log:function(t){return console.log(t),t},in:function(t,i){return!i||typeof i.indexOf=="undefined"?!1:i.indexOf(t)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(t,i,c){if(c<0){var a=String(t).substr(i);return a.substr(0,a.length+c)}return String(t).substr(i,c)},"+":function(){return Array.prototype.reduce.call(arguments,function(t,i){return parseFloat(t,10)+parseFloat(i,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(t,i){return parseFloat(t,10)*parseFloat(i,10)})},"-":function(t,i){return i===void 0?-t:t-i},"/":function(t,i){return t/i},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(t,i){return t.concat(i)},[])},var:function(t,i){var c=i===void 0?null:i,a=this;if(typeof t=="undefined"||t===""||t===null)return a;for(var s=String(t).split("."),d=0;d<s.length;d++)if(a==null||(a=a[s[d]],a===void 0))return c;return a},missing:function(){for(var t=[],i=Array.isArray(arguments[0])?arguments[0]:arguments,c=0;c<i.length;c++){var a=i[c],s=n.apply({var:a},this);(s===null||s==="")&&t.push(a)}return t},missing_some:function(t,i){var c=n.apply({missing:i},this);return i.length-c.length>=t?[]:c}};return n.is_logic=function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length===1},n.truthy=function(t){return Array.isArray(t)&&t.length===0?!1:!!t},n.get_operator=function(t){return Object.keys(t)[0]},n.get_values=function(t){return t[n.get_operator(t)]},n.apply=function(t,i){if(Array.isArray(t))return t.map(function(y){return n.apply(y,i)});if(!n.is_logic(t))return t;var c=n.get_operator(t),a=t[c],s,d,g,l,h;if(Array.isArray(a)||(a=[a]),c==="if"||c=="?:"){for(s=0;s<a.length-1;s+=2)if(n.truthy(n.apply(a[s],i)))return n.apply(a[s+1],i);return a.length===s+1?n.apply(a[s],i):null}else if(c==="and"){for(s=0;s<a.length;s+=1)if(d=n.apply(a[s],i),!n.truthy(d))return d;return d}else if(c==="or"){for(s=0;s<a.length;s+=1)if(d=n.apply(a[s],i),n.truthy(d))return d;return d}else{if(c==="filter")return l=n.apply(a[0],i),g=a[1],Array.isArray(l)?l.filter(function(y){return n.truthy(n.apply(g,y))}):[];if(c==="map")return l=n.apply(a[0],i),g=a[1],Array.isArray(l)?l.map(function(y){return n.apply(g,y)}):[];if(c==="reduce")return l=n.apply(a[0],i),g=a[1],h=typeof a[2]!="undefined"?n.apply(a[2],i):null,Array.isArray(l)?l.reduce(function(y,K){return n.apply(g,{current:K,accumulator:y})},h):h;if(c==="all"){if(l=n.apply(a[0],i),g=a[1],!Array.isArray(l)||!l.length)return!1;for(s=0;s<l.length;s+=1)if(!n.truthy(n.apply(g,l[s])))return!1;return!0}else if(c==="none"){if(l=n.apply(a[0],i),g=a[1],!Array.isArray(l)||!l.length)return!0;for(s=0;s<l.length;s+=1)if(n.truthy(n.apply(g,l[s])))return!1;return!0}else if(c==="some"){if(l=n.apply(a[0],i),g=a[1],!Array.isArray(l)||!l.length)return!1;for(s=0;s<l.length;s+=1)if(n.truthy(n.apply(g,l[s])))return!0;return!1}}if(a=a.map(function(y){return n.apply(y,i)}),f.hasOwnProperty(c)&&typeof f[c]=="function")return f[c].apply(i,a);if(c.indexOf(".")>0){var p=String(c).split("."),m=f;for(s=0;s<p.length;s++){if(!m.hasOwnProperty(p[s]))throw new Error("Unrecognized operation "+c+" (failed at "+p.slice(0,s+1).join(".")+")");m=m[p[s]]}return m.apply(i,a)}throw new Error("Unrecognized operation "+c)},n.uses_data=function(t){var i=[];if(n.is_logic(t)){var c=n.get_operator(t),a=t[c];Array.isArray(a)||(a=[a]),c==="var"?i.push(a[0]):a.forEach(function(s){i.push.apply(i,n.uses_data(s))})}return o(i)},n.add_operation=function(t,i){f[t]=i},n.rm_operation=function(t){delete f[t]},n.rule_like=function(t,i){if(i===t||i==="@")return!0;if(i==="number")return typeof t=="number";if(i==="string")return typeof t=="string";if(i==="array")return Array.isArray(t)&&!n.is_logic(t);if(n.is_logic(i)){if(n.is_logic(t)){var c=n.get_operator(i),a=n.get_operator(t);if(c==="@"||c===a)return n.rule_like(n.get_values(t,!1),n.get_values(i,!1))}return!1}if(Array.isArray(i))if(Array.isArray(t)){if(i.length!==t.length)return!1;for(var s=0;s<i.length;s+=1)if(!n.rule_like(t[s],i[s]))return!1;return!0}else return!1;return!1},n})})(U)),U.exports}var ke=Te(),Me=Ie(ke),De=function(e,r,o){if(e!==o.event_name)return{matches:!1};var n=o.property_filters,f=!0;if(n&&!u.isEmptyObject(n))try{f=Me.apply(n,r||{})}catch(t){return{matches:!1,error:t.toString()}}return{matches:f}},he={};he.eventMatchesCriteria=De,v[ge]=Promise.resolve(he)})(); | ||
| //# sourceMappingURL=mixpanel-targeting.min.js.map |
@@ -385,2 +385,19 @@ import type { RulesLogic } from 'json-logic-js'; | ||
| /** | ||
| * Where a variant came from. Coarse-grained — see {@link FlagsFallbackReason} | ||
| * for the specific reason behind a fallback. | ||
| */ | ||
| export type FlagsVariantSource = 'network' | 'persistence' | 'fallback'; | ||
| /** | ||
| * Why the SDK returned the developer fallback. Only meaningful when | ||
| * `variant_source === 'fallback'`. Matches the constant set used by | ||
| * mixpanel-php so the OpenFeature wrapper can map each reason to the | ||
| * spec-correct error code. | ||
| */ | ||
| export type FlagsFallbackReason = | ||
| | 'FLAG_NOT_FOUND' | ||
| | 'NOT_READY' | ||
| | 'BACKEND_ERROR'; | ||
| export interface FlagsVariant { | ||
@@ -392,3 +409,5 @@ key: string; | ||
| is_qa_tester?: boolean; | ||
| variant_source?: string; | ||
| variant_source?: FlagsVariantSource; | ||
| /** Undefined on success; set when `variant_source === 'fallback'`. */ | ||
| fallback_reason?: FlagsFallbackReason; | ||
| persisted_at_in_ms?: number; | ||
@@ -395,0 +414,0 @@ } |
@@ -385,2 +385,19 @@ import type { RulesLogic } from 'json-logic-js'; | ||
| /** | ||
| * Where a variant came from. Coarse-grained — see {@link FlagsFallbackReason} | ||
| * for the specific reason behind a fallback. | ||
| */ | ||
| export type FlagsVariantSource = 'network' | 'persistence' | 'fallback'; | ||
| /** | ||
| * Why the SDK returned the developer fallback. Only meaningful when | ||
| * `variant_source === 'fallback'`. Matches the constant set used by | ||
| * mixpanel-php so the OpenFeature wrapper can map each reason to the | ||
| * spec-correct error code. | ||
| */ | ||
| export type FlagsFallbackReason = | ||
| | 'FLAG_NOT_FOUND' | ||
| | 'NOT_READY' | ||
| | 'BACKEND_ERROR'; | ||
| export interface FlagsVariant { | ||
@@ -392,3 +409,5 @@ key: string; | ||
| is_qa_tester?: boolean; | ||
| variant_source?: string; | ||
| variant_source?: FlagsVariantSource; | ||
| /** Undefined on success; set when `variant_source === 'fallback'`. */ | ||
| fallback_reason?: FlagsFallbackReason; | ||
| persisted_at_in_ms?: number; | ||
@@ -395,0 +414,0 @@ } |
@@ -385,2 +385,19 @@ import type { RulesLogic } from 'json-logic-js'; | ||
| /** | ||
| * Where a variant came from. Coarse-grained — see {@link FlagsFallbackReason} | ||
| * for the specific reason behind a fallback. | ||
| */ | ||
| export type FlagsVariantSource = 'network' | 'persistence' | 'fallback'; | ||
| /** | ||
| * Why the SDK returned the developer fallback. Only meaningful when | ||
| * `variant_source === 'fallback'`. Matches the constant set used by | ||
| * mixpanel-php so the OpenFeature wrapper can map each reason to the | ||
| * spec-correct error code. | ||
| */ | ||
| export type FlagsFallbackReason = | ||
| | 'FLAG_NOT_FOUND' | ||
| | 'NOT_READY' | ||
| | 'BACKEND_ERROR'; | ||
| export interface FlagsVariant { | ||
@@ -392,3 +409,5 @@ key: string; | ||
| is_qa_tester?: boolean; | ||
| variant_source?: string; | ||
| variant_source?: FlagsVariantSource; | ||
| /** Undefined on success; set when `variant_source === 'fallback'`. */ | ||
| fallback_reason?: FlagsFallbackReason; | ||
| persisted_at_in_ms?: number; | ||
@@ -395,0 +414,0 @@ } |
@@ -385,2 +385,19 @@ import type { RulesLogic } from 'json-logic-js'; | ||
| /** | ||
| * Where a variant came from. Coarse-grained — see {@link FlagsFallbackReason} | ||
| * for the specific reason behind a fallback. | ||
| */ | ||
| export type FlagsVariantSource = 'network' | 'persistence' | 'fallback'; | ||
| /** | ||
| * Why the SDK returned the developer fallback. Only meaningful when | ||
| * `variant_source === 'fallback'`. Matches the constant set used by | ||
| * mixpanel-php so the OpenFeature wrapper can map each reason to the | ||
| * spec-correct error code. | ||
| */ | ||
| export type FlagsFallbackReason = | ||
| | 'FLAG_NOT_FOUND' | ||
| | 'NOT_READY' | ||
| | 'BACKEND_ERROR'; | ||
| export interface FlagsVariant { | ||
@@ -392,3 +409,5 @@ key: string; | ||
| is_qa_tester?: boolean; | ||
| variant_source?: string; | ||
| variant_source?: FlagsVariantSource; | ||
| /** Undefined on success; set when `variant_source === 'fallback'`. */ | ||
| fallback_reason?: FlagsFallbackReason; | ||
| persisted_at_in_ms?: number; | ||
@@ -395,0 +414,0 @@ } |
@@ -385,2 +385,19 @@ import type { RulesLogic } from 'json-logic-js'; | ||
| /** | ||
| * Where a variant came from. Coarse-grained — see {@link FlagsFallbackReason} | ||
| * for the specific reason behind a fallback. | ||
| */ | ||
| export type FlagsVariantSource = 'network' | 'persistence' | 'fallback'; | ||
| /** | ||
| * Why the SDK returned the developer fallback. Only meaningful when | ||
| * `variant_source === 'fallback'`. Matches the constant set used by | ||
| * mixpanel-php so the OpenFeature wrapper can map each reason to the | ||
| * spec-correct error code. | ||
| */ | ||
| export type FlagsFallbackReason = | ||
| | 'FLAG_NOT_FOUND' | ||
| | 'NOT_READY' | ||
| | 'BACKEND_ERROR'; | ||
| export interface FlagsVariant { | ||
@@ -392,3 +409,5 @@ key: string; | ||
| is_qa_tester?: boolean; | ||
| variant_source?: string; | ||
| variant_source?: FlagsVariantSource; | ||
| /** Undefined on success; set when `variant_source === 'fallback'`. */ | ||
| fallback_reason?: FlagsFallbackReason; | ||
| persisted_at_in_ms?: number; | ||
@@ -395,0 +414,0 @@ } |
@@ -385,2 +385,19 @@ import type { RulesLogic } from 'json-logic-js'; | ||
| /** | ||
| * Where a variant came from. Coarse-grained — see {@link FlagsFallbackReason} | ||
| * for the specific reason behind a fallback. | ||
| */ | ||
| export type FlagsVariantSource = 'network' | 'persistence' | 'fallback'; | ||
| /** | ||
| * Why the SDK returned the developer fallback. Only meaningful when | ||
| * `variant_source === 'fallback'`. Matches the constant set used by | ||
| * mixpanel-php so the OpenFeature wrapper can map each reason to the | ||
| * spec-correct error code. | ||
| */ | ||
| export type FlagsFallbackReason = | ||
| | 'FLAG_NOT_FOUND' | ||
| | 'NOT_READY' | ||
| | 'BACKEND_ERROR'; | ||
| export interface FlagsVariant { | ||
@@ -392,3 +409,5 @@ key: string; | ||
| is_qa_tester?: boolean; | ||
| variant_source?: string; | ||
| variant_source?: FlagsVariantSource; | ||
| /** Undefined on success; set when `variant_source === 'fallback'`. */ | ||
| fallback_reason?: FlagsFallbackReason; | ||
| persisted_at_in_ms?: number; | ||
@@ -395,0 +414,0 @@ } |
@@ -385,2 +385,19 @@ import type { RulesLogic } from 'json-logic-js'; | ||
| /** | ||
| * Where a variant came from. Coarse-grained — see {@link FlagsFallbackReason} | ||
| * for the specific reason behind a fallback. | ||
| */ | ||
| export type FlagsVariantSource = 'network' | 'persistence' | 'fallback'; | ||
| /** | ||
| * Why the SDK returned the developer fallback. Only meaningful when | ||
| * `variant_source === 'fallback'`. Matches the constant set used by | ||
| * mixpanel-php so the OpenFeature wrapper can map each reason to the | ||
| * spec-correct error code. | ||
| */ | ||
| export type FlagsFallbackReason = | ||
| | 'FLAG_NOT_FOUND' | ||
| | 'NOT_READY' | ||
| | 'BACKEND_ERROR'; | ||
| export interface FlagsVariant { | ||
@@ -392,3 +409,5 @@ key: string; | ||
| is_qa_tester?: boolean; | ||
| variant_source?: string; | ||
| variant_source?: FlagsVariantSource; | ||
| /** Undefined on success; set when `variant_source === 'fallback'`. */ | ||
| fallback_reason?: FlagsFallbackReason; | ||
| persisted_at_in_ms?: number; | ||
@@ -395,0 +414,0 @@ } |
@@ -385,2 +385,19 @@ import type { RulesLogic } from 'json-logic-js'; | ||
| /** | ||
| * Where a variant came from. Coarse-grained — see {@link FlagsFallbackReason} | ||
| * for the specific reason behind a fallback. | ||
| */ | ||
| export type FlagsVariantSource = 'network' | 'persistence' | 'fallback'; | ||
| /** | ||
| * Why the SDK returned the developer fallback. Only meaningful when | ||
| * `variant_source === 'fallback'`. Matches the constant set used by | ||
| * mixpanel-php so the OpenFeature wrapper can map each reason to the | ||
| * spec-correct error code. | ||
| */ | ||
| export type FlagsFallbackReason = | ||
| | 'FLAG_NOT_FOUND' | ||
| | 'NOT_READY' | ||
| | 'BACKEND_ERROR'; | ||
| export interface FlagsVariant { | ||
@@ -392,3 +409,5 @@ key: string; | ||
| is_qa_tester?: boolean; | ||
| variant_source?: string; | ||
| variant_source?: FlagsVariantSource; | ||
| /** Undefined on success; set when `variant_source === 'fallback'`. */ | ||
| fallback_reason?: FlagsFallbackReason; | ||
| persisted_at_in_ms?: number; | ||
@@ -395,0 +414,0 @@ } |
+1
-1
| { | ||
| "name": "mixpanel-browser", | ||
| "version": "2.81.0", | ||
| "version": "2.82.0", | ||
| "description": "The official Mixpanel JavaScript browser client library", | ||
@@ -5,0 +5,0 @@ "main": "dist/mixpanel.cjs.js", |
| { | ||
| "name": "@mixpanel/openfeature-web-provider", | ||
| "version": "0.1.0", | ||
| "version": "0.2.0", | ||
| "description": "OpenFeature Web Provider for Mixpanel feature flags", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -288,3 +288,39 @@ import type { | ||
| // in src/flags/index.js), so a reference check against `fallbackVariant` never | ||
| // matches. Detect the fallback via the `variant_source` marker instead. | ||
| // matches. As of mixpanel-browser 2.81.0 the SDK also stamps a NEW | ||
| // `fallback_reason` field on the returned variant (SDK-79) so we can map | ||
| // each reason to the spec-correct OpenFeature response. `variant_source` | ||
| // stays as 'network' | 'persistence' | 'fallback' from 2.80.0 — extending | ||
| // it would break consumers reading the existing values. | ||
| const variantWithReason = variant as typeof variant & { | ||
| fallback_reason?: 'FLAG_NOT_FOUND' | 'NOT_READY' | 'BACKEND_ERROR'; | ||
| }; | ||
| switch (variantWithReason.fallback_reason) { | ||
| case 'NOT_READY': | ||
| return { | ||
| value: defaultValue, | ||
| errorCode: ErrorCode.PROVIDER_NOT_READY, | ||
| errorMessage: `Flags not ready for "${flagKey}"`, | ||
| reason: 'ERROR', | ||
| }; | ||
| case 'BACKEND_ERROR': | ||
| return { | ||
| value: defaultValue, | ||
| errorCode: ErrorCode.GENERAL, | ||
| errorMessage: | ||
| `Backend fetch for "${flagKey}" failed — check network, ` + | ||
| `distinct_id in evalContext, or server-side flag configuration`, | ||
| reason: 'ERROR', | ||
| }; | ||
| case 'FLAG_NOT_FOUND': | ||
| return { | ||
| value: defaultValue, | ||
| errorCode: ErrorCode.FLAG_NOT_FOUND, | ||
| errorMessage: `Flag "${flagKey}" not found`, | ||
| reason: 'DEFAULT', | ||
| }; | ||
| } | ||
| // Legacy path: older base SDK predates fallback_reason and only tags | ||
| // variant_source = 'fallback'. Map to FLAG_NOT_FOUND so we don't regress | ||
| // callers on the older base SDK. | ||
| if (variant.variant_source === 'fallback') { | ||
@@ -291,0 +327,0 @@ return { |
@@ -488,2 +488,54 @@ import chai, { expect } from 'chai'; | ||
| }); | ||
| // SDK-79: mixpanel-browser 2.81.0+ stamps a fallback_reason field on | ||
| // returned fallback variants. The wrapper should map each reason to the | ||
| // right error code. | ||
| describe('fallback_reason dispatch', () => { | ||
| const stub = (reason: string) => | ||
| (mockFlagsManager.get_variant_sync as sinon.SinonStub).callsFake( | ||
| (_key: string, fallback: any) => ({ | ||
| ...fallback, | ||
| variant_source: 'fallback', | ||
| fallback_reason: reason, | ||
| }), | ||
| ); | ||
| it('FLAG_NOT_FOUND maps to FLAG_NOT_FOUND', () => { | ||
| stub('FLAG_NOT_FOUND'); | ||
| const result = provider.resolveBooleanEvaluation('flag', true, {}, mockLogger); | ||
| expect(result.value).to.equal(true); | ||
| expect(result.errorCode).to.equal(ErrorCode.FLAG_NOT_FOUND); | ||
| expect(result.reason).to.equal('DEFAULT'); | ||
| }); | ||
| it('NOT_READY maps to PROVIDER_NOT_READY', () => { | ||
| stub('NOT_READY'); | ||
| const result = provider.resolveBooleanEvaluation('flag', false, {}, mockLogger); | ||
| expect(result.value).to.equal(false); | ||
| expect(result.errorCode).to.equal(ErrorCode.PROVIDER_NOT_READY); | ||
| expect(result.reason).to.equal('ERROR'); | ||
| }); | ||
| it('BACKEND_ERROR maps to GENERAL with an actionable message', () => { | ||
| stub('BACKEND_ERROR'); | ||
| const result = provider.resolveStringEvaluation('flag', 'default', {}, mockLogger); | ||
| expect(result.value).to.equal('default'); | ||
| expect(result.errorCode).to.equal(ErrorCode.GENERAL); | ||
| expect(result.reason).to.equal('ERROR'); | ||
| // Message should point at plausible causes so the developer can triage | ||
| // without needing to reach for logs. | ||
| expect(result.errorMessage).to.contain('network'); | ||
| expect(result.errorMessage).to.contain('distinct_id'); | ||
| expect(result.errorMessage).to.contain('flag'); | ||
| }); | ||
| it('legacy bare variant_source=fallback (no reason) maps to FLAG_NOT_FOUND', () => { | ||
| // Older base SDK that doesn't yet emit fallback_reason. | ||
| (mockFlagsManager.get_variant_sync as sinon.SinonStub).callsFake( | ||
| (_key: string, fallback: any) => ({ ...fallback, variant_source: 'fallback' }), | ||
| ); | ||
| const result = provider.resolveBooleanEvaluation('flag', true, {}, mockLogger); | ||
| expect(result.errorCode).to.equal(ErrorCode.FLAG_NOT_FOUND); | ||
| }); | ||
| }); | ||
| }); |
+1
-1
| export var Config = { | ||
| DEBUG: false, | ||
| LIB_VERSION: '2.81.0' | ||
| LIB_VERSION: '2.82.0' | ||
| }; | ||
@@ -5,0 +5,0 @@ |
+34
-11
@@ -36,7 +36,21 @@ import { _, console_with_prefix, generateTraceparent, safewrapClass } from '../utils'; // eslint-disable-line camelcase | ||
| var withFallbackSource = function(fallback) { | ||
| // Fallback reasons surfaced via a NEW `fallback_reason` field on the returned | ||
| // variant. `variant_source` stays as the coarse 'network' | 'persistence' | | ||
| // 'fallback' values shipped in 2.80.0 — adding a sibling field rather than | ||
| // extending the existing one keeps every consumer of the published type | ||
| // working unchanged. Values match mixpanel-php so the OpenFeature wrapper | ||
| // dispatch is consistent across SDKs. | ||
| var FALLBACK_REASON_FLAG_NOT_FOUND = 'FLAG_NOT_FOUND'; | ||
| var FALLBACK_REASON_NOT_READY = 'NOT_READY'; | ||
| var FALLBACK_REASON_BACKEND_ERROR = 'BACKEND_ERROR'; | ||
| var withFallbackSource = function(fallback, reason) { | ||
| var extras = {'variant_source': 'fallback'}; | ||
| if (reason) { | ||
| extras['fallback_reason'] = reason; | ||
| } | ||
| if (_.isObject(fallback)) { | ||
| return _.extend({}, fallback, {'variant_source': 'fallback'}); | ||
| return _.extend({}, fallback, extras); | ||
| } | ||
| return {'value': fallback, 'variant_source': 'fallback'}; | ||
| return _.extend({'value': fallback}, extras); | ||
| }; | ||
@@ -497,3 +511,3 @@ | ||
| logger.critical('Feature Flags not initialized'); | ||
| resolve(withFallbackSource(fallback)); | ||
| resolve(withFallbackSource(fallback, FALLBACK_REASON_NOT_READY)); | ||
| }); | ||
@@ -511,3 +525,3 @@ } | ||
| if (!this.fetchPromise) { | ||
| return withFallbackSource(fallback); | ||
| return withFallbackSource(fallback, FALLBACK_REASON_NOT_READY); | ||
| } | ||
@@ -518,3 +532,3 @@ return this.fetchPromise.then(_.bind(function() { | ||
| logger.error(error); | ||
| return withFallbackSource(fallback); | ||
| return withFallbackSource(fallback, FALLBACK_REASON_BACKEND_ERROR); | ||
| }); | ||
@@ -525,5 +539,14 @@ } | ||
| if (!this.fetchPromise) { | ||
| return withFallbackSource(fallback); | ||
| return withFallbackSource(fallback, FALLBACK_REASON_NOT_READY); | ||
| } | ||
| return this.fetchPromise.then(serve).catch(serve); | ||
| return this.fetchPromise.then(serve).catch(_.bind(function(error) { | ||
| logger.error(error); | ||
| // If the fetch failure still left usable state (e.g. persistence hit under | ||
| // a different policy config), serve from cache. Otherwise stamp | ||
| // BACKEND_ERROR so callers can distinguish "backend is down" from | ||
| // "flags never loaded". Mirrors the PUNS branch above. | ||
| return this.areFlagsReady() | ||
| ? serve() | ||
| : withFallbackSource(fallback, FALLBACK_REASON_BACKEND_ERROR); | ||
| }, this)); | ||
| }, this)); | ||
@@ -542,7 +565,7 @@ }; | ||
| logger.log('Loaded persisted variants are past TTL so returning fallback for "' + featureName + '"'); | ||
| return withFallbackSource(fallback); | ||
| return withFallbackSource(fallback, FALLBACK_REASON_NOT_READY); | ||
| } | ||
| if (!this.areFlagsReady()) { | ||
| logger.log('Flags not loaded yet'); | ||
| return withFallbackSource(fallback); | ||
| return withFallbackSource(fallback, FALLBACK_REASON_NOT_READY); | ||
| } | ||
@@ -552,3 +575,3 @@ var feature = this.flags.get(featureName); | ||
| logger.log('No flag found: "' + featureName + '"'); | ||
| return withFallbackSource(fallback); | ||
| return withFallbackSource(fallback, FALLBACK_REASON_FLAG_NOT_FOUND); | ||
| } | ||
@@ -555,0 +578,0 @@ this.trackFeatureCheck(featureName, feature); |
+20
-1
@@ -385,2 +385,19 @@ import type { RulesLogic } from 'json-logic-js'; | ||
| /** | ||
| * Where a variant came from. Coarse-grained — see {@link FlagsFallbackReason} | ||
| * for the specific reason behind a fallback. | ||
| */ | ||
| export type FlagsVariantSource = 'network' | 'persistence' | 'fallback'; | ||
| /** | ||
| * Why the SDK returned the developer fallback. Only meaningful when | ||
| * `variant_source === 'fallback'`. Matches the constant set used by | ||
| * mixpanel-php so the OpenFeature wrapper can map each reason to the | ||
| * spec-correct error code. | ||
| */ | ||
| export type FlagsFallbackReason = | ||
| | 'FLAG_NOT_FOUND' | ||
| | 'NOT_READY' | ||
| | 'BACKEND_ERROR'; | ||
| export interface FlagsVariant { | ||
@@ -392,3 +409,5 @@ key: string; | ||
| is_qa_tester?: boolean; | ||
| variant_source?: string; | ||
| variant_source?: FlagsVariantSource; | ||
| /** Undefined on success; set when `variant_source === 'fallback'`. */ | ||
| fallback_reason?: FlagsFallbackReason; | ||
| persisted_at_in_ms?: number; | ||
@@ -395,0 +414,0 @@ } |
@@ -490,3 +490,3 @@ /** | ||
| */ | ||
| function initFetchObserver(cb, win, options) { | ||
| export function initFetchObserver(cb, win, options) { | ||
| if (!options.initiatorTypes.includes('fetch')) { | ||
@@ -512,3 +512,6 @@ return function() { | ||
| var requestBodyPromise = Promise.resolve(undefined); | ||
| var responseBodyPromise = Promise.resolve(undefined); | ||
| var responseBodyResolve; | ||
| var responseBodyPromise = new Promise(function(resolve) { | ||
| responseBodyResolve = resolve; | ||
| }); | ||
| try { | ||
@@ -546,6 +549,8 @@ /** @type {Headers} */ | ||
| if (shouldRecordBody('response', options.recordBodyUrls, req.url)) { | ||
| responseBodyPromise = tryReadFetchBody(res) | ||
| .then(function(body) { | ||
| networkRequest.responseBody = body; | ||
| }); | ||
| tryReadFetchBody(res).then(function(body) { | ||
| networkRequest.responseBody = body; | ||
| responseBodyResolve(); | ||
| }); | ||
| } else { | ||
| responseBodyResolve(); | ||
| } | ||
@@ -552,0 +557,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
| (function(){"use strict";var v;if(typeof window=="undefined"){var H={hostname:""};v={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:H,referrer:""},screen:{width:0,height:0},location:H,addEventListener:function(){},removeEventListener:function(){},dispatchEvent:function(){},CustomEvent:function(){}}}else v=window;var de={LIB_VERSION:"2.81.0"},ge="__mp_targeting",q=v.setImmediate,S,$,F,V=Object.prototype.toString,ye=typeof q!="undefined"?function(r){return q(r)}:setTimeout;try{Object.defineProperty({},"x",{}),S=function(r,o,n,f){return Object.defineProperty(r,o,{value:n,writable:!0,configurable:f!==!1})}}catch(e){S=function(o,n,f){return o[n]=f,o}}F=(function(){var r,o,n;function f(t,i){this.fn=t,this.self=i,this.next=void 0}return{add:function(i,c){n=new f(i,c),o?o.next=n:r=n,o=n,n=void 0},drain:function(){var i=r;for(r=o=$=void 0;i;)i.fn.call(i.self),i=i.next}}})();function T(e,r){F.add(e,r),$||($=ye(F.drain))}function X(e){var r,o=typeof e;return e!==null&&(o==="object"||o==="function")&&(r=e.then),typeof r=="function"?r:!1}function j(){for(var e=0;e<this.chain.length;e++)ve(this,this.state===1?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function ve(e,r,o){var n,f;try{r===!1?o.reject(e.msg):(r===!0?n=e.msg:n=r.call(void 0,e.msg),n===o.promise?o.reject(TypeError("Promise-chain cycle")):(f=X(n))?f.call(n,o.resolve,o.reject):o.resolve(n))}catch(t){o.reject(t)}}function Y(e){var r,o=this;if(!o.triggered){o.triggered=!0,o.def&&(o=o.def);try{(r=X(e))?T(function(){var n=new ee(o);try{r.call(e,function(){Y.apply(n,arguments)},function(){C.apply(n,arguments)})}catch(f){C.call(n,f)}}):(o.msg=e,o.state=1,o.chain.length>0&&T(j,o))}catch(n){C.call(new ee(o),n)}}}function C(e){var r=this;r.triggered||(r.triggered=!0,r.def&&(r=r.def),r.msg=e,r.state=2,r.chain.length>0&&T(j,r))}function Z(e,r,o,n){for(var f=0;f<r.length;f++)(function(i){e.resolve(r[i]).then(function(a){o(i,a)},n)})(f)}function ee(e){this.def=e,this.triggered=!1}function me(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function b(e){if(typeof e!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var r=new me(this);this.then=function(n,f){var t={success:typeof n=="function"?n:!0,failure:typeof f=="function"?f:!1};return t.promise=new this.constructor(function(c,a){if(typeof c!="function"||typeof a!="function")throw TypeError("Not a function");t.resolve=c,t.reject=a}),r.chain.push(t),r.state!==0&&T(j,r),t.promise},this.catch=function(n){return this.then(void 0,n)};try{e.call(void 0,function(n){Y.call(r,n)},function(n){C.call(r,n)})}catch(o){C.call(r,o)}}var re=S({},"constructor",b,!1);b.prototype=re,S(re,"__NPO__",0,!1),S(b,"resolve",function(r){var o=this;return r&&typeof r=="object"&&r.__NPO__===1?r:new o(function(f,t){if(typeof f!="function"||typeof t!="function")throw TypeError("Not a function");f(r)})}),S(b,"reject",function(r){return new this(function(n,f){if(typeof n!="function"||typeof f!="function")throw TypeError("Not a function");f(r)})}),S(b,"all",function(r){var o=this;return V.call(r)!=="[object Array]"?o.reject(TypeError("Not an array")):r.length===0?o.resolve([]):new o(function(f,t){if(typeof f!="function"||typeof t!="function")throw TypeError("Not a function");var i=r.length,c=Array(i),a=0;Z(o,r,function(d,g){c[d]=g,++a===i&&f(c)},t)})}),S(b,"race",function(r){var o=this;return V.call(r)!=="[object Array]"?o.reject(TypeError("Not an array")):new o(function(f,t){if(typeof f!="function"||typeof t!="function")throw TypeError("Not a function");Z(o,r,function(c,a){f(a)},t)})}),typeof Promise!="undefined"&&Promise.toString().indexOf("[native code]");var k=Array.prototype,we=Function.prototype,te=Object.prototype,E=k.slice,B=te.toString,M=te.hasOwnProperty;v.console;var I=v.navigator,A=v.document,D=v.opera,ne=v.screen,P=I.userAgent,R=we.bind,ie=k.forEach,oe=k.indexOf,ue=k.map,Ae=Array.isArray,L={},u={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}};u.bind=function(e,r){var o,n;if(R&&e.bind===R)return R.apply(e,E.call(arguments,1));if(!u.isFunction(e))throw new TypeError;return o=E.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(r,o.concat(E.call(arguments)));var f={};f.prototype=e.prototype;var t=new f;f.prototype=null;var i=e.apply(t,o.concat(E.call(arguments)));return Object(i)===i?i:t},n},u.each=function(e,r,o){if(e!=null){if(ie&&e.forEach===ie)e.forEach(r,o);else if(e.length===+e.length){for(var n=0,f=e.length;n<f;n++)if(n in e&&r.call(o,e[n],n,e)===L)return}else for(var t in e)if(M.call(e,t)&&r.call(o,e[t],t,e)===L)return}},u.extend=function(e){return u.each(E.call(arguments,1),function(r){for(var o in r)r[o]!==void 0&&(e[o]=r[o])}),e},u.isArray=Ae||function(e){return B.call(e)==="[object Array]"},u.isFunction=function(e){return typeof e=="function"},u.isArguments=function(e){return!!(e&&M.call(e,"callee"))},u.toArray=function(e){return e?e.toArray?e.toArray():u.isArray(e)||u.isArguments(e)?E.call(e):u.values(e):[]},u.map=function(e,r,o){if(ue&&e.map===ue)return e.map(r,o);var n=[];return u.each(e,function(f){n.push(r.call(o,f))}),n},u.keys=function(e){var r=[];return e===null||u.each(e,function(o,n){r[r.length]=n}),r},u.values=function(e){var r=[];return e===null||u.each(e,function(o){r[r.length]=o}),r},u.include=function(e,r){var o=!1;return e===null?o:oe&&e.indexOf===oe?e.indexOf(r)!=-1:(u.each(e,function(n){if(o||(o=n===r))return L}),o)},u.includes=function(e,r){return e.indexOf(r)!==-1},u.inherit=function(e,r){return e.prototype=new r,e.prototype.constructor=e,e.superclass=r.prototype,e},u.isObject=function(e){return e===Object(e)&&!u.isArray(e)},u.isEmptyObject=function(e){if(u.isObject(e)){for(var r in e)if(M.call(e,r))return!1;return!0}return!1},u.isUndefined=function(e){return e===void 0},u.isString=function(e){return B.call(e)=="[object String]"},u.isDate=function(e){return B.call(e)=="[object Date]"},u.isNumber=function(e){return B.call(e)=="[object Number]"},u.isElement=function(e){return!!(e&&e.nodeType===1)},u.encodeDates=function(e){return u.each(e,function(r,o){u.isDate(r)?e[o]=u.formatDate(r):u.isObject(r)&&(e[o]=u.encodeDates(r))}),e},u.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},u.formatDate=function(e){function r(o){return o<10?"0"+o:o}return e.getUTCFullYear()+"-"+r(e.getUTCMonth()+1)+"-"+r(e.getUTCDate())+"T"+r(e.getUTCHours())+":"+r(e.getUTCMinutes())+":"+r(e.getUTCSeconds())},u.strip_empty_properties=function(e){var r={};return u.each(e,function(o,n){u.isString(o)&&o.length>0&&(r[n]=o)}),r},u.truncate=function(e,r){var o;return typeof e=="string"?o=e.slice(0,r):u.isArray(e)?(o=[],u.each(e,function(n){o.push(u.truncate(n,r))})):u.isObject(e)?(o={},u.each(e,function(n,f){o[f]=u.truncate(n,r)})):o=e,o},u.JSONEncode=(function(){return function(e){var r=e,o=function(f){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,i={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(f)?'"'+f.replace(t,function(c){var a=i[c];return typeof a=="string"?a:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'},n=function(f,t){var i="",c=" ",a=0,s="",d="",g=0,l=i,h=[],p=t[f];switch(p&&typeof p=="object"&&typeof p.toJSON=="function"&&(p=p.toJSON(f)),typeof p){case"string":return o(p);case"number":return isFinite(p)?String(p):"null";case"boolean":case"null":return String(p);case"object":if(!p)return"null";if(i+=c,h=[],B.apply(p)==="[object Array]"){for(g=p.length,a=0;a<g;a+=1)h[a]=n(a,p)||"null";return d=h.length===0?"[]":i?"[\n"+i+h.join(",\n"+i)+"\n"+l+"]":"["+h.join(",")+"]",i=l,d}for(s in p)M.call(p,s)&&(d=n(s,p),d&&h.push(o(s)+(i?": ":":")+d));return d=h.length===0?"{}":i?"{"+h.join(",")+l+"}":"{"+h.join(",")+"}",i=l,d}};return n("",{"":r})}})(),u.JSONDecode=(function(){var e,r,o={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:" "},n,f=function(h){var p=new SyntaxError(h);throw p.at=e,p.text=n,p},t=function(h){return h&&h!==r&&f("Expected '"+h+"' instead of '"+r+"'"),r=n.charAt(e),e+=1,r},i=function(){var h,p="";for(r==="-"&&(p="-",t("-"));r>="0"&&r<="9";)p+=r,t();if(r===".")for(p+=".";t()&&r>="0"&&r<="9";)p+=r;if(r==="e"||r==="E")for(p+=r,t(),(r==="-"||r==="+")&&(p+=r,t());r>="0"&&r<="9";)p+=r,t();if(h=+p,!isFinite(h))f("Bad number");else return h},c=function(){var h,p,m="",y;if(r==='"')for(;t();){if(r==='"')return t(),m;if(r==="\\")if(t(),r==="u"){for(y=0,p=0;p<4&&(h=parseInt(t(),16),!!isFinite(h));p+=1)y=y*16+h;m+=String.fromCharCode(y)}else if(typeof o[r]=="string")m+=o[r];else break;else m+=r}f("Bad string")},a=function(){for(;r&&r<=" ";)t()},s=function(){switch(r){case"t":return t("t"),t("r"),t("u"),t("e"),!0;case"f":return t("f"),t("a"),t("l"),t("s"),t("e"),!1;case"n":return t("n"),t("u"),t("l"),t("l"),null}f('Unexpected "'+r+'"')},d,g=function(){var h=[];if(r==="["){if(t("["),a(),r==="]")return t("]"),h;for(;r;){if(h.push(d()),a(),r==="]")return t("]"),h;t(","),a()}}f("Bad array")},l=function(){var h,p={};if(r==="{"){if(t("{"),a(),r==="}")return t("}"),p;for(;r;){if(h=c(),a(),t(":"),Object.hasOwnProperty.call(p,h)&&f('Duplicate key "'+h+'"'),p[h]=d(),a(),r==="}")return t("}"),p;t(","),a()}}f("Bad object")};return d=function(){switch(a(),r){case"{":return l();case"[":return g();case'"':return c();case"-":return i();default:return r>="0"&&r<="9"?i():s()}},function(h){var p;return n=h,e=0,r=" ",p=d(),a(),r&&f("Syntax error"),p}})(),u.base64Encode=function(e){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o,n,f,t,i,c,a,s,d=0,g=0,l="",h=[];if(!e)return e;e=u.utf8Encode(e);do o=e.charCodeAt(d++),n=e.charCodeAt(d++),f=e.charCodeAt(d++),s=o<<16|n<<8|f,t=s>>18&63,i=s>>12&63,c=s>>6&63,a=s&63,h[g++]=r.charAt(t)+r.charAt(i)+r.charAt(c)+r.charAt(a);while(d<e.length);switch(l=h.join(""),e.length%3){case 1:l=l.slice(0,-2)+"==";break;case 2:l=l.slice(0,-1)+"=";break}return l},u.utf8Encode=function(e){e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n");var r="",o,n,f=0,t;for(o=n=0,f=e.length,t=0;t<f;t++){var i=e.charCodeAt(t),c=null;i<128?n++:i>127&&i<2048?c=String.fromCharCode(i>>6|192,i&63|128):c=String.fromCharCode(i>>12|224,i>>6&63|128,i&63|128),c!==null&&(n>o&&(r+=e.substring(o,n)),r+=c,o=n=t+1)}return n>o&&(r+=e.substring(o,e.length)),r},u.UUID=function(){try{return v.crypto.randomUUID()}catch(o){for(var e=new Array(36),r=0;r<36;r++)e[r]=Math.floor(Math.random()*16);return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]="-",u.map(e,function(n){return n.toString(16)}).join("")}};var fe=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];u.isBlockedUA=function(e){var r;for(e=e.toLowerCase(),r=0;r<fe.length;r++)if(e.indexOf(fe[r])!==-1)return!0;return!1},u.HTTPBuildQuery=function(e,r){var o,n,f=[];return u.isUndefined(r)&&(r="&"),u.each(e,function(t,i){o=encodeURIComponent(t.toString()),n=encodeURIComponent(i),f[f.length]=n+"="+o}),f.join(r)},u.getQueryParam=function(e,r){r=r.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var o="[\\?&]"+r+"=([^&#]*)",n=new RegExp(o),f=n.exec(e);if(f===null||f&&typeof f[1]!="string"&&f[1].length)return"";var t=f[1];try{t=decodeURIComponent(t)}catch(i){}return t.replace(/\+/g," ")},u.cookie={get:function(e){for(var r=e+"=",o=A.cookie.split(";"),n=0;n<o.length;n++){for(var f=o[n];f.charAt(0)==" ";)f=f.substring(1,f.length);if(f.indexOf(r)===0)return decodeURIComponent(f.substring(r.length,f.length))}return null},parse:function(e){var r;try{r=u.JSONDecode(u.cookie.get(e))||{}}catch(o){}return r},set_seconds:function(e,r,o,n,f,t,i){var c="",a="",s="";if(i)c="; domain="+i;else if(n){var d=le(A.location.hostname);c=d?"; domain=."+d:""}if(o){var g=new Date;g.setTime(g.getTime()+o*1e3),a="; expires="+g.toGMTString()}t&&(f=!0,s="; SameSite=None"),f&&(s+="; secure"),A.cookie=e+"="+encodeURIComponent(r)+a+"; path=/"+c+s},set:function(e,r,o,n,f,t,i){var c="",a="",s="";if(i)c="; domain="+i;else if(n){var d=le(A.location.hostname);c=d?"; domain=."+d:""}if(o){var g=new Date;g.setTime(g.getTime()+o*24*60*60*1e3),a="; expires="+g.toGMTString()}t&&(f=!0,s="; SameSite=None"),f&&(s+="; secure");var l=e+"="+encodeURIComponent(r)+a+"; path=/"+c+s;return A.cookie=l,l},remove:function(e,r,o){u.cookie.set(e,"",-1,r,!1,!1,o)}};var ae=function(e){var r=!0;try{var o="__mplss_"+se(8),n="xyz";e.setItem(o,n),e.getItem(o)!==n&&(r=!1),e.removeItem(o)}catch(f){r=!1}return r},W=null,Se=function(e,r){return W!==null&&!r?W:W=ae(e)},J=null,_e=function(e,r){return J!==null&&!r?J:J=ae(e)};function ce(e,r,o){var n=function(f){};return{is_supported:function(f){var t=o(e,f);return t},error:n,get:function(f){try{return e.getItem(f)}catch(t){}return null},parse:function(f){try{return u.JSONDecode(e.getItem(f))||{}}catch(t){}return null},set:function(f,t){try{e.setItem(f,t)}catch(i){}},remove:function(f){try{e.removeItem(f)}catch(t){}}}}var Oe=function(){try{return v.localStorage}catch(e){return null}},be=function(){try{return v.sessionStorage}catch(e){return null}};u.localStorage=ce(Oe(),"localStorage",Se),u.sessionStorage=ce(be(),"sessionStorage",_e),u.register_event=(function(){var e=function(n,f,t,i,c){if(n)if(n.addEventListener&&!i)n.addEventListener(f,t,!!c);else{var a="on"+f,s=n[a];n[a]=r(n,t,s)}};function r(n,f,t){var i=function(c){if(c=c||o(v.event),!!c){var a=!0,s,d;return u.isFunction(t)&&(s=t(c)),d=f.call(n,c),(s===!1||d===!1)&&(a=!1),a}};return i}function o(n){return n&&(n.preventDefault=o.preventDefault,n.stopPropagation=o.stopPropagation),n}return o.preventDefault=function(){this.returnValue=!1},o.stopPropagation=function(){this.cancelBubble=!0},e})();var Ee=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');u.dom_query=(function(){function e(f){return f.all?f.all:f.getElementsByTagName("*")}var r=/[\t\r\n]/g;function o(f,t){var i=" "+t+" ";return(" "+f.className+" ").replace(r," ").indexOf(i)>=0}function n(f){if(!A.getElementsByTagName)return[];var t=f.split(" "),i,c,a,s,d,g,l,h,p,m,y=[A];for(g=0;g<t.length;g++){if(i=t[g].replace(/^\s+/,"").replace(/\s+$/,""),i.indexOf("#")>-1){c=i.split("#"),a=c[0];var K=c[1],Q=A.getElementById(K);if(!Q||a&&Q.nodeName.toLowerCase()!=a)return[];y=[Q];continue}if(i.indexOf(".")>-1){c=i.split("."),a=c[0];var Ue=c[1];for(a||(a="*"),s=[],d=0,l=0;l<y.length;l++)for(a=="*"?p=e(y[l]):p=y[l].getElementsByTagName(a),h=0;h<p.length;h++)s[d++]=p[h];for(y=[],m=0,l=0;l<s.length;l++)s[l].className&&u.isString(s[l].className)&&o(s[l],Ue)&&(y[m++]=s[l]);continue}var N=i.match(Ee);if(N){a=N[1];var _=N[2],$e=N[3],x=N[4];for(a||(a="*"),s=[],d=0,l=0;l<y.length;l++)for(a=="*"?p=e(y[l]):p=y[l].getElementsByTagName(a),h=0;h<p.length;h++)s[d++]=p[h];y=[],m=0;var O;switch($e){case"=":O=function(w){return w.getAttribute(_)==x};break;case"~":O=function(w){return w.getAttribute(_).match(new RegExp("\\b"+x+"\\b"))};break;case"|":O=function(w){return w.getAttribute(_).match(new RegExp("^"+x+"-?"))};break;case"^":O=function(w){return w.getAttribute(_).indexOf(x)===0};break;case"$":O=function(w){return w.getAttribute(_).lastIndexOf(x)==w.getAttribute(_).length-x.length};break;case"*":O=function(w){return w.getAttribute(_).indexOf(x)>-1};break;default:O=function(w){return w.getAttribute(_)}}for(y=[],m=0,l=0;l<s.length;l++)O(s[l])&&(y[m++]=s[l]);continue}for(a=i,s=[],d=0,l=0;l<y.length;l++)for(p=y[l].getElementsByTagName(a),h=0;h<p.length;h++)s[d++]=p[h];y=s}return y}return function(f){return u.isElement(f)?[f]:u.isObject(f)&&!u.isUndefined(f.length)?f:n.call(this,f)}})();var xe=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],Pe=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];u.info={campaignParams:function(e){var r="",o={};return u.each(xe,function(n){r=u.getQueryParam(A.URL,n),r.length?o[n]=r:e!==void 0&&(o[n]=e)}),o},clickParams:function(){var e="",r={};return u.each(Pe,function(o){e=u.getQueryParam(A.URL,o),e.length&&(r[o]=e)}),r},marketingParams:function(){return u.extend(u.info.campaignParams(),u.info.clickParams())},searchEngine:function(e){return e.search("https?://(.*)google.([^/?]*)")===0?"google":e.search("https?://(.*)bing.com")===0?"bing":e.search("https?://(.*)yahoo.com")===0?"yahoo":e.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(e){var r=u.info.searchEngine(e),o=r!="yahoo"?"q":"p",n={};if(r!==null){n.$search_engine=r;var f=u.getQueryParam(e,o);f.length&&(n.mp_keyword=f)}return n},browser:function(e,r,o){return r=r||"",o||u.includes(e," OPR/")?u.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":u.includes(e,"IEMobile")||u.includes(e,"WPDesktop")?"Internet Explorer Mobile":u.includes(e,"SamsungBrowser/")?"Samsung Internet":u.includes(e,"Edge")||u.includes(e,"Edg/")?"Microsoft Edge":u.includes(e,"FBIOS")?"Facebook Mobile":u.includes(e,"Whale/")?"Whale Browser":u.includes(e,"Chrome")?"Chrome":u.includes(e,"CriOS")?"Chrome iOS":u.includes(e,"UCWEB")||u.includes(e,"UCBrowser")?"UC Browser":u.includes(e,"FxiOS")?"Firefox iOS":u.includes(r,"Apple")?u.includes(e,"Mobile")?"Mobile Safari":"Safari":u.includes(e,"Android")?"Android Mobile":u.includes(e,"Konqueror")?"Konqueror":u.includes(e,"Firefox")?"Firefox":u.includes(e,"MSIE")||u.includes(e,"Trident/")?"Internet Explorer":u.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,r,o){var n=u.info.browser(e,r,o),f={"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+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/},t=f[n];if(t===void 0)return null;var i=e.match(t);return i?parseFloat(i[i.length-2]):null},os:function(){var e=P;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var r=e.split("/");return r.length>=3?r[2]:""},currentUrl:function(){return v.location.href},properties:function(e){return typeof e!="object"&&(e={}),u.extend(u.strip_empty_properties({$os:u.info.os(),$browser:u.info.browser(P,I.vendor,D),$referrer:A.referrer,$referring_domain:u.info.referringDomain(A.referrer),$device:u.info.device(P)}),{$current_url:u.info.currentUrl(),$browser_version:u.info.browserVersion(P,I.vendor,D),$screen_height:ne.height,$screen_width:ne.width,mp_lib:"web",$lib_version:de.LIB_VERSION,$insert_id:se(),time:u.timestamp()/1e3},u.strip_empty_properties(e))},people_properties:function(){return u.extend(u.strip_empty_properties({$os:u.info.os(),$browser:u.info.browser(P,I.vendor,D)}),{$browser_version:u.info.browserVersion(P,I.vendor,D)})},mpPageViewProperties:function(){return u.strip_empty_properties({current_page_title:A.title,current_domain:v.location.hostname,current_url_path:v.location.pathname,current_url_protocol:v.location.protocol,current_url_search:v.location.search})}};var se=function(e){var r=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?r.substring(0,e):r},Ce=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,Be=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,le=function(e){var r=Be,o=e.split("."),n=o[o.length-1];(n.length>4||n==="com"||n==="org")&&(r=Ce);var f=e.match(r);return f?f[0]:""},z=null,G=null;typeof JSON!="undefined"&&(z=JSON.stringify,G=JSON.parse),z=z||u.JSONEncode,G=G||u.JSONDecode,u.info=u.info,u.info.browser=u.info.browser,u.info.browserVersion=u.info.browserVersion,u.info.device=u.info.device,u.info.properties=u.info.properties,u.isBlockedUA=u.isBlockedUA,u.isEmptyObject=u.isEmptyObject,u.isObject=u.isObject,u.JSONDecode=u.JSONDecode,u.JSONEncode=u.JSONEncode,u.toArray=u.toArray,u.NPO=b;function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var U={exports:{}},Ne=U.exports,pe;function Te(){return pe||(pe=1,(function(e,r){(function(o,n){e.exports=n()})(Ne,function(){Array.isArray||(Array.isArray=function(t){return Object.prototype.toString.call(t)==="[object Array]"});function o(t){for(var i=[],c=0,a=t.length;c<a;c++)i.indexOf(t[c])===-1&&i.push(t[c]);return i}var n={},f={"==":function(t,i){return t==i},"===":function(t,i){return t===i},"!=":function(t,i){return t!=i},"!==":function(t,i){return t!==i},">":function(t,i){return t>i},">=":function(t,i){return t>=i},"<":function(t,i,c){return c===void 0?t<i:t<i&&i<c},"<=":function(t,i,c){return c===void 0?t<=i:t<=i&&i<=c},"!!":function(t){return n.truthy(t)},"!":function(t){return!n.truthy(t)},"%":function(t,i){return t%i},log:function(t){return console.log(t),t},in:function(t,i){return!i||typeof i.indexOf=="undefined"?!1:i.indexOf(t)!==-1},cat:function(){return Array.prototype.join.call(arguments,"")},substr:function(t,i,c){if(c<0){var a=String(t).substr(i);return a.substr(0,a.length+c)}return String(t).substr(i,c)},"+":function(){return Array.prototype.reduce.call(arguments,function(t,i){return parseFloat(t,10)+parseFloat(i,10)},0)},"*":function(){return Array.prototype.reduce.call(arguments,function(t,i){return parseFloat(t,10)*parseFloat(i,10)})},"-":function(t,i){return i===void 0?-t:t-i},"/":function(t,i){return t/i},min:function(){return Math.min.apply(this,arguments)},max:function(){return Math.max.apply(this,arguments)},merge:function(){return Array.prototype.reduce.call(arguments,function(t,i){return t.concat(i)},[])},var:function(t,i){var c=i===void 0?null:i,a=this;if(typeof t=="undefined"||t===""||t===null)return a;for(var s=String(t).split("."),d=0;d<s.length;d++)if(a==null||(a=a[s[d]],a===void 0))return c;return a},missing:function(){for(var t=[],i=Array.isArray(arguments[0])?arguments[0]:arguments,c=0;c<i.length;c++){var a=i[c],s=n.apply({var:a},this);(s===null||s==="")&&t.push(a)}return t},missing_some:function(t,i){var c=n.apply({missing:i},this);return i.length-c.length>=t?[]:c}};return n.is_logic=function(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length===1},n.truthy=function(t){return Array.isArray(t)&&t.length===0?!1:!!t},n.get_operator=function(t){return Object.keys(t)[0]},n.get_values=function(t){return t[n.get_operator(t)]},n.apply=function(t,i){if(Array.isArray(t))return t.map(function(y){return n.apply(y,i)});if(!n.is_logic(t))return t;var c=n.get_operator(t),a=t[c],s,d,g,l,h;if(Array.isArray(a)||(a=[a]),c==="if"||c=="?:"){for(s=0;s<a.length-1;s+=2)if(n.truthy(n.apply(a[s],i)))return n.apply(a[s+1],i);return a.length===s+1?n.apply(a[s],i):null}else if(c==="and"){for(s=0;s<a.length;s+=1)if(d=n.apply(a[s],i),!n.truthy(d))return d;return d}else if(c==="or"){for(s=0;s<a.length;s+=1)if(d=n.apply(a[s],i),n.truthy(d))return d;return d}else{if(c==="filter")return l=n.apply(a[0],i),g=a[1],Array.isArray(l)?l.filter(function(y){return n.truthy(n.apply(g,y))}):[];if(c==="map")return l=n.apply(a[0],i),g=a[1],Array.isArray(l)?l.map(function(y){return n.apply(g,y)}):[];if(c==="reduce")return l=n.apply(a[0],i),g=a[1],h=typeof a[2]!="undefined"?n.apply(a[2],i):null,Array.isArray(l)?l.reduce(function(y,K){return n.apply(g,{current:K,accumulator:y})},h):h;if(c==="all"){if(l=n.apply(a[0],i),g=a[1],!Array.isArray(l)||!l.length)return!1;for(s=0;s<l.length;s+=1)if(!n.truthy(n.apply(g,l[s])))return!1;return!0}else if(c==="none"){if(l=n.apply(a[0],i),g=a[1],!Array.isArray(l)||!l.length)return!0;for(s=0;s<l.length;s+=1)if(n.truthy(n.apply(g,l[s])))return!1;return!0}else if(c==="some"){if(l=n.apply(a[0],i),g=a[1],!Array.isArray(l)||!l.length)return!1;for(s=0;s<l.length;s+=1)if(n.truthy(n.apply(g,l[s])))return!0;return!1}}if(a=a.map(function(y){return n.apply(y,i)}),f.hasOwnProperty(c)&&typeof f[c]=="function")return f[c].apply(i,a);if(c.indexOf(".")>0){var p=String(c).split("."),m=f;for(s=0;s<p.length;s++){if(!m.hasOwnProperty(p[s]))throw new Error("Unrecognized operation "+c+" (failed at "+p.slice(0,s+1).join(".")+")");m=m[p[s]]}return m.apply(i,a)}throw new Error("Unrecognized operation "+c)},n.uses_data=function(t){var i=[];if(n.is_logic(t)){var c=n.get_operator(t),a=t[c];Array.isArray(a)||(a=[a]),c==="var"?i.push(a[0]):a.forEach(function(s){i.push.apply(i,n.uses_data(s))})}return o(i)},n.add_operation=function(t,i){f[t]=i},n.rm_operation=function(t){delete f[t]},n.rule_like=function(t,i){if(i===t||i==="@")return!0;if(i==="number")return typeof t=="number";if(i==="string")return typeof t=="string";if(i==="array")return Array.isArray(t)&&!n.is_logic(t);if(n.is_logic(i)){if(n.is_logic(t)){var c=n.get_operator(i),a=n.get_operator(t);if(c==="@"||c===a)return n.rule_like(n.get_values(t,!1),n.get_values(i,!1))}return!1}if(Array.isArray(i))if(Array.isArray(t)){if(i.length!==t.length)return!1;for(var s=0;s<i.length;s+=1)if(!n.rule_like(t[s],i[s]))return!1;return!0}else return!1;return!1},n})})(U)),U.exports}var ke=Te(),Me=Ie(ke),De=function(e,r,o){if(e!==o.event_name)return{matches:!1};var n=o.property_filters,f=!0;if(n&&!u.isEmptyObject(n))try{f=Me.apply(n,r||{})}catch(t){return{matches:!1,error:t.toString()}}return{matches:f}},he={};he.eventMatchesCriteria=De,v[ge]=Promise.resolve(he)})(); | ||
| //# sourceMappingURL=mixpanel-targeting-lVHWWlNM.min.js.map |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Telemetry
Supply chain riskThis package contains telemetry which tracks how it is used.
Found 4 instances
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Found 3 instances
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Telemetry
Supply chain riskThis package contains telemetry which tracks how it is used.
Found 4 instances
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
16331594
0.17%299035
0.17%163
1.24%