@adv-re/segment-wrapper 4.36.2-beta.2 → 4.36.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -7
- package/dist/index.mjs +1 -7
- package/package.json +1 -1
- package/umd/index.js +1 -1
package/dist/index.js
CHANGED
|
@@ -1617,18 +1617,13 @@ var getAdobeVisitorData = () => {
|
|
|
1617
1617
|
return Promise.resolve({ trackingServer, version });
|
|
1618
1618
|
};
|
|
1619
1619
|
var getAdobeMarketingCloudVisitorIdFromWindow = () => {
|
|
1620
|
-
debugger;
|
|
1621
1620
|
if (mcvid) return Promise.resolve(mcvid);
|
|
1622
|
-
debugger;
|
|
1623
1621
|
const config = getGlobalConfig();
|
|
1624
|
-
debugger;
|
|
1625
1622
|
return new Promise((resolve) => {
|
|
1626
1623
|
function retry(retries) {
|
|
1627
1624
|
if (retries === 0) return resolve("");
|
|
1628
|
-
debugger;
|
|
1629
1625
|
const demdex = getDemdex();
|
|
1630
1626
|
mcvid = getMarketingCloudVisitorID(demdex);
|
|
1631
|
-
debugger;
|
|
1632
1627
|
if (mcvid) {
|
|
1633
1628
|
resolve(mcvid);
|
|
1634
1629
|
} else {
|
|
@@ -1640,7 +1635,6 @@ var getAdobeMarketingCloudVisitorIdFromWindow = () => {
|
|
|
1640
1635
|
};
|
|
1641
1636
|
var importVisitorApiAndGetAdobeMCVisitorID = async () => {
|
|
1642
1637
|
await Promise.resolve().then(() => __toESM(require_adobeVisitorApi()));
|
|
1643
|
-
debugger;
|
|
1644
1638
|
return getAdobeMarketingCloudVisitorIdFromWindow();
|
|
1645
1639
|
};
|
|
1646
1640
|
var getAdobeMCVisitorID = async () => {
|
|
@@ -2221,7 +2215,7 @@ var decorateContextWithNeededData = async ({
|
|
|
2221
2215
|
...!isGdprAccepted && { ip: "0.0.0.0" },
|
|
2222
2216
|
...getExternalIds({ context, xandrId }),
|
|
2223
2217
|
analytics_storage: getConsentState(),
|
|
2224
|
-
clientVersion: `segment-wrapper@${"4.36.2
|
|
2218
|
+
clientVersion: `segment-wrapper@${"4.36.2"}`,
|
|
2225
2219
|
gdpr_privacy: gdprPrivacyValueAnalytics,
|
|
2226
2220
|
gdpr_privacy_advertising: gdprPrivacyValueAdvertising,
|
|
2227
2221
|
google_consents,
|
package/dist/index.mjs
CHANGED
|
@@ -70,18 +70,13 @@ var getAdobeVisitorData = () => {
|
|
|
70
70
|
return Promise.resolve({ trackingServer, version });
|
|
71
71
|
};
|
|
72
72
|
var getAdobeMarketingCloudVisitorIdFromWindow = () => {
|
|
73
|
-
debugger;
|
|
74
73
|
if (mcvid) return Promise.resolve(mcvid);
|
|
75
|
-
debugger;
|
|
76
74
|
const config = getGlobalConfig();
|
|
77
|
-
debugger;
|
|
78
75
|
return new Promise((resolve) => {
|
|
79
76
|
function retry(retries) {
|
|
80
77
|
if (retries === 0) return resolve("");
|
|
81
|
-
debugger;
|
|
82
78
|
const demdex = getDemdex();
|
|
83
79
|
mcvid = getMarketingCloudVisitorID(demdex);
|
|
84
|
-
debugger;
|
|
85
80
|
if (mcvid) {
|
|
86
81
|
resolve(mcvid);
|
|
87
82
|
} else {
|
|
@@ -93,7 +88,6 @@ var getAdobeMarketingCloudVisitorIdFromWindow = () => {
|
|
|
93
88
|
};
|
|
94
89
|
var importVisitorApiAndGetAdobeMCVisitorID = async () => {
|
|
95
90
|
await import("./adobeVisitorApi-QX2QF3PH.mjs");
|
|
96
|
-
debugger;
|
|
97
91
|
return getAdobeMarketingCloudVisitorIdFromWindow();
|
|
98
92
|
};
|
|
99
93
|
var getAdobeMCVisitorID = async () => {
|
|
@@ -674,7 +668,7 @@ var decorateContextWithNeededData = async ({
|
|
|
674
668
|
...!isGdprAccepted && { ip: "0.0.0.0" },
|
|
675
669
|
...getExternalIds({ context, xandrId }),
|
|
676
670
|
analytics_storage: getConsentState(),
|
|
677
|
-
clientVersion: `segment-wrapper@${"4.36.2
|
|
671
|
+
clientVersion: `segment-wrapper@${"4.36.2"}`,
|
|
678
672
|
gdpr_privacy: gdprPrivacyValueAnalytics,
|
|
679
673
|
gdpr_privacy_advertising: gdprPrivacyValueAdvertising,
|
|
680
674
|
google_consents,
|
package/package.json
CHANGED
package/umd/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var _i=Object.create;var xt=Object.defineProperty;var Ci=Object.getOwnPropertyDescriptor;var hi=Object.getOwnPropertyNames;var Ii=Object.getPrototypeOf,yi=Object.prototype.hasOwnProperty;var Si=(o,l)=>()=>(l||o((l={exports:{}}).exports,l),l.exports);var Ai=(o,l,p,m)=>{if(l&&typeof l=="object"||typeof l=="function")for(let y of hi(l))!yi.call(o,y)&&y!==p&&xt(o,y,{get:()=>l[y],enumerable:!(m=Ci(l,y))||m.enumerable});return o};var vi=(o,l,p)=>(p=o!=null?_i(Ii(o)):{},Ai(l||!o||!o.__esModule?xt(p,"default",{value:o,enumerable:!0}):p,o));var Ft=Si(()=>{"use strict";var Er=(function(){"use strict";function o(t){"@babel/helpers - typeof";return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function l(t,r,a){return r in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a,t}function p(){return{callbacks:{},add:function(t,r){this.callbacks[t]=this.callbacks[t]||[];var a=this.callbacks[t].push(r)-1,i=this;return function(){i.callbacks[t].splice(a,1)}},execute:function(t,r){if(this.callbacks[t]){r=r===void 0?[]:r,r=r instanceof Array?r:[r];try{for(;this.callbacks[t].length;){var a=this.callbacks[t].shift();typeof a=="function"?a.apply(null,r):a instanceof Array&&a[1].apply(a[0],r)}delete this.callbacks[t]}catch{}}},executeAll:function(t,r){(r||t&&!x.isObjectEmpty(t))&&Object.keys(this.callbacks).forEach(function(a){var i=t[a]!==void 0?t[a]:"";this.execute(a,i)},this)},hasCallbacks:function(){return!!Object.keys(this.callbacks).length}}}function m(t,r,a){var i=t?.[r];return i===void 0?a:i}function y(t){for(var r=/^\d+$/,a=0,i=t.length;a<i;a++)if(!r.test(t[a]))return!1;return!0}function P(t,r){for(;t.length<r.length;)t.push("0");for(;r.length<t.length;)r.push("0")}function F(t,r){for(var a=0;a<t.length;a++){var i=parseInt(t[a],10),c=parseInt(r[a],10);if(i>c)return 1;if(c>i)return-1}return 0}function L(t,r){if(t===r)return 0;var a=t.toString().split("."),i=r.toString().split(".");return y(a.concat(i))?(P(a,i),F(a,i)):NaN}function te(t){return t===Object(t)&&Object.keys(t).length===0}function Ce(t){return typeof t=="function"||t instanceof Array&&t.length}function he(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0};this.log=$e("log",t,r),this.warn=$e("warn",t,r),this.error=$e("error",t,r)}function Ie(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.isEnabled,a=t.cookieName,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=i.cookies;return r&&a&&c?{remove:function(){c.remove(a)},get:function(){var u=c.get(a),f={};try{f=JSON.parse(u)}catch{f={}}return f},set:function(u,f){f=f||{},c.set(a,JSON.stringify(u),{domain:f.optInCookieDomain||"",cookieLifetime:f.optInStorageExpiry||3419e4,expires:!0})}}:{get:Me,set:Me,remove:Me}}function fe(t){this.name=this.constructor.name,this.message=t,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}function be(){function t(O,V){var J=qe(O);return J.length?J.every(function(pe){return!!V[pe]}):Zn(V)}function r(){ie(z),B(ge.COMPLETE),j(v.status,v.permissions),e.set(v.permissions,{optInCookieDomain:I,optInStorageExpiry:C}),R.execute(kt)}function a(O){return function(V,J){if(!ze(V))throw new Error("[OptIn] Invalid category(-ies). Please use the `OptIn.Categories` enum.");return B(ge.CHANGED),Object.assign(z,bt(qe(V),O)),J||r(),v}}var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=i.doesOptInApply,u=i.previousPermissions,f=i.preOptInApprovals,h=i.isOptInStorageEnabled,I=i.optInCookieDomain,C=i.optInStorageExpiry,_=i.isIabContext,T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=T.cookies,A=ii(u);wt(A,"Invalid `previousPermissions`!"),wt(f,"Invalid `preOptInApprovals`!");var e=Ie({isEnabled:!!h,cookieName:"adobeujs-optin"},{cookies:M}),v=this,j=$n(v),R=Tt(),H=Mt(A),Y=Mt(f),X=e.get(),q={},G=(function(O,V){return Je(O)||V&&Je(V)?ge.COMPLETE:ge.PENDING})(H,X),ne=(function(O,V,J){var pe=bt(Ne,!c);return c?Object.assign({},pe,O,V,J):pe})(Y,H,X),z=ei(ne),B=function(O){return G=O},ie=function(O){return ne=O};v.deny=a(!1),v.approve=a(!0),v.denyAll=v.deny.bind(v,Ne),v.approveAll=v.approve.bind(v,Ne),v.isApproved=function(O){return t(O,v.permissions)},v.isPreApproved=function(O){return t(O,Y)},v.fetchPermissions=function(O){var V=arguments.length>1&&arguments[1]!==void 0&&arguments[1],J=V?v.on(ge.COMPLETE,O):Me;return!c||c&&v.isComplete||f?O(v.permissions):V||R.add(kt,function(){return O(v.permissions)}),J},v.complete=function(){v.status===ge.CHANGED&&r()},v.registerPlugin=function(O){if(!O||!O.name||typeof O.onRegister!="function")throw new Error(si);q[O.name]||(q[O.name]=O,O.onRegister.call(O,v))},v.execute=ai(q),Object.defineProperties(v,{permissions:{get:function(){return ne}},status:{get:function(){return G}},Categories:{get:function(){return ye}},doesOptInApply:{get:function(){return!!c}},isPending:{get:function(){return v.status===ge.PENDING}},isComplete:{get:function(){return v.status===ge.COMPLETE}},__plugins:{get:function(){return Object.keys(q)}},isIabContext:{get:function(){return _}}})}function ft(t,r){function a(){c=null,t.call(t,new fe("The call took longer than you wanted!"))}function i(){c&&(clearTimeout(c),t.apply(t,arguments))}if(r===void 0)return t;var c=setTimeout(a,r);return i}function gt(){if(window.__cmp)return window.__cmp;var t=window;if(t===window.top)return void xe.error("__cmp not found");for(var r;!r;){t=t.parent;try{t.frames.__cmpLocator&&(r=t)}catch{}if(t===window.top)break}if(!r)return void xe.error("__cmp not found");var a={};return window.__cmp=function(i,c,u){var f=Math.random()+"",h={__cmpCall:{command:i,parameter:c,callId:f}};a[f]=u,r.postMessage(h,"*")},window.addEventListener("message",function(i){var c=i.data;if(typeof c=="string")try{c=JSON.parse(i.data)}catch{}if(c.__cmpReturn){var u=c.__cmpReturn;a[u.callId]&&(a[u.callId](u.returnValue,u.success),delete a[u.callId])}},!1),window.__cmp}function vn(){var t=this;t.name="iabPlugin",t.version="0.0.1";var r=Tt(),a={allConsentData:null},i=function(I){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return a[I]=C};t.fetchConsentData=function(I){var C=I.callback,_=I.timeout,T=ft(C,_);c({callback:T})},t.isApproved=function(I){var C=I.callback,_=I.category,T=I.timeout;if(a.allConsentData)return C(null,h(_,a.allConsentData.vendorConsents,a.allConsentData.purposeConsents));var M=ft(function(A){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=e.vendorConsents,j=e.purposeConsents;C(A,h(_,v,j))},T);c({category:_,callback:M})},t.onRegister=function(I){var C=Object.keys(Xe),_=function(T){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=M.purposeConsents,e=M.gdprApplies,v=M.vendorConsents;!T&&e&&v&&A&&(C.forEach(function(j){var R=h(j,v,A);I[R?"approve":"deny"](j,!0)}),I.complete())};t.fetchConsentData({callback:_})};var c=function(I){var C=I.callback;if(a.allConsentData)return C(null,a.allConsentData);r.add("FETCH_CONSENT_DATA",C);var _={};f(function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=T.purposeConsents,A=T.gdprApplies,e=T.vendorConsents;arguments.length>1&&arguments[1]&&(_={purposeConsents:M,gdprApplies:A,vendorConsents:e},i("allConsentData",_)),u(function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};arguments.length>1&&arguments[1]&&(_.consentString=v.consentData,i("allConsentData",_)),r.execute("FETCH_CONSENT_DATA",[null,a.allConsentData])})})},u=function(I){var C=gt();C&&C("getConsentData",null,I)},f=function(I){var C=oi(Xe),_=gt();_&&_("getVendorConsents",C,I)},h=function(I){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},T=!!C[Xe[I]];return T&&(function(){return qn[I].every(function(M){return _[M]})})()}}var w=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};Object.assign=Object.assign||function(t){for(var r,a,i=1;i<arguments.length;++i){a=arguments[i];for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t};var Pe,Re,En={HANDSHAKE:"HANDSHAKE",GETSTATE:"GETSTATE",PARENTSTATE:"PARENTSTATE"},Dn={MCMID:"MCMID",MCAID:"MCAID",MCAAMB:"MCAAMB",MCAAMLH:"MCAAMLH",MCOPTOUT:"MCOPTOUT",CUSTOMERIDS:"CUSTOMERIDS"},Tn={MCMID:"getMarketingCloudVisitorID",MCAID:"getAnalyticsVisitorID",MCAAMB:"getAudienceManagerBlob",MCAAMLH:"getAudienceManagerLocationHint",MCOPTOUT:"isOptedOut",ALLFIELDS:"getVisitorValues"},bn={CUSTOMERIDS:"getCustomerIDs"},Mn={MCMID:"getMarketingCloudVisitorID",MCAAMB:"getAudienceManagerBlob",MCAAMLH:"getAudienceManagerLocationHint",MCOPTOUT:"isOptedOut",MCAID:"getAnalyticsVisitorID",CUSTOMERIDS:"getCustomerIDs",ALLFIELDS:"getVisitorValues"},On={MC:"MCMID",A:"MCAID",AAM:"MCAAMB"},wn={MCMID:"MCMID",MCOPTOUT:"MCOPTOUT",MCAID:"MCAID",MCAAMLH:"MCAAMLH",MCAAMB:"MCAAMB"},kn={UNKNOWN:0,AUTHENTICATED:1,LOGGED_OUT:2},Pn={GLOBAL:"global"},Z={MESSAGES:En,STATE_KEYS_MAP:Dn,ASYNC_API_MAP:Tn,SYNC_API_MAP:bn,ALL_APIS:Mn,FIELDGROUP_TO_FIELD:On,FIELDS:wn,AUTH_STATE:kn,OPT_OUT:Pn},pt=Z.STATE_KEYS_MAP,Rn=function(t){function r(){}function a(i,c){var u=this;return function(){var f=t(0,i),h={};return h[i]=f,u.setStateAndPublish(h),c(f),f}}this.getMarketingCloudVisitorID=function(i){i=i||r;var c=this.findField(pt.MCMID,i),u=a.call(this,pt.MCMID,i);return c!==void 0?c:u()},this.getVisitorValues=function(i){this.getMarketingCloudVisitorID(function(c){i({MCMID:c})})}},Ln=Z.MESSAGES,mt=Z.ASYNC_API_MAP,_t=Z.SYNC_API_MAP,Nn=function(){function t(){}function r(c,u){var f=this;return function(){return f.callbackRegistry.add(c,u),f.messageParent(Ln.GETSTATE),""}}function a(c){this[mt[c]]=function(u){u=u||t;var f=this.findField(c,u),h=r.call(this,c,u);return f!==void 0?f:h()}}function i(c){this[_t[c]]=function(){return this.findField(c,t)||{}}}Object.keys(mt).forEach(a,this),Object.keys(_t).forEach(i,this)},Ct=Z.ASYNC_API_MAP,xn=function(){Object.keys(Ct).forEach(function(t){this[Ct[t]]=function(r){this.callbackRegistry.add(t,r)}},this)},x=(function(t,r){return r={exports:{}},t(r,r.exports),r.exports})(function(t,r){r.isObjectEmpty=function(i){return i===Object(i)&&Object.keys(i).length===0},r.isValueEmpty=function(i){return i===""||r.isObjectEmpty(i)};var a=function(){var i=navigator.appName,c=navigator.userAgent;return i==="Microsoft Internet Explorer"||c.indexOf("MSIE ")>=0||c.indexOf("Trident/")>=0&&c.indexOf("Windows NT 6")>=0};r.getIeVersion=function(){return document.documentMode?document.documentMode:a()?7:null},r.encodeAndBuildRequest=function(i,c){return i.map(encodeURIComponent).join(c)},r.isObject=function(i){return i!==null&&o(i)==="object"&&Array.isArray(i)===!1},r.defineGlobalNamespace=function(){return window.adobe=r.isObject(window.adobe)?window.adobe:{},window.adobe},r.pluck=function(i,c){return c.reduce(function(u,f){return i[f]&&(u[f]=i[f]),u},Object.create(null))},r.parseOptOut=function(i,c,u){c||(c=u,i.d_optout&&i.d_optout instanceof Array&&(c=i.d_optout.join(",")));var f=parseInt(i.d_ottl,10);return isNaN(f)&&(f=7200),{optOut:c,d_ottl:f}},r.normalizeBoolean=function(i){var c=i;return i==="true"?c=!0:i==="false"&&(c=!1),c}}),Vn=(x.isObjectEmpty,x.isValueEmpty,x.getIeVersion,x.encodeAndBuildRequest,x.isObject,x.defineGlobalNamespace,x.pluck,x.parseOptOut,x.normalizeBoolean,p),Fn=Z.MESSAGES,Un={0:"prefix",1:"orgID",2:"state"},ht=function(t,r){this.parse=function(a){try{var i={};return a.data.split("|").forEach(function(c,u){c!==void 0&&(i[Un[u]]=u!==2?c:JSON.parse(c))}),i}catch{}},this.isInvalid=function(a){var i=this.parse(a);if(!i||Object.keys(i).length<2)return!0;var c=t!==i.orgID,u=!r||a.origin!==r,f=Object.keys(Fn).indexOf(i.prefix)===-1;return c||u||f},this.send=function(a,i,c){var u=i+"|"+t;c&&c===Object(c)&&(u+="|"+JSON.stringify(c));try{a.postMessage(u,r)}catch{}}},It=Z.MESSAGES,Gn=function(t,r,a,i){function c(R){Object.assign(A,R)}function u(R){Object.assign(A.state,R),Object.assign(A.state.ALLFIELDS,R),A.callbackRegistry.executeAll(A.state)}function f(R){if(!j.isInvalid(R)){v=!1;var H=j.parse(R);A.setStateAndPublish(H.state)}}function h(R){!v&&e&&(v=!0,j.send(i,R))}function I(){c(new Rn(a._generateID)),A.getMarketingCloudVisitorID(),A.callbackRegistry.executeAll(A.state,!0),w.removeEventListener("message",C)}function C(R){if(!j.isInvalid(R)){var H=j.parse(R);v=!1,w.clearTimeout(A._handshakeTimeout),w.removeEventListener("message",C),c(new Nn(A)),w.addEventListener("message",f),A.setStateAndPublish(H.state),A.callbackRegistry.hasCallbacks()&&h(It.GETSTATE)}}function _(){e&&postMessage?(w.addEventListener("message",C),h(It.HANDSHAKE),A._handshakeTimeout=setTimeout(I,250)):I()}function T(){w.s_c_in||(w.s_c_il=[],w.s_c_in=0),A._c="Visitor",A._il=w.s_c_il,A._in=w.s_c_in,A._il[A._in]=A,w.s_c_in++}function M(){function R(H){H.indexOf("_")!==0&&typeof a[H]=="function"&&(A[H]=function(){})}Object.keys(a).forEach(R),A.getSupplementalDataID=a.getSupplementalDataID,A.isAllowed=function(){return!0}}var A=this,e=r.whitelistParentDomain;A.state={ALLFIELDS:{}},A.version=a.version,A.marketingCloudOrgID=t,A.cookieDomain=a.cookieDomain||"",A._instanceType="child";var v=!1,j=new ht(t,e);A.callbackRegistry=Vn(),A.init=function(){T(),M(),c(new xn(A)),_()},A.findField=function(R,H){if(A.state[R]!==void 0)return H(A.state[R]),A.state[R]},A.messageParent=h,A.setStateAndPublish=u},Le=Z.MESSAGES,yt=Z.ALL_APIS,jn=Z.ASYNC_API_MAP,Hn=Z.FIELDGROUP_TO_FIELD,Bn=function(t,r){function a(){var C={};return Object.keys(yt).forEach(function(_){var T=yt[_],M=t[T]();x.isValueEmpty(M)||(C[_]=M)}),C}function i(){var C=[];return t._loading&&Object.keys(t._loading).forEach(function(_){if(t._loading[_]){var T=Hn[_];C.push(T)}}),C.length?C:null}function c(C){return function _(T){var M=i();if(M){var A=jn[M[0]];t[A](_,!0)}else C()}}function u(C,_){var T=a();r.send(C,_,T)}function f(C){I(C),u(C,Le.HANDSHAKE)}function h(C){c(function(){u(C,Le.PARENTSTATE)})()}function I(C){function _(M){T.call(t,M),r.send(C,Le.PARENTSTATE,{CUSTOMERIDS:t.getCustomerIDs()})}var T=t.setCustomerIDs;t.setCustomerIDs=_}return function(C){r.isInvalid(C)||(r.parse(C).prefix===Le.HANDSHAKE?f:h)(C.source)}},Wn=function(t,r){function a(f){return function(h){i[f]=h,c++,c===u&&r(i)}}var i={},c=0,u=Object.keys(t).length;Object.keys(t).forEach(function(f){var h=t[f];if(h.fn){var I=h.args||[];I.unshift(a(f)),h.fn.apply(h.context||null,I)}})},Ae={get:function(t){t=encodeURIComponent(t);var r=(";"+document.cookie).split(" ").join(";"),a=r.indexOf(";"+t+"="),i=a<0?a:r.indexOf(";",a+1);return a<0?"":decodeURIComponent(r.substring(a+2+t.length,i<0?r.length:i))},set:function(t,r,a){var i=m(a,"cookieLifetime"),c=m(a,"expires"),u=m(a,"domain"),f=m(a,"secure"),h=f?"Secure":"";if(c&&i!=="SESSION"&&i!=="NONE"){var I=r!==""?parseInt(i||0,10):-60;if(I)c=new Date,c.setTime(c.getTime()+1e3*I);else if(c===1){c=new Date;var C=c.getYear();c.setYear(C+2+(C<1900?1900:0))}}else c=0;return t&&i!=="NONE"?(document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(r)+"; path=/;"+(c?" expires="+c.toGMTString()+";":"")+(u?" domain="+u+";":"")+h,this.get(t)===r):0},remove:function(t,r){var a=m(r,"domain");a=a?" domain="+a+";":"",document.cookie=encodeURIComponent(t)+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"+a}},St=function(t){var r;!t&&w.location&&(t=w.location.hostname),r=t;var a,i=r.split(".");for(a=i.length-2;a>=0;a--)if(r=i.slice(a).join("."),Ae.set("test","cookie",{domain:r}))return Ae.remove("test",{domain:r}),r;return""},At={compare:L,isLessThan:function(t,r){return L(t,r)<0},areVersionsDifferent:function(t,r){return L(t,r)!==0},isGreaterThan:function(t,r){return L(t,r)>0},isEqual:function(t,r){return L(t,r)===0}},vt=!!w.postMessage,Ke={postMessage:function(t,r,a){var i=1;r&&(vt?a.postMessage(t,r.replace(/([^:]+:\/\/[^\/]+).*/,"$1")):r&&(a.location=r.replace(/#.*$/,"")+"#"+ +new Date+i+++"&"+t))},receiveMessage:function(t,r){var a;try{vt&&(t&&(a=function(i){if(typeof r=="string"&&i.origin!==r||Object.prototype.toString.call(r)==="[object Function]"&&r(i.origin)===!1)return!1;t(i)}),w.addEventListener?w[t?"addEventListener":"removeEventListener"]("message",a):w[t?"attachEvent":"detachEvent"]("onmessage",a))}catch{}}},Yn=function(t){var r,a,i="0123456789",c="",u="",f=8,h=10,I=10;if(t==1){for(i+="ABCDEF",r=0;16>r;r++)a=Math.floor(Math.random()*f),c+=i.substring(a,a+1),a=Math.floor(Math.random()*f),u+=i.substring(a,a+1),f=16;return c+"-"+u}for(r=0;19>r;r++)a=Math.floor(Math.random()*h),c+=i.substring(a,a+1),r===0&&a==9?h=3:((r==1||r==2)&&h!=10&&2>a||2<r)&&(h=10),a=Math.floor(Math.random()*I),u+=i.substring(a,a+1),r===0&&a==9?I=3:((r==1||r==2)&&I!=10&&2>a||2<r)&&(I=10);return c+u},Kn=function(t,r){return{corsMetadata:(function(){var a="none",i=!0;return typeof XMLHttpRequest<"u"&&XMLHttpRequest===Object(XMLHttpRequest)&&("withCredentials"in new XMLHttpRequest?a="XMLHttpRequest":typeof XDomainRequest<"u"&&XDomainRequest===Object(XDomainRequest)&&(i=!1),Object.prototype.toString.call(w.HTMLElement).indexOf("Constructor")>0&&(i=!1)),{corsType:a,corsCookiesEnabled:i}})(),getCORSInstance:function(){return this.corsMetadata.corsType==="none"?null:new w[this.corsMetadata.corsType]},fireCORS:function(a,i,c){function u(I){var C;try{if((C=JSON.parse(I))!==Object(C))return void f.handleCORSError(a,null,"Response is not JSON")}catch(A){return void f.handleCORSError(a,A,"Error parsing response as JSON")}try{for(var _=a.callback,T=w,M=0;M<_.length;M++)T=T[_[M]];T(C)}catch(A){f.handleCORSError(a,A,"Error forming callback function")}}var f=this;i&&(a.loadErrorHandler=i);try{var h=this.getCORSInstance();h.open("get",a.corsUrl+"&ts="+new Date().getTime(),!0),this.corsMetadata.corsType==="XMLHttpRequest"&&(h.withCredentials=!0,h.timeout=t.loadTimeout,h.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),h.onreadystatechange=function(){this.readyState===4&&this.status===200&&u(this.responseText)}),h.onerror=function(I){f.handleCORSError(a,I,"onerror")},h.ontimeout=function(I){f.handleCORSError(a,I,"ontimeout")},h.send(),t._log.requests.push(a.corsUrl)}catch(I){this.handleCORSError(a,I,"try-catch")}},handleCORSError:function(a,i,c){t.CORSErrors.push({corsData:a,error:i,description:c}),a.loadErrorHandler&&(c==="ontimeout"?a.loadErrorHandler(!0):a.loadErrorHandler(!1))}}},K={POST_MESSAGE_ENABLED:!!w.postMessage,DAYS_BETWEEN_SYNC_ID_CALLS:1,MILLIS_PER_DAY:864e5,ADOBE_MC:"adobe_mc",ADOBE_MC_SDID:"adobe_mc_sdid",VALID_VISITOR_ID_REGEX:/^[0-9a-fA-F\-]+$/,ADOBE_MC_TTL_IN_MIN:5,VERSION_REGEX:/vVersion\|((\d+\.)?(\d+\.)?(\*|\d+))(?=$|\|)/,FIRST_PARTY_SERVER_COOKIE:"s_ecid"},Xn=function(t,r){var a=w.document;return{THROTTLE_START:3e4,MAX_SYNCS_LENGTH:649,throttleTimerSet:!1,id:null,onPagePixels:[],iframeHost:null,getIframeHost:function(i){if(typeof i=="string"){var c=i.split("/");return c[0]+"//"+c[2]}},subdomain:null,url:null,getUrl:function(){var i,c="http://fast.",u="?d_nsid="+t.idSyncContainerID+"#"+encodeURIComponent(a.location.origin);return this.subdomain||(this.subdomain="nosubdomainreturned"),t.loadSSL&&(c=t.idSyncSSLUseAkamai?"https://fast.":"https://"),i=c+this.subdomain+".demdex.net/dest5.html"+u,this.iframeHost=this.getIframeHost(i),this.id="destination_publishing_iframe_"+this.subdomain+"_"+t.idSyncContainerID,i},checkDPIframeSrc:function(){var i="?d_nsid="+t.idSyncContainerID+"#"+encodeURIComponent(a.location.href);typeof t.dpIframeSrc=="string"&&t.dpIframeSrc.length&&(this.id="destination_publishing_iframe_"+(t._subdomain||this.subdomain||new Date().getTime())+"_"+t.idSyncContainerID,this.iframeHost=this.getIframeHost(t.dpIframeSrc),this.url=t.dpIframeSrc+i)},idCallNotProcesssed:null,doAttachIframe:!1,startedAttachingIframe:!1,iframeHasLoaded:null,iframeIdChanged:null,newIframeCreated:null,originalIframeHasLoadedAlready:null,iframeLoadedCallbacks:[],regionChanged:!1,timesRegionChanged:0,sendingMessages:!1,messages:[],messagesPosted:[],messagesReceived:[],messageSendingInterval:K.POST_MESSAGE_ENABLED?null:100,onPageDestinationsFired:[],jsonForComparison:[],jsonDuplicates:[],jsonWaiting:[],jsonProcessed:[],canSetThirdPartyCookies:!0,receivedThirdPartyCookiesNotification:!1,readyToAttachIframePreliminary:function(){return!(t.idSyncDisableSyncs||t.disableIdSyncs||t.idSyncDisable3rdPartySyncing||t.disableThirdPartyCookies||t.disableThirdPartyCalls)},readyToAttachIframe:function(){return this.readyToAttachIframePreliminary()&&(this.doAttachIframe||t._doAttachIframe)&&(this.subdomain&&this.subdomain!=="nosubdomainreturned"||t._subdomain)&&this.url&&!this.startedAttachingIframe},attachIframe:function(){function i(){f=a.createElement("iframe"),f.sandbox="allow-scripts allow-same-origin",f.title="Adobe ID Syncing iFrame",f.id=u.id,f.name=u.id+"_name",f.style.cssText="display: none; width: 0; height: 0;",f.src=u.url,u.newIframeCreated=!0,c(),a.body.appendChild(f)}function c(h){f.addEventListener("load",function(){f.className="aamIframeLoaded",u.iframeHasLoaded=!0,u.fireIframeLoadedCallbacks(h),u.requestToProcess()})}this.startedAttachingIframe=!0;var u=this,f=a.getElementById(this.id);f?f.nodeName!=="IFRAME"?(this.id+="_2",this.iframeIdChanged=!0,i()):(this.newIframeCreated=!1,f.className!=="aamIframeLoaded"?(this.originalIframeHasLoadedAlready=!1,c("The destination publishing iframe already exists from a different library, but hadn't loaded yet.")):(this.originalIframeHasLoadedAlready=!0,this.iframeHasLoaded=!0,this.iframe=f,this.fireIframeLoadedCallbacks("The destination publishing iframe already exists from a different library, and had loaded alresady."),this.requestToProcess())):i(),this.iframe=f},fireIframeLoadedCallbacks:function(i){this.iframeLoadedCallbacks.forEach(function(c){typeof c=="function"&&c({message:i||"The destination publishing iframe was attached and loaded successfully."})}),this.iframeLoadedCallbacks=[]},requestToProcess:function(i){function c(){f.jsonForComparison.push(i),f.jsonWaiting.push(i),f.processSyncOnPage(i)}var u,f=this;if(i===Object(i)&&i.ibs)if(u=JSON.stringify(i.ibs||[]),this.jsonForComparison.length){var h,I,C,_=!1;for(h=0,I=this.jsonForComparison.length;h<I;h++)if(C=this.jsonForComparison[h],u===JSON.stringify(C.ibs||[])){_=!0;break}_?this.jsonDuplicates.push(i):c()}else c();if((this.receivedThirdPartyCookiesNotification||!K.POST_MESSAGE_ENABLED||this.iframeHasLoaded)&&this.jsonWaiting.length){var T=this.jsonWaiting.shift();this.process(T),this.requestToProcess()}t.idSyncDisableSyncs||t.disableIdSyncs||!this.iframeHasLoaded||!this.messages.length||this.sendingMessages||(this.throttleTimerSet||(this.throttleTimerSet=!0,setTimeout(function(){f.messageSendingInterval=K.POST_MESSAGE_ENABLED?null:150},this.THROTTLE_START)),this.sendingMessages=!0,this.sendMessages())},getRegionAndCheckIfChanged:function(i,c){var u=t._getField("MCAAMLH"),f=i.d_region||i.dcs_region;return u?f&&(t._setFieldExpire("MCAAMLH",c),t._setField("MCAAMLH",f),parseInt(u,10)!==f&&(this.regionChanged=!0,this.timesRegionChanged++,t._setField("MCSYNCSOP",""),t._setField("MCSYNCS",""),u=f)):(u=f)&&(t._setFieldExpire("MCAAMLH",c),t._setField("MCAAMLH",u)),u||(u=""),u},processSyncOnPage:function(i){var c,u,f,h;if((c=i.ibs)&&c instanceof Array&&(u=c.length))for(f=0;f<u;f++)h=c[f],h.syncOnPage&&this.checkFirstPartyCookie(h,"","syncOnPage")},process:function(i){var c,u,f,h,I,C=encodeURIComponent,_=!1;if((c=i.ibs)&&c instanceof Array&&(u=c.length))for(_=!0,f=0;f<u;f++)h=c[f],I=[C("ibs"),C(h.id||""),C(h.tag||""),x.encodeAndBuildRequest(h.url||[],","),C(h.ttl||""),"","",h.fireURLSync?"true":"false"],h.syncOnPage||(this.canSetThirdPartyCookies?this.addMessage(I.join("|")):h.fireURLSync&&this.checkFirstPartyCookie(h,I.join("|")));_&&this.jsonProcessed.push(i)},checkFirstPartyCookie:function(i,c,u){var f=u==="syncOnPage",h=f?"MCSYNCSOP":"MCSYNCS";t._readVisitor();var I,C,_=t._getField(h),T=!1,M=!1,A=Math.ceil(new Date().getTime()/K.MILLIS_PER_DAY);_?(I=_.split("*"),C=this.pruneSyncData(I,i.id,A),T=C.dataPresent,M=C.dataValid,T&&M||this.fireSync(f,i,c,I,h,A)):(I=[],this.fireSync(f,i,c,I,h,A))},pruneSyncData:function(i,c,u){var f,h,I,C=!1,_=!1;for(h=0;h<i.length;h++)f=i[h],I=parseInt(f.split("-")[1],10),f.match("^"+c+"-")?(C=!0,u<I?_=!0:(i.splice(h,1),h--)):u>=I&&(i.splice(h,1),h--);return{dataPresent:C,dataValid:_}},manageSyncsSize:function(i){if(i.join("*").length>this.MAX_SYNCS_LENGTH)for(i.sort(function(c,u){return parseInt(c.split("-")[1],10)-parseInt(u.split("-")[1],10)});i.join("*").length>this.MAX_SYNCS_LENGTH;)i.shift()},fireSync:function(i,c,u,f,h,I){var C=this;if(i){if(c.tag==="img"){var _,T,M,A,e=c.url,v=t.loadSSL?"https:":"http:";for(_=0,T=e.length;_<T;_++){M=e[_],A=/^\/\//.test(M);var j=new Image;j.addEventListener("load",(function(R,H,Y,X){return function(){C.onPagePixels[R]=null,t._readVisitor();var q,G=t._getField(h),ne=[];if(G){q=G.split("*");var z,B,ie;for(z=0,B=q.length;z<B;z++)ie=q[z],ie.match("^"+H.id+"-")||ne.push(ie)}C.setSyncTrackingData(ne,H,Y,X)}})(this.onPagePixels.length,c,h,I)),j.src=(A?v:"")+M,this.onPagePixels.push(j)}}}else this.addMessage(u),this.setSyncTrackingData(f,c,h,I)},addMessage:function(i){var c=encodeURIComponent,u=c(t._enableErrorReporting?"---destpub-debug---":"---destpub---");this.messages.push((K.POST_MESSAGE_ENABLED?"":u)+i)},setSyncTrackingData:function(i,c,u,f){i.push(c.id+"-"+(f+Math.ceil(c.ttl/60/24))),this.manageSyncsSize(i),t._setField(u,i.join("*"))},sendMessages:function(){var i,c=this,u="",f=encodeURIComponent;this.regionChanged&&(u=f("---destpub-clear-dextp---"),this.regionChanged=!1),this.messages.length?K.POST_MESSAGE_ENABLED?(i=u+f("---destpub-combined---")+this.messages.join("%01"),this.postMessage(i),this.messages=[],this.sendingMessages=!1):(i=this.messages.shift(),this.postMessage(u+i),setTimeout(function(){c.sendMessages()},this.messageSendingInterval)):this.sendingMessages=!1},postMessage:function(i){Ke.postMessage(i,this.url,this.iframe.contentWindow),this.messagesPosted.push(i)},receiveMessage:function(i){var c,u=/^---destpub-to-parent---/;typeof i=="string"&&u.test(i)&&(c=i.replace(u,"").split("|"),c[0]==="canSetThirdPartyCookies"&&(this.canSetThirdPartyCookies=c[1]==="true",this.receivedThirdPartyCookiesNotification=!0,this.requestToProcess()),this.messagesReceived.push(i))},processIDCallData:function(i){(this.url==null||i.subdomain&&this.subdomain==="nosubdomainreturned")&&(typeof t._subdomain=="string"&&t._subdomain.length?this.subdomain=t._subdomain:this.subdomain=i.subdomain||"",this.url=this.getUrl()),i.ibs instanceof Array&&i.ibs.length&&(this.doAttachIframe=!0),this.readyToAttachIframe()&&(t.idSyncAttachIframeOnWindowLoad?(r.windowLoaded||a.readyState==="complete"||a.readyState==="loaded")&&this.attachIframe():this.attachIframeASAP()),typeof t.idSyncIDCallResult=="function"?t.idSyncIDCallResult(i):this.requestToProcess(i),typeof t.idSyncAfterIDCallResult=="function"&&t.idSyncAfterIDCallResult(i)},canMakeSyncIDCall:function(i,c){return t._forceSyncIDCall||!i||c-i>K.DAYS_BETWEEN_SYNC_ID_CALLS},attachIframeASAP:function(){function i(){c.startedAttachingIframe||(a.body?c.attachIframe():setTimeout(i,30))}var c=this;i()}}},Et={audienceManagerServer:{},audienceManagerServerSecure:{},cookieDomain:{},cookieLifetime:{},cookieName:{},doesOptInApply:{},disableThirdPartyCalls:{},discardTrackingServerECID:{},idSyncAfterIDCallResult:{},idSyncAttachIframeOnWindowLoad:{},idSyncContainerID:{},idSyncDisable3rdPartySyncing:{},disableThirdPartyCookies:{},idSyncDisableSyncs:{},disableIdSyncs:{},idSyncIDCallResult:{},idSyncSSLUseAkamai:{},isCoopSafe:{},isIabContext:{},isOptInStorageEnabled:{},loadSSL:{},loadTimeout:{},marketingCloudServer:{},marketingCloudServerSecure:{},optInCookieDomain:{},optInStorageExpiry:{},overwriteCrossDomainMCIDAndAID:{},preOptInApprovals:{},previousPermissions:{},resetBeforeVersion:{},sdidParamExpiry:{},serverState:{},sessionCookieName:{},secureCookie:{},takeTimeoutMetrics:{},trackingServer:{},trackingServerSecure:{},whitelistIframeDomains:{},whitelistParentDomain:{}},Dt={getConfigNames:function(){return Object.keys(Et)},getConfigs:function(){return Et},normalizeConfig:function(t){return typeof t!="function"?t:t()}},$n=function(t){var r={};return t.on=function(a,i,c){if(!i||typeof i!="function")throw new Error("[ON] Callback should be a function.");r.hasOwnProperty(a)||(r[a]=[]);var u=r[a].push({callback:i,context:c})-1;return function(){r[a].splice(u,1),r[a].length||delete r[a]}},t.off=function(a,i){r.hasOwnProperty(a)&&(r[a]=r[a].filter(function(c){if(c.callback!==i)return c}))},t.publish=function(a){if(r.hasOwnProperty(a)){var i=[].slice.call(arguments,1);r[a].slice(0).forEach(function(c){c.callback.apply(c.context,i)})}},t.publish},ge={PENDING:"pending",CHANGED:"changed",COMPLETE:"complete"},ye={AAM:"aam",ADCLOUD:"adcloud",ANALYTICS:"aa",CAMPAIGN:"campaign",ECID:"ecid",LIVEFYRE:"livefyre",TARGET:"target",MEDIA_ANALYTICS:"mediaaa"},Xe=(Pe={},l(Pe,ye.AAM,565),l(Pe,ye.ECID,565),Pe),qn=(Re={},l(Re,ye.AAM,[1,2,5]),l(Re,ye.ECID,[1,2,5]),Re),Ne=(function(t){return Object.keys(t).map(function(r){return t[r]})})(ye),Tt=function(){var t={};return t.callbacks=Object.create(null),t.add=function(r,a){if(!Ce(a))throw new Error("[callbackRegistryFactory] Make sure callback is a function or an array of functions.");t.callbacks[r]=t.callbacks[r]||[];var i=t.callbacks[r].push(a)-1;return function(){t.callbacks[r].splice(i,1)}},t.execute=function(r,a){if(t.callbacks[r]){a=a===void 0?[]:a,a=a instanceof Array?a:[a];try{for(;t.callbacks[r].length;){var i=t.callbacks[r].shift();typeof i=="function"?i.apply(null,a):i instanceof Array&&i[1].apply(i[0],a)}delete t.callbacks[r]}catch{}}},t.executeAll=function(r,a){(a||r&&!te(r))&&Object.keys(t.callbacks).forEach(function(i){var c=r[i]!==void 0?r[i]:"";t.execute(i,c)},t)},t.hasCallbacks=function(){return!!Object.keys(t.callbacks).length},t},zn=function(){},Jn=function(t){var r=window,a=r.console;return!!a&&typeof a[t]=="function"},$e=function(t,r,a){return a()?function(){if(Jn(t)){for(var i=arguments.length,c=new Array(i),u=0;u<i;u++)c[u]=arguments[u];console[t].apply(console,[r].concat(c))}}:zn},Qn=he,xe=new Qn("[ADOBE OPT-IN]"),Ve=function(t,r){return o(t)===r},qe=function(t,r){return t instanceof Array?t:Ve(t,"string")?[t]:r||[]},Zn=function(t){var r=Object.keys(t);return!!r.length&&r.every(function(a){return t[a]===!0})},ze=function(t){return!(!t||ti(t))&&qe(t).every(function(r){return Ne.indexOf(r)>-1})},bt=function(t,r){return t.reduce(function(a,i){return a[i]=r,a},{})},ei=function(t){return JSON.parse(JSON.stringify(t))},ti=function(t){return Object.prototype.toString.call(t)==="[object Array]"&&!t.length},Mt=function(t){if(Ot(t))return t;try{return JSON.parse(t)}catch{return{}}},Je=function(t){return t===void 0||(Ot(t)?ze(Object.keys(t)):ni(t))},ni=function(t){try{var r=JSON.parse(t);return!!t&&Ve(t,"string")&&ze(Object.keys(r))}catch{return!1}},Ot=function(t){return t!==null&&Ve(t,"object")&&Array.isArray(t)===!1},Me=function(){},ii=function(t){return Ve(t,"function")?t():t},wt=function(t,r){Je(t)||xe.error("".concat(r))},ri=function(t){return Object.keys(t).map(function(r){return t[r]})},oi=function(t){return ri(t).filter(function(r,a,i){return i.indexOf(r)===a})},ai=function(t){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=r.command,i=r.params,c=i===void 0?{}:i,u=r.callback,f=u===void 0?Me:u;if(!a||a.indexOf(".")===-1)throw new Error("[OptIn.execute] Please provide a valid command.");try{var h=a.split("."),I=t[h[0]],C=h[1];if(!I||typeof I[C]!="function")throw new Error("Make sure the plugin and API name exist.");var _=Object.assign(c,{callback:f});I[C].call(I,_)}catch(T){xe.error("[execute] Something went wrong: "+T.message)}}};fe.prototype=Object.create(Error.prototype),fe.prototype.constructor=fe;var kt="fetchPermissions",si="[OptIn#registerPlugin] Plugin is invalid.";be.Categories=ye,be.TimeoutError=fe;var Qe=Object.freeze({OptIn:be,IabPlugin:vn}),ci=function(t,r){t.publishDestinations=function(a){var i=arguments[1],c=arguments[2];try{c=typeof c=="function"?c:a.callback}catch{c=function(){}}var u=r;if(!u.readyToAttachIframePreliminary())return void c({error:"The destination publishing iframe is disabled in the Visitor library."});if(typeof a=="string"){if(!a.length)return void c({error:"subdomain is not a populated string."});if(!(i instanceof Array&&i.length))return void c({error:"messages is not a populated array."});var f=!1;if(i.forEach(function(_){typeof _=="string"&&_.length&&(u.addMessage(_),f=!0)}),!f)return void c({error:"None of the messages are populated strings."})}else{if(!x.isObject(a))return void c({error:"Invalid parameters passed."});var h=a;if(typeof(a=h.subdomain)!="string"||!a.length)return void c({error:"config.subdomain is not a populated string."});var I=h.urlDestinations;if(!(I instanceof Array&&I.length))return void c({error:"config.urlDestinations is not a populated array."});var C=[];I.forEach(function(_){x.isObject(_)&&(_.hideReferrer?_.message&&u.addMessage(_.message):C.push(_))}),(function _(){C.length&&setTimeout(function(){var T=new Image,M=C.shift();T.src=M.url,u.onPageDestinationsFired.push(M),_()},100)})()}u.iframe?(c({message:"The destination publishing iframe is already attached and loaded."}),u.requestToProcess()):!t.subdomain&&t._getField("MCMID")?(u.subdomain=a,u.doAttachIframe=!0,u.url=u.getUrl(),u.readyToAttachIframe()?(u.iframeLoadedCallbacks.push(function(_){c({message:"Attempted to attach and load the destination publishing iframe through this API call. Result: "+(_.message||"no result")})}),u.attachIframe()):c({error:"Encountered a problem in attempting to attach and load the destination publishing iframe through this API call."})):u.iframeLoadedCallbacks.push(function(_){c({message:"Attempted to attach and load the destination publishing iframe through normal Visitor API processing. Result: "+(_.message||"no result")})})}},di=function t(r){function a(ne,z){return ne>>>z|ne<<32-z}for(var i,c,u=Math.pow,f=u(2,32),h="",I=[],C=8*r.length,_=t.h=t.h||[],T=t.k=t.k||[],M=T.length,A={},e=2;M<64;e++)if(!A[e]){for(i=0;i<313;i+=e)A[i]=e;_[M]=u(e,.5)*f|0,T[M++]=u(e,1/3)*f|0}for(r+="\x80";r.length%64-56;)r+="\0";for(i=0;i<r.length;i++){if((c=r.charCodeAt(i))>>8)return;I[i>>2]|=c<<(3-i)%4*8}for(I[I.length]=C/f|0,I[I.length]=C,c=0;c<I.length;){var v=I.slice(c,c+=16),j=_;for(_=_.slice(0,8),i=0;i<64;i++){var R=v[i-15],H=v[i-2],Y=_[0],X=_[4],q=_[7]+(a(X,6)^a(X,11)^a(X,25))+(X&_[5]^~X&_[6])+T[i]+(v[i]=i<16?v[i]:v[i-16]+(a(R,7)^a(R,18)^R>>>3)+v[i-7]+(a(H,17)^a(H,19)^H>>>10)|0);_=[q+((a(Y,2)^a(Y,13)^a(Y,22))+(Y&_[1]^Y&_[2]^_[1]&_[2]))|0].concat(_),_[4]=_[4]+q|0}for(i=0;i<8;i++)_[i]=_[i]+j[i]|0}for(i=0;i<8;i++)for(c=3;c+1;c--){var G=_[i]>>8*c&255;h+=(G<16?0:"")+G.toString(16)}return h},Pt=function(t,r){return r!=="SHA-256"&&r!=="SHA256"&&r!=="sha256"&&r!=="sha-256"||(t=di(t)),t},Rt=function(t){return String(t).trim().toLowerCase()},li=Qe.OptIn;x.defineGlobalNamespace(),window.adobe.OptInCategories=li.Categories;var Ze=function(t,r,a){function i(n){var s=n;return function(d){var g=d||Y.location.href;try{var S=e._extractParamFromUri(g,s);if(S)return W.parsePipeDelimetedKeyValues(S)}catch{}}}function c(n){function s(d,g,S){d&&d.match(K.VALID_VISITOR_ID_REGEX)&&(S===G&&(H=!0),g(d))}s(n[G],e.setMarketingCloudVisitorID,G),e._setFieldExpire(O,-1),s(n[B],e.setAnalyticsVisitorID)}function u(n){n=n||{},e._supplementalDataIDCurrent=n.supplementalDataIDCurrent||"",e._supplementalDataIDCurrentConsumed=n.supplementalDataIDCurrentConsumed||{},e._supplementalDataIDLast=n.supplementalDataIDLast||"",e._supplementalDataIDLastConsumed=n.supplementalDataIDLastConsumed||{}}function f(n){function s(S,E,D){return D=D&&(D+="|"),D+=S+"="+encodeURIComponent(E)}function d(S,E){var D=E[0],N=E[1];return N!=null&&N!==V&&(S=s(D,N,S)),S}var g=n.reduce(d,"");return(function(S){var E=W.getTimestampInSeconds();return S=S&&(S+="|"),S+="TS="+E})(g)}function h(n){var s=n.minutesToLive,d="";return(e.idSyncDisableSyncs||e.disableIdSyncs)&&(d=d||"Error: id syncs have been disabled"),typeof n.dpid=="string"&&n.dpid.length||(d=d||"Error: config.dpid is empty"),typeof n.url=="string"&&n.url.length||(d=d||"Error: config.url is empty"),s===void 0?s=20160:(s=parseInt(s,10),(isNaN(s)||s<=0)&&(d=d||"Error: config.minutesToLive needs to be a positive number")),{error:d,ttl:s}}function I(){return!!e.configs.doesOptInApply&&!(v.optIn.isComplete&&C())}function C(){return e.configs.doesOptInApply&&e.configs.isIabContext?v.optIn.isApproved(v.optIn.Categories.ECID)&&R:v.optIn.isApproved(v.optIn.Categories.ECID)}function _(){[["getMarketingCloudVisitorID"],["setCustomerIDs",void 0],["getAnalyticsVisitorID"],["getAudienceManagerLocationHint"],["getLocationHint"],["getAudienceManagerBlob"]].forEach(function(n){var s=n[0],d=n.length===2?n[1]:"",g=e[s];e[s]=function(S){return C()&&e.isAllowed()?g.apply(e,arguments):(typeof S=="function"&&e._callCallback(S,[d]),d)}})}function T(n,s){if(R=!0,n)throw new Error("[IAB plugin] : "+n);s.gdprApplies&&(j=s.consentString),e.init(),A()}function M(){v.optIn.isComplete&&(v.optIn.isApproved(v.optIn.Categories.ECID)?e.configs.isIabContext?v.optIn.execute({command:"iabPlugin.fetchConsentData",callback:T}):(e.init(),A()):(_(),A()))}function A(){v.optIn.off("complete",M)}if(!a||a.split("").reverse().join("")!==t)throw new Error("Please use `Visitor.getInstance` to instantiate Visitor.");var e=this,v=window.adobe,j="",R=!1,H=!1;e.version="4.6.0";var Y=w,X=Y.Visitor;X.version=e.version,X.AuthState=Z.AUTH_STATE,X.OptOut=Z.OPT_OUT,Y.s_c_in||(Y.s_c_il=[],Y.s_c_in=0),e._c="Visitor",e._il=Y.s_c_il,e._in=Y.s_c_in,e._il[e._in]=e,Y.s_c_in++,e._instanceType="regular",e._log={requests:[]},e.marketingCloudOrgID=t,e.cookieName="AMCV_"+t,e.sessionCookieName="AMCVS_"+t,e.cookieDomain=St(),e.loadSSL=!0,e.loadTimeout=3e4,e.CORSErrors=[],e.marketingCloudServer=e.audienceManagerServer="dpm.demdex.net",e.sdidParamExpiry=30;var q=null,G="MCMID",ne="MCIDTS",z="A",B="MCAID",ie="AAM",O="MCAAMB",V="NONE",J=function(n){return!Object.prototype[n]},pe=Kn(e);e.FIELDS=Z.FIELDS,e.cookieRead=function(n){return Ae.get(n)},e.cookieWrite=function(n,s,d){var g=e.cookieLifetime?(""+e.cookieLifetime).toUpperCase():"",S=!1;return e.configs&&e.configs.secureCookie&&location.protocol==="https:"&&(S=!0),Ae.set(n,""+s,{expires:d,domain:e.cookieDomain,cookieLifetime:g,secure:S})},e.resetState=function(n){n?e._mergeServerState(n):u()},e._isAllowedDone=!1,e._isAllowedFlag=!1,e.isAllowed=function(){return e._isAllowedDone||(e._isAllowedDone=!0,(e.cookieRead(e.cookieName)||e.cookieWrite(e.cookieName,"T",1))&&(e._isAllowedFlag=!0)),e.cookieRead(e.cookieName)==="T"&&e._helpers.removeCookie(e.cookieName),e._isAllowedFlag},e.setMarketingCloudVisitorID=function(n){e._setMarketingCloudFields(n)},e._use1stPartyMarketingCloudServer=!1,e.getMarketingCloudVisitorID=function(n,s){e.marketingCloudServer&&e.marketingCloudServer.indexOf(".demdex.net")<0&&(e._use1stPartyMarketingCloudServer=!0);var d=e._getAudienceManagerURLData("_setMarketingCloudFields"),g=d.url;return e._getRemoteField(G,g,n,s,d)};var pi=function(n,s){var d={};e.getMarketingCloudVisitorID(function(){s.forEach(function(g){d[g]=e._getField(g,!0)}),s.indexOf("MCOPTOUT")!==-1?e.isOptedOut(function(g){d.MCOPTOUT=g,n(d)},null,!0):n(d)},!0)};e.getVisitorValues=function(n,s){var d={MCMID:{fn:e.getMarketingCloudVisitorID,args:[!0],context:e},MCOPTOUT:{fn:e.isOptedOut,args:[void 0,!0],context:e},MCAID:{fn:e.getAnalyticsVisitorID,args:[!0],context:e},MCAAMLH:{fn:e.getAudienceManagerLocationHint,args:[!0],context:e},MCAAMB:{fn:e.getAudienceManagerBlob,args:[!0],context:e}},g=s&&s.length?x.pluck(d,s):d;s&&s.indexOf("MCAID")===-1?pi(n,s):Wn(g,n)},e._currentCustomerIDs={},e._customerIDsHashChanged=!1,e._newCustomerIDsHash="",e.setCustomerIDs=function(n,s){function d(){e._customerIDsHashChanged=!1}if(!e.isOptedOut()&&n){if(!x.isObject(n)||x.isObjectEmpty(n))return!1;e._readVisitor();var g,S,E;for(g in n)if(J(g)&&(S=n[g],s=S.hasOwnProperty("hashType")?S.hashType:s,S))if(o(S)==="object"){var D={};if(S.id){if(s){if(!(E=Pt(Rt(S.id),s)))return;S.id=E,D.hashType=s}D.id=S.id}S.authState!=null&&(D.authState=S.authState),e._currentCustomerIDs[g]=D}else if(s){if(!(E=Pt(Rt(S),s)))return;e._currentCustomerIDs[g]={id:E,hashType:s}}else e._currentCustomerIDs[g]={id:S};var N=e.getCustomerIDs(),b=e._getField("MCCIDH"),$="";b||(b=0);for(g in N)J(g)&&(S=N[g],$+=($?"|":"")+g+"|"+(S.id?S.id:"")+(S.authState?S.authState:""));e._newCustomerIDsHash=String(e._hash($)),e._newCustomerIDsHash!==b&&(e._customerIDsHashChanged=!0,e._mapCustomerIDs(d))}},e.getCustomerIDs=function(){e._readVisitor();var n,s,d={};for(n in e._currentCustomerIDs)J(n)&&(s=e._currentCustomerIDs[n],s.id&&(d[n]||(d[n]={}),d[n].id=s.id,s.authState!=null?d[n].authState=s.authState:d[n].authState=X.AuthState.UNKNOWN,s.hashType&&(d[n].hashType=s.hashType)));return d},e.setAnalyticsVisitorID=function(n){e._setAnalyticsFields(n)},e.getAnalyticsVisitorID=function(n,s,d){if(!W.isTrackingServerPopulated()&&!d)return e._callCallback(n,[""]),"";var g="";if(d||(g=e.getMarketingCloudVisitorID(function(se){e.getAnalyticsVisitorID(n,!0)})),g||d){var S=d?e.marketingCloudServer:e.trackingServer,E="";e.loadSSL&&(d?e.marketingCloudServerSecure&&(S=e.marketingCloudServerSecure):e.trackingServerSecure&&(S=e.trackingServerSecure));var D={};if(S){var N="http"+(e.loadSSL?"s":"")+"://"+S+"/id",b="d_visid_ver="+e.version+"&mcorgid="+encodeURIComponent(e.marketingCloudOrgID)+(g?"&mid="+encodeURIComponent(g):"")+(e.idSyncDisable3rdPartySyncing||e.disableThirdPartyCookies?"&d_coppa=true":""),$=["s_c_il",e._in,"_set"+(d?"MarketingCloud":"Analytics")+"Fields"];E=N+"?"+b+"&callback=s_c_il%5B"+e._in+"%5D._set"+(d?"MarketingCloud":"Analytics")+"Fields",D.corsUrl=N+"?"+b,D.callback=$}return D.url=E,e._getRemoteField(d?G:B,E,n,s,D)}return""},e.getAudienceManagerLocationHint=function(n,s){if(e.getMarketingCloudVisitorID(function(E){e.getAudienceManagerLocationHint(n,!0)})){var d=e._getField(B);if(!d&&W.isTrackingServerPopulated()&&(d=e.getAnalyticsVisitorID(function(E){e.getAudienceManagerLocationHint(n,!0)})),d||!W.isTrackingServerPopulated()){var g=e._getAudienceManagerURLData(),S=g.url;return e._getRemoteField("MCAAMLH",S,n,s,g)}}return""},e.getLocationHint=e.getAudienceManagerLocationHint,e.getAudienceManagerBlob=function(n,s){if(e.getMarketingCloudVisitorID(function(E){e.getAudienceManagerBlob(n,!0)})){var d=e._getField(B);if(!d&&W.isTrackingServerPopulated()&&(d=e.getAnalyticsVisitorID(function(E){e.getAudienceManagerBlob(n,!0)})),d||!W.isTrackingServerPopulated()){var g=e._getAudienceManagerURLData(),S=g.url;return e._customerIDsHashChanged&&e._setFieldExpire(O,-1),e._getRemoteField(O,S,n,s,g)}}return""},e._supplementalDataIDCurrent="",e._supplementalDataIDCurrentConsumed={},e._supplementalDataIDLast="",e._supplementalDataIDLastConsumed={},e.getSupplementalDataID=function(n,s){e._supplementalDataIDCurrent||s||(e._supplementalDataIDCurrent=e._generateID(1));var d=e._supplementalDataIDCurrent;return e._supplementalDataIDLast&&!e._supplementalDataIDLastConsumed[n]?(d=e._supplementalDataIDLast,e._supplementalDataIDLastConsumed[n]=!0):d&&(e._supplementalDataIDCurrentConsumed[n]&&(e._supplementalDataIDLast=e._supplementalDataIDCurrent,e._supplementalDataIDLastConsumed=e._supplementalDataIDCurrentConsumed,e._supplementalDataIDCurrent=d=s?"":e._generateID(1),e._supplementalDataIDCurrentConsumed={}),d&&(e._supplementalDataIDCurrentConsumed[n]=!0)),d};var Fe=!1;e._liberatedOptOut=null,e.getOptOut=function(n,s){var d=e._getAudienceManagerURLData("_setMarketingCloudFields"),g=d.url;if(C())return e._getRemoteField("MCOPTOUT",g,n,s,d);if(e._registerCallback("liberatedOptOut",n),e._liberatedOptOut!==null)return e._callAllCallbacks("liberatedOptOut",[e._liberatedOptOut]),Fe=!1,e._liberatedOptOut;if(Fe)return null;Fe=!0;var S="liberatedGetOptOut";return d.corsUrl=d.corsUrl.replace(/dpm\.demdex\.net\/id\?/,"dpm.demdex.net/optOutStatus?"),d.callback=[S],w[S]=function(E){if(E===Object(E)){var D,N,b=x.parseOptOut(E,D,V);D=b.optOut,N=1e3*b.d_ottl,e._liberatedOptOut=D,setTimeout(function(){e._liberatedOptOut=null},N)}e._callAllCallbacks("liberatedOptOut",[D]),Fe=!1},pe.fireCORS(d),null},e.isOptedOut=function(n,s,d){s||(s=X.OptOut.GLOBAL);var g=e.getOptOut(function(S){var E=S===X.OptOut.GLOBAL||S.indexOf(s)>=0;e._callCallback(n,[E])},d);return g?g===X.OptOut.GLOBAL||g.indexOf(s)>=0:null},e._fields=null,e._fieldsExpired=null,e._hash=function(n){var s,d,g=0;if(n)for(s=0;s<n.length;s++)d=n.charCodeAt(s),g=(g<<5)-g+d,g&=g;return g},e._generateID=Yn,e._generateLocalMID=function(){var n=e._generateID(0);return ae.isClientSideMarketingCloudVisitorID=!0,n},e._callbackList=null,e._callCallback=function(n,s){try{typeof n=="function"?n.apply(Y,s):n[1].apply(n[0],s)}catch{}},e._registerCallback=function(n,s){s&&(e._callbackList==null&&(e._callbackList={}),e._callbackList[n]==null&&(e._callbackList[n]=[]),e._callbackList[n].push(s))},e._callAllCallbacks=function(n,s){if(e._callbackList!=null){var d=e._callbackList[n];if(d)for(;d.length>0;)e._callCallback(d.shift(),s)}},e._addQuerystringParam=function(n,s,d,g){var S=encodeURIComponent(s)+"="+encodeURIComponent(d),E=W.parseHash(n),D=W.hashlessUrl(n);if(D.indexOf("?")===-1)return D+"?"+S+E;var N=D.split("?"),b=N[0]+"?",$=N[1];return b+W.addQueryParamAtLocation($,S,g)+E},e._extractParamFromUri=function(n,s){var d=new RegExp("[\\?&#]"+s+"=([^&#]*)"),g=d.exec(n);if(g&&g.length)return decodeURIComponent(g[1])},e._parseAdobeMcFromUrl=i(K.ADOBE_MC),e._parseAdobeMcSdidFromUrl=i(K.ADOBE_MC_SDID),e._attemptToPopulateSdidFromUrl=function(n){var s=e._parseAdobeMcSdidFromUrl(n),d=1e9;s&&s.TS&&(d=W.getTimestampInSeconds()-s.TS),s&&s.SDID&&s.MCORGID===t&&d<e.sdidParamExpiry&&(e._supplementalDataIDCurrent=s.SDID,e._supplementalDataIDCurrentConsumed.SDID_URL_PARAM=!0)},e._attemptToPopulateIdsFromUrl=function(){var n=e._parseAdobeMcFromUrl();if(n&&n.TS){var s=W.getTimestampInSeconds(),d=s-n.TS;if(Math.floor(d/60)>K.ADOBE_MC_TTL_IN_MIN||n.MCORGID!==t)return;c(n)}},e._mergeServerState=function(n){if(n)try{if(n=(function(d){return W.isObject(d)?d:JSON.parse(d)})(n),n[e.marketingCloudOrgID]){var s=n[e.marketingCloudOrgID];(function(d){W.isObject(d)&&e.setCustomerIDs(d)})(s.customerIDs),u(s.sdid)}}catch{throw new Error("`serverState` has an invalid format.")}},e._timeout=null,e._loadData=function(n,s,d,g){s=e._addQuerystringParam(s,"d_fieldgroup",n,1),g.url=e._addQuerystringParam(g.url,"d_fieldgroup",n,1),g.corsUrl=e._addQuerystringParam(g.corsUrl,"d_fieldgroup",n,1),ae.fieldGroupObj[n]=!0,g===Object(g)&&g.corsUrl&&pe.corsMetadata.corsType==="XMLHttpRequest"&&pe.fireCORS(g,d,n)},e._clearTimeout=function(n){e._timeout!=null&&e._timeout[n]&&(clearTimeout(e._timeout[n]),e._timeout[n]=0)},e._settingsDigest=0,e._getSettingsDigest=function(){if(!e._settingsDigest){var n=e.version;e.audienceManagerServer&&(n+="|"+e.audienceManagerServer),e.audienceManagerServerSecure&&(n+="|"+e.audienceManagerServerSecure),e._settingsDigest=e._hash(n)}return e._settingsDigest},e._readVisitorDone=!1,e._readVisitor=function(){if(!e._readVisitorDone){e._readVisitorDone=!0;var n,s,d,g,S,E,D=e._getSettingsDigest(),N=!1,b=e.cookieRead(e.cookieName),$=new Date;if(b||H||e.discardTrackingServerECID||(b=e.cookieRead(K.FIRST_PARTY_SERVER_COOKIE)),e._fields==null&&(e._fields={}),b&&b!=="T")for(b=b.split("|"),b[0].match(/^[\-0-9]+$/)&&(parseInt(b[0],10)!==D&&(N=!0),b.shift()),b.length%2==1&&b.pop(),n=0;n<b.length;n+=2)s=b[n].split("-"),d=s[0],g=b[n+1],s.length>1?(S=parseInt(s[1],10),E=s[1].indexOf("s")>0):(S=0,E=!1),N&&(d==="MCCIDH"&&(g=""),S>0&&(S=$.getTime()/1e3-60)),d&&g&&(e._setField(d,g,1),S>0&&(e._fields["expire"+d]=S+(E?"s":""),($.getTime()>=1e3*S||E&&!e.cookieRead(e.sessionCookieName))&&(e._fieldsExpired||(e._fieldsExpired={}),e._fieldsExpired[d]=!0)));!e._getField(B)&&W.isTrackingServerPopulated()&&(b=e.cookieRead("s_vi"))&&(b=b.split("|"),b.length>1&&b[0].indexOf("v1")>=0&&(g=b[1],n=g.indexOf("["),n>=0&&(g=g.substring(0,n)),g&&g.match(K.VALID_VISITOR_ID_REGEX)&&e._setField(B,g)))}},e._appendVersionTo=function(n){var s="vVersion|"+e.version,d=n?e._getCookieVersion(n):null;return d?At.areVersionsDifferent(d,e.version)&&(n=n.replace(K.VERSION_REGEX,s)):n+=(n?"|":"")+s,n},e._writeVisitor=function(){var n,s,d=e._getSettingsDigest();for(n in e._fields)J(n)&&e._fields[n]&&n.substring(0,6)!=="expire"&&(s=e._fields[n],d+=(d?"|":"")+n+(e._fields["expire"+n]?"-"+e._fields["expire"+n]:"")+"|"+s);d=e._appendVersionTo(d),e.cookieWrite(e.cookieName,d,1)},e._getField=function(n,s){return e._fields==null||!s&&e._fieldsExpired&&e._fieldsExpired[n]?null:e._fields[n]},e._setField=function(n,s,d){e._fields==null&&(e._fields={}),e._fields[n]=s,d||e._writeVisitor()},e._getFieldList=function(n,s){var d=e._getField(n,s);return d?d.split("*"):null},e._setFieldList=function(n,s,d){e._setField(n,s?s.join("*"):"",d)},e._getFieldMap=function(n,s){var d=e._getFieldList(n,s);if(d){var g,S={};for(g=0;g<d.length;g+=2)S[d[g]]=d[g+1];return S}return null},e._setFieldMap=function(n,s,d){var g,S=null;if(s){S=[];for(g in s)J(g)&&(S.push(g),S.push(s[g]))}e._setFieldList(n,S,d)},e._setFieldExpire=function(n,s,d){var g=new Date;g.setTime(g.getTime()+1e3*s),e._fields==null&&(e._fields={}),e._fields["expire"+n]=Math.floor(g.getTime()/1e3)+(d?"s":""),s<0?(e._fieldsExpired||(e._fieldsExpired={}),e._fieldsExpired[n]=!0):e._fieldsExpired&&(e._fieldsExpired[n]=!1),d&&(e.cookieRead(e.sessionCookieName)||e.cookieWrite(e.sessionCookieName,"1"))},e._findVisitorID=function(n){return n&&(o(n)==="object"&&(n=n.d_mid?n.d_mid:n.visitorID?n.visitorID:n.id?n.id:n.uuid?n.uuid:""+n),n&&(n=n.toUpperCase())==="NOTARGET"&&(n=V),n&&(n===V||n.match(K.VALID_VISITOR_ID_REGEX))||(n="")),n},e._setFields=function(n,s){if(e._clearTimeout(n),e._loading!=null&&(e._loading[n]=!1),ae.fieldGroupObj[n]&&ae.setState(n,!1),n==="MC"){ae.isClientSideMarketingCloudVisitorID!==!0&&(ae.isClientSideMarketingCloudVisitorID=!1);var d=e._getField(G);if(!d||e.overwriteCrossDomainMCIDAndAID){if(!(d=o(s)==="object"&&s.mid?s.mid:e._findVisitorID(s))){if(e._use1stPartyMarketingCloudServer&&!e.tried1stPartyMarketingCloudServer)return e.tried1stPartyMarketingCloudServer=!0,void e.getAnalyticsVisitorID(null,!1,!0);d=e._generateLocalMID()}e._setField(G,d)}d&&d!==V||(d=""),o(s)==="object"&&((s.d_region||s.dcs_region||s.d_blob||s.blob)&&e._setFields(ie,s),e._use1stPartyMarketingCloudServer&&s.mid&&e._setFields(z,{id:s.id})),e._callAllCallbacks(G,[d])}if(n===ie&&o(s)==="object"){var g=604800;s.id_sync_ttl!=null&&s.id_sync_ttl&&(g=parseInt(s.id_sync_ttl,10));var S=re.getRegionAndCheckIfChanged(s,g);e._callAllCallbacks("MCAAMLH",[S]);var E=e._getField(O);(s.d_blob||s.blob)&&(E=s.d_blob,E||(E=s.blob),e._setFieldExpire(O,g),e._setField(O,E)),E||(E=""),e._callAllCallbacks(O,[E]),!s.error_msg&&e._newCustomerIDsHash&&e._setField("MCCIDH",e._newCustomerIDsHash)}if(n===z){var D=e._getField(B);D&&!e.overwriteCrossDomainMCIDAndAID||(D=e._findVisitorID(s),D?D!==V&&e._setFieldExpire(O,-1):D=V,e._setField(B,D)),D&&D!==V||(D=""),e._callAllCallbacks(B,[D])}if(e.idSyncDisableSyncs||e.disableIdSyncs)re.idCallNotProcesssed=!0;else{re.idCallNotProcesssed=!1;var N={};N.ibs=s.ibs,N.subdomain=s.subdomain,re.processIDCallData(N)}if(s===Object(s)){var b,$;C()&&e.isAllowed()&&(b=e._getField("MCOPTOUT"));var se=x.parseOptOut(s,b,V);b=se.optOut,$=se.d_ottl,e._setFieldExpire("MCOPTOUT",$,!0),e._setField("MCOPTOUT",b),e._callAllCallbacks("MCOPTOUT",[b])}},e._loading=null,e._getRemoteField=function(n,s,d,g,S){var E,D="",N=W.isFirstPartyAnalyticsVisitorIDCall(n),b={MCAAMLH:!0,MCAAMB:!0};if(C()&&e.isAllowed())if(e._readVisitor(),D=e._getField(n,b[n]===!0),(function(){return(!D||e._fieldsExpired&&e._fieldsExpired[n])&&(!e.disableThirdPartyCalls||N)})()){if(n===G||n==="MCOPTOUT"?E="MC":n==="MCAAMLH"||n===O?E=ie:n===B&&(E=z),E)return!s||e._loading!=null&&e._loading[E]||(e._loading==null&&(e._loading={}),e._loading[E]=!0,e._loadData(E,s,function($){if(!e._getField(n)){$&&ae.setState(E,!0);var se="";n===G?se=e._generateLocalMID():E===ie&&(se={error_msg:"timeout"}),e._setFields(E,se)}},S)),e._registerCallback(n,d),D||(s||e._setFields(E,{id:V}),"")}else D||(n===G?(e._registerCallback(n,d),D=e._generateLocalMID(),e.setMarketingCloudVisitorID(D)):n===B?(e._registerCallback(n,d),D="",e.setAnalyticsVisitorID(D)):(D="",g=!0));return n!==G&&n!==B||D!==V||(D="",g=!0),d&&g&&e._callCallback(d,[D]),D},e._setMarketingCloudFields=function(n){e._readVisitor(),e._setFields("MC",n)},e._mapCustomerIDs=function(n){e.getAudienceManagerBlob(n,!0)},e._setAnalyticsFields=function(n){e._readVisitor(),e._setFields(z,n)},e._setAudienceManagerFields=function(n){e._readVisitor(),e._setFields(ie,n)},e._getAudienceManagerURLData=function(n){var s=e.audienceManagerServer,d="",g=e._getField(G),S=e._getField(O,!0),E=e._getField(B),D=E&&E!==V?"&d_cid_ic=AVID%01"+encodeURIComponent(E):"";if(e.loadSSL&&e.audienceManagerServerSecure&&(s=e.audienceManagerServerSecure),s){var N,b,$=e.getCustomerIDs();if($)for(N in $)J(N)&&(b=$[N],D+="&d_cid_ic="+encodeURIComponent(N)+"%01"+encodeURIComponent(b.id?b.id:"")+(b.authState?"%01"+b.authState:""));n||(n="_setAudienceManagerFields");var se="http"+(e.loadSSL?"s":"")+"://"+s+"/id",Nt="d_visid_ver="+e.version+(j&&se.indexOf("demdex.net")!==-1?"&gdpr=1&gdpr_force=1&gdpr_consent="+j:"")+"&d_rtbd=json&d_ver=2"+(!g&&e._use1stPartyMarketingCloudServer?"&d_verify=1":"")+"&d_orgid="+encodeURIComponent(e.marketingCloudOrgID)+"&d_nsid="+(e.idSyncContainerID||0)+(g?"&d_mid="+encodeURIComponent(g):"")+(e.idSyncDisable3rdPartySyncing||e.disableThirdPartyCookies?"&d_coppa=true":"")+(q===!0?"&d_coop_safe=1":q===!1?"&d_coop_unsafe=1":"")+(S?"&d_blob="+encodeURIComponent(S):"")+D,mi=["s_c_il",e._in,n];return d=se+"?"+Nt+"&d_cb=s_c_il%5B"+e._in+"%5D."+n,{url:d,corsUrl:se+"?"+Nt,callback:mi}}return{url:d}},e.appendVisitorIDsTo=function(n){try{var s=[[G,e._getField(G)],[B,e._getField(B)],["MCORGID",e.marketingCloudOrgID]];return e._addQuerystringParam(n,K.ADOBE_MC,f(s))}catch{return n}},e.appendSupplementalDataIDTo=function(n,s){if(!(s=s||e.getSupplementalDataID(W.generateRandomString(),!0)))return n;try{var d=f([["SDID",s],["MCORGID",e.marketingCloudOrgID]]);return e._addQuerystringParam(n,K.ADOBE_MC_SDID,d)}catch{return n}};var W={parseHash:function(n){var s=n.indexOf("#");return s>0?n.substr(s):""},hashlessUrl:function(n){var s=n.indexOf("#");return s>0?n.substr(0,s):n},addQueryParamAtLocation:function(n,s,d){var g=n.split("&");return d=d??g.length,g.splice(d,0,s),g.join("&")},isFirstPartyAnalyticsVisitorIDCall:function(n,s,d){if(n!==B)return!1;var g;return s||(s=e.trackingServer),d||(d=e.trackingServerSecure),!(typeof(g=e.loadSSL?d:s)!="string"||!g.length)&&g.indexOf("2o7.net")<0&&g.indexOf("omtrdc.net")<0},isObject:function(n){return!!(n&&n===Object(n))},removeCookie:function(n){Ae.remove(n,{domain:e.cookieDomain})},isTrackingServerPopulated:function(){return!!e.trackingServer||!!e.trackingServerSecure},getTimestampInSeconds:function(){return Math.round(new Date().getTime()/1e3)},parsePipeDelimetedKeyValues:function(n){return n.split("|").reduce(function(s,d){var g=d.split("=");return s[g[0]]=decodeURIComponent(g[1]),s},{})},generateRandomString:function(n){n=n||5;for(var s="",d="abcdefghijklmnopqrstuvwxyz0123456789";n--;)s+=d[Math.floor(Math.random()*d.length)];return s},normalizeBoolean:function(n){return n==="true"||n!=="false"&&n},parseBoolean:function(n){return n==="true"||n!=="false"&&null},replaceMethodsWithFunction:function(n,s){for(var d in n)n.hasOwnProperty(d)&&typeof n[d]=="function"&&(n[d]=s);return n}};e._helpers=W;var re=Xn(e,X);e._destinationPublishing=re,e.timeoutMetricsLog=[];var ae={isClientSideMarketingCloudVisitorID:null,MCIDCallTimedOut:null,AnalyticsIDCallTimedOut:null,AAMIDCallTimedOut:null,fieldGroupObj:{},setState:function(n,s){switch(n){case"MC":s===!1?this.MCIDCallTimedOut!==!0&&(this.MCIDCallTimedOut=!1):this.MCIDCallTimedOut=s;break;case z:s===!1?this.AnalyticsIDCallTimedOut!==!0&&(this.AnalyticsIDCallTimedOut=!1):this.AnalyticsIDCallTimedOut=s;break;case ie:s===!1?this.AAMIDCallTimedOut!==!0&&(this.AAMIDCallTimedOut=!1):this.AAMIDCallTimedOut=s}}};e.isClientSideMarketingCloudVisitorID=function(){return ae.isClientSideMarketingCloudVisitorID},e.MCIDCallTimedOut=function(){return ae.MCIDCallTimedOut},e.AnalyticsIDCallTimedOut=function(){return ae.AnalyticsIDCallTimedOut},e.AAMIDCallTimedOut=function(){return ae.AAMIDCallTimedOut},e.idSyncGetOnPageSyncInfo=function(){return e._readVisitor(),e._getField("MCSYNCSOP")},e.idSyncByURL=function(n){if(!e.isOptedOut()){var s=h(n||{});if(s.error)return s.error;var d,g,S=n.url,E=encodeURIComponent,D=re;return S=S.replace(/^https:/,"").replace(/^http:/,""),d=x.encodeAndBuildRequest(["",n.dpid,n.dpuuid||""],","),g=["ibs",E(n.dpid),"img",E(S),s.ttl,"",d],D.addMessage(g.join("|")),D.requestToProcess(),"Successfully queued"}},e.idSyncByDataSource=function(n){if(!e.isOptedOut())return n===Object(n)&&typeof n.dpuuid=="string"&&n.dpuuid.length?(n.url="//dpm.demdex.net/ibs:dpid="+n.dpid+"&dpuuid="+n.dpuuid,e.idSyncByURL(n)):"Error: config or config.dpuuid is empty"},ci(e,re),e._getCookieVersion=function(n){n=n||e.cookieRead(e.cookieName);var s=K.VERSION_REGEX.exec(n);return s&&s.length>1?s[1]:null},e._resetAmcvCookie=function(n){var s=e._getCookieVersion();s&&!At.isLessThan(s,n)||W.removeCookie(e.cookieName)},e.setAsCoopSafe=function(){q=!0},e.setAsCoopUnsafe=function(){q=!1},(function(){if(e.configs=Object.create(null),W.isObject(r))for(var n in r)J(n)&&(e[n]=r[n],e.configs[n]=r[n])})(),_();var Lt;e.init=function(){I()&&(v.optIn.fetchPermissions(M,!0),!v.optIn.isApproved(v.optIn.Categories.ECID))||Lt||(Lt=!0,(function(){if(W.isObject(r)){e.idSyncContainerID=e.idSyncContainerID||0,q=typeof e.isCoopSafe=="boolean"?e.isCoopSafe:W.parseBoolean(e.isCoopSafe),e.resetBeforeVersion&&e._resetAmcvCookie(e.resetBeforeVersion),e._attemptToPopulateIdsFromUrl(),e._attemptToPopulateSdidFromUrl(),e._readVisitor();var n=e._getField(ne),s=Math.ceil(new Date().getTime()/K.MILLIS_PER_DAY);e.idSyncDisableSyncs||e.disableIdSyncs||!re.canMakeSyncIDCall(n,s)||(e._setFieldExpire(O,-1),e._setField(ne,s)),e.getMarketingCloudVisitorID(),e.getAudienceManagerLocationHint(),e.getAudienceManagerBlob(),e._mergeServerState(e.serverState)}else e._attemptToPopulateIdsFromUrl(),e._attemptToPopulateSdidFromUrl()})(),(function(){if(!e.idSyncDisableSyncs&&!e.disableIdSyncs){re.checkDPIframeSrc();var n=function(){var s=re;s.readyToAttachIframe()&&s.attachIframe()};Y.addEventListener("load",function(){X.windowLoaded=!0,n()});try{Ke.receiveMessage(function(s){re.receiveMessage(s.data)},re.iframeHost)}catch{}}})(),(function(){e.whitelistIframeDomains&&K.POST_MESSAGE_ENABLED&&(e.whitelistIframeDomains=e.whitelistIframeDomains instanceof Array?e.whitelistIframeDomains:[e.whitelistIframeDomains],e.whitelistIframeDomains.forEach(function(n){var s=new ht(t,n),d=Bn(e,s);Ke.receiveMessage(d,n)}))})())}};Ze.config=Dt,w.Visitor=Ze;var ve=Ze,ui=function(t){if(x.isObject(t))return Object.keys(t).filter(function(r){return t[r]!==""}).reduce(function(r,a){var i=Dt.normalizeConfig(t[a]),c=x.normalizeBoolean(i);return r[a]=c,r},Object.create(null))},fi=Qe.OptIn,gi=Qe.IabPlugin;return ve.getInstance=function(t,r){if(!t)throw new Error("Visitor requires Adobe Marketing Cloud Org ID.");t.indexOf("@")<0&&(t+="@AdobeOrg");var a=(function(){var C=w.s_c_il;if(C)for(var _=0;_<C.length;_++){var T=C[_];if(T&&T._c==="Visitor"&&T.marketingCloudOrgID===t)return T}})();if(a)return a;var i=ui(r);(function(C){w.adobe.optIn=w.adobe.optIn||(function(){var _=x.pluck(C,["doesOptInApply","previousPermissions","preOptInApprovals","isOptInStorageEnabled","optInStorageExpiry","isIabContext"]),T=C.optInCookieDomain||C.cookieDomain;T=T||St(),T=T===window.location.hostname?"":T,_.optInCookieDomain=T;var M=new fi(_,{cookies:Ae});if(_.isIabContext&&_.doesOptInApply){var A=new gi(window.__cmp);M.registerPlugin(A)}return M})()})(i||{});var c=t,u=c.split("").reverse().join(""),f=new ve(t,null,u);x.isObject(i)&&i.cookieDomain&&(f.cookieDomain=i.cookieDomain),(function(){w.s_c_il.splice(--w.s_c_in,1)})();var h=x.getIeVersion();if(typeof h=="number"&&h<10)return f._helpers.replaceMethodsWithFunction(f,function(){});var I=(function(){try{return w.self!==w.parent}catch{return!0}})()&&!(function(C){return C.cookieWrite("TEST_AMCV_COOKIE","T",1),C.cookieRead("TEST_AMCV_COOKIE")==="T"&&(C._helpers.removeCookie("TEST_AMCV_COOKIE"),!0)})(f)&&w.parent?new Gn(t,i,f,w.parent):new ve(t,i,u);return f=null,I.init(),I},(function(){function t(){ve.windowLoaded=!0}w.addEventListener?w.addEventListener("load",t):w.attachEvent&&w.attachEvent("onload",t),ve.codeLoadEnd=new Date().getTime()})(),ve})()});var Ee="__mpi",ee=typeof window<"u",Vt=()=>ee?window:void 0;function k(o){let p=Vt()?.[Ee]?.segmentWrapper||{};return o?p[o]:p}var me=(o,l)=>{let p=Vt();if(!p){console.warn("[segment-wrapper] Cannot set config in non-browser environment");return}p[Ee]=p[Ee]||{},p[Ee].segmentWrapper=p[Ee].segmentWrapper||{},p[Ee].segmentWrapper[o]=l};var Oe,et=()=>({ADOBE_ORG_ID:window.__SEGMENT_WRAPPER?.ADOBE_ORG_ID,DEFAULT_DEMDEX_VERSION:window.__SEGMENT_WRAPPER?.DEFAULT_DEMDEX_VERSION??"3.3.0",TIME_BETWEEN_RETRIES:window.__SEGMENT_WRAPPER?.TIME_BETWEEN_RETRIES??15,TIMES_TO_RETRY:window.__SEGMENT_WRAPPER?.TIMES_TO_RETRY??80,SERVERS:{trackingServer:window.__SEGMENT_WRAPPER?.TRACKING_SERVER,trackingServerSecure:window.__SEGMENT_WRAPPER?.TRACKING_SERVER}}),Ut=()=>{let o=et();if(window.Visitor&&o.ADOBE_ORG_ID)return window.Visitor.getInstance(o.ADOBE_ORG_ID,o.SERVERS)},Ei=o=>o?.getMarketingCloudVisitorID(),Gt=()=>{let o=Ut(),l=et(),p=o?.version??l.DEFAULT_DEMDEX_VERSION,{trackingServer:m}=l.SERVERS;return Promise.resolve({trackingServer:m,version:p})},jt=()=>{debugger;if(Oe)return Promise.resolve(Oe);debugger;let o=et();debugger;return new Promise(l=>{function p(m){if(m===0)return l("");debugger;let y=Ut();Oe=Ei(y);debugger;Oe?l(Oe):window.setTimeout(()=>p(--m),o.TIME_BETWEEN_RETRIES)}p(o.TIMES_TO_RETRY)})},Di=async()=>{await Promise.resolve().then(()=>vi(Ft()));debugger;return jt()},Ue=async()=>{let o=k("getCustomAdobeVisitorId");return typeof o=="function"?o():k("importAdobeVisitorId")===!0?Di():jt()};var Ht={GA4_INIT_EVENT_SENT:"ga4InitEventSent"};var tt={spaReferrer:"",referrer:""},Ge={getDocumentReferrer:()=>document.referrer,getActualLocation:()=>{let{origin:o,pathname:l}=window.location;return`${o}${l}`},getActualQueryString:()=>{let{search:o}=window.location;return o}},Bt=({isPageTrack:o=!1}={})=>{let{referrer:l,spaReferrer:p}=tt;return(o?l:p)||Ge.getDocumentReferrer()},Ti=()=>{tt.spaReferrer=Bt({isPageTrack:!0}),tt.referrer=Ge.getActualLocation()},Wt=({payload:o,next:l})=>{let{obj:{context:p}}=o,{isPageTrack:m}=p,y=Bt({isPageTrack:m});o.obj.context={...p,page:{...p.page,referrer:y}},m&&Ti(),l(o)};var Yt={clientId:"client_id",sessionId:"session_id"},nt="dataLayer",de={granted:"granted",denied:"denied"},bi=1,Mi=2,we={QUERY:"stc",SPLIT_SYMBOL:"-",CAMPAIGN_SPLIT_SYMBOL:":"},Oi="utm_campaign",wi="utm_medium",ki="utm_source",Pi="utm_content",Ri="utm_id",Li="utm_term",Ni={aff:"affiliate",dis:"display",em:"email",met:"paid-metasearch",sem:"paid-search",rt:"display",sm:"social-media",sp:"paid-social",pn:"push-notification",cs:"cross-sites"},xi="na",Vi="sui",Fi={medium:null,source:null,campaign:null},Ui=async o=>new Promise(function(l,p){let m=document.createElement("script");m.src=o,m.onload=()=>l(),m.onerror=p,document.head.appendChild(m)}),Kt=async()=>{let o=k("googleAnalyticsMeasurementId"),l=k("googleAnalyticsDataLayer")||nt;if(!o)return Promise.resolve(!1);let p=`https://www.googletagmanager.com/gtag/js?id=${o}&l=${l}`;return Ui(p).then(()=>!0)},Gi=o=>{let l=k("googleAnalyticsInitEvent")??Vi,p=`ga_event_${l}_`,m=`${p}${o}`;if(!(typeof window.gtag>"u")){if(!localStorage.getItem(m)&&(window.gtag("event",l),console.log(`Sending GA4 event "${l}" for the session "${o}"`),localStorage.setItem(m,"true"),typeof window.dispatchEvent=="function")){let y=new CustomEvent(Ht.GA4_INIT_EVENT_SENT,{detail:{eventName:l,sessionId:o}});window.dispatchEvent(y)}Object.keys(localStorage).forEach(y=>{y.startsWith(p)&&y!==m&&localStorage.removeItem(y)})}},Xt=async o=>{let l=k("googleAnalyticsMeasurementId");return l?new Promise(p=>{window.gtag?.("get",l,o,p)}):Promise.resolve(void 0)},ji={STC:"stc",UTM:"utm"},je=({needsTransformation:o=!0}={})=>{let{medium:l,source:p,campaign:m,content:y,term:P}=Hi();if(!l||!p||!m)return null;let[F,L]=m.split(we.CAMPAIGN_SPLIT_SYMBOL);if(!F&&!L)return null;let te=typeof y<"u"&&y!==xi;return{campaign:{medium:o&&Ni[l]||l,...typeof L<"u"&&{id:F},name:L??F,source:p,...te&&{content:y},...typeof P<"u"&&{term:P}}}};function Hi(){let o=Ge.getActualQueryString(),l=new URLSearchParams(o);return k("trackingTagsType")===ji.UTM?Bi(l):$t(l)}function $t(o){if(!qt(o))return Fi;let l=o.get(we.QUERY),[p,m,y,P,F]=l?.split(we.SPLIT_SYMBOL)||[];return{medium:p,source:m,campaign:y,content:P,term:F}}function qt(o){return o.has(we.QUERY)}function Bi(o){let l=o.get(Ri),p=o.get(Oi),m=o.get(wi),y=o.get(ki),P=o.get(Pi),F=o.get(Li),L=l?`${l}${we.CAMPAIGN_SPLIT_SYMBOL}${p}`:p;return(!m||!y||!L)&&qt(o)?$t(o):{campaign:L,medium:m,source:y,content:P??void 0,term:F??void 0}}var zt=async()=>Xt(Yt.clientId),Jt=async()=>{let o=await Xt(Yt.sessionId);return o&&Gi(o),o};function De(o="analytics_storage"){try{let l=window.google_tag_data?.ics?.getConsentState?.(o);return l===bi?de.granted:l===Mi?de.denied:void 0}catch{return}}var Qt=()=>De()??de.denied,Zt=o=>{!k("googleAnalyticsMeasurementId")||!o||window.gtag?.("set","user_id",o)},He=(o="default",l)=>{window.gtag?.("consent",o,l||{analytics_storage:de.denied,ad_user_data:de.denied,ad_personalization:de.denied,ad_storage:de.denied})};var Wi="borosTcf",Yi=2,Ki={channel:"GDPR"},en={analytics:[1,8,10],advertising:[3]},it={LOADED:"tcloaded",USER_ACTION_COMPLETE:"useractioncomplete"},rt="CMP Submitted",ce={ACCEPTED:"accepted",DECLINED:"declined",UNKNOWN:"unknown"},le={listeners:[],value:void 0,addListener:o=>le.listeners.push(o),get:()=>le.value,set:o=>{let{analytics:l,advertising:p}=o||{};le.value={analytics:l,advertising:p},le.listeners.forEach(m=>m(o)),le.listeners=[]}};function Xi(o){if(!ee)return null;let p=new RegExp(o+"=([^;]+)").exec(document.cookie);return p!==null?unescape(p[1]):null}var $i=()=>{if(k("initialized"))return!1;let o=!!window.__tcfapi;return o||console.warn("[tcfTracking] window.__tcfapi is not available on client and TCF won't be tracked."),o},qi=o=>en.analytics.every(l=>o[`${l}`]),zi=o=>en.advertising.every(l=>o[`${l}`]),Ji=({gdprPrivacy:o})=>Be.track(rt,{...Ki,...k("tcfTrackDefaultProperties")||{}},{gdpr_privacy:o.analytics,gdpr_privacy_advertising:o.advertising}),Te=()=>{let o=le.get();return o!==void 0?Promise.resolve(o):new Promise(l=>{le.addListener(p=>l(p))})},Se=o=>o?.analytics===ce.ACCEPTED,tn=o=>{let l=qi(o),p=zi(o),m=l?ce.ACCEPTED:ce.DECLINED,y=p?ce.ACCEPTED:ce.DECLINED;return le.set({analytics:m,advertising:y}),{analytics:m,advertising:y}},nn=()=>{let o=Xi(Wi);if(o)try{let{purpose:l}=JSON.parse(window.atob(o)),{consents:p}=l;return p}catch(l){console.error(l);return}},Qi=()=>{let o=nn();o&&tn(o)},Zi=()=>{let o=nn();me("isFirstVisit",!o)};function ot(){if(ee){if(Qi(),Zi(),!$i()){le.get()?.analytics===void 0&&le.set({analytics:ce.UNKNOWN,advertising:ce.UNKNOWN});return}me("initialized",!0),window.__tcfapi?.("addEventListener",Yi,({eventStatus:o,purpose:l},p)=>{if(!p)return Promise.resolve();if(o===it.USER_ACTION_COMPLETE||o===it.LOADED){let{consents:m}=l,y=tn(m);if(o===it.USER_ACTION_COMPLETE){let{analytics:P,advertising:F}=y,L={analytics:P,advertising:F};return!(ee&&window.sessionStorage.getItem("didomi-migration"))&&Ji({gdprPrivacy:L})}}})}}function rn(o){if(typeof document>"u")return null;let p=new RegExp(`${o}=([^;]+)`).exec(document.cookie);return p!==null?unescape(p[1]):null}function on(o,l,p={}){if(typeof document>"u"||typeof window>"u")return;let{maxAge:m=31536e3,path:y="/",reduceDomain:P=!0,sameSite:F="Lax"}=p,L=P?sn():window.location.hostname,te=[`${o}=${l}`,`domain=${L}`,`path=${y}`,`max-age=${m}`,`SameSite=${F}`].join(";");document.cookie=te}function an(o,l={}){if(typeof document>"u"||typeof window>"u")return;let{path:p="/",reduceDomain:m=!0}=l,y=m?sn():window.location.hostname;document.cookie=`${o}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=${p}; domain=${y}`}var sn=o=>{let l=o!==void 0?o:typeof window<"u"?window.location.hostname:"",p=".",m=l.split(p).reverse();if(m.length===1)return m[0];let y=[];for(let P of m)if(y.push(P),P.length>3)break;return`${p}${y.reverse().join(p)}`};var er="https://secure.adnxs.com/getuidj?consent=1",at="adit-xandr-id",tr=0;function nr(){return ee?window.fetch(er,{credentials:"include"}).then(o=>o.json()).then(o=>o?.uid).catch(()=>null):Promise.resolve(null)}function cn({gdprPrivacyValueAdvertising:o}){if(!ee)return null;if(o!==ce.ACCEPTED)return an(at),null;let l=y=>y!==null&&Number(y)>tr,p=rn(at),m=l(p);return m||nr().then(y=>{typeof y=="string"&&on(at,y)}),me("xandrId",p),m?p:null}var ir={platform:"web"},rr={All:!1},or={All:!0},ar=o=>{let l=k("userIdPrefix");return l&&(typeof o=="number"||typeof o=="string"&&!o.startsWith(l))?`${l}${o}`:o},st=()=>({...ir,...k("defaultProperties")}),sr=async({gdprPrivacyValue:o,event:l})=>{let p=Se(o),m,y,P;try{p&&(m=await Ue()),y=await Jt(),P=await zt()}catch(L){console.error(L)}return{...cr({isGdprAccepted:p,event:l}),"Adobe Analytics":m?{marketingCloudVisitorId:m}:!0,"Google Analytics 4":P&&y?{clientId:P,sessionId:y}:!0}},cr=({isGdprAccepted:o,event:l})=>l==="CMP Submitted"?or:o?{}:rr,dr=({context:o,xandrId:l})=>{let p=k("sendXandrId")!==!1,m=l&&parseInt(l)!==0;if(!p||!m)return{};let L=[...Array.isArray(o?.externalIds)?o.externalIds:[],{collection:"users",encoding:"none",id:l,type:"xandr_id"}];return{externalIds:L.filter(({id:Ce,type:he},Ie)=>Ie===L.findIndex(({id:fe,type:be})=>Ce===fe&&he===be))}},We=o=>o===ce.ACCEPTED?de.granted:de.denied,ct=async({event:o="",context:l={}})=>{let p=await Te(),{analytics:m,advertising:y}=p||{},P=Se(p),[F,L]=await Promise.all([sr({gdprPrivacyValue:p,event:o}),cn({gdprPrivacyValueAdvertising:y})]),te=De("analytics_storage")??We(m),Ce=De("ad_user_data")??We(y),he=De("ad_personalization")??We(y),Ie=De("ad_storage")??We(y);P||(l.integrations={...l.integrations??{},Personas:!1,Webhooks:!0,Webhook:!0});let fe={analytics_storage:te,ad_user_data:Ce,ad_personalization:he,ad_storage:Ie};return{...l,...!P&&{ip:"0.0.0.0"},...dr({context:l,xandrId:L}),analytics_storage:Qt(),clientVersion:"segment-wrapper@4.36.2-beta.2",gdpr_privacy:m,gdpr_privacy_advertising:y,google_consents:fe,integrations:{...l.integrations,...F}}},dn=(o,l,p={},m)=>new Promise(y=>{(async()=>{let F=await ct({context:p,event:o}),L={...st(),...l},te=async(...he)=>{m&&m(...he);let[Ie]=await Promise.all([Te()]);Se(Ie),y()};k("googleAnalyticsConsentManagement")&&o===rt&&He("update",F.google_consents),window.analytics.track(o,L,{...F,context:{integrations:{...F.integrations}}},te)})()}),lr=async(o,l,p,m)=>{let y=await Te(),P=ar(o);return Zt(P),window.analytics.identify(P,Se(y)?l:{},p,m)},ur=(o,l,p={},m)=>(p.isPageTrack=!0,dn(o??"",l,p,m)),fr=()=>Promise.resolve(window.analytics.reset()),Be={page:ur,identify:lr,track:dn,reset:fr};var un="__mpi_patch";function ln(){let{track:o}=window.analytics;window.analytics.track=(...l)=>{let[p,m,y,P]=l,F={...st(),...m};return ct({context:y,event:p}).then(L=>{o.call(window.analytics,p,F,L,P)}),window.analytics},window.analytics[un]=!0}ee&&(window.analytics?window.analytics[un]||(window.analytics.initialized?ln():window.analytics.ready(ln)):console.warn("[segment-wrapper] Segment Analytics is not loaded so patch is not applied."));var fn=({payload:o,next:l})=>{if(k("googleAnalyticsMeasurementId")){let m=je();o.obj.context={...o.obj.context,...m}}l(o)};var gr={platform:"web"},gn=({payload:o,next:l})=>{let p=k("defaultContext")||{};o.obj.context={...gr,...p,...o.obj.context},l(o)};var pr=()=>{let o=null;return({payload:l,next:p})=>{try{let{obj:m}=l,{event:y,type:P}=m;if(P!=="track"){p(l);return}if(typeof y=="string"&&y.endsWith("Viewed")){let{page_name:F,page_type:L}=m.properties||{};o={name:F,type:L},p(l);return}if(!o){p(l);return}p({...l,obj:{...m,properties:{...m.properties,page_name_origin:o.name,page_type:m.properties?.page_type||o.type}}})}catch(m){console.error(m),p(l)}}},pn=pr();var mn=({payload:o,next:l})=>{o.obj.context={...o.obj.context,screen:{height:window.innerHeight,width:window.innerWidth,density:window.devicePixelRatio}},l(o)};var mr=o=>{let l=k("isUserTraitsEnabled"),p=window.analytics.user?.(),m=Se(o),y=p?.id();return{anonymousId:p?.anonymousId(),...y&&{userId:y},...m&&l&&p?.traits()||{}}},_n=async({payload:o,next:l})=>{let p=await Te(),m;try{m=mr(p)}catch(y){console.error(y)}o.obj.context={...o.obj.context,traits:{...o.obj.context.traits||{},...m}},l(o)};for(Cn=[],Ye=0;Ye<64;)Cn[Ye]=0|4294967296*Math.sin(++Ye%Math.PI);var Cn,Ye;for(oe=18,ke=[],dt=[];oe>1;oe--)for(U=oe;U<320;)ke[U+=oe]=1;var U,oe,ke,dt;function Q(o,l){return 4294967296*Math.pow(o,1/l)|0}for(U=0;U<64;)ke[++oe]||(dt[U]=Q(oe,2),ke[U++]=Q(oe,3));function ue(o,l){return o>>>l|o<<-l}function hn(o){var l=dt.slice(oe=U=0,8),p=[],m=unescape(encodeURI(o))+"\x80",y=m.length;for(p[o=--y/4+2|15]=8*y;~y;)p[y>>2]|=m.charCodeAt(y)<<8*~y--;for(y=[];oe<o;oe+=16){for(Q=l.slice();U<64;Q.unshift(m+(ue(m=Q[0],2)^ue(m,13)^ue(m,22))+(m&Q[1]^Q[1]&Q[2]^Q[2]&m)))Q[3]+=m=0|(y[U]=U<16?~~p[U+oe]:(ue(m=y[U-2],17)^ue(m,19)^m>>>10)+y[U-7]+(ue(m=y[U-15],7)^ue(m,18)^m>>>3)+y[U-16])+Q.pop()+(ue(m=Q[4],6)^ue(m,11)^ue(m,25))+(m&Q[5]^~m&Q[6])+ke[U++];for(U=8;U;)l[--U]+=Q[U]}for(m="";U<64;)m+=(l[U>>3]>>4*(7-U++)&15).toString(16);return m}var _r=/\.|\+.*$/g;function Cr(o){if(typeof o!="string")return"";let p=o.toLowerCase().split(/@/);if(p.length!==2)return"";let[m,y]=p;return`${m.replace(_r,"")}@${y}`}function In(o){let l=Cr(o);return l?hn(l):""}var hr="USER_DATA_READY",Ir=()=>k("universalId"),yr=()=>{let o=Ir();if(o)return lt(),o;let l=k("userEmail");if(l)return o=In(l),Sr(o),lt(),o;lt()},yn=()=>{if(!ee)return;let o=yr(),l=k("userEmail");if(typeof window<"u"&&typeof window.dispatchEvent=="function"){let p=new CustomEvent(hr,{detail:{universalId:o,userEmail:l}});window.dispatchEvent(p)}return{universalId:o,userEmail:l}},lt=()=>{me("universalIdInitialized",!0)},Sr=o=>{me("universalId",o)};var Sn=()=>{if(typeof window>"u")return;let o=window,l=o.analytics;if(!l){console.warn("[segment-wrapper] Analytics is not available");return}let p=o.__SEGMENT_WRAPPER?.SEGMENT_ID_USER_WITHOUT_CONSENTS??"anonymous_user";l.user?.()?.anonymousId()===p&&"setAnonymousId"in l&&typeof l.setAnonymousId=="function"&&l.setAnonymousId(null)};ot();try{yn()}catch(o){console.error("[segment-wrapper] UniversalID could not be initialized",o)}var An=()=>{let o=k("experimentalPageDataMiddleware");window.analytics.addSourceMiddleware?.(_n),window.analytics.addSourceMiddleware?.(gn),window.analytics.addSourceMiddleware?.(fn),window.analytics.addSourceMiddleware?.(mn),window.analytics.addSourceMiddleware?.(Wt),o&&window.analytics.addSourceMiddleware?.(pn)};if(ee&&window.analytics){let o=k("googleAnalyticsMeasurementId"),l=k("googleAnalyticsDataLayer")||nt,p=k("googleAnalyticsConsentManagement");if(o){let m=k("googleAnalyticsConfig");window[l]=window[l]||[],window.gtag=window.gtag||function(){window[l].push(arguments)},window.gtag("js",new Date),p&&He(),window.gtag("config",o,{cookie_prefix:"segment",send_page_view:!1,...m,...je()}),Kt().catch(y=>{console.error("[segment-wrapper] Failed to load Google Analytics",y)})}window.analytics.ready(Sn),window.analytics.addSourceMiddleware?An():window.analytics.ready(An)}var ut=Be;var _e=window;_e.sui=_e.sui||{};_e.sui.analytics=_e.sui.analytics||ut;_e.sui.analytics.getAdobeVisitorData=_e.sui.analytics.getAdobeVisitorData||Gt;_e.sui.analytics.getAdobeMCVisitorID=_e.sui.analytics.getAdobeMCVisitorID||Ue;var xo=ut;})();
|
|
1
|
+
"use strict";(()=>{var _i=Object.create;var xt=Object.defineProperty;var Ci=Object.getOwnPropertyDescriptor;var hi=Object.getOwnPropertyNames;var Ii=Object.getPrototypeOf,yi=Object.prototype.hasOwnProperty;var Si=(o,d)=>()=>(d||o((d={exports:{}}).exports,d),d.exports);var Ai=(o,d,p,m)=>{if(d&&typeof d=="object"||typeof d=="function")for(let y of hi(d))!yi.call(o,y)&&y!==p&&xt(o,y,{get:()=>d[y],enumerable:!(m=Ci(d,y))||m.enumerable});return o};var vi=(o,d,p)=>(p=o!=null?_i(Ii(o)):{},Ai(d||!o||!o.__esModule?xt(p,"default",{value:o,enumerable:!0}):p,o));var Ft=Si(()=>{"use strict";var Er=(function(){"use strict";function o(t){"@babel/helpers - typeof";return(o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(t)}function d(t,r,a){return r in t?Object.defineProperty(t,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[r]=a,t}function p(){return{callbacks:{},add:function(t,r){this.callbacks[t]=this.callbacks[t]||[];var a=this.callbacks[t].push(r)-1,i=this;return function(){i.callbacks[t].splice(a,1)}},execute:function(t,r){if(this.callbacks[t]){r=r===void 0?[]:r,r=r instanceof Array?r:[r];try{for(;this.callbacks[t].length;){var a=this.callbacks[t].shift();typeof a=="function"?a.apply(null,r):a instanceof Array&&a[1].apply(a[0],r)}delete this.callbacks[t]}catch{}}},executeAll:function(t,r){(r||t&&!x.isObjectEmpty(t))&&Object.keys(this.callbacks).forEach(function(a){var i=t[a]!==void 0?t[a]:"";this.execute(a,i)},this)},hasCallbacks:function(){return!!Object.keys(this.callbacks).length}}}function m(t,r,a){var i=t?.[r];return i===void 0?a:i}function y(t){for(var r=/^\d+$/,a=0,i=t.length;a<i;a++)if(!r.test(t[a]))return!1;return!0}function P(t,r){for(;t.length<r.length;)t.push("0");for(;r.length<t.length;)r.push("0")}function F(t,r){for(var a=0;a<t.length;a++){var i=parseInt(t[a],10),c=parseInt(r[a],10);if(i>c)return 1;if(c>i)return-1}return 0}function L(t,r){if(t===r)return 0;var a=t.toString().split("."),i=r.toString().split(".");return y(a.concat(i))?(P(a,i),F(a,i)):NaN}function te(t){return t===Object(t)&&Object.keys(t).length===0}function Ce(t){return typeof t=="function"||t instanceof Array&&t.length}function he(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(){return!0};this.log=$e("log",t,r),this.warn=$e("warn",t,r),this.error=$e("error",t,r)}function Ie(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.isEnabled,a=t.cookieName,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=i.cookies;return r&&a&&c?{remove:function(){c.remove(a)},get:function(){var u=c.get(a),f={};try{f=JSON.parse(u)}catch{f={}}return f},set:function(u,f){f=f||{},c.set(a,JSON.stringify(u),{domain:f.optInCookieDomain||"",cookieLifetime:f.optInStorageExpiry||3419e4,expires:!0})}}:{get:Me,set:Me,remove:Me}}function fe(t){this.name=this.constructor.name,this.message=t,typeof Error.captureStackTrace=="function"?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}function be(){function t(O,V){var J=qe(O);return J.length?J.every(function(pe){return!!V[pe]}):Zn(V)}function r(){ie(z),B(ge.COMPLETE),j(v.status,v.permissions),e.set(v.permissions,{optInCookieDomain:I,optInStorageExpiry:C}),R.execute(kt)}function a(O){return function(V,J){if(!ze(V))throw new Error("[OptIn] Invalid category(-ies). Please use the `OptIn.Categories` enum.");return B(ge.CHANGED),Object.assign(z,bt(qe(V),O)),J||r(),v}}var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=i.doesOptInApply,u=i.previousPermissions,f=i.preOptInApprovals,h=i.isOptInStorageEnabled,I=i.optInCookieDomain,C=i.optInStorageExpiry,_=i.isIabContext,T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=T.cookies,A=ii(u);wt(A,"Invalid `previousPermissions`!"),wt(f,"Invalid `preOptInApprovals`!");var e=Ie({isEnabled:!!h,cookieName:"adobeujs-optin"},{cookies:M}),v=this,j=$n(v),R=Tt(),H=Mt(A),Y=Mt(f),X=e.get(),q={},G=(function(O,V){return Je(O)||V&&Je(V)?ge.COMPLETE:ge.PENDING})(H,X),ne=(function(O,V,J){var pe=bt(Ne,!c);return c?Object.assign({},pe,O,V,J):pe})(Y,H,X),z=ei(ne),B=function(O){return G=O},ie=function(O){return ne=O};v.deny=a(!1),v.approve=a(!0),v.denyAll=v.deny.bind(v,Ne),v.approveAll=v.approve.bind(v,Ne),v.isApproved=function(O){return t(O,v.permissions)},v.isPreApproved=function(O){return t(O,Y)},v.fetchPermissions=function(O){var V=arguments.length>1&&arguments[1]!==void 0&&arguments[1],J=V?v.on(ge.COMPLETE,O):Me;return!c||c&&v.isComplete||f?O(v.permissions):V||R.add(kt,function(){return O(v.permissions)}),J},v.complete=function(){v.status===ge.CHANGED&&r()},v.registerPlugin=function(O){if(!O||!O.name||typeof O.onRegister!="function")throw new Error(si);q[O.name]||(q[O.name]=O,O.onRegister.call(O,v))},v.execute=ai(q),Object.defineProperties(v,{permissions:{get:function(){return ne}},status:{get:function(){return G}},Categories:{get:function(){return ye}},doesOptInApply:{get:function(){return!!c}},isPending:{get:function(){return v.status===ge.PENDING}},isComplete:{get:function(){return v.status===ge.COMPLETE}},__plugins:{get:function(){return Object.keys(q)}},isIabContext:{get:function(){return _}}})}function ft(t,r){function a(){c=null,t.call(t,new fe("The call took longer than you wanted!"))}function i(){c&&(clearTimeout(c),t.apply(t,arguments))}if(r===void 0)return t;var c=setTimeout(a,r);return i}function gt(){if(window.__cmp)return window.__cmp;var t=window;if(t===window.top)return void xe.error("__cmp not found");for(var r;!r;){t=t.parent;try{t.frames.__cmpLocator&&(r=t)}catch{}if(t===window.top)break}if(!r)return void xe.error("__cmp not found");var a={};return window.__cmp=function(i,c,u){var f=Math.random()+"",h={__cmpCall:{command:i,parameter:c,callId:f}};a[f]=u,r.postMessage(h,"*")},window.addEventListener("message",function(i){var c=i.data;if(typeof c=="string")try{c=JSON.parse(i.data)}catch{}if(c.__cmpReturn){var u=c.__cmpReturn;a[u.callId]&&(a[u.callId](u.returnValue,u.success),delete a[u.callId])}},!1),window.__cmp}function vn(){var t=this;t.name="iabPlugin",t.version="0.0.1";var r=Tt(),a={allConsentData:null},i=function(I){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return a[I]=C};t.fetchConsentData=function(I){var C=I.callback,_=I.timeout,T=ft(C,_);c({callback:T})},t.isApproved=function(I){var C=I.callback,_=I.category,T=I.timeout;if(a.allConsentData)return C(null,h(_,a.allConsentData.vendorConsents,a.allConsentData.purposeConsents));var M=ft(function(A){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=e.vendorConsents,j=e.purposeConsents;C(A,h(_,v,j))},T);c({category:_,callback:M})},t.onRegister=function(I){var C=Object.keys(Xe),_=function(T){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=M.purposeConsents,e=M.gdprApplies,v=M.vendorConsents;!T&&e&&v&&A&&(C.forEach(function(j){var R=h(j,v,A);I[R?"approve":"deny"](j,!0)}),I.complete())};t.fetchConsentData({callback:_})};var c=function(I){var C=I.callback;if(a.allConsentData)return C(null,a.allConsentData);r.add("FETCH_CONSENT_DATA",C);var _={};f(function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=T.purposeConsents,A=T.gdprApplies,e=T.vendorConsents;arguments.length>1&&arguments[1]&&(_={purposeConsents:M,gdprApplies:A,vendorConsents:e},i("allConsentData",_)),u(function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};arguments.length>1&&arguments[1]&&(_.consentString=v.consentData,i("allConsentData",_)),r.execute("FETCH_CONSENT_DATA",[null,a.allConsentData])})})},u=function(I){var C=gt();C&&C("getConsentData",null,I)},f=function(I){var C=oi(Xe),_=gt();_&&_("getVendorConsents",C,I)},h=function(I){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},T=!!C[Xe[I]];return T&&(function(){return qn[I].every(function(M){return _[M]})})()}}var w=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};Object.assign=Object.assign||function(t){for(var r,a,i=1;i<arguments.length;++i){a=arguments[i];for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t};var Pe,Re,En={HANDSHAKE:"HANDSHAKE",GETSTATE:"GETSTATE",PARENTSTATE:"PARENTSTATE"},Dn={MCMID:"MCMID",MCAID:"MCAID",MCAAMB:"MCAAMB",MCAAMLH:"MCAAMLH",MCOPTOUT:"MCOPTOUT",CUSTOMERIDS:"CUSTOMERIDS"},Tn={MCMID:"getMarketingCloudVisitorID",MCAID:"getAnalyticsVisitorID",MCAAMB:"getAudienceManagerBlob",MCAAMLH:"getAudienceManagerLocationHint",MCOPTOUT:"isOptedOut",ALLFIELDS:"getVisitorValues"},bn={CUSTOMERIDS:"getCustomerIDs"},Mn={MCMID:"getMarketingCloudVisitorID",MCAAMB:"getAudienceManagerBlob",MCAAMLH:"getAudienceManagerLocationHint",MCOPTOUT:"isOptedOut",MCAID:"getAnalyticsVisitorID",CUSTOMERIDS:"getCustomerIDs",ALLFIELDS:"getVisitorValues"},On={MC:"MCMID",A:"MCAID",AAM:"MCAAMB"},wn={MCMID:"MCMID",MCOPTOUT:"MCOPTOUT",MCAID:"MCAID",MCAAMLH:"MCAAMLH",MCAAMB:"MCAAMB"},kn={UNKNOWN:0,AUTHENTICATED:1,LOGGED_OUT:2},Pn={GLOBAL:"global"},Z={MESSAGES:En,STATE_KEYS_MAP:Dn,ASYNC_API_MAP:Tn,SYNC_API_MAP:bn,ALL_APIS:Mn,FIELDGROUP_TO_FIELD:On,FIELDS:wn,AUTH_STATE:kn,OPT_OUT:Pn},pt=Z.STATE_KEYS_MAP,Rn=function(t){function r(){}function a(i,c){var u=this;return function(){var f=t(0,i),h={};return h[i]=f,u.setStateAndPublish(h),c(f),f}}this.getMarketingCloudVisitorID=function(i){i=i||r;var c=this.findField(pt.MCMID,i),u=a.call(this,pt.MCMID,i);return c!==void 0?c:u()},this.getVisitorValues=function(i){this.getMarketingCloudVisitorID(function(c){i({MCMID:c})})}},Ln=Z.MESSAGES,mt=Z.ASYNC_API_MAP,_t=Z.SYNC_API_MAP,Nn=function(){function t(){}function r(c,u){var f=this;return function(){return f.callbackRegistry.add(c,u),f.messageParent(Ln.GETSTATE),""}}function a(c){this[mt[c]]=function(u){u=u||t;var f=this.findField(c,u),h=r.call(this,c,u);return f!==void 0?f:h()}}function i(c){this[_t[c]]=function(){return this.findField(c,t)||{}}}Object.keys(mt).forEach(a,this),Object.keys(_t).forEach(i,this)},Ct=Z.ASYNC_API_MAP,xn=function(){Object.keys(Ct).forEach(function(t){this[Ct[t]]=function(r){this.callbackRegistry.add(t,r)}},this)},x=(function(t,r){return r={exports:{}},t(r,r.exports),r.exports})(function(t,r){r.isObjectEmpty=function(i){return i===Object(i)&&Object.keys(i).length===0},r.isValueEmpty=function(i){return i===""||r.isObjectEmpty(i)};var a=function(){var i=navigator.appName,c=navigator.userAgent;return i==="Microsoft Internet Explorer"||c.indexOf("MSIE ")>=0||c.indexOf("Trident/")>=0&&c.indexOf("Windows NT 6")>=0};r.getIeVersion=function(){return document.documentMode?document.documentMode:a()?7:null},r.encodeAndBuildRequest=function(i,c){return i.map(encodeURIComponent).join(c)},r.isObject=function(i){return i!==null&&o(i)==="object"&&Array.isArray(i)===!1},r.defineGlobalNamespace=function(){return window.adobe=r.isObject(window.adobe)?window.adobe:{},window.adobe},r.pluck=function(i,c){return c.reduce(function(u,f){return i[f]&&(u[f]=i[f]),u},Object.create(null))},r.parseOptOut=function(i,c,u){c||(c=u,i.d_optout&&i.d_optout instanceof Array&&(c=i.d_optout.join(",")));var f=parseInt(i.d_ottl,10);return isNaN(f)&&(f=7200),{optOut:c,d_ottl:f}},r.normalizeBoolean=function(i){var c=i;return i==="true"?c=!0:i==="false"&&(c=!1),c}}),Vn=(x.isObjectEmpty,x.isValueEmpty,x.getIeVersion,x.encodeAndBuildRequest,x.isObject,x.defineGlobalNamespace,x.pluck,x.parseOptOut,x.normalizeBoolean,p),Fn=Z.MESSAGES,Un={0:"prefix",1:"orgID",2:"state"},ht=function(t,r){this.parse=function(a){try{var i={};return a.data.split("|").forEach(function(c,u){c!==void 0&&(i[Un[u]]=u!==2?c:JSON.parse(c))}),i}catch{}},this.isInvalid=function(a){var i=this.parse(a);if(!i||Object.keys(i).length<2)return!0;var c=t!==i.orgID,u=!r||a.origin!==r,f=Object.keys(Fn).indexOf(i.prefix)===-1;return c||u||f},this.send=function(a,i,c){var u=i+"|"+t;c&&c===Object(c)&&(u+="|"+JSON.stringify(c));try{a.postMessage(u,r)}catch{}}},It=Z.MESSAGES,Gn=function(t,r,a,i){function c(R){Object.assign(A,R)}function u(R){Object.assign(A.state,R),Object.assign(A.state.ALLFIELDS,R),A.callbackRegistry.executeAll(A.state)}function f(R){if(!j.isInvalid(R)){v=!1;var H=j.parse(R);A.setStateAndPublish(H.state)}}function h(R){!v&&e&&(v=!0,j.send(i,R))}function I(){c(new Rn(a._generateID)),A.getMarketingCloudVisitorID(),A.callbackRegistry.executeAll(A.state,!0),w.removeEventListener("message",C)}function C(R){if(!j.isInvalid(R)){var H=j.parse(R);v=!1,w.clearTimeout(A._handshakeTimeout),w.removeEventListener("message",C),c(new Nn(A)),w.addEventListener("message",f),A.setStateAndPublish(H.state),A.callbackRegistry.hasCallbacks()&&h(It.GETSTATE)}}function _(){e&&postMessage?(w.addEventListener("message",C),h(It.HANDSHAKE),A._handshakeTimeout=setTimeout(I,250)):I()}function T(){w.s_c_in||(w.s_c_il=[],w.s_c_in=0),A._c="Visitor",A._il=w.s_c_il,A._in=w.s_c_in,A._il[A._in]=A,w.s_c_in++}function M(){function R(H){H.indexOf("_")!==0&&typeof a[H]=="function"&&(A[H]=function(){})}Object.keys(a).forEach(R),A.getSupplementalDataID=a.getSupplementalDataID,A.isAllowed=function(){return!0}}var A=this,e=r.whitelistParentDomain;A.state={ALLFIELDS:{}},A.version=a.version,A.marketingCloudOrgID=t,A.cookieDomain=a.cookieDomain||"",A._instanceType="child";var v=!1,j=new ht(t,e);A.callbackRegistry=Vn(),A.init=function(){T(),M(),c(new xn(A)),_()},A.findField=function(R,H){if(A.state[R]!==void 0)return H(A.state[R]),A.state[R]},A.messageParent=h,A.setStateAndPublish=u},Le=Z.MESSAGES,yt=Z.ALL_APIS,jn=Z.ASYNC_API_MAP,Hn=Z.FIELDGROUP_TO_FIELD,Bn=function(t,r){function a(){var C={};return Object.keys(yt).forEach(function(_){var T=yt[_],M=t[T]();x.isValueEmpty(M)||(C[_]=M)}),C}function i(){var C=[];return t._loading&&Object.keys(t._loading).forEach(function(_){if(t._loading[_]){var T=Hn[_];C.push(T)}}),C.length?C:null}function c(C){return function _(T){var M=i();if(M){var A=jn[M[0]];t[A](_,!0)}else C()}}function u(C,_){var T=a();r.send(C,_,T)}function f(C){I(C),u(C,Le.HANDSHAKE)}function h(C){c(function(){u(C,Le.PARENTSTATE)})()}function I(C){function _(M){T.call(t,M),r.send(C,Le.PARENTSTATE,{CUSTOMERIDS:t.getCustomerIDs()})}var T=t.setCustomerIDs;t.setCustomerIDs=_}return function(C){r.isInvalid(C)||(r.parse(C).prefix===Le.HANDSHAKE?f:h)(C.source)}},Wn=function(t,r){function a(f){return function(h){i[f]=h,c++,c===u&&r(i)}}var i={},c=0,u=Object.keys(t).length;Object.keys(t).forEach(function(f){var h=t[f];if(h.fn){var I=h.args||[];I.unshift(a(f)),h.fn.apply(h.context||null,I)}})},Ae={get:function(t){t=encodeURIComponent(t);var r=(";"+document.cookie).split(" ").join(";"),a=r.indexOf(";"+t+"="),i=a<0?a:r.indexOf(";",a+1);return a<0?"":decodeURIComponent(r.substring(a+2+t.length,i<0?r.length:i))},set:function(t,r,a){var i=m(a,"cookieLifetime"),c=m(a,"expires"),u=m(a,"domain"),f=m(a,"secure"),h=f?"Secure":"";if(c&&i!=="SESSION"&&i!=="NONE"){var I=r!==""?parseInt(i||0,10):-60;if(I)c=new Date,c.setTime(c.getTime()+1e3*I);else if(c===1){c=new Date;var C=c.getYear();c.setYear(C+2+(C<1900?1900:0))}}else c=0;return t&&i!=="NONE"?(document.cookie=encodeURIComponent(t)+"="+encodeURIComponent(r)+"; path=/;"+(c?" expires="+c.toGMTString()+";":"")+(u?" domain="+u+";":"")+h,this.get(t)===r):0},remove:function(t,r){var a=m(r,"domain");a=a?" domain="+a+";":"",document.cookie=encodeURIComponent(t)+"=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;"+a}},St=function(t){var r;!t&&w.location&&(t=w.location.hostname),r=t;var a,i=r.split(".");for(a=i.length-2;a>=0;a--)if(r=i.slice(a).join("."),Ae.set("test","cookie",{domain:r}))return Ae.remove("test",{domain:r}),r;return""},At={compare:L,isLessThan:function(t,r){return L(t,r)<0},areVersionsDifferent:function(t,r){return L(t,r)!==0},isGreaterThan:function(t,r){return L(t,r)>0},isEqual:function(t,r){return L(t,r)===0}},vt=!!w.postMessage,Ke={postMessage:function(t,r,a){var i=1;r&&(vt?a.postMessage(t,r.replace(/([^:]+:\/\/[^\/]+).*/,"$1")):r&&(a.location=r.replace(/#.*$/,"")+"#"+ +new Date+i+++"&"+t))},receiveMessage:function(t,r){var a;try{vt&&(t&&(a=function(i){if(typeof r=="string"&&i.origin!==r||Object.prototype.toString.call(r)==="[object Function]"&&r(i.origin)===!1)return!1;t(i)}),w.addEventListener?w[t?"addEventListener":"removeEventListener"]("message",a):w[t?"attachEvent":"detachEvent"]("onmessage",a))}catch{}}},Yn=function(t){var r,a,i="0123456789",c="",u="",f=8,h=10,I=10;if(t==1){for(i+="ABCDEF",r=0;16>r;r++)a=Math.floor(Math.random()*f),c+=i.substring(a,a+1),a=Math.floor(Math.random()*f),u+=i.substring(a,a+1),f=16;return c+"-"+u}for(r=0;19>r;r++)a=Math.floor(Math.random()*h),c+=i.substring(a,a+1),r===0&&a==9?h=3:((r==1||r==2)&&h!=10&&2>a||2<r)&&(h=10),a=Math.floor(Math.random()*I),u+=i.substring(a,a+1),r===0&&a==9?I=3:((r==1||r==2)&&I!=10&&2>a||2<r)&&(I=10);return c+u},Kn=function(t,r){return{corsMetadata:(function(){var a="none",i=!0;return typeof XMLHttpRequest<"u"&&XMLHttpRequest===Object(XMLHttpRequest)&&("withCredentials"in new XMLHttpRequest?a="XMLHttpRequest":typeof XDomainRequest<"u"&&XDomainRequest===Object(XDomainRequest)&&(i=!1),Object.prototype.toString.call(w.HTMLElement).indexOf("Constructor")>0&&(i=!1)),{corsType:a,corsCookiesEnabled:i}})(),getCORSInstance:function(){return this.corsMetadata.corsType==="none"?null:new w[this.corsMetadata.corsType]},fireCORS:function(a,i,c){function u(I){var C;try{if((C=JSON.parse(I))!==Object(C))return void f.handleCORSError(a,null,"Response is not JSON")}catch(A){return void f.handleCORSError(a,A,"Error parsing response as JSON")}try{for(var _=a.callback,T=w,M=0;M<_.length;M++)T=T[_[M]];T(C)}catch(A){f.handleCORSError(a,A,"Error forming callback function")}}var f=this;i&&(a.loadErrorHandler=i);try{var h=this.getCORSInstance();h.open("get",a.corsUrl+"&ts="+new Date().getTime(),!0),this.corsMetadata.corsType==="XMLHttpRequest"&&(h.withCredentials=!0,h.timeout=t.loadTimeout,h.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),h.onreadystatechange=function(){this.readyState===4&&this.status===200&&u(this.responseText)}),h.onerror=function(I){f.handleCORSError(a,I,"onerror")},h.ontimeout=function(I){f.handleCORSError(a,I,"ontimeout")},h.send(),t._log.requests.push(a.corsUrl)}catch(I){this.handleCORSError(a,I,"try-catch")}},handleCORSError:function(a,i,c){t.CORSErrors.push({corsData:a,error:i,description:c}),a.loadErrorHandler&&(c==="ontimeout"?a.loadErrorHandler(!0):a.loadErrorHandler(!1))}}},K={POST_MESSAGE_ENABLED:!!w.postMessage,DAYS_BETWEEN_SYNC_ID_CALLS:1,MILLIS_PER_DAY:864e5,ADOBE_MC:"adobe_mc",ADOBE_MC_SDID:"adobe_mc_sdid",VALID_VISITOR_ID_REGEX:/^[0-9a-fA-F\-]+$/,ADOBE_MC_TTL_IN_MIN:5,VERSION_REGEX:/vVersion\|((\d+\.)?(\d+\.)?(\*|\d+))(?=$|\|)/,FIRST_PARTY_SERVER_COOKIE:"s_ecid"},Xn=function(t,r){var a=w.document;return{THROTTLE_START:3e4,MAX_SYNCS_LENGTH:649,throttleTimerSet:!1,id:null,onPagePixels:[],iframeHost:null,getIframeHost:function(i){if(typeof i=="string"){var c=i.split("/");return c[0]+"//"+c[2]}},subdomain:null,url:null,getUrl:function(){var i,c="http://fast.",u="?d_nsid="+t.idSyncContainerID+"#"+encodeURIComponent(a.location.origin);return this.subdomain||(this.subdomain="nosubdomainreturned"),t.loadSSL&&(c=t.idSyncSSLUseAkamai?"https://fast.":"https://"),i=c+this.subdomain+".demdex.net/dest5.html"+u,this.iframeHost=this.getIframeHost(i),this.id="destination_publishing_iframe_"+this.subdomain+"_"+t.idSyncContainerID,i},checkDPIframeSrc:function(){var i="?d_nsid="+t.idSyncContainerID+"#"+encodeURIComponent(a.location.href);typeof t.dpIframeSrc=="string"&&t.dpIframeSrc.length&&(this.id="destination_publishing_iframe_"+(t._subdomain||this.subdomain||new Date().getTime())+"_"+t.idSyncContainerID,this.iframeHost=this.getIframeHost(t.dpIframeSrc),this.url=t.dpIframeSrc+i)},idCallNotProcesssed:null,doAttachIframe:!1,startedAttachingIframe:!1,iframeHasLoaded:null,iframeIdChanged:null,newIframeCreated:null,originalIframeHasLoadedAlready:null,iframeLoadedCallbacks:[],regionChanged:!1,timesRegionChanged:0,sendingMessages:!1,messages:[],messagesPosted:[],messagesReceived:[],messageSendingInterval:K.POST_MESSAGE_ENABLED?null:100,onPageDestinationsFired:[],jsonForComparison:[],jsonDuplicates:[],jsonWaiting:[],jsonProcessed:[],canSetThirdPartyCookies:!0,receivedThirdPartyCookiesNotification:!1,readyToAttachIframePreliminary:function(){return!(t.idSyncDisableSyncs||t.disableIdSyncs||t.idSyncDisable3rdPartySyncing||t.disableThirdPartyCookies||t.disableThirdPartyCalls)},readyToAttachIframe:function(){return this.readyToAttachIframePreliminary()&&(this.doAttachIframe||t._doAttachIframe)&&(this.subdomain&&this.subdomain!=="nosubdomainreturned"||t._subdomain)&&this.url&&!this.startedAttachingIframe},attachIframe:function(){function i(){f=a.createElement("iframe"),f.sandbox="allow-scripts allow-same-origin",f.title="Adobe ID Syncing iFrame",f.id=u.id,f.name=u.id+"_name",f.style.cssText="display: none; width: 0; height: 0;",f.src=u.url,u.newIframeCreated=!0,c(),a.body.appendChild(f)}function c(h){f.addEventListener("load",function(){f.className="aamIframeLoaded",u.iframeHasLoaded=!0,u.fireIframeLoadedCallbacks(h),u.requestToProcess()})}this.startedAttachingIframe=!0;var u=this,f=a.getElementById(this.id);f?f.nodeName!=="IFRAME"?(this.id+="_2",this.iframeIdChanged=!0,i()):(this.newIframeCreated=!1,f.className!=="aamIframeLoaded"?(this.originalIframeHasLoadedAlready=!1,c("The destination publishing iframe already exists from a different library, but hadn't loaded yet.")):(this.originalIframeHasLoadedAlready=!0,this.iframeHasLoaded=!0,this.iframe=f,this.fireIframeLoadedCallbacks("The destination publishing iframe already exists from a different library, and had loaded alresady."),this.requestToProcess())):i(),this.iframe=f},fireIframeLoadedCallbacks:function(i){this.iframeLoadedCallbacks.forEach(function(c){typeof c=="function"&&c({message:i||"The destination publishing iframe was attached and loaded successfully."})}),this.iframeLoadedCallbacks=[]},requestToProcess:function(i){function c(){f.jsonForComparison.push(i),f.jsonWaiting.push(i),f.processSyncOnPage(i)}var u,f=this;if(i===Object(i)&&i.ibs)if(u=JSON.stringify(i.ibs||[]),this.jsonForComparison.length){var h,I,C,_=!1;for(h=0,I=this.jsonForComparison.length;h<I;h++)if(C=this.jsonForComparison[h],u===JSON.stringify(C.ibs||[])){_=!0;break}_?this.jsonDuplicates.push(i):c()}else c();if((this.receivedThirdPartyCookiesNotification||!K.POST_MESSAGE_ENABLED||this.iframeHasLoaded)&&this.jsonWaiting.length){var T=this.jsonWaiting.shift();this.process(T),this.requestToProcess()}t.idSyncDisableSyncs||t.disableIdSyncs||!this.iframeHasLoaded||!this.messages.length||this.sendingMessages||(this.throttleTimerSet||(this.throttleTimerSet=!0,setTimeout(function(){f.messageSendingInterval=K.POST_MESSAGE_ENABLED?null:150},this.THROTTLE_START)),this.sendingMessages=!0,this.sendMessages())},getRegionAndCheckIfChanged:function(i,c){var u=t._getField("MCAAMLH"),f=i.d_region||i.dcs_region;return u?f&&(t._setFieldExpire("MCAAMLH",c),t._setField("MCAAMLH",f),parseInt(u,10)!==f&&(this.regionChanged=!0,this.timesRegionChanged++,t._setField("MCSYNCSOP",""),t._setField("MCSYNCS",""),u=f)):(u=f)&&(t._setFieldExpire("MCAAMLH",c),t._setField("MCAAMLH",u)),u||(u=""),u},processSyncOnPage:function(i){var c,u,f,h;if((c=i.ibs)&&c instanceof Array&&(u=c.length))for(f=0;f<u;f++)h=c[f],h.syncOnPage&&this.checkFirstPartyCookie(h,"","syncOnPage")},process:function(i){var c,u,f,h,I,C=encodeURIComponent,_=!1;if((c=i.ibs)&&c instanceof Array&&(u=c.length))for(_=!0,f=0;f<u;f++)h=c[f],I=[C("ibs"),C(h.id||""),C(h.tag||""),x.encodeAndBuildRequest(h.url||[],","),C(h.ttl||""),"","",h.fireURLSync?"true":"false"],h.syncOnPage||(this.canSetThirdPartyCookies?this.addMessage(I.join("|")):h.fireURLSync&&this.checkFirstPartyCookie(h,I.join("|")));_&&this.jsonProcessed.push(i)},checkFirstPartyCookie:function(i,c,u){var f=u==="syncOnPage",h=f?"MCSYNCSOP":"MCSYNCS";t._readVisitor();var I,C,_=t._getField(h),T=!1,M=!1,A=Math.ceil(new Date().getTime()/K.MILLIS_PER_DAY);_?(I=_.split("*"),C=this.pruneSyncData(I,i.id,A),T=C.dataPresent,M=C.dataValid,T&&M||this.fireSync(f,i,c,I,h,A)):(I=[],this.fireSync(f,i,c,I,h,A))},pruneSyncData:function(i,c,u){var f,h,I,C=!1,_=!1;for(h=0;h<i.length;h++)f=i[h],I=parseInt(f.split("-")[1],10),f.match("^"+c+"-")?(C=!0,u<I?_=!0:(i.splice(h,1),h--)):u>=I&&(i.splice(h,1),h--);return{dataPresent:C,dataValid:_}},manageSyncsSize:function(i){if(i.join("*").length>this.MAX_SYNCS_LENGTH)for(i.sort(function(c,u){return parseInt(c.split("-")[1],10)-parseInt(u.split("-")[1],10)});i.join("*").length>this.MAX_SYNCS_LENGTH;)i.shift()},fireSync:function(i,c,u,f,h,I){var C=this;if(i){if(c.tag==="img"){var _,T,M,A,e=c.url,v=t.loadSSL?"https:":"http:";for(_=0,T=e.length;_<T;_++){M=e[_],A=/^\/\//.test(M);var j=new Image;j.addEventListener("load",(function(R,H,Y,X){return function(){C.onPagePixels[R]=null,t._readVisitor();var q,G=t._getField(h),ne=[];if(G){q=G.split("*");var z,B,ie;for(z=0,B=q.length;z<B;z++)ie=q[z],ie.match("^"+H.id+"-")||ne.push(ie)}C.setSyncTrackingData(ne,H,Y,X)}})(this.onPagePixels.length,c,h,I)),j.src=(A?v:"")+M,this.onPagePixels.push(j)}}}else this.addMessage(u),this.setSyncTrackingData(f,c,h,I)},addMessage:function(i){var c=encodeURIComponent,u=c(t._enableErrorReporting?"---destpub-debug---":"---destpub---");this.messages.push((K.POST_MESSAGE_ENABLED?"":u)+i)},setSyncTrackingData:function(i,c,u,f){i.push(c.id+"-"+(f+Math.ceil(c.ttl/60/24))),this.manageSyncsSize(i),t._setField(u,i.join("*"))},sendMessages:function(){var i,c=this,u="",f=encodeURIComponent;this.regionChanged&&(u=f("---destpub-clear-dextp---"),this.regionChanged=!1),this.messages.length?K.POST_MESSAGE_ENABLED?(i=u+f("---destpub-combined---")+this.messages.join("%01"),this.postMessage(i),this.messages=[],this.sendingMessages=!1):(i=this.messages.shift(),this.postMessage(u+i),setTimeout(function(){c.sendMessages()},this.messageSendingInterval)):this.sendingMessages=!1},postMessage:function(i){Ke.postMessage(i,this.url,this.iframe.contentWindow),this.messagesPosted.push(i)},receiveMessage:function(i){var c,u=/^---destpub-to-parent---/;typeof i=="string"&&u.test(i)&&(c=i.replace(u,"").split("|"),c[0]==="canSetThirdPartyCookies"&&(this.canSetThirdPartyCookies=c[1]==="true",this.receivedThirdPartyCookiesNotification=!0,this.requestToProcess()),this.messagesReceived.push(i))},processIDCallData:function(i){(this.url==null||i.subdomain&&this.subdomain==="nosubdomainreturned")&&(typeof t._subdomain=="string"&&t._subdomain.length?this.subdomain=t._subdomain:this.subdomain=i.subdomain||"",this.url=this.getUrl()),i.ibs instanceof Array&&i.ibs.length&&(this.doAttachIframe=!0),this.readyToAttachIframe()&&(t.idSyncAttachIframeOnWindowLoad?(r.windowLoaded||a.readyState==="complete"||a.readyState==="loaded")&&this.attachIframe():this.attachIframeASAP()),typeof t.idSyncIDCallResult=="function"?t.idSyncIDCallResult(i):this.requestToProcess(i),typeof t.idSyncAfterIDCallResult=="function"&&t.idSyncAfterIDCallResult(i)},canMakeSyncIDCall:function(i,c){return t._forceSyncIDCall||!i||c-i>K.DAYS_BETWEEN_SYNC_ID_CALLS},attachIframeASAP:function(){function i(){c.startedAttachingIframe||(a.body?c.attachIframe():setTimeout(i,30))}var c=this;i()}}},Et={audienceManagerServer:{},audienceManagerServerSecure:{},cookieDomain:{},cookieLifetime:{},cookieName:{},doesOptInApply:{},disableThirdPartyCalls:{},discardTrackingServerECID:{},idSyncAfterIDCallResult:{},idSyncAttachIframeOnWindowLoad:{},idSyncContainerID:{},idSyncDisable3rdPartySyncing:{},disableThirdPartyCookies:{},idSyncDisableSyncs:{},disableIdSyncs:{},idSyncIDCallResult:{},idSyncSSLUseAkamai:{},isCoopSafe:{},isIabContext:{},isOptInStorageEnabled:{},loadSSL:{},loadTimeout:{},marketingCloudServer:{},marketingCloudServerSecure:{},optInCookieDomain:{},optInStorageExpiry:{},overwriteCrossDomainMCIDAndAID:{},preOptInApprovals:{},previousPermissions:{},resetBeforeVersion:{},sdidParamExpiry:{},serverState:{},sessionCookieName:{},secureCookie:{},takeTimeoutMetrics:{},trackingServer:{},trackingServerSecure:{},whitelistIframeDomains:{},whitelistParentDomain:{}},Dt={getConfigNames:function(){return Object.keys(Et)},getConfigs:function(){return Et},normalizeConfig:function(t){return typeof t!="function"?t:t()}},$n=function(t){var r={};return t.on=function(a,i,c){if(!i||typeof i!="function")throw new Error("[ON] Callback should be a function.");r.hasOwnProperty(a)||(r[a]=[]);var u=r[a].push({callback:i,context:c})-1;return function(){r[a].splice(u,1),r[a].length||delete r[a]}},t.off=function(a,i){r.hasOwnProperty(a)&&(r[a]=r[a].filter(function(c){if(c.callback!==i)return c}))},t.publish=function(a){if(r.hasOwnProperty(a)){var i=[].slice.call(arguments,1);r[a].slice(0).forEach(function(c){c.callback.apply(c.context,i)})}},t.publish},ge={PENDING:"pending",CHANGED:"changed",COMPLETE:"complete"},ye={AAM:"aam",ADCLOUD:"adcloud",ANALYTICS:"aa",CAMPAIGN:"campaign",ECID:"ecid",LIVEFYRE:"livefyre",TARGET:"target",MEDIA_ANALYTICS:"mediaaa"},Xe=(Pe={},d(Pe,ye.AAM,565),d(Pe,ye.ECID,565),Pe),qn=(Re={},d(Re,ye.AAM,[1,2,5]),d(Re,ye.ECID,[1,2,5]),Re),Ne=(function(t){return Object.keys(t).map(function(r){return t[r]})})(ye),Tt=function(){var t={};return t.callbacks=Object.create(null),t.add=function(r,a){if(!Ce(a))throw new Error("[callbackRegistryFactory] Make sure callback is a function or an array of functions.");t.callbacks[r]=t.callbacks[r]||[];var i=t.callbacks[r].push(a)-1;return function(){t.callbacks[r].splice(i,1)}},t.execute=function(r,a){if(t.callbacks[r]){a=a===void 0?[]:a,a=a instanceof Array?a:[a];try{for(;t.callbacks[r].length;){var i=t.callbacks[r].shift();typeof i=="function"?i.apply(null,a):i instanceof Array&&i[1].apply(i[0],a)}delete t.callbacks[r]}catch{}}},t.executeAll=function(r,a){(a||r&&!te(r))&&Object.keys(t.callbacks).forEach(function(i){var c=r[i]!==void 0?r[i]:"";t.execute(i,c)},t)},t.hasCallbacks=function(){return!!Object.keys(t.callbacks).length},t},zn=function(){},Jn=function(t){var r=window,a=r.console;return!!a&&typeof a[t]=="function"},$e=function(t,r,a){return a()?function(){if(Jn(t)){for(var i=arguments.length,c=new Array(i),u=0;u<i;u++)c[u]=arguments[u];console[t].apply(console,[r].concat(c))}}:zn},Qn=he,xe=new Qn("[ADOBE OPT-IN]"),Ve=function(t,r){return o(t)===r},qe=function(t,r){return t instanceof Array?t:Ve(t,"string")?[t]:r||[]},Zn=function(t){var r=Object.keys(t);return!!r.length&&r.every(function(a){return t[a]===!0})},ze=function(t){return!(!t||ti(t))&&qe(t).every(function(r){return Ne.indexOf(r)>-1})},bt=function(t,r){return t.reduce(function(a,i){return a[i]=r,a},{})},ei=function(t){return JSON.parse(JSON.stringify(t))},ti=function(t){return Object.prototype.toString.call(t)==="[object Array]"&&!t.length},Mt=function(t){if(Ot(t))return t;try{return JSON.parse(t)}catch{return{}}},Je=function(t){return t===void 0||(Ot(t)?ze(Object.keys(t)):ni(t))},ni=function(t){try{var r=JSON.parse(t);return!!t&&Ve(t,"string")&&ze(Object.keys(r))}catch{return!1}},Ot=function(t){return t!==null&&Ve(t,"object")&&Array.isArray(t)===!1},Me=function(){},ii=function(t){return Ve(t,"function")?t():t},wt=function(t,r){Je(t)||xe.error("".concat(r))},ri=function(t){return Object.keys(t).map(function(r){return t[r]})},oi=function(t){return ri(t).filter(function(r,a,i){return i.indexOf(r)===a})},ai=function(t){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=r.command,i=r.params,c=i===void 0?{}:i,u=r.callback,f=u===void 0?Me:u;if(!a||a.indexOf(".")===-1)throw new Error("[OptIn.execute] Please provide a valid command.");try{var h=a.split("."),I=t[h[0]],C=h[1];if(!I||typeof I[C]!="function")throw new Error("Make sure the plugin and API name exist.");var _=Object.assign(c,{callback:f});I[C].call(I,_)}catch(T){xe.error("[execute] Something went wrong: "+T.message)}}};fe.prototype=Object.create(Error.prototype),fe.prototype.constructor=fe;var kt="fetchPermissions",si="[OptIn#registerPlugin] Plugin is invalid.";be.Categories=ye,be.TimeoutError=fe;var Qe=Object.freeze({OptIn:be,IabPlugin:vn}),ci=function(t,r){t.publishDestinations=function(a){var i=arguments[1],c=arguments[2];try{c=typeof c=="function"?c:a.callback}catch{c=function(){}}var u=r;if(!u.readyToAttachIframePreliminary())return void c({error:"The destination publishing iframe is disabled in the Visitor library."});if(typeof a=="string"){if(!a.length)return void c({error:"subdomain is not a populated string."});if(!(i instanceof Array&&i.length))return void c({error:"messages is not a populated array."});var f=!1;if(i.forEach(function(_){typeof _=="string"&&_.length&&(u.addMessage(_),f=!0)}),!f)return void c({error:"None of the messages are populated strings."})}else{if(!x.isObject(a))return void c({error:"Invalid parameters passed."});var h=a;if(typeof(a=h.subdomain)!="string"||!a.length)return void c({error:"config.subdomain is not a populated string."});var I=h.urlDestinations;if(!(I instanceof Array&&I.length))return void c({error:"config.urlDestinations is not a populated array."});var C=[];I.forEach(function(_){x.isObject(_)&&(_.hideReferrer?_.message&&u.addMessage(_.message):C.push(_))}),(function _(){C.length&&setTimeout(function(){var T=new Image,M=C.shift();T.src=M.url,u.onPageDestinationsFired.push(M),_()},100)})()}u.iframe?(c({message:"The destination publishing iframe is already attached and loaded."}),u.requestToProcess()):!t.subdomain&&t._getField("MCMID")?(u.subdomain=a,u.doAttachIframe=!0,u.url=u.getUrl(),u.readyToAttachIframe()?(u.iframeLoadedCallbacks.push(function(_){c({message:"Attempted to attach and load the destination publishing iframe through this API call. Result: "+(_.message||"no result")})}),u.attachIframe()):c({error:"Encountered a problem in attempting to attach and load the destination publishing iframe through this API call."})):u.iframeLoadedCallbacks.push(function(_){c({message:"Attempted to attach and load the destination publishing iframe through normal Visitor API processing. Result: "+(_.message||"no result")})})}},li=function t(r){function a(ne,z){return ne>>>z|ne<<32-z}for(var i,c,u=Math.pow,f=u(2,32),h="",I=[],C=8*r.length,_=t.h=t.h||[],T=t.k=t.k||[],M=T.length,A={},e=2;M<64;e++)if(!A[e]){for(i=0;i<313;i+=e)A[i]=e;_[M]=u(e,.5)*f|0,T[M++]=u(e,1/3)*f|0}for(r+="\x80";r.length%64-56;)r+="\0";for(i=0;i<r.length;i++){if((c=r.charCodeAt(i))>>8)return;I[i>>2]|=c<<(3-i)%4*8}for(I[I.length]=C/f|0,I[I.length]=C,c=0;c<I.length;){var v=I.slice(c,c+=16),j=_;for(_=_.slice(0,8),i=0;i<64;i++){var R=v[i-15],H=v[i-2],Y=_[0],X=_[4],q=_[7]+(a(X,6)^a(X,11)^a(X,25))+(X&_[5]^~X&_[6])+T[i]+(v[i]=i<16?v[i]:v[i-16]+(a(R,7)^a(R,18)^R>>>3)+v[i-7]+(a(H,17)^a(H,19)^H>>>10)|0);_=[q+((a(Y,2)^a(Y,13)^a(Y,22))+(Y&_[1]^Y&_[2]^_[1]&_[2]))|0].concat(_),_[4]=_[4]+q|0}for(i=0;i<8;i++)_[i]=_[i]+j[i]|0}for(i=0;i<8;i++)for(c=3;c+1;c--){var G=_[i]>>8*c&255;h+=(G<16?0:"")+G.toString(16)}return h},Pt=function(t,r){return r!=="SHA-256"&&r!=="SHA256"&&r!=="sha256"&&r!=="sha-256"||(t=li(t)),t},Rt=function(t){return String(t).trim().toLowerCase()},di=Qe.OptIn;x.defineGlobalNamespace(),window.adobe.OptInCategories=di.Categories;var Ze=function(t,r,a){function i(n){var s=n;return function(l){var g=l||Y.location.href;try{var S=e._extractParamFromUri(g,s);if(S)return W.parsePipeDelimetedKeyValues(S)}catch{}}}function c(n){function s(l,g,S){l&&l.match(K.VALID_VISITOR_ID_REGEX)&&(S===G&&(H=!0),g(l))}s(n[G],e.setMarketingCloudVisitorID,G),e._setFieldExpire(O,-1),s(n[B],e.setAnalyticsVisitorID)}function u(n){n=n||{},e._supplementalDataIDCurrent=n.supplementalDataIDCurrent||"",e._supplementalDataIDCurrentConsumed=n.supplementalDataIDCurrentConsumed||{},e._supplementalDataIDLast=n.supplementalDataIDLast||"",e._supplementalDataIDLastConsumed=n.supplementalDataIDLastConsumed||{}}function f(n){function s(S,E,D){return D=D&&(D+="|"),D+=S+"="+encodeURIComponent(E)}function l(S,E){var D=E[0],N=E[1];return N!=null&&N!==V&&(S=s(D,N,S)),S}var g=n.reduce(l,"");return(function(S){var E=W.getTimestampInSeconds();return S=S&&(S+="|"),S+="TS="+E})(g)}function h(n){var s=n.minutesToLive,l="";return(e.idSyncDisableSyncs||e.disableIdSyncs)&&(l=l||"Error: id syncs have been disabled"),typeof n.dpid=="string"&&n.dpid.length||(l=l||"Error: config.dpid is empty"),typeof n.url=="string"&&n.url.length||(l=l||"Error: config.url is empty"),s===void 0?s=20160:(s=parseInt(s,10),(isNaN(s)||s<=0)&&(l=l||"Error: config.minutesToLive needs to be a positive number")),{error:l,ttl:s}}function I(){return!!e.configs.doesOptInApply&&!(v.optIn.isComplete&&C())}function C(){return e.configs.doesOptInApply&&e.configs.isIabContext?v.optIn.isApproved(v.optIn.Categories.ECID)&&R:v.optIn.isApproved(v.optIn.Categories.ECID)}function _(){[["getMarketingCloudVisitorID"],["setCustomerIDs",void 0],["getAnalyticsVisitorID"],["getAudienceManagerLocationHint"],["getLocationHint"],["getAudienceManagerBlob"]].forEach(function(n){var s=n[0],l=n.length===2?n[1]:"",g=e[s];e[s]=function(S){return C()&&e.isAllowed()?g.apply(e,arguments):(typeof S=="function"&&e._callCallback(S,[l]),l)}})}function T(n,s){if(R=!0,n)throw new Error("[IAB plugin] : "+n);s.gdprApplies&&(j=s.consentString),e.init(),A()}function M(){v.optIn.isComplete&&(v.optIn.isApproved(v.optIn.Categories.ECID)?e.configs.isIabContext?v.optIn.execute({command:"iabPlugin.fetchConsentData",callback:T}):(e.init(),A()):(_(),A()))}function A(){v.optIn.off("complete",M)}if(!a||a.split("").reverse().join("")!==t)throw new Error("Please use `Visitor.getInstance` to instantiate Visitor.");var e=this,v=window.adobe,j="",R=!1,H=!1;e.version="4.6.0";var Y=w,X=Y.Visitor;X.version=e.version,X.AuthState=Z.AUTH_STATE,X.OptOut=Z.OPT_OUT,Y.s_c_in||(Y.s_c_il=[],Y.s_c_in=0),e._c="Visitor",e._il=Y.s_c_il,e._in=Y.s_c_in,e._il[e._in]=e,Y.s_c_in++,e._instanceType="regular",e._log={requests:[]},e.marketingCloudOrgID=t,e.cookieName="AMCV_"+t,e.sessionCookieName="AMCVS_"+t,e.cookieDomain=St(),e.loadSSL=!0,e.loadTimeout=3e4,e.CORSErrors=[],e.marketingCloudServer=e.audienceManagerServer="dpm.demdex.net",e.sdidParamExpiry=30;var q=null,G="MCMID",ne="MCIDTS",z="A",B="MCAID",ie="AAM",O="MCAAMB",V="NONE",J=function(n){return!Object.prototype[n]},pe=Kn(e);e.FIELDS=Z.FIELDS,e.cookieRead=function(n){return Ae.get(n)},e.cookieWrite=function(n,s,l){var g=e.cookieLifetime?(""+e.cookieLifetime).toUpperCase():"",S=!1;return e.configs&&e.configs.secureCookie&&location.protocol==="https:"&&(S=!0),Ae.set(n,""+s,{expires:l,domain:e.cookieDomain,cookieLifetime:g,secure:S})},e.resetState=function(n){n?e._mergeServerState(n):u()},e._isAllowedDone=!1,e._isAllowedFlag=!1,e.isAllowed=function(){return e._isAllowedDone||(e._isAllowedDone=!0,(e.cookieRead(e.cookieName)||e.cookieWrite(e.cookieName,"T",1))&&(e._isAllowedFlag=!0)),e.cookieRead(e.cookieName)==="T"&&e._helpers.removeCookie(e.cookieName),e._isAllowedFlag},e.setMarketingCloudVisitorID=function(n){e._setMarketingCloudFields(n)},e._use1stPartyMarketingCloudServer=!1,e.getMarketingCloudVisitorID=function(n,s){e.marketingCloudServer&&e.marketingCloudServer.indexOf(".demdex.net")<0&&(e._use1stPartyMarketingCloudServer=!0);var l=e._getAudienceManagerURLData("_setMarketingCloudFields"),g=l.url;return e._getRemoteField(G,g,n,s,l)};var pi=function(n,s){var l={};e.getMarketingCloudVisitorID(function(){s.forEach(function(g){l[g]=e._getField(g,!0)}),s.indexOf("MCOPTOUT")!==-1?e.isOptedOut(function(g){l.MCOPTOUT=g,n(l)},null,!0):n(l)},!0)};e.getVisitorValues=function(n,s){var l={MCMID:{fn:e.getMarketingCloudVisitorID,args:[!0],context:e},MCOPTOUT:{fn:e.isOptedOut,args:[void 0,!0],context:e},MCAID:{fn:e.getAnalyticsVisitorID,args:[!0],context:e},MCAAMLH:{fn:e.getAudienceManagerLocationHint,args:[!0],context:e},MCAAMB:{fn:e.getAudienceManagerBlob,args:[!0],context:e}},g=s&&s.length?x.pluck(l,s):l;s&&s.indexOf("MCAID")===-1?pi(n,s):Wn(g,n)},e._currentCustomerIDs={},e._customerIDsHashChanged=!1,e._newCustomerIDsHash="",e.setCustomerIDs=function(n,s){function l(){e._customerIDsHashChanged=!1}if(!e.isOptedOut()&&n){if(!x.isObject(n)||x.isObjectEmpty(n))return!1;e._readVisitor();var g,S,E;for(g in n)if(J(g)&&(S=n[g],s=S.hasOwnProperty("hashType")?S.hashType:s,S))if(o(S)==="object"){var D={};if(S.id){if(s){if(!(E=Pt(Rt(S.id),s)))return;S.id=E,D.hashType=s}D.id=S.id}S.authState!=null&&(D.authState=S.authState),e._currentCustomerIDs[g]=D}else if(s){if(!(E=Pt(Rt(S),s)))return;e._currentCustomerIDs[g]={id:E,hashType:s}}else e._currentCustomerIDs[g]={id:S};var N=e.getCustomerIDs(),b=e._getField("MCCIDH"),$="";b||(b=0);for(g in N)J(g)&&(S=N[g],$+=($?"|":"")+g+"|"+(S.id?S.id:"")+(S.authState?S.authState:""));e._newCustomerIDsHash=String(e._hash($)),e._newCustomerIDsHash!==b&&(e._customerIDsHashChanged=!0,e._mapCustomerIDs(l))}},e.getCustomerIDs=function(){e._readVisitor();var n,s,l={};for(n in e._currentCustomerIDs)J(n)&&(s=e._currentCustomerIDs[n],s.id&&(l[n]||(l[n]={}),l[n].id=s.id,s.authState!=null?l[n].authState=s.authState:l[n].authState=X.AuthState.UNKNOWN,s.hashType&&(l[n].hashType=s.hashType)));return l},e.setAnalyticsVisitorID=function(n){e._setAnalyticsFields(n)},e.getAnalyticsVisitorID=function(n,s,l){if(!W.isTrackingServerPopulated()&&!l)return e._callCallback(n,[""]),"";var g="";if(l||(g=e.getMarketingCloudVisitorID(function(se){e.getAnalyticsVisitorID(n,!0)})),g||l){var S=l?e.marketingCloudServer:e.trackingServer,E="";e.loadSSL&&(l?e.marketingCloudServerSecure&&(S=e.marketingCloudServerSecure):e.trackingServerSecure&&(S=e.trackingServerSecure));var D={};if(S){var N="http"+(e.loadSSL?"s":"")+"://"+S+"/id",b="d_visid_ver="+e.version+"&mcorgid="+encodeURIComponent(e.marketingCloudOrgID)+(g?"&mid="+encodeURIComponent(g):"")+(e.idSyncDisable3rdPartySyncing||e.disableThirdPartyCookies?"&d_coppa=true":""),$=["s_c_il",e._in,"_set"+(l?"MarketingCloud":"Analytics")+"Fields"];E=N+"?"+b+"&callback=s_c_il%5B"+e._in+"%5D._set"+(l?"MarketingCloud":"Analytics")+"Fields",D.corsUrl=N+"?"+b,D.callback=$}return D.url=E,e._getRemoteField(l?G:B,E,n,s,D)}return""},e.getAudienceManagerLocationHint=function(n,s){if(e.getMarketingCloudVisitorID(function(E){e.getAudienceManagerLocationHint(n,!0)})){var l=e._getField(B);if(!l&&W.isTrackingServerPopulated()&&(l=e.getAnalyticsVisitorID(function(E){e.getAudienceManagerLocationHint(n,!0)})),l||!W.isTrackingServerPopulated()){var g=e._getAudienceManagerURLData(),S=g.url;return e._getRemoteField("MCAAMLH",S,n,s,g)}}return""},e.getLocationHint=e.getAudienceManagerLocationHint,e.getAudienceManagerBlob=function(n,s){if(e.getMarketingCloudVisitorID(function(E){e.getAudienceManagerBlob(n,!0)})){var l=e._getField(B);if(!l&&W.isTrackingServerPopulated()&&(l=e.getAnalyticsVisitorID(function(E){e.getAudienceManagerBlob(n,!0)})),l||!W.isTrackingServerPopulated()){var g=e._getAudienceManagerURLData(),S=g.url;return e._customerIDsHashChanged&&e._setFieldExpire(O,-1),e._getRemoteField(O,S,n,s,g)}}return""},e._supplementalDataIDCurrent="",e._supplementalDataIDCurrentConsumed={},e._supplementalDataIDLast="",e._supplementalDataIDLastConsumed={},e.getSupplementalDataID=function(n,s){e._supplementalDataIDCurrent||s||(e._supplementalDataIDCurrent=e._generateID(1));var l=e._supplementalDataIDCurrent;return e._supplementalDataIDLast&&!e._supplementalDataIDLastConsumed[n]?(l=e._supplementalDataIDLast,e._supplementalDataIDLastConsumed[n]=!0):l&&(e._supplementalDataIDCurrentConsumed[n]&&(e._supplementalDataIDLast=e._supplementalDataIDCurrent,e._supplementalDataIDLastConsumed=e._supplementalDataIDCurrentConsumed,e._supplementalDataIDCurrent=l=s?"":e._generateID(1),e._supplementalDataIDCurrentConsumed={}),l&&(e._supplementalDataIDCurrentConsumed[n]=!0)),l};var Fe=!1;e._liberatedOptOut=null,e.getOptOut=function(n,s){var l=e._getAudienceManagerURLData("_setMarketingCloudFields"),g=l.url;if(C())return e._getRemoteField("MCOPTOUT",g,n,s,l);if(e._registerCallback("liberatedOptOut",n),e._liberatedOptOut!==null)return e._callAllCallbacks("liberatedOptOut",[e._liberatedOptOut]),Fe=!1,e._liberatedOptOut;if(Fe)return null;Fe=!0;var S="liberatedGetOptOut";return l.corsUrl=l.corsUrl.replace(/dpm\.demdex\.net\/id\?/,"dpm.demdex.net/optOutStatus?"),l.callback=[S],w[S]=function(E){if(E===Object(E)){var D,N,b=x.parseOptOut(E,D,V);D=b.optOut,N=1e3*b.d_ottl,e._liberatedOptOut=D,setTimeout(function(){e._liberatedOptOut=null},N)}e._callAllCallbacks("liberatedOptOut",[D]),Fe=!1},pe.fireCORS(l),null},e.isOptedOut=function(n,s,l){s||(s=X.OptOut.GLOBAL);var g=e.getOptOut(function(S){var E=S===X.OptOut.GLOBAL||S.indexOf(s)>=0;e._callCallback(n,[E])},l);return g?g===X.OptOut.GLOBAL||g.indexOf(s)>=0:null},e._fields=null,e._fieldsExpired=null,e._hash=function(n){var s,l,g=0;if(n)for(s=0;s<n.length;s++)l=n.charCodeAt(s),g=(g<<5)-g+l,g&=g;return g},e._generateID=Yn,e._generateLocalMID=function(){var n=e._generateID(0);return ae.isClientSideMarketingCloudVisitorID=!0,n},e._callbackList=null,e._callCallback=function(n,s){try{typeof n=="function"?n.apply(Y,s):n[1].apply(n[0],s)}catch{}},e._registerCallback=function(n,s){s&&(e._callbackList==null&&(e._callbackList={}),e._callbackList[n]==null&&(e._callbackList[n]=[]),e._callbackList[n].push(s))},e._callAllCallbacks=function(n,s){if(e._callbackList!=null){var l=e._callbackList[n];if(l)for(;l.length>0;)e._callCallback(l.shift(),s)}},e._addQuerystringParam=function(n,s,l,g){var S=encodeURIComponent(s)+"="+encodeURIComponent(l),E=W.parseHash(n),D=W.hashlessUrl(n);if(D.indexOf("?")===-1)return D+"?"+S+E;var N=D.split("?"),b=N[0]+"?",$=N[1];return b+W.addQueryParamAtLocation($,S,g)+E},e._extractParamFromUri=function(n,s){var l=new RegExp("[\\?&#]"+s+"=([^&#]*)"),g=l.exec(n);if(g&&g.length)return decodeURIComponent(g[1])},e._parseAdobeMcFromUrl=i(K.ADOBE_MC),e._parseAdobeMcSdidFromUrl=i(K.ADOBE_MC_SDID),e._attemptToPopulateSdidFromUrl=function(n){var s=e._parseAdobeMcSdidFromUrl(n),l=1e9;s&&s.TS&&(l=W.getTimestampInSeconds()-s.TS),s&&s.SDID&&s.MCORGID===t&&l<e.sdidParamExpiry&&(e._supplementalDataIDCurrent=s.SDID,e._supplementalDataIDCurrentConsumed.SDID_URL_PARAM=!0)},e._attemptToPopulateIdsFromUrl=function(){var n=e._parseAdobeMcFromUrl();if(n&&n.TS){var s=W.getTimestampInSeconds(),l=s-n.TS;if(Math.floor(l/60)>K.ADOBE_MC_TTL_IN_MIN||n.MCORGID!==t)return;c(n)}},e._mergeServerState=function(n){if(n)try{if(n=(function(l){return W.isObject(l)?l:JSON.parse(l)})(n),n[e.marketingCloudOrgID]){var s=n[e.marketingCloudOrgID];(function(l){W.isObject(l)&&e.setCustomerIDs(l)})(s.customerIDs),u(s.sdid)}}catch{throw new Error("`serverState` has an invalid format.")}},e._timeout=null,e._loadData=function(n,s,l,g){s=e._addQuerystringParam(s,"d_fieldgroup",n,1),g.url=e._addQuerystringParam(g.url,"d_fieldgroup",n,1),g.corsUrl=e._addQuerystringParam(g.corsUrl,"d_fieldgroup",n,1),ae.fieldGroupObj[n]=!0,g===Object(g)&&g.corsUrl&&pe.corsMetadata.corsType==="XMLHttpRequest"&&pe.fireCORS(g,l,n)},e._clearTimeout=function(n){e._timeout!=null&&e._timeout[n]&&(clearTimeout(e._timeout[n]),e._timeout[n]=0)},e._settingsDigest=0,e._getSettingsDigest=function(){if(!e._settingsDigest){var n=e.version;e.audienceManagerServer&&(n+="|"+e.audienceManagerServer),e.audienceManagerServerSecure&&(n+="|"+e.audienceManagerServerSecure),e._settingsDigest=e._hash(n)}return e._settingsDigest},e._readVisitorDone=!1,e._readVisitor=function(){if(!e._readVisitorDone){e._readVisitorDone=!0;var n,s,l,g,S,E,D=e._getSettingsDigest(),N=!1,b=e.cookieRead(e.cookieName),$=new Date;if(b||H||e.discardTrackingServerECID||(b=e.cookieRead(K.FIRST_PARTY_SERVER_COOKIE)),e._fields==null&&(e._fields={}),b&&b!=="T")for(b=b.split("|"),b[0].match(/^[\-0-9]+$/)&&(parseInt(b[0],10)!==D&&(N=!0),b.shift()),b.length%2==1&&b.pop(),n=0;n<b.length;n+=2)s=b[n].split("-"),l=s[0],g=b[n+1],s.length>1?(S=parseInt(s[1],10),E=s[1].indexOf("s")>0):(S=0,E=!1),N&&(l==="MCCIDH"&&(g=""),S>0&&(S=$.getTime()/1e3-60)),l&&g&&(e._setField(l,g,1),S>0&&(e._fields["expire"+l]=S+(E?"s":""),($.getTime()>=1e3*S||E&&!e.cookieRead(e.sessionCookieName))&&(e._fieldsExpired||(e._fieldsExpired={}),e._fieldsExpired[l]=!0)));!e._getField(B)&&W.isTrackingServerPopulated()&&(b=e.cookieRead("s_vi"))&&(b=b.split("|"),b.length>1&&b[0].indexOf("v1")>=0&&(g=b[1],n=g.indexOf("["),n>=0&&(g=g.substring(0,n)),g&&g.match(K.VALID_VISITOR_ID_REGEX)&&e._setField(B,g)))}},e._appendVersionTo=function(n){var s="vVersion|"+e.version,l=n?e._getCookieVersion(n):null;return l?At.areVersionsDifferent(l,e.version)&&(n=n.replace(K.VERSION_REGEX,s)):n+=(n?"|":"")+s,n},e._writeVisitor=function(){var n,s,l=e._getSettingsDigest();for(n in e._fields)J(n)&&e._fields[n]&&n.substring(0,6)!=="expire"&&(s=e._fields[n],l+=(l?"|":"")+n+(e._fields["expire"+n]?"-"+e._fields["expire"+n]:"")+"|"+s);l=e._appendVersionTo(l),e.cookieWrite(e.cookieName,l,1)},e._getField=function(n,s){return e._fields==null||!s&&e._fieldsExpired&&e._fieldsExpired[n]?null:e._fields[n]},e._setField=function(n,s,l){e._fields==null&&(e._fields={}),e._fields[n]=s,l||e._writeVisitor()},e._getFieldList=function(n,s){var l=e._getField(n,s);return l?l.split("*"):null},e._setFieldList=function(n,s,l){e._setField(n,s?s.join("*"):"",l)},e._getFieldMap=function(n,s){var l=e._getFieldList(n,s);if(l){var g,S={};for(g=0;g<l.length;g+=2)S[l[g]]=l[g+1];return S}return null},e._setFieldMap=function(n,s,l){var g,S=null;if(s){S=[];for(g in s)J(g)&&(S.push(g),S.push(s[g]))}e._setFieldList(n,S,l)},e._setFieldExpire=function(n,s,l){var g=new Date;g.setTime(g.getTime()+1e3*s),e._fields==null&&(e._fields={}),e._fields["expire"+n]=Math.floor(g.getTime()/1e3)+(l?"s":""),s<0?(e._fieldsExpired||(e._fieldsExpired={}),e._fieldsExpired[n]=!0):e._fieldsExpired&&(e._fieldsExpired[n]=!1),l&&(e.cookieRead(e.sessionCookieName)||e.cookieWrite(e.sessionCookieName,"1"))},e._findVisitorID=function(n){return n&&(o(n)==="object"&&(n=n.d_mid?n.d_mid:n.visitorID?n.visitorID:n.id?n.id:n.uuid?n.uuid:""+n),n&&(n=n.toUpperCase())==="NOTARGET"&&(n=V),n&&(n===V||n.match(K.VALID_VISITOR_ID_REGEX))||(n="")),n},e._setFields=function(n,s){if(e._clearTimeout(n),e._loading!=null&&(e._loading[n]=!1),ae.fieldGroupObj[n]&&ae.setState(n,!1),n==="MC"){ae.isClientSideMarketingCloudVisitorID!==!0&&(ae.isClientSideMarketingCloudVisitorID=!1);var l=e._getField(G);if(!l||e.overwriteCrossDomainMCIDAndAID){if(!(l=o(s)==="object"&&s.mid?s.mid:e._findVisitorID(s))){if(e._use1stPartyMarketingCloudServer&&!e.tried1stPartyMarketingCloudServer)return e.tried1stPartyMarketingCloudServer=!0,void e.getAnalyticsVisitorID(null,!1,!0);l=e._generateLocalMID()}e._setField(G,l)}l&&l!==V||(l=""),o(s)==="object"&&((s.d_region||s.dcs_region||s.d_blob||s.blob)&&e._setFields(ie,s),e._use1stPartyMarketingCloudServer&&s.mid&&e._setFields(z,{id:s.id})),e._callAllCallbacks(G,[l])}if(n===ie&&o(s)==="object"){var g=604800;s.id_sync_ttl!=null&&s.id_sync_ttl&&(g=parseInt(s.id_sync_ttl,10));var S=re.getRegionAndCheckIfChanged(s,g);e._callAllCallbacks("MCAAMLH",[S]);var E=e._getField(O);(s.d_blob||s.blob)&&(E=s.d_blob,E||(E=s.blob),e._setFieldExpire(O,g),e._setField(O,E)),E||(E=""),e._callAllCallbacks(O,[E]),!s.error_msg&&e._newCustomerIDsHash&&e._setField("MCCIDH",e._newCustomerIDsHash)}if(n===z){var D=e._getField(B);D&&!e.overwriteCrossDomainMCIDAndAID||(D=e._findVisitorID(s),D?D!==V&&e._setFieldExpire(O,-1):D=V,e._setField(B,D)),D&&D!==V||(D=""),e._callAllCallbacks(B,[D])}if(e.idSyncDisableSyncs||e.disableIdSyncs)re.idCallNotProcesssed=!0;else{re.idCallNotProcesssed=!1;var N={};N.ibs=s.ibs,N.subdomain=s.subdomain,re.processIDCallData(N)}if(s===Object(s)){var b,$;C()&&e.isAllowed()&&(b=e._getField("MCOPTOUT"));var se=x.parseOptOut(s,b,V);b=se.optOut,$=se.d_ottl,e._setFieldExpire("MCOPTOUT",$,!0),e._setField("MCOPTOUT",b),e._callAllCallbacks("MCOPTOUT",[b])}},e._loading=null,e._getRemoteField=function(n,s,l,g,S){var E,D="",N=W.isFirstPartyAnalyticsVisitorIDCall(n),b={MCAAMLH:!0,MCAAMB:!0};if(C()&&e.isAllowed())if(e._readVisitor(),D=e._getField(n,b[n]===!0),(function(){return(!D||e._fieldsExpired&&e._fieldsExpired[n])&&(!e.disableThirdPartyCalls||N)})()){if(n===G||n==="MCOPTOUT"?E="MC":n==="MCAAMLH"||n===O?E=ie:n===B&&(E=z),E)return!s||e._loading!=null&&e._loading[E]||(e._loading==null&&(e._loading={}),e._loading[E]=!0,e._loadData(E,s,function($){if(!e._getField(n)){$&&ae.setState(E,!0);var se="";n===G?se=e._generateLocalMID():E===ie&&(se={error_msg:"timeout"}),e._setFields(E,se)}},S)),e._registerCallback(n,l),D||(s||e._setFields(E,{id:V}),"")}else D||(n===G?(e._registerCallback(n,l),D=e._generateLocalMID(),e.setMarketingCloudVisitorID(D)):n===B?(e._registerCallback(n,l),D="",e.setAnalyticsVisitorID(D)):(D="",g=!0));return n!==G&&n!==B||D!==V||(D="",g=!0),l&&g&&e._callCallback(l,[D]),D},e._setMarketingCloudFields=function(n){e._readVisitor(),e._setFields("MC",n)},e._mapCustomerIDs=function(n){e.getAudienceManagerBlob(n,!0)},e._setAnalyticsFields=function(n){e._readVisitor(),e._setFields(z,n)},e._setAudienceManagerFields=function(n){e._readVisitor(),e._setFields(ie,n)},e._getAudienceManagerURLData=function(n){var s=e.audienceManagerServer,l="",g=e._getField(G),S=e._getField(O,!0),E=e._getField(B),D=E&&E!==V?"&d_cid_ic=AVID%01"+encodeURIComponent(E):"";if(e.loadSSL&&e.audienceManagerServerSecure&&(s=e.audienceManagerServerSecure),s){var N,b,$=e.getCustomerIDs();if($)for(N in $)J(N)&&(b=$[N],D+="&d_cid_ic="+encodeURIComponent(N)+"%01"+encodeURIComponent(b.id?b.id:"")+(b.authState?"%01"+b.authState:""));n||(n="_setAudienceManagerFields");var se="http"+(e.loadSSL?"s":"")+"://"+s+"/id",Nt="d_visid_ver="+e.version+(j&&se.indexOf("demdex.net")!==-1?"&gdpr=1&gdpr_force=1&gdpr_consent="+j:"")+"&d_rtbd=json&d_ver=2"+(!g&&e._use1stPartyMarketingCloudServer?"&d_verify=1":"")+"&d_orgid="+encodeURIComponent(e.marketingCloudOrgID)+"&d_nsid="+(e.idSyncContainerID||0)+(g?"&d_mid="+encodeURIComponent(g):"")+(e.idSyncDisable3rdPartySyncing||e.disableThirdPartyCookies?"&d_coppa=true":"")+(q===!0?"&d_coop_safe=1":q===!1?"&d_coop_unsafe=1":"")+(S?"&d_blob="+encodeURIComponent(S):"")+D,mi=["s_c_il",e._in,n];return l=se+"?"+Nt+"&d_cb=s_c_il%5B"+e._in+"%5D."+n,{url:l,corsUrl:se+"?"+Nt,callback:mi}}return{url:l}},e.appendVisitorIDsTo=function(n){try{var s=[[G,e._getField(G)],[B,e._getField(B)],["MCORGID",e.marketingCloudOrgID]];return e._addQuerystringParam(n,K.ADOBE_MC,f(s))}catch{return n}},e.appendSupplementalDataIDTo=function(n,s){if(!(s=s||e.getSupplementalDataID(W.generateRandomString(),!0)))return n;try{var l=f([["SDID",s],["MCORGID",e.marketingCloudOrgID]]);return e._addQuerystringParam(n,K.ADOBE_MC_SDID,l)}catch{return n}};var W={parseHash:function(n){var s=n.indexOf("#");return s>0?n.substr(s):""},hashlessUrl:function(n){var s=n.indexOf("#");return s>0?n.substr(0,s):n},addQueryParamAtLocation:function(n,s,l){var g=n.split("&");return l=l??g.length,g.splice(l,0,s),g.join("&")},isFirstPartyAnalyticsVisitorIDCall:function(n,s,l){if(n!==B)return!1;var g;return s||(s=e.trackingServer),l||(l=e.trackingServerSecure),!(typeof(g=e.loadSSL?l:s)!="string"||!g.length)&&g.indexOf("2o7.net")<0&&g.indexOf("omtrdc.net")<0},isObject:function(n){return!!(n&&n===Object(n))},removeCookie:function(n){Ae.remove(n,{domain:e.cookieDomain})},isTrackingServerPopulated:function(){return!!e.trackingServer||!!e.trackingServerSecure},getTimestampInSeconds:function(){return Math.round(new Date().getTime()/1e3)},parsePipeDelimetedKeyValues:function(n){return n.split("|").reduce(function(s,l){var g=l.split("=");return s[g[0]]=decodeURIComponent(g[1]),s},{})},generateRandomString:function(n){n=n||5;for(var s="",l="abcdefghijklmnopqrstuvwxyz0123456789";n--;)s+=l[Math.floor(Math.random()*l.length)];return s},normalizeBoolean:function(n){return n==="true"||n!=="false"&&n},parseBoolean:function(n){return n==="true"||n!=="false"&&null},replaceMethodsWithFunction:function(n,s){for(var l in n)n.hasOwnProperty(l)&&typeof n[l]=="function"&&(n[l]=s);return n}};e._helpers=W;var re=Xn(e,X);e._destinationPublishing=re,e.timeoutMetricsLog=[];var ae={isClientSideMarketingCloudVisitorID:null,MCIDCallTimedOut:null,AnalyticsIDCallTimedOut:null,AAMIDCallTimedOut:null,fieldGroupObj:{},setState:function(n,s){switch(n){case"MC":s===!1?this.MCIDCallTimedOut!==!0&&(this.MCIDCallTimedOut=!1):this.MCIDCallTimedOut=s;break;case z:s===!1?this.AnalyticsIDCallTimedOut!==!0&&(this.AnalyticsIDCallTimedOut=!1):this.AnalyticsIDCallTimedOut=s;break;case ie:s===!1?this.AAMIDCallTimedOut!==!0&&(this.AAMIDCallTimedOut=!1):this.AAMIDCallTimedOut=s}}};e.isClientSideMarketingCloudVisitorID=function(){return ae.isClientSideMarketingCloudVisitorID},e.MCIDCallTimedOut=function(){return ae.MCIDCallTimedOut},e.AnalyticsIDCallTimedOut=function(){return ae.AnalyticsIDCallTimedOut},e.AAMIDCallTimedOut=function(){return ae.AAMIDCallTimedOut},e.idSyncGetOnPageSyncInfo=function(){return e._readVisitor(),e._getField("MCSYNCSOP")},e.idSyncByURL=function(n){if(!e.isOptedOut()){var s=h(n||{});if(s.error)return s.error;var l,g,S=n.url,E=encodeURIComponent,D=re;return S=S.replace(/^https:/,"").replace(/^http:/,""),l=x.encodeAndBuildRequest(["",n.dpid,n.dpuuid||""],","),g=["ibs",E(n.dpid),"img",E(S),s.ttl,"",l],D.addMessage(g.join("|")),D.requestToProcess(),"Successfully queued"}},e.idSyncByDataSource=function(n){if(!e.isOptedOut())return n===Object(n)&&typeof n.dpuuid=="string"&&n.dpuuid.length?(n.url="//dpm.demdex.net/ibs:dpid="+n.dpid+"&dpuuid="+n.dpuuid,e.idSyncByURL(n)):"Error: config or config.dpuuid is empty"},ci(e,re),e._getCookieVersion=function(n){n=n||e.cookieRead(e.cookieName);var s=K.VERSION_REGEX.exec(n);return s&&s.length>1?s[1]:null},e._resetAmcvCookie=function(n){var s=e._getCookieVersion();s&&!At.isLessThan(s,n)||W.removeCookie(e.cookieName)},e.setAsCoopSafe=function(){q=!0},e.setAsCoopUnsafe=function(){q=!1},(function(){if(e.configs=Object.create(null),W.isObject(r))for(var n in r)J(n)&&(e[n]=r[n],e.configs[n]=r[n])})(),_();var Lt;e.init=function(){I()&&(v.optIn.fetchPermissions(M,!0),!v.optIn.isApproved(v.optIn.Categories.ECID))||Lt||(Lt=!0,(function(){if(W.isObject(r)){e.idSyncContainerID=e.idSyncContainerID||0,q=typeof e.isCoopSafe=="boolean"?e.isCoopSafe:W.parseBoolean(e.isCoopSafe),e.resetBeforeVersion&&e._resetAmcvCookie(e.resetBeforeVersion),e._attemptToPopulateIdsFromUrl(),e._attemptToPopulateSdidFromUrl(),e._readVisitor();var n=e._getField(ne),s=Math.ceil(new Date().getTime()/K.MILLIS_PER_DAY);e.idSyncDisableSyncs||e.disableIdSyncs||!re.canMakeSyncIDCall(n,s)||(e._setFieldExpire(O,-1),e._setField(ne,s)),e.getMarketingCloudVisitorID(),e.getAudienceManagerLocationHint(),e.getAudienceManagerBlob(),e._mergeServerState(e.serverState)}else e._attemptToPopulateIdsFromUrl(),e._attemptToPopulateSdidFromUrl()})(),(function(){if(!e.idSyncDisableSyncs&&!e.disableIdSyncs){re.checkDPIframeSrc();var n=function(){var s=re;s.readyToAttachIframe()&&s.attachIframe()};Y.addEventListener("load",function(){X.windowLoaded=!0,n()});try{Ke.receiveMessage(function(s){re.receiveMessage(s.data)},re.iframeHost)}catch{}}})(),(function(){e.whitelistIframeDomains&&K.POST_MESSAGE_ENABLED&&(e.whitelistIframeDomains=e.whitelistIframeDomains instanceof Array?e.whitelistIframeDomains:[e.whitelistIframeDomains],e.whitelistIframeDomains.forEach(function(n){var s=new ht(t,n),l=Bn(e,s);Ke.receiveMessage(l,n)}))})())}};Ze.config=Dt,w.Visitor=Ze;var ve=Ze,ui=function(t){if(x.isObject(t))return Object.keys(t).filter(function(r){return t[r]!==""}).reduce(function(r,a){var i=Dt.normalizeConfig(t[a]),c=x.normalizeBoolean(i);return r[a]=c,r},Object.create(null))},fi=Qe.OptIn,gi=Qe.IabPlugin;return ve.getInstance=function(t,r){if(!t)throw new Error("Visitor requires Adobe Marketing Cloud Org ID.");t.indexOf("@")<0&&(t+="@AdobeOrg");var a=(function(){var C=w.s_c_il;if(C)for(var _=0;_<C.length;_++){var T=C[_];if(T&&T._c==="Visitor"&&T.marketingCloudOrgID===t)return T}})();if(a)return a;var i=ui(r);(function(C){w.adobe.optIn=w.adobe.optIn||(function(){var _=x.pluck(C,["doesOptInApply","previousPermissions","preOptInApprovals","isOptInStorageEnabled","optInStorageExpiry","isIabContext"]),T=C.optInCookieDomain||C.cookieDomain;T=T||St(),T=T===window.location.hostname?"":T,_.optInCookieDomain=T;var M=new fi(_,{cookies:Ae});if(_.isIabContext&&_.doesOptInApply){var A=new gi(window.__cmp);M.registerPlugin(A)}return M})()})(i||{});var c=t,u=c.split("").reverse().join(""),f=new ve(t,null,u);x.isObject(i)&&i.cookieDomain&&(f.cookieDomain=i.cookieDomain),(function(){w.s_c_il.splice(--w.s_c_in,1)})();var h=x.getIeVersion();if(typeof h=="number"&&h<10)return f._helpers.replaceMethodsWithFunction(f,function(){});var I=(function(){try{return w.self!==w.parent}catch{return!0}})()&&!(function(C){return C.cookieWrite("TEST_AMCV_COOKIE","T",1),C.cookieRead("TEST_AMCV_COOKIE")==="T"&&(C._helpers.removeCookie("TEST_AMCV_COOKIE"),!0)})(f)&&w.parent?new Gn(t,i,f,w.parent):new ve(t,i,u);return f=null,I.init(),I},(function(){function t(){ve.windowLoaded=!0}w.addEventListener?w.addEventListener("load",t):w.attachEvent&&w.attachEvent("onload",t),ve.codeLoadEnd=new Date().getTime()})(),ve})()});var Ee="__mpi",ee=typeof window<"u",Vt=()=>ee?window:void 0;function k(o){let p=Vt()?.[Ee]?.segmentWrapper||{};return o?p[o]:p}var me=(o,d)=>{let p=Vt();if(!p){console.warn("[segment-wrapper] Cannot set config in non-browser environment");return}p[Ee]=p[Ee]||{},p[Ee].segmentWrapper=p[Ee].segmentWrapper||{},p[Ee].segmentWrapper[o]=d};var Oe,et=()=>({ADOBE_ORG_ID:window.__SEGMENT_WRAPPER?.ADOBE_ORG_ID,DEFAULT_DEMDEX_VERSION:window.__SEGMENT_WRAPPER?.DEFAULT_DEMDEX_VERSION??"3.3.0",TIME_BETWEEN_RETRIES:window.__SEGMENT_WRAPPER?.TIME_BETWEEN_RETRIES??15,TIMES_TO_RETRY:window.__SEGMENT_WRAPPER?.TIMES_TO_RETRY??80,SERVERS:{trackingServer:window.__SEGMENT_WRAPPER?.TRACKING_SERVER,trackingServerSecure:window.__SEGMENT_WRAPPER?.TRACKING_SERVER}}),Ut=()=>{let o=et();if(window.Visitor&&o.ADOBE_ORG_ID)return window.Visitor.getInstance(o.ADOBE_ORG_ID,o.SERVERS)},Ei=o=>o?.getMarketingCloudVisitorID(),Gt=()=>{let o=Ut(),d=et(),p=o?.version??d.DEFAULT_DEMDEX_VERSION,{trackingServer:m}=d.SERVERS;return Promise.resolve({trackingServer:m,version:p})},jt=()=>{if(Oe)return Promise.resolve(Oe);let o=et();return new Promise(d=>{function p(m){if(m===0)return d("");let y=Ut();Oe=Ei(y),Oe?d(Oe):window.setTimeout(()=>p(--m),o.TIME_BETWEEN_RETRIES)}p(o.TIMES_TO_RETRY)})},Di=async()=>(await Promise.resolve().then(()=>vi(Ft())),jt()),Ue=async()=>{let o=k("getCustomAdobeVisitorId");return typeof o=="function"?o():k("importAdobeVisitorId")===!0?Di():jt()};var Ht={GA4_INIT_EVENT_SENT:"ga4InitEventSent"};var tt={spaReferrer:"",referrer:""},Ge={getDocumentReferrer:()=>document.referrer,getActualLocation:()=>{let{origin:o,pathname:d}=window.location;return`${o}${d}`},getActualQueryString:()=>{let{search:o}=window.location;return o}},Bt=({isPageTrack:o=!1}={})=>{let{referrer:d,spaReferrer:p}=tt;return(o?d:p)||Ge.getDocumentReferrer()},Ti=()=>{tt.spaReferrer=Bt({isPageTrack:!0}),tt.referrer=Ge.getActualLocation()},Wt=({payload:o,next:d})=>{let{obj:{context:p}}=o,{isPageTrack:m}=p,y=Bt({isPageTrack:m});o.obj.context={...p,page:{...p.page,referrer:y}},m&&Ti(),d(o)};var Yt={clientId:"client_id",sessionId:"session_id"},nt="dataLayer",le={granted:"granted",denied:"denied"},bi=1,Mi=2,we={QUERY:"stc",SPLIT_SYMBOL:"-",CAMPAIGN_SPLIT_SYMBOL:":"},Oi="utm_campaign",wi="utm_medium",ki="utm_source",Pi="utm_content",Ri="utm_id",Li="utm_term",Ni={aff:"affiliate",dis:"display",em:"email",met:"paid-metasearch",sem:"paid-search",rt:"display",sm:"social-media",sp:"paid-social",pn:"push-notification",cs:"cross-sites"},xi="na",Vi="sui",Fi={medium:null,source:null,campaign:null},Ui=async o=>new Promise(function(d,p){let m=document.createElement("script");m.src=o,m.onload=()=>d(),m.onerror=p,document.head.appendChild(m)}),Kt=async()=>{let o=k("googleAnalyticsMeasurementId"),d=k("googleAnalyticsDataLayer")||nt;if(!o)return Promise.resolve(!1);let p=`https://www.googletagmanager.com/gtag/js?id=${o}&l=${d}`;return Ui(p).then(()=>!0)},Gi=o=>{let d=k("googleAnalyticsInitEvent")??Vi,p=`ga_event_${d}_`,m=`${p}${o}`;if(!(typeof window.gtag>"u")){if(!localStorage.getItem(m)&&(window.gtag("event",d),console.log(`Sending GA4 event "${d}" for the session "${o}"`),localStorage.setItem(m,"true"),typeof window.dispatchEvent=="function")){let y=new CustomEvent(Ht.GA4_INIT_EVENT_SENT,{detail:{eventName:d,sessionId:o}});window.dispatchEvent(y)}Object.keys(localStorage).forEach(y=>{y.startsWith(p)&&y!==m&&localStorage.removeItem(y)})}},Xt=async o=>{let d=k("googleAnalyticsMeasurementId");return d?new Promise(p=>{window.gtag?.("get",d,o,p)}):Promise.resolve(void 0)},ji={STC:"stc",UTM:"utm"},je=({needsTransformation:o=!0}={})=>{let{medium:d,source:p,campaign:m,content:y,term:P}=Hi();if(!d||!p||!m)return null;let[F,L]=m.split(we.CAMPAIGN_SPLIT_SYMBOL);if(!F&&!L)return null;let te=typeof y<"u"&&y!==xi;return{campaign:{medium:o&&Ni[d]||d,...typeof L<"u"&&{id:F},name:L??F,source:p,...te&&{content:y},...typeof P<"u"&&{term:P}}}};function Hi(){let o=Ge.getActualQueryString(),d=new URLSearchParams(o);return k("trackingTagsType")===ji.UTM?Bi(d):$t(d)}function $t(o){if(!qt(o))return Fi;let d=o.get(we.QUERY),[p,m,y,P,F]=d?.split(we.SPLIT_SYMBOL)||[];return{medium:p,source:m,campaign:y,content:P,term:F}}function qt(o){return o.has(we.QUERY)}function Bi(o){let d=o.get(Ri),p=o.get(Oi),m=o.get(wi),y=o.get(ki),P=o.get(Pi),F=o.get(Li),L=d?`${d}${we.CAMPAIGN_SPLIT_SYMBOL}${p}`:p;return(!m||!y||!L)&&qt(o)?$t(o):{campaign:L,medium:m,source:y,content:P??void 0,term:F??void 0}}var zt=async()=>Xt(Yt.clientId),Jt=async()=>{let o=await Xt(Yt.sessionId);return o&&Gi(o),o};function De(o="analytics_storage"){try{let d=window.google_tag_data?.ics?.getConsentState?.(o);return d===bi?le.granted:d===Mi?le.denied:void 0}catch{return}}var Qt=()=>De()??le.denied,Zt=o=>{!k("googleAnalyticsMeasurementId")||!o||window.gtag?.("set","user_id",o)},He=(o="default",d)=>{window.gtag?.("consent",o,d||{analytics_storage:le.denied,ad_user_data:le.denied,ad_personalization:le.denied,ad_storage:le.denied})};var Wi="borosTcf",Yi=2,Ki={channel:"GDPR"},en={analytics:[1,8,10],advertising:[3]},it={LOADED:"tcloaded",USER_ACTION_COMPLETE:"useractioncomplete"},rt="CMP Submitted",ce={ACCEPTED:"accepted",DECLINED:"declined",UNKNOWN:"unknown"},de={listeners:[],value:void 0,addListener:o=>de.listeners.push(o),get:()=>de.value,set:o=>{let{analytics:d,advertising:p}=o||{};de.value={analytics:d,advertising:p},de.listeners.forEach(m=>m(o)),de.listeners=[]}};function Xi(o){if(!ee)return null;let p=new RegExp(o+"=([^;]+)").exec(document.cookie);return p!==null?unescape(p[1]):null}var $i=()=>{if(k("initialized"))return!1;let o=!!window.__tcfapi;return o||console.warn("[tcfTracking] window.__tcfapi is not available on client and TCF won't be tracked."),o},qi=o=>en.analytics.every(d=>o[`${d}`]),zi=o=>en.advertising.every(d=>o[`${d}`]),Ji=({gdprPrivacy:o})=>Be.track(rt,{...Ki,...k("tcfTrackDefaultProperties")||{}},{gdpr_privacy:o.analytics,gdpr_privacy_advertising:o.advertising}),Te=()=>{let o=de.get();return o!==void 0?Promise.resolve(o):new Promise(d=>{de.addListener(p=>d(p))})},Se=o=>o?.analytics===ce.ACCEPTED,tn=o=>{let d=qi(o),p=zi(o),m=d?ce.ACCEPTED:ce.DECLINED,y=p?ce.ACCEPTED:ce.DECLINED;return de.set({analytics:m,advertising:y}),{analytics:m,advertising:y}},nn=()=>{let o=Xi(Wi);if(o)try{let{purpose:d}=JSON.parse(window.atob(o)),{consents:p}=d;return p}catch(d){console.error(d);return}},Qi=()=>{let o=nn();o&&tn(o)},Zi=()=>{let o=nn();me("isFirstVisit",!o)};function ot(){if(ee){if(Qi(),Zi(),!$i()){de.get()?.analytics===void 0&&de.set({analytics:ce.UNKNOWN,advertising:ce.UNKNOWN});return}me("initialized",!0),window.__tcfapi?.("addEventListener",Yi,({eventStatus:o,purpose:d},p)=>{if(!p)return Promise.resolve();if(o===it.USER_ACTION_COMPLETE||o===it.LOADED){let{consents:m}=d,y=tn(m);if(o===it.USER_ACTION_COMPLETE){let{analytics:P,advertising:F}=y,L={analytics:P,advertising:F};return!(ee&&window.sessionStorage.getItem("didomi-migration"))&&Ji({gdprPrivacy:L})}}})}}function rn(o){if(typeof document>"u")return null;let p=new RegExp(`${o}=([^;]+)`).exec(document.cookie);return p!==null?unescape(p[1]):null}function on(o,d,p={}){if(typeof document>"u"||typeof window>"u")return;let{maxAge:m=31536e3,path:y="/",reduceDomain:P=!0,sameSite:F="Lax"}=p,L=P?sn():window.location.hostname,te=[`${o}=${d}`,`domain=${L}`,`path=${y}`,`max-age=${m}`,`SameSite=${F}`].join(";");document.cookie=te}function an(o,d={}){if(typeof document>"u"||typeof window>"u")return;let{path:p="/",reduceDomain:m=!0}=d,y=m?sn():window.location.hostname;document.cookie=`${o}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=${p}; domain=${y}`}var sn=o=>{let d=o!==void 0?o:typeof window<"u"?window.location.hostname:"",p=".",m=d.split(p).reverse();if(m.length===1)return m[0];let y=[];for(let P of m)if(y.push(P),P.length>3)break;return`${p}${y.reverse().join(p)}`};var er="https://secure.adnxs.com/getuidj?consent=1",at="adit-xandr-id",tr=0;function nr(){return ee?window.fetch(er,{credentials:"include"}).then(o=>o.json()).then(o=>o?.uid).catch(()=>null):Promise.resolve(null)}function cn({gdprPrivacyValueAdvertising:o}){if(!ee)return null;if(o!==ce.ACCEPTED)return an(at),null;let d=y=>y!==null&&Number(y)>tr,p=rn(at),m=d(p);return m||nr().then(y=>{typeof y=="string"&&on(at,y)}),me("xandrId",p),m?p:null}var ir={platform:"web"},rr={All:!1},or={All:!0},ar=o=>{let d=k("userIdPrefix");return d&&(typeof o=="number"||typeof o=="string"&&!o.startsWith(d))?`${d}${o}`:o},st=()=>({...ir,...k("defaultProperties")}),sr=async({gdprPrivacyValue:o,event:d})=>{let p=Se(o),m,y,P;try{p&&(m=await Ue()),y=await Jt(),P=await zt()}catch(L){console.error(L)}return{...cr({isGdprAccepted:p,event:d}),"Adobe Analytics":m?{marketingCloudVisitorId:m}:!0,"Google Analytics 4":P&&y?{clientId:P,sessionId:y}:!0}},cr=({isGdprAccepted:o,event:d})=>d==="CMP Submitted"?or:o?{}:rr,lr=({context:o,xandrId:d})=>{let p=k("sendXandrId")!==!1,m=d&&parseInt(d)!==0;if(!p||!m)return{};let L=[...Array.isArray(o?.externalIds)?o.externalIds:[],{collection:"users",encoding:"none",id:d,type:"xandr_id"}];return{externalIds:L.filter(({id:Ce,type:he},Ie)=>Ie===L.findIndex(({id:fe,type:be})=>Ce===fe&&he===be))}},We=o=>o===ce.ACCEPTED?le.granted:le.denied,ct=async({event:o="",context:d={}})=>{let p=await Te(),{analytics:m,advertising:y}=p||{},P=Se(p),[F,L]=await Promise.all([sr({gdprPrivacyValue:p,event:o}),cn({gdprPrivacyValueAdvertising:y})]),te=De("analytics_storage")??We(m),Ce=De("ad_user_data")??We(y),he=De("ad_personalization")??We(y),Ie=De("ad_storage")??We(y);P||(d.integrations={...d.integrations??{},Personas:!1,Webhooks:!0,Webhook:!0});let fe={analytics_storage:te,ad_user_data:Ce,ad_personalization:he,ad_storage:Ie};return{...d,...!P&&{ip:"0.0.0.0"},...lr({context:d,xandrId:L}),analytics_storage:Qt(),clientVersion:"segment-wrapper@4.36.2",gdpr_privacy:m,gdpr_privacy_advertising:y,google_consents:fe,integrations:{...d.integrations,...F}}},ln=(o,d,p={},m)=>new Promise(y=>{(async()=>{let F=await ct({context:p,event:o}),L={...st(),...d},te=async(...he)=>{m&&m(...he);let[Ie]=await Promise.all([Te()]);Se(Ie),y()};k("googleAnalyticsConsentManagement")&&o===rt&&He("update",F.google_consents),window.analytics.track(o,L,{...F,context:{integrations:{...F.integrations}}},te)})()}),dr=async(o,d,p,m)=>{let y=await Te(),P=ar(o);return Zt(P),window.analytics.identify(P,Se(y)?d:{},p,m)},ur=(o,d,p={},m)=>(p.isPageTrack=!0,ln(o??"",d,p,m)),fr=()=>Promise.resolve(window.analytics.reset()),Be={page:ur,identify:dr,track:ln,reset:fr};var un="__mpi_patch";function dn(){let{track:o}=window.analytics;window.analytics.track=(...d)=>{let[p,m,y,P]=d,F={...st(),...m};return ct({context:y,event:p}).then(L=>{o.call(window.analytics,p,F,L,P)}),window.analytics},window.analytics[un]=!0}ee&&(window.analytics?window.analytics[un]||(window.analytics.initialized?dn():window.analytics.ready(dn)):console.warn("[segment-wrapper] Segment Analytics is not loaded so patch is not applied."));var fn=({payload:o,next:d})=>{if(k("googleAnalyticsMeasurementId")){let m=je();o.obj.context={...o.obj.context,...m}}d(o)};var gr={platform:"web"},gn=({payload:o,next:d})=>{let p=k("defaultContext")||{};o.obj.context={...gr,...p,...o.obj.context},d(o)};var pr=()=>{let o=null;return({payload:d,next:p})=>{try{let{obj:m}=d,{event:y,type:P}=m;if(P!=="track"){p(d);return}if(typeof y=="string"&&y.endsWith("Viewed")){let{page_name:F,page_type:L}=m.properties||{};o={name:F,type:L},p(d);return}if(!o){p(d);return}p({...d,obj:{...m,properties:{...m.properties,page_name_origin:o.name,page_type:m.properties?.page_type||o.type}}})}catch(m){console.error(m),p(d)}}},pn=pr();var mn=({payload:o,next:d})=>{o.obj.context={...o.obj.context,screen:{height:window.innerHeight,width:window.innerWidth,density:window.devicePixelRatio}},d(o)};var mr=o=>{let d=k("isUserTraitsEnabled"),p=window.analytics.user?.(),m=Se(o),y=p?.id();return{anonymousId:p?.anonymousId(),...y&&{userId:y},...m&&d&&p?.traits()||{}}},_n=async({payload:o,next:d})=>{let p=await Te(),m;try{m=mr(p)}catch(y){console.error(y)}o.obj.context={...o.obj.context,traits:{...o.obj.context.traits||{},...m}},d(o)};for(Cn=[],Ye=0;Ye<64;)Cn[Ye]=0|4294967296*Math.sin(++Ye%Math.PI);var Cn,Ye;for(oe=18,ke=[],lt=[];oe>1;oe--)for(U=oe;U<320;)ke[U+=oe]=1;var U,oe,ke,lt;function Q(o,d){return 4294967296*Math.pow(o,1/d)|0}for(U=0;U<64;)ke[++oe]||(lt[U]=Q(oe,2),ke[U++]=Q(oe,3));function ue(o,d){return o>>>d|o<<-d}function hn(o){var d=lt.slice(oe=U=0,8),p=[],m=unescape(encodeURI(o))+"\x80",y=m.length;for(p[o=--y/4+2|15]=8*y;~y;)p[y>>2]|=m.charCodeAt(y)<<8*~y--;for(y=[];oe<o;oe+=16){for(Q=d.slice();U<64;Q.unshift(m+(ue(m=Q[0],2)^ue(m,13)^ue(m,22))+(m&Q[1]^Q[1]&Q[2]^Q[2]&m)))Q[3]+=m=0|(y[U]=U<16?~~p[U+oe]:(ue(m=y[U-2],17)^ue(m,19)^m>>>10)+y[U-7]+(ue(m=y[U-15],7)^ue(m,18)^m>>>3)+y[U-16])+Q.pop()+(ue(m=Q[4],6)^ue(m,11)^ue(m,25))+(m&Q[5]^~m&Q[6])+ke[U++];for(U=8;U;)d[--U]+=Q[U]}for(m="";U<64;)m+=(d[U>>3]>>4*(7-U++)&15).toString(16);return m}var _r=/\.|\+.*$/g;function Cr(o){if(typeof o!="string")return"";let p=o.toLowerCase().split(/@/);if(p.length!==2)return"";let[m,y]=p;return`${m.replace(_r,"")}@${y}`}function In(o){let d=Cr(o);return d?hn(d):""}var hr="USER_DATA_READY",Ir=()=>k("universalId"),yr=()=>{let o=Ir();if(o)return dt(),o;let d=k("userEmail");if(d)return o=In(d),Sr(o),dt(),o;dt()},yn=()=>{if(!ee)return;let o=yr(),d=k("userEmail");if(typeof window<"u"&&typeof window.dispatchEvent=="function"){let p=new CustomEvent(hr,{detail:{universalId:o,userEmail:d}});window.dispatchEvent(p)}return{universalId:o,userEmail:d}},dt=()=>{me("universalIdInitialized",!0)},Sr=o=>{me("universalId",o)};var Sn=()=>{if(typeof window>"u")return;let o=window,d=o.analytics;if(!d){console.warn("[segment-wrapper] Analytics is not available");return}let p=o.__SEGMENT_WRAPPER?.SEGMENT_ID_USER_WITHOUT_CONSENTS??"anonymous_user";d.user?.()?.anonymousId()===p&&"setAnonymousId"in d&&typeof d.setAnonymousId=="function"&&d.setAnonymousId(null)};ot();try{yn()}catch(o){console.error("[segment-wrapper] UniversalID could not be initialized",o)}var An=()=>{let o=k("experimentalPageDataMiddleware");window.analytics.addSourceMiddleware?.(_n),window.analytics.addSourceMiddleware?.(gn),window.analytics.addSourceMiddleware?.(fn),window.analytics.addSourceMiddleware?.(mn),window.analytics.addSourceMiddleware?.(Wt),o&&window.analytics.addSourceMiddleware?.(pn)};if(ee&&window.analytics){let o=k("googleAnalyticsMeasurementId"),d=k("googleAnalyticsDataLayer")||nt,p=k("googleAnalyticsConsentManagement");if(o){let m=k("googleAnalyticsConfig");window[d]=window[d]||[],window.gtag=window.gtag||function(){window[d].push(arguments)},window.gtag("js",new Date),p&&He(),window.gtag("config",o,{cookie_prefix:"segment",send_page_view:!1,...m,...je()}),Kt().catch(y=>{console.error("[segment-wrapper] Failed to load Google Analytics",y)})}window.analytics.ready(Sn),window.analytics.addSourceMiddleware?An():window.analytics.ready(An)}var ut=Be;var _e=window;_e.sui=_e.sui||{};_e.sui.analytics=_e.sui.analytics||ut;_e.sui.analytics.getAdobeVisitorData=_e.sui.analytics.getAdobeVisitorData||Gt;_e.sui.analytics.getAdobeMCVisitorID=_e.sui.analytics.getAdobeMCVisitorID||Ue;var xo=ut;})();
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Adobe Visitor API for JavaScript version: 4.6.0
|