/*! For license information please see client.min.js.LICENSE.txt */ (function(){var __webpack_modules__={5817:function(n,t,e){var i;!function(r,o){"use strict";var a="function",u="undefined",c="object",s="string",f="model",l="name",d="type",v="vendor",h="version",p="architecture",g="console",m="mobile",_="tablet",y="smarttv",w="wearable",b="embedded",E="Amazon",I="Apple",A="ASUS",S="BlackBerry",T="Browser",k="Chrome",R="Firefox",C="Google",N="Huawei",D="LG",O="Microsoft",x="Motorola",M="Opera",P="Samsung",L="Sharp",V="Sony",U="Xiaomi",F="Zebra",B="Facebook",z=function(n){for(var t={},e=0;e0?2===u.length?typeof u[1]==a?this[u[0]]=u[1].call(this,f):this[u[0]]=u[1]:3===u.length?typeof u[1]!==a||u[1].exec&&u[1].test?this[u[0]]=f?f.replace(u[1],u[2]):o:this[u[0]]=f?u[1].call(this,f,u[2]):o:4===u.length&&(this[u[0]]=f?u[3].call(this,f.replace(u[1],u[2])):o):this[u]=f||o;l+=2}},Y=function(n,t){for(var e in t)if(typeof t[e]===c&&t[e].length>0){for(var i=0;i350?q(n,350):n,this},this.setUA(e),this};W.VERSION="0.7.33",W.BROWSER=z([l,h,"major"]),W.CPU=z([p]),W.DEVICE=z([f,v,d,g,m,y,_,w,b]),W.ENGINE=W.OS=z([l,h]),typeof t!==u?(n.exports&&(t=n.exports=W),t.UAParser=W):e.amdO?(i=function(){return W}.call(t,e,t,n))===o||(n.exports=i):typeof r!==u&&(r.UAParser=W)}("object"==typeof window?window:this)},8837:function(n,t,e){var i=e(3623)(),r=e(9619);n.exports=function(n,t){function e(t){if(!(this instanceof e))return new e(t);try{throw new Error(t)}catch(o){o.name=n,this.stack=o.stack}i&&this.stack&&(this.stack=r(this.stack,n,t)),this.message=t||"",this.name=n}return e.prototype=new(t||Error),e.prototype.constructor=e,e.prototype.inspect=function(){return this.message?"["+n+": "+this.message+"]":"["+n+"]"},e.prototype.name=n,e}},9619:function(n){"use strict";n.exports=function(n,t,e){var i=t;return e&&(i+=": "+e),n=i+n.slice(n.indexOf("\n"))}},3623:function(n){"use strict";n.exports=function(){var n=new Error("yep");return!!n.stack&&"Error: yep\n"===n.stack.substr(0,11)}},12:function(n,t,e){n.exports=function(){"use strict";function n(n){return"function"==typeof n||"object"==typeof n&&null!==n}function t(n){return"function"==typeof n}undefined;var i=Array.isArray?Array.isArray:function(n){return"[object Array]"===Object.prototype.toString.call(n)},r=0,o=undefined,a=undefined,u=function(n,t){w[r]=n,w[r+1]=t,2===(r+=2)&&(a?a(b):I())};function c(n){a=n}function s(n){u=n}var f="undefined"!=typeof window?window:undefined,l=f||{},d=l.MutationObserver||l.WebKitMutationObserver,v="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function p(){return function(){return process.nextTick(b)}}function g(){return void 0!==o?function(){o(b)}:y()}function m(){var n=0,t=new d(b),e=document.createTextNode("");return t.observe(e,{characterData:!0}),function(){e.data=n=++n%2}}function _(){var n=new MessageChannel;return n.port1.onmessage=b,function(){return n.port2.postMessage(0)}}function y(){var n=setTimeout;return function(){return n(b,1)}}var w=new Array(1e3);function b(){for(var n=0;n>>16)*a&65535)<<16)&4294967295)<<15|c>>>17))*u+(((c>>>16)*u&65535)<<16)&4294967295)<<13|r>>>19))+((5*(r>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(c=0,e){case 3:c^=(255&n.charCodeAt(s+2))<<16;case 2:c^=(255&n.charCodeAt(s+1))<<8;case 1:r^=c=(65535&(c=(c=(65535&(c^=255&n.charCodeAt(s)))*a+(((c>>>16)*a&65535)<<16)&4294967295)<<15|c>>>17))*u+(((c>>>16)*u&65535)<<16)&4294967295}return r^=n.length,r=2246822507*(65535&(r^=r>>>16))+((2246822507*(r>>>16)&65535)<<16)&4294967295,r=3266489909*(65535&(r^=r>>>13))+((3266489909*(r>>>16)&65535)<<16)&4294967295,(r^=r>>>16)>>>0}var e=t;e.v2=function(n,t){for(var e,i=n.length,r=t^i,o=0;i>=4;)e=1540483477*(65535&(e=255&n.charCodeAt(o)|(255&n.charCodeAt(++o))<<8|(255&n.charCodeAt(++o))<<16|(255&n.charCodeAt(++o))<<24))+((1540483477*(e>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^(e=1540483477*(65535&(e^=e>>>24))+((1540483477*(e>>>16)&65535)<<16)),i-=4,++o;switch(i){case 3:r^=(255&n.charCodeAt(o+2))<<16;case 2:r^=(255&n.charCodeAt(o+1))<<8;case 1:r=1540483477*(65535&(r^=255&n.charCodeAt(o)))+((1540483477*(r>>>16)&65535)<<16)}return r=1540483477*(65535&(r^=r>>>13))+((1540483477*(r>>>16)&65535)<<16),(r^=r>>>15)>>>0},e.v3=t,n.exports=e}()},1114:function(n,t,e){n=e.nmd(n),function(){var i,r="Expected a function",o="__lodash_hash_undefined__",a=1/0,u=9007199254740991,c="[object Arguments]",s="[object Array]",f="[object Boolean]",l="[object Date]",d="[object Error]",v="[object Function]",h="[object GeneratorFunction]",p="[object Map]",g="[object Number]",m="[object Object]",_="[object RegExp]",y="[object Set]",w="[object String]",b="[object Symbol]",E="[object WeakMap]",I="[object ArrayBuffer]",A="[object Float32Array]",S="[object Float64Array]",T="[object Int8Array]",k="[object Int16Array]",R="[object Int32Array]",C="[object Uint8Array]",N="[object Uint8ClampedArray]",D="[object Uint16Array]",O="[object Uint32Array]",x=/[&<>"'`]/g,M=RegExp(x.source),P=/\w*$/,L=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,U={};U[A]=U[S]=U[T]=U[k]=U[R]=U[C]=U[N]=U[D]=U[O]=!0,U[c]=U[s]=U[I]=U[f]=U[l]=U[d]=U[v]=U[p]=U[g]=U[m]=U[_]=U[y]=U[w]=U[E]=!1;var F={};F[c]=F[s]=F[I]=F[f]=F[l]=F[A]=F[S]=F[T]=F[k]=F[R]=F[p]=F[g]=F[m]=F[_]=F[y]=F[w]=F[b]=F[C]=F[N]=F[D]=F[O]=!0,F[d]=F[v]=F[E]=!1;var B={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},z={"function":!0,object:!0},G=z[typeof t]&&t&&!t.nodeType?t:i,j=z.object&&n&&!n.nodeType?n:i,q=j&&j.exports===G?G:i,H=on(G&&j&&"object"==typeof e.g&&e.g),Y=on(z[typeof self]&&self),$=on(z[typeof window]&&window),K=on(z[typeof this]&&this),W=H||$!==(K&&K.window)&&$||Y||K||Function("return this")();function X(n,t){return n.set(t[0],t[1]),n}function J(n,t){return n.add(t),n}function Q(n,t){return tn(It(n),Ae)}function Z(n,t){return!!n.length&&rn(n,t,0)>-1}function nn(n,t,e){for(var i=-1,r=n.length;++i-1&&n%1==0&&n-1}function Xn(n,t){for(var e=n.length;e--;)if(Xt(n[e][0],t))return e;return-1}function Jn(n,t,e){var i=Xn(n,t);i<0?n.push([t,e]):n[i][1]=e}function Qn(n,t,e,r){return n===i||Xt(n,fn[e])&&!dn.call(r,e)?t:n}function Zn(n,t,e){(e!==i&&!Xt(n[t],e)||"number"==typeof t&&e===i&&!(t in n))&&(n[t]=e)}function nt(n,t,e){var r=n[t];dn.call(n,t)&&Xt(r,e)&&(e!==i||t in n)||(n[t]=e)}function tt(n){return"function"==typeof n?n:Se}function et(n,t,e,r,o,a,u){var s;if(r&&(s=a?r(n,o,a,u):r(n)),s!==i)return s;if(!ae(n))return n;var d=Zt(n);if(d){if(s=function(n){var t=n.length,e=n.constructor(t);t&&"string"==typeof n[0]&&dn.call(n,"index")&&(e.index=n.index,e.input=n.input);return e}(n),!t)return It(n)}else{var E=Mt(n),x=E==v||E==h;if(ie(n))return function(n,t){if(t)return n.slice();var e=new n.constructor(n.length);return n.copy(e),e}(n,t);if(E==m||E==c||x&&!a){if(un(n))return a?n:{};if(s=function(n){return"function"!=typeof n.constructor||Vt(n)?{}:it(En(n))}(x?{}:n),!t)return s=function(n,t){return n&&Tt(t,ye(t),n)}(s,n),e?Rt(n,s):s}else{if(!F[E])return a?n:{};s=function(n,t,e){var i=n.constructor;switch(t){case I:return St(n);case f:case l:return new i(+n);case A:case S:case T:case k:case R:case C:case N:case D:case O:return function(n,t){var e=t?St(n.buffer):n.buffer;return new n.constructor(e,n.byteOffset,n.length)}(n,e);case p:return function(n){return jt(function(n){var t=-1,e=Array(n.size);return n.forEach((function(n,i){e[++t]=[i,n]})),e}(n),X,new n.constructor)}(n);case g:case w:return new i(n);case _:return function(n){var t=new n.constructor(n.source,P.exec(n));return t.lastIndex=n.lastIndex,t}(n);case y:return jt(function(n){var t=-1,e=Array(n.size);return n.forEach((function(n){e[++t]=n})),e}(o=n),J,new o.constructor);case b:return r=n,Un?Object(Un.call(r)):{}}var r;var o}(n,E,t)}}u||(u=new Yn);var M=u.get(n);return M||(u.set(n,s),(d?ut:lt)(n,(function(i,o){nt(s,o,et(i,t,e,r,o,n,u))})),e&&!d?Rt(n,s):s)}function it(n){return ae(n)?An(n):{}}function rt(n,t,e){if("function"!=typeof n)throw new TypeError(r);return setTimeout((function(){n.apply(i,e)}),t)}var ot,at,ut=(ot=lt,function(n,t){if(null==n)return n;if(!ne(n))return ot(n,t);for(var e=n.length,i=at?e:-1,r=Object(n);(at?i--:++i0&&te(a)&&(e||Zt(a)||Qt(a))?t>1?st(a,t-1,e,i):tn(i,a):e||(i[i.length]=a)}return i}var ft=function(n){return function(t,e,i){for(var r=-1,o=Object(t),a=i(t),u=a.length;u--;){var c=a[n?u:++r];if(!1===e(o[c],c,o))break}return t}}();function lt(n,t){return n&&ft(n,t,ye)}function dt(n,t){return ct(t,(function(t){return re(n[t])}))}function vt(n,t,e,r,o){return n===t||(null==n||null==t||!ae(n)&&!ue(t)?n!=n&&t!=t:function(n,t,e,r,o,a){var u=Zt(n),v=Zt(t),h=s,p=s;u||(h=(h=pn.call(n))==c?m:h);v||(p=(p=pn.call(t))==c?m:p);var y=h==m&&!un(n),b=p==m&&!un(t),E=h==p;a||(a=[]);var I=zt(a,(function(t){return t[0]===n}));if(I&&I[1])return I[1]==t;if(a.push([n,t]),E&&!y){var A=u||fe(n)?function(n,t,e,r,o,a){var u=-1,c=2&o,s=1&o,f=n.length,l=t.length;if(f!=l&&!(c&&l>f))return!1;var d=!0;for(;++ur?0:r+t),(e=e>r?r:e)<0&&(e+=r),r=t>e?0:e-t>>>0,t>>>=0;for(var o=Array(r);++i1?e[o-1]:i;for(a="function"==typeof a?(o--,a):i,t=Object(t);++r0&&(e=t.apply(this,arguments)),n<=1&&(t=i),e}}var Ht=Wt((function(n,t,e){return Nt(n,33,t,e)})),Yt=Wt((function(n,t){return rt(n,1,t)})),$t=Wt((function(n,t,e){return rt(n,ve(t)||0,e)}));var Kt=Wt((function(n,t){return Nt(n,32,i,t)}));function Wt(n,t){if("function"!=typeof n)throw new TypeError(r);return t=Cn(t===i?n.length-1:de(t),0),function(){for(var e=arguments,i=-1,r=Cn(e.length-t,0),o=Array(r);++it}function Qt(n){return te(n)&&dn.call(n,"callee")&&(!Sn.call(n,"callee")||pn.call(n)==c)}var Zt=Array.isArray;function ne(n){return null!=n&&oe(Dt(n))&&!re(n)}function te(n){return ue(n)&&ne(n)}var ee,ie=(ee=!1,function(){return ee});function re(n){var t=ae(n)?pn.call(n):"";return t==v||t==h}function oe(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=u}function ae(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function ue(n){return!!n&&"object"==typeof n}function ce(n){return"number"==typeof n||ue(n)&&pn.call(n)==g}function se(n){return"string"==typeof n||!Zt(n)&&ue(n)&&pn.call(n)==w}function fe(n){return ue(n)&&oe(n.length)&&!!U[pn.call(n)]}function le(n,t){return n=200&&(a=Hn,u=!1,t=new qn(t));n:for(;++ot&&!a||!o||e&&!u&&c||r&&c)return 1;if(n-1:!!r&&rn(n,t,e)>-1},Fn.indexOf=function(n,t,e){for(var i=n?n.length:0,r=((e="number"==typeof e?e<0?Cn(i+e,0):e:0)||0)-1,o=t==t;++r>>0)/r};n.exports={Seed:{IGNORING:0,BUCKETING:1,FALLBACK:2,HOLDBACK:3,BEHAVIOR_EVENT:2716770798},hashToHex:function(n,t){var e=i(n,t);return(e>>>16).toString(16)+(65535&e).toString(16)},hashToInt:function(n,t,e){return Math.floor(o(n,t)*e)},hashToReal:o,toByteString:function(n){var t=String.fromCharCode;return n.replace(/[\S\s]/gi,(function(n){n=n.charCodeAt(0);var e=t(255&n);return n>255&&(e=t(n>>>8&255)+e),n>65535&&(e=t(n>>>16)+e),e}))}}},8047:function(n,t){t.generate=function e(n){return n?(n^16*Math.random()>>n/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e)}},2288:function(n,t,e){var i=e(558),r=e(3295).get("stores/audience_data"),o=e(9896),a=e(1125),u=e(6697),c=e(9556);function s(n){var t=["type","selector","attributes","value"],e=i.extend({},n);return e.changeSet=i.map(n.changeSet,(function(n){return i.pick(c.dereferenceChangeId(n),t)})),e}t.emitLayerDecided=function(n){var t=n.decisionTicket?n.decisionTicket.audienceIds:[],e=i.map(t,(function(n){return{id:n,name:r.get(n).name}})),u={type:a.TYPES.LIFECYCLE,name:"layerDecided",data:i.extend(n,{audiences:e})},s=c.translateLayerEventToCampaignEvent(u);o.emit(u),o.emit(s)},t.emitViewActivated=function(n){var t={type:a.TYPES.LIFECYCLE,name:"viewActivated",data:n},e=c.translateViewActivatedToPageActivated(t);o.emit(t),o.emit(e)},t.emitViewsActivated=function(n){var t={type:a.TYPES.LIFECYCLE,name:"viewsActivated",data:n};o.emit(t)},t.emitPageDeactivated=function(n){var t={type:a.TYPES.LIFECYCLE,name:"pageDeactivated",data:n};o.emit(t)},t.emitActivateEvent=function(){o.emit({type:a.TYPES.LIFECYCLE,name:"activate"},!0)},t.emitActivatedEvent=function(){o.emit({type:a.TYPES.LIFECYCLE,name:"activated"})},t.emitInitializedEvent=function(){var n={type:a.TYPES.LIFECYCLE,name:"initialized"};window.optimizely&&(window.optimizely.initialized=!0),o.emit(n)},t.emitOriginsSyncedEvent=function(){var n={type:a.TYPES.LIFECYCLE,name:"originsSynced"};o.emit(n)},t.emitActionAppliedEvent=function(n){var t={type:n.type,campaignId:n.layerId,pageId:n.pageId,experimentId:n.experimentId,variationId:n.variationId};u.defineProperty(t,"changes",(function(){return s(n).changeSet}),"actionAppliedEvent");var e={type:a.TYPES.ACTION,name:"applied",data:t};o.emit(e)},t.emitActionsForDecisionAppliedEvent=function(n,t){var e={decision:n};u.defineProperty(e,"actions",(function(){return i.map(t,s)}),"appliedAllForDecisionEvent");var r={type:a.TYPES.ACTION,name:"appliedAllForDecision",data:e};o.emit(r)},t.emitSendEvents=function(){var n={type:a.TYPES.ANALYTICS,name:"sendEvents"};o.emit(n)},t.emitHoldEvents=function(){var n={type:a.TYPES.ANALYTICS,name:"holdEvents"};o.emit(n)}},7010:function(n,t,e){var i=e(558),r=e(7381),o=e(6697),a=e(9556),u=e(2676),c=e(7026);function s(n,t,e,r){var o=n.getLayerState(r),a=t.get(r),c=e.get();if(!o||!a)return c?{layer:{name:c.layerName,id:c.layerId,policy:c.layerPolicy,integrationStringVersion:c.integrationStringVersion},experiment:{name:c.experimentName,id:c.experimentId},variation:{name:c.variationName,id:c.variationId},isLayerHoldback:!1}:null;if(u.isSingleExperimentPolicy(a.policy)&&o.decision.isLayerHoldback)return null;var s,f,l=o.decision.experimentId,d=o.decision.variationId;return l&&d&&(s=i.find(a.experiments,{id:l}))&&(f=i.find(s.variations,{id:d}))?{layer:{name:a.name,id:a.id,policy:a.policy,integrationStringVersion:a.integrationStringVersion},experiment:{name:s.name,id:s.id},variation:{name:f.name,id:f.id},isLayerHoldback:o.decision.isLayerHoldback}:null}function f(n,t,e,r,o,a,s){var f=[],l=n.getLayerStates();s.onlySingleExperiments&&(l=i.filter(l,(function(n){var e=t.get(n.layerId);return e&&u.isSingleExperimentPolicy(e.policy)})));var d=e.getActiveViewIds(),v=i.map(l,(function(n){var e,r=!!n.decision.variationId,a=n.decisionActivationId&&n.decisionActivationId===o.getActivationId(),u=c.getExperimentAndVariation(),s=u?u.variationId:null,f=r&&n.decision.variationId===s,l=(null==(e=t.get(null==n?void 0:n.layerId))?void 0:e.viewIds)||[],v=i.every(l,(function(n){return!i.includes(d,n)}));return i.extend(n,{isActive:r&&a&&!v||f,visitorRedirected:f})})),h=a?i.filter(v,a):v;return i.each(h,(function(n){var e=function(n,t,e,r){var o,a,u=n.layerId,c=t.get(u)||{},s=i.map(c.experiments,(function(n){return i.pick(n,["id","name"])}));if(!r&&c.decisionMetadata&&c.decisionMetadata.offerConsistency)return;var f={id:u,campaignName:c.name||null,experiment:null,allExperiments:s,variation:null,reason:n.decision.reason,isActive:!!n.isActive,visitorRedirected:n.visitorRedirected,isInCampaignHoldback:n.decision.isLayerHoldback};n.decision&&n.decision.experimentId&&(o=i.find(c.experiments,{id:n.decision.experimentId})),o&&(f.experiment=i.pick(o,["id","name","campaignName"])),o&&n.decision.variationId&&(a=i.find(o.variations,{id:n.decision.variationId})),a&&(f.variation=i.pick(a,["id","name"]));var l=i.map(n.decisionTicket.audienceIds,(function(n){return i.pick(e.get(n),["id","name"])}));return f.audiences=l,c.decisionMetadata&&c.decisionMetadata.offerConsistency&&(f.pageId=n.pageId),f}(n,t,r,s.includeOfferConsistency);e&&f.push(e)})),f}t.data=["stores/audience_data","stores/client_metadata","stores/event_data","stores/layer_data","stores/view_data","stores/group_data","stores/interest_group","stores/tag_group","stores/global",function(n,t,e,r,u,c,s,f,l){var d={},v={},h={},p={audiences:n.getAudiencesMap(),events:e.getEventsMap(),campaigns:d,pages:u.getPagesMap(),experiments:v,variations:h,projectId:l.getProjectId(),snippetId:l.getSnippetId(),accountId:l.getAccountId(),dcpServiceId:l.getDCPServiceId(),revision:l.getRevision(),clientName:t.getClientName(),clientVersion:t.getClientVersion()},g=a.dereferenceChangeId;return i.each(r.getAll(),(function(n){o.defineProperty(d,n.id,(function(){var t=i.extend({},n);return o.defineProperty(t,"changes",(function(){return i.map(n.changes,g)}),"campaign"),o.defineProperty(t,"experiments",(function(){return i.map(n.experiments,(function(n){return v[n.id]}))}),"campaign"),t}),"campaignMap","byId"),i.each(n.experiments,(function(n){o.defineProperty(v,n.id,(function(){var t=i.extend({},n);return o.defineProperty(t,"changes",(function(){return i.map(n.changes,g)}),"experiment"),o.defineProperty(t,"variations",(function(){return i.map(n.variations,(function(n){return h[n.id]}))}),"experiment"),t}),"experimentMap","byId"),i.each(n.variations,(function(n){o.defineProperty(h,n.id,(function(){var t=i.extend({},n);return o.defineProperty(t,"actions",(function(){return i.map(n.actions,(function(n){return i.extend({},n,{changes:i.map(n.changes,g)})}))}),"variation"),t}),"variationMap","byId")}))}))})),p.groups=c.getGroupsMap(),p}],t.visitor=["stores/visitor",function(n){return i.cloneDeep(n.getVisitorProfile())}],t.visitor_id=["stores/visitor_id",function(n){return{randomId:n.getRandomId()}}],t.state=["stores/audience_data","stores/layer_data","stores/layer","stores/view_data","stores/view","stores/global","stores/observed_redirect",function(n,t,e,o,a,l,d){return{getCampaignStates:function(r){var o={},u=f(e,t,a,n,l,r,{includeOfferConsistency:!1});return i.each(u,(function(n){o[n.id]=n})),o},getExperimentStates:function(r){var o=f(e,t,a,n,l,r,{includeOfferConsistency:!1,onlySingleExperiments:!0}),u=["audiences","variation","reason","visitorRedirected","isActive"];return i.reduce(o,(function(n,t){var e=t.allExperiments[0];return n[e.id]=i.extend({},i.pick(t,u),{id:e.id,experimentName:e.name,isInExperimentHoldback:t.isInCampaignHoldback}),n}),{})},getCampaignStateLists:function(r){var o={},u=f(e,t,a,n,l,r,{includeOfferConsistency:!0});return i.each(u,(function(n){var t=n.id;o[t]||(o[t]=[]),o[t].push(n)})),o},getPageStates:function(n){var t=a.getAll(),e=i.reduce(t,(function(n,t){var e=o.get(t.id);return n[t.id]=i.extend({},i.pick(e,["id","name","apiName","category","staticConditions","tags"]),i.pick(t,["isActive","metadata"])),n[t.id].isActive=!!n[t.id].isActive,n}),{});return n?i.pickBy(e,n):e},isGlobalHoldback:function(){return l.isGlobalHoldback()},getActivationId:function(){return l.getActivationId()},getVariationMap:function(){var n=e.getLayerStates(),r={};return i.each(n,(function(n){var e=t.get(n.layerId);if(n.decision&&n.decision.experimentId&&(r[n.decision.experimentId]={id:n.decision.variationId,name:null,index:null},e)){var o=i.find(e.experiments,{id:n.decision.experimentId});if(o&&n.decision.variationId)var a=i.find(o.variations,{id:n.decision.variationId}),u=i.findIndex(o.variations,{id:n.decision.variationId});a&&(r[n.decision.experimentId]={id:n.decision.variationId,name:a.name,index:u})}})),r},getActiveExperimentIds:function(){var n={};return i.each(this.getCampaignStateLists({isActive:!0}),(function(t){i.each(t,(function(t){n[t.experiment.id]=!0}))})),i.keys(n)},getRedirectInfo:function(){var n=c.getExperimentAndVariation();return n&&(n.referrer=c.getReferrer()),n},getDecisionString:function(n){if(!n)throw new Error("Must pass a config to getDecisionString");n=i.extend({maxLength:255,shouldCleanString:!1},n);var o=s(e,t,d,n.campaignId);return o?r.generateAnalyticsString(o.layer,o.experiment,o.variation,o.isLayerHoldback,n.maxLength,n.shouldCleanString):null},getDecisionObject:function(n){if(!n)throw new Error("Must pass a config to getDecisionObject");n=i.extend({maxLength:255,shouldCleanString:!1},n);var o=s(e,t,d,n.campaignId);if(!o)return null;var a=r.formatNamesAndIdsForAnalytics(o.layer,o.experiment,o.variation,n.shouldCleanString),c=i.mapValues(a.names,(function(t,e){return r.combineAndTruncateIdAndName(t,a.idStrings[e],n.maxLength)})),f={experiment:c.experiment,variation:c.variation};return u.isSingleExperimentPolicy(o.layer.policy)||i.extend(f,{campaign:c.layer,holdback:o.isLayerHoldback}),f}}}],t.utils=e(8829).create(),t.jquery=["env/jquery",function(n){return n}],t.event_emitter=e(2465)},4731:function(n,t,e){var i=e(9402),r=e(8928),o="optimizelyDataApi";t.registerFunction=function(n,t){var e=r.getGlobal(o);e||(e={},r.setGlobal(o,e)),e[n]||(e[n]=t)},t.unregisterFunction=function(n){var t=r.getGlobal(o);t&&t[n]&&(t[n]=function(){i.log('Ignoring attempt to call "'+o+"."+n+'" which has been unregistered.')})},t.getFunction=function(n){return r.getGlobal(o)[n]}},1967:function(n,t,e){var i=e(558),r=e(9402),o=e(7010),a=e(3295),u=a.get("stores/plugins"),c=e(6654),s=e(2502),f=e(6691),l=[e(3680),e(2542),e(9859)],d=["clientMetadata","cookieDomain","disable","load","optOut","rum"];t.push=function(n,t){var e,o,a,u;if(!i.isArray(n)&&i.isObject(n))u=i.isUndefined(n.version)?1:n.version,e=n.type,a=[n];else if(i.isArray(n))u=0,e=n[0],a=n.slice(1);else{if(!i.isString(n))return r.warn("API / Ignoring non-array/object/string argument:",n),!1;u=0,e=n,a=[]}if(l[u]&&(o=l[u][e]),t&&-1===d.indexOf(e))return r.debug("API / Ignoring non high priority function:",e,a),!1;if(!o)return r.warn('API / No function found for "'+e+'" (v'+u+") with arguments:",a),!1;r.log('API / Executing: "'+e,'" with arguments:',a);try{o.apply(null,a),f.dispatch(c.RECORD_API_USAGE,{methodName:u?"v"+u+"."+e:e})}catch(s){r.error(s)}return!0},t.get=function(n){r.log('API / Getting module: "'+n+'"');var t=o[n];if(t?i.isArray(t)&&(t=a.evaluate(t)):t=u.getPlugin(s.PluginTypes.apiModules,n),t)return f.dispatch(c.RECORD_API_USAGE,{methodName:"get."+n}),t;r.warn('Module "'+n+'" not found.')}},6697:function(n,t,e){var i=e(9184),r=e(6654),o=e(6691),a=e(9402);t.defineProperty=function(n,t,e,u,c){i(n,t,(function(){var n=["prop",u,c||t].join(".");return a.debug('Evaluating getter: "'+n+'"'),o.dispatch(r.RECORD_API_USAGE,{methodName:n}),e()}),!0)}},3680:function(n,t,e){var i=e(558),r=e(2542);function o(n){var t,e={};if(n)if(a(n))t=Number(n);else{if("object"!=typeof n)throw new Error("tracker: Revenue argument "+n+"not a number.");if("revenue"in(e=i.extend({},n))){if(!a(e.revenue))throw new Error("tracker: Revenue value "+e.revenue+"not a number.");t=Number(e.revenue),delete e.revenue}}return i.isUndefined(t)||(e.revenue=t),e}function a(n){return i.isNumber(n)||i.isString(n)&&Number(n)==n}t.activateGeoDelayedExperiments=function(n,t){t||(t=n.lists?"odds":"cdn3"),r.dataFromSource({data:n,source:t})},t.activateSiteCatalyst=function(n){n&&n.sVariable&&r.integrationSettings({id:"adobe_analytics",settings:{sVariableReference:n.sVariable}})},t.bucketVisitor=function(n,t){if(n&&t){var e={experimentId:String(n)};t>256?e.variationId=String(t):e.variationIndex=String(t),r.bucketVisitor(e)}},t.bucketUser=t.bucketVisitor,t.disable=function(n){r.disable({scope:n})},t.log=function(n){i.isUndefined(n)&&(n=!0),r.log({level:n?"INFO":"OFF"})},t.optOut=function(n){i.isUndefined(n)&&(n=!0),r.optOut({isOptOut:n})},t.setCookieDomain=function(n){r.cookieDomain({cookieDomain:n})},t.setCookieExpiration=function(n){r.cookieExpiration({cookieExpirationDays:n})},t.setDimensionValue=function(n,t){var e={};e[n]=t,r.user({attributes:e})},t.setUserId=function(n){r.user({userId:n})},t.setGA4UserId=function(n){r.ga4User({ga4UserId:n})},t.storeThirdPartyData=function(n,t){r.dataFromSource({source:n,data:t})},t.trackEvent=function(n,t){r.event({eventName:n,tags:o(t)})}},9556:function(n,t,e){var i=e(558),r=e(3295),o=e(4381),a=e(6697),u=r.get("stores/change_data");t.translateDecisionToCampaignDecision=function(n){return c(i.cloneDeep(n),{layerId:"campaignId",isLayerHoldback:"isCampaignHoldback"})},t.translateLayerEventToCampaignEvent=function(n){var e={};return a.defineProperty(e,"campaign",(function(){return function(n){var e=i.cloneDeep(n);return e.changes&&(e.changes=i.map(e.changes,t.dereferenceChangeId)),e.experiments&&i.each(e.experiments,(function(n){n.changes&&(n.changes=i.map(n.changes,t.dereferenceChangeId)),n.variations&&i.each(n.variations,(function(n){n.actions&&i.each(n.actions,(function(n){n.changes&&(n.changes=i.map(n.changes,t.dereferenceChangeId))}))}))})),e}(n.data.layer)}),"campaignEvent"),e.decisionTicket=n.data.decisionTicket,e.decision=this.translateDecisionToCampaignDecision(n.data.decision),e.audiences=n.data.audiences,{type:"lifecycle",name:"campaignDecided",data:e}},t.translateViewActivatedToPageActivated=function(n){return{type:"lifecycle",name:"pageActivated",data:{page:n.data.view}}},t.dereferenceChangeId=function(n){var t=u.getChange(n);return t?o.safeReference(t):n};var c=function(n,t){var e=i.omit(n,i.keys(t));return i.each(t,(function(t,i){e[t]=n[i]})),e}},8829:function(n,t,e){var i=e(3399).Promise,r=e(6218).o,o=e(5283).poll,a=e(1312).x,u=e(5448).a;t.create=function(){return{observeSelector:r,poll:o,Promise:i,waitForElement:a,waitUntil:u}}},3189:function(n){n.exports={DEFAULT_INTERVAL:20}},6218:function(n,t,e){var i=e(558),r=(e(6654),e(3295)),o=r.get("stores/directive"),a=e(2065),u=(e(6308),e(2502),e(6691),e(8047).generate),c=e(5283),s=e(8928),f=(r.get("stores/rum"),{once:!1,onTimeout:null,timeout:null}),l={},d=function(n){d=function(){if(!o.shouldObserveChangesIndefinitely())return function(n){var t=c.poll(i.partial(h,n));l[n].cancelObservation=function(){t(),delete l[n]}};var n,t=function(){this.disconnect(),i.each(i.keys(l),h),this.observe(r,e)},e={attributes:!0,childList:!0,subtree:!0,characterData:!0},r=a.getDocumentElement();return n=new MutationObserver(t),function(t){var o=l[t];n.observe(r,e),o.cancelObservation=function(){delete l[t],i.isEmpty(l)&&n.disconnect()}}}(),d(n)};function v(n){var t=l[n];t&&t.cancelObservation&&t.cancelObservation()}function h(n){if(l[n]){if(function(n){var t=n.options.timeout;if(null!==t)if("function"==typeof t)try{return t()}catch(e){}else if(Date.now()-n.startTime>t)return!0;return!1}(l[n]))return 0===l[n].matchedCount&&i.isFunction(l[n].options.onTimeout)&&l[n].options.onTimeout(),void v(n);var t=a.querySelectorAll(l[n].selector);t.length&&(i.each(t,(function(t){t.S&&t.S[n]||l[n].callbackQueue.push(t)})),function(n){for(;l[n]&&l[n].callbackQueue.length;){var t=l[n].callbackQueue.shift();if(p(t,n),l[n].matchedCount=l[n].matchedCount+1,l[n].callback(t),l[n]&&l[n].options.once)return void v(n)}}(n))}}function p(n,t){n.S||(n.S={}),n.S[t]=!0}t.o=function(n,t,e){if(!function(n){try{a.querySelector(n)}catch(t){return!1}return!0}(n))throw new Error("observeSelector expects a valid css selector as its first argument");if(!i.isFunction(t))throw new Error("observeSelector expects a function as its second argument");if(e&&(!i.isObject(e)||i.isFunction(e)))throw new Error("observeSelector expects an object as its third argument");var r=u();return e=i.assign({},f,e||{}),l[r]={callback:t,callbackQueue:[],matchedCount:0,options:e,selector:n,startTime:Date.now()},d(r),s.setTimeout(i.bind(h,null,r),0),i.partial(v,r)}},5283:function(n,t,e){var i=e(558),r=(e(6654),e(3295)),o=(e(2502),e(6691),e(8047).generate),a=e(8928),u=e(3189).DEFAULT_INTERVAL,c=(r.get("stores/rum"),{});function s(n){c[n]&&i.each(c[n].callbacks,(function(n){n.call(null)}))}function f(n,t){c[t]&&c[t].callbacks[n]&&(delete c[t].callbacks[n],i.some(c[t].callbacks)||(clearInterval(c[t].id),delete c[t]))}t.poll=function(n,t){i.isNumber(t)||(t=u),c[t]||(c[t]={callbacks:{},id:a.setInterval(i.partial(s,t),t)});var e=o();return c[t].callbacks[e]=n,i.partial(f,e,t)},t.cancelAll=function(){i.each(c,(function(n,t){clearInterval(n.id),delete c[t]}))}},1312:function(n,t,e){var i=e(3399).Promise,r=e(6218).o;t.x=function(n){return new i((function(t,e){r(n,t,{once:!0})}))}},5448:function(n,t,e){var i=e(3399).Promise,r=e(5283).poll;t.a=function(n){return new i((function(t,e){if(n())t();else var i=r((function(){n()&&(i(),t())}))}))}},2542:function(n,t,e){var i=e(558),r=e(6654),o=e(1967),a=e(7010),u=e(2570),c=e(2502),s=e(9153),f=e(2288),l=e(5250),d=e(1416).v,v=e(1964),h=e(6228),p=(e(3795),e(8021)),g=e(9896),m=e(6691),_=e(1494),y=e(3360),w=e(9402),b=e(7895),E=(e(4396),e(4106)),I=e(9023),A=e(3295),S=A.get("stores/dimension_data"),T=A.get("stores/view"),k=A.get("stores/view_data"),R=A.get("stores/visitor_id"),C=A.get("stores/layer_data"),N=A.get("stores/directive"),D=!1,O=t.ApiListenerError=d("ApiListenerError");t.event=function(n){var t;switch(n.eventType){case"click":t=function(n){var t;return n.eventData&&(t=p.create(n.eventData.id,n.eventData.apiName,"click",n.eventData)),function(){var n=s.trackClickEvent(t);n?w.log("API / Tracking click event:",n):w.log("API / Not tracking click event:",n)}}(n);break;case"decision":t=function(n){var t=n.eventData,e=y.createLayerState(t.layerId,t.experimentId,t.variationId,t.isLayerHoldback),i=y.createSingle(t.layerId,t.experimentId,t.variationId);return function(){y.recordLayerDecision(e.layerId,e.decisionTicket,e.decision),w.log("API / Tracking decision event:",e),s.trackDecisionEvent(e.decision,e.decisionTicket,i)}}(n);break;case"pageview":t=function(n){var t=E.create(n.eventData.id,n.eventData.apiName),e=E.createState(t.id);return function(){var n=s.trackViewActivation(t,e);n?w.log("API / Tracking pageview event:",n):w.log("API / Not tracking pageview event:",n)}}(n);break;default:t=function(n){var t;return n.eventId&&(t=p.create(n.eventId,n.eventName,"custom")),E.updateAllViewTags(),function(){s.trackCustomEvent(n.eventName,n.tags,t,n.properties)?w.log("API / Tracking custom event:",n.eventName,n.tags):w.log("API / Not tracking custom event:",n.eventName)}}(n)}R.getBucketingId()?t():m.dispatch(r.ADD_CLEANUP_FN,{lifecycle:c.Lifecycle.postActivate,cleanupFn:t})},t.clientMetadata=function(n){D},t.priorRedirectString=function(n){},t.microsnippetError=function(n){},t.rum=function(n){m.dispatch(r.SET_RUM_DATA,n.eventData)},t.initialViewStates=function(n){var t=i.map(n.states,(function(n,t){return{id:t,isActive:n}}));E.registerViews(t)},t.page=function(n){var t=k.getByApiName(n.pageName);if(!t)throw new Error('Unknown page "'+n.pageName+'"');var e=!n.hasOwnProperty("isActive")||n.isActive,i=function(){e?E.activateViaAPI(t,n.tags):(E.deactivate(t),w.log("API / Deactivated Page",E.description(t)))};R.getBucketingId()?i():m.dispatch(r.ADD_CLEANUP_FN,{lifecycle:c.Lifecycle.postViewsActivated,cleanupFn:i})},t.tags=function(n){E.setGlobalTags(n.tags)},t.user=function(n){w.log("API / Setting visitor custom attributes:",n.attributes),i.each(n.attributes,(function(n,t){var e,i,r=t,o=S.getById(t)||S.getByApiName(t);o&&(r=o.id,e=o.apiName,i=o.segmentId||o.id);var a={id:i,value:n};e&&(a.name=e),x(r,a,!0)}))},t.ga4User=function(n){n.ga4UserId?(w.log("API / Setting ga4 user id in the global store:",n.ga4UserId),m.dispatch(r.SET_GA4_USER_ID,n)):w.error('API / Argument "ga4UserId" is missing')};var x=function(n,t,e){var i=[{key:e?["custom",n]:[n],value:t,metadata:{lastModified:v.now()}}],o=function(){m.dispatch(r.SET_VISITOR_ATTRIBUTES,{attributes:i})};R.getBucketingId()?o():m.dispatch(r.ADD_CLEANUP_FN,{lifecycle:c.Lifecycle.postVisitorProfileLoad,cleanupFn:o})};t.optOut=function(n){var t=!n.hasOwnProperty("isOptOut")||n.isOptOut;h.setOptOut(t)},t.cookieExpiration=function(n){var t=n.cookieExpirationDays;t<90&&(w.error('Argument "cookieExpirationDays"=',t,"less than minimum days:",90,", setting to minimum."),t=90),w.log("API / Setting cookie age to",t,"days."),m.dispatch(r.SET_COOKIE_AGE,86400*t)},t.extendCookieLifetime=function(n){n=i.extend({isEnabled:!0},n),w.log("API / Setting cookie automatic lifetime extension to",n.isEnabled),m.dispatch(r.SET_COOKIE_AUTO_REFRESH,n.isEnabled)},t.cookieDomain=function(n){w.log("API / Setting cookie domain to",n.cookieDomain),m.dispatch(r.SET_COOKIE_DOMAIN,n.cookieDomain)},t.disable=function(n){if(n.scope){if("tracking"!==n.scope)throw new Error('Unknown "scope" for disable: '+n.scope);w.log("API / Disabling tracking"),m.dispatch(r.LOAD_DIRECTIVE,{trackingDisabled:!0})}else w.log("API / Disabling everything"),m.dispatch(r.LOAD_DIRECTIVE,{disabled:!0})},t.log=function(n){var t=n.level,e=n.match;i.isUndefined(t)&&(t="INFO"),i.isUndefined(e)&&(e=""),w.setLogMatcher(e),w.setLogLevel(t)},t.registerModule=function(n){var t="custom/"+n.moduleName;if(a[t]||o.get(t))throw new Error('Module name "'+t+'" is reserved. Will not be registered as plugin.');b.registerApiModule(t,n.module)},t.dataFromSource=function(n){var t=n.source;l.makeAsyncRequest(t),l.resolveRequest(t,n.data)},t.addListener=function(n){if(!i.isFunction(n.handler))throw new Error("A handler function must be supplied");(n=i.omit(n,"type")).publicOnly=!0,n.emitErrors=!0;var t=n.handler;n.handler=function(n){try{return t(n)}catch(e){throw new O(e)}},g.on(n)},t.removeListener=function(n){if(!n.token)throw new Error("Must supply a token to removeListener");g.off(n.token)},t.load=function(n){n.data=i.extend({},n.data),u.normalizeClientData(n.data),m.dispatch(r.DATA_LOADED,{data:n.data})},t.integrationSettings=function(n){if(!n.id)throw new Error("id is required");if(!n.settings)throw new Error("settings is required");m.dispatch(r.SET_INTEGRATION_SETTINGS,i.extend({},n.settings,{id:n.id}))},t.bucketVisitor=function(n){if(!n.variationId&&i.isUndefined(n.variationIndex)||n.variationId&&n.variationIndex)throw new Error("One of a variationId or a variationIndex is required.");if(!n.experimentId)throw new Error("An experimentId is required.");var t,e,r=n.campaignId;if(r){if(!(t=C.get(r)))throw new Error("Could not find layer "+r)}else if(!(r=(t=C.getLayerByExperimentId(n.experimentId)).id))throw new Error("Could not find layer for experiment "+n.experimentId);if(!(e=i.find(t.experiments,{id:n.experimentId})))throw new Error("Could not find experiment "+n.experimentId+" in layer "+r);var o=n.variationId;if(i.isUndefined(n.variationIndex)){if(!i.find(e.variations,{id:o}))throw new Error("Cound not find variation "+o+" in experiment "+n.experimentId)}else if(!(o=e.variations[n.variationIndex].id))throw new Error("Could not find variation at index "+n.variationIndex+" in experiment "+n.experimentId);I.updateVariationIdMap(r,n.experimentId,o),R.getBucketingId()&&I.persistVariationIdMap(),I.updateContextualMabMap(r,n.experimentId,{variationId:o}),R.getBucketingId()&&I.persistContextualMabMap()},t.waitForOriginSync=function(n){if(!i.isArray(n.canonicalOrigins))throw new Error("canonicalOrigins must be an array. Got: "+_.stringify(n.canonicalOrigins));i.each(n.canonicalOrigins,(function(n){if(!i.isString(n))throw new Error("Each item in canonicalOrigins must be a string. Found type "+(void 0===n?"undefined":(t=n)&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t));var t})),m.dispatch(r.XDOMAIN_SET_CANONICAL_ORIGINS,{canonicalOrigins:n.canonicalOrigins})},t.disableCrossOrigin=function(){w.log("API / cross origin tracking is DISABLED"),m.dispatch(r.XDOMAIN_SET_DISABLED,{disabled:!0})},t.activate=function(){N.shouldActivate()?(i.forEach(T.getActiveViewStates(),(function(n){E.deactivate(k.get(n.id))})),m.dispatch(r.RESET_VIEW_STATES),f.emitActivateEvent()):w.debug("Not activating.")},t.sendEvents=function(){f.emitSendEvents()},t.holdEvents=function(){f.emitHoldEvents()}},9859:function(){},3710:function(n,t,e){var i=e(558),r=e(1416).v,o=t.ActivationCodeError=r("ActivationCodeError"),a=t.ProjectJSError=r("ProjectJSError"),u=(e(2197),e(6654)),c=e(9153),s=e(2288),f=e(4281),l=e(5095),d=e(2570),v=e(1964),h=e(6217),p=e(3295),g=e(6228),m=e(2065),_=e(2502),y=e(9896),w=e(1125),b=e(6494),E=e(6691),I=e(6014),A=e(3360),S=e(6283).DT,T=e(9402),k=e(3746),R=e(9080),C=e(7895),N=e(6867),D=e(3399).Promise,O=e(7065),x=e(4396),M=e(6495),P=e(2305),L=e(4106),V=e(9023),U=e(8928),F=(p=e(3295)).get("stores/session"),B=p.get("stores/audience_data"),z=p.get("stores/action_data"),G=p.get("stores/cleanup"),j=p.get("stores/directive"),q=p.get("stores/global"),H=p.get("stores/group_data"),Y=p.get("stores/layer_data"),$=p.get("stores/layer"),K=p.get("stores/pending_events"),W=p.get("stores/plugins"),X=p.get("stores/rum"),J=p.get("stores/visitor"),Q=p.get("stores/view_data"),Z=p.get("stores/view"),nn=p.get("stores/visitor_id"),tn=p.get("stores/visitor_bucketing"),en=p.get("stores/xdomain"),rn=e(1967),on=e(3795),an=e(844),un=t;function cn(){var n=null;i.isNumber(n)&&0===Y.getCount()?(T.log("Activating after delay of",n,"ms because no Experiments are running"),E.dispatch(u.SET_RUM_DATA,{data:{activateDfd:!0}}),U.setTimeout(s.emitActivateEvent,n)):s.emitActivateEvent()}function sn(n){on.handleError(n.data.error,n.data.metadata)}function fn(n,t){E.dispatch(u.SET_RUM_DATA,{data:{extras:{xdAttempt:n,xdError:t?t.toString():void 0}}})}function ln(n,t,e){n=n||[];var r=q.getGlobalHoldbackThreshold(),o=nn.getBucketingId();if(!o)throw new Error("bucketingId not set");var a,u=J.getVisitorProfile();t&&(a=tn.getVariationIdMap()[t.id]);var c={bucketingId:o,visitorProfile:u,audiences:n,globalHoldback:r,preferredVariationMap:a,layer:t};return t&&e&&h.isPageIdRelevant(t)?i.map(e,(function(n){return h.createTicket(i.extend({},c,{pageId:n}))})):[h.createTicket(c)]}function dn(n,e,r,o){try{var a=function(n){return{bucketingId:nn.getBucketingId(),preferredLayerId:tn.getPreferredLayerMap()[n.id]}}(o),c=h.decideGroup(o,a);if(c.reason)return T.debug("Not activating Group",I.description(o),"; reason:",c.reason),X.getSampleRum()&&E.dispatch(u.RECORD_LAYER_FEATURE_USAGE,{feature:"mutex",entityId:o.id}),D.resolve();var s=Y.get(c.layerId);if(!s)return T.debug("Visitor was bucketed into a Campaign ("+c.layerId+") which is not in this snippet"),D.resolve();var f=i.filter(s.pageIds,i.partial(i.includes,r));return i.isEmpty(f)?(T.debug("Not activating Group",I.description(o),"; reason: visitor was bucketed into a Campaign/Experiment not related to the currently-activating Page(s)"),D.resolve()):(X.getSampleRum()&&E.dispatch(u.RECORD_LAYER_FEATURE_USAGE,{feature:"mutex",entityId:o.id}),t.decideAndExecuteLayerASAP(n,e,f,s))}catch(l){return T.error("Error getting decision for Group",I.description(o),"; ",l),D.reject(l)}}function vn(n,t){var e={};return i.each(n,(function(n){i.isArray(n)?i.extend(e,vn(n,t)):i.isObject(n)&&t[n.type]&&(e[n.type]=!0)})),e}function hn(n){var t=[];return i.each(n,(function(n){t.push(n.name,n)})),t}function pn(n){var t=G.getCleanupFns(n);if(t.length>0){for(;t.length>0;)t.shift()();E.dispatch(u.CLEAR_CLEANUP_FN,{lifecycle:n})}}t.initialize=function(n){return this.initGlobalStore(n.clientData),this.initializePlugins(n.plugins)},t.initGlobalStore=function(n){d.normalizeClientData(n),y.on({filter:{type:"error"},handler:sn}),E.dispatch(u.DATA_LOADED,{data:n}),T.log("Initialized with DATA:",n)},t.initializePlugins=function(n){if(i.isArray(window.optimizely)&&(window.optimizely=i.filter(window.optimizely,(function(n){var t=!0;return!rn.push(n,t)}))),g.setOptOut(j.shouldOptOut()),!j.isDisabled()&&!j.shouldOptOut()){an.queueBeacons(),m.isReady()?E.dispatch(u.SET_DOMCONTENTLOADED):m.addReadyHandler((function(){E.dispatch(u.SET_DOMCONTENTLOADED)})),R.time("projectJS");var e=q.getProjectJS();if(i.isFunction(e))try{b.apply(e)}catch(v){T.error("Error while executing projectJS: ",v),l.emitError(new a(v))}R.timeEnd("projectJS"),i.each(n||[],(function(n){try{n(C)}catch(v){l.emitInternalError(v)}})),i.each(q.getPlugins()||[],(function(n){try{b.apply(n,[C])}catch(v){l.emitError(v)}})),x.load();var r=y.on({filter:{type:"lifecycle",name:"activated"},handler:function(){J.observe(V.persistVisitorProfile),$.observe(V.persistLayerStates),F.observe(V.persistSessionState),K.observe(k.persistPendingEvents),tn.observe(V.persistVisitorBucketingStore),y.off(r)}});y.on({filter:{type:"lifecycle",name:"viewsActivated"},handler:t.onViewsActivated}),y.on({filter:{type:"lifecycle",name:"pageDeactivated"},handler:t.onPageDeactivated}),t.initializeApi();var o=k.getPendingEvents();if(o&&(E.dispatch(u.LOAD_PENDING_EVENTS,{events:o}),k.retryPendingEvents(o)),y.on({filter:{type:"lifecycle",name:"activate"},handler:t.activate}),s.emitInitializedEvent(),!j.shouldActivate())return D.resolve();var c=[];if(en.isDisabled())cn();else{var f=t.initializeXDomainStorage();if(c.push(f),Boolean(en.getCanonicalOrigins())){var d=M.makeTimeoutPromise(1e3);D.race([f,d])["catch"]((function(n){T.error("Failed to initialize xDomain storage: ",n)})).then(cn)["catch"](on.handleError)}else cn()}return D.all(c)}T.log("Controller / Is disabled")},t.activate=function(){try{var n=[];T.log("Activated client"),pn(_.Lifecycle.preActivate);var t=v.now();E.dispatch(u.ACTIVATE,{activationId:String(t),activationTimestamp:t});var e=Q.getAll();L.registerViews(e),V.setId(V.getOrGenerateId()),n.push(c.trackPostRedirectDecisionEvent()),E.dispatch(u.MERGE_VARIATION_ID_MAP,{variationIdMap:V.getVariationIdMap()}),E.dispatch(u.MERGE_CONTEXTUAL_MAB_MAP,{contextualMabMap:V.getContextualMabMap()}),E.dispatch(u.SET_ODP_SEGMENTS,V.getOdpSegments()),E.dispatch(u.MERGE_PREFERRED_LAYER_MAP,{preferredLayerMap:V.getPreferredLayerMap()}),pn(_.Lifecycle.postVisitorProfileLoad),n.push((p=W.getAllPlugins(_.PluginTypes.visitorProfileProviders),g=J.getVisitorProfile(),V.populateEagerVisitorData(p,g)).then((function(){T.log("Populated visitor profile")})));var r=ln(),o=h.decideGlobal(r);T.log("Made global decision",r,"->",o),E.dispatch(u.RECORD_GLOBAL_DECISION,o);var a=c.trackClientActivation();a?T.log("Tracked activation event",a):T.log("Not tracking activation event");var f=un.setUpViewActivation(e),d=[];return i.each(f,(function(n){d=d.concat(L.activateMultiple([n]))})),pn(_.Lifecycle.postViewsActivated),pn(_.Lifecycle.postActivate),s.emitActivatedEvent(),D.all(n).then((function(){y.emit({type:w.TYPES.LIFECYCLE,name:"activateDeferredDone"}),T.log("All immediate effects of activation resolved")}),l.emitError)}catch(m){return l.emitError(m),D.reject(m)}var p,g},un.setUpViewActivation=function(n){var t=[];return i.each(n,(function(n){i.isBoolean(Z.getViewState(n.id).isActive)&&L.isActivationTypeImmediate(n.activationType)?T.debug("Skipping page: already evaluated, presumably at the edge",L.description(n)):L.shouldTriggerImmediately(n.activationType)?t.push(n):n.activationType===_.ViewActivationTypes.callback?(T.debug("Setting up conditional activation for Page",L.description(n)),un.activateViewOnCallback(n)):n.activationType===_.ViewActivationTypes.polling?(T.debug("Setting up polling activation for Page",L.description(n)),N.pollFor(i.partial(b.apply,n.activationCode),null,i.partial(P.isTimedOut,v.now())).then((function(){L.activateMultiple([n])}))["catch"]((function(t){T.warn("Failed to activate view ",n,t)}))):n.activationType!==_.ViewActivationTypes.manual&&l.emitError(new Error("Unknown view activationType: "+n.activationType))})),t},un.activateViewOnCallback=function(n){var t={pageId:n.id};Object.defineProperty(t,"isActive",{get:function(){return Z.isViewActive(n.id)}});try{b.apply(n.activationCode,[function(t){var e=i.extend({},t,{pageName:n.apiName,type:"page"});rn.push(e)},t])}catch(r){var e=new o("("+r.toString()+") in activationCode for "+L.description(n));l.emitError(e,{originalError:r,userError:!0})}},t.onViewsActivated=function(n){var e,r=n.data.views,o=i.map(r,"id");try{if(!nn.getBucketingId())throw new Error("View activated with no visitorId set");var a=function(n){var e=Y.getAllByPageIds(n),r=j.getForceVariationIds(),o=j.getForceAudienceIds(),a=!i.isEmpty(r);a&&T.log("Force variations are in use. Disabling mutual exclusivity.");var u=a?{individual:e}:i.reduce(e,(function(n,t){return t.groupId?n.groups[t.groupId]||(n.groups[t.groupId]=H.get(t.groupId)):n.individual.push(t),n}),{groups:{},individual:[]});T.log("Deciding Campaigns/Experiments for Page(s)",n);var c=i.map(u.groups,I.description).join(", ");T.log("Groups:",c);var s=i.map(u.individual,A.description).join(", ");T.log("Campaigns/Experiments not in Groups (by Campaign id):",s);var f=i.map(u.groups,i.partial(dn,r,o,n))||[],l=i.map(u.individual,(function(e){var a=i.filter(e.pageIds,i.partial(i.includes,n));return t.decideAndExecuteLayerASAP(r,o,a,e)})),d=f.concat(l);return D.all(d).then((function(t){var e=i.filter(t,(function(n){return!!n}));return T.log("All Campaigns/Experiments for Page(s) (by Campaign id)",n,"resolved:",i.map(e,A.description).join(", ")),e}))}(o)["catch"](l.emitError);return e=D.all(i.map(r,(function(n){var t=function(){L.parseViewTags(n);var t=c.trackViewActivation(n);t?T.log("Tracked activation for Page",L.description(n),t):T.log("Not Tracking activation for Page",L.description(n))};return m.isReady()?D.resolve(t()):N.pollFor(m.isReady,1e3).then(t)}))),D.all([a,e])}catch(u){l.emitError(u)}},t.onPageDeactivated=function(n){var t=n.data.page,e=z.getAllActionIdsByPageId(t.id);i.each(e,(function(n){var e=z.getActionState(n);e&&(i.each(e,(function(n,e){if(n.cancel)try{n.cancel(),T.debug("Controller / Canceled change",e,"observation due to deactivation of page:",t)}catch(i){T.error("Controller / Error canceling change",e,"observation upon deactivation of page.",i)}if(t.undoOnDeactivation&&n.undo)try{n.undo(),T.debug("Controller / Undid change",e,"due to deactivation of page:",t)}catch(r){T.error("Controller / Error undoing change upon deactivation of page.",r)}})),E.dispatch(u.REMOVE_ACTION_STATE,{actionId:n}),T.debug("Controller / Undid changes and/or canceled change observation due to deactivation of page:",t,n))}))},t.initializeApi=function(){var n={push:rn.push};n.get=rn.get;var t=window.optimizely;i.isArray(t)&&i.each(t,(function(t){n.push(t)})),n.data={note:"Obsolete, use optimizely.get('data') instead"},n.state={},window.optimizely=n},t.persistItemsWithId=function(n){return i.each(n,(function(n,t){V.checkKeyForVisitorId(t)&&S.setItem(t,n)})),n},t.initializeXDomainStorage=function(){var n=e(5266),r=!!V.getCurrentId(),o=!!r&&V.hasSomeData();r?o?T.log("xd / Existing visitor; has data on this origin"):T.log("xd / Existing visitor; new to this origin"):T.log("xd / New visitor");var a=q.getAccountId(),c="https://a21125881217.cdn.optimizely.com".replace("__SUBDOMAIN__","a"+a+"."),f="/client_storage/a"+a+".html";n.subscribe((function(n,t){V.checkKeyForVisitorId(n)&&S.setItem(n,t)}));var l=n.fetchAll().then((function(t){if(!nn.getVisitorIdLocator()){var e=en.getCanonicalOrigins();if(e){var i=n.getXDomainUserId(t,e);i&&(T.log("Syncing cross-origin visitor randomId:",i),V.maybePersistVisitorId({randomId:i}))}}return V.deleteOldForeignData(),t})).then(t.persistItemsWithId).then((function(n){if(V.loadForeignData(),r&&!o){var t=!i.isEmpty(n);T.debug("xd / Loaded foreign data? ",t),fn(t)}T.log("Loaded visitor data from foreign origins"),s.emitOriginsSyncedEvent()}),(function(n){throw r&&!o&&(T.debug("xd / Failed to load foreign data:",n),fn(!1,n)),n}));return D.all([n.load(c,f)["catch"]((function(n){throw T.debug("xd / Failed to load iframe:",n),r&&!o&&fn(!1,n),n})),l["catch"]((function(n){T.debug("xd / Ignored error syncing foreign data (expected if waitForOriginSync used):",n.message),T.debug("xd / Enqueuing sync to happen after visitorId set."),E.dispatch(u.ADD_CLEANUP_FN,{lifecycle:_.Lifecycle.postVisitorProfileLoad,cleanupFn:s.emitOriginsSyncedEvent})}))])},t.decideAndExecuteLayerASAP=function(n,e,r,o){return new D((function(a,l){try{!function(n,t,e,r,o){if(t.length||e.length)return void o(ln([],void 0,r));var a=A.relatedAudienceIds(n),c=i.reduce(a,(function(n,t){var e=B.get(t);return!e||n.push(e),n}),[]),s=W.getAllPlugins(_.PluginTypes.audienceMatchers);if(X.getSampleRum()){var l={};if(i.each(c,(function(n){i.extend(l,vn(n.conditions,s))})),!i.isEmpty(l)){var d=i.keys(l);E.dispatch(u.RECORD_AUDIENCE_USAGE,{audienceTypes:d,layerId:n.id})}}var v=function(n){T.debug("Audience list for extracting types",n);try{var t=new Set(i(n).map("conditions").flattenDeep().filter((function(n){return"string"!=typeof n})).map("type").value());return t.has("time_and_day")&&t.add("currentTimestamp"),T.debug("Extracted unique types from audiences",t),t}catch(e){return T.error("An error occurred while extracting types from audiences:",e),new Set}}(c),h=W.getAllPlugins(_.PluginTypes.visitorProfileProviders),p=J.getVisitorProfile();V.populateLazyVisitorData(h,p,v),function(n,t,e,r){var o=i.reduce(n,(function(n,e){return i.extend(n,f.requiredAudienceFieldsForConditions(e.conditions,t))}),{}),a=i.reduce(o,(function(n,t){if(i.isUndefined(V.getAttribute(t))){var e=V.getPendingAttributeValue(t);i.isUndefined(e)||n.push(e)}return n}),[]);if(0===a.length)return r();var u=[].concat(n),c=O.firstToResolve(i.map(a,(function(n){return D.resolve(n).then((function(){var n=J.getVisitorProfile();if(u=i.filter(u,(function(e){return i.isUndefined(f.isInAudience(n,e,t))})),!i.isEmpty(u))throw new Error("At least one audience is still pending")}))})));D.race([c,new D((function(n,t){U.setTimeout(t,e)}))]).then((function(){T.log("Activating Campaign after pending Audiences resolved",n),r()}),(function(){T.log("Activating Campaign after timeout on Audiences",n),r()}))}(c,s,A.getActivationTimeout(n),(function(){var t=ln(c,n,r);i.map(t,(function(t){!function(n,t,e){var r=i.map(n.audienceIds,i.bind(B.get,B)),o=i.filter(t,(function(t){return!i.includes(n.audienceIds,t.id)}));T.log("When deciding Campaign",A.description(e),"visitor is in audiences:",hn(r),"and not in audiences:",hn(o))}(t,c,n)})),o(t)}))}(o,n,e,r,(function(f){i.each(f,(function(a){var f=a.pageId?[a.pageId]:r;T.debug("Deciding layer: ",o,"with decisionTicket: ",a,"and actionViewIds: ",f),function(n,e,r,o,a){var f=A.description(n);T.log("Activating Campaign",f,"on Page(s)",o),r.length&&(T.log("Applying force audienceIds:",r,"to Campaign",f),(a=i.cloneDeep(a)).audienceIds=r);var l=t.decideLayer(n,a,e),d=!(!e.length&&!r.length),v=t.getActionsForDecision(n,l,d);!function(n,t){i.filter(n,(function(n){return i.isUndefined(n.pageId)||i.includes(t,n.pageId)}))}(v.actions,o);if(T.warn("Not preparing actions because LIVE_CHANGES is false"),i.forEach(o,(function(){c.trackDecisionEvent(l,a)})),s.emitLayerDecided({layer:n,decisionTicket:a,decision:l}),l.error)throw l.error;if(X.getSampleRum()){E.dispatch(u.RECORD_LAYER_POLICY_USAGE,{policy:n.policy,layerId:n.id});var p=function(n){var t={};return i.each(n,(function(n){i.each(n.changeSet,(function(n){t[n.type]||(t[n.type]=!0)}))})),t}(v.actions);E.dispatch(u.RECORD_CHANGE_TYPE_USAGE,{changeTypes:i.keys(p),layerId:n.id}),i.isEmpty(n.integrationSettings)||E.dispatch(u.RECORD_INTEGRATION_USAGE,{integrations:A.getIntegrationTypes(n),layerId:n.id})}if(!h.isInCohort(l))return void T.log("Not activating Campaign: "+A.description(n)+"; not in the cohort because:",l.reason);T.warn("Not executing actions because LIVE_CHANGES is false")}(o,n,e,f,a)})),a(o)}))}catch(d){T.error("Error getting decision for Campaign: "+A.description(o),d),l(d)}}))},t.decideLayer=function(n,t,e){var i;var r=A.description(n);i=e.length?h.getDummyLayerDecision(n,e):h.decideLayer(n,t),T.log("Recording decision for Campaign",r,t,"->",i),A.recordLayerDecision(n.id,t,i),i.variationId&&i.experimentId&&V.updateVariationIdMap(n.id,i.experimentId,i.variationId),n.groupId&&V.updatePreferredLayerMap(n.groupId,n.id);return i},t.getActionsForDecision=function(n,t,e){var i=A.description(n),r="NOT applying changes for Campaign",o={actions:[],maybeExecute:!1};if(o.actions=[].concat(z.getLayerActions(t.layerId)||[],z.getExperimentActions(t.experimentId)||[],z.getExperimentVariationActions(t.experimentId,t.variationId)||[]),!e&&q.isGlobalHoldback())return T.log(r,i,"(visitor is in global holdback)"),o;if(t.isLayerHoldback)return T.log(r,i,"(visitor is in layer holdback)"),o;if(!t.experimentId||!t.variationId)return T.log(r,i,"(visitor is not eligible for any Experiments)"),o;return o.maybeExecute=!0,T.log("Got Actions for Campaign:",i,o.actions),o}},268:function(n,t,e){var i=e(3399).Promise,r=e(1964),o=e(3295).get("stores/plugins"),a=e(2502),u=e(9402);t.create=function(n,t,e){var c={identifier:n.id,action:t,startTime:e||r.now()};try{var s=o.getPlugin(a.PluginTypes.changeAppliers,n.type);if(!s)throw new Error("Unrecognized change type "+n.type);return new s(n,c)}catch(l){u.error("Change applier was never properly constructed:",l);var f={apply:function(){return i.reject(l)}};return f}}},7044:function(n){n.exports={SELECTOR_POLLING_MAX_TIME:2e3,CHANGE_DATA_KEY:"optimizelyChangeData",CHANGE_ID_ATTRIBUTE_PREFIX:"data-optly-"}},2197:function(n,t,e){var i=e(558),r=e(6654),o=e(5095),a=e(5250),u=e(1416).v,c=e(1964),s=e(3295),f=e(6691),l=e(9402),d=e(3399).Promise,v=e(4765),h=s.get("stores/global"),p=s.get("stores/action_data"),g=s.get("stores/change_data"),m=s.get("stores/session"),_=e(268);e(2305).initialize();var y=u("ActionError");function w(n,t,e){if(p.getActionState(t.id)){var o=p.getChangeApplier(n.id,t.id);if(i.isUndefined(o)){var a={changeId:n.id,actionId:t.id,changeApplier:_.create(n,t,e)};f.dispatch(r.SET_CHANGE_APPLIER,a)}else l.warn("Action / Attempted to prepare a change which is already being applied: ",n)}else l.warn("Action / Attempted to prepare change for inactive action: ",t)}function b(n,t,e,r){if(!i.includes(r,t)){if(!n[String(t)]){var u=g.getChange(t);if(!u){var s="Change with id "+t+" is absent";return r.length&&(s+=" but listed as a dependency for "+r[r.length-1]),void l.warn(s)}n[String(t)]=new d((function(s){var f=i.map(u.dependencies||[],(function(i){return b(n,i,e,r.concat([t]))}));if(u.src){var h="change_"+u.src,m=a.makeAsyncRequest(h,(function(){return v.addScriptAsync("https://cdn.optimizely.com/public/21125881217/data"+u.src,(function(){a.resolveRequest(h)}))})).then((function(){var n=g.getChange(u.id);n||o.emitError(new y("Failed to load async change from src: "+u.src)),w(n,e,c.now())}));f.push(m)}d.all(f).then((function(){var n=c.now(),i=p.getChangeApplier(t,e.id);return i?(l.debug("Action / Applying change:",u),i.apply().then((function(t){t?l.log(t):l.debug("Action / Applied change for the first time in "+(c.now()-n)+"ms:",u),s()}))):(l.debug("Action / Not applying change ",t," - No changeApplier found."),void s())}))["catch"]((function(n){l.error("Action / Failed to apply change:",u,n),s()}))}))}return n[String(t)]}l.error("Change with id "+t+" has circular dependencies: "+r.concat(t))}t.prepareAction=function(n){l.debug("Action / Preparing:",n),f.dispatch(r.ACTION_EXECUTED,{actionId:n.id,sessionId:m.getSessionId(),layerId:n.layerId,pageId:n.pageId,timestamp:c.now(),activationId:h.getActivationId()});var t=c.now();i.forEach(n.changeSet,(function(e){var o=i.isObject(e)?e.id:e,a=g.getChange(o);a||(f.dispatch(r.ADD_CHANGE,e),a=g.getChange(e.id)),a.src||w(a,n,t)}))},t.executePreparedAction=function(n){l.debug("Action / Executing:",n);var t={},e=i.map(n.changeSet,(function(e){var r=i.isObject(e)?e.id:e;return b(t,r,n,[])}));return d.all(e).then((function(){l.debug("changes for action id="+n.id+" applied")}))}},2305:function(n,t,e){var i=e(7044),r=e(3295).get("stores/directive");function o(){("interactive"===document.readyState||"complete"===document.readyState)&&(t.domReadyTime=Date.now())}t.domReadyTime=null,t.initialize=function(){o(),document.addEventListener("readystatechange",o,!0)},t.isTimedOut=function(n){var e=Date.now();if(!t.domReadyTime||!n)return!1;var o=Math.max(n,t.domReadyTime);return r.isEditor()&&(o=t.domReadyTime),!(e-o0&&(this[r.FIELDS.CATEGORY]=e),o&&i.keys(o).length>0&&(this[r.FIELDS.OPTIONS]=o),i.isUndefined(a)||(this[r.FIELDS.REVENUE]=a)}function c(n,t,e,o){this.eventBase=n,this[r.FIELDS.TIME]=t,i.isUndefined(e)||(this[r.FIELDS.SESSION_ID]=e),i.isUndefined(o)||(this[r.FIELDS.SESSION_INDEX]=o)}t._=u,u.prototype.digest=function(){var n=function(n,t){return encodeURIComponent(n)+"="+encodeURIComponent(t)},t=[];if(t.push(n(r.FIELDS.NAME,this[r.FIELDS.NAME])),t.push(n(r.FIELDS.TYPE,this[r.FIELDS.TYPE])),this[r.FIELDS.CATEGORY]&&t.push(n(r.FIELDS.CATEGORY,this[r.FIELDS.CATEGORY])),this[r.FIELDS.REVENUE]&&t.push(n(r.FIELDS.REVENUE,this[r.FIELDS.REVENUE])),!this[r.FIELDS.OPTIONS])return t.join("&");var e=this[r.FIELDS.OPTIONS]||{},o=i.filter(i.keys(e),(function(n){return e.hasOwnProperty(n)}));o=o.sort();for(var a=0;au&&(a+=1),n[e-1].setFieldValue(o.FIELDS.SESSION_INDEX,a);for(i=e-1;i>0;i--)s(n[i],n[i-1],!0)}},t.reindexIfNecessary=function(n,t,e){var i=function(n){for(var t=0;t1e3&&(n=n.slice(-1e3),t=!0),b(n),I([]),t}t.initialize=function(n,t){if(!y.getInitialized()){d.T(n,t);var e=S();e.length>0&&A(e[e.length-1]);var i=k();i.length>0&&A(i[i.length-1]),c.dispatch(r.UPDATE_BEHAVIOR_STORE,{key:"initialized",value:!0})}},t.addEvent=function(n){s.debug("Behavior store: adding event",n);var t=d.k(n);A(t),I(k().concat(t)),f.reindexIfNecessary(R(),S(),k()),d.R(k()),t.t&&function(n){try{var t=Number(o.get(p.COOKIES.OPTIMIZELY_SESSION,!1));if(isNaN(t)||0!==t){var e=t?f.isTimestampInSameSession(n,t)?n:0:n;o.set(p.COOKIES.OPTIMIZELY_SESSION,e.toString(),{path:"/",encodeValue:!1},!0)}}catch(i){s.error("Error setting session cookie",i)}}(t.t)},t.getEvents=function(){return k().length>0&&(C()&&f.sessionize(S()),d.N(S()),d.R(k())),S()},t.getEventCount=function(){return k().length+S().length},d.T=function(n,t){d.D(n,t)&&(d.N(S()),d.R(k())),f.sessionize(S())},d.D=function(n,t){if(0===n.length&&0===t.length)return b([]),I([]),!1;var e=!1,i=n[0]||t[0];return w.EVENTBASE in i?(b(d.O(n)),I(d.O(t))):(e=!0,b(d.M(n)),I(d.M(t))),k().length>0&&(C(),e=!0),b(d._updateBaseMapAndMaybeDedupe(S())),d._migrateEventBasesAndUpdateStore()&&(e=!0),e},d.M=function(n){for(var t=[],e=0;eo)return r[a].entityId;throw new Error("Unable to choose candidate")}},9653:function(n,t,e){var i=e(558),r=e(6654),o=e(9367),a=e(5851),u=e(4659).b,c=e(6691),s=e(9402),f=e(2697);t.isValidExperiment=function(n,t){var e,r=i.partial(i.includes,n);return s.groupCollapsed("Decision / Evaluating audiences for experiment:",t,n),e=!t.audienceIds||a.evaluate(t.audienceIds,r),s.groupEnd(),s.debug("Decision / Experiment",t,"is valid?",e),e},t.selectVariation=function(n,t,e,a,l){if(s.debug("Decision / Selecting variation for experiment:",n.id),!n.variations||0===n.variations.length)throw new u('No variations in selected experiment "'+n.id+'"');if(!n.weightDistributions&&n.variations.length>1)throw new u('On selected experiment "'+n.id+'", weightDistributions must be defined if # variations > 1');var d;if(n.bucketingStrategy&&"impression"===n.bucketingStrategy)if(1===n.variations.length)d=n.variations[0].id;else{var v=a;d=o.chooseWeightedCandidate(e+v,n.id,n.weightDistributions)}else if(d=1===n.variations.length?n.variations[0].id:o.chooseWeightedCandidate(e,n.id,n.weightDistributions),l&&l[n.id]){s.debug("Decision / Using preferredVariationMap to select variation for experiment:",n.id);var h=l[n.id];if(!i.find(n.variations,{id:h}))return c.dispatch(r.RECORD_STICKY_BUCKETING_FEATURE,{feature:"stoppedVariation",id:n.id}),s.debug("Decision / Preferred variation:",h,"not found on experiment:",n.id,". Visitor not bucketed."),null;h!==d&&(c.dispatch(r.RECORD_STICKY_BUCKETING_FEATURE,{feature:"preferredVariation",id:n.id}),d=h)}var p=f.processCmabExperiment(n,d);p&&(d=p);var g=i.find(n.variations,{id:d});if(g)return s.debug("Decision / Selected variation:",g),g;throw new u('Unable to find selected variation: "'+d+'".')},t.getExperimentById=function(n,t){var e=i.find(n.experiments,{id:t});if(e)return e;throw new u("Unable to find selected experiment.")},t.hasVariationActionsOnView=function(n,t){return s.debug("Decision / Checking variation:",n,"for actions on pageId:",t),!!i.find(n.actions,(function(n){return n.pageId===t&&!i.isEmpty(n.changes)}))}},4659:function(n,t){function e(n){this.message=n}e.prototype=new Error,t.b=e},6217:function(n,t,e){var i=e(558),r=e(6654),o=e(5095),a=e(4281),u=e(9367),c=e(9653),s=e(4659).b,f=e(3295),l=e(2502),d=e(6691),v=e(6014),h=e(3360),p=e(9402),g=e(2676),m=f.get("stores/plugins"),_=f.get("stores/global"),y=f.get("stores/layer_data");function w(n){var t=m.getPlugin(l.PluginTypes.deciders,n);if(i.isEmpty(t))throw new Error("No deciders found for policy: "+n);return t}t.isPageIdRelevant=function(n){if(!n)return!1;var t=w(n.policy);return i.isFunction(t.includePageIdInDecisionTicket)?t.includePageIdInDecisionTicket(n):!0===t.includePageIdInDecisionTicket},t.createTicket=function(n){var t,e,r,o=i.pick(n,["bucketingId","globalHoldback","preferredVariationMap","pageId"]);return i.extend(o,{audienceIds:(t=n.visitorProfile,e=n.audiences,r=m.getAllPlugins(l.PluginTypes.audienceMatchers),i.reduce(e,(function(n,e){return a.isInAudience(t,e,r)&&n.push(e.id),n}),[])),activationId:_.getActivationId()}),o},t.decideGlobal=function(n){return{isGlobalHoldback:u.isHoldback(n.bucketingId,{id:null,holdback:n.globalHoldback})}},t.decideGroup=function(n,t){p.debug("Decision / Deciding layer for group: ",v.description(n));var e,o,a=t.preferredLayerId,c=!!a;try{(e=u.chooseWeightedCandidate(t.bucketingId,n.id,n.weightDistributions))&&"None"!==e||(o='Group traffic allocation. Visitor maps to a "hole" in the bucket space left by an experiment or campaign that\'s since been removed from the group')}catch(l){o="Group traffic allocation. Visitor maps to a point in the bucket space which has never been covered by any experiment or campaign."}if(c&&(p.debug("Decision / Using preferredLayerMap to select layer for group:",v.description(n)),a!==e&&(d.dispatch(r.RECORD_STICKY_BUCKETING_FEATURE,{feature:"preferredLayer",id:n.id}),e=a)),o)return{layerId:null,reason:o};if(!i.find(n.weightDistributions,{entityId:e})){var f="Visitor was"+(c?" sticky-":" non-sticky ")+"bucketed into a campaign ("+e+") which is not in the group";if(!c)throw new s(f);return{layerId:null,reason:f}}return{layerId:e}},t.decideLayer=function(n,t){var e,r;p.debug("Deciding: ",n,t);var a,f,l=w(n.policy),d={layerId:n.id,experimentId:null,variationId:null,isLayerHoldback:u.isHoldback(t.bucketingId,n)};if(i.isEmpty(n.experiments))throw new s("No experiments in layer.");try{if(l.decideLayer){p.debug("Decision / Using decider's custom decideLayer.");var v=l.decideLayer(n,t);e=v.experiment,r=v.variation}else p.debug("Decision / Using default decideLayer behavior."),e=l.selectExperiment(n,t.audienceIds,t.bucketingId),r=c.selectVariation(e,t.audienceIds,t.bucketingId,t.activationId,t.preferredVariationMap)}catch(h){a=h,(null!=(f=s)&&"undefined"!=typeof Symbol&&f[Symbol.hasInstance]?f[Symbol.hasInstance](a):a instanceof f)?d.reason=h.message:d.error=h}return d.experimentId=e?e.id:null,d.variationId=r?r.id:null,d.error&&(d.error.name="DecisionEngineError",o.emitError(d.error)),d},t.getDummyLayerDecision=function(n,t){var e,i=function(n,t){for(var e=0;e-1)return{experimentId:n.experiments[e].id,variationId:n.experiments[e].variations[i].id};return null}(n,t);return i?(p.log("Decision / Applying force variation:",i.variationId,"to Campaign",h.description(n)),e={layerId:n.id,variationId:i.variationId,experimentId:i.experimentId,isLayerHoldback:!1,reason:"force"}):(p.log("No variation matches ids:",t,"in Campaign",h.description(n)),e={layerId:n.id,variationId:null,experimentId:null,isLayerHoldback:!1,reason:"force"}),e},t.isInCohort=function(n){if(!n.experimentId||!n.variationId)return!1;var t=y.get(n.layerId);return!(g.isSingleExperimentPolicy(t.policy)&&n.isLayerHoldback)}},3295:function(n,t,e){var i=e(558),r=e(5626),o=e(6691),a=e(4880),u=r.create(),c={action_data:e(2014),async_request:e(1471),audience_data:e(434),change_data:e(892),cleanup:e(4973),client_metadata:e(60),cookie_options:e(2038),event_data:e(4012),event_emitter:e(900),dimension_data:e(9536),directive:e(2900),global:e(4590),history:e(4185),integration_settings:e(9667),layer:e(7932),layer_data:e(1847),log:e(3115),observed_redirect:e(5064),pending_events:e(1276),performance:e(3711),plugins:e(225),provider_status:e(6921),pending_redirect:e(8597),rum:e(1197),sandbox:e(2470),session:e(1357),tracker_optimizely:e(8256),ua_data:e(7966),view:e(984),view_data:e(9459),visitor:e(6787),visitor_attribute_entity:e(6916),visitor_events:e(5363),visitor_events_manager:e(2463),visitor_id:e(2715),visitor_bucketing:e(1994),xdomain:e(2933)};c.group_data=e(2173),o.registerStores(c),i.forOwn(c,(function(n,t){u.register("stores/"+t,o.getStore(t))})),u.register("core/plugins/matchers/key_value",a),n.exports=u},6228:function(n,t,e){var i=e(558),r=e(6654),o=e(5095),a=e(6796),u=e(1416).v,c=e(2502),s=e(6691),f=e(9402),l=t.JSONParseError=u("JSONParseError"),d=e(3080),v=e(1494),h=e(8928),p="optimizely_show_preview",g="optimizely_disable",m="optimizely_editor",_="optimizely_p13n",y="optimizely_x_audiences",w="optimizely_x",b="optimizely_show_preview",E="optimizely_opt_out",I="optimizely_token",A="optimizely_force_tracking";t.populateDirectiveData=function(){var n,t,e,u,S,T,k,R;!function(){var n="OFF",t=d.getQueryParamValue("optimizely_log");if(t){var e=t.split(":");""!==e[0]&&(n=String(e[0]).toUpperCase()),void 0!==e[1]&&f.setLogMatch(e[1])}f.setLogLevel(n)}(),function(){var n=h.getUserAgent()||"";if(!i.isString(n))return void f.warn("Directive / userAgent not a string");n=n.toLowerCase();var t=["googlebot","yahoo! slurp","bingbot","bingpreview","msnbot","keynote","ktxn","khte","gomezagent","alertsite","yottaamonitor","pingdom.com_bot","aihitbot","baiduspider","adsbot-google","mediapartners-google","applebot","catchpoint","phantomjs","moatbot","facebookexternalhit"],e=function(t){if(i.includes(n,t))return f.warn("Directive / Matches bot:",t),!0};i.some(t,e)&&(f.log("Directive / Disabling tracking"),s.dispatch(r.LOAD_DIRECTIVE,{trackingDisabled:!0}))}(),n=Boolean(i.result(window.optimizely,"initialized")),s.dispatch(r.LOAD_DIRECTIVE,{alreadyInitialized:n}),s.dispatch(r.LOAD_DIRECTIVE,{mutationObserverAPISupported:h.isMutationObserverAPISupported()}),function(){var n=a.get(c.COOKIES.OPT_OUT),t=d.getQueryParamValue(E),e="You have successfully opted out of Optimizely for this domain.",i="You are NOT opted out of Optimizely for this domain.";if("true"===t||"false"===t){var o="true"===t;s.dispatch(r.LOAD_DIRECTIVE,{shouldOptOut:o}),h.alert(o?e:i)}else n&&s.dispatch(r.LOAD_DIRECTIVE,{shouldOptOut:"true"===n})}(),function(){var n=!1,t=[p,g];t.push(m);for(var e=0;eNumber(e[o]))return 1}}return 0}},5851:function(n,t,e){var i=e(558),r=e(1494),o=e(9402),a="or",u="not";var c={};function s(n,t){var e;if(i.isArray(n)){var u,s;n[0]in c?(u=n[0],s=n.slice(1)):(u=a,s=n),o.groupCollapsed('Condition / Applying operator "'+u+'" with args',r.stringify(s));try{e=c[u](s,t),o.debug("Condition / Result:",e)}finally{o.groupEnd()}return e}return e=t(n),o.debug("Condition / Evaluated:",r.stringify(n),":",e),e}c["and"]=function(n,t){for(var e,r,o=0;o-1;case"regex":try{return!(!o||!r)&&new RegExp(n).test(String(e))}catch(f){}return!1;case"range":var a=n.split(":"),u=parseFloat(a[0]),c=parseFloat(a[1]),s=parseFloat(e);return s>=u&&s<=c;default:return!1}}},3399:function(n,t,e){n.exports=e(12)},2050:function(n,t,e){var i=e(558),r=e(9402);function o(n,t){this.sn=n,this.fn=t}o.prototype.ln=function(n){return[this.fn,n].join("$$")},o.prototype.dn=function(n){return n.replace(this.fn+"$$","")},o.prototype.setItem=function(n,t){try{this.sn.setItem(this.ln(n),t)}catch(e){r.warn("Failed to save",n,"to localStorage:",e)}},o.prototype.removeItem=function(n){this.sn.removeItem(this.ln(n))},o.prototype.getItem=function(n){var t=null;try{t=this.sn.getItem(this.ln(n))}catch(e){}return t},o.prototype.keys=function(){var n=i.keys(this.sn);return i.map(i.filter(n,i.bind((function(n){return i.includes(n,this.fn)}),this)),i.bind(this.dn,this))},o.prototype.allKeys=function(){return i.keys(this.sn)},o.prototype.allValues=function(){return i.values(this.sn)},n.exports={create:function(n,t){return new o(n,t)},mockStorage:{keys:function(){},getItem:function(n){},removeItem:function(n){},setItem:function(n,t){}}}},3746:function(n,t,e){var i=e(558),r=e(5095),o=e(2502),a=e(1494),u=e(6283).DT,c=e(9402),s=e(2170),f=e(3295).get("stores/pending_events"),l=o.StorageKeys.PENDING_EVENTS;t.persistPendingEvents=function(){try{var n=f.getEventsString();u.setItem(l,n),e(5266).setItem(l,n)}catch(t){c.warn("PendingEvents / Unable to set localStorage key, error was: ",t),r.emitInternalError(t)}},t.getPendingEvents=function(){try{return a.parse(u.getItem(l))}catch(n){return null}},t.retryPendingEvents=function(n){i.forOwn(n,(function(n,t){s.retryableRequest(n.data,t,n.retryCount)})),i.isEmpty(n)||c.log("Retried pending events: ",n)}},7895:function(n,t,e){var i=e(558),r=e(6654),o=e(3295),a=e(2502),u=e(9896),c=e(6691);t.registerApiModule=function(n,t){i.isArray(t)&&(t=o.evaluate(t)),c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.apiModules,name:n,plugin:t})},t.registerDependency=function(n,t){o.get(n)||o.register(n,t)},t.registerVisitorProfileProvider=function(n){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.visitorProfileProviders,name:n.provides,plugin:n})},t.registerViewProvider=function(n){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.viewProviders,name:n.provides,plugin:n})},t.registerAudienceMatcher=function(n,t){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.audienceMatchers,name:n,plugin:t})},t.registerViewMatcher=function(n,t){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.viewMatchers,name:n,plugin:t})},t.registerAnalyticsTracker=function(n,t){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.analyticsTrackers,name:n,plugin:t})},t.registerViewTagLocator=function(n,t){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.viewTagLocators,name:n,plugin:t})},t.registerAudiencePlugin=function(n){n.dependencies&&i.each(n.dependencies,(function(n,e){t.registerDependency(e,n)}));var e,r,a="vendor."+n.vendor;e=i.isString(n.provider)?o.get(n.provider)(n.vendor):i.isFunction(n.provider)?n.provider(n.vendor):i.cloneDeep(n.provider),t.registerVisitorProfileProvider(i.extend(e,{provides:a})),r=i.isString(n.matcher)?o.get(n.matcher):n.matcher;var u={fieldsNeeded:[a],match:function(n,t){return r(n[a],t)}};t.registerAudienceMatcher(a,u)},t.registerWidget=function(n){return i.isArray(n)&&(n=o.evaluate(n)),{showToken:u.on({filter:{type:"showWidget",name:n.widgetId},handler:n.showFn}),hideToken:u.on({filter:{type:"hideWidget",name:n.widgetId},handler:n.hideFn})}},t.registerChangeApplier=function(n,t){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.changeAppliers,name:n,plugin:t})},t.registerDecider=function(n,t){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.deciders,name:n,plugin:t})},t.registerEventImplementation=function(n,t){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.eventImplementations,name:n,plugin:t})},t.registerViewTrigger=function(n,t){c.dispatch(r.REGISTER_PLUGIN,{type:a.PluginTypes.viewTriggers,name:n,plugin:t})}},7381:function(n,t,e){var i=e(558),r=e(3295),o=":",a="holdback",u="treatment",c="",s=e(9402),f=e(2676);function l(n){return n.replace(/[^a-zA-Z0-9\.\~\!\*\(\)\']+/g,"_")}t.formatNamesAndIdsForAnalytics=function(n,t,e,o){var a={layer:n.name||c,experiment:t.name||c,variation:e.name||c};o&&(a=i.mapValues(a,l));var u,s=!n.integrationStringVersion||1===n.integrationStringVersion;if(a.experiment===c&&s)if(u=t.audienceIds,!i.isEmpty(u)&&i.includes(["and","or","not"],u[0]))a.experiment="Exp";else{var f=r.get("stores/audience_data");a.experiment=function(n,t){return i.isEmpty(t)?"everyone_else":i.reduce(t,(function(t,e){var i=n.get(e);return i?t+l(i.name?i.name:i.id)+",":t}),"").slice(0,-1)}(f,t.audienceIds)}return{names:a,idStrings:{layer:"("+l(n.id)+")",experiment:"("+l(t.id)+")",variation:"("+l(e.id)+")"}}},t.combineAndTruncateIdAndName=function(n,t,e){var i=e-t.length;if(i<0&&(s.warn("maxLength must be at least long enough to fit the entity ID, which is length"+t.length+". Defaulting to only use entity ID as name."),n=c),n===c)return t;if(n.length>i){var r=Math.min(n.length,i);return(n=n.substring(0,r))+t}return n+" "+t},t.generateAnalyticsString=function(n,e,r,c,s,l){return n.integrationStringVersion&&2===n.integrationStringVersion?function(n,e,r,u,c,s){if(f.isSingleExperimentPolicy(n.policy)&&u)return;var l=!f.isSingleExperimentPolicy(n.policy)&&u,d=t.formatNamesAndIdsForAnalytics(n,e,r,s),v=[d.names.experiment,d.names.variation],h=[d.idStrings.experiment,d.idStrings.variation];f.isSingleExperimentPolicy(n.policy)||(v.unshift(d.names.layer),h.unshift(d.idStrings.layer));var p=i.reduce(h,(function(n,t){return n+t.length}),0),g=v.length-1+(l?1:0),m=p+1*g;if(l&&(m+=8),m>c)throw new Error("The analytics string size is too low to send the entity IDs.");for(var _=c-m,y=v.length,w=[],b=v.length-1;b>=0;b--){var E=v[b],I=Math.min(E.length,Math.floor(_/y));_-=I,y--,w.unshift(E.substring(0,I))}var A=i.map(w,(function(n,t){return n+h[t]}));return l&&A.push(a),A.join(o)}(n,e,r,c,s,l):function(n,e,r,c,s,l){var d=c?a:u,v=3,h=t.formatNamesAndIdsForAnalytics(n,e,r,l),p=h.names,g=h.idStrings,m=i.reduce(g,(function(n,t){return n+t.length}),0);if(m+v+d.length>s)throw new Error("The analytics string size is too low to send the campaign, experiment, and variation IDs.");var _=s-m-v-d.length,y={};y.variation=Math.min(p.variation.length,Math.floor(_/3)),_-=y.variation,y.experiment=Math.min(p.experiment.length,Math.floor(_/2)),_-=y.experiment,y.layer=_;var w={};i.each(p,(function(n,t){w[t]=n.substring(0,y[t])}));var b=[];return f.isSingleExperimentPolicy(n.policy)||b.push(w.layer+g.layer),(b=b.concat([w.experiment+g.experiment,w.variation+g.variation,d])).join(o)}(n,e,r,c,s,l)}},8648:function(n,t,e){var i=e(558);n.exports=function(n,t){n=function(n){var t=n.split("?");if(t[1]){var e=t[1].split("#"),r=e[0],a=e[1],u=r.split("&"),c=[];return i.each(u,(function(n){0!==n.indexOf(o)&&c.push(n)})),t[1]="",c.length>0&&(t[1]="?"+c.join("&")),a&&(t[1]+="#"+a),t.join("")}return n}(n);var e=t.value;switch(t.match){case"exact":return(n=c(n))===c(e);case"regex":try{return Boolean(n.match(e))}catch(r){}return!1;case"simple":return(n=u(n))===(e=u(e));case"substring":return n=c(n,!0),e=c(e,!0),-1!==n.indexOf(e);default:return!1}};var r=["www."],o="optimizely_",a=["https?://.*?.?optimizelyedit.(com|test)/","https?://.*.?optimizelypreview.(com|test)/","https?://(edit|preview)(-hrd|-devel)?.optimizely.(com|test)/","https?://.*?.?optimizelyedit(-hrd)?.appspot.com/","https?://"];function u(n){return c(function(n){var t=n.indexOf("?");return-1!==t&&(n=n.substring(0,t)),-1!==(t=n.indexOf("#"))&&(n=n.substring(0,t)),n}(n))}function c(n,t){n=(n=n.replace("/?","?")).toLowerCase().replace(/[/&?]+$/,"");var e=a.slice(0);t||(e=e.concat(r));for(var i=e.length,o=0;o-1&&(t.splice(e,1),this.emitChange())}else this.W[n.lifecycle]=[],this.emitChange()}}},60:function(n,t,e){var i=e(6654),r=e(7273);n.exports={initialize:function(){this.W={name:r.NAME,version:r.VERSION},this.on(i.SET_CLIENT_NAME,this.In),this.on(i.SET_CLIENT_VERSION,this.An)},getClientName:function(){return this.W.name},getClientVersion:function(){return this.W.version},In:function(n){n&&(this.W.name=n),this.emitChange()},An:function(n){n&&(this.W.version=n),this.emitChange()}}},2038:function(n,t,e){var i=e(6654);n.exports={initialize:function(){this.W={currentDomain:null,defaultAgeSeconds:15552e3,autoRefresh:true},this.on(i.SET_COOKIE_DOMAIN,this.Sn),this.on(i.SET_COOKIE_AGE,this.Tn),this.on(i.SET_COOKIE_AUTO_REFRESH,this.kn)},getCurrentDomain:function(){return this.W.currentDomain},getDefaultAgeInSeconds:function(){return this.W.defaultAgeSeconds},getAutoRefresh:function(){return this.W.autoRefresh},Sn:function(n){this.W.currentDomain=n,this.emitChange()},Tn:function(n){this.W.defaultAgeSeconds=n,this.emitChange()},kn:function(n){this.W.autoRefresh=n,this.emitChange()}}},9536:function(n,t,e){var i=e(558),r=e(6654),o=e(4381);n.exports={initialize:function(){this.W={},this.on(r.DATA_LOADED,this.vn)},vn:function(n){i.isEmpty(n.data.dimensions)||(i.each(n.data.dimensions,i.bind((function(n){o.deepFreeze(n),this.W[n.id]=n}),this)),this.emitChange())},getAll:function(){return o.safeReference(i.values(this.W))},getById:function(n){return o.safeReference(this.W[n])},getByApiName:function(n){return o.safeReference(i.find(i.values(this.W),{apiName:n}))}}},2900:function(n,t,e){var i=e(558),r=e(6654);n.exports={initialize:function(){this.W={disabled:!1,forceAudienceIds:[],forceVariationIds:[],alreadyInitialized:!1,mutationObserverAPISupported:!1,isEditor:!1,isPreview:!1,isLegacyPreview:!1,isSlave:!1,previewLayerIds:[],projectToken:null,shouldOptOut:!1,trackingDisabled:!1,isRunningInV2Editor:!1,isRunningInDesktopApp:!1,forceTracking:!1},this.on(r.LOAD_DIRECTIVE,this.Rn)},getAll:function(){return i.cloneDeep(this.W)},conflictInObservingChanges:function(){return!this.W.mutationObserverAPISupported},isDisabled:function(){return this.W.disabled},isEditor:function(){return this.W.isEditor},clientHasAlreadyInitialized:function(){return this.W.alreadyInitialized},getForceAudienceIds:function(){return this.W.forceAudienceIds},getForceVariationIds:function(){return this.W.forceVariationIds},getPreviewLayerIds:function(){return this.W.previewLayerIds},getProjectToken:function(){return this.W.projectToken},getForceTracking:function(){return this.W.forceTracking},shouldActivate:function(){return!this.W.isEditor&&!this.isDisabled()},shouldBootstrapDataForPreview:function(){return this.W.isPreview},shouldBootstrapDataForEditor:function(){return this.W.isEditor},shouldInitialize:function(){return!(this.shouldLoadPreview()||this.isDisabled()||this.getProjectToken())},shouldLoadPreview:function(){return!(this.W.isPreview||this.W.isLegacyPreview||!this.getProjectToken()||this.W.isEditor)},shouldBailForDesktopApp:function(){return!this.W.isEditor&&this.W.isRunningInDesktopApp},shouldLoadInnie:function(){return!this.W.isSlave&&!this.W.isEditor&&this.W.isRunningInV2Editor},shouldObserveChangesIndefinitely:function(){return this.W.mutationObserverAPISupported},shouldObserveChangesUntilTimeout:function(){return!this.shouldObserveChangesIndefinitely()},shouldOptOut:function(){return this.W.shouldOptOut},shouldSendTrackingData:function(){return!this.W.trackingDisabled&&(!!this.W.forceTracking||!this.W.isPreview&&i.isEmpty(this.getForceVariationIds())&&i.isEmpty(this.getForceAudienceIds()))},isSlave:function(){return this.W.isSlave},isRunningInDesktopApp:function(){return this.W.isRunningInDesktopApp},isRunningInV2Editor:function(){return this.W.isRunningInV2Editor},Rn:function(n){i.extend(this.W,n),this.emitChange()}}},4012:function(n,t,e){var i=e(558),r=e(6654),o=e(4381);n.exports={initialize:function(){this.W={},this.on(r.DATA_LOADED,this.vn)},getAll:function(){return o.safeReference(i.values(this.W))},getEventsMap:function(){return o.safeReference(this.W)},get:function(n){return o.safeReference(this.W[n])},getByApiName:function(n){return o.safeReference(i.find(i.values(this.W),{apiName:n}))},getByPageId:function(n){return o.safeReference(i.filter(this.W,{pageId:n}))},vn:function(n){i.isEmpty(n.data.events)||(i.each(n.data.events,i.bind((function(n){n.pageId||(n.pageId=n.viewId),o.deepFreeze(n),this.W[n.id]=n}),this)),this.emitChange())}}},900:function(n,t,e){var i=e(558),r=e(6654);function o(n){var t=[];return n&&i.isObject(n)?(n.type&&t.push(n.type),t.push("|"),n.type&&n.name&&t.push(n.name),t.join("")):"|"}n.exports={initialize:function(){this.W={handlers:{}},this.on(r.ADD_EMITTER_HANDLER,this.Cn),this.on(r.REMOVE_EMITTER_HANDLER,this.Nn)},getHandlers:function(n,t){var e=[null,{type:n.type},{type:n.type,name:n.name}],r=[];return i.each(e,i.bind((function(n){var t=o(n),e=this.W.handlers[t];e&&(r=r.concat(e))}),this)),t&&(r=i.filter(r,(function(n){return!n.publicOnly}))),r},Cn:function(n){var t=o(n.filter);this.W.handlers[t]||(this.W.handlers[t]=[]),this.W.handlers[t].push({handler:n.handler,token:n.token,publicOnly:!!n.publicOnly,emitErrors:!!n.emitErrors}),this.emitChange()},Nn:function(n){var t=!1,e=n.token;i.forOwn(this.W.handlers,i.bind((function(n,r){var o=i.filter(n,(function(n){return n.token!==e}));o.length!==n.length&&(t=!0,this.W.handlers[r]=o)}),this)),t&&this.emitChange()}}},4590:function(n,t,e){var i=e(558),r=e(6654),o=e(4381);n.exports={initialize:function(){this.W={holdback:0,isGlobalHoldback:null,listTargetingKeys:[],revision:null,projectId:null,accountId:null,namespace:null,activationId:null,activationTimestamp:null,dcpServiceId:null,dcpKeyfieldLocators:[],recommenderServices:[],anonymizeIP:null,projectJS:null,snippetId:null,plugins:[],domContentLoaded:!1,experimental:{},ga4UserId:null},this.on(r.DATA_LOADED,this.Dn),this.on(r.ACTIVATE,this.On),this.on(r.RECORD_GLOBAL_DECISION,this.xn),this.on(r.SET_DOMCONTENTLOADED,this.Mn),this.on(r.SET_GA4_USER_ID,this.Pn)},getRevision:function(){return this.W.revision},getGlobalHoldbackThreshold:function(){return this.W.holdback},getProjectId:function(){return this.W.projectId},getSnippetId:function(){return this.W.snippetId},getAccountId:function(){return this.W.accountId},getNamespace:function(){return this.W.namespace},getActivationId:function(){return this.W.activationId},getActivationTimestamp:function(){return this.W.activationTimestamp},getAnonymizeIP:function(){return this.W.anonymizeIP},isGlobalHoldback:function(){return!!this.W.isGlobalHoldback},getListTargetingKeys:function(){return this.W.listTargetingKeys.slice()},getDCPServiceId:function(){return this.W.dcpServiceId},getDCPKeyfieldLocators:function(){return this.W.dcpKeyfieldLocators},getRecommenderServices:function(){return this.W.recommenderServices},getProjectJS:function(){return this.W.projectJS},getPlugins:function(){return this.W.plugins},getExperimental:function(){return o.safeReference(this.W.experimental)},getGA4UserId:function(){return this.W.ga4UserId},domContentLoadedHasFired:function(){return this.W.domContentLoaded},On:function(n){this.W.activationId=n.activationId,this.W.activationTimestamp=n.activationTimestamp,this.W.isGlobalHoldback=null},xn:function(n){var t=n.isGlobalHoldback;if(null!==this.W.isGlobalHoldback&&this.W.isGlobalHoldback!==t)throw new Error("Attempted to change already set global holdback!");this.W.isGlobalHoldback=t,this.emitChange()},Pn:function(n){var t=n.ga4UserId;if(!t)throw new Error('Argument "payload.ga4UserId" is missing');this.W.ga4UserId=t,this.emitChange()},Dn:function(n){var t=i.pick(n.data,["holdback","accountId","projectId","snippetId","namespace","revision","listTargetingKeys","dcpServiceId","dcpKeyfieldLocators","recommenderServices","anonymizeIP","plugins","projectJS","experimental","ga4UserId"]);if(0!==i.keys(t).length){i.extend(this.W,{listTargetingKeys:[],dcpServiceId:null,dcpKeyfieldLocators:[]},t),this.emitChange()}},Mn:function(){this.W.domContentLoaded=!0,this.emitChange()}}},2173:function(n,t,e){var i=e(558),r=e(6654),o=e(4381);n.exports={initialize:function(){this.W={},this.on(r.DATA_LOADED,this.vn)},vn:function(n){i.isEmpty(n.data.groups)||(i.each(n.data.groups,i.bind((function(n){o.deepFreeze(n),this.W[n.id]=n}),this)),this.emitChange())},getAll:function(){return o.safeReference(i.values(this.W))},getGroupsMap:function(){return o.safeReference(this.W)},get:function(n){return o.safeReference(this.W[n])}}},4185:function(n,t,e){var i=e(558),r=e(6654),o=e(8928);n.exports={initialize:function(){this.W={originalPushState:null,originalReplaceState:null},this.on(r.ENSURE_ORIGINAL_PUSHSTATE,this.Ln),this.on(r.ENSURE_ORIGINAL_REPLACESTATE,this.Vn)},getOriginalPushState:function(){return this.W.originalPushState},getOriginalReplaceState:function(){return this.W.originalReplaceState},Ln:function(){this.W.originalPushState||(this.W.originalPushState=i.bind(o.getGlobal("history").pushState,o.getGlobal("history")))},Vn:function(){this.W.originalReplaceState||(this.W.originalReplaceState=i.bind(o.getGlobal("history").replaceState,o.getGlobal("history")))}}},9667:function(n,t,e){var i=e(558),r=e(6654);n.exports={initialize:function(){this.W={},this.on(r.DATA_LOADED,this.vn),this.on(r.SET_INTEGRATION_SETTINGS,this.Un)},vn:function(n){i.isEmpty(n.data.integrationSettings)||(i.each(n.data.integrationSettings,i.bind((function(n){this.W[n.id]=n}),this)),this.emitChange())},Un:function(n){var t=this.W[n.id];t?i.extend(t,n):this.W[n.id]=n},getAll:function(){return i.cloneDeep(i.values(this.W))},get:function(n){return i.cloneDeep(this.W[n])},getReference:function(n){return this.W[n]}}},7932:function(n,t,e){var i=e(558),r=e(6654),o=e(9402),a="*";n.exports={initialize:function(){this.W={},this.on(r.LOAD_PERSISTED_LAYER_STATES,this.Fn),this.on(r.RECORD_LAYER_DECISION,this.Bn),this.on(r.RECORD_LAYER_DECISION_EVENT_ID,this.zn)},getLayerState:function(n,t){if(this.W[n]){var e=this.W[n];if(i.keys(e).length>1&&!t)throw new Error("View Id must be specified when more than one layerState for layer.");return t?i.cloneDeep(i.find(e,{pageId:t})):i.cloneDeep(e[a])}},getLayerStates:function(n){var t=[];for(var e in this.W)i.forEach(this.W[e],(function(e){(i.isUndefined(n)||e.namespace===n)&&t.push(i.cloneDeep(e))}));return t},getLayerStatesForAnalytics:function(){var n=[];for(var t in this.W)i.forEach(this.W[t],(function(t){n.push(i.pick(t,["layerId","decision","decisionEventId"]))}));return n},Fn:function(n){n.merge||(this.W={}),i.each(n.layerStates,i.bind((function(n){var t=n.layerId;n.pageId||(n.pageId=n.viewId);var e=n.pageId||a,r=this.W[t];if(i.isUndefined(r))this.W[t]={},this.W[t][e]=n;else{var o=r[e];(!o||n.decisionTimestamp>(o.decisionTimestamp||0))&&(this.W[t][e]=n)}}),this)),this.emitChange()},Bn:function(n){var t={layerId:n.layerId,revision:n.revision,namespace:n.namespace,pageId:n.pageId,decisionTicket:n.decisionTicket,decision:n.decision,decisionActivationId:n.activationId,decisionTimestamp:n.timestamp,decisionEventId:null},e=this.W[n.layerId]||{};n.pageId?(delete e[a],e[n.pageId]=t):(e={})[a]=t,this.W[n.layerId]=e,this.emitChange()},zn:function(n){var t=n.layerId,e=n.pageId||a;this.W[t]?this.W[t][e]?(this.W[t][e].decisionEventId=n.decisionId,this.emitChange()):o.warn("Not recording decision event: Layer state not found for view",e):o.warn("Not recording decision event: Campaign not registered",t)}}},1847:function(n,t,e){var i=e(558),r=e(6654),o=e(4381),a=e(2676);n.exports={initialize:function(){this.W={layers:{},experiments:{},variations:{}},this.on(r.DATA_LOADED,this.vn)},vn:function(n){if(!i.isEmpty(n.data.layers)){var t=this;i.each(n.data.layers,(function(n){i.each(n.experiments,(function(e){n.pageIds||(n.pageIds=n.viewIds),e.campaignName||a.isSingleExperimentPolicy(n.policy)?a.isSingleExperimentPolicy(n.policy)&&n.groupId&&(e.groupId=n.groupId):e.campaignName=n.name,i.each(e.variations,(function(n){i.each(n.actions,(function(n){n.pageId||(n.pageId=n.viewId)})),t.W.variations[n.id]=n})),t.W.experiments[e.id]=e})),o.deepFreeze(n),t.W.layers[n.id]=n})),this.emitChange()}},getAll:function(){return o.safeReference(i.values(this.W.layers))},getCampaignsMap:function(){return o.safeReference(this.W.layers)},getExperimentsMap:function(){return o.safeReference(this.W.experiments)},getVariationsMap:function(){return o.safeReference(this.W.variations)},getCount:function(){return i.keys(this.W.layers).length},getAllByPageIds:function(n){return o.safeReference(i.filter(this.W.layers,(function(t){return i.some(n,i.partial(i.includes,t.pageIds))})))},get:function(n){return o.safeReference(this.W.layers[n])},getLayerByExperimentId:function(n){var t=i.find(this.W.layers,(function(t){return i.find(t.experiments,{id:n})}));return o.safeReference(t)},getExperimentByVariationId:function(n){var t;return i.some(this.W.layers,(function(e){return i.some(e.experiments,(function(e){return i.find(e.variations,{id:n})&&(t=e),t})),t})),o.safeReference(t)}}},3115:function(n,t,e){var i=e(6654);n.exports={initialize:function(){this.W={logs:[]},this.on(i.LOG,this.Gn)},getLogs:function(){return this.W.logs},Gn:function(n){this.W.logs.push(n),this.emitChange()},Z:function(){return this.W.logs.slice()}}},5064:function(n,t,e){var i=e(6654),r=e(4381);n.exports={initialize:function(){this.W={data:null,hasTracked:null},this.on(i.LOAD_REDIRECT_DATA,this.jn),this.on(i.REGISTER_TRACKED_REDIRECT_DATA,this.qn)},get:function(){return r.safeReference(this.W.data)},hasTracked:function(){return this.W.hasTracked},jn:function(n){r.deepFreeze(n),this.W.data=n,this.W.hasTracked=!1,this.emitChange()},qn:function(){this.W.hasTracked=!0}}},1276:function(n,t,e){var i=e(558),r=e(6654),o=e(1494);n.exports={initialize:function(){this.W={},this.on(r.SET_PENDING_EVENT,this.Hn),this.on(r.REMOVE_PENDING_EVENT,this.Yn),this.on(r.LOAD_PENDING_EVENTS,this.$n)},getEvents:function(){return this.W},getEventsString:function(){return o.stringify(this.W)},Hn:function(n){i.keys(this.W).length>=1e3&&this.Kn();var t=n.id,e=n.retryCount;this.W[t]&&this.W[t].retryCount===e||(this.W[t]={id:t,timeStamp:n.timeStamp,data:n.data,retryCount:e},this.emitChange())},Yn:function(n){delete this.W[n.id],this.emitChange()},$n:function(n){this.W=n.events,this.Kn(),this.emitChange()},Kn:function(){for(var n=i.sortBy(this.W,"timeStamp"),t=0;t<=n.length-1e3;t++)delete this.W[n[t].id];this.emitChange()}}},8597:function(n,t,e){var i=e(558),r=e(6654);n.exports={initialize:function(){this.W={layerId:null},this.on(r.ANNOUNCE_PENDING_REDIRECT,this.jn)},isExpectingRedirect:function(){return i.isString(this.W.layerId)},getLayerId:function(){return this.W.layerId},jn:function(n){this.isExpectingRedirect()||(this.W.layerId=n.layerId,this.emitChange())}}},3711:function(n,t,e){var i=e(558),r=e(6654),o=e(2502);n.exports={initialize:function(){this.W={},this.W[o.PerformanceData.performance_marks]={},this.on(r.SET_PERFORMANCE_MARKS_DATA,this.Wn)},Wn:function(n){i.isUndefined(this.W[o.PerformanceData.performance_marks][n.name])&&(this.W[o.PerformanceData.performance_marks][n.name]=[]),this.W[o.PerformanceData.performance_marks][n.name].push(n.data),this.emitChange()},getMarks:function(){return i.mapValues(this.W[o.PerformanceData.performance_marks],(function(n){return i.map(n,(function(n){return[n.startTime,n.duration]}))}))},getDurationsFor:function(n){return i.reduce(n,i.bind((function(n,t){var e=this.W[o.PerformanceData.performance_marks][t];return e&&(n[t]=Math.round(i.reduce(e,(function(n,t){return n+t.duration}),0))),n}),this),{})}}},225:function(n,t,e){var i=e(558),r=e(6654),o=e(2502),a=e(9402);n.exports={initialize:function(){this.W=i.mapValues(o.PluginTypes,(function(){return{}})),this.on(r.REGISTER_PLUGIN,this.Xn)},Xn:function(n){var t=n.type,e=n.name,i=n.plugin;if(!t||!e)throw new Error("Missing information needed to register plugins: "+t+":"+e);if(!this.W[t])throw new Error("Invalid plugin type specified: "+t);this.W[t][e]=i,a.debug("Plugin Store: Registering Plugin :",n)},getAllPlugins:function(n){if(!n)return this.W;if(this.W[n])return this.W[n];throw new Error("Invalid plugin type: "+n)},getPlugin:function(n,t){if(!t||!n)throw new Error("Missing plugin parameters");return this.getAllPlugins(n)[t]||null}}},6921:function(n,t,e){var i=e(558),r=e(6654),o=e(1361);n.exports={initialize:function(){this.W={},this.on(r.SET_VISITOR_ATTRIBUTE_PENDING,this.Jn)},getPendingAttributeValue:function(n){return n=i.isArray(n)?n.concat("pending"):[n,"pending"],o.getFieldValue(this.W,n)},Jn:function(n){o.setFieldValue(this.W,n.key,{pending:n.pending}),this.emitChange()}}},1197:function(n,t,e){var i=e(558),r=e(6654);n.exports={initialize:function(){this.W={inRumSample:!1,id:null,src:null,RumHost:null,data:{extras:{}},apis:{},DOMObservation:{},featuresNeeded:{}},this.on(r.SET_RUM_DATA,this.Qn),this.on(r.RECORD_API_USAGE,this.Zn),this.on(r.INITIALIZE_CHANGE_METRICS,this.nt),this.on(r.RECORD_ACTIVATION_TYPE_USAGE,this.tt),this.on(r.RECORD_AUDIENCE_USAGE,this.et),this.on(r.RECORD_CHANGE_MACROTASK_RATE,this.it),this.on(r.RECORD_CHANGE_OVERHEATED,this.rt),this.on(r.RECORD_CHANGE_TYPE_USAGE,this.ot),this.on(r.RECORD_DOM_OBSERVATION_OCCURENCE,this.ut),this.on(r.RECORD_INTEGRATION_USAGE,this.ct),this.on(r.RECORD_LAYER_FEATURE_USAGE,this.st),this.on(r.RECORD_LAYER_POLICY_USAGE,this.ft),this.on(r.RECORD_VIEW_FEATURE_USAGE,this.dt),this.on(r.RECORD_VIEWS_INITIALLY_ACTIVATED_COUNT,this.vt),this.on(r.RECORD_VISITOR_ID_LOCATOR_USAGE,this.ht),this.on(r.RECORD_VISITOR_ID_ERROR,this._t),this.on(r.RECORD_STICKY_BUCKETING_FEATURE,this.yt)},Qn:function(n){i.merge(this.W,n),this.emitChange()},Zn:function(n){this.W.apis[n.methodName]||(this.W.apis[n.methodName]=0),this.W.apis[n.methodName]++,this.emitChange()},nt:function(){i.isUndefined(this.W.data.extras.changeMacrotaskRate)&&(this.W.data.extras.changeMacrotaskRate=0),i.isUndefined(this.W.data.extras.numOverheatedChanges)&&(this.W.data.extras.numOverheatedChanges=0)},it:function(n){i.isUndefined(this.W.data.extras.changeMacrotaskRate)&&(this.W.data.extras.changeMacrotaskRate=0),n.changeMacrotaskRate>this.W.data.extras.changeMacrotaskRate&&(this.W.data.extras.changeMacrotaskRate=n.changeMacrotaskRate),this.emitChange()},rt:function(){i.isUndefined(this.W.data.extras.numOverheatedChanges)&&(this.W.data.extras.numOverheatedChanges=0),this.W.data.extras.numOverheatedChanges++,this.emitChange()},ut:function(n){this.W.DOMObservation[n.counterName]||(this.W.DOMObservation[n.counterName]=0),this.W.DOMObservation[n.counterName]++,this.emitChange()},wt:function(n,t,e){i.isUndefined(this.W.featuresNeeded[n])&&(this.W.featuresNeeded[n]={});var r=this.W.featuresNeeded[n];i.each(t,(function(n){r[n]||(r[n]={}),r[n][e]||(r[n][e]=!0)}))},ct:function(n){this.wt("integrations",n.integrations,n.layerId)},ot:function(n){this.wt("changeTypes",n.changeTypes,n.layerId)},tt:function(n){this.wt("activationTypes",[n.activationType],n.entityId),this.emitChange()},dt:function(n){this.wt("viewFeatures",n.featuresUsed,n.entityId),this.emitChange()},st:function(n){this.wt("layerFeatures",[n.feature],n.entityId),this.emitChange()},ft:function(n){this.wt("policy",[n.policy],n.layerId),this.emitChange()},et:function(n){this.wt("audiences",n.audienceTypes,n.layerId),this.emitChange()},vt:function(n){this.W.data.extras.viewsInitiallyActivatedCount=n.viewsInitiallyActivatedCount,this.emitChange()},ht:function(n){this.wt("visitorIdLocatorType",[n.visitorIdLocatorType],n.entityId),this.emitChange()},_t:function(n){this.W.data.extras.errorCustomVisitorId=n.isError,this.emitChange()},yt:function(n){this.wt("stickyBucketing",[n.feature],n.id)},getSampleRum:function(){return this.W.inRumSample},getRumId:function(){return this.W.id},getRumHost:function(){return this.W.RumHost},getApiData:function(){return this.W.apis},getDOMObservationData:function(){return this.W.DOMObservation},getRumData:function(){return i.cloneDeep(this.W.data)},getScriptSrc:function(){return this.W.src},getFeaturesNeededData:function(){var n=this.W.featuresNeeded,t={};return i.forOwn(n,(function(n,e){var r=i.keys(n);i.isEmpty(r)||(t[e]={}),i.forEach(r,(function(r){t[e][r]=i.keys(n[r]).length}))})),t}}},2470:function(n,t,e){var i=e(6654);n.exports={initialize:function(){this.W={initialized:!1,natives:{}},this.on(i.SANDBOXED_FUNCTIONS_ADDED,this.bt)},bt:function(n){if(!n.sandboxedFunctions)throw new Error("No sandboxedFunctions found in payload");this.W.natives=n.sandboxedFunctions,this.W.initialized=!0,this.emitChange()},getAll:function(){return this.W.natives},get:function(n){if(!n)throw new Error("Missing name parameter");return this.W.natives[n]||null},isInitialized:function(){return this.W.initialized}}},1357:function(n,t,e){var i=e(558),r=e(6654),o=e(1964),a=e(8047);n.exports={initialize:function(){this.W={lastSessionTimestamp:0,sessionId:null},this.on(r.REFRESH_SESSION,this.Et),this.on(r.LOAD_SESSION_STATE,this.It)},getState:function(){return i.cloneDeep(this.W)},getSessionId:function(){return this.W.sessionId},It:function(n){this.W.sessionId=n.sessionId,this.W.lastSessionTimestamp=n.lastSessionTimestamp,this.emitChange()},Et:function(){var n=o.now(),t=this.W.lastSessionTimestamp;(!this.W.sessionId||n-t>18e5)&&(this.W.sessionId=a.generate()),this.W.lastSessionTimestamp=n,this.emitChange()}}},8256:function(n,t,e){var i=e(558),r=e(6654);n.exports={initialize:function(){this.At(),this.on(r.FINALIZE_BATCH_SNAPSHOT,this.St),this.on(r.REGISTER_PREVIOUS_BATCH,this.Tt),this.on(r.REGISTER_TRACKER_VISITOR,this.kt),this.on(r.REGISTER_TRACKER_EVENT,this.Rt),this.on(r.REGISTER_TRACKER_DECISION,this.Ct),this.on(r.RESET_TRACKER_EVENTS,this.Nt),this.on(r.RESET_TRACKER_STORE,this.At),this.on(r.RESET_TRACKER_PREVIOUS_BATCHES,this.Dt),this.on(r.SET_TRACKER_POLLING,this.Ot),this.on(r.SET_TRACKER_BATCHING,this.xt),this.on(r.SET_TRACKER_SEND_EVENTS,this.Mt),this.on(r.SET_TRACKER_PERSISTABLE_STATE,this.Pt),this.on(r.SET_TRACKER_DIRTY,this.Lt),this.on(r.UPDATE_TRACKER_VISITOR_ATTRIBUTES,this.Vt)},getPersistableState:function(){return this.W.isDirty?this.hasEventsToSend()||this.hasPreviousBatchesToSend()?{data:this.W.data,decisions:this.W.decisions,decisionEvents:this.W.decisionEvents,previousBatches:this.W.previousBatches}:{}:null},Pt:function(n){i.isEmpty(this.W.data)||i.isEmpty(n.data)||(this.St(),this.W.previousBatches.push(this.getEventBatch())),this.W.data=n.data||{},this.W.decisions=n.decisions||[],this.W.decisionEvents=n.decisionEvents||[],i.isEmpty(this.W.previousBatches)||i.isEmpty(n.previousBatches)?this.W.previousBatches=n.previousBatches||[]:this.W.previousBatches=this.W.previousBatches.concat(n.previousBatches),this.emitChange()},Lt:function(n){this.W.isDirty=n,this.emitChange()},Rt:function(n){var t=this.Ut();(i.isEmpty(t.snapshots)||!i.isEmpty(this.W.decisionEvents))&&this.Ft(),this.Bt().events.push(n.event),this.W.decisions=n.decisions,this.Lt(!0)},Ct:function(n){this.W.decisionEvents.push(n.decisionEvent),this.W.decisions=n.decisions,this.Lt(!0)},kt:function(n){i.isEmpty(this.W.data)?this.W.data=n.data:this.St(),this.W.data.visitors.push(n.visitor),this.W.decisions=n.decisions,this.W.decisionEvents=[],this.Lt(!0)},Tt:function(n){this.W.previousBatches.push(n),this.Lt(!0)},At:function(){this.W={polling:!1,shouldBatch:!0,data:{},decisions:[],decisionEvents:[],canSend:!1,isDirty:!1,previousBatches:[]},this.emitChange()},Nt:function(){var n=this.Ut();this.W.data.visitors=[n],n.snapshots=[],this.Lt(!0)},Dt:function(){this.W.previousBatches=[],this.Lt(!0)},Ot:function(n){this.W.polling=n,this.emitChange()},xt:function(n){this.W.shouldBatch=n,this.emitChange()},Mt:function(n){this.W.canSend=n,this.emitChange()},getEventBatch:function(){return i.cloneDeep(this.W.data)},getPreviousBatches:function(){return i.cloneDeep(this.W.previousBatches)},zt:function(){return this.W.decisionEvents.slice()},Gt:function(){this.W.decisionEvents=[]},jt:function(){return this.W.decisions.slice()},isPolling:function(){return this.W.polling},shouldBatch:function(){return this.W.shouldBatch},Bt:function(){return i.last(this.Ut().snapshots)},Ut:function(){return i.last(this.W.data.visitors)},Ft:function(){var n=this.zt();this.Ut().snapshots.push({decisions:this.jt(),events:n}),this.Gt(),this.Lt(!0)},St:function(){this.W.decisionEvents.length>0&&this.Ft()},hasEventsToSend:function(){if(!i.isEmpty(this.W.decisionEvents))return!0;if(!i.isEmpty(this.W.data)&&i.some(this.W.data.visitors||[],(function(n){return n.snapshots.length>0})))return!0;return!1},hasPreviousBatchesToSend:function(){return!i.isEmpty(this.W.previousBatches)},canSend:function(){return this.W.canSend},Vt:function(n){var t=this.Ut();t&&(t.attributes=n.attributes)}}},7966:function(n,t,e){var i=e(558),r=e(6654);n.exports={initialize:function(){this.W={},this.on(r.SET_UA_DATA,this.vn)},vn:function(n){i.isEmpty(this.W)&&(this.W=n.data)},get:function(){return i.cloneDeep(this.W)}}},984:function(n,t,e){var i=e(558),r=e(6654),o=e(9402),a={globalTags:{},viewStates:{},shouldBatch:!1};n.exports={initialize:function(){this.W=i.cloneDeep(a),this.on(r.REGISTER_VIEWS,this.qt),this.on(r.SET_VIEW_ACTIVE_STATE,this.Ht),this.on(r.UPDATE_PARSED_VIEW_METADATA,this.Yt),this.on(r.UPDATE_USER_SUPPLIED_METADATA,this.$t),this.on(r.TRACK_VIEW_ACTIVATED_EVENT,this.Kt),this.on(r.SET_GLOBAL_TAGS,this.Wt),this.on(r.RESET_VIEW_STATES,this.Xt),this.on(r.SET_VIEW_BATCHING,this.xt)},getAll:function(){var n={};for(var t in this.W.viewStates)n[t]=this.getViewState(t);return n},getActiveViewIds:function(){return i.reduce(this.W.viewStates,i.bind((function(n,t,e){return this.isViewActive(e)&&n.push(e),n}),this),[])},shouldBatch:function(){return this.W.shouldBatch},getViewState:function(n){var t=i.cloneDeep(this.W.viewStates[n]),e=this.W.globalTags;return t.metadata=i.extend({},t.parsedMetadata,e,t.userSuppliedMetadata),t},getActiveViewTags:function(){var n=this.getActiveViewStates(),t=i.map(n,(function(n){return n.metadata})),e=[{}].concat(t);return i.extend.apply(i,e)},getActivationEventId:function(n){return this.W.viewStates[n]?this.W.viewStates[n].activationEventId:null},getActiveViewStates:function(){return i.reduce(this.W.viewStates,i.bind((function(n,t,e){return this.isViewActive(e)&&n.push(this.getViewState(e)),n}),this),[])},isViewActive:function(n){var t=this.W.viewStates[n];return t||o.warn("No Page registered with id",n),!!t.isActive},getGlobalTags:function(){return i.cloneDeep(this.W.globalTags)},Xt:function(){this.W.viewStates={},this.emitChange()},qt:function(n){i.each(n.views,i.bind((function(n){var t=n.id;this.W.viewStates[t]={id:t,isActive:i.isBoolean(n.isActive)?n.isActive:null,activatedTimestamp:null,activationEventId:null,parsedMetadata:{},userSuppliedMetadata:{}}}),this)),this.emitChange()},Ht:function(n){var t=n.view.id;if(!this.W.viewStates[t])throw new Error("No view exists with id "+t);this.W.viewStates[t].isActive=n.isActive,n.isActive?this.W.viewStates[t].activatedTimestamp=n.timestamp:(this.W.viewStates[t].parsedMetadata={},this.W.viewStates[t].userSuppliedMetadata={}),this.emitChange()},Yt:function(n){var t=n.pageId;if(!this.W.viewStates[t])throw new Error("No view exists with id "+t);i.assign(this.W.viewStates[t].parsedMetadata,n.metadata),this.emitChange()},$t:function(n){var t=n.pageId;if(!this.W.viewStates[t])throw new Error("No view exists with id "+t);i.assign(this.W.viewStates[t].userSuppliedMetadata,n.metadata),this.emitChange()},Kt:function(n){var t=n.pageId;this.W.viewStates[t]&&(this.W.viewStates[t].activationEventId=n.eventData.eventId,this.emitChange())},Wt:function(n){i.extend(this.W.globalTags,n),this.emitChange()},xt:function(n){this.W.shouldBatch=n,this.emitChange()}}},9459:function(n,t,e){var i=e(558),r=e(6654),o=e(4381);n.exports={initialize:function(){this.W={views:{},apiNamesToViews:{}},this.on(r.DATA_LOADED,this.vn)},getAll:function(){return o.safeReference(i.values(this.W.views))},getPagesMap:function(){return o.safeReference(this.W.views)},get:function(n){return o.safeReference(this.W.views[n])},getByApiName:function(n){return o.safeReference(this.W.apiNamesToViews[n])},apiNameToId:function(n){var t=this.W.apiNamesToViews[n];if(t)return t.id},idToApiName:function(n){var t=this.W.views[n];if(t)return t.apiName},getNumberOfPages:function(){return i.keys(this.W.views).length},getAllViewsForActivationType:function(n){return i.filter(this.W.views,{activationType:n})},vn:function(n){i.isEmpty(n.data.views)||(i.each(n.data.views,i.bind((function(n){o.deepFreeze(n),this.W.views[n.id]=n,this.W.apiNamesToViews[n.apiName]=n}),this)),this.emitChange())}}},6787:function(n,t,e){var i=e(558),r=e(6654),o=e(1361);n.exports={initialize:function(){this.W={profile:{},metadata:{},visitorId:null},this.on(r.SET_VISITOR_ID_VIA_API,this.Jt),this.on(r.SET_VISITOR_ATTRIBUTES,this.Qt),this.on(r.LOAD_EXISTING_VISITOR_PROFILE,this.Zt)},getVisitorProfile:function(){return this.W.profile},getVisitorProfileMetadata:function(){return this.W.metadata},getAttribute:function(n){var t=this.W.profile;return i.cloneDeep(o.getFieldValue(t,n))},getAttributeMetadata:function(n){return i.cloneDeep(this.W.metadata[n])},getVisitorIdFromAPI:function(){return this.W.visitorId},Zt:function(n){this.W.profile=n.profile,this.W.metadata=n.metadata,this.emitChange()},Qt:function(n){i.each(n.attributes,i.bind((function(n){var t=n.key;o.setFieldValue(this.W.profile,t,n.value),n.metadata&&i.forOwn(n.metadata,i.bind((function(n,e){o.setFieldValue(this.W.metadata,t.concat(e),n)}),this))}),this)),this.emitChange()},Jt:function(n){this.W.visitorId=n,this.emitChange()}}},6916:function(n,t,e){var i=e(558),r=e(6654);n.exports={initialize:function(){this.W={},this.on(r.DATA_LOADED,this.ne)},getCustomBehavioralAttributes:function(){return i.filter(this.W,(function(n){return!!n.rule_json}))},getVisitorAttribute:function(n){var t=i.values(this.W);if(n.datasourceId&&(t=i.filter(t,{dcp_datasource_id:String(n.datasourceId)})),n.attributeName&&n.attributeId)throw new Error("Must not specify both attribute name and attribute ID");if(n.attributeId){var e=this.W[n.attributeId];if(!e)throw new Error("Unrecognized attribute ID: "+n.attributeId);return e}if(n.attributeName){var r=i.filter(t,{name:n.attributeName});if(!r.length)throw new Error("Unrecognized attribute name: "+n.attributeName);if(r.length>1)throw new Error("Too many attributes with name: "+n.attributeName);return r[0]}throw new Error("Must specify attribute name or attribute ID")},ne:function(n){i.isEmpty(n.data.visitorAttributes)||(i.each(n.data.visitorAttributes,i.bind((function(n){this.W[n.id]=n}),this)),this.emitChange())}}},1994:function(n,t,e){Object.defineProperty(t,"te",{value:!0});var i=e(558),r=e(6654),o=e(1494);n.exports={initialize:function(){this.W={variationIdMap:{},preferredLayerMap:{},contextualMabMap:{},odpSegments:{}},this.on(r.UPDATE_VARIATION_ID_MAP,this.ee),this.on(r.MERGE_VARIATION_ID_MAP,this.re),this.on(r.UPDATE_PREFERRED_LAYER_MAP,this.oe),this.on(r.MERGE_PREFERRED_LAYER_MAP,this.ae),this.on(r.UPDATE_CONTEXTUAL_MAB_MAP,this.ue),this.on(r.MERGE_CONTEXTUAL_MAB_MAP,this.ce),this.on(r.SET_ODP_SEGMENTS,this.se)},se:function(n){this.W.odpSegments=n,this.emitChange()},getOdpSegments:function(){return this.W.odpSegments},getContextualMabMap:function(){return i.cloneDeep(this.W.contextualMabMap)},getContextualMabMapString:function(){return o.stringify(this.W.contextualMabMap)},ue:function(n){var t=this.W.contextualMabMap[n.layerId]||{};i.isEqual(t[n.experimentId],n.variationData)||(t[n.experimentId]=n.variationData,this.W.contextualMabMap[n.layerId]=t,this.emitChange())},ce:function(n){var t=this.W.contextualMabMap;i.forEach(n.contextualMabMap,(function(n,e){t[e]||(t[e]={}),i.forEach(n,(function(n,i){t[e][i]||(t[e][i]=n)}))})),this.W.contextualMabMap=t,this.emitChange()},getVariationIdMap:function(){return i.cloneDeep(this.W.variationIdMap)},getVariationIdMapString:function(){return o.stringify(this.W.variationIdMap)},ee:function(n){var t=this.W.variationIdMap[n.layerId]||{};t[n.experimentId]!==n.variationId&&(t[n.experimentId]=n.variationId,this.W.variationIdMap[n.layerId]=t,this.emitChange())},re:function(n){var t=this.getVariationIdMap(),e=n.variationIdMap;i.each(t||{},(function(n,t){e[t]?i.assign(e[t],n):e[t]=n})),this.W.variationIdMap=e,this.emitChange()},getPreferredLayerMap:function(){return i.cloneDeep(this.W.preferredLayerMap)},getPreferredLayerMapString:function(){return o.stringify(this.W.preferredLayerMap)},getPreferredLayerId:function(n){return this.W.preferredLayerMap[n]},oe:function(n){this.W.preferredLayerMap[n.groupId]!==n.layerId&&(this.W.preferredLayerMap[n.groupId]=n.layerId,this.emitChange())},ae:function(n){var t=this.getPreferredLayerMap(),e=n.preferredLayerMap;i.assign(e,t),this.W.preferredLayerMap=e,this.emitChange()}}},5363:function(n,t,e){e(558);var i=e(6654);e(7513).J;n.exports={initialize:function(){this.W={events:[],foreignEvents:{},foreignEventQueues:{}},this.on(i.SET_VISITOR_EVENTS,this.vn),this.on(i.SET_FOREIGN_VISITOR_EVENTS,this.fe),this.on(i.SET_FOREIGN_VISITOR_EVENT_QUEUE,this.le)},getEvents:function(){return this.W.events},getForeignEvents:function(){return this.W.foreignEvents},getForeignEventQueues:function(){return this.W.foreignEventQueues},vn:function(n){this.W.events=n,this.emitChange()},fe:function(n){this.W.foreignEvents[n.key]=n.value},le:function(n){this.W.foreignEventQueues[n.key]=n.value}}},2463:function(n,t,e){var i=e(6654);n.exports={initialize:function(){this.W={baseMap:{},eventQueue:[],lastEvent:null,initialized:!1,cleared:!1},this.on(i.UPDATE_BEHAVIOR_STORE,this.de)},getBaseMap:function(){return this.W.baseMap},getEventQueue:function(){return this.W.eventQueue},getLastEvent:function(){return this.W.lastEvent},getCleared:function(){return this.W.cleared},getInitialized:function(){return this.W.initialized},de:function(n){this.W[n.key]=n.value}}},2715:function(n,t,e){var i=e(558),r=e(6654);n.exports={initialize:function(){this.W={randomId:null,visitorIdLocator:null},this.on(r.SET_VISITOR_ID,this.vn),this.on(r.DATA_LOADED,this.ve)},getBucketingId:function(){return this.getRandomId()},getRandomId:function(){return this.W.randomId},getVisitorIdLocator:function(){return this.W.visitorIdLocator},vn:function(n){i.extend(this.W,n),this.emitChange()},ve:function(n){i.isEmpty(n.data.visitorIdLocator)||(this.W.visitorIdLocator=n.data.visitorIdLocator,this.emitChange())}}},2933:function(n,t,e){var i=e(558),r=e(9402),o=e(6654);n.exports={initialize:function(){this.W={frames:[],defaultFrame:null,messages:[],subscribers:[],canonicalOrigins:null,disabled:!1},this.on(o.XDOMAIN_SET_DEFAULT_FRAME,this.he),this.on(o.XDOMAIN_ADD_FRAME,this.pe),this.on(o.XDOMAIN_SET_MESSAGE,this.ge),this.on(o.XDOMAIN_ADD_SUBSCRIBER,this.me),this.on(o.XDOMAIN_SET_CANONICAL_ORIGINS,this._e),this.on(o.XDOMAIN_SET_DISABLED,this.ye)},getMessages:function(){return i.cloneDeep(this.W.messages)},getOffset:function(){return 0===this.W.messages.length?0:this.W.messages[0].data.id},getNextMessageId:function(){return this.W.messages.length+this.getOffset()},getMessageById:function(n){return this.W.messages[n-this.getOffset()]},getSubscribers:function(){return this.W.subscribers},getFrames:function(){return this.W.frames},getNextFrameId:function(){return this.W.frames.length},getDefaultFrame:function(){return this.W.defaultFrame},getCanonicalOrigins:function(){return i.cloneDeep(this.W.canonicalOrigins)},isDisabled:function(){return this.W.disabled},he:function(n){this.W.defaultFrame=n},pe:function(n){this.W.frames.push(n)},ge:function(n){for(this.W.messages[n.messageId-this.getOffset()]=n.message;this.W.messages.length>1e3;){var t=this.W.messages.shift();r.debug("XDomainStorage: Cleared old message: "+t.data.id)}},me:function(n){this.W.subscribers.push(n.subscriber)},_e:function(n){this.W.canonicalOrigins=n.canonicalOrigins},ye:function(n){this.W.disabled=n.disabled}}},4896:function(n,t){t.locatorType={CSS_SELECTOR:"css_selector",JAVASCRIPT:"javascript",URL_REGEX:"url_regex"},t.valueType={STRING:"string",NUMBER:"number",CURRENCY:"currency"},t.nodeNames={INPUT:"INPUT",SELECT:"SELECT"}},4712:function(n,t,e){var i=e(1416).v;t.Error=i("TagError")},3890:function(n,t,e){var i=e(2502).PluginTypes,r=e(3295).get("stores/plugins");t.getTagValue=function(n){var e=r.getPlugin(i.viewTagLocators,n.locatorType);if(!e)throw new t.Error("No locator registered for tag locatorType: "+n.locatorType);return e(n)},t.enums=e(4896),t.Error=e(4712).Error},5250:function(n,t,e){var i=e(6654),r=e(6691),o=e(3399).Promise,a=e(3295).get("stores/async_request");t.makeAsyncRequest=function(n,t){var e,u,c=a.getPromise(n);if(c)return c;var s=new o((function(n,t){e=n,u=t}));return r.dispatch(i.REGISTER_ASYNC_DEFERRED,{source:n,promise:s,resolver:e,rejecter:u}),t&&t(),s},t.resolveRequest=function(n,t){r.dispatch(i.RESOLVE_DEFERRED,{source:n,resolveWith:t})},t.rejectRequest=function(n,t){r.dispatch(i.REJECT_DEFERRED,{source:n,rejectWith:t})}},3080:function(n,t,e){var i=e(6992),r=e(8928);t.getLanguage=function(){return r.getNavigatorLanguage()},t.getQueryParams=i.getQueryParams,t.getQueryParamValue=i.getQueryParamValue,t.getUrl=function(){return r.getHref()}},6796:function(n,t,e){var i=e(558),r=e(1416).v,o=e(1964),a=e(2065),u=e(8928),c=e(6654),s=e(3295),f=e(6691),l=s.get("stores/cookie_options"),d=t.SetError=r("CookieSetError"),v=t.MismatchError=r("CookieMismatchError"),h=["co","com","net","org","edu","gov","mil","int","ac","com","net","org"];t.getAll=function(n){var e,r,o,u,c;i.isUndefined(n)&&(n=!0),e=a.getCookieString().split(/\s*;\s*/);var s={};for(o=0;o0&&void 0===s[c=t.safeDecodeURIComponent(r.substring(0,u))]){var f=r.substring(u+1);n&&(f=t.safeDecodeURIComponent(f)),s[c]=f}return s},t.safeDecodeURIComponent=function(n){try{return decodeURIComponent(n)}catch(t){return n}},t.get=function(n,e){return t.getAll(e)[n]},t.set=function(n,e,r,s){r=i.extend({encodeValue:!0},r),!1!==s&&(s=!0);var m=[];if(i.isUndefined(r.domain)){var _=l.getCurrentDomain();_||(_=function(n,e){!1!==e&&(e=!0);for(var r,o,a=n.hostname.split("."),u=[],s=null,l=a.length-1;l>=0;l--)if(u.unshift(a[l]),r=u.join("."),!(a.length>1&&(1===u.length||2===u.length&&h.includes(u[0]))||i.includes(p,r))){o={domain:e?"."+r:r};try{t.set(g,Math.random().toString(),o),t.remove(g,o),s=o.domain;break}catch(d){}}return f.dispatch(c.SET_COOKIE_DOMAIN,s),s}(u.getLocation(),!0)),r.domain=_}if(r.domain&&m.push("domain="+r.domain),i.isUndefined(r.path)&&(r.path="/"),r.path&&m.push("path="+r.path),i.isUndefined(r.expires)){var y=i.isUndefined(r.maxAge)?l.getDefaultAgeInSeconds():r.maxAge;r.expires=new Date(o.now()+1e3*y)}if(i.isUndefined(r.expires)||m.push("expires="+r.expires.toUTCString()),r.secure&&m.push("secure"),a.setCookie(n+"="+(r.encodeValue?encodeURIComponent(e):e)+";"+m.join(";")),s){var w=r.encodeValue,b=t.get(n,w);if(b!==e){if(!b)throw new d('Failed to set cookie "'+n+'"');throw new v('Expected "'+e+'" for "'+n+'", got "'+b+'"')}}},t.remove=function(n,e){for(var r=u.getLocation().hostname.split("."),o=1===r.length?0:1;r.length>o&&(2!==r.length||!h.includes(r[0]));)t.set(n,null,i.extend({},e,{domain:"."+r.join("."),expires:new Date(0)}),!1),r.shift()};var p=["optimizely.test"],g="optimizelyDomainTestCookie"},1416:function(n,t,e){var i=e(8837),r=i("InternalError");t.C=r,t.v=function(n){return i(n,r)}},4381:function(n,t,e){var i=e(558);t.deepFreeze=function(n){},t.safeReference=function(n){return i.cloneDeep(n)}},1361:function(n,t,e){var i=e(558);t.getFieldValue=function(n,t){i.isArray(t)||(t=[t]);for(var e=n,r=0;r=n},s.prototype.matchesLogMessage=function(n,t){var e=this.logMatcher;if(!this.logMatcher)return!0;if(this.logGroup)return"GROUPSTART"===n?this.logGroup++:"GROUPEND"===n&&this.logGroup--,!0;var r=i.some(t,(function(n){if(!i.isString(n))try{n=c.stringify(n)}catch(t){}return i.isString(n)&&i.includes(n,e)}));return r&&"GROUPSTART"===n&&this.logGroup++,r},s.prototype.storeLog=function(n,t){var e={logLevel:n,logMessage:t};u.dispatch(r.LOG,e)},s.prototype.flush=function(){var n=e(3295).get("stores/log");this.logGroup=0;var t=n.getLogs();i.each(t,i.bind((function(n){this.Ee(n.logLevel,n.logMessage,!0)}),this))},s.prototype.Ee=function(n,t,e){var r,o=n;if(console)switch(n){case"GROUPSTART":r=console.groupCollapsed,o=a.LogLevel.DEBUG;break;case"GROUPEND":r=console.groupEnd,o=a.LogLevel.DEBUG;break;case a.LogLevel.ERROR:r=console.error;break;case a.LogLevel.WARN:r=console.warn;break;case a.LogLevel.DEBUG:r=console.debug;break;default:r=console.log}try{e||this.we()&&!this.shouldLog(o)||(i.isArray(t)&&i.isString(t[0])&&(t=this.Ie(t)),this.storeLog(n,t)),r&&this.shouldLog(o)&&this.matchesLogMessage(n,t)&&r.apply(console,t)}catch(u){console&&(console.error?console.error(u):console.log(u))}},s.prototype.debug=function(){this.Ee(a.LogLevel.DEBUG,[].slice.call(arguments))},s.prototype.log=function(){this.Ee(a.LogLevel.INFO,[].slice.call(arguments))},s.prototype.logAlways=function(){var n=this.Ie([].slice.call(arguments));console&&console.log&&console.log.apply&&console.log.apply(console,n),this.storeLog(a.LogLevel.INFO,n)},s.prototype.warn=function(){this.Ee(a.LogLevel.WARN,[].slice.call(arguments))},s.prototype.error=function(n){var t=[].slice.call(arguments);1===t.length&&n.stack?(this.Ee(a.LogLevel.ERROR,[this.Ae(),n]),this.Ee(a.LogLevel.INFO,[n.stack])):this.Ee(a.LogLevel.ERROR,t)},s.prototype.groupCollapsed=function(){this.Ee("GROUPSTART",[].slice.call(arguments))},s.prototype.groupEnd=function(){this.Ee("GROUPEND",[].slice.call(arguments))},s.prototype.Ie=function(n){var t=this.Ae().toString();return t.length<6&&(t=(" "+t).slice(-6)),[t+"| Optly / "+n[0]].concat(n.slice(1))},s.prototype.Ae=function(){return this.timebase?o.now()-this.timebase:0},s.prototype.be=function(n){return n&&("TRUE"===(n=n.toUpperCase())&&(n="INFO"),"FALSE"===n&&(n="OFF"),"ALL"===n&&(n="DEBUG"),!i.isUndefined(a.LogLevel[n]))?a.LogLevel[n]:null},n.exports=new s},2676:function(n,t){t.isSingleExperimentPolicy=function(n){return"single_experiment"===n||"multivariate"===n}},6867:function(n,t,e){var i=e(558),r=e(3399).Promise,o=e(8928);t.pollFor=function(n,t,e){var a,u;return i.isFunction(e)?u=e:(a=e||100,u=function(){return--a<-1}),t=t||50,new r((function(e,i){!function r(){var a;if(!u()){try{var c=n();if(c)return e(c)}catch(s){a=s}return o.setTimeout(r,t)}i(a||new Error("Poll timed out"))}()}))}},7065:function(n,t,e){var i=e(558),r=e(3399).Promise;t.firstToResolve=function(n){return new r((function(t){i.each(n,(function(n){r.resolve(n).then(t,(function(){}))}))}))}},6992:function(n,t,e){var i=e(558),r=e(8928);t.getQueryParams=function(){var n=r.getLocationSearch()||"";if(0===n.indexOf("?")&&(n=n.substring(1)),0===n.length)return[];for(var t=n.split("&"),e=[],i=0;i0&&(o=u[0]),u.length>1&&(a=u[1]),e.push([o,a])}return e},t.getQueryParamValue=function(n){for(var e=t.getQueryParams(),i=0;i"),a.close();var l=i.mapValues(c.SandboxedFunctions,(function(n){return e[n]}));s.dispatch(r.SANDBOXED_FUNCTIONS_ADDED,{sandboxedFunctions:l})}catch(d){f.warn("Unable to create a sandbox: ",d)}}},4765:function(n,t,e){var i=e(2065),r=e(9402),o=e(2170);t.addScriptAsync=function(n,t){var e=i.querySelector("head"),o=i.createElement("script");o.type="text/javascript",o.async=!0,o.src=n,t&&(o.onload=t),e.insertBefore(o,e.firstChild),r.debug("Asynchronously requesting "+n)},t.addScriptSync=function(n,e){try{var a="optimizely_synchronous_script_"+Math.floor(1e5*Math.random());if(-1!==n.indexOf('"'))return void r.error("Blocked attempt to load unsafe script: "+n);i.write("");var u=i.querySelector("#"+a);if(!u)throw new Error("DocumentEnv.write failed to append script");u.onload=e,u.onerror=function(i){r.warn("Failed to load script ("+n+") synchronously:",i),t.addScriptAsync(n,e)}}catch(c){r.debug("DocumentEnv.write failed for "+n+": "+c.message);return o.request({url:n,async:!1,contentType:"text/plain",success:function(n){new Function(n.responseText)(),e&&e()}})["catch"]((function(i){r.error("Failed to load "+n+" via synchronous XHR: "+i.message),t.addScriptAsync(n,e)}))}}},6495:function(n,t,e){var i=e(3399).Promise,r=e(8928);t.makeTimeoutPromise=function(n){return new i((function(t,e){r.setTimeout((function(){e(new Error("Timed out after "+n+" ms"))}),n)}))}},8036:function(n,t,e){var i=e(558),r=e(5839),o=e(8928),a=e(6654),u=e(3295),c=e(6691),s=u.get("stores/ua_data");t.get=function(){var n=s.get();return i.isEmpty(n)&&(n=r.parseUA(o.getUserAgent()),c.dispatch(a.SET_UA_DATA,{data:n})),n}},5981:function(n,t){t.guessDomain=function(n,t){if(!n)return"";try{return t?n.match(/:\/\/(.[^/]+)/)[1]:n.match(/:\/\/(?:www[0-9]?\.)?(.[^/:]+)/)[1]}catch(e){return""}}},5266:function(n,t,e){var i=e(558),r=e(3399).Promise,o=e(6654),a=e(3295),u=e(6691),c=e(5095),s=e(1416).v,f=e(1964),l=e(2065),d=e(1494),v=e(6867),h=e(9023),p=e(8928),g=e(9402),m=a.get("stores/xdomain"),_=t.Error=s("XDomainStorageError");function y(n){var t;if(i.find(m.getFrames(),{origin:n.origin})){try{t=d.parse(n.data)}catch(a){return void g.debug("XDomain","Ignoring malformed message event:",n)}if("ERROR"===t.type)u.dispatch(o.XDOMAIN_SET_DISABLED,{disabled:!0}),c.emitInternalError(new _("Xdomain Error: "+t.response));else if("SYNC"===t.type)i.each(m.getSubscribers(),(function(n){n(t.response.key,t.response.value)}));else{var e=m.getMessageById(t.id);if(!e){if(g.warn("XDomain","No stored message found for ID",t.id),i.isNumber(t.id)){var r=m.getNextMessageId();t.id>=r?c.emitInternalError(new _("Message ID is greater than expected maximum ID ("+t.id+">"+r+")")):t.id<0?c.emitInternalError(new _("Message ID is < 0: "+t.id)):c.emitInternalError(new _("No stored message found for message ID: "+t.id))}else c.emitInternalError(new _("Message ID is not a number: "+t.id));return}if(!e.resolver)return void g.warn("XDomain","Message already resolved, ignoring:",t.id);e.resolver(t.response),u.dispatch(o.XDOMAIN_SET_MESSAGE,{messageId:t.id,message:{data:{id:t.id,type:e.data.type,key:e.data.key},startTime:e.startTime,endTime:f.now()}})}}else g.debug("XDomain","No frame found for origin: "+n.origin)}function w(n,t){return t||(t=m.getDefaultFrame()),new r((function(e){var r={data:i.extend({},n,{id:m.getNextMessageId()}),resolver:e};t?m.isDisabled()||b(r,t):u.dispatch(o.XDOMAIN_SET_MESSAGE,{messageId:r.data.id,message:r})}))}function b(n,t){var e=n.data;u.dispatch(o.XDOMAIN_SET_MESSAGE,{messageId:n.data.id,message:i.extend({},n,{startTime:f.now()})}),t.target.postMessage(d.stringify(e),t.origin)}t.setItem=function(n,t,e){return w({type:"PUT",key:n,value:t},e)},t.getItem=function(n,t){return w({type:"GET",key:n},t)},t.fetchAll=function(n){return w({type:"GETALL"},n)},t.deleteData=function(n,t){return w({type:"DELETE",visitorId:n},t)},t.subscribe=function(n){u.dispatch(o.XDOMAIN_ADD_SUBSCRIBER,{subscriber:n})},t.loadIframe=function(n,t){return new r((function(e){var i=l.createElement("iframe");i.src=n+t,i.hidden=!0,i.setAttribute("tabindex","-1"),i.setAttribute("title","Optimizely Internal Frame"),i.style.display="none",i.height=0,i.width=0,i.onload=function(){var r={id:m.getNextFrameId(),target:i.contentWindow,origin:n,path:t};u.dispatch(o.XDOMAIN_ADD_FRAME,r),e(r)},l.appendTo(l.querySelector("body"),i)}))},t.getXDomainUserId=function(n,t){var e,r={},o=i.keys(n);return i.each(t,(function(n){r[n]=[],i.each(o,(function(t){var o=h.getUserIdFromKey(t,n);!e&&o&&(e=o),o&&!i.includes(r[n],o)&&r[n].push(o)}))})),g.debug("XDomain: Found userIds:",r),e},t.load=function(n,e){p.addEventListener("message",y);return v.pollFor((function(){return!!l.querySelector("body")})).then((function(){return t.loadIframe(n,e)})).then((function(n){u.dispatch(o.XDOMAIN_SET_DEFAULT_FRAME,n),m.isDisabled()||i.each(m.getMessages(),(function(t){t.startTime||b(t,n)}))}))}},2170:function(n,t,e){var i=e(558),r=e(6654),o=e(1964),a=e(6691),u=e(1494),c=e(9402),s=e(3399).Promise,f=e(480);t.isCORSSupported=function(){return"withCredentials"in new(f.get("XMLHttpRequest"))},t.request=function(n){return n=i.extend({method:"GET",async:!0,contentType:"text/plain;charset=UTF-8"},n),new s((function(e,r){if(!t.isCORSSupported())return r("CORS is not supported");var o=new(f.get("XMLHttpRequest"));o.onload=function(){n.success&&n.success(o),e(o)},o.onerror=function(){n.error&&n.error(o),r(o)},i.isObject(n.data)&&(n.data=u.stringify(n.data)),o.open(n.method,n.url,n.async),n.withCredentials&&(o.withCredentials=n.withCredentials),o.setRequestHeader("Content-Type",n.contentType),i.isObject(n.headers)&&i.forEach(n.headers,(function(n,t){o.setRequestHeader(t,n)})),o.send(n.data)}))},t.retryableRequest=function(n,e,u,f){if(!e)return s.reject(new Error("No id specified for request."));if(!t.isCORSSupported())return s.reject(new Error("CORS is not supported."));i.isUndefined(f)&&(f=3),i.isUndefined(u)&&(u=0);var l={id:e,timeStamp:o.now(),data:n,retryCount:u};return a.dispatch(r.SET_PENDING_EVENT,l),c.debug("Sending event ",e),t.request(n).then((function(n){return a.dispatch(r.REMOVE_PENDING_EVENT,{id:e}),n}),(function(n){throw l.retryCount>=f?(a.dispatch(r.REMOVE_PENDING_EVENT,{id:e}),c.warn("Event ",l," could not be sent after ",f," attempts.")):(l.retryCount++,a.dispatch(r.SET_PENDING_EVENT,l),c.debug("Event ",l," failed to send, with error ",n," It will be retried ",f-u," times.")),n}))},t.sendBeacon=t.request},4106:function(n,t,e){var i=e(558),r=e(6654),o=e(2288),a=e(5851),u=e(1964),c=e(3295),s=e(2502),f=e(7990),l=e(6691),d=e(9402),v=e(3890),h=c.get("stores/event_data"),p=c.get("stores/plugins"),g=c.get("stores/rum"),m=c.get("stores/view"),_=c.get("stores/view_data");function y(n,t){i.forEach(n,(function(n){if(n.eventType!==f.CUSTOM){var e=p.getPlugin(s.PluginTypes.eventImplementations,n.eventType);e?t?e.attach(n):e.detach(n):d.warn("No implementation found for event type:",n.eventType,"needed for event:",n)}}))}t.parseViewTags=function(n){var e=t.evaluateViewTags(n);t.setParsedViewTags(n.id,e)},t.updateAllViewTags=function(){var n=m.getActiveViewStates();i.each(n,(function(n){var e=_.get(n.id);t.parseViewTags(e)}))},t.evaluateViewTags=function(n){return n.tags?i.reduce(n.tags,(function(n,t){try{n[t.apiName]=v.getTagValue(t)}catch(r){e=r,(null!=(i=v.Error)&&"undefined"!=typeof Symbol&&i[Symbol.hasInstance]?i[Symbol.hasInstance](e):e instanceof i)?d.warn("Page / Ignoring unparseable tag",t,r):d.error(r)}var e,i;return n}),{}):{}},t.createViewTicket=function(){var n={};return i.each(p.getAllPlugins(s.PluginTypes.viewProviders),(function(t){n[t.provides]=c.evaluate(t.getter)})),n},t.registerViews=function(n){l.dispatch(r.REGISTER_VIEWS,{views:n})},t.activateViaAPI=function(n,e){e&&t.setUserSuppliedViewTags(n.id,e),t.activateMultiple([n],e)},t.getViewsAndActivate=function(n){var e=_.getAllViewsForActivationType(n);t.activateMultiple(e)},t.activateMultiple=function(n,e){var a=[];return i.each(n,(function(n){var u=m.getViewState(n.id),c=t.createViewTicket();if(u.isActive)if(n.deactivationEnabled)try{t.hasValidStaticConditions(n,c)||t.deactivate(n)}catch(v){d.error("Page / Error evaluating whether to deactivate page ",t.description(n),v)}else d.log("Not activating Page, already active ",t.description(n));else{try{if(!t.hasValidStaticConditions(n,c))return i.isBoolean(u.isActive)||t.setViewActiveState(n,!1),void d.log("Page / Failed to match page conditions for "+t.description(n),n.staticConditions)}catch(v){return i.isBoolean(u.isActive)||t.setViewActiveState(n,!1),void d.error("Page / Error evaluating whether to activate page ",t.description(n),v)}if(a.push(n),t.setViewActiveState(n,!0),d.log("Activated Page",t.description(n)),o.emitViewActivated({view:n,metadata:e}),g.getSampleRum()){var f=n.activationType||s.ViewActivationTypes.immediate;l.dispatch(r.RECORD_ACTIVATION_TYPE_USAGE,{activationType:f,entityId:n.id})}y(h.getByPageId(n.id),!0)}})),i.isEmpty(a)||o.emitViewsActivated({views:a}),a},t.deactivate=function(n){m.getViewState(n.id).isActive?(t.setViewActiveState(n,!1),d.log("Deactivated Page",t.description(n)),o.emitPageDeactivated({page:n}),y(h.getByPageId(n.id),!1)):d.log("Not deactivating Page, already inactive ",t.description(n))},t.setViewActiveState=function(n,t){l.dispatch(r.SET_VIEW_ACTIVE_STATE,{view:n,timestamp:u.now(),isActive:t})},t.setGlobalTags=function(n){l.dispatch(r.SET_GLOBAL_TAGS,n)},t.setParsedViewTags=function(n,t){l.dispatch(r.UPDATE_PARSED_VIEW_METADATA,{pageId:n,metadata:t})},t.setUserSuppliedViewTags=function(n,t){l.dispatch(r.UPDATE_USER_SUPPLIED_METADATA,{pageId:n,metadata:t})},t.hasValidStaticConditions=function(n,t){var e={};if(i.isEmpty(n.staticConditions))return!0;var o=p.getAllPlugins(s.PluginTypes.viewMatchers);d.groupCollapsed("Page / Evaluating staticConditions:",n.staticConditions),d.debug("Matching to current value:",t);var u=a.evaluate(n.staticConditions,(function(n){var i=n.type,r=o[i];if(!r)throw new Error("Page / No matcher found for type="+i);return r&&(e[n.type]||(e[n.type]=!0)),r.match(t,n)}));return d.groupEnd(),g.getSampleRum()&&u&&l.dispatch(r.RECORD_VIEW_FEATURE_USAGE,{featuresUsed:i.keys(e),entityId:n.id}),u},t.description=function(n){return'"'+n.name+'" ('+n.id+")"},t.isActivationTypeImmediate=function(n){return n===s.ViewActivationTypes.immediate||!n},t.shouldTriggerImmediately=function(n){return n===s.ViewActivationTypes.DOMChanged||n===s.ViewActivationTypes.URLChanged||n===s.ViewActivationTypes.immediate||!n},t.create=function(n,t){return{id:n,apiName:t,category:"other"}},t.createState=function(n){return{id:n,isActive:!0,metadata:{},parsedMetadata:{},userSuppliedMetadata:{}}}},9023:function(n,t,e){Object.defineProperty(t,"te",{value:!0});var i,r=e(558),o=e(6691),a=e(6654),u=e(8765),c=e(2376),s=e(6796),f=e(1964),l=e(3295),d=e(2502),v=e(1494),h=e(1361),p=e(6283).DT,g=e(9402),m=e(3399).Promise,_=e(6992),y=e(2502).VisitorStorageKeys,w=e(8928);i=e(5266);var b=l.get("stores/cookie_options"),E=l.get("stores/global"),I=l.get("stores/layer"),A=l.get("stores/plugins"),S=l.get("stores/rum"),T=l.get("stores/session"),k=l.get("stores/visitor_id"),R=l.get("stores/visitor_bucketing"),C=l.get("stores/visitor"),N=l.get("stores/provider_status");function D(n,t){var e=function(n,e){var i;t.attributionType&&(i=f.now()),o.dispatch(a.SET_VISITOR_ATTRIBUTES,{attributes:[{key:n,value:e,metadata:{lastModified:i}}]})};if(t.getter){var i=t.provides;if(r.isArray(i)||(i=[i]),!(t.isSticky&&!r.isUndefined(h.getFieldValue(n,i)))){var u;try{var c=l.evaluate(t.getter);r.isFunction(c)&&(c=c((function(){return h.getFieldValue(n,i)}),(function(n){e(i,n)}))),r.isUndefined(c)||(t.isAsync?(u=c.then((function(n){e(i,n)}),(function(n){g.warn('Failed to evaluate provider for "'+t.provides+'"; error was:',n)})),o.dispatch(a.SET_VISITOR_ATTRIBUTE_PENDING,{key:i,pending:u})):e(i,c))}catch(s){g.warn('Failed to evaluate getter for provider for "'+t.provides+'"; error was: '+s.message)}return u}}}function O(n){var t=P(n),e=p.getItem(t);return r.isString(e)&&(e=U(e)),e}function x(n){var t;if(n.layerId)t=n;else{var e=n;t={layerId:e.i,pageId:e.p,decisionTimestamp:e.t,decisionTicket:{audienceIds:e.a||[]},decision:{layerId:e.i,experimentId:e.x||null,variationId:e.v||null,isLayerHoldback:e.h||!1}}}return t}function M(n,t,e){try{var r=P(n);e||(t=v.stringify(t));try{p.setItem(r,t)}catch(o){throw g.warn("Visitor / Unable to set localStorage key, error was:",o),new Error("Unable to set localStorage")}i.setItem(r,t)}catch(o){g.warn("Unable to persist visitor data:",o.message)}}function P(n){var e=k.getBucketingId();if(!e)throw new Error("Visitor bucketingId not set");var i=t.getNamespace();if(!i)throw new Error("Namespace is not set");return[e,i,n].join("$$")}function L(n,e){if(!k.getBucketingId())throw new Error("Cannot update local store because bucketingId not set");if(V(n)){var i=t.getStorageKeyFromKey(n);if(r.includes(y,i)){var u=P(i);if(!(n.indexOf(u)<=0)&&(e=U(e)))if(i===y.EVENT_QUEUE)o.dispatch(a.SET_FOREIGN_VISITOR_EVENT_QUEUE,{key:n,value:c.deserialize(e)});else if(i===y.EVENTS)o.dispatch(a.SET_FOREIGN_VISITOR_EVENTS,{key:n,value:c.deserialize(e)});else if(i===y.LAYER_STATES)o.dispatch(a.LOAD_PERSISTED_LAYER_STATES,{layerStates:r.map(e,x),merge:!0});else if(i===y.VARIATION_MAP)o.dispatch(a.MERGE_VARIATION_ID_MAP,{variationIdMap:e});else if(i===y.CONTEXTUAL_MAB)o.dispatch(a.MERGE_CONTEXTUAL_MAB_MAP,{contextualMabMap:e});else if(i===y.VISITOR_PROFILE){var s=e;r.each(["custom"],(function(n){var t=A.getPlugin(d.PluginTypes.visitorProfileProviders,n);if(t){if(s.profile&&s.metadata){var e=function(n,t,e){var i=C.getAttribute(t),o=C.getAttributeMetadata(t),a=n.profile[t],u=n.metadata[t];if(r.isEmpty(i))return{data:a,metadata:u};var c={};return r.forOwn(a,(function(n,t){var i,a;o&&o[t]&&(i=o[t].lastModified),u&&u[t]&&(a=u[t].lastModified),(e===d.AttributionTypes.FIRST_TOUCH&&i>=a||e===d.AttributionTypes.LAST_TOUCH&&a>=i||r.isUndefined(i)&&a)&&(c.data=c.data||{},c.data[t]=n,a&&(c.metadata=c.metadata||{},c.metadata[t]=c.metadata[t]||{},c.metadata[t].lastModified=a))})),c}(s,n,t.attributionType);if(!r.isEmpty(e)){var i=[];r.forOwn(e.data,(function(t,r){var o=e.metadata[r],a={key:[n,r],value:t,metadata:o};i.push(a)})),o.dispatch(a.SET_VISITOR_ATTRIBUTES,{attributes:i})}}}else g.debug("Attribute type",n,"not used by any audiences")}))}}}}function V(n){return n.split("$$")[0].indexOf("://")>0}function U(n){try{return v.parse(n)}catch(t){return g.debug("Failed to parse: ",n,t),null}}t.getOrGenerateId=function(){return{randomId:t.getCurrentId()||"oeu"+f.now()+"r"+Math.random()}},t.getCurrentId=function(){var n=k.getVisitorIdLocator();return C.getVisitorIdFromAPI()||(n?function(n){var t,e=n.name;switch(n.type){case d.VisitorIdLocatorType.COOKIE:t=s.get(e);break;case d.VisitorIdLocatorType.JS_VARIABLE:t=w.getGlobalByPath(e);break;case d.VisitorIdLocatorType.LOCALSTORAGE:try{t=w.getGlobal("localStorage").getItem(e)}catch(u){throw new Error("Unable to read localStorage: "+u.toString())}break;case d.VisitorIdLocatorType.QUERY:t=_.getQueryParamValue(e)}try{if(!t)throw g.error("Visitor / Customer provided visitor id cannot be found. Type:",n.type," Name:",e),new Error("Failure to obtain visitor id from "+n.type);if(!r.isString(t)&&!r.isNumber(t))throw g.error("Visitor / Customer provided visitor id is not a string or number. Type:",n.type," Name:",e," Id Type:",(i=t)&&"undefined"!=typeof Symbol&&i.constructor===Symbol?"symbol":typeof i),new Error("Customer provided visitor id is not a string or number")}catch(c){throw S.getSampleRum()&&o.dispatch(a.RECORD_VISITOR_ID_ERROR,{isError:!0}),c}var i;S.getSampleRum()&&(o.dispatch(a.RECORD_VISITOR_ID_ERROR,{isError:!1}),o.dispatch(a.RECORD_VISITOR_ID_LOCATOR_USAGE,{visitorIdLocatorType:n.type,entityId:t}));return String(t)}(n):s.get(d.COOKIES.VISITOR_ID))},t.hasSomeData=function(){return p.keys().length>0},t.setId=function(n){var e,c,f=k.getBucketingId();o.dispatch(a.SET_VISITOR_ID,n),k.getBucketingId()!==f&&(!function(){!function(n,t){0;u.initializeStore(n,t)}(O(y.EVENTS)||[],O(y.EVENT_QUEUE)||[]);var n=(e=y.LAYER_STATES,i=k.getBucketingId(),c=[],s=new RegExp(i+"\\$\\$([^$]+?)\\$\\$"+e),r.each(p.keys(),(function(n){var t=n.match(s);if(t){var e={namespace:t[1],userId:i,item:U(p.getItem(n))};c.push(e)}})),c);var e,i,c,s;r.forEach(n,(function(n){n.item=r.map(n.item,x)})),l=n,v=[],r.each(l,(function(n){r.each(n.item,(function(t){t.namespace=n.namespace,v.push(t)}))})),g=v,o.dispatch(a.LOAD_PERSISTED_LAYER_STATES,{layerStates:r.filter(g,(function(n){return!!n.decision}))}),h=O(y.SESSION_STATE)||{},h=r.extend({lastSessionTimestamp:0,sessionId:null},h),o.dispatch(a.LOAD_SESSION_STATE,h),function(n){var t,e,i=A.getAllPlugins(d.PluginTypes.visitorProfileProviders),u=r.filter(i,(function(n){return r.isFunction(n.restorer)}));n.profile&&n.metadata?(t=n.profile,e=n.metadata):(t=n,e={});t=r.reduce(t,(function(n,t,e){var i=t,o=r.find(u,{provides:e});return o&&(i=o.restorer(t)),n[e]=i,n}),{}),o.dispatch(a.LOAD_EXISTING_VISITOR_PROFILE,{profile:t,metadata:e})}(O(y.VISITOR_PROFILE)||{});var f=O(y.TRACKER_OPTIMIZELY);f&&(m=f,o.dispatch(a.SET_TRACKER_PERSISTABLE_STATE,m));var l,v;var h;var g;var m;t.loadForeignData(),t.removeLegacySessionStateCookies()}(),t.deleteOldLocalData(),i.deleteData(n));try{k.getVisitorIdLocator()||t.maybePersistVisitorId(n)}catch(l){if(g.error("Visitor / Unable to persist visitorId, disabling tracking"),o.dispatch(a.LOAD_DIRECTIVE,{trackingDisabled:!0}),e=l,null!=(c=s.MismatchError)&&"undefined"!=typeof Symbol&&c[Symbol.hasInstance]?c[Symbol.hasInstance](e):e instanceof c)throw g.error("Visitor / Cookie not set to correct value:",l),new Error("Cookie mismatch error while persisting visitorId");throw l}t.refreshSession()},t.getVariationIdMap=function(){return O(y.VARIATION_MAP)||{}},t.updateVariationIdMap=function(n,t,e){o.dispatch(a.UPDATE_VARIATION_ID_MAP,{layerId:n,experimentId:t,variationId:e})},t.persistVariationIdMap=function(){var n=R.getVariationIdMapString();M(y.VARIATION_MAP,n,!0)},t.getContextualMabMap=function(){return O(y.CONTEXTUAL_MAB)||{}},t.updateContextualMabMap=function(n,t,e){o.dispatch(a.UPDATE_CONTEXTUAL_MAB_MAP,{layerId:n,experimentId:t,variationData:e})},t.persistContextualMabMap=function(){var n=R.getContextualMabMapString();M(y.CONTEXTUAL_MAB,n,!0)},t.getOdpSegments=function(){return O(y.ODP_SEGMENTS)||{}},t.persistOdpSegments=function(n){M(y.ODP_SEGMENTS,n,!1)},t.getPreferredLayerMap=function(){return O(y.LAYER_MAP)||{}},t.updatePreferredLayerMap=function(n,t){o.dispatch(a.UPDATE_PREFERRED_LAYER_MAP,{groupId:n,layerId:t})},t.persistTrackerOptimizelyData=function(n){M(y.TRACKER_OPTIMIZELY,n)},t.refreshSession=function(){o.dispatch(a.REFRESH_SESSION)},t.populateEagerVisitorData=function(n,e){var i=r.filter(n,(function(n){return!n.isLazy}));return t.populateVisitorData(i,e)},t.populateLazyVisitorData=function(n,e,i){g.debug("Populating lazy visitor. List of all providers",n);var o=r.filter(n,(function(n){return n.isLazy&&i.has(n.provides)}));return g.debug("Filtered list of providers that are lazy and present in audiences",o),t.populateVisitorData(o,e)},t.populateVisitorData=function(n,t){t=t||{};var e=r.partial(D,t),i=r(n).filter({isAsync:!0}).map(e).filter().value();return r.forEach(r.filter(n,(function(n){return!n.isAsync})),e),i.length>0?m.all(i):m.resolve()},t.persistBehaviorEvents=function(n){M(y.EVENTS,n)},t.persistBehaviorEventQueue=function(n){M(y.EVENT_QUEUE,n)},t.getPersistedBehaviorEventCount=function(){var n=O(y.EVENTS)||[],t=O(y.EVENT_QUEUE)||[];return c.deserialize(n).length+c.deserialize(t).length},t.persistLayerStates=function(){var n=I.getLayerStates(t.getNamespace());n=r.map(n,(function(n){return r.omit(n,"namespace")})),M(y.LAYER_STATES,n)},t.persistSessionState=function(){M(y.SESSION_STATE,T.getState())},t.persistVisitorProfile=function(){var n=function(){var n=C.getVisitorProfile(),t=C.getVisitorProfileMetadata(),e=A.getAllPlugins(d.PluginTypes.visitorProfileProviders);if(e){var i=r.reduce(e,(function(n,t){return t.provides&&(n[t.provides]=t),n}),{});n=r.omitBy(n,(function(n,t){var e=i[t];return e&&e.isTransient}))}return{profile:n,metadata:t}}();M(y.VISITOR_PROFILE,n)},t.persistVisitorBucketingStore=function(){var n;t.persistVariationIdMap(),n=R.getPreferredLayerMapString(),M(y.LAYER_MAP,n,!0),t.persistContextualMabMap()},t.getUserIdFromKey=function(n,e){var i;return r.includes(n,e)&&r.includes(n,"_")&&r.includes(n,"$$")&&r.includes(n.slice(n.indexOf("$$")),t.getNamespace())&&(i=n.slice(n.indexOf("_")+1,n.indexOf("$$"))),i},t.maybePersistVisitorId=function(n){n.randomId&&(b.getAutoRefresh()||t.getCurrentId()!==n.randomId?(s.set(d.COOKIES.VISITOR_ID,n.randomId),g.log("Persisting visitorId:",n.randomId)):g.log("Not persisting visitorId: value is not changed and also auto-refresh is disabled"))},t.getAttribute=function(n){return C.getAttribute(n)},t.getPendingAttributeValue=function(n){return N.getPendingAttributeValue(n)},t.isForeignKey=V,t.checkKeyForVisitorId=function(n){var e=k.getBucketingId()||t.getCurrentId(),i=t.getIdFromKey(n);return!i||i===e},t.getIdFromKey=function(n){var e=n.split("$$")[0],i=t.getStorageKeyFromKey(n);if(r.includes(d.StorageKeys,i))return null;var o=e.indexOf("_");return-1===o?e:e.substring(o+1)},t.getStorageKeyFromKey=function(n){var t,e=n.split("$$").pop();if(e.indexOf("://")>-1){var i=e.indexOf("_");t=e.substring(i+1)}else t=e;return r.includes(r.values(d.AllStorageKeys),t)?t:null},t.deleteOldLocalData=function(){var n=p.keys();r.each(n,(function(n){t.isForeignKey(n)||t.checkKeyForVisitorId(n)||p.removeItem(n)}))},t.deleteOldForeignData=function(){var n=p.keys();r.each(n,(function(n){t.isForeignKey(n)&&p.removeItem(n)}))},t.loadForeignData=function(){r.each(p.keys(),(function(n){var t=p.getItem(n);t&&L(n,t)}))},t.getNamespace=function(){return E.getNamespace()},t.serializeFieldKey=function(n){return r.isArray(n)?n.join("$$"):n},t.removeLegacySessionStateCookies=function(){var n=s.getAll();r.forEach(r.keys(n),(function(n){0===n.indexOf(d.COOKIES.SESSION_STATE+"$$")&&s.remove(n)}))}},2570:function(n,t,e){var i=e(558),r=e(2502);t.normalizeClientData=function(n){!n.listTargetingKeys&&n.listTargetingCookies&&(n.listTargetingKeys=i.map(n.listTargetingCookies,(function(n){return{type:r.ListTargetingKeyTypes.COOKIE,key:n}})),delete n.listTargetingCookies)}},5040:function(n,t,e){e(3295).register("env/jquery",e(5968))},5968:function(n,t,e){var i,r=e(8928);try{i=$}catch(a){}var o=r.getGlobal("$");n.exports=i&&i!==o?i:o},3795:function(n,t,e){e(558),e(1416).C,e(1964);var i=e(3295),r=(e(2065),e(9402));e(8928),e(2170),i.get("stores/client_metadata"),i.get("stores/global");t.handleError=function(n,t){t?r.error("Uncaught error:",n,t):r.error("Uncaught error:",n)}},1095:function(n,t,e){var i=e(9653),r=e(4659).b,o={selectExperiment:function(n,t,e){if(n.experiments.length<1)throw new r("Unable to find experiment to bucket user into");var o=n.experiments[0];if(!i.isValidExperiment(t,o))throw new r('Audience conditions failed for experiment: "'+o.id+'".');return o}};n.exports=function(n){n.registerDecider("single_experiment",o),n.registerDecider("multivariate",o)}},7266:function(n,t,e){var i=e(558),r=e(1570),o=e(1841),a=e(1928);function u(n,t){var e=o.buildFromSpecV0_1(t);if(1!==e.length)throw new Error("Invalid query descriptor; verify that no aggregators are specified");return a.execute(e[0],n)}function c(n,t){return i.map(n,(function(n){return i.isFunction(n.toObject)?n.toObject(t):n}))}function s(n,t){if(!n)return["Descriptor not defined"];var e=[];return n.count&&e.push('Unexpected "count" clause specified'),n.pick&&n.pick.modifier&&-1===t.indexOf(n.pick.modifier)&&e.push('Invalid "pick" modifier "'+n.pick.modifier+'"'),i.each(n.filters,(function(n){i.isUndefined(n.modifier)||e.push('Unexpected "filter" modifier "'+n.modifier+'"')})),e.length>0?e:void 0}function f(n,t){var e={revenueAsTag:!1,timeAsTimestamp:!0};if(i.isUndefined(t))return c(r.getEvents(n),e);if(i.isNumber(t)){if(t<=0)throw new Error("Count must be a positive integer, got "+t);return c(r.getEvents(n).slice(-t),e)}var a=s(t,i.values(o.RECENCY_FILTERS));if(a)throw new Error(a.join("\n"));return c(u(r.getEvents(n),t),e)}function l(n,t){if(!(t=i.cloneDeep(t)||{}).pick)throw new Error('No "pick" clause provided in query descriptor');if(!t.pick.name)throw new Error('No field name provided in "pick" clause');t.pick.modifier=t.pick.modifier||o.FREQUENCY_FILTERS.MOST_FREQUENT;var e=s(t,i.values(o.FREQUENCY_FILTERS));if(e)throw new Error(e.join("\n"));return u(r.getEvents(n),t)}function d(n,t){var e=o.buildFromSpecV0_2(t),u=r.getEvents(n),s=c(a.execute(e,u),{revenueAsTag:!0,timeAsTimestamp:!1});return(t.pick||t.reduce&&"count"===t.reduce.aggregator)&&(s=i.flatten(s)),t.reduce&&(s=s[0]),s}n.exports=["stores/visitor_events",function(n){return{getEvents:i.partial(f,n),getByFrequency:i.partial(l,n),query:i.partial(d,n)}}]},2974:function(n,t,e){n.exports=function(n){n.registerApiModule("behavior",e(7266))}},6952:function(n,t,e){n.exports=function(n){n.registerVisitorProfileProvider(e(3087)),n.registerAudienceMatcher("behavior",e(2446))}},2446:function(n,t,e){var i=e(558),r=e(1494),o=e(1841),a=e(1928);n.exports={fieldsNeeded:["events"],match:function(n,t){var e,u=r.parse(t.value);return e=i.isUndefined(u.version)?[u]:o.buildFromSpecV0_1(u),i.every(e,(function(t){return a.isSatisfied(t,n.events)}))}}},3087:function(n,t,e){var i=e(1570);n.exports={provides:"events",isTransient:!0,getter:[function(){return i.getEvents()}]}},6372:function(n,t,e){n.exports=function(n){n.registerVisitorProfileProvider(e(2615))}},2615:function(n,t,e){var i=e(558),r=e(6069),o=e(1570),a=e(1494),u=e(1841);n.exports={provides:"customBehavior",shouldTrack:!0,isLazy:!1,getter:["stores/global","stores/visitor_attribute_entity",function(n,t){var e=n.getProjectId(),c=i.filter(i.map(t.getCustomBehavioralAttributes(e),(function(n){try{return{id:n.id,granularity:r.GRANULARITY.ALL,rule:u.buildFromSpecV0_2(a.parse(n.rule_json))}}catch(t){return}}))),s=o.getEvents();return r.evaluate(c,s)}]}},3015:function(n,t,e){n.exports=function(n){n.registerVisitorProfileProvider(e(3683)),n.registerAudienceMatcher("first_session",e(1894))}},1894:function(n){n.exports={fieldsNeeded:["first_session"],match:function(n){return!!n.first_session}}},3683:function(n,t,e){var i=e(6963),r=e(1570),o=e(1361).getFieldValue,a=e(2851).CURRENT_SESSION_INDEX;n.exports={provides:"first_session",shouldTrack:!0,getter:[function(){var n=r.getEvents();if(n&&n.length>0){var t=n[0];return o(t,[i.FIELDS.SESSION_INDEX])===a}return!0}]}},6069:function(n,t,e){var i=e(9402),r={FIELDS:e(6963).FIELDS},o=e(1841),a=e(1928);t.GRANULARITY={ALL:"all",CURRENT_SESSION:"current_session",LAST_30_DAYS:"last_30_days",LAST_60_DAYS:"last_60_days"},t.evaluate=function(n,e){var u={};if(0===e.length){for(var c=0;c0&&i===n[t-1][e];)t--;return n.slice(t)}(e),f=function(n,t){if(0===n.length||t<=0)return[];var e=+new Date-t*o.MILLIS_IN_A_DAY;e-=e%o.MILLIS_IN_A_DAY;for(var i=n.length;i>0&&e<=n[i-1][r.FIELDS.TIME];)i--;return n.slice(i)}(e,60);for(c=0;c":"gt",">=":"gte","=":"eq","==":"eq"};function f(n){return n=(n||"").toString().trim(),s[n]||n}function l(n,t,e){var a={where:t};if(n.count&&(a.limit=n.count),n.modifier===i.FREQUENCY_FILTERS.MOST_FREQUENT){var u=i.getFieldKeyPathForSource(n.name,e),c=i.aggregate("count"),s=i.aggregateField("count"),f=i.groupField(u);return r.extend(a,{select:[{field:f}],groupBy:i.groupBy([u]),aggregate:[c],orderBy:[{field:s,direction:"DESC"}]})}return r.extend(a,{orderBy:[{field:[o.FIELDS.TIME],direction:"DESC"}]})}i.fieldComparison=function(n,t,e){return n=f(n),r.isString(t)&&(t=[t]),"exists"===n?{op:n,args:[{field:t}]}:{op:n,args:[{field:t},{value:e}]}},i.relativeTimeComparison=function(n,t){return{op:f(n),args:[{op:"-",args:[{eval:"now"},{field:[o.FIELDS.TIME]}]},{value:t*i.MILLIS_IN_A_DAY}]}},i.rangeTimeComparison=function(n){return r.isArray(n)?{op:"between",args:[{field:[o.FIELDS.TIME]},{value:[n[0]||+new Date(0),n[1]||+new Date]}]}:(u.error("Rule builder","rangeTimeComparison passed invalid range",n),null)},i.groupBy=function(n){for(var t=[],e=0;e0)throw new Error('A "pick" clause must not be specified with "count" or "most_recent", "most_frequent" modifiers'+a.stringify(n));return[l(n.pick,t,n.source)]}return e.length>0?e:[{where:t}]},i.buildFromSpecV0_2=function(n){!function(n){var t=[];if(r.isUndefined(n))throw new Error("rule is undefined");if(!r.isObject(n))throw new Error("rule is not an Object");"0.2"!==n.version&&t.push('version: not "0.2"'),n.filter&&(r.isArray(n.filter)?r.each(n.filter,(function(n,e){var r=i.validateFieldKeyPathV0_2(n.field,i.FieldPurpose.FILTER);r&&t.push("filter["+e+"]: "+r);var o=i.validateComparatorAndValue(n.comparator,n.value);o&&t.push("filter["+e+"]: "+o)})):t.push("filter: not an array"));var e=[],o=[];n.sort&&(n.reduce&&n.reduce.aggregator&&"nth"!==n.reduce.aggregator&&t.push("sort: superfluous because we can apply aggregator "+a.stringify(n.reduce.aggregator)+" to unsorted items"),r.isArray(n.sort)?r.each(n.sort,(function(n,u){var c=i.validateFieldKeyPathV0_2(n.field,i.FieldPurpose.SORT);c&&t.push("sort["+u+"]: "+c),n.field&&"frequency"===n.field[0]?e.push(n):o.push(n);var s=function(n){var t="direction "+(a.stringify(n)||String(n));if(!r.includes(["ascending","descending"],n))return t+' is not "ascending" or "descending"'}(n.direction);s&&t.push("sort["+u+"]: "+s)})):t.push("sort: not an array"),e.length&&o.length&&t.push('sort: sorting by non-["frequency"] field is pointless because we are going to sort the picked values by ["frequency"]'),e.length&&!n.pick&&t.push('sort: sorting by ["frequency"] is impossible because no values have been picked'));if(n.pick){n.reduce&&"count"===n.reduce.aggregator&&t.push('pick: superfluous because we can apply aggregator "count" to raw events');var u=i.validateFieldKeyPathV0_2(n.pick.field);u&&t.push("pick: "+u)}if(n.reduce){var c=n.reduce.aggregator,s="aggregator "+(a.stringify(c)||String(c)),f=n.reduce.n,l="index "+(a.stringify(f)||String(f));r.includes(["sum","avg","max","min","count","nth"],c)||t.push("reduce: "+s+" is unknown"),r.includes(["sum","avg","max","min"],c)&&(n.pick||t.push("reduce: "+s+" is impossible to use because no values have been picked")),"nth"===c?((!r.isNumber(f)||isNaN(f)||parseInt(f,10)!==f||f<0)&&t.push("reduce: "+l+" is not a non-negative integer (mandated by "+s+")"),n.sort||t.push('reduce: aggregator "nth" is meaningless without a specific sort order')):r.isUndefined(f)||t.push("reduce: "+l+" is defined (not mandated by "+s+")")}if(t.length)throw new Error(t.join("\n"))}(n);var t={where:{op:"and",args:r.map(n.filter||[],(function(n){return"age"===n.field[0]?i.relativeTimeComparison(n.comparator||"eq",n.value/i.MILLIS_IN_A_DAY):i.fieldComparison(n.comparator||"eq",i.convertFieldKeyPathFromSpecV0_2(n.field),n.value)}))}};if(n.reduce&&"count"===n.reduce.aggregator)return r.extend(t,{aggregate:[{op:"count",args:[{field:["*"]}]}],select:[{field:["_count_*"]}]});var e=[],o=[];if(n.sort&&(r.each(n.sort,(function(n){r.includes(["ascending","descending"],n.direction)&&(r.includes(["time","age"],n.field[0])&&o.push(n),"frequency"===n.field[0]&&e.push(n))})),o.length&&!e.length&&(t.orderBy=r.filter(r.map(o,(function(n){return"time"===n.field[0]?{field:i.convertFieldKeyPathFromSpecV0_2(["time"]),direction:"ascending"===n.direction?"ASC":"DESC"}:"age"===n.field[0]?{field:i.convertFieldKeyPathFromSpecV0_2(["time"]),direction:"ascending"===n.direction?"DESC":"ASC"}:void 0}))))),n.pick&&n.pick.field){var u=i.convertFieldKeyPathFromSpecV0_2(n.pick.field);if(n.reduce&&r.includes(["avg","max","min","sum"],n.reduce.aggregator))return r.extend(t,{aggregate:[{op:n.reduce.aggregator,args:[{field:u}]}],select:[{field:[c.generateAlias(n.reduce.aggregator,u)]}]});t=e.length?r.extend(t,{groupBy:[{field:u}],aggregate:[{op:"count",args:[{field:["*"]}]}],orderBy:[{field:["_count_*"],direction:"ascending"===e[0].direction?"ASC":"DESC"}],select:[{field:[u.join(".")]}]}):r.extend(t,{select:[{field:u}]})}if(n.reduce&&"nth"===n.reduce.aggregator){var s=n.reduce.n;if(r.isNumber(s)&&s>=0&&Number(s)===Math.floor(Number(s)))return r.extend(t,{offset:s,limit:1})}return t},i.convertFieldKeyPathFromSpecV0_2=function(n){return"tags"===n[0]&&"revenue"===n[1]?["r"]:[o.FIELDS_V0_2[n[0]]].concat(n.slice(1))},i.FieldPurpose={FILTER:"filter",SORT:"sort",PICK:"pick"},i.validateFieldKeyPathV0_2=function(n,t){var e="field "+(a.stringify(n)||String(n));if(!r.isArray(n)||!r.every(n,r.isString))return e+" is not an array of strings";if("tags"===n[0]&&n.length>2||"tags"!==n[0]&&n.length>1)return e+" includes too many strings";if("tags"===n[0]&&n.length<2)return e+" does not specify an exact tag";if(n.length<1)return e+" does not specify a top-level field";var u=r.keys(o.FIELDS_V0_2),c=["age","frequency"];return t===i.FieldPurpose.FILTER&&(u.push("age"),c=["frequency"]),t===i.FieldPurpose.SORT&&(u=["time","age","frequency"],c=["name","type","category","tags"]),r.includes(c,n[0])?e+" is not supported here":r.includes(u,n[0])?void 0:e+" is unknown"},i.validateComparatorAndValue=function(n,t){var e="comparator "+(a.stringify(n)||String(n)),i="value "+(a.stringify(t)||String(t));if(!r.isString(n)&&!r.isUndefined(n))return e+" is not a string";switch(n){case void 0:case"eq":case"is":case"contains":break;case"lt":case"gt":case"lte":case"gte":if(!r.isNumber(t))return i+" is not a number (mandated by "+e+")";break;case"in":if(!r.isArray(t))return i+" is not an array (mandated by "+e+")";break;case"between":if(!(r.isArray(t)&&2===t.length&&r.isNumber(t[0])&&r.isNumber(t[1])&&t[0]<=t[1]))return i+" is not a pair of increasing numbers (mandated by "+e+")";break;case"regex":if(!(r.isString(t)||r.isArray(t)&&2===t.length&&r.isString(t[0])&&r.isString(t[1])))return i+" is not a pattern string or a [pattern string, flags string] array (mandated by "+e+")";break;case"exists":if(!r.isUndefined(t))return i+" is not undefined (mandated by "+e+")";break;default:return e+" is unknown"}}},1928:function(n,t,e){var i=e(558),r=e(2502),o=e(9402),a=i.bind(o.log,o),u=e(1964),c=e(1361).getFieldValue,s=e(1494),f=function(n,t,e){if(n.getValueOrDefault)return n.getValueOrDefault(t,e);if(!i.isArray(t))return e;var r=c(n,t);return void 0===r&&(r=e),r},l=function(n){return"string"==typeof n?n.trim().toLowerCase():n};t.clause={WHERE:"where",GROUP_BY:"groupBy",AGGREGATE:"aggregate",HAVING:"having",ORDER_BY:"orderBy",SELECT:"select",OFFSET:"offset",LIMIT:"limit",FROM:"from"},t.DEFAULT_FIELD=["*"],t.booleanOperators={eq:function(n){var t=i.map(n,l);return t[0]==t[1]},is:function(n){return n[0]===n[1]},gt:function(n){return n[0]>n[1]},lt:function(n){return n[0]=n[1]},lte:function(n){return n[0]<=n[1]},"in":function(n){var t=i.map(n[1]||[],l);return i.includes(t,l(n[0]))},between:function(n){return n[1][0]<=n[0]&&n[0]<=n[1][1]},contains:function(n){var t=i.map(n,(function(n){return"string"==typeof n?n.toLowerCase():n}));return-1!==(t[0]||"").indexOf(t[1])},regex:function(n){try{var t,e;return i.isString(n[1])?(t=n[1],e="i"):(t=n[1][0]||"",e=n[1][1]||""),new RegExp(t,e).test(n[0])}catch(r){return o.error("Rules",'In operator "regex", error: '+(r.message||"invalid RegExp /"+[t,e].join("/"))),!1}},exists:function(n){return void 0!==n[0]},and:function(n){return i.every(n,(function(n){return n}))},or:function(n){return i.some(n,(function(n){return n}))},not:function(n){return!n[0]}},t.arithmeticOperators={"+":function(n){return(n[0]||0)+(n[1]||0)},"-":function(n){return(n[0]||0)-(n[1]||0)},"/":function(n){return(n[0]||0)/(n[1]||1)},"%":function(n){return(n[0]||0)%(n[1]||1)}},t.aggregateOperators={sum:function(n,e){for(var i=n[0]||t.DEFAULT_FIELD,r=0,o=0;o0)&&(u[t.clause.AGGREGATE]=(n[t.clause.AGGREGATE]||[]).concat(e));for(var c=[t.clause.GROUP_BY,t.clause.ORDER_BY,t.clause.SELECT,t.clause.OFFSET,t.clause.LIMIT],s=0;s0&&(r=i.map(r,(function(n){return"Sub-rule "+e+": "+n}))),n.hasOwnProperty(t.clause.FROM)&&(r=r.concat(h(n[t.clause.FROM],e+1))),r},p=function(n,e){var r,u,c,l=e;if(n.hasOwnProperty(t.clause.FROM)&&(o.debug("Evaluating FROM clause:",n[t.clause.FROM]),l=p(n[t.clause.FROM],l),o.debug("Results after FROM:",l)),o.debug("Evaluating WHERE clause:",n[t.clause.WHERE]),l=i.filter(l,(function(e){return v(e,n[t.clause.WHERE])})),o.debug("Results after WHERE:",l),n.hasOwnProperty(t.clause.AGGREGATE)){o.debug("Evaluating AGGREGATE clause:",n[t.clause.AGGREGATE]);var d=function(n,t){var e={};if(void 0===n||!i.isArray(n)||0===n.length)return e["*"]={fieldValues:{},events:t},e;for(var r=i.map(n,(function(n){return n.field})),o=0;oc)return o}return 0})):(a("Rules","groupBy rule must be an array"),t)}(n[t.clause.ORDER_BY],l),o.debug("Results after ORDER_BY:",l));var h,g=0;return n.hasOwnProperty(t.clause.OFFSET)&&(o.debug("Evaluating OFFSET clause:",n[t.clause.OFFSET]),g=Number(n[t.clause.OFFSET])),n.hasOwnProperty(t.clause.LIMIT)&&(o.debug("Evaluating LIMIT clause:",n[t.clause.LIMIT]),h=g+Number(n[t.clause.LIMIT])),(g>0||!i.isUndefined(h))&&(l=l.slice(g,h),o.debug("Results after OFFSET/LIMIT:",l)),n.hasOwnProperty(t.clause.SELECT)&&(o.debug("Evaluating SELECT clause:",n[t.clause.SELECT]),l=function(n,t){return i.map(t,(function(t){return i.map(n,(function(n){return v(t,n)}))}))}(n[t.clause.SELECT],l),o.debug("Results after SELECT:",l)),l};t.execute=function(n,e){n=t.rewrite(n),o.shouldLog(r.LogLevel.DEBUG)&&o.groupCollapsed("Evaluating Behavioral Rule"),o.debug("Rule:",n,s.stringify(n)),o.debug("Events:",e);var i=h(n);if(i.length>0)throw new Error("Rule "+s.stringify(n)+" has violations: "+i.join("\n"));var a=p(n,e);return o.debug("Rule result:",a),o.shouldLog(r.LogLevel.DEBUG)&&o.groupEnd(),a},t.isSatisfied=function(n,e){try{return t.execute(n,e).length>0}catch(i){return o.error("Rules","Error "+i.toString()+" while evaluating rule "+s.stringify(n)),!1}}},5002:function(n,t,e){n.exports=function(n){n.registerDependency("sources/browser_id",e(8207)),n.registerVisitorProfileProvider(e(6803)),n.registerVisitorProfileProvider(e(4160)),n.registerAudienceMatcher("browser_version",e(4592))}},4592:function(n,t,e){var i=e(9478).G;n.exports={fieldsNeeded:["browserVersion","browserId"],match:function(n,t){var e=t.value,r=n.browserId,o=n.browserVersion;if(0===e.indexOf(r)){var a=e.substr(r.length);return 0===i(o,a)}return!1}}},6803:function(n){n.exports={provides:"browserId",shouldTrack:!0,isSticky:!0,getter:["sources/browser_id",function(n){return n.getId()}]}},4160:function(n){n.exports={provides:"browserVersion",getter:["sources/browser_id",function(n){return n.getVersion()}]}},8207:function(n,t,e){var i=e(8036);t.getId=function(){return i.get().browser.id},t.getVersion=function(){return i.get().browser.version}},1733:function(n,t,e){n.exports=function(n){n.registerVisitorProfileProvider(e(32)),n.registerAudienceMatcher("campaign",e(3727))}},3727:function(n,t,e){var i=e(9539);n.exports={fieldsNeeded:["campaign"],match:function(n,t){return i.hasMatch(t.value,t.match,n.campaign)}}},32:function(n,t,e){var i=e(3080);n.exports={provides:"campaign",shouldTrack:!0,isSticky:!0,getter:[function(){return i.getQueryParamValue("utm_campaign")}]}},249:function(n,t,e){var i=e(558),r=e(1494),o=e(2170),a=e(9402),u=e(9023),c=e(9362);t.getCmabPredictionUrl=function(){return"https://prediction.cmab.optimizely.com/predict"},t.getCmabPredictionUrlForExperiment=function(n){return n?t.getCmabPredictionUrl()+"/"+n:""},t.createPayload=function(n,t){var e=i.map(n.variations,"id"),r=c.getVisitorCmabAttributesForExperiment(n),o=c.getDcpCustomerIds(),a=c.getDcpServiceId();return{instances:[{visitorId:u.getCurrentId(),experimentId:n.id,cmabUUID:t,variationIds:e,attributes:r,dcpCustomerIds:o,dcpServiceId:a}]}},t.parseApiResponse=function(n){var t=null;try{t=r.parse(n)}catch(e){return a.error("CMAB API / Error parsing response:",e),null}return t&&t.predictions&&0!==t.predictions.length?t.predictions[0].variation_id.toString():(a.debug("CMAB API / No predictions found in API response",t),null)},t.validateVariationId=function(n,t){return n&&i.find(t.variations,{id:n})?(a.debug("CMAB API / Variation ID:",n,"from API response found in experiment:",t.id),n):(a.debug("CMAB API / Variation ID:",n,"from API response not found in experiment:",t.id),null)},t.handleCmabApiResponse=function(n,e){if(200!==n.status)return a.error("CMAB API / API call failed with status:",n.status,n.statusText),null;a.debug("CMAB API / API call successful:",n.responseText);var i=t.parseApiResponse(n.responseText);return t.validateVariationId(i,e)},t.makeSyncApiCallWithXHR=function(n,e){a.debug("CMAB API / SYNC / Making a synchronous API call to get variation.");try{var i=t.createPayload(n,e),o=t.getCmabPredictionUrlForExperiment(n.id),u=new XMLHttpRequest;return u.open("POST",o,!1),u.send(r.stringify(i)),t.handleCmabApiResponse(u,n)}catch(c){return a.error("CMAB API / SYNC / API call encountered an error:",c),null}},t.makeAsyncApiCall=function(n,e){a.debug("CMAB API / ASYNC / Making an asynchronous API call to get variation.");var i=t.createPayload(n,e),r=t.getCmabPredictionUrlForExperiment(n.id);return o.request({url:r,contentType:"application/json",method:"POST",data:i})}},2697:function(n,t,e){var i=e(9402),r=e(9362),o=e(249),a=e(7077);t.isCmabEnabled=function(){return!1},t.isExperimentSyncApiEnabled=function(n){return!0},t.defaultToSnippetBucketing=function(n,t,e){i.debug("CMAB / Defaulting to snippet bucketing with variation:",t,"for experiment:",n.id),r.setCmabVariationDataInVisitorStore(n,t,e)},t.processCmabExperiment=function(n,e){if(!t.isCmabEnabled())return i.debug("CMAB / Feature flag is disabled. Defaulting to snippet bucketing with variation:",e,"for experiment:",n.id),e;if(i.debug("CMAB / Feature flag is enabled. Processing CMAB for experiment:",n.id),r.activateTimeoutForNonBucketedCmabExperiments(n),!r.isCmabExperiment(n))return e;var u=r.getCmabVariationDataFromVisitorStore(n);if(!r.isCmabTimeout(n,u))return u.variationId;a.startCmabApiCallPerformanceTimer(n.id);var c=null,s=r.generateCmabUUID();if(t.isExperimentSyncApiEnabled(n))try{return(c=o.makeSyncApiCallWithXHR(n,s))?(r.setCmabVariationDataInVisitorStore(n,c,s),a.endCmabApiCallPerformanceTimer(n.id),c):(t.defaultToSnippetBucketing(n,e,s),a.endCmabApiCallPerformanceTimer(n.id),e)}catch(f){return i.error("CMAB API / SYNC / API call failed with error:",f),t.defaultToSnippetBucketing(n,e,s),a.endCmabApiCallPerformanceTimer(n.id),null}return o.makeAsyncApiCall(n,s).then((function(u){return(c=o.handleCmabApiResponse(u,n))?(i.debug("CMAB API / ASYNC / Variation:",c,"for experiment:",n.id),r.setCmabVariationDataInVisitorStore(n,c,s),a.endCmabApiCallPerformanceTimer(n.id),c):(t.defaultToSnippetBucketing(n,e,s),a.endCmabApiCallPerformanceTimer(n.id),e)}),(function(r){return i.error("CMAB API / ASYNC / API call failed with error:",r),t.defaultToSnippetBucketing(n,e,s),a.endCmabApiCallPerformanceTimer(n.id),null})),t.defaultToSnippetBucketing(n,e,s),a.endCmabApiCallPerformanceTimer(n.id),e},t.getCmabUUIDAndUpdate30MinTimeout=function(n,t){var e=r.getCmabUUIDFromVisitorStore(n,t);return r.updateCmabTimeoutInVisitorStore(n,t),e}},7077:function(n,t,e){e(9080),e(9402);t.startCmabApiCallPerformanceTimer=function(n){0},t.endCmabApiCallPerformanceTimer=function(n){0}},9362:function(n,t,e){var i=e(558),r=e(400),o=e(1494),a=e(3295),u=e(8047),c=e(9023),s=e(9402),f=e(2502),l=e(9636),d=a.get("stores/visitor"),v=a.get("stores/plugins"),h=a.get("stores/global");t.generateCmabUUID=function(){return u.generate()},t.getCmabLayerIdFromExperiment=function(n){return n.experimentMetadata&&n.experimentMetadata.layerId||n.id},t.isCmabExperiment=function(n){var t=n.experimentMetadata&&n.experimentMetadata.allocationPolicy;return t?t===f.AllocationPolicyEnum.CMAB:(s.debug("No allocation policy found in metadata for experiment:",n.id),!1)},t.isCmabTimeout=function(n,e){if(!t.isCmabVariationStorageDataValid(e))return s.debug("CMAB / Timeout CMAB Storage Variation Data is invalid"),!0;var r=e.variationId;return i.find(n.variations,{id:r})?e.isTimeout?(s.debug("CMAB / Timeout flag is set:",e.cmabUUID),!0):t.hasAttributesChanged(n,e)?(s.debug("CMAB / Timeout User attributes have changed"),!0):t.has30MinOr24HrTimeoutOccurred(e)?(s.debug("CMAB / Timeout for 30 minutes or 24 hours:",e.cmabUUID),!0):(s.debug("CMAB / No timeout happened for:",e.cmabUUID),!1):(s.debug("CMAB / Timeout Variation ID:",r,"not found in experiment:",n.id),!0)},t.has30MinOr24HrTimeoutOccurred=function(n){if(!t.isCmabVariationStorageDataValid(n))return s.debug("CMAB / Timeout CMAB Storage Variation Data is invalid"),!0;var e=(new Date).getTime(),i=new Date(n.st30MinTimeout).getTime(),r=new Date(n.st24HrTimeout).getTime();return e-i>18e5||e-r>864e5},t.isCmabVariationStorageDataValid=function(n){if(!n)return!1;for(var t=["variationId","visitorId","cmabUUID","st30MinTimeout","st24HrTimeout","userAttributeHash"],e=0;e=o&&u<=a&&i.includes(e.days,c)}},3513:function(n,t,e){n.exports=function(n){n.registerVisitorProfileProvider(e(2944))}},2944:function(n){n.exports={provides:"visitorId",getter:["stores/visitor_id",function(n){return n.getRandomId()}]}},6298:function(n,t,e){var i=e(1494),r=e(9402),o=e(9080),a=e(6867),u=e(1900),c=e(8928),s=e(3295).get("stores/rum"),f="google_analytics_4",l="gtag",d="dataLayer",v="optimizely_decision",h="experience_impression",p=function(n,t){return a.pollFor((function(){return function(n){var t=n.getGlobal(l);return t||null}(c)}),200,50).then((function(e){r.log("GA4 Integration: gtag finally exists, sending now."),s.getSampleRum()&&o.timeEnd("gtagReady"),r.debug("GA4 Integration: calling ga4 with data: "+i.stringify(n)),e("event",h,n),r.debug("GA4 Integration: calling ga4 with custom event data: "+i.stringify(t)),e("event",v,t)}))};var g=function(n,t){var e=c.getGlobal(d);r.debug("GA4 Integration: found dataLayer object "+e),e||(r.debug("GA4 Integration: dataLayer object "+d+" is empty, initializing it"),c.setGlobal(d,[]),e=c.getGlobal(d)),r.log("GA4 Integration: attempting push to "+d);try{var o=Object.assign({event:h},n);r.debug("GA4 Integration: pushing data to GTM: "+i.stringify(o)),e.push(o);var a=Object.assign({event:v},t);r.debug("GA4 Integration: pushing custom data to GTM: "+i.stringify(a)),e.push(a)}catch(u){r.warn("GA4 Integration: Push to "+d+" failed: "+u)}return Promise.resolve()},m={preRedirectPolicy:u.PreRedirectPolicies.PERSIST_BEFORE_REDIRECT,postRedirectPolicy:u.PostRedirectPolicies.TRACK_IMMEDIATELY,nonRedirectPolicy:u.NonRedirectPolicies.TRACK_IMMEDIATELY,trackLayerDecision:function(n){var t=n.integrationSettings;if(t&&t[f]){if(n.experimentId&&n.variationId){var e="on"===t[f].is_using_gtm;r.debug("GA4 Integration: is using GTM: "+e);var i,o,a="equal_priority"===n.layerPolicy;r.debug("GA4 Integration: is personalization campaign: "+a),a?(i="OPT-"+n.layerId+"("+n.layerName+")-"+n.experimentId+"("+n.experimentName+")-"+n.variationId+"("+n.variationName+")",o={Campaign:n.layerName+" ("+n.layerId+")",Variation:n.variationName+" ("+n.variationId+")",Holdback:n.isLayerHoldback}):(i="OPT-"+n.experimentId+"("+n.experimentName+")-"+n.variationId+"("+n.variationName+")",o={Experiment:n.experimentName+" ("+n.experimentId+")",Variation:n.variationName+" ("+n.variationId+")",Holdback:n.isLayerHoldback});var u={exp_variant_string:i,Holdback:n.isLayerHoldback};return e?g(u,o)["catch"]((function(n){r.warn("Tracker for GTM ",f,"failed:",n)})):p(u,o)["catch"]((function(n){r.warn("Tracker for ",f,"failed:",n)}))}r.debug("GA4 Integration: empty experiment or variation ID, exiting")}else r.debug("GA4 Integration: did not find vendor "+f+" in integration settings, exiting")},serializeSettings:i.stringify,deserializeSettings:i.parse};n.exports=function(n){n.registerAnalyticsTracker("google_analytics_4",m)}},9189:function(n,t,e){var i=e(558),r=e(5095),o=e(8047),a=e(6654),u=e(1416).v,c=e(1494),s=e(9402),f=e(1900),l=e(9023),d=e(8928),v=e(2170),h=e(3295),p=(e(2065),e(9896)),g=e(1125),m=e(6691),_=h.get("stores/global"),y=h.get("stores/tracker_optimizely"),w=e(2697),b=t.Error=u("OptimizelyTrackerError"),E="client_activation",I="campaign_activated",A="view_activated",S={revenue:{validate:M,sanitize:Math.floor,excludeFeature:!0},quantity:{validate:M,sanitize:Math.floor,excludeFeature:!0},value:{validate:M,sanitize:i.identity}},T="AUTO",k=[function(){return function(n){L(function(n){var t=i.extend({entity_id:n.pageId,key:n.pageApiName,timestamp:n.timestamp,uuid:n.eventId,type:A},D(n.eventTags));return t}(n),n.userFeatures,W(n.layerStates))}}],R=[function(){return function(n){!function(n){var t=i.isNull(_.getAnonymizeIP())?void 0:_.getAnonymizeIP(),e={account_id:n.accountId,anonymize_ip:t,client_name:n.clientName,client_version:n.clientVersion,project_id:n.projectId,visitors:[]};e.revision=n.revision,e.enrich_decisions=!0;var r={session_id:U(n.sessionId),visitor_id:n.visitorId,attributes:[],snapshots:[]},o=W(n.layerStates);m.dispatch(a.REGISTER_TRACKER_VISITOR,{data:e,visitor:r,decisions:o}),K()}(n),L(function(n){return{entity_id:null,type:E,uuid:n.eventId,timestamp:n.timestamp}}(n),n.userFeatures,W(n.layerStates))}}],C=[function(){return function(n){var t;L((t=n,i.extend({entity_id:t.eventEntityId,key:t.eventApiName,timestamp:t.timestamp,uuid:t.eventId,type:t.eventCategory,properties:O(t.eventProperties)},D(t.eventTags))),n.userFeatures,W(n.layerStates))}}],N=[function(){return function(n){var t;L((t=n,i.extend({entity_id:t.eventEntityId,key:t.eventApiName,timestamp:t.timestamp,uuid:t.eventId,type:t.eventCategory},D(t.eventTags))),n.userFeatures,W(n.layerStates))}}];function D(n){var t=function(n,t,e){try{x(t),n[e]=t}catch(i){r.emitError(new b("Bad value for eventTags["+e+"]: "+i.message))}return n},e=i.keys(S),o=i.omit(n,e),a=i.pick(n,e),u=i.reduce(o,t,{}),c=i.reduce(a,(function(n,e,i){var o=S[i];o.excludeFeature||t(u,e,i);try{o.validate(e),n[i]=o.sanitize(e),u[i]=n[i]}catch(a){r.emitError(new b("Bad value for eventMetrics["+i+"]: "+a.message))}return n}),{});return c.tags=u,c}function O(n){if(i.keys(n).length<=15)return n;var t={},e={},r=0;for(var o in n)r<15?t[o]=n[o]:e[o]=n[o],r++;return s.log("Custom event has more than 15 properties. The following properties were not pushed",e),t}function x(n){if(null==n)throw new Error("Feature value is null");if("object"==typeof n){var t;try{t=c.stringify(n)}catch(e){}throw new Error('Feature value is complex: "'+t)}}function M(n){if(null==n)throw new Error("Metric value is null");if(!i.isNumber(n))throw new Error("Metric value is not numeric")}function P(n){return i.reduce(n,(function(n,t){try{x(t.value),n.push({entity_id:t.id||null,key:t.name,type:t.type,value:t.value})}catch(e){s.warn("Error evaluating user feature",t,e)}return n}),[])}function L(n,t,e){m.dispatch(a.REGISTER_TRACKER_EVENT,{event:n,decisions:e}),V(t),K()}function V(n){var t=P(n);m.dispatch(a.UPDATE_TRACKER_VISITOR_ATTRIBUTES,{attributes:t})}function U(n){return T}function F(){if(y.canSend()){var n=y.hasEventsToSend(),t=y.hasPreviousBatchesToSend();n||t?(t&&(i.each(y.getPreviousBatches(),B),m.dispatch(a.RESET_TRACKER_PREVIOUS_BATCHES)),n&&(m.dispatch(a.FINALIZE_BATCH_SNAPSHOT),B(y.getEventBatch()),m.dispatch(a.RESET_TRACKER_EVENTS))):s.debug("Not sending events because there are no events to send")}else s.debug("Not sending events (holding)")}function B(n){s.debug("Sending ticket:",n);var t=o.generate();v.retryableRequest({url:"https://logx.optimizely.com/v1/events",method:"POST",data:z(n)},t)}function z(n){return i.extend({},i.pick(n,["account_id","anonymize_ip","client_name","client_version","enrich_decisions","project_id","revision"]),{visitors:i.map(n.visitors,G)})}function G(n){return{visitor_id:n.visitor_id,session_id:T,attributes:i.map(n.attributes,j),snapshots:i.map(n.snapshots,q)}}function j(n){return $(n,{entity_id:"e",key:"k",type:"t",value:"v"})}function q(n){var t=n.events;return t=function(n){var t=i.reduce(n,(function(n,t){var e;if(n[e=t.type===A&&i.isEmpty(t.tags)&&i.isEmpty(i.pick(t,i.keys(S)))?t.type:t.uuid]){var r=n[e].timestamp;t.timestamp>r&&(r=t.timestamp),n[e]=i.extend({},n[e],{key:n[e].key+"-"+(t.key||""),entity_id:n[e].entity_id+"-"+t.entity_id,timestamp:r})}else n[e]=t;return n}),{});return i.values(t)}(t),{activationTimestamp:_.getActivationTimestamp(),decisions:i.map(n.decisions,H),events:i.map(t,Y)}}function H(n){var t=$(n,{campaign_id:"c",experiment_id:"x",is_campaign_holdback:"h",variation_id:"v"});return t.m=n.metadata?$(n.metadata,{cmab_uuid:"cmab_uuid"}):{},t}function Y(n){return n.key===I&&(n.type=I,delete n.key),$(n,{entity_id:"e",key:"k",quantity:"q",revenue:"$",tags:"a",properties:"p",timestamp:"t",uuid:"u",value:"v",type:"y"})}function $(n,t){return i.reduce(n,(function(n,e,i){return i in t&&(n[t[i]||i]=e),n}),{})}function K(){if(y.shouldBatch()){if(!y.isPolling()){d.setTimeout((function n(){F(),y.isPolling()&&d.setTimeout(n,1e3)}),1e3),m.dispatch(a.SET_TRACKER_POLLING,!0),d.setTimeout((function(){m.dispatch(a.SET_TRACKER_BATCHING,!1),m.dispatch(a.SET_TRACKER_POLLING,!1)}),1e4)}}else F()}function W(n){return i.map(n,(function(n){var t=w.getCmabUUIDAndUpdate30MinTimeout(n.layerId,n.decision.experimentId),e=t?{cmab_uuid:t}:{};return{campaign_id:n.layerId,experiment_id:n.decision.experimentId,variation_id:n.decision.variationId,is_campaign_holdback:n.decision.isLayerHoldback,metadata:e}}))}function X(){var n=y.getPersistableState();if(n)try{s.debug("Persisting pending batch:",n),l.persistTrackerOptimizelyData(n),m.dispatch(a.SET_TRACKER_DIRTY,!1)}catch(t){s.debug("Failed to persist pending batch:",t)}}var J={trackLayerDecision:function(n){n.timing===f.TrackLayerDecisionTimingFlags.postRedirectPolicy?function(n){var t=P(n.userFeatures),e={account_id:n.accountId,anonymize_ip:n.anonymizeIP,client_name:n.clientName,client_version:n.clientVersion,project_id:n.projectId,visitors:[{session_id:U(n.sessionId),visitor_id:n.visitorId,attributes:t,snapshots:[{decisions:[{campaign_id:n.layerId,experiment_id:n.experimentId,variation_id:n.variationId,is_campaign_holdback:n.isLayerHoldback}],events:[{uuid:n.decisionId,entity_id:n.layerId,timestamp:n.timestamp,type:I}]}]}]};m.dispatch(a.REGISTER_PREVIOUS_BATCH,e),K()}(n):function(n){var t={entity_id:n.layerId,type:I,uuid:n.decisionId,timestamp:n.timestamp};m.dispatch(a.REGISTER_TRACKER_DECISION,{decisionEvent:t,decisions:W(n.layerStates)}),V(n.userFeatures),K()}(n)},postRedirectPolicy:f.PostRedirectPolicies.TRACK_AFTER_SYNC,nonRedirectPolicy:f.NonRedirectPolicies.TRACK_IMMEDIATELY,onPageActivated:k,onClientActivation:R,onClickEvent:N,onCustomEvent:C};n.exports=function(n){n.registerAnalyticsTracker("optimizely",J),p.on({filter:{type:g.TYPES.ANALYTICS,name:"sendEvents"},handler:function(){m.dispatch(a.SET_TRACKER_SEND_EVENTS,!0),y.isPolling()||F()}}),p.on({filter:{type:g.TYPES.ANALYTICS,name:"holdEvents"},handler:function(){m.dispatch(a.SET_TRACKER_SEND_EVENTS,!1)}}),m.dispatch(a.SET_TRACKER_SEND_EVENTS,!0);var t=p.on({filter:{type:"lifecycle",name:"activated"},handler:function(){y.observe(X),p.off(t)}})}},6482:function(n,t,e){n.exports=function(n){n.registerViewProvider(e(8478)),n.registerViewMatcher("url",e(605))}},605:function(n,t,e){var i=e(8648);n.exports={fieldsNeeded:["url"],match:function(n,t){return i(n.url,t)}}},8478:function(n,t,e){var i=e(3080);n.exports={provides:"url",getter:[function(){return i.getUrl()}]}},1812:function(n,t,e){var i=e(558),r=e(6654),o=e(3295),a=e(2502),u=e(9896),c=e(6691),s=o.get("stores/history"),f=e(9402),l=e(3399).Promise,d=e(4106),v=e(8928);function h(n){u.emit({type:"viewTrigger",name:"URLChanged",data:{source:n,newURL:v.getHref()}},!0)}n.exports=function(n){var t;t=function(){var n=s.getOriginalPushState().apply(this,arguments);return l.resolve().then((function(){h("pushState")}))["catch"]((function(n){f.error("Error while wrapPushState: ",n)})),n},c.dispatch(r.ENSURE_ORIGINAL_PUSHSTATE),v.getGlobal("history").pushState=t,function(){var n=function(){var n=s.getOriginalReplaceState().apply(this,arguments);return l.resolve().then((function(){h("replaceState")}))["catch"]((function(n){f.error("Error while wrapReplaceState: ",n)})),n};c.dispatch(r.ENSURE_ORIGINAL_REPLACESTATE),v.getGlobal("history").replaceState=n}(),v.addEventListener("popstate",p,!1),v.addEventListener("hashchange",g,!1),u.on({filter:{type:"viewTrigger",name:"URLChanged"},handler:function(){d.getViewsAndActivate(a.ViewActivationTypes.URLChanged)}}),n.registerViewTrigger("URLChanged")};var p=i.partial(h,"popstate"),g=i.partial(h,"hashchange")},33:function(n,t,e){var i=e(558),r=e(3295),o=e(9896),a=e(1125),u=e(8928),c=r.get("stores/directive"),s="optimizelyPreview",f=function(n){u.getGlobal(s).push(n)};t.initialize=function(n){c.isSlave()&&function(n){var t=!1;if(i.isArray(window.optimizely)&&i.each(window.optimizely,(function(e){i.isArray(e)&&"verifyPreviewProject"===e[0]&&String(e[1])===n&&(t=!0)})),!t)throw new Error("Preview projectId: "+n+" does not match expected")}(n),o.on({filter:{type:a.TYPES.ANALYTICS,name:"trackEvent"},handler:f}),o.on({filter:{type:a.TYPES.LIFECYCLE,name:"viewActivated"},handler:f}),o.on({filter:{type:a.TYPES.LIFECYCLE,name:"layerDecided"},handler:f}),o.on({filter:{type:"error"},publicOnly:!0,handler:f})},t.setupPreviewGlobal=function(){u.getGlobal(s)||u.setGlobal(s,[])},t.pushToPreviewGlobal=function(n){f(n)}},844:function(n,t,e){var i=e(558),r=e(8047),o=e(5250),a=e(8765),u=e(1964),c=e(2065),s=e(6691),f=e(6283).DT,l=e(9402),d=e(6779),v=e(3399).Promise,h=e(9023),p=e(8928),g=e(2170),m=e(6654),_=e(2502),y=e(3295),w=y.get("stores/async_request"),b=y.get("stores/client_metadata"),E=y.get("stores/global"),I=y.get("stores/rum"),A=y.get("stores/performance"),S=y.get("stores/xdomain"),T=y.get("stores/view_data"),k=e(1967),R="https://rum.optimizely.com/rum",C="1.0";function N(n){return i.isEmpty(n)?v.resolve():(t=function(){return g.request({url:R,method:"POST",data:n,withCredentials:!0}).then((function(n){return o.resolveRequest("RUM_FIRST_BEACON",n),n}))["catch"]((function(n){throw l.error("POST to client-rum failed:",n),o.rejectRequest("RUM_FIRST_BEACON",n),n}))},(e=w.getPromise("RUM_FIRST_BEACON"))?e.then(t):o.makeAsyncRequest("RUM_FIRST_BEACON",t));var t,e}function D(){try{return!c.querySelector("body")}catch(n){return null}}function O(){var n=p.getGlobal("performance"),t=n?n.timing:{},e=A.getMarks()||{},r=I.getApiData(),o=I.getDOMObservationData(),a=k.get("state").getActiveExperimentIds(),u=I.getFeaturesNeededData(),s=c.parseUri(I.getScriptSrc()),l=I.getRumData()||{},v=l.extras||{};i.assign(v,{apiCalls:r,DOMObservationData:o,paintTimings:M(),activeExperimentIds:a,numPages:T.getNumberOfPages(),snippet:{scheme:s.protocol.slice(0,-1),host:s.host,path:s.pathname},networkInfo:x(),experimental:E.getExperimental(),featuresNeeded:u,beacon:{cjsOnload:!0}});var g=p.getGlobal("Prototype");g&&!i.isUndefined(g.Version)&&(v.prototypeJS=g.Version);var m=!1;m=!0;var _=S.getFrames();_.length&&(v.xdFramesLoaded=_.length);var y={id:I.getRumId(),v:C,project:E.getSnippetId()||E.getProjectId(),navigationTimings:t,userTimings:e,xd:m,apis:i.keys(r),extras:v,sampleRate:l.sampleRate};(function(){var n=f.keys(),t=i.filter(i.map(n,(function(n){var t=h.getStorageKeyFromKey(n);return t?{key:n,isForeign:h.isForeignKey(n),category:t,size:n.length+f.getItem(n).length}:null}))),e=i.reduce(t,(function(n,t){var e=t.key,i=h.getIdFromKey(e);return i?((t.isForeign?n.foreign:n.local)[i]=!0,n):n}),{local:{},foreign:{}}),r=i.chain(t).filter({isForeign:!0}).reduce((function(n,t){return n[t.key.split("_")[0]]=!0,n}),{}).value(),o={local:0,foreign:0},a={local:{},foreign:{}};i.forEach(t,(function(n){var t=n.isForeign?"foreign":"local";o[t]+=n.size,a[t][n.category]||(a[t][n.category]=0),a[t][n.category]+=n.size}));var u={numKeys:f.allKeys().length,sizeKeys:f.allKeys().toString().length,sizeValues:f.allValues().toString().length,idCounts:{local:i.keys(e.local).length,foreign:i.keys(e.foreign).length},foreignOriginCount:i.keys(r).length,byteTotals:o,byteTotalsByCategory:a};return d.estimateStorage().then((function(n){return i.assign(u,{storageEstimate:n})}))})().then((function(n){N(i.assign(y,{lsMetrics:n}))}))}function x(){var n=p.getGlobal("navigator");if(n&&n.connection)return i.pick(n.connection,["downlink","rtt","effectiveType"])}function M(){var n=p.getGlobal("performance");if(n)try{var t=n.getEntriesByType("paint");if(i.isEmpty(t))return;return i.reduce(t,(function(n,t){return n[t.name]=Math.round(t.startTime),n}),{})}catch(e){return}}t.initialize=function(){var n,t=r.generate().replace(/-/g,"");n=Math.random()<.01;var e=function(){var n=c.getCurrentScript();if(n)return n.src}();s.dispatch(m.SET_RUM_DATA,{id:t,RumHost:R,inRumSample:n,src:e,data:{id:t,sync:D(),timebase:u.now(),sampleRate:.01,url:e,extras:{initialDOMState:c.getReadyState()}}})},t.queueBeacons=function(){return I.getSampleRum()?(function(){try{p.getGlobal("requestAnimationFrame")((function(){var n=I.getRumData().timebase;s.dispatch(m.SET_RUM_DATA,{data:{render:u.now()-(n||0)}})}))}catch(n){return}}(),c.isLoaded()?p.setTimeout(O,3e3):p.addEventListener("load",O),new v((function(n,t){p.setTimeout((function(){(function(){!function(){var n={id:I.getRumId(),v:C,account:E.getAccountId(),project:E.getSnippetId()||E.getProjectId(),snippet:E.getSnippetId(),revision:E.getRevision(),clientVersion:b.getClientVersion(),hasSlave:!1,wxhr:!0,extras:{}},t=h.getPersistedBehaviorEventCount(),e=a.getEventCount();n.numBehaviorEvents=e;var r=e-t;i.extend(n.extras,{behaviorEventCountDiff:r,behaviorEventCountDecreased:r<0}),i.assign(n,function(){var n=p.getGlobal("performance");if(!n)return;var t,e=I.getScriptSrc();try{if(e){l.debug("Using derived script src: ",e);var r=n.getEntriesByName(e);r.length>0&&(t=r[0])}if(!t){var o=/\/\/[^.]+\.optimizely\.(com|test)\/(js|api\/client)\/[\d]+\.js/gi;l.debug("Scanning resource timing entries with regex");var a=n.getEntriesByType("resource");t=i.find(a,(function(n){return o.test(n.name)}))}if(t)return i.mapValues(_.ResourceTimingAttributes,(function(n,e){var i=t[e];return"number"==typeof i?Math.round(1e3*(i||0))/1e3:"serverTiming"===e?i||[]:void 0}))}catch(u){return}}(),A.getDurationsFor(i.values(_.RUMPerformanceTimingAttributes))),s.dispatch(m.SET_RUM_DATA,{data:n})}();var n=I.getRumData(),t=A.getMarks()||{};return n.extras=n.extras||{},n.extras.beacon={cjsTimeout:!0},n.userTimings=t,N(n=i.pickBy(n,(function(n){return!i.isUndefined(n)})))})().then(n,t)}),3e3)}))["catch"]((function(n){l.warn("RUM / Error sending data:",n)}))):v.resolve()}},9817:function(n,t,e){function i(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,i=new Array(t);e