diff --git a/404.html b/404.html index c21fc249..4b3d7249 100644 --- a/404.html +++ b/404.html @@ -9,7 +9,8 @@ - + + + + diff --git a/blocks/form/form.js b/blocks/form/form.js index 387ad31e..c158ee48 100644 --- a/blocks/form/form.js +++ b/blocks/form/form.js @@ -1,4 +1,4 @@ -import { readBlockConfig } from '../../scripts/lib-franklin.js'; +import { readBlockConfig, toCamelCase } from '../../scripts/lib-franklin.js'; function generateUnique() { return new Date().valueOf() + Math.random(); @@ -418,6 +418,8 @@ export default async function decorate(block) { formLink.replaceWith(form); const config = readBlockConfig(block); - Object.entries(config).forEach(([key, value]) => { if (value) form.dataset[key] = value; }); + Object.entries(config).forEach(([key, value]) => { + if (value) form.dataset[toCamelCase(key)] = value; + }); } } diff --git a/head.html b/head.html index 9c1b93b2..f38a08f7 100644 --- a/head.html +++ b/head.html @@ -1,4 +1,8 @@ - + + + + + \ No newline at end of file diff --git a/scripts/adobe-martech/acdl.min.js b/scripts/adobe-martech/acdl.min.js new file mode 100644 index 00000000..948094c8 --- /dev/null +++ b/scripts/adobe-martech/acdl.min.js @@ -0,0 +1 @@ +(()=>{var e={},t={};t={get:function(e,t,n){let r=Array.isArray(t)?t:t.split("."),a=e;for(let e of r)if(void 0===(a=a[e]))return n;return a},has:function(e,t){let n=Array.isArray(t)?t:t.split("."),r=e;for(let e of n){if(!r?.hasOwnProperty(e))return!1;r=r[e]}return!0}};var n=JSON.parse('{"version":"2.0.2"}').version,r={},a={};a=function(e,t){let n=Object.keys(t).find(n=>{let r=t[n].type,a=n&&t[n].values,i=!t[n].optional,o=e[n],l=typeof o,c=r&&l!==r,f=a&&!a.includes(o);return i?!o||c||f:o&&(c||f)});return void 0===n};var i={};i={event:{event:{type:"string"},eventInfo:{optional:!0}},listenerOn:{on:{type:"string"},handler:{type:"function"},scope:{type:"string",values:["past","future","all"],optional:!0},path:{type:"string",optional:!0}},listenerOff:{off:{type:"string"},handler:{type:"function",optional:!0},scope:{type:"string",values:["past","future","all"],optional:!0},path:{type:"string",optional:!0}}};var o={};o={itemType:{DATA:"data",FCTN:"fctn",EVENT:"event",LISTENER_ON:"listenerOn",LISTENER_OFF:"listenerOff"},dataLayerEvent:{CHANGE:"adobeDataLayer:change",EVENT:"adobeDataLayer:event"},listenerScope:{PAST:"past",FUTURE:"future",ALL:"all"}};let l=e=>[Object,Array].includes((e||{}).constructor)&&!Object.entries(e||{}).length;r=function(e,t){let n=Object.keys(i).find(t=>a(e,i[t]))||"function"==typeof e&&o.itemType.FCTN||function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)&&o.itemType.DATA,r=function(){let t=Object.keys(e).filter(e=>!Object.keys(i.event).includes(e)).reduce((t,n)=>(t[n]=e[n],t),{});if(!l(t))return t}();return{config:e,type:n,data:r,valid:!!n,index:t}};var c={};c=function(e){let t=e.config.on||e.config.off,n=e.config.handler||null,r=e.config.scope||e.config.on&&o.listenerScope.ALL||null,a=e.config.path||null;return{event:t,handler:n,scope:r,path:a}};var f={},s={};s={mergeWith:function e(t,n,r){if(n&&t)return Object.keys(n).forEach(a=>{let i=r?r(t[a],n[a],a,t):void 0;void 0===i&&(i=n[a]===Object(n[a])&&a in t&&!Array.isArray(n[a])?e(t[a],n[a],r):n[a]),t[a]=i}),t},cloneDeepWith:function e(t,n){let r=n?n(t):void 0;if(void 0===r){if(t===Object(t)&&!Array.isArray(t)){r={};let a=Object.keys(t);for(let i=0;i-1&&t[r].splice(a,1)}else t[r]=[]}},triggerListeners:function(e){let n=function(e){let t=[];switch(e.type){case o.itemType.DATA:t.push(o.dataLayerEvent.CHANGE);break;case o.itemType.EVENT:t.push(o.dataLayerEvent.EVENT),e.data&&t.push(o.dataLayerEvent.CHANGE),e.config.event!==o.dataLayerEvent.CHANGE&&t.push(e.config.event)}return t}(e);n.forEach(function(n){if(Object.prototype.hasOwnProperty.call(t,n))for(let a of t[n])r(a,e)})},triggerListener:function(e,t){r(e,t)}}};var g={},h=s.cloneDeepWith,v=s.mergeWith;g=function(e,t){return v(e,t,function(e,t){if(null==t)return null}),e=function(e,t=e=>!e){return h(e,function e(n){if(n===Object(n)){if(Array.isArray(n))return n.filter(e=>!t(e)).map(t=>h(t,e));let r={};for(let a of Object.keys(n))t(n[a])||(r[a]=h(n[a],e));return r}})}(e,e=>null==e)},e=function(e){let a;let i=e||{},l=[],s=[],u={},p={getState:function(){return u},getDataLayer:function(){return l}};function y(e){u=g(u,e.data)}function d(e){if(!e.valid){h(e);return}function t(e){return 0===l.length||e.index>l.length-1?[]:l.slice(0,e.index).map(e=>r(e))}({data:function(e){y(e),a.triggerListeners(e)},fctn:function(e){e.config.call(l,l)},event:function(e){e.data&&y(e),a.triggerListeners(e)},listenerOn:function(e){let n=c(e);switch(n.scope){case o.listenerScope.PAST:for(let r of t(e))a.triggerListener(n,r);break;case o.listenerScope.FUTURE:a.register(n);break;case o.listenerScope.ALL:{let r=a.register(n);if(r)for(let r of t(e))a.triggerListener(n,r)}}},listenerOff:function(e){a.unregister(c(e))}})[e.type](e)}function h(e){let t="The following item cannot be handled by the data layer because it does not have a valid format: "+JSON.stringify(e.config);console.error(t)}return Array.isArray(i.dataLayer)||(i.dataLayer=[]),s=i.dataLayer.splice(0,i.dataLayer.length),(l=i.dataLayer).version=n,u={},a=f(p),l.push=function(...e){if(Object.keys(e).forEach(function(t){let n=e[t],a=r(n);switch(a.valid||(h(a),delete e[t]),a.type){case o.itemType.DATA:case o.itemType.EVENT:d(a);break;case o.itemType.FCTN:delete e[t],d(a);break;case o.itemType.LISTENER_ON:case o.itemType.LISTENER_OFF:delete e[t]}}),e[0])return Array.prototype.push.apply(this,e)},l.getState=function(e){return e?(0,t.get)(structuredClone(u),e):structuredClone(u)},l.addEventListener=function(e,t,n){let a=r({on:e,handler:t,scope:n&&n.scope,path:n&&n.path});d(a)},l.removeEventListener=function(e,t){let n=r({off:e,handler:t});d(n)},function(){for(let e=0;e1?t-1:0),o=1;o>>1:t>>>1;e.push(t)}return function(n,t){n=unescape(encodeURIComponent(n)),t||(t=0),t=~t;for(var r=0;r>>8^e[o]}return(t=~t)>>>0}}(),S=function(){var e={};return e.promise=new Promise((function(n,t){e.resolve=n,e.reject=t})),e},k=function(e,n){return e===n},T=function(e,n){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=(arguments.length>4&&void 0!==arguments[4]?arguments[4]:document).createElement(e);return Object.keys(n).forEach((function(e){o.setAttribute(e,n[e])})),function(e,n){Object.keys(n).forEach((function(t){if("style"===t&&g(n[t])){var r=n[t];Object.keys(r).forEach((function(n){e.style[n]=r[n]}))}else e[t]=n[t]}))}(o,t),r.forEach((function(e){return D(o,e)})),o},R="IMG",O="STYLE",A="SCRIPT",N=function(e){var n=e.src,t=e.currentDocument,r=void 0===t?document:t;return new Promise((function(e,t){P(R,{src:n},{onload:e,onerror:t,onabort:t},[],r)}))},M=function(e){return"function"==typeof e},x=function(e){return Array.isArray(e)&&e.length>0},q=function(e){return Array.isArray(e)?e:null==e?[]:[].slice.call(e)},j=/^\s*>/,L=function(e,n){if(!j.test(n))return q(e.querySelectorAll(n));var t="alloy-"+Date.now();try{return e.classList.add(t),q(e.querySelectorAll("."+t+" "+n))}finally{e.classList.remove(t)}},_=function(e,n){return e.substr(0,n.length)===n},U=":shadow",F=function(e,n){var t=n;return _(t,">")?window.document.documentMode?t.substring(1).trim():(e instanceof Element||e instanceof HTMLDocument?":scope":":host")+" "+t:t},B=function(e,n){if(!window.document.documentElement.attachShadow)return L(e,n.replace(U,""));var t=function(e){return e.split(U)}(n);if(t.length<2)return L(e,n);for(var r=e,o=0;o1&&void 0!==arguments[1]?arguments[1]:document;return-1===e.indexOf(U)?L(n,e):B(n,e)},V="MutationObserver",z={childList:!0,subtree:!0},J=function(e){return new Error("Could not find: "+e)},Q=function(e){return new Promise(e)},G=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:H,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:document,i=n(e);return x(i)?Promise.resolve(i):function(e){return M(e[V])}(r)?function(e,n,t,r,o){return Q((function(i,a){var u,c=new e[V]((function(){var e=o(t);x(e)&&(c.disconnect(),u&&clearTimeout(u),i(e))}));u=setTimeout((function(){c.disconnect(),a(J(t))}),r),c.observe(n,z)}))}(r,o,e,t,n):function(e){return"visible"===e.visibilityState}(o)?function(e,n,t,r){return Q((function(o,i){!function t(){var i=r(n);x(i)?o(i):e.requestAnimationFrame(t)}(),setTimeout((function(){i(J(n))}),t)}))}(r,e,t,n):function(e,n,t){return Q((function(r,o){!function n(){var o=t(e);x(o)?r(o):setTimeout(n,100)}(),setTimeout((function(){o(J(e))}),n)}))}(e,t,n)},X=function(e){var n=e.parentNode;return n?n.removeChild(e):null},Y={name:"Adobe Alloy"},W={style:{display:"none",width:0,height:0}},K=function(e){return g(e)&&0===Object.keys(e).length},$=function e(n,t){return p(n)||!g(n)?n:Object.keys(n).reduce((function(r,o){var i=n[o];if(g(i)){var a=e(i,t);return K(a)?r:Xu(Xu({},r),{},Qu({},o,a))}return t(i)?Xu(Xu({},r),{},Qu({},o,i)):r}),{})},Z=function(e,n){return Array.prototype.concat.apply([],e.map(n))},ee="com.adobe.alloy.",ne=ee+"getTld",te="kndctr",re=function(e){return e.replace("@","_")},oe=function(e,n){return te+"_"+re(e)+"_"+n},ie=function(e,n){var t={};return e.forEach((function(e){var r=n(e);t[r]||(t[r]=[]),t[r].push(e)})),t},ae=function(e){var n=e.orgId,t=oe(n,"identity");return function(){return Boolean(h.get(t))}},ue=function(e,n,t){return{getItem:function(r){try{return e[n].getItem(t+r)}catch(e){return null}},setItem:function(r,o){try{return e[n].setItem(t+r,o),!0}catch(e){return!1}},clear:function(){try{return Object.keys(e[n]).forEach((function(r){_(r,t)&&e[n].removeItem(r)})),!0}catch(e){return!1}}}},ce=function(e){return function(n){var t=ee+n;return{session:ue(e,"sessionStorage",t),persistent:ue(e,"localStorage",t)}}},se=function(e){return"boolean"==typeof e},de=function(e){return"number"==typeof e&&!isNaN(e)},le=function(e){var n=parseInt(e,10);return de(n)&&e===n},fe=function(e){return"string"==typeof e},pe=function(e){return fe(e)&&e.length>0},ge=function(){},me=function(e,n,t){var r=String(e),o=String(t);if(r.length>=n||0===o.length)return r;for(var i=n-r.length;i>o.length;)o+=o;return o.slice(0,i)+r},ve=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){for(var t={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?))?((((?:[^?#/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@/]*@)([^:/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#/]*\.[^?#/.]+(?:[?#]|$)))*\/?)?([^?#/]*))(?:\?([^#]*))?(?:#(.*))?)/}},r=t.parser[n.strictMode?"strict":"loose"].exec(e),o={},i=14;i--;)o[t.key[i]]=r[i]||"";return o[t.q.name]={},o[t.key[12]].replace(t.q.parser,(function(e,n,r){n&&(o[t.q.name][n]=r)})),o}},he=Vu(ve),ye=function(e){var n={},t=e.split(".");switch(t.length){case 1:n.subdomain="",n.domain=e,n.topLevelDomain="";break;case 2:n.subdomain="",n.domain=e,n.topLevelDomain=t[1];break;case 3:n.subdomain="www"===t[0]?"":t[0],n.domain=e,n.topLevelDomain=t[2];break;case 4:n.subdomain="www"===t[0]?"":t[0],n.domain=e,n.topLevelDomain=t[2]+"."+t[3]}return n},be=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ye;fe(e)||(e="");var t=he(e)||{},r=t.host,o=void 0===r?"":r,i=t.path,a=void 0===i?"":i,u=t.query,c=void 0===u?"":u,s=t.anchor;return Xu({path:a,query:c,fragment:void 0===s?"":s},n(o))},we=function(e){if(p(e)||"object"!==Zu(e))return null;var n=$(e,(function(e){return!p(e)&&(!!se(e)||(!!de(e)||(!!pe(e)||!!x(e))))}));return K(n)?null:n},Ee={},Ie=function(e){switch(Zu(e)){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};Ee.decode=Ee.parse=function(e,n,t,r){n=n||"&",t=t||"=";var o={};if("string"!=typeof e||0===e.length)return o;var i=/\+/g;e=e.split(n);var a=1e3;r&&"number"==typeof r.maxKeys&&(a=r.maxKeys);var u=e.length;a>0&&u>a&&(u=a);for(var c=0;c=0?(s=p.substr(0,g),d=p.substr(g+1)):(s=p,d=""),l=decodeURIComponent(s),f=decodeURIComponent(d),tc(o,l)?Array.isArray(o[l])?o[l].push(f):o[l]=[o[l],f]:o[l]=f}return o},Ee.encode=Ee.stringify=function(e,n,t,r){return n=n||"&",t=t||"=",null===e&&(e=void 0),"object"===Zu(e)?Object.keys(e).map((function(r){var o=encodeURIComponent(Ie(r))+t;return Array.isArray(e[r])?e[r].map((function(e){return o+encodeURIComponent(Ie(e))})).join(n):o+encodeURIComponent(Ie(e[r]))})).join(n):r?encodeURIComponent(Ie(r))+t+encodeURIComponent(Ie(e)):""};for(var Ce,Se=Ee,ke={parse:function(e){return"string"==typeof e&&(e=e.trim().replace(/^[?#&]/,"")),Se.parse(e)},stringify:function(e){return Se.stringify(e)}},Te=Vu(ke),De=function(e){return e instanceof Error?e:new Error(e)},Pe=function(e){var n=e.error,t=e.message;try{n.message=t}catch(e){}},Re=function(e){var n=e.error,t=e.message,r=De(n),o=t+"\nCaused by: "+r.message;return Pe({error:r,message:o}),r},Oe=function(e,n){if(de(e)||fe(e)){var t=Math.round(Number(e));if(!isNaN(t))return t}return n},Ae=[],Ne=0;Ne<256;++Ne)Ae.push((Ne+256).toString(16).slice(1));var Me=new Uint8Array(16),xe={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},qe=function(e){return function(n,t){return null==n?n:e.call(this,n,t)}},je=function(e,n){return function(t,r){return n.call(this,e.call(this,t,r),r)}},Le=function(e,n,t){return f(je(e,n),e,t)},_e=function(e,n,t){return f(je(e,qe(n)),e,t)},Ue=function(e,n,t){return f((r=qe(n),o=e,function(e,n){var t=this,i=[],a=[r,o].reduce((function(e,r){try{return r.call(t,e,n)}catch(n){return i.push(n),e}}),e);if(i.length)throw new Error(i.join("\n"));return a}),e,t);var r,o},Fe=function(e,n,t,r){if(!e)throw new Error("'"+t+"': Expected "+r+", but got "+JSON.stringify(n)+".")},Be=function(e,n){return Fe(se(e),e,n,"true or false"),e},He=function(e,n){return Fe(M(e),e,n,"a function"),e},Ve=function(e,n){return function(t,r){return Fe(t>=n,t,r,e+" greater than or equal to "+n),t}},ze=function(e){return function(n,t){return g(n)?Fe(!K(n),n,t,e):Fe(n.length>0,n,t,e),n}},Je=function(){return function(e,n){Fe(function(e){for(var n=Object.create(null),t=0;t0&&void 0!==arguments[0]?arguments[0]:"This field has been deprecated";return function(n,t){var r=e;return void 0!==n&&(t&&(r="'"+t+"': "+r),this&&this.logger&&this.logger.warn(r)),n}}(e))};var en=function(){return _e(this,Ge)},nn=function(e){return _e(this,Ve("an integer",e))},tn=function(e){return _e(this,Ve("a number",e))},rn=function(e){return _e(this,(n="a number",t=e,function(e,r){return Fe(e<=t,e,r,n+" less than or equal to "+t),e}));var n,t},on=function(){return _e(this,Xe,{minimum:nn})},an=function(){return _e(this,ze("a non-empty string"))},un=function(){return _e(this,ze("a non-empty array"))},cn=function(){return _e(this,ze("a non-empty object"))},sn=function(){return _e(this,We)},dn=function(e){return _e(this,function(e){return function(n,t){return Fe(e.test(n),n,t,"does not match the "+e.toString()),n}}(e))},ln=function(){return _e(this,function(){var e=[];return function(n,t){return Fe(-1===e.indexOf(n),n,t,"a unique value across instances"),e.push(n),n}}())},fn=function(){return _e(this,Je())},pn=function e(n){return{noUnknownFields:function(){return _e(this,function(e){return function(n,t){var r=[];if(Object.keys(n).forEach((function(n){if(!e[n]){var o=t?t+"."+n:n;r.push("'"+o+"': Unknown field.")}})),r.length)throw new Error(r.join("\n"));return n}}(n))},nonEmpty:cn,concat:function(t){var r=Xu(Xu({},n),t.schema);return _e(this,t,e(r))},renamed:function(e,n,t){return Ue(this,function(e,n,t){return function(r,o){Fe(g(r),r,o,"an object");var i=r[e],a=r[t],u=Yu(r,[e,t].map($u)),c=n(i,o);if(void 0!==c){var s="The field '"+e+"' is deprecated. Use '"+t+"' instead.";if(o&&(s="'"+o+"': "+s),void 0!==a&&a!==c)throw new Error(s);this&&this.logger&&this.logger.warn(s)}return Xu(Qu({},t,a||c),u)}}(e,n,t))},schema:n}},gn=function(e,n){return Le(this,function(e,n){return function(t,r){var o,i=this,a=T(e,(function(e){try{return o=e.call(i,t,r),!0}catch(e){return!1}}));return Fe(a,t,r,n),o}}(e,n))}.bind(Ze),mn=function(){return this}.bind(Ze),vn=function(e){return _e(this,function(e){return function(n,t){var r=this;Fe(Array.isArray(n),n,t,"an array");var o=[],i=n.map((function(i,a){try{return e.call(r,i,t+"["+a+"]",n)}catch(e){return void o.push(e.message)}}));if(o.length)throw new Error(o.join("\n"));return i}}(e),{nonEmpty:un,uniqueItems:fn})}.bind(Ze),hn=function(){return _e(this,Be)}.bind(Ze),yn=function(){return _e(this,He)}.bind(Ze),bn=function(e){return _e(this,function(e){return function(n,t){return Fe(n===e,n,t,""+e),n}}(e))}.bind(Ze),wn=function(){return _e(this,Ye,{minimum:tn,maximum:rn,integer:on,unique:ln})}.bind(Ze),En=function(e){return _e(this,(n=e,function(e,t){var r=this;Fe(g(e),e,t,"an object");var o=[],i={};if(Object.keys(e).forEach((function(a){var u=e[a],c=t?t+"."+a:a;try{var s=n.call(r,u,c);void 0!==s&&(i[a]=s)}catch(e){o.push(e.message)}})),o.length)throw new Error(o.join("\n"));return i}),{nonEmpty:cn});var n}.bind(Ze),In=function(e){return _e(this,function(e){return function(n,t){var r=this;Fe(g(n),n,t,"an object");var o=[],i={};if(Object.keys(e).forEach((function(a){var u=n[a],c=e[a],s=t?t+"."+a:a;try{var d=c.call(r,u,s);void 0!==d&&(i[a]=d)}catch(e){o.push(e.message)}})),Object.keys(n).forEach((function(e){Object.prototype.hasOwnProperty.call(i,e)||(i[e]=n[e])})),o.length)throw new Error(o.join("\n"));return i}}(e),pn(e))}.bind(Ze),Cn=function(){return _e(this,$e,{regexp:sn,domain:en,nonEmpty:an,unique:ln,matches:dn})}.bind(Ze),Sn=function(){for(var e=arguments.length,n=new Array(e),t=0;t1&&void 0!==arguments[1]?arguments[1]:{},a=(t=Object.keys(n),r=Object.keys(i),t.filter((function(e){return o(r,e)})));if(a.length)throw new Error("[ComponentRegistry] Could not register "+e+" because it has existing command(s): "+a.join(","));Object.keys(i).forEach((function(t){var r=i[t];r.commandName=t,r.run=Nn(r.run,"["+e+"] An error occurred while executing the "+t+" command."),n[t]=r}))};return{register:function(n,o){var i=o.commands,a=o.lifecycle;r(n,i),function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.keys(n).forEach((function(r){t[r]=t[r]||[],t[r].push(Nn(n[r],"["+e+"] An error occurred while executing the "+r+" lifecycle hook."))}))}(n,a),e[n]=o},getCommand:function(e){return n[e]},getCommandNames:function(){return Object.keys(n)},getLifecycleCallbacks:function(e){return t[e]||[]},getComponentNames:function(){return Object.keys(e)}}},xn="in",qn="out",jn="pending",Ln="general",_n="declinedConsent",Un="default",Fn="initial",Bn="new",Hn=function(e){var n=new Error(e);return n.code=_n,n.message=e,n},Vn=function(e){var n=e.logger,t=[],r=function(){return Promise.resolve()},o=function(){return Promise.resolve()},i=function(){return Promise.reject(Hn("No consent preferences have been set."))},a=function(){return Promise.reject(Hn("The user declined consent."))},u=function(e){if(e)return Promise.reject(new Error("Consent is pending."));var n=S();return t.push(n),n.promise};return{in:function(e){e===Un?this.awaitConsent=r:(e===Fn?n.info("Loaded user consent preferences. The user previously consented."):e===Bn&&this.awaitConsent!==o&&n.info("User consented."),function(){for(;t.length;)t.shift().resolve()}(),this.awaitConsent=o)},out:function(e){e===Un?(n.warn("User consent preferences not found. Default consent of out will be used."),this.awaitConsent=i):(e===Fn?n.warn("Loaded user consent preferences. The user previously declined consent."):e===Bn&&this.awaitConsent!==a&&n.warn("User declined consent."),function(){for(;t.length;)t.shift().reject(Hn("The user declined consent."))}(),this.awaitConsent=a)},pending:function(e){e===Un&&n.info("User consent preferences not found. Default consent of pending will be used. Some commands may be delayed."),this.awaitConsent=u},awaitConsent:function(){return Promise.reject(new Error("Consent has not been initialized."))},withConsent:function(){return this.awaitConsent(!0)},current:function(){switch(this.awaitConsent){case r:return{state:"in",wasSet:!1};case o:return{state:"in",wasSet:!0};case i:return{state:"out",wasSet:!1};case a:return{state:"out",wasSet:!0};case u:return{state:"pending",wasSet:!1};default:return{state:"in",wasSet:!1}}}}},zn=function(e){return e&&e._experience&&e._experience.decisioning&&x(e._experience.decisioning.propositions)?e._experience.decisioning.propositions:[]},Jn=function(){var e,n,t={},r=!1,o=!1,i=!0,a=function(e){if(o)throw new Error(e+" cannot be called after event is finalized.")},u={hasQuery:function(){return Object.prototype.hasOwnProperty.call(this.getContent(),"query")},getContent:function(){var r=JSON.parse(JSON.stringify(t));return e&&b(r,{xdm:e}),n&&b(r,{data:n}),r},setUserXdm:function(n){a("setUserXdm"),e=n},setUserData:function(e){a("setUserData"),n=e},mergeXdm:function(e){a("mergeXdm"),e&&b(t,{xdm:e})},mergeData:function(e){a("mergeData"),e&&b(t,{data:e})},mergeMeta:function(e){a("mergeMeta"),e&&b(t,{meta:e})},mergeQuery:function(e){a("mergeQuery"),e&&b(t,{query:e})},documentMayUnload:function(){r=!0},finalize:function(r){if(!o){var a=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:k;return e.filter((function(t,r){return function(e,n,t){for(var r=0;r0&&(t.xdm._experience.decisioning.propositions=a),n&&u.mergeData(n),o=!0,r){i=!1;var c={xdm:t.xdm||{},data:t.data||{}},s=r(c);i=!1!==s,t.xdm=c.xdm||{},t.data=c.data||{},K(t.xdm)&&delete t.xdm,K(t.data)&&delete t.data}}},getDocumentMayUnload:function(){return r},isEmpty:function(){return K(t)&&(!e||K(e))&&(!n||K(n))},shouldSend:function(){return i},getViewName:function(){if(e&&e.web&&e.web.webPageDetails)return e.web.webPageDetails.viewName},toJSON:function(){if(!o)throw new Error("toJSON called before finalize");return t}};return u},Qn="configure",Gn="setDebug",Xn=function(e){var n,t=e.logger,r=e.configureCommand,o=e.setDebugCommand,i=e.handleError,a=e.validateCommandOptions;return function(e){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(i){var c=function(e,i){var u;if(e===Qn){if(n)throw new Error("The library has already been configured and may only be configured once.");u=function(){return(n=r(i)).then((function(){}))}}else{if(!n)throw new Error("The library must be configured first. Please do so by executing the configure command.");u=e===Gn?function(){return o(i)}:function(){return n.then((function(n){var t=n.getCommand(e);if(!t||!M(t.run)){var r=[Qn,Gn].concat(n.getCommandNames()).join(", ");throw new Error("The "+e+" command does not exist. List of available commands: "+r+".")}var o=a({command:t,options:i});return t.run(o)}),(function(){return t.warn("An error during configuration is preventing the "+e+" command from executing."),new Promise((function(){}))}))}}return u}(e,u);t.logOnBeforeCommand({commandName:e,options:u}),i(c())})).catch((function(n){return i(n,e+" command")})).catch((function(n){throw t.logOnCommandRejected({commandName:e,options:u,error:n}),n})).then((function(n){var r=g(n)?n:{};return t.logOnCommandResolved({commandName:e,options:u,result:r}),r}))}},Yn=function(e){var n=e.command,t=e.options,r=n.commandName,o=n.documentationUri,i=void 0===o?"https://adobe.ly/3sHgQHb":o,a=n.optionsValidator,u=t;if(a)try{u=a(t)}catch(e){throw new Error("Invalid "+r+" command options:\n\t - "+e+" For command documentation see: "+i)}return u},Wn=["xdm","data","documentUnloading","type","mergeId","datasetId","edgeConfigOverrides"],Kn=function(e){var n=e.eventManager,t=e.logger;return{commands:{sendEvent:{documentationUri:"https://adobe.ly/3GQ3Q7t",optionsValidator:function(e){return function(e){var n=e.options;return In({type:Cn(),xdm:In({eventType:Cn(),identityMap:kn}),data:In({}),documentUnloading:hn(),renderDecisions:hn(),decisionScopes:vn(Cn()).uniqueItems(),personalization:In({decisionScopes:vn(Cn()).uniqueItems(),surfaces:vn(Cn()).uniqueItems(),sendDisplayEvent:hn().default(!0),includeRenderedPropositions:hn().default(!1),defaultPersonalizationEnabled:hn(),decisionContext:In({})}).default({sendDisplayEvent:!0}),datasetId:Cn(),mergeId:Cn(),edgeConfigOverrides:Tn,initializePersonalization:hn()}).required().noUnknownFields()(n)}({options:e})},run:function(e){var r=e.xdm,o=e.data,i=e.documentUnloading,a=e.type,u=e.mergeId,c=e.datasetId,s=e.edgeConfigOverrides,d=Yu(e,Wn),l=n.createEvent();return i&&l.documentMayUnload(),l.setUserXdm(r),l.setUserData(o),a&&l.mergeXdm({eventType:a}),u&&l.mergeXdm({eventMergeId:u}),s&&(d.edgeConfigOverrides=s),c&&(t.warn("The 'datasetId' option has been deprecated. Please use 'edgeConfigOverrides.com_adobe_experience_platform.datasets.event.datasetId' instead."),d.edgeConfigOverrides=s||{},b(d.edgeConfigOverrides,{com_adobe_experience_platform:{datasets:{event:{datasetId:c}}}})),n.sendEvent(l,d)}},applyResponse:{documentationUri:"",optionsValidator:function(e){return function(e){var n=e.options;return In({renderDecisions:hn(),responseHeaders:En(Cn().required()),responseBody:In({handle:vn(In({type:Cn().required(),payload:mn().required()})).required()}).required(),personalization:In({sendDisplayEvent:hn().default(!0),decisionContext:In({})}).default({sendDisplayEvent:!0})}).noUnknownFields()(n)}({options:e})},run:function(e){var t=e.renderDecisions,r=void 0!==t&&t,o=e.decisionContext,i=void 0===o?{}:o,a=e.responseHeaders,u=void 0===a?{}:a,c=e.responseBody,s=void 0===c?{handle:[]}:c,d=e.personalization,l=n.createEvent();return n.applyResponse(l,{renderDecisions:r,decisionContext:i,responseHeaders:u,responseBody:s,personalization:d})}}}}};Kn.namespace="DataCollector";var $n,Zn=function(e){var n=function(e){var n=e.eventManager,t=e.lifecycle,r=e.handleError;return function(e){if(e.s_fe)return Promise.resolve();var o=e.target,i=n.createEvent();return i.documentMayUnload(),t.onClick({event:i,clickedElement:o}).then((function(){return i.isEmpty()?Promise.resolve():n.sendEvent(i)})).then(ge).catch((function(e){r(e,"click collection")}))}}({eventManager:e.eventManager,lifecycle:e.lifecycle,handleError:e.handleError});document.addEventListener("click",n,!0)},et=Cn().regexp().default("\\.(exe|zip|wav|mp3|mov|mpg|avi|wmv|pdf|doc|docx|xls|xlsx|ppt|pptx)$"),nt=In({clickCollectionEnabled:hn().default(!0),clickCollection:In({internalLinkEnabled:hn().default(!0),externalLinkEnabled:hn().default(!0),downloadLinkEnabled:hn().default(!0),sessionStorageEnabled:hn().default(!1),eventGroupingEnabled:hn().default(!1),filterClickProperties:yn()}).default({internalLinkEnabled:!0,externalLinkEnabled:!0,downloadLinkEnabled:!0,sessionStorageEnabled:!1,eventGroupingEnabled:!1}),downloadLinkQualifier:et,onBeforeLinkClickSend:yn().deprecated('The field "onBeforeLinkClickSend" has been deprecated. Use "clickCollection.filterClickDetails" instead.')}),tt=function(){return null!==(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).getElementById("cppXYctnr")},rt=function(e){var n=e;return/^https?:\/\//i.test(n)||(n=window.location.protocol+"//"+e),new URL(n).hostname},ot=function(e){var n=e.config,t=e.logger,r=e.getClickedElementProperties,o=e.clickActivityStorage,i=n.clickCollectionEnabled,a=n.clickCollection;return i?function(e){var i,u,c=e.event,s=e.clickedElement,d=r({clickActivityStorage:o,clickedElement:s,config:n,logger:t}),l=d.linkType;tt()||(d.isValidLink()&&function(e,n){return n&&("download"===n&&!e.downloadLinkEnabled||"exit"===n&&!e.externalLinkEnabled||"other"===n&&!e.internalLinkEnabled)}(a,l)?t.info("Cancelling link click event due to clickCollection."+l+"LinkEnabled = false."):d.isInternalLink()&&a.eventGroupingEnabled&&(!n.onBeforeLinkClickSend||a.filterClickDetails)&&(i=window.location.hostname,u=d.linkUrl,rt(i)===rt(u))?o.save(d.properties):d.isValidLink()?(c.mergeXdm(d.xdm),c.mergeData(d.data),o.save({pageName:d.pageName,pageIDType:d.pageIDType})):d.isValidActivityMapData()&&o.save(d.properties))}:function(){}},it=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.properties,t=e.logger,r=n||{};return{get pageName(){return r.pageName},set pageName(e){r.pageName=e},get linkName(){return r.linkName},set linkName(e){r.linkName=e},get linkRegion(){return r.linkRegion},set linkRegion(e){r.linkRegion=e},get linkType(){return r.linkType},set linkType(e){r.linkType=e},get linkUrl(){return r.linkUrl},set linkUrl(e){r.linkUrl=e},get pageIDType(){return r.pageIDType},set pageIDType(e){r.pageIDType=e},get clickedElement(){return r.clickedElement},set clickedElement(e){r.clickedElement=e},get properties(){return{pageName:r.pageName,linkName:r.linkName,linkRegion:r.linkRegion,linkType:r.linkType,linkUrl:r.linkUrl,pageIDType:r.pageIDType}},isValidLink:function(){return!!(r.linkUrl&&r.linkType&&r.linkName&&r.linkRegion)},isInternalLink:function(){return this.isValidLink()&&"other"===r.linkType},isValidActivityMapData:function(){return!!r.pageName&&!!r.linkName&&!!r.linkRegion&&void 0!==r.pageIDType},get xdm(){return r.filteredXdm?r.filteredXdm:function(e){return{eventType:"web.webinteraction.linkClicks",web:{webInteraction:{name:e.linkName,region:e.linkRegion,type:e.linkType,URL:e.linkUrl,linkClicks:{value:1}}}}}(this)},get data(){return r.filteredData?r.filteredData:function(e){return{__adobe:{analytics:{contextData:{a:{activitymap:{page:e.pageName,link:e.linkName,region:e.linkRegion,pageIDType:e.pageIDType}}}}}}}(this)},applyPropertyFilter:function(e){e&&!1===e(r)&&(t&&t.info("Clicked element properties were rejected by filter function: "+JSON.stringify(this.properties,null,2)),r={})},applyOptionsFilter:function(e){var n=this.options;if(n&&n.clickedElement&&(n.xdm||n.data)){if(e&&!1===e(n))return t&&t.info("Clicked element properties were rejected by filter function: "+JSON.stringify(this.properties,null,2)),void(this.options=void 0);this.options=n,r.filteredXdm=n.xdm,r.filteredData=n.data}},get options(){var e={};if(this.isValidLink()&&(e.xdm=this.xdm),this.isValidActivityMapData()&&(e.data=this.data),this.clickedElement&&(e.clickedElement=this.clickedElement),e.xdm||e.data)return e},set options(e){r={},e&&function(e,n){var t=e.xdm,r=e.data,o=e.clickedElement;if(n.clickedElement=o,t&&t.web&&t.web.webInteraction){var i=t.web.webInteraction,a=i.name,u=i.region,c=i.type,s=i.URL;n.linkName=a,n.linkRegion=u,n.linkType=c,n.linkUrl=s}if(r&&r.__adobe&&r.__adobe.analytics){var d=r.__adobe.analytics.contextData;if(d&&d.a&&d.a.activitymap){var l=d.a.activitymap,f=l.page,p=l.link,g=l.region,m=l.pageIDType;n.pageName=f||n.pageName,n.linkName=p||n.linkName,n.linkRegion=g||n.linkRegion,void 0!==m&&(n.pageIDType=m)}}}(e,r)}}},at="clickData",ut=function(e){return e&&e.replace(/\s+/g," ").trim()},ct=/^(SCRIPT|STYLE|LINK|CANVAS|NOSCRIPT|#COMMENT)$/i,st=function e(n){var t=[],r=!1;(function(e){return!(e&&e.nodeName&&e.nodeName.match(ct))})(n)?(t.push(n),n.childNodes&&Array.prototype.slice.call(n.childNodes).forEach((function(n){var o=e(n);t=t.concat(o.supportedNodes),r=r||o.includesUnsupportedNodes}))):r=!0;return{supportedNodes:t,includesUnsupportedNodes:r}},dt=function(e,n,t){var r;return t&&t!==e.nodeName.toUpperCase()||(r=e.getAttribute(n)),r},lt=/^(HEADER|MAIN|FOOTER|NAV)$/i,ft=function(e){var n;return"region"===e.role&&pe(e["aria-label"])&&(n=e["aria-label"]),n},pt=function(e){var n;return e&&e.nodeName&&e.nodeName.match(lt)&&(n=e.nodeName),n},gt=function(e){return!(!e.href||"A"!==e.tagName&&"AREA"!==e.tagName||e.onclick&&e.protocol&&!(e.protocol.toLowerCase().indexOf("javascript")<0))},mt=function(e){return!!e&&!!e.onclick},vt=function(e){if("INPUT"===e.tagName){var n=e.getAttribute("type");if("submit"===n)return!0;if("image"===n&&e.src)return!0}return!1},ht=function(e){return"BUTTON"===e.tagName&&"submit"===e.type},yt=function(e){var n=e.indexOf("?"),t=e.indexOf("#");return n>=0&&(n=0?e.substring(0,t):e},bt=function(e){var n=e.window,t=e.getLinkName,r=e.getLinkRegion,o=e.getAbsoluteUrlFromAnchorElement,i=e.findClickableElement,a=e.determineLinkType;return function(e){var u=e.clickedElement,c=e.config,s=e.logger,d=e.clickActivityStorage,l=c.onBeforeLinkClickSend,f=c.clickCollection.filterClickDetails,p=it({logger:s});if(u){var g=i(u);if(g){p.clickedElement=u,p.linkUrl=o(n,g),p.linkType=a(n,c,p.linkUrl,g),p.linkRegion=r(g),p.linkName=t(g),p.pageIDType=0,p.pageName=n.location.href;var m=d.load();m&&m.pageName&&(p.pageName=m.pageName,p.pageIDType=1),f?p.applyPropertyFilter(f):l&&p.applyOptionsFilter(l)}}return p}}({window:window,getLinkName:function(e){var n=ut(e.innerText||e.textContent),t=st(e);if(!n||t.includesUnsupportedNodes){var r=function(e){var n={texts:[]};return e.supportedNodes.forEach((function(e){e.getAttribute&&(n.alt||(n.alt=ut(e.getAttribute("alt"))),n.title||(n.title=ut(e.getAttribute("title"))),n.inputValue||(n.inputValue=ut(dt(e,"value","INPUT"))),n.imgSrc||(n.imgSrc=ut(dt(e,"src","IMG")))),e.nodeValue&&n.texts.push(e.nodeValue)})),n}(t);(n=ut(r.texts.join("")))||(n=r.alt||r.title||r.inputValue||r.imgSrc)}return n||""},getLinkRegion:function(e){for(var n,t=e.parentNode;t;){if(n=ut(t.id||ft(t)||pt(t)))return n;t=t.parentNode}return"BODY"},getAbsoluteUrlFromAnchorElement:function(e,n){var t=e.location,r=n.href||"";"string"!=typeof r&&(r="");var o,i=n.protocol,a=n.host;if(r&&(!(o=r)||!/^[a-z0-9]+:\/\//i.test(o))){i||(i=t.protocol?t.protocol:""),i=i?i+"//":"",a||(a=t.host?t.host:"");var u="";if("/"!==r.substring(0,1)){var c=t.pathname.lastIndexOf("/");c=c<0?0:c,u=t.pathname.substring(0,c)}r=""+i+a+u+"/"+r}return r},findClickableElement:function(e){for(var n=e;n;){if(gt(n)||mt(n)||vt(n)||ht(n))return n;n=n.parentNode}return null},determineLinkType:function(e,n,t,r){var o="other";return pe(t)&&(!function(e,n,t){var r=!1;if(n)if(t&&t.download)r=!0;else if(e){var o=new RegExp(e),i=yt(n).toLowerCase();r=o.test(i)}return r}(n.downloadLinkQualifier,t,r)?function(e,n){var t=!1;if(n&&e.location.hostname){var r=e.location.hostname.toLowerCase();t=yt(n).toLowerCase().indexOf(r)<0}return t}(e,t)&&(o="exit"):o="download"),o}}),wt=function(e){var n=e.config,t=e.eventManager,r=e.handleError,o=e.logger,i=n.clickCollection,a=ce(window)(n.orgId||""),u=function(){var e={};return{getItem:function(n){return e[n]},setItem:function(n,t){e[n]=t},removeItem:function(n){delete e[n]}}}(),c=i.sessionStorageEnabled?a.session:u;$n=function(e){var n=e.storage;return{save:function(e){var t=JSON.stringify(e);n.setItem(at,t)},load:function(){var e=null,t=n.getItem(at);return t&&(e=JSON.parse(t)),e},remove:function(){n.removeItem(at)}}}({storage:c});var s=ot({config:n,logger:o,clickActivityStorage:$n,getClickedElementProperties:bt}),d=function(e){var n=e.clickActivityStorage;return function(e){if(!tt()){var t=n.load(),r=it({properties:t});if(r.isValidLink()||r.isValidActivityMapData()){if(r.isValidLink()){var o=r.xdm;delete o.eventType,e.mergeXdm(o)}r.isValidActivityMapData()&&e.mergeData(r.data),n.save({pageName:r.pageName,pageIDType:r.pageIDType})}}}}({clickActivityStorage:$n}),l=function(e){var n=e.clickActivityStorage;return function(e){n.save({pageName:e.getContent().xdm.web.webPageDetails.name,pageIDType:1})}}({clickActivityStorage:$n});return{lifecycle:{onComponentsRegistered:function(e){var n=e.lifecycle;Zn({eventManager:t,lifecycle:n,handleError:r})},onClick:function(e){var n=e.event,t=e.clickedElement;s({event:n,clickedElement:t})},onBeforeEvent:function(e){var n=e.event;(function(e){var n=e.getContent();return void 0!==n.xdm&&void 0!==n.xdm.web&&void 0!==n.xdm.web.webPageDetails&&void 0!==n.xdm.web.webPageDetails.name})(n)&&(i.eventGroupingEnabled&&d(n),l(n,o,$n))}}}};wt.namespace="ActivityCollector",wt.configValidators=nt,wt.buildOnInstanceConfiguredExtraParams=function(e){var n=e.config,t=e.logger;return{getLinkDetails:function(e){return bt({clickActivityStorage:$n,clickedElement:e,config:n,logger:t}).properties}}};var Et,It,Ct=function(e,n){return"ID sync "+(n?"succeeded":"failed")+": "+e.spec.url},St=In({thirdPartyCookiesEnabled:hn().default(!0),idMigrationEnabled:hn().default(!0)}),kt=In({namespaces:vn(bn("ECID")).nonEmpty().uniqueItems().default(["ECID"]),edgeConfigOverrides:Tn}).noUnknownFields().default({namespaces:["ECID"]}),Tt=In({url:Cn().required().nonEmpty(),edgeConfigOverrides:Tn}).required().noUnknownFields(),Dt=function(e){var n=e.logger;return new Promise((function(e,t){if(g(window.adobe)&&g(window.adobe.optIn)){var r=window.adobe.optIn;n.info("Delaying request while waiting for legacy opt-in to let Visitor retrieve ECID from server."),r.fetchPermissions((function(){r.isApproved([r.Categories.ECID])?(n.info("Received legacy opt-in approval to let Visitor retrieve ECID from server."),e()):t(new Error("Legacy opt-in was declined."))}),!0)}else e()}))},Pt=function(e){var n=e.logger,t=e.orgId,r=e.awaitVisitorOptIn;return function(){var e=function(e){var n=e.Visitor;return M(n)&&M(n.getInstance)&&n}(window);return e?r({logger:n}).then((function(){return n.info("Delaying request while using Visitor to retrieve ECID from server."),new Promise((function(r){e.getInstance(t,{}).getMarketingCloudVisitorID((function(e){n.info("Resuming previously delayed request that was waiting for ECID from Visitor."),r(e)}),!0)}))})).catch((function(e){e?n.info(e.message+", retrieving ECID from experience edge"):n.info("An error occurred while obtaining the ECID from Visitor.")})):Promise.resolve()}},Rt="ECID",Ot=function(e){e.mergeQuery({identity:{fetch:[Rt]}})},At=(Et=function(o){return(i=Qu(Qu(Qu(Qu(Qu(Qu({},n,/Edge\/([0-9\._]+)/),t,/Edg\/([0-9\.]+)/),e,/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/),"Firefox",/Firefox\/([0-9\.]+)(?:\s|$)/),"IE",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/),"Safari",/Version\/([0-9\._]+).*Safari/),function(e){for(var n=Object.keys(i),t=0;t0&&void 0!==arguments[0]?arguments[0]:{},i=e.namespaces,a=e.edgeConfigOverrides,u=Bt({payload:t(i),globalConfigOverrides:o,localConfigOverrides:a}),c=r(u);return n({request:c})}}({sendEdgeNetworkRequest:i,createIdentityRequestPayload:zt,createIdentityRequest:Vt,globalConfigOverrides:d}),m=function(e){var n=e.thirdPartyCookiesEnabled,t=e.areThirdPartyCookiesSupportedByDefault;return function(e){n&&t(At(window))&&e.setUseIdThirdPartyDomain()}}({thirdPartyCookiesEnabled:s,areThirdPartyCookiesSupportedByDefault:a}),v=function(e){var n=e.getLegacyEcid,t=e.addEcidToPayload;return function(e){return e.hasIdentity(Rt)?Promise.resolve():n().then((function(n){n&&t(e,n)}))}}({getLegacyEcid:l.getEcid,addEcidToPayload:Nt}),y=function(e){var n=e.locationSearch,t=e.dateProvider,r=e.orgId,o=e.logger;return function(e){if(!e.hasIdentity(Rt)){var i=Te.parse(n).adobe_mc;if(void 0!==i){Array.isArray(i)&&(o.warn("Found multiple adobe_mc query string paramters, only using the last one."),i=i[i.length-1]);var a=i.split("|").reduce((function(e,n){var t=Wu(n.split("="),2),r=t[0],o=t[1];return e[r]=o,e}),{}),u=parseInt(a.TS,10),c=a.MCMID,s=decodeURIComponent(a.MCORGID);t().getTime()/1e3<=u+300&&s===r&&c?(o.info("Found valid ECID identity "+c+" from the adobe_mc query string parameter."),e.addIdentity(Rt,{id:c})):o.info("Detected invalid or expired adobe_mc query string parameter.")}}}}({locationSearch:window.document.location.search,dateProvider:function(){return new Date},orgId:c,logger:t}),b=function(e){var n=e.doesIdentityCookieExist,t=e.orgId,r=e.logger;return function(e){var o=e.onResponse,i=e.onRequestFailure;return new Promise((function(e,a){o((function(){n()?e():(r.warn("Identity cookie not found. This could be caused by any of the following issues:\n\t* The org ID "+t+" configured in Alloy doesn't match the org ID specified in the edge configuration.\n\t* Experience edge was not able to set the identity cookie due to domain or cookie restrictions.\n\t* The request was canceled by the browser and not fully processed."),a(new Error("Identity cookie not found.")))})),i((function(){n()?e():a(new Error("Identity cookie not found."))}))}))}}({doesIdentityCookieExist:p,orgId:c,logger:t}),w=function(e){var n,t=e.doesIdentityCookieExist,r=e.setDomainForInitialIdentityPayload,o=e.addLegacyEcidToPayload,i=e.awaitIdentityCookie,a=e.logger,u=function(e){return r(e),o(e.getPayload())};return function(e){var r=e.request,o=e.onResponse,c=e.onRequestFailure;if(t())return r.setIsIdentityEstablished(),Promise.resolve();if(n){a.info("Delaying request while retrieving ECID from server.");var s=n;return n=s.catch((function(){return i({onResponse:o,onRequestFailure:c})})),s.then((function(){a.info("Resuming previously delayed request."),r.setIsIdentityEstablished()})).catch((function(){return u(r)}))}return(n=i({onResponse:o,onRequestFailure:c})).catch((function(){})),u(r)}}({doesIdentityCookieExist:p,setDomainForInitialIdentityPayload:m,addLegacyEcidToPayload:v,awaitIdentityCookie:b,logger:t}),E=function(e){var n=e.fireReferrerHideableImage,t=e.logger;return function(e){var r=e.filter((function(e){return"url"===e.type}));return r.length?Promise.all(r.map((function(e){return n(e.spec).then((function(){t.info(Ct(e,!0))})).catch((function(){t.error(Ct(e,!1))}))}))).then(ge):Promise.resolve()}}({fireReferrerHideableImage:o,logger:t}),C=function(e){var n=e.processIdSyncs;return function(e){return n(e.getPayloadsByType("identity:exchange"))}}({processIdSyncs:E}),S=function(e){var n=e.dateProvider,t=e.orgId;return function(e,r){var o=Math.round(n().getTime()/1e3),i=encodeURIComponent("TS="+o+"|MCMID="+e+"|MCORGID="+encodeURIComponent(t)),a=Wu(r.match(Jt),4),u=a[1],c=a[2],s=a[3],d=function(e){return""===e?"?":"?"===e?"":"&"}(c);return""+u+c+d+"adobe_mc="+i+s}}({dateProvider:function(){return new Date},orgId:c,globalConfigOverrides:d});return function(e){var n,t=e.addEcidQueryToPayload,r=e.addQueryStringIdentityToPayload,o=e.ensureSingleIdentity,i=e.setLegacyEcid,a=e.handleResponseForIdSyncs,u=e.getEcidFromResponse,c=e.getIdentity,s=e.consent,d=e.appendIdentityToUrl,l=e.logger,p={};return{lifecycle:{onBeforeRequest:function(e){var n=e.request,i=e.onResponse,a=e.onRequestFailure;return t(n.getPayload()),r(n.getPayload()),o({request:n,onResponse:i,onRequestFailure:a})},onResponse:function(e){var t=e.response;return n||(n=u(t))&&i(n),p=f(p,t.getEdge()),a(t)}},commands:{getIdentity:{optionsValidator:kt,run:function(e){return s.awaitConsent().then((function(){return n?void 0:c(e)})).then((function(){return{identity:{ECID:n},edge:p}}))}},appendIdentityToUrl:{optionsValidator:Tt,run:function(e){return s.withConsent().then((function(){return n?void 0:c(e)})).then((function(){return{url:d(n,e.url)}})).catch((function(n){return l.warn("Unable to append identity to url. "+n.message),e}))}}}}}({addEcidQueryToPayload:Ot,addQueryStringIdentityToPayload:y,ensureSingleIdentity:w,setLegacyEcid:l.setEcid,handleResponseForIdSyncs:C,getEcidFromResponse:Mt,getIdentity:g,consent:r,appendIdentityToUrl:S,logger:t,config:n})};Qt.namespace="Identity",Qt.configValidators=St;var Gt=function(e){var n=e.fireReferrerHideableImage,t=e.logger,r=e.cookieJar,o=e.isPageSsl?{sameSite:"none",secure:!0}:{};return function(e){return function(e){e.filter((function(e){return"cookie"===e.type})).forEach((function(e){var n=e.spec,t=n.name,i=n.value,a=n.domain,u=n.ttlDays;r.set(t,i||"",Xu({domain:a||"",expires:u||10},o))}))}(e),function(e){var r=e.filter((function(e){return"url"===e.type}));return Promise.all(r.map((function(e){return n(e.spec).then((function(){t.info(function(e){return"URL destination succeeded: "+e.spec.url}(e))})).catch((function(){}))}))).then(ge)}(e)}},Xt=function(e){var n=e.processDestinations;return function(e){var t,r,o=e.response;return(t={response:o},r=t.response.getPayloadsByType("activation:push"),n(r)).then((function(){return{destinations:{response:o}.response.getPayloadsByType("activation:pull")}}))}},Yt=function(e){var n=e.logger,t=e.fireReferrerHideableImage,r=h.withConverter({write:function(e){return encodeURIComponent(e)}}),o=I({logger:n,cookieJar:r}),i=Gt({fireReferrerHideableImage:t,logger:n,cookieJar:o,isPageSsl:"https:"===window.location.protocol});return{lifecycle:{onResponse:Xt({processDestinations:i})},commands:{}}};Yt.namespace="Audiences";var Wt="web",Kt="://",$t=/^(\w+):\/\/([^/#]+)(\/[^#]*)?(#.*)?$/,Zt=/^(?:.*@)?(?:[a-z\d\u00a1-\uffff.-]+|\[[a-f\d:]+])(?::\d+)?$/,er=/^\/(?:[/\w\u00a1-\uffff-.~]|%[a-fA-F\d]{2})*$/,nr=/^#(?:[/\w\u00a1-\uffff-.~]|%[a-fA-F\d]{2})+$/,tr=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",n=e.length;n>0&&-1!=="/".indexOf(e.charAt(n-1));)n-=1;return e.substring(0,n)||"/"},rr=function(e){return""+e.surfaceType+Kt+e.authority+(e.path||"")+(e.fragment||"")},or=function(e){var n=e(),t=n.host.toLowerCase(),r=n.pathname;return Wt+Kt+t+tr(r)},ir=function(e,n,t){var r=function(e){return t.warn(e),null};if(!pe(e))return r("Invalid surface: "+e);var i,a,u,c,s=function(e,n){return _(e,"#")?or(n)+e:e}(e,n),d=(c=s.match($t))?{surfaceType:(u=c[1],pe(u)?u.toLowerCase():""),authority:(a=c[2],pe(a)?a.toLowerCase():""),path:(i=c[3],pe(i)?tr(i):"/"),fragment:c[4]}:null;return null===d?r("Invalid surface: "+e):o([Wt,"webapp"],d.surfaceType)?d.authority&&Zt.test(d.authority)?d.path&&!er.test(d.path)?r("Invalid path "+d.path+" in surface: "+e):d.fragment&&!nr.test(d.fragment)?r("Invalid fragment "+d.fragment+" in surface: "+e):d:r("Invalid authority "+d.authority+" in surface: "+e):r("Unsupported surface type "+d.surfaceType+" in surface: "+e)},ar=function(e){return!!e&&0===e.indexOf(Wt+Kt)&&-1===e.indexOf("#")},ur="__view__",cr="https://ns.adobe.com/personalization/default-content-item",sr="https://ns.adobe.com/personalization/dom-action",dr="https://ns.adobe.com/personalization/html-content-item",lr="https://ns.adobe.com/personalization/json-content-item",fr="https://ns.adobe.com/personalization/ruleset-item",pr="https://ns.adobe.com/personalization/redirect-item",gr="https://ns.adobe.com/personalization/message/in-app",mr=function(e){return e.filter((function(n,t){return e.indexOf(n)===t}))},vr=function(e){var n=e.getPageLocation,t=e.renderDecisions,r=e.decisionScopes,i=e.personalization,a=e.event,u=e.isCacheInitialized,c=e.logger,s=a.getViewName();return{isRenderDecisions:function(){return t},isSendDisplayEvent:function(){return!!i.sendDisplayEvent},shouldIncludeRenderedPropositions:function(){return!!i.includeRenderedPropositions},getViewName:function(){return s},hasScopes:function(){return r.length>0||x(i.decisionScopes)},hasSurfaces:function(){return x(i.surfaces)},hasViewName:function(){return pe(s)},createQueryDetails:function(){var e=Ku(r);x(i.decisionScopes)&&e.push.apply(e,Ku(i.decisionScopes));var t=function(){var e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(t){return ir(t,e,n)})).filter((function(e){return!p(e)})).map(rr)}(i.surfaces,n,c);this.shouldRequestDefaultPersonalization()&&(function(e){o(e,ur)||e.push(ur)}(e),function(e,n){var t=or(n);o(e,t)||e.push(t)}(t,n));var a=[cr,dr,lr,pr,fr,gr,"https://ns.adobe.com/personalization/message/feed-item"];return o(e,ur)&&a.push(sr),{schemas:a,decisionScopes:mr(e),surfaces:mr(t)}},isCacheInitialized:function(){return u},shouldFetchData:function(){return this.hasScopes()||this.hasSurfaces()||this.shouldRequestDefaultPersonalization()},shouldUseCachedData:function(){return this.hasViewName()&&!this.shouldFetchData()},shouldRequestDefaultPersonalization:function(){return i.defaultPersonalizationEnabled||!this.isCacheInitialized()&&!1!==i.defaultPersonalizationEnabled}}},hr="decisioning.propositionDisplay",yr="decisioning.propositionInteract",br="decisioning.propositionTrigger",wr="decisioning.propositionDismiss",Er={DISPLAY:"display",INTERACT:"interact",TRIGGER:"trigger",DISMISS:"dismiss"},Ir=Qu(Qu(Qu(Qu({},hr,Er.DISPLAY),yr,Er.INTERACT),br,Er.TRIGGER),wr,Er.DISMISS);Qu(Qu(Qu(Qu({},Er.DISPLAY,hr),Er.INTERACT,yr),Er.TRIGGER,br),Er.DISMISS,wr);var Cr=function(e){return Ir[e]},Sr={propositions:[]},kr=function(e){var n=e.getPageLocation,t=e.logger,r=e.fetchDataHandler,o=e.viewChangeHandler,i=e.onClickHandler,a=e.isAuthoringModeEnabled,u=e.mergeQuery,c=e.viewCache,s=e.showContainers,d=e.applyPropositions,l=e.setTargetMigration,f=e.mergeDecisionsMeta,p=e.renderedPropositions,g=e.onDecisionHandler,m=e.handleConsentFlicker;return{lifecycle:{onComponentsRegistered:function(){m()},onDecision:g,onBeforeRequest:function(e){var n=e.request;return l(n),Promise.resolve()},onBeforeEvent:function(e){var i=e.event,d=e.renderDecisions,l=e.decisionScopes,g=void 0===l?[]:l,m=e.personalization,v=void 0===m?{}:m,h=e.onResponse,y=void 0===h?ge:h,b=e.onRequestFailure,w=void 0===b?ge:b;if(y((function(){return{propositions:[]}})),w((function(){return s()})),a())return t.warn("Rendering is disabled for authoring mode."),u(i,{enabled:!1}),Promise.resolve();var E=vr({getPageLocation:n,renderDecisions:d,decisionScopes:g,personalization:v,event:i,isCacheInitialized:c.isInitialized(),logger:t}),I=[];if(E.shouldIncludeRenderedPropositions()&&I.push(p.clear()),E.shouldFetchData()){var C=c.createCacheUpdate(E.getViewName());w((function(){return C.cancel()})),r({cacheUpdate:C,personalizationDetails:E,event:i,onResponse:y})}else E.shouldUseCachedData()&&I.push(o({personalizationDetails:E,event:i,onResponse:y,onRequestFailure:w}));return Promise.all(I).then((function(e){var n=Z(e,(function(e){return e}));x(n)&&f(i,n,[Er.DISPLAY])}))},onClick:function(e){var n=e.event,t=e.clickedElement;i({event:n,clickedElement:t})}},commands:{applyPropositions:{optionsValidator:function(e){return function(e){var n=e.logger,t=e.options,r=In({propositions:vn(In({id:Cn().required(),scope:Cn().required(),scopeDetails:In({decisionProvider:Cn().required()}).required(),items:vn(In({id:Cn().required(),schema:Cn().required(),data:mn().required()})).nonEmpty().required()}).required()).nonEmpty().required(),metadata:In(mn()),viewName:Cn()}).required();try{return r(t)}catch(e){return n.warn("Invalid options for applyPropositions. No propositions will be applied.",e),Sr}}({logger:t,options:e})},run:d}}}},Tr=function(e){return P("DIV",{},{innerHTML:e})},Dr={exports:{}};Dr.exports=function(e){if(e.CSS&&e.CSS.escape)return e.CSS.escape;var n=function(e){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var n,t=String(e),r=t.length,o=-1,i="",a=t.charCodeAt(0);++o=1&&n<=31||127==n||0==o&&n>=48&&n<=57||1==o&&n>=48&&n<=57&&45==a?"\\"+n.toString(16)+" ":0==o&&1==r&&45==n||!(n>=128||45==n||95==n||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122)?"\\"+t.charAt(o):t.charAt(o):i+="�";return i};return e.CSS||(e.CSS={}),e.CSS.escape=n,n}(u);var Pr,Rr=Vu(Dr.exports),Or=/:eq\((\d+)\)/g,Ar=function(e){return-1===e.indexOf(":eq(")},Nr=/(#|\.)(-?\w+)/g,Mr=function(e,n,t){return""+n+Rr(t)},xr=function(e){for(var n=[],t=function(e){return e.split(Or).filter(pe)}(function(e){return e.replace(Nr,Mr)}(e.trim())),r=t.length,o=0;ol-1)break;if(a1&&void 0!==arguments[1]?arguments[1]:document).getElementById(e)},Lr=function(e,n,t){e.setAttribute(n,t)},_r=function(e,n){return e.getAttribute(n)},Ur=function(e){return e.parentNode},Fr=function(e,n){if(e){var t=Ur(e);t&&t.insertBefore(n,function(e){return e.nextElementSibling}(e))}},Br=function(e,n){if(e){var t=Ur(e);t&&t.insertBefore(n,e)}},Hr=function(e){var n=e.childNodes;return n?q(n):[]},Vr=function(e){return e.firstElementChild},zr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;if(void 0===Pr){var n=e.querySelector("[nonce]");Pr=n&&(n.nonce||n.getAttribute("nonce"))}return Pr},Jr="src",Qr=function(e){return P(R,{src:e})},Gr=function(e){H(R,e).forEach((function(e){var n=_r(e,Jr);n&&Qr(n)}))},Xr=function(e){return function(e,n){return e.tagName===n}(e,O)&&!_r(e,Jr)},Yr=function(e){var n=H(O,e),t=n.length,r=zr();if(r)for(var o=0;o=0;){var c=o[u];t(c);var s=Vr(e);s?Br(s,c):D(e,c),u-=1}return ao(e,i),uo(a)},fo="alloy-prehiding",po={},go=function(e){var n=po[e];n&&(X(n),delete po[e])},mo=function(e){if(e&&!jr(fo)){var n=zr(),t=Xu({id:fo},n&&{nonce:n}),r=P(O,t,{textContent:e});D(document.head,r)}},vo=function(){var e=jr(fo);e&&X(e)},ho=function(e,n,t){t(e),e.textContent=n},yo=function(e,n,t){var r=Tr(n);Yr(r);var o=Hr(r),i=oo(r),a=io(r);return Gr(r),o.forEach((function(n){t(n),Br(e,n)})),ao(e,i),uo(a)},bo=function(e,n,t){return yo(e,n,t).then((function(){X(e)}))},wo=function(e,n,t){var r=Tr(n);Yr(r);var o=Hr(r),i=oo(r),a=io(r);Gr(r);var u=e;return o.forEach((function(e){t(e),Fr(u,e),u=e})),ao(e,i),uo(a)},Eo=["priority"],Io=function(e,n,t){var r=n.priority,o=Yu(n,Eo);Object.keys(o).forEach((function(n){!function(e,n,t,r){var o;o=r?n+":"+t+" !"+r+";":n+":"+t+";",e.style.cssText+=";"+o}(e,n,o[n],r)})),t(e)},Co=function(e,n,t){Object.keys(n).forEach((function(t){Lr(e,t,n[t])})),t(e)},So=function(e,n,t){e.tagName===R&&(Qr(n),t(e),function(e,n){e.removeAttribute(n)}(e,Jr),Lr(e,Jr,n))},ko=function(e,n,t){var r=n.from,o=n.to,i=function(e){var n=e.children;return n?q(n):[]}(e),a=i[r],u=i[o];a&&u&&(r